@streamlayer/react 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/advertisement.d.ts +1 -0
- package/lib/app/app.d.ts +2 -2
- package/lib/app/auth.d.ts +0 -1
- package/lib/app/masters.d.ts +2 -1
- package/lib/app/provider.d.ts +4 -4
- package/lib/app/useStreamLayerApp.d.ts +8 -7
- package/lib/cjs/app.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -1
- package/lib/cjs/index2.js +55 -51
- package/lib/cjs/masters2.js +4 -4
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +15 -15
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +90 -86
- package/lib/dist/es/gamification-feature.js +1 -1
- package/lib/dist/es/gamification-feature2.js +18 -18
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +31784 -35347
- package/lib/dist/index.d.ts +222 -135
- package/lib/dist/style.css +1 -1
- package/lib/es/app.js +438 -414
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/gamification-feature2.js +1 -1
- package/lib/es/index2.js +10263 -10726
- package/lib/es/masters2.js +393 -432
- package/lib/es/points.js +9 -9
- package/lib/es/useStreamLayerApp2.js +8732 -11851
- package/lib/style.css +1 -1
- package/package.json +45 -40
package/lib/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare module "../../sdk-web-types/src/sl-types" {
|
|
3
2
|
import { PlainMessage } from '@bufbuild/protobuf';
|
|
4
3
|
import type { StreamSettings as SLStreamSettings, SdkOverlay, Advertising, OrganizationSettings as SLOrganizationSettings } from '@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb';
|
|
5
4
|
import type { GameSettings as IGameSettings } from '@streamlayer/sl-eslib/sdkSettings/game/common/game_common_pb';
|
|
6
5
|
import type { ClientSettings } from '@streamlayer/sl-eslib/sdkSettings/client/client_pb';
|
|
7
|
-
import type {
|
|
8
|
-
export { QuestionType, QuestionStatus, QuestionImages, ImagePosition, SilenceSetting, QuestionOptions, } from '@streamlayer/sl-eslib/interactive/interactive.common_pb';
|
|
9
|
-
import type { PickHistory as IPickHistory, InsightHistory as IInsightHistory, TweetHistory as ITweetHistory, FeedItem as IFeedItem, FeedItemAttributes as IFeedItemAttributes, InstantView as IInstantView } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
|
|
6
|
+
import type { User as ProtoUser } from '@streamlayer/sl-eslib/users/users_common_pb';
|
|
7
|
+
export { QuestionType, QuestionStatus, QuestionImages, ImagePosition, SilenceSetting, QuestionOptions, PromotionType, PromotionWallet, PromotionLogoMode, CtaIconMode, } from '@streamlayer/sl-eslib/interactive/interactive.common_pb';
|
|
8
|
+
import type { PickHistory as IPickHistory, InsightHistory as IInsightHistory, TweetHistory as ITweetHistory, FeedItem as IFeedItem, FeedItemAttributes as IFeedItemAttributes, InstantView as IInstantView, PromotionHistory as IPromotionHistory } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
|
|
10
9
|
export { PickHistoryStatus } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
|
|
11
10
|
import type { LeaderboardItem as ILeaderboardItem } from '@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb';
|
|
12
|
-
import type { ExtendedQuestionAnswer as IExtendedQuestionAnswer, Question as IQuestion, ExtendedQuestion as IExtendedQuestion } from '@streamlayer/sl-eslib/interactive/interactive.common_pb';
|
|
11
|
+
import type { ExtendedQuestionAnswer as IExtendedQuestionAnswer, Question as IQuestion, ExtendedQuestion as IExtendedQuestion, QuestionOptions_PromotionOptions } from '@streamlayer/sl-eslib/interactive/interactive.common_pb';
|
|
13
12
|
export type PickHistory = PlainMessage<IPickHistory>;
|
|
14
13
|
export type ExtendedQuestionAnswer = PlainMessage<IExtendedQuestionAnswer>;
|
|
15
14
|
export type InsightHistory = PlainMessage<IInsightHistory>;
|
|
@@ -18,7 +17,9 @@ declare module "../../sdk-web-types/src/sl-types" {
|
|
|
18
17
|
export type OrganizationAdvertising = Advertising;
|
|
19
18
|
export type FeatureConfig = SdkOverlay;
|
|
20
19
|
export type StreamSettings = SLStreamSettings;
|
|
21
|
-
export type User =
|
|
20
|
+
export type User = {
|
|
21
|
+
data: ProtoUser | undefined;
|
|
22
|
+
};
|
|
22
23
|
export type UserSettings = ClientSettings;
|
|
23
24
|
export type LeaderboardItem = ILeaderboardItem;
|
|
24
25
|
export type FeedItem = PlainMessage<IFeedItem>;
|
|
@@ -27,6 +28,8 @@ declare module "../../sdk-web-types/src/sl-types" {
|
|
|
27
28
|
export type GameSettings = PlainMessage<IGameSettings>;
|
|
28
29
|
export type Question = PlainMessage<IQuestion>;
|
|
29
30
|
export type ExtendedQuestion = PlainMessage<IExtendedQuestion>;
|
|
31
|
+
export type PromotionHistory = PlainMessage<IPromotionHistory>;
|
|
32
|
+
export type PromotionOptions = PlainMessage<QuestionOptions_PromotionOptions>;
|
|
30
33
|
export { SdkOverlayType as FeatureType, SdkOverlaySettings, GamesOverlaySettings, } from '@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb';
|
|
31
34
|
export { InvitationFrom } from '@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb';
|
|
32
35
|
}
|
|
@@ -39,7 +42,7 @@ declare module "../../sdk-web-logger/src/index" {
|
|
|
39
42
|
export type Logger = ReturnType<typeof createLogger>;
|
|
40
43
|
}
|
|
41
44
|
declare module "../../sdk-web-interfaces/src/event-bus/index" {
|
|
42
|
-
import { InvitationFrom, QuestionType } from '
|
|
45
|
+
import { InvitationFrom, QuestionType } from '@streamlayer/sdk-web-types';
|
|
43
46
|
const EventBusActions: {
|
|
44
47
|
notification: {
|
|
45
48
|
received: string;
|
|
@@ -94,7 +97,7 @@ declare module "../../sdk-web-interfaces/src/event-bus/index" {
|
|
|
94
97
|
private name;
|
|
95
98
|
private listeners;
|
|
96
99
|
constructor(name?: string);
|
|
97
|
-
emit: <K extends
|
|
100
|
+
emit: <K extends EventBusActionsKeys = "notification" | "invitation" | "interactions" | "poll">(type: K, payload: Omit<EventBusData<K>, "type">) => void;
|
|
98
101
|
listen<T extends EventBusActionsKeys>(listener: (event: EventBusEvent<T>) => void): () => void;
|
|
99
102
|
off<T extends EventBusActionsKeys>(listener: (event: EventBusEvent<T>) => void): void;
|
|
100
103
|
destroy: () => void;
|
|
@@ -177,7 +180,7 @@ declare module "../../sdk-web-interfaces/src/store/map" {
|
|
|
177
180
|
};
|
|
178
181
|
}
|
|
179
182
|
declare module "../../sdk-web-interfaces/src/feature" {
|
|
180
|
-
import { FeatureConfig as SdkOverlay, SdkOverlaySettings } from '
|
|
183
|
+
import { FeatureConfig as SdkOverlay, SdkOverlaySettings } from '@streamlayer/sdk-web-types';
|
|
181
184
|
import { PlainMessage } from '@bufbuild/protobuf';
|
|
182
185
|
import { WritableAtom } from 'nanostores';
|
|
183
186
|
import { MapStore } from "../../sdk-web-interfaces/src/store/map";
|
|
@@ -228,10 +231,10 @@ declare module "../../sdk-web-interfaces/src/store/single" {
|
|
|
228
231
|
* Wrapper for nanostores WritableAtom
|
|
229
232
|
*/
|
|
230
233
|
export class SingleStore<StoreValue, StoreInstance extends WritableAtom<StoreValue | undefined> = WritableAtom<StoreValue | undefined>> extends AbstractStore<StoreInstance> {
|
|
231
|
-
getValue: () => StoreInstance[
|
|
234
|
+
getValue: () => StoreInstance["value"];
|
|
232
235
|
getValues(): unknown;
|
|
233
236
|
setValue: (value?: StoreValue) => void;
|
|
234
|
-
subscribe: (listener: Parameters<StoreInstance[
|
|
237
|
+
subscribe: (listener: Parameters<StoreInstance["subscribe"]>[0]) => () => void;
|
|
235
238
|
unsubscribe: () => void;
|
|
236
239
|
listen(listener: Parameters<StoreInstance['subscribe']>[0]): () => void;
|
|
237
240
|
get(): StoreValue | undefined;
|
|
@@ -240,7 +243,7 @@ declare module "../../sdk-web-interfaces/src/store/single" {
|
|
|
240
243
|
* create atom store from nanostores
|
|
241
244
|
*/
|
|
242
245
|
export const createSingleStore: <T>(initialData: T) => WritableAtom<T>;
|
|
243
|
-
export const createComputedStore: <Value, T extends WritableAtom
|
|
246
|
+
export const createComputedStore: <Value, T extends WritableAtom = WritableAtom<any>>(store: T, mutator: (value: StoreValue<T>) => Value) => import("nanostores").ReadableAtom<Value>;
|
|
244
247
|
}
|
|
245
248
|
declare module "../../sdk-web-interfaces/src/store/api" {
|
|
246
249
|
import type { FetcherStore, FetcherValue } from '@nanostores/query';
|
|
@@ -255,18 +258,18 @@ declare module "../../sdk-web-interfaces/src/store/api" {
|
|
|
255
258
|
getAtomStore: () => WritableAtom<string | undefined>;
|
|
256
259
|
getValue: () => Promise<StoreValue | undefined>;
|
|
257
260
|
getValues: () => FetcherValue<StoreValue, any>;
|
|
258
|
-
setValue: (value?: StoreInstance[
|
|
261
|
+
setValue: (value?: StoreInstance["value"]) => void;
|
|
259
262
|
subscribe: StoreInstance['subscribe'];
|
|
260
263
|
unsubscribe: () => never;
|
|
261
264
|
invalidate: () => void;
|
|
262
|
-
listen: (cb: Parameters<StoreInstance[
|
|
265
|
+
listen: (cb: Parameters<StoreInstance["listen"]>[0]) => () => void;
|
|
263
266
|
get(): void;
|
|
264
267
|
key: () => string | undefined;
|
|
265
268
|
off: () => void;
|
|
266
269
|
}
|
|
267
270
|
}
|
|
268
271
|
declare module "../../sdk-web-interfaces/src/index" {
|
|
269
|
-
import { FeatureType } from '
|
|
272
|
+
import { FeatureType } from '@streamlayer/sdk-web-types';
|
|
270
273
|
import { EventBus, EventBusEvent, EventBusData, EventBusActionPayload } from "../../sdk-web-interfaces/src/event-bus/index";
|
|
271
274
|
export { AbstractAuthenticationProvider } from "../../sdk-web-interfaces/src/auth";
|
|
272
275
|
export { AbstractFeature, FeatureSource, type FeatureProps, FeatureStatus } from "../../sdk-web-interfaces/src/feature";
|
|
@@ -367,7 +370,7 @@ declare module "../../sdk-web-api/src/grpc/retry" {
|
|
|
367
370
|
export const retry: Interceptor;
|
|
368
371
|
}
|
|
369
372
|
declare module "../../sdk-web-api/src/grpc/transport" {
|
|
370
|
-
import { MapStore } from '
|
|
373
|
+
import { MapStore } from '@streamlayer/sdk-web-interfaces';
|
|
371
374
|
import { createRouterTransport, ConnectRouter, Interceptor, PromiseClient, UnaryRequest, StreamRequest } from '@connectrpc/connect';
|
|
372
375
|
import type { ServiceType, Message, PlainMessage } from '@bufbuild/protobuf';
|
|
373
376
|
import { createGrpcWebTransport } from '@connectrpc/connect-web';
|
|
@@ -425,7 +428,7 @@ declare module "../../sdk-web-api/src/grpc/transport" {
|
|
|
425
428
|
refetchInterval?: number;
|
|
426
429
|
retryable?: boolean;
|
|
427
430
|
});
|
|
428
|
-
addSubscription: <T extends ServiceType, Req extends Message<Req>, Res extends Message<Res>>(method: ServerStreamSubscription<T, Req, Res>[
|
|
431
|
+
addSubscription: <T extends ServiceType, Req extends Message<Req>, Res extends Message<Res>>(method: ServerStreamSubscription<T, Req, Res>["method"], params: Atom<PlainMessage<Req>> | PlainMessage<Req>, options: ServerStreamSubscriptionOptions) => ServerStreamSubscription<ServiceType, Message<import("@bufbuild/protobuf").AnyMessage>, Message<import("@bufbuild/protobuf").AnyMessage>, never, never> | ServerStreamSubscription<T, Req, Res, keyof { [P in keyof PromiseClient<T> as T["methods"][P] extends import("@bufbuild/protobuf").MethodInfoServerStreaming<any, any> ? P : never]: T["methods"][P] extends import("@bufbuild/protobuf").MethodInfoServerStreaming<any, any> ? PromiseClient<T>[P] : never; }, { [P in keyof PromiseClient<T> as T["methods"][P] extends import("@bufbuild/protobuf").MethodInfoServerStreaming<any, any> ? P : never]: T["methods"][P] extends import("@bufbuild/protobuf").MethodInfoServerStreaming<any, any> ? PromiseClient<T>[P] : never; }[keyof { [P in keyof PromiseClient<T> as T["methods"][P] extends import("@bufbuild/protobuf").MethodInfoServerStreaming<any, any> ? P : never]: T["methods"][P] extends import("@bufbuild/protobuf").MethodInfoServerStreaming<any, any> ? PromiseClient<T>[P] : never; }]>;
|
|
429
432
|
removeSubscription: (subscription: ServerStreamSubscription<ServiceType, Message, Message>) => void;
|
|
430
433
|
disconnect: () => void;
|
|
431
434
|
registerInterceptor: (interceptor: Interceptor) => void;
|
|
@@ -433,8 +436,8 @@ declare module "../../sdk-web-api/src/grpc/transport" {
|
|
|
433
436
|
getClient: <T extends ServiceType>(service: T) => PromiseClient<T>;
|
|
434
437
|
getStreamClient: <T extends ServiceType>(service: T) => PromiseClient<T>;
|
|
435
438
|
createPromiseClient: <T extends ServiceType>(service: T, { params, method }: {
|
|
436
|
-
params?: KeyInput
|
|
437
|
-
method: keyof T[
|
|
439
|
+
params?: KeyInput;
|
|
440
|
+
method: keyof T["methods"];
|
|
438
441
|
}) => {
|
|
439
442
|
client: PromiseClient<T>;
|
|
440
443
|
createRequestOptions: (options: RequestOptions) => import("@connectrpc/connect").ContextValues;
|
|
@@ -446,7 +449,7 @@ declare module "../../sdk-web-api/src/grpc/transport" {
|
|
|
446
449
|
};
|
|
447
450
|
setSdkKey: (sdkKey: string) => void;
|
|
448
451
|
setAuth: (token: string, userId: string) => void;
|
|
449
|
-
setHeader: <T extends
|
|
452
|
+
setHeader: <T extends keyof KnownHeaders = string>(name: ExcludeReservedHeaders<T>, value: string) => void;
|
|
450
453
|
getHeader: (name: keyof KnownHeaders) => string;
|
|
451
454
|
getHeaders: () => KnownHeaders;
|
|
452
455
|
initInterceptors: () => void;
|
|
@@ -531,7 +534,9 @@ declare module "../../sdk-web-api/src/grpc/queries/user" {
|
|
|
531
534
|
import type { BypassAuthRequest } from '@streamlayer/sl-eslib/users/users_pb';
|
|
532
535
|
import { PlainMessage } from '@bufbuild/protobuf';
|
|
533
536
|
import { Transport } from "../../sdk-web-api/src/grpc/transport";
|
|
534
|
-
export const $user: ($userToken: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<
|
|
537
|
+
export const $user: ($userToken: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<{
|
|
538
|
+
data: import("@streamlayer/sl-eslib/users/users_common_pb").User | undefined;
|
|
539
|
+
}, any>;
|
|
535
540
|
export const bypassLogin: (transport: Transport) => ({ userKey, schema, init, inviterKey }: PlainMessage<BypassAuthRequest>) => Promise<import("@streamlayer/sl-eslib/users/users_pb").BypassAuthResponse>;
|
|
536
541
|
export const bypassAuth: (transport: Transport, params: {
|
|
537
542
|
userKey?: string;
|
|
@@ -545,7 +550,7 @@ declare module "../../sdk-web-api/src/grpc/queries/organization" {
|
|
|
545
550
|
import { ReadableAtom } from 'nanostores';
|
|
546
551
|
import { Transport } from "../../sdk-web-api/src/grpc/transport";
|
|
547
552
|
export { $user } from "../../sdk-web-api/src/grpc/queries/user";
|
|
548
|
-
export const $organizationSettings: ($enabled: ReadableAtom<
|
|
553
|
+
export const $organizationSettings: ($enabled: ReadableAtom<"on" | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<{
|
|
549
554
|
id: string;
|
|
550
555
|
overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
|
|
551
556
|
buttonIcon?: string | undefined;
|
|
@@ -558,9 +563,9 @@ declare module "../../sdk-web-api/src/grpc/queries/organization" {
|
|
|
558
563
|
moderationPrimaryColor?: string | undefined;
|
|
559
564
|
linkShareIcon?: string | undefined;
|
|
560
565
|
linkShareText?: string | undefined;
|
|
561
|
-
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults
|
|
562
|
-
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK
|
|
563
|
-
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient
|
|
566
|
+
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults;
|
|
567
|
+
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK;
|
|
568
|
+
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient;
|
|
564
569
|
publicName?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").PublicName | undefined;
|
|
565
570
|
analyticsVersion?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").AnalyticsVersion | undefined;
|
|
566
571
|
} | undefined, any>;
|
|
@@ -572,7 +577,7 @@ declare module "../../sdk-web-api/src/grpc/queries/index" {
|
|
|
572
577
|
export * from "../../sdk-web-api/src/grpc/queries/user";
|
|
573
578
|
}
|
|
574
579
|
declare module "../../sdk-web-api/src/index" {
|
|
575
|
-
import { StreamLayerContext } from '
|
|
580
|
+
import { StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
576
581
|
import { FetcherStore } from '@nanostores/query';
|
|
577
582
|
export type { ServerStreamSubscriptionOptions } from "../../sdk-web-api/src/grpc/subscription";
|
|
578
583
|
export { Transport } from "../../sdk-web-api/src/grpc/transport";
|
|
@@ -597,7 +602,7 @@ declare module "../../sdk-web-api/src/index" {
|
|
|
597
602
|
}, done: () => void) => void;
|
|
598
603
|
}
|
|
599
604
|
declare module "../../sdk-web-core/src/storage" {
|
|
600
|
-
import { Storage } from '
|
|
605
|
+
import { Storage } from '@streamlayer/sdk-web-storage';
|
|
601
606
|
export class UserStorage extends Storage {
|
|
602
607
|
constructor();
|
|
603
608
|
setSchema: (value: string) => void;
|
|
@@ -610,9 +615,9 @@ declare module "../../sdk-web-core/src/storage" {
|
|
|
610
615
|
}
|
|
611
616
|
}
|
|
612
617
|
declare module "../../sdk-web-core/src/store/init" {
|
|
613
|
-
import { SingleStore, ApiStore } from '
|
|
614
|
-
import { Transport } from '
|
|
615
|
-
import
|
|
618
|
+
import { SingleStore, ApiStore } from '@streamlayer/sdk-web-interfaces';
|
|
619
|
+
import { Transport } from '@streamlayer/sdk-web-api';
|
|
620
|
+
import { User } from '@streamlayer/sdk-web-types';
|
|
616
621
|
export enum CoreStatus {
|
|
617
622
|
DISABLED = "disabled",
|
|
618
623
|
INITIALIZATION = "initialization",
|
|
@@ -626,7 +631,7 @@ declare module "../../sdk-web-core/src/store/init" {
|
|
|
626
631
|
readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
627
632
|
readonly slStreamId: ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined, any>>;
|
|
628
633
|
readonly streamSettings: ApiStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings | undefined, any>>;
|
|
629
|
-
readonly user: ApiStore<
|
|
634
|
+
readonly user: ApiStore<User, import("@nanostores/query").FetcherStore<User, any>>;
|
|
630
635
|
readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
631
636
|
readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
632
637
|
readonly userSettings: ApiStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings | undefined, any>>;
|
|
@@ -643,9 +648,9 @@ declare module "../../sdk-web-core/src/store/init" {
|
|
|
643
648
|
moderationPrimaryColor?: string | undefined;
|
|
644
649
|
linkShareIcon?: string | undefined;
|
|
645
650
|
linkShareText?: string | undefined;
|
|
646
|
-
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults
|
|
647
|
-
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK
|
|
648
|
-
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient
|
|
651
|
+
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults;
|
|
652
|
+
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK;
|
|
653
|
+
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient;
|
|
649
654
|
publicName?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").PublicName | undefined;
|
|
650
655
|
analyticsVersion?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").AnalyticsVersion | undefined;
|
|
651
656
|
} | undefined, import("@nanostores/query").FetcherStore<{
|
|
@@ -661,9 +666,9 @@ declare module "../../sdk-web-core/src/store/init" {
|
|
|
661
666
|
moderationPrimaryColor?: string | undefined;
|
|
662
667
|
linkShareIcon?: string | undefined;
|
|
663
668
|
linkShareText?: string | undefined;
|
|
664
|
-
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults
|
|
665
|
-
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK
|
|
666
|
-
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient
|
|
669
|
+
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults;
|
|
670
|
+
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK;
|
|
671
|
+
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient;
|
|
667
672
|
publicName?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").PublicName | undefined;
|
|
668
673
|
analyticsVersion?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").AnalyticsVersion | undefined;
|
|
669
674
|
} | undefined, any>>;
|
|
@@ -671,9 +676,9 @@ declare module "../../sdk-web-core/src/store/init" {
|
|
|
671
676
|
};
|
|
672
677
|
}
|
|
673
678
|
declare module "../../sdk-web-core/src/store/store" {
|
|
674
|
-
import type { OrganizationAdvertising, StreamSettings, OrganizationSettings, User, UserSettings } from '
|
|
675
|
-
import { AbstractStore } from '
|
|
676
|
-
import { Transport } from '
|
|
679
|
+
import type { OrganizationAdvertising, StreamSettings, OrganizationSettings, User, UserSettings } from '@streamlayer/sdk-web-types';
|
|
680
|
+
import { AbstractStore } from '@streamlayer/sdk-web-interfaces';
|
|
681
|
+
import { Transport } from '@streamlayer/sdk-web-api';
|
|
677
682
|
import { ReadableAtom } from 'nanostores';
|
|
678
683
|
import { FetcherValue } from '@nanostores/query';
|
|
679
684
|
import { initializeStore, CoreStatus } from "../../sdk-web-core/src/store/init";
|
|
@@ -721,16 +726,16 @@ declare module "../../sdk-web-core/src/store/store" {
|
|
|
721
726
|
constructor(transport: Transport);
|
|
722
727
|
getValue(): unknown;
|
|
723
728
|
getValues(): {
|
|
724
|
-
readonly enabled: import(
|
|
725
|
-
readonly status: import(
|
|
726
|
-
readonly providerStreamId: import(
|
|
727
|
-
readonly slStreamId: import(
|
|
728
|
-
readonly streamSettings: import(
|
|
729
|
-
readonly user: import(
|
|
730
|
-
readonly userKey: import(
|
|
731
|
-
readonly userToken: import(
|
|
732
|
-
readonly userSettings: import(
|
|
733
|
-
readonly organizationSettings: import(
|
|
729
|
+
readonly enabled: import("@streamlayer/sdk-web-interfaces").SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
|
|
730
|
+
readonly status: import("@streamlayer/sdk-web-interfaces").SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus>>;
|
|
731
|
+
readonly providerStreamId: import("@streamlayer/sdk-web-interfaces").SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
732
|
+
readonly slStreamId: import("@streamlayer/sdk-web-interfaces").ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined, any>>;
|
|
733
|
+
readonly streamSettings: import("@streamlayer/sdk-web-interfaces").ApiStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings | undefined, any>>;
|
|
734
|
+
readonly user: import("@streamlayer/sdk-web-interfaces").ApiStore<User, import("@nanostores/query").FetcherStore<User, any>>;
|
|
735
|
+
readonly userKey: import("@streamlayer/sdk-web-interfaces").SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
736
|
+
readonly userToken: import("@streamlayer/sdk-web-interfaces").SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
737
|
+
readonly userSettings: import("@streamlayer/sdk-web-interfaces").ApiStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings | undefined, any>>;
|
|
738
|
+
readonly organizationSettings: import("@streamlayer/sdk-web-interfaces").ApiStore<{
|
|
734
739
|
id: string;
|
|
735
740
|
overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
|
|
736
741
|
buttonIcon?: string | undefined;
|
|
@@ -743,9 +748,9 @@ declare module "../../sdk-web-core/src/store/store" {
|
|
|
743
748
|
moderationPrimaryColor?: string | undefined;
|
|
744
749
|
linkShareIcon?: string | undefined;
|
|
745
750
|
linkShareText?: string | undefined;
|
|
746
|
-
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults
|
|
747
|
-
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK
|
|
748
|
-
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient
|
|
751
|
+
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults;
|
|
752
|
+
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK;
|
|
753
|
+
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient;
|
|
749
754
|
publicName?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").PublicName | undefined;
|
|
750
755
|
analyticsVersion?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").AnalyticsVersion | undefined;
|
|
751
756
|
} | undefined, import("@nanostores/query").FetcherStore<{
|
|
@@ -761,13 +766,13 @@ declare module "../../sdk-web-core/src/store/store" {
|
|
|
761
766
|
moderationPrimaryColor?: string | undefined;
|
|
762
767
|
linkShareIcon?: string | undefined;
|
|
763
768
|
linkShareText?: string | undefined;
|
|
764
|
-
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults
|
|
765
|
-
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK
|
|
766
|
-
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient
|
|
769
|
+
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults;
|
|
770
|
+
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK;
|
|
771
|
+
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient;
|
|
767
772
|
publicName?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").PublicName | undefined;
|
|
768
773
|
analyticsVersion?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").AnalyticsVersion | undefined;
|
|
769
774
|
} | undefined, any>>;
|
|
770
|
-
readonly organizationAdvertising: import(
|
|
775
|
+
readonly organizationAdvertising: import("@streamlayer/sdk-web-interfaces").ApiStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising | undefined, any>>;
|
|
771
776
|
};
|
|
772
777
|
setValue(): void;
|
|
773
778
|
subscribe: (subscribes: Partial<StoreListeners>) => void;
|
|
@@ -778,7 +783,7 @@ declare module "../../sdk-web-core/src/store/store" {
|
|
|
778
783
|
};
|
|
779
784
|
}
|
|
780
785
|
declare module "../../sdk-web-core/src/deepLink/index" {
|
|
781
|
-
import { MapStore, StreamLayerContext } from '
|
|
786
|
+
import { MapStore, StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
782
787
|
type DeepLinkContextData = {
|
|
783
788
|
handled?: boolean;
|
|
784
789
|
parsed?: boolean;
|
|
@@ -822,8 +827,8 @@ declare module "../../sdk-web-core/src/deepLink/index" {
|
|
|
822
827
|
}, done: () => void) => void;
|
|
823
828
|
}
|
|
824
829
|
declare module "../../sdk-web-core/src/auth/bypass/index" {
|
|
825
|
-
import { AbstractAuthenticationProvider } from '
|
|
826
|
-
import { Transport } from '
|
|
830
|
+
import { AbstractAuthenticationProvider } from '@streamlayer/sdk-web-interfaces';
|
|
831
|
+
import { Transport } from '@streamlayer/sdk-web-api';
|
|
827
832
|
import { CoreStore } from "../../sdk-web-core/src/store/store";
|
|
828
833
|
import { DeepLinkContext } from "../../sdk-web-core/src/deepLink/index";
|
|
829
834
|
/**
|
|
@@ -875,7 +880,7 @@ declare module "../../sdk-web-core/src/auth/bypass/index" {
|
|
|
875
880
|
}
|
|
876
881
|
}
|
|
877
882
|
declare module "../../sdk-web-core/src/auth/index" {
|
|
878
|
-
import { StreamLayerContext } from '
|
|
883
|
+
import { StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
879
884
|
import { CoreStores, StoreObj } from "../../sdk-web-core/src/store/store";
|
|
880
885
|
import { UserStorage } from "../../sdk-web-core/src/storage";
|
|
881
886
|
import { BypassAuth } from "../../sdk-web-core/src/auth/bypass/index";
|
|
@@ -899,7 +904,7 @@ declare module "../../sdk-web-core/src/auth/index" {
|
|
|
899
904
|
export const bypass: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
|
|
900
905
|
}
|
|
901
906
|
declare module "../../sdk-web-core/src/store/index" {
|
|
902
|
-
import { StreamLayerContext } from '
|
|
907
|
+
import { StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
903
908
|
import { CoreStore, CoreStores, StoreObj } from "../../sdk-web-core/src/store/store";
|
|
904
909
|
module '@streamlayer/sdk-web-interfaces' {
|
|
905
910
|
interface StreamLayerSDK {
|
|
@@ -929,7 +934,7 @@ declare module "../../sdk-web-core/src/store/index" {
|
|
|
929
934
|
export const store: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
|
|
930
935
|
}
|
|
931
936
|
declare module "../../sdk-web-core/src/videoPlayer/index" {
|
|
932
|
-
import { StreamLayerContext } from '
|
|
937
|
+
import { StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
933
938
|
export type VideoPlayerData = {
|
|
934
939
|
muted: boolean;
|
|
935
940
|
};
|
|
@@ -952,7 +957,7 @@ declare module "../../sdk-web-core/src/videoPlayer/index" {
|
|
|
952
957
|
}, done: () => void) => void;
|
|
953
958
|
}
|
|
954
959
|
declare module "../../sdk-web-core/src/index" {
|
|
955
|
-
import { StreamLayerContext } from '
|
|
960
|
+
import { StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
956
961
|
export { bypass, storage } from "../../sdk-web-core/src/auth/index";
|
|
957
962
|
export { store } from "../../sdk-web-core/src/store/index";
|
|
958
963
|
export { deepLink, type DeepLinkUrlParams, type DeepLinkCallback, type DeepLinkContext, DEEP_LINK_PREFIX, DEEP_LINK_USER_ID, DEEP_LINK_EVENT_ID, DEEP_LINK_EXTERNAL_EVENT_ID, } from "../../sdk-web-core/src/deepLink/index";
|
|
@@ -985,11 +990,11 @@ declare module "../../sdk-web-core/src/index" {
|
|
|
985
990
|
export const core: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
|
|
986
991
|
}
|
|
987
992
|
declare module "../../react-ui/src/index" {
|
|
988
|
-
export { App } from '
|
|
993
|
+
export { App } from 'app/app';
|
|
989
994
|
export { StreamLayerThemeProvider } from 'ui/theme';
|
|
990
995
|
}
|
|
991
996
|
declare module "../../sdk-web-notifications/src/queue/index" {
|
|
992
|
-
import { SingleStore, createComputedStore } from '
|
|
997
|
+
import { SingleStore, createComputedStore } from '@streamlayer/sdk-web-interfaces';
|
|
993
998
|
import { Notification } from "../../sdk-web-notifications/src/index";
|
|
994
999
|
export type NotificationsQueueOptions = {
|
|
995
1000
|
concurrency: number;
|
|
@@ -1015,7 +1020,7 @@ declare module "../../sdk-web-notifications/src/queue/index" {
|
|
|
1015
1020
|
}
|
|
1016
1021
|
}
|
|
1017
1022
|
declare module "../../sdk-web-notifications/src/storage" {
|
|
1018
|
-
import { Storage } from '
|
|
1023
|
+
import { Storage } from '@streamlayer/sdk-web-storage';
|
|
1019
1024
|
export class NotificationStorage extends Storage {
|
|
1020
1025
|
constructor();
|
|
1021
1026
|
setOpened: (notificationId: string) => void;
|
|
@@ -1024,7 +1029,7 @@ declare module "../../sdk-web-notifications/src/storage" {
|
|
|
1024
1029
|
}
|
|
1025
1030
|
}
|
|
1026
1031
|
declare module "../../sdk-web-notifications/src/notifications" {
|
|
1027
|
-
import { InstantView, QuestionType, GameSettings, TweetHistory } from '
|
|
1032
|
+
import { InstantView, QuestionType, GameSettings, TweetHistory } from '@streamlayer/sdk-web-types';
|
|
1028
1033
|
import { NotificationsQueue, NotificationsQueueOptions } from "../../sdk-web-notifications/src/queue/index";
|
|
1029
1034
|
export type NotificationData = {
|
|
1030
1035
|
questionId: string;
|
|
@@ -1091,7 +1096,7 @@ declare module "../../sdk-web-notifications/src/notifications" {
|
|
|
1091
1096
|
}
|
|
1092
1097
|
}
|
|
1093
1098
|
declare module "../../sdk-web-notifications/src/index" {
|
|
1094
|
-
import { StreamLayerContext } from '
|
|
1099
|
+
import { StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
1095
1100
|
import { Notifications } from "../../sdk-web-notifications/src/notifications";
|
|
1096
1101
|
export { type Notification, type NotificationData, NotificationType, Notifications } from "../../sdk-web-notifications/src/notifications";
|
|
1097
1102
|
export { type NotificationsList } from "../../sdk-web-notifications/src/queue/index";
|
|
@@ -1112,7 +1117,7 @@ declare module "../../sdk-web-notifications/src/index" {
|
|
|
1112
1117
|
export const notifications: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
|
|
1113
1118
|
}
|
|
1114
1119
|
declare module "../../feature-gamification/src/queries/leaderboard" {
|
|
1115
|
-
import type { Transport } from '
|
|
1120
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1116
1121
|
import { ReadableAtom } from 'nanostores';
|
|
1117
1122
|
import { ListRequest, SummaryRequest } from '@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb';
|
|
1118
1123
|
import { PartialMessage } from '@bufbuild/protobuf';
|
|
@@ -1123,17 +1128,17 @@ declare module "../../feature-gamification/src/queries/leaderboard" {
|
|
|
1123
1128
|
export const createUserSummaryFetch: (transport: Transport) => (params: PartialMessage<SummaryRequest>) => Promise<import("@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb").SummaryResponse>;
|
|
1124
1129
|
}
|
|
1125
1130
|
declare module "../../feature-gamification/src/queries/friends" {
|
|
1126
|
-
import type { Transport } from '
|
|
1131
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1127
1132
|
import { ReadableAtom } from 'nanostores';
|
|
1128
1133
|
export const $friends: ($userId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").GetFriendsResponse_FriendData[], any>;
|
|
1129
1134
|
}
|
|
1130
1135
|
declare module "../../feature-gamification/src/queries/moderation" {
|
|
1131
|
-
import type { Transport } from '
|
|
1136
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1132
1137
|
import { ReadableAtom } from 'nanostores';
|
|
1133
1138
|
export const $moderation: (slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InteractiveFeed | undefined, any>;
|
|
1134
1139
|
}
|
|
1135
1140
|
declare module "../../feature-gamification/src/queries/index" {
|
|
1136
|
-
import type { Transport } from '
|
|
1141
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1137
1142
|
import { ReadableAtom } from 'nanostores';
|
|
1138
1143
|
import type { SubscriptionRequest, SubscriptionResponse, VotingSubscriptionRequest, VotingSubscriptionResponse, QuestionSubscriptionRequest, QuestionSubscriptionResponse } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
|
|
1139
1144
|
import { InteractiveAllowed } from "../../feature-gamification/src/background";
|
|
@@ -1244,7 +1249,7 @@ declare module "../../feature-gamification/src/queries/index" {
|
|
|
1244
1249
|
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
1245
1250
|
};
|
|
1246
1251
|
};
|
|
1247
|
-
}, SubscriptionRequest, SubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription" | "feedSubscription", ((request: import("@bufbuild/protobuf").PartialMessage<SubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions
|
|
1252
|
+
}, SubscriptionRequest, SubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription" | "feedSubscription", ((request: import("@bufbuild/protobuf").PartialMessage<SubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<SubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<VotingSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<VotingSubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<QuestionSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<QuestionSubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionResponse>)>;
|
|
1248
1253
|
export const votingSubscription: (params: {
|
|
1249
1254
|
questionId: string;
|
|
1250
1255
|
feedId: string;
|
|
@@ -1354,7 +1359,7 @@ declare module "../../feature-gamification/src/queries/index" {
|
|
|
1354
1359
|
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
1355
1360
|
};
|
|
1356
1361
|
};
|
|
1357
|
-
}, VotingSubscriptionRequest, VotingSubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription" | "feedSubscription", ((request: import("@bufbuild/protobuf").PartialMessage<SubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions
|
|
1362
|
+
}, VotingSubscriptionRequest, VotingSubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription" | "feedSubscription", ((request: import("@bufbuild/protobuf").PartialMessage<SubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<SubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<VotingSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<VotingSubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<QuestionSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<QuestionSubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionResponse>)>;
|
|
1358
1363
|
export const questionSubscription: (questionId: string, transport: Transport) => import("../../../sdk-web-api/src/grpc/subscription").ServerStreamSubscription<import("@bufbuild/protobuf").ServiceType, import("@bufbuild/protobuf").Message<import("@bufbuild/protobuf").AnyMessage>, import("@bufbuild/protobuf").Message<import("@bufbuild/protobuf").AnyMessage>, never, never> | import("../../../sdk-web-api/src/grpc/subscription").ServerStreamSubscription<{
|
|
1359
1364
|
readonly typeName: "streamlayer.interactive.feed.Feed";
|
|
1360
1365
|
readonly methods: {
|
|
@@ -1461,10 +1466,11 @@ declare module "../../feature-gamification/src/queries/index" {
|
|
|
1461
1466
|
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
1462
1467
|
};
|
|
1463
1468
|
};
|
|
1464
|
-
}, QuestionSubscriptionRequest, QuestionSubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription" | "feedSubscription", ((request: import("@bufbuild/protobuf").PartialMessage<SubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions
|
|
1469
|
+
}, QuestionSubscriptionRequest, QuestionSubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription" | "feedSubscription", ((request: import("@bufbuild/protobuf").PartialMessage<SubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<SubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<VotingSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<VotingSubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<QuestionSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<QuestionSubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionResponse>)>;
|
|
1465
1470
|
export const getQuestionByUser: (questionId: string, transport: Transport) => Promise<import("@streamlayer/sl-eslib/interactive/interactive.common_pb").ExtendedQuestion | undefined>;
|
|
1466
1471
|
export const getQuestionDetail: (questionId: string, transport: Transport) => Promise<import("@streamlayer/sl-eslib/interactive/interactive.common_pb").Question | undefined>;
|
|
1467
1472
|
export const $questionByUser: ($questionId: ReadableAtom<string | undefined> | string, transport: Transport) => import("@nanostores/query").FetcherStore<import("@bufbuild/protobuf").PlainMessage<import("@streamlayer/sl-eslib/interactive/interactive.common_pb").ExtendedQuestion>, any>;
|
|
1473
|
+
export const getPromotionDetail: (promoId: string, transport: Transport) => Promise<import("@streamlayer/sl-eslib/interactive/interactive.common_pb").QuestionOptions_PromotionOptions | undefined>;
|
|
1468
1474
|
export const $pickHistory: (slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<(import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistory | undefined)[], any>;
|
|
1469
1475
|
export const $feedList: ($slStreamId: ReadableAtom<string | undefined>, $interactiveAllowed: ReadableAtom<InteractiveAllowed>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedItem[], any>;
|
|
1470
1476
|
export { $userSummary, $leaderboardList } from "../../feature-gamification/src/queries/leaderboard";
|
|
@@ -1472,31 +1478,105 @@ declare module "../../feature-gamification/src/queries/index" {
|
|
|
1472
1478
|
export { $moderation } from "../../feature-gamification/src/queries/moderation";
|
|
1473
1479
|
}
|
|
1474
1480
|
declare module "../../feature-gamification/src/detail" {
|
|
1475
|
-
import type { Transport } from '
|
|
1476
|
-
import { FeedItem, ExtendedQuestion } from '
|
|
1481
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1482
|
+
import { FeedItem, ExtendedQuestion } from '@streamlayer/sdk-web-types';
|
|
1477
1483
|
import { ReadableAtom } from 'nanostores';
|
|
1478
1484
|
import { type GamificationBackground } from "../../feature-gamification/src/background";
|
|
1479
1485
|
export const detail: (transport: Transport, $openedQuestionId: ReadableAtom<{
|
|
1480
1486
|
questionId: string;
|
|
1481
1487
|
question?: FeedItem & {
|
|
1482
|
-
openedFrom?:
|
|
1488
|
+
openedFrom?: "list" | "notification";
|
|
1483
1489
|
};
|
|
1484
|
-
} | undefined>, $feedList: ReturnType<GamificationBackground[
|
|
1490
|
+
} | undefined>, $feedList: ReturnType<GamificationBackground["feedList"]["getStore"]>) => {
|
|
1485
1491
|
$store: ReadableAtom<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedItem | (import("@bufbuild/protobuf").PlainMessage<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedItem> & {
|
|
1486
|
-
openedFrom?: "list" | "notification"
|
|
1492
|
+
openedFrom?: "list" | "notification";
|
|
1487
1493
|
}) | undefined>;
|
|
1488
1494
|
$extendedStore: import("@nanostores/query").FetcherStore<import("@bufbuild/protobuf").PlainMessage<import("@streamlayer/sl-eslib/interactive/interactive.common_pb").ExtendedQuestion>, any>;
|
|
1489
1495
|
updateExtendedQuestion: (question: ExtendedQuestion | undefined) => void;
|
|
1490
1496
|
};
|
|
1491
1497
|
}
|
|
1498
|
+
declare module "../../feature-gamification/src/advertisement/storage" {
|
|
1499
|
+
import { Storage } from '@streamlayer/sdk-web-storage';
|
|
1500
|
+
export class AdvertisementStorage extends Storage {
|
|
1501
|
+
constructor();
|
|
1502
|
+
setShowed: (advertId: string) => void;
|
|
1503
|
+
isShowed: (advertId: string) => string | undefined;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
declare module "../../feature-gamification/src/advertisement/queue" {
|
|
1507
|
+
import { SingleStore, createComputedStore } from '@streamlayer/sdk-web-interfaces';
|
|
1508
|
+
import { Advertisement } from "../../feature-gamification/src/advertisement/index";
|
|
1509
|
+
export type AdvertisementsQueueOptions = {
|
|
1510
|
+
concurrency: number;
|
|
1511
|
+
animationDelay: number;
|
|
1512
|
+
};
|
|
1513
|
+
export type AdvertisementsList = ReturnType<typeof createComputedStore<Advertisement[]>>;
|
|
1514
|
+
export class AdvertisementsQueue {
|
|
1515
|
+
advertisementList: ReturnType<SingleStore<Map<Advertisement['id'], Advertisement>>['getStore']>;
|
|
1516
|
+
private store;
|
|
1517
|
+
private timeouts;
|
|
1518
|
+
private waitingQueue;
|
|
1519
|
+
private activeQueue;
|
|
1520
|
+
private options;
|
|
1521
|
+
private logger;
|
|
1522
|
+
constructor(options: AdvertisementsQueueOptions);
|
|
1523
|
+
addToQueue: (advertisement: Advertisement) => void;
|
|
1524
|
+
tickWaitingQueue: () => void;
|
|
1525
|
+
tickActiveQueue: (advertisementId: string) => void;
|
|
1526
|
+
closeAdvertisement: (advertisementId: string, { animateHiding }?: {
|
|
1527
|
+
animateHiding?: boolean | undefined;
|
|
1528
|
+
}) => Advertisement | undefined;
|
|
1529
|
+
drain: () => void;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
declare module "../../feature-gamification/src/advertisement/index" {
|
|
1533
|
+
import { createMapStore } from '@streamlayer/sdk-web-interfaces';
|
|
1534
|
+
import { PromotionOptions } from '@streamlayer/sdk-web-types';
|
|
1535
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1536
|
+
import { type GamificationBackground } from "../../feature-gamification/src/background";
|
|
1537
|
+
type AdvertisementData = {
|
|
1538
|
+
loading?: boolean;
|
|
1539
|
+
error?: unknown;
|
|
1540
|
+
data?: PromotionOptions;
|
|
1541
|
+
};
|
|
1542
|
+
export type Advertisement = {
|
|
1543
|
+
autoHideDuration: number;
|
|
1544
|
+
delay?: number;
|
|
1545
|
+
hiding?: boolean;
|
|
1546
|
+
action?: (...args: unknown[]) => void;
|
|
1547
|
+
close?: (...args: unknown[]) => void;
|
|
1548
|
+
data: ReturnType<typeof createMapStore<AdvertisementData>>;
|
|
1549
|
+
promise: () => Promise<void>;
|
|
1550
|
+
id: string;
|
|
1551
|
+
};
|
|
1552
|
+
/**
|
|
1553
|
+
* @name Advertisement
|
|
1554
|
+
* @description advertisement functionality, show, hide
|
|
1555
|
+
* - show: show advertisement by id, if it was not showed before
|
|
1556
|
+
* - hide: hide advertisement by id
|
|
1557
|
+
* - markAsViewed: mark advertisement as viewed, called when UI is requested to show advertisement
|
|
1558
|
+
* - getActiveAdvertisement: request active advertisement from queue by UI
|
|
1559
|
+
*
|
|
1560
|
+
* On mount:
|
|
1561
|
+
* - we subscribe to $feedList, and show last advertisement from list
|
|
1562
|
+
* - we subscribe to $feedSubscription, and show advertisement on activate
|
|
1563
|
+
*/
|
|
1564
|
+
export const advertisement: ($feedList: GamificationBackground["feedList"], $feedSubscription: GamificationBackground["feedSubscription"], transport: Transport) => {
|
|
1565
|
+
hide: (notificationId: string) => void;
|
|
1566
|
+
show: (advertisementId: string) => void;
|
|
1567
|
+
$list: import("nanostores").WritableAtom<Map<string, Advertisement> | undefined>;
|
|
1568
|
+
getActiveAdvertisement: () => Advertisement | null;
|
|
1569
|
+
};
|
|
1570
|
+
}
|
|
1492
1571
|
declare module "../../feature-gamification/src/background" {
|
|
1493
|
-
import { ApiStore, type StreamLayerContext } from '
|
|
1494
|
-
import type { GetApiResponseType } from '
|
|
1495
|
-
import { FeedItem } from '
|
|
1572
|
+
import { ApiStore, type StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
1573
|
+
import type { GetApiResponseType } from '@streamlayer/sdk-web-api';
|
|
1574
|
+
import { FeedItem } from '@streamlayer/sdk-web-types';
|
|
1496
1575
|
import '@streamlayer/sdk-web-core/store';
|
|
1497
1576
|
import { ReadableAtom, WritableAtom } from 'nanostores';
|
|
1498
1577
|
import * as queries from "../../feature-gamification/src/queries/index";
|
|
1499
1578
|
import { detail } from "../../feature-gamification/src/detail";
|
|
1579
|
+
import { advertisement } from "../../feature-gamification/src/advertisement/index";
|
|
1500
1580
|
export enum InteractiveAllowed {
|
|
1501
1581
|
ALLOWED = "allowed",
|
|
1502
1582
|
DISALLOWED = "disallowed"
|
|
@@ -1536,6 +1616,7 @@ declare module "../../feature-gamification/src/background" {
|
|
|
1536
1616
|
feedSubscription: ReturnType<typeof queries.feedSubscription>;
|
|
1537
1617
|
/** subscription to opened question (vote percentage) */
|
|
1538
1618
|
questionSubscription?: ReturnType<typeof queries.questionSubscription>;
|
|
1619
|
+
advertisement: ReturnType<typeof advertisement>;
|
|
1539
1620
|
private notifications;
|
|
1540
1621
|
private log;
|
|
1541
1622
|
private transport;
|
|
@@ -1561,7 +1642,7 @@ declare module "../../feature-gamification/src/background" {
|
|
|
1561
1642
|
* Open question and mark notification for this question as viewed
|
|
1562
1643
|
*/
|
|
1563
1644
|
openQuestion: (questionId: string, question?: FeedItem & {
|
|
1564
|
-
openedFrom?:
|
|
1645
|
+
openedFrom?: "list" | "notification";
|
|
1565
1646
|
}) => void;
|
|
1566
1647
|
/**
|
|
1567
1648
|
* Close question and mark notification for this question as viewed
|
|
@@ -1576,7 +1657,7 @@ declare module "../../feature-gamification/src/constants" {
|
|
|
1576
1657
|
}
|
|
1577
1658
|
}
|
|
1578
1659
|
declare module "../../feature-gamification/src/queries/actions" {
|
|
1579
|
-
import type { Transport } from '
|
|
1660
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1580
1661
|
export const submitAnswer: (transport: Transport, data: {
|
|
1581
1662
|
questionId: string;
|
|
1582
1663
|
answerId: string;
|
|
@@ -1585,8 +1666,8 @@ declare module "../../feature-gamification/src/queries/actions" {
|
|
|
1585
1666
|
export const skipQuestion: (transport: Transport, questionId: string) => Promise<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse>;
|
|
1586
1667
|
}
|
|
1587
1668
|
declare module "../../feature-gamification/src/onboarding" {
|
|
1588
|
-
import { Transport } from '
|
|
1589
|
-
import { type Notifications } from '
|
|
1669
|
+
import { Transport } from '@streamlayer/sdk-web-api';
|
|
1670
|
+
import { type Notifications } from '@streamlayer/sdk-web-notifications';
|
|
1590
1671
|
import { GamificationBackground } from "../../feature-gamification/src/background";
|
|
1591
1672
|
import { Gamification } from "../../feature-gamification/src/index";
|
|
1592
1673
|
/**
|
|
@@ -1610,7 +1691,7 @@ declare module "../../feature-gamification/src/onboarding" {
|
|
|
1610
1691
|
};
|
|
1611
1692
|
}
|
|
1612
1693
|
declare module "../../feature-gamification/src/storage" {
|
|
1613
|
-
import { Storage } from '
|
|
1694
|
+
import { Storage } from '@streamlayer/sdk-web-storage';
|
|
1614
1695
|
import { OnboardingStatus } from "../../feature-gamification/src/onboarding";
|
|
1615
1696
|
type UserProps = {
|
|
1616
1697
|
userId: string;
|
|
@@ -1627,7 +1708,7 @@ declare module "../../feature-gamification/src/storage" {
|
|
|
1627
1708
|
}
|
|
1628
1709
|
}
|
|
1629
1710
|
declare module "../../feature-gamification/src/leaderboard" {
|
|
1630
|
-
import type { Transport } from '
|
|
1711
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1631
1712
|
import { ReadableAtom } from 'nanostores';
|
|
1632
1713
|
import { type LeaderboardItem } from "../../feature-gamification/src/queries/leaderboard";
|
|
1633
1714
|
import { Gamification } from "../../feature-gamification/src/index";
|
|
@@ -1643,14 +1724,14 @@ declare module "../../feature-gamification/src/leaderboard" {
|
|
|
1643
1724
|
hasMore: boolean;
|
|
1644
1725
|
error?: string;
|
|
1645
1726
|
};
|
|
1646
|
-
export const leaderboard: (transport: Transport, $eventId: ReadableAtom<string | undefined>, $userId: ReadableAtom<string | undefined>, $friends: Gamification[
|
|
1727
|
+
export const leaderboard: (transport: Transport, $eventId: ReadableAtom<string | undefined>, $userId: ReadableAtom<string | undefined>, $friends: Gamification["friends"], options?: LeaderboardOptions) => {
|
|
1647
1728
|
$store: import("nanostores").MapStore<LeaderboardStore>;
|
|
1648
1729
|
fetchMore: (page?: number) => void;
|
|
1649
1730
|
invalidate: () => void;
|
|
1650
1731
|
};
|
|
1651
1732
|
}
|
|
1652
1733
|
declare module "../../feature-gamification/src/queries/deepLink" {
|
|
1653
|
-
import type { Transport } from '
|
|
1734
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1654
1735
|
import { ReadableAtom } from 'nanostores';
|
|
1655
1736
|
import { DeepLink } from '@streamlayer/sl-eslib/sdkSettings/client/client_pb';
|
|
1656
1737
|
type EventId = ReadableAtom<string | undefined>;
|
|
@@ -1662,7 +1743,7 @@ declare module "../../feature-gamification/src/queries/deepLink" {
|
|
|
1662
1743
|
}) => Promise<import("@streamlayer/sl-eslib/shortLinks/linksClient_pb").GenerateResponse>;
|
|
1663
1744
|
}
|
|
1664
1745
|
declare module "../../feature-gamification/src/deepLink" {
|
|
1665
|
-
import type { Transport } from '
|
|
1746
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1666
1747
|
import { ReadableAtom } from 'nanostores';
|
|
1667
1748
|
type DeepLinkData = {
|
|
1668
1749
|
data?: string;
|
|
@@ -1675,26 +1756,26 @@ declare module "../../feature-gamification/src/deepLink" {
|
|
|
1675
1756
|
};
|
|
1676
1757
|
}
|
|
1677
1758
|
declare module "../../feature-gamification/src/userSummary" {
|
|
1678
|
-
import type { Transport } from '
|
|
1759
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1679
1760
|
import { ReadableAtom } from 'nanostores';
|
|
1680
1761
|
import { LeaderboardSummaryItem } from '@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb';
|
|
1681
1762
|
import { Gamification } from "../../feature-gamification/src/index";
|
|
1682
|
-
export const summary: ($eventId: ReadableAtom<string | undefined>, $userId: ReadableAtom<string | undefined>, $friends: Gamification[
|
|
1763
|
+
export const summary: ($eventId: ReadableAtom<string | undefined>, $userId: ReadableAtom<string | undefined>, $friends: Gamification["friends"], transport: Transport) => {
|
|
1683
1764
|
$store: import("nanostores").MapStore<LeaderboardSummaryItem | undefined>;
|
|
1684
1765
|
invalidate: () => void;
|
|
1685
1766
|
};
|
|
1686
1767
|
}
|
|
1687
1768
|
declare module "../../feature-gamification/src/friendSummary" {
|
|
1688
|
-
import type { Transport } from '
|
|
1769
|
+
import type { Transport } from '@streamlayer/sdk-web-api';
|
|
1689
1770
|
import { ReadableAtom } from 'nanostores';
|
|
1690
1771
|
import { LeaderboardItem } from '@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb';
|
|
1691
1772
|
import { Gamification } from "../../feature-gamification/src/index";
|
|
1692
|
-
export const friendSummary: ($eventId: ReadableAtom<string | undefined>, $userId: ReadableAtom<string | undefined>, $friends: Gamification[
|
|
1773
|
+
export const friendSummary: ($eventId: ReadableAtom<string | undefined>, $userId: ReadableAtom<string | undefined>, $friends: Gamification["friends"], friendId: string, transport: Transport) => Promise<LeaderboardItem | undefined>;
|
|
1693
1774
|
}
|
|
1694
1775
|
declare module "../../feature-gamification/src/gamification" {
|
|
1695
|
-
import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps, type StreamLayerContext } from '
|
|
1696
|
-
import { type GamesOverlaySettings, FeedItem } from '
|
|
1697
|
-
import type { GetApiResponseType } from '
|
|
1776
|
+
import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps, type StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
1777
|
+
import { type GamesOverlaySettings, FeedItem } from '@streamlayer/sdk-web-types';
|
|
1778
|
+
import type { GetApiResponseType } from '@streamlayer/sdk-web-api';
|
|
1698
1779
|
import '@streamlayer/sdk-web-core/store';
|
|
1699
1780
|
import type { PlainMessage } from '@bufbuild/protobuf';
|
|
1700
1781
|
import { WritableAtom } from 'nanostores';
|
|
@@ -1742,6 +1823,7 @@ declare module "../../feature-gamification/src/gamification" {
|
|
|
1742
1823
|
feedSubscription: GamificationBackground['feedSubscription'];
|
|
1743
1824
|
activeQuestionId: GamificationBackground['activeQuestionId'];
|
|
1744
1825
|
openedQuestionId: GamificationBackground['openedQuestionId'];
|
|
1826
|
+
advertisement: GamificationBackground['advertisement'];
|
|
1745
1827
|
private notifications;
|
|
1746
1828
|
private transport;
|
|
1747
1829
|
/** gamification background class, handle subscriptions and notifications for closed overlay */
|
|
@@ -1757,7 +1839,7 @@ declare module "../../feature-gamification/src/gamification" {
|
|
|
1757
1839
|
disconnect: () => void;
|
|
1758
1840
|
submitAnswer: (questionId: string, answerId: string) => Promise<void>;
|
|
1759
1841
|
openQuestion: (questionId?: string, question?: FeedItem & {
|
|
1760
|
-
openedFrom?:
|
|
1842
|
+
openedFrom?: "list" | "notification";
|
|
1761
1843
|
}) => void | (() => void);
|
|
1762
1844
|
closeQuestion: (questionId?: string) => void;
|
|
1763
1845
|
openUser: (friendId: string) => Promise<void>;
|
|
@@ -1774,6 +1856,7 @@ declare module "../../feature-gamification/src/gamification" {
|
|
|
1774
1856
|
declare module "../../feature-gamification/src/index" {
|
|
1775
1857
|
export { GamificationBackground } from "../../feature-gamification/src/background";
|
|
1776
1858
|
export { Gamification } from "../../feature-gamification/src/gamification";
|
|
1859
|
+
export { Advertisement } from "../../feature-gamification/src/advertisement/index";
|
|
1777
1860
|
module '@streamlayer/sdk-web-interfaces' {
|
|
1778
1861
|
interface StreamLayerContext {
|
|
1779
1862
|
gamification: import("../../feature-gamification/src/background").GamificationBackground;
|
|
@@ -1781,9 +1864,9 @@ declare module "../../feature-gamification/src/index" {
|
|
|
1781
1864
|
}
|
|
1782
1865
|
}
|
|
1783
1866
|
declare module "../../sdk-web-features/src/index" {
|
|
1784
|
-
import { FeatureType } from '
|
|
1785
|
-
import { AbstractFeature, FeatureSource, FeatureProps, StreamLayerContext, SingleStore } from '
|
|
1786
|
-
import { Gamification } from '
|
|
1867
|
+
import { FeatureType } from '@streamlayer/sdk-web-types';
|
|
1868
|
+
import { AbstractFeature, FeatureSource, FeatureProps, StreamLayerContext, SingleStore } from '@streamlayer/sdk-web-interfaces';
|
|
1869
|
+
import { Gamification } from '@streamlayer/feature-gamification';
|
|
1787
1870
|
export type Features = Feature | Gamification;
|
|
1788
1871
|
export const AvailableFeatures: {
|
|
1789
1872
|
12: boolean;
|
|
@@ -1792,7 +1875,7 @@ declare module "../../sdk-web-features/src/index" {
|
|
|
1792
1875
|
constructor(overlay: FeatureProps, source: FeatureSource);
|
|
1793
1876
|
}
|
|
1794
1877
|
export const initFeature: (overlay: FeatureProps, source: FeatureSource, instance: StreamLayerContext) => Gamification | Feature;
|
|
1795
|
-
export { FeatureSource } from '
|
|
1878
|
+
export { FeatureSource } from '@streamlayer/sdk-web-interfaces';
|
|
1796
1879
|
module '@streamlayer/sdk-web-interfaces' {
|
|
1797
1880
|
interface StreamLayerContext {
|
|
1798
1881
|
features: Map<FeatureType, Features>;
|
|
@@ -1820,7 +1903,7 @@ declare module "../../sdk-web-analytics/src/invitation" {
|
|
|
1820
1903
|
constructor(analytics: Analytics);
|
|
1821
1904
|
accepted: () => void;
|
|
1822
1905
|
sent: ({ from }: {
|
|
1823
|
-
from?: InvitationFrom
|
|
1906
|
+
from?: InvitationFrom;
|
|
1824
1907
|
}) => void;
|
|
1825
1908
|
}
|
|
1826
1909
|
}
|
|
@@ -1890,7 +1973,7 @@ declare module "../../sdk-web-analytics/src/notifications" {
|
|
|
1890
1973
|
}
|
|
1891
1974
|
}
|
|
1892
1975
|
declare module "../../sdk-web-analytics/src/polls" {
|
|
1893
|
-
import { QuestionType } from '
|
|
1976
|
+
import { QuestionType } from '@streamlayer/sdk-web-types';
|
|
1894
1977
|
import { Analytics } from "../../sdk-web-analytics/src/analytics";
|
|
1895
1978
|
/**
|
|
1896
1979
|
* PollsAnalytics is a class that is used to send analytics events related to polls.
|
|
@@ -1900,24 +1983,24 @@ declare module "../../sdk-web-analytics/src/polls" {
|
|
|
1900
1983
|
private analytics;
|
|
1901
1984
|
constructor(analytics: Analytics);
|
|
1902
1985
|
received: ({ questionId, questionType }: {
|
|
1903
|
-
questionId?: string
|
|
1904
|
-
questionType?: QuestionType
|
|
1986
|
+
questionId?: string;
|
|
1987
|
+
questionType?: QuestionType;
|
|
1905
1988
|
}) => void;
|
|
1906
1989
|
opened: ({ questionId, questionType, questionOpenedFrom, }: {
|
|
1907
|
-
questionId?: string
|
|
1908
|
-
questionType?: QuestionType
|
|
1909
|
-
questionOpenedFrom?: "list" | "notification"
|
|
1990
|
+
questionId?: string;
|
|
1991
|
+
questionType?: QuestionType;
|
|
1992
|
+
questionOpenedFrom?: "list" | "notification";
|
|
1910
1993
|
}) => void;
|
|
1911
1994
|
voted: ({ questionId, questionType }: {
|
|
1912
|
-
questionId?: string
|
|
1913
|
-
questionType?: QuestionType
|
|
1995
|
+
questionId?: string;
|
|
1996
|
+
questionType?: QuestionType;
|
|
1914
1997
|
}) => void;
|
|
1915
1998
|
onboardingPassed: () => void;
|
|
1916
1999
|
navigated: () => void;
|
|
1917
2000
|
}
|
|
1918
2001
|
}
|
|
1919
2002
|
declare module "../../sdk-web-analytics/src/heartbeat" {
|
|
1920
|
-
import { Transport } from '
|
|
2003
|
+
import { Transport } from '@streamlayer/sdk-web-api';
|
|
1921
2004
|
import { Analytics } from "../../sdk-web-analytics/src/analytics";
|
|
1922
2005
|
type IHeartbeat = {
|
|
1923
2006
|
transport: Transport;
|
|
@@ -1931,14 +2014,15 @@ declare module "../../sdk-web-analytics/src/heartbeat" {
|
|
|
1931
2014
|
};
|
|
1932
2015
|
}
|
|
1933
2016
|
declare module "../../sdk-web-analytics/src/analytics" {
|
|
1934
|
-
import { MapStore, StreamLayerContext, OnMountCb } from '
|
|
1935
|
-
import { Logger } from '
|
|
2017
|
+
import { MapStore, StreamLayerContext, OnMountCb } from '@streamlayer/sdk-web-interfaces';
|
|
2018
|
+
import { Logger } from '@streamlayer/sdk-web-logger';
|
|
1936
2019
|
import { GamesMessage, NotificationMessage, SendInvitationsMessage, EventOpenedMessage, SendInteractionsMessage, CommonData } from '@streamlayer/sl-eslib/analytics/v2/streaming/streaming_pb';
|
|
1937
2020
|
import { PlainMessage } from '@bufbuild/protobuf';
|
|
1938
2021
|
import { InvitationAnalytics } from "../../sdk-web-analytics/src/invitation";
|
|
1939
2022
|
import { InteractionsAnalytics } from "../../sdk-web-analytics/src/interactions";
|
|
1940
2023
|
import { NotificationsAnalytics } from "../../sdk-web-analytics/src/notifications";
|
|
1941
2024
|
import { PollsAnalytics } from "../../sdk-web-analytics/src/polls";
|
|
2025
|
+
import { AllowedCases } from "../../sdk-web-analytics/src/constants";
|
|
1942
2026
|
import '@streamlayer/sdk-web-features';
|
|
1943
2027
|
type AnalyticsMessages = {
|
|
1944
2028
|
games?: PlainMessage<GamesMessage>;
|
|
@@ -1973,16 +2057,16 @@ declare module "../../sdk-web-analytics/src/analytics" {
|
|
|
1973
2057
|
constructor(instance: StreamLayerContext);
|
|
1974
2058
|
connect: () => void;
|
|
1975
2059
|
disconnect: () => void;
|
|
1976
|
-
write: <T extends
|
|
1977
|
-
writeCommon: <T extends
|
|
2060
|
+
write: <T extends keyof typeof AllowedCases = "notification" | "invitation" | "interactions" | "games" | "eventOpened">(key: T, value: AnalyticsMessages[T]) => void;
|
|
2061
|
+
writeCommon: <T extends keyof PlainMessage<CommonData> = "eventId" | "category" | "kind" | "screenOrientation" | "sessionId" | "overlaySessionId" | "topicId" | "topicType" | "parentTopicId" | "parentTopicType" | "participantsCount" | "routeMap" | "trackTimestamp" | "topicSubType" | "country">(key: T, value: PlainMessage<CommonData>[T]) => void;
|
|
1978
2062
|
onConnect: (cb: OnMountCb) => void;
|
|
1979
2063
|
private connectToSDK;
|
|
1980
2064
|
}
|
|
1981
2065
|
}
|
|
1982
2066
|
declare module "../../sdk-web-analytics/src/index" {
|
|
1983
|
-
import { type StreamLayerContext } from '
|
|
1984
|
-
import type { DeepLinkContext } from '
|
|
1985
|
-
import { Transport } from '
|
|
2067
|
+
import { type StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
2068
|
+
import type { DeepLinkContext } from '@streamlayer/sdk-web-core';
|
|
2069
|
+
import { Transport } from '@streamlayer/sdk-web-api';
|
|
1986
2070
|
import { Analytics } from "../../sdk-web-analytics/src/analytics";
|
|
1987
2071
|
module '@streamlayer/sdk-web-interfaces' {
|
|
1988
2072
|
interface StreamLayerContext {
|
|
@@ -1994,8 +2078,8 @@ declare module "../../sdk-web-analytics/src/index" {
|
|
|
1994
2078
|
export const analytics: (instance: StreamLayerContext, opts: unknown, done: Function) => void;
|
|
1995
2079
|
}
|
|
1996
2080
|
declare module "../../sdk-web/src/index" {
|
|
1997
|
-
import { StreamLayerContext } from '
|
|
1998
|
-
import { type DeepLinkCallback, type VideoPlayerCallback } from '
|
|
2081
|
+
import { StreamLayerContext } from '@streamlayer/sdk-web-interfaces';
|
|
2082
|
+
import { type DeepLinkCallback, type VideoPlayerCallback } from '@streamlayer/sdk-web-core';
|
|
1999
2083
|
import avvio from 'avvio';
|
|
2000
2084
|
import './polyfills/raf';
|
|
2001
2085
|
export type StreamLayerInstance = avvio.mixedInstance<StreamLayerContext>;
|
|
@@ -2008,8 +2092,8 @@ declare module "../../sdk-web/src/index" {
|
|
|
2008
2092
|
}): avvio.Avvio<StreamLayerContext>;
|
|
2009
2093
|
}
|
|
2010
2094
|
declare module "app/useStreamLayerApp" {
|
|
2011
|
-
import type { StreamLayerSDK, StreamLayerPlugin } from '
|
|
2012
|
-
import type { DeepLinkCallback, VideoPlayerCallback } from '
|
|
2095
|
+
import type { StreamLayerSDK, StreamLayerPlugin } from '@streamlayer/sdk-web-interfaces';
|
|
2096
|
+
import type { DeepLinkCallback, VideoPlayerCallback } from '@streamlayer/sdk-web-core';
|
|
2013
2097
|
global {
|
|
2014
2098
|
interface Window {
|
|
2015
2099
|
sl: unknown;
|
|
@@ -2017,17 +2101,17 @@ declare module "app/useStreamLayerApp" {
|
|
|
2017
2101
|
}
|
|
2018
2102
|
export const useStreamLayerApp: ({ sdkKey, plugins, production, autoEnable, onDeepLinkHandled, videoPlayerController, }: {
|
|
2019
2103
|
sdkKey: string;
|
|
2020
|
-
plugins?: Set<StreamLayerPlugin
|
|
2021
|
-
production?: boolean
|
|
2022
|
-
autoEnable?: boolean
|
|
2023
|
-
onDeepLinkHandled?: DeepLinkCallback
|
|
2024
|
-
videoPlayerController?: VideoPlayerCallback
|
|
2104
|
+
plugins?: Set<StreamLayerPlugin>;
|
|
2105
|
+
production?: boolean;
|
|
2106
|
+
autoEnable?: boolean;
|
|
2107
|
+
onDeepLinkHandled?: DeepLinkCallback;
|
|
2108
|
+
videoPlayerController?: VideoPlayerCallback;
|
|
2025
2109
|
}) => StreamLayerSDK | null;
|
|
2026
2110
|
}
|
|
2027
2111
|
declare module "app/provider" {
|
|
2028
|
-
import type { StreamLayerSDK, StreamLayerPlugin } from '
|
|
2029
|
-
import type { DeepLinkCallback, VideoPlayerCallback } from '
|
|
2030
|
-
export type { DeepLinkCallback, VideoPlayerCallback } from '
|
|
2112
|
+
import type { StreamLayerSDK, StreamLayerPlugin } from '@streamlayer/sdk-web-interfaces';
|
|
2113
|
+
import type { DeepLinkCallback, VideoPlayerCallback } from '@streamlayer/sdk-web-core';
|
|
2114
|
+
export type { DeepLinkCallback, VideoPlayerCallback } from '@streamlayer/sdk-web-core';
|
|
2031
2115
|
export enum StreamLayerStatus {
|
|
2032
2116
|
UNSET = 0,
|
|
2033
2117
|
CONNECTED = 1,
|
|
@@ -2050,7 +2134,7 @@ declare module "app/provider" {
|
|
|
2050
2134
|
}>;
|
|
2051
2135
|
}
|
|
2052
2136
|
declare module "app/app" {
|
|
2053
|
-
import type { StreamLayerSDK } from '
|
|
2137
|
+
import type { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2054
2138
|
export const useStreamLayer: () => StreamLayerSDK | null;
|
|
2055
2139
|
export const StreamLayerSDKReact: React.FC<{
|
|
2056
2140
|
event: string;
|
|
@@ -2111,6 +2195,9 @@ declare module "index" {
|
|
|
2111
2195
|
export { StreamLayerProvider, type DeepLinkCallback, type VideoPlayerCallback } from "app/provider";
|
|
2112
2196
|
export { StreamLayerSDKReact, useStreamLayer } from "app/app";
|
|
2113
2197
|
}
|
|
2198
|
+
declare module "app/advertisement" {
|
|
2199
|
+
export const StreamLayerSDKAdvertisement: React.FC;
|
|
2200
|
+
}
|
|
2114
2201
|
declare module "app/points" {
|
|
2115
2202
|
export const StreamLayerSDKPoints: () => import("react/jsx-runtime").JSX.Element | null;
|
|
2116
2203
|
}
|