@streamlayer/react 0.28.5 → 0.29.1

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.
@@ -0,0 +1,1530 @@
1
+ /// <reference types="react" />
2
+ declare module "../../sdk-web-types/src/sl-types" {
3
+ import { PlainMessage } from '@bufbuild/protobuf';
4
+ import type { StreamSettings as SLStreamSettings, SdkOverlay, Advertising, OrganizationSettings as SLOrganizationSettings } from '@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb';
5
+ import type { GameSettings as IGameSettings } from '@streamlayer/sl-eslib/sdkSettings/game/common/game_common_pb';
6
+ import type { ClientSettings } from '@streamlayer/sl-eslib/sdkSettings/client/client_pb';
7
+ import type { UserAttributes } from '@streamlayer/sl-eslib/users/users_common_pb';
8
+ export { QuestionType, QuestionStatus, QuestionImages, ImagePosition, ExtendedQuestion, SilenceSetting, QuestionOptions, } from '@streamlayer/sl-eslib/interactive/interactive.common_pb';
9
+ import type { PickHistory as IPickHistory, InsightHistory as IInsightHistory, FeedItemAttributes, InstantView as IInstantView } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
10
+ export { PickHistoryStatus } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
11
+ import type { LeaderboardItem as ILeaderboardItem } from '@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb';
12
+ import type { ExtendedQuestionAnswer as IExtendedQuestionAnswer } from '@streamlayer/sl-eslib/interactive/interactive.common_pb';
13
+ export type ExtendedQuestionAnswer = PlainMessage<IExtendedQuestionAnswer>;
14
+ export type PickHistory = PlainMessage<IPickHistory>;
15
+ export type InsightHistory = PlainMessage<IInsightHistory>;
16
+ export type OrganizationSettings = SLOrganizationSettings;
17
+ export type OrganizationAdvertising = Advertising;
18
+ export type FeatureConfig = SdkOverlay;
19
+ export type StreamSettings = SLStreamSettings;
20
+ export type User = UserAttributes;
21
+ export type UserSettings = ClientSettings;
22
+ export type LeaderboardItem = ILeaderboardItem;
23
+ export type FeedItem = PlainMessage<FeedItemAttributes>;
24
+ export type InstantView = PlainMessage<IInstantView>;
25
+ export type GameSettings = PlainMessage<IGameSettings>;
26
+ export { SdkOverlayType as FeatureType, SdkOverlaySettings, GamesOverlaySettings, } from '@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb';
27
+ }
28
+ declare module "../../sdk-web-types/src/index" {
29
+ export * from "../../sdk-web-types/src/sl-types";
30
+ }
31
+ declare module "../../sdk-web-interfaces/src/auth" {
32
+ export abstract class AbstractAuthenticationProvider {
33
+ abstract login(...args: unknown[]): Promise<unknown>;
34
+ abstract logout(): void;
35
+ abstract me(): Promise<unknown>;
36
+ abstract isAuthenticated(): Promise<unknown>;
37
+ }
38
+ }
39
+ declare module "../../sdk-web-interfaces/src/store/abstract" {
40
+ import type { AnyStore } from 'nanostores';
41
+ global {
42
+ interface Window {
43
+ slStore: any;
44
+ }
45
+ }
46
+ /**
47
+ * An abstract store is a wrapper for third-party stores,
48
+ * providing developers with a consistent interface inspired
49
+ * by the "nanostore" pattern. This simplifies
50
+ * interactions with different storage systems.
51
+ */
52
+ export abstract class AbstractStore<T extends AnyStore> {
53
+ /**
54
+ * store instance (nanostores)
55
+ */
56
+ protected readonly store: T;
57
+ protected readonly name: string;
58
+ constructor(store: T, name: string);
59
+ /**
60
+ * return store instance
61
+ */
62
+ getStore(): T;
63
+ /**
64
+ * get all store values
65
+ */
66
+ abstract getValues(): unknown;
67
+ /**
68
+ * get store value by key
69
+ */
70
+ abstract getValue(...args: unknown[]): unknown;
71
+ /**
72
+ * subscribe directly to store changes
73
+ */
74
+ abstract subscribe(...args: unknown[]): void;
75
+ /**
76
+ * unsubscribe directly to store change
77
+ */
78
+ abstract unsubscribe(): void;
79
+ }
80
+ /**
81
+ * Merge multiple stores into a single instance using a single
82
+ * subscribe handler, leveraging the `useStore` method from `@nanostores/react` for React subscriptions.
83
+ */
84
+ export const mergeStores: <T extends Record<string, AbstractStore<AnyStore>>, K = { [Index in keyof T]: ReturnType<T[Index]["getStore"]>["value"]; }>(stores: T) => import("nanostores").ReadableAtom<K>;
85
+ }
86
+ declare module "../../sdk-web-interfaces/src/store/map" {
87
+ import type { MapStoreKeys, MapStore as NMapStore } from 'nanostores';
88
+ import { AbstractStore } from "../../sdk-web-interfaces/src/store/abstract";
89
+ /**
90
+ * Wrapper for nanostores MapStore
91
+ */
92
+ export class MapStore<StoreInterface extends object, StoreInstance extends NMapStore<StoreInterface> = NMapStore<StoreInterface>> extends AbstractStore<StoreInstance> {
93
+ getValues: () => StoreInterface;
94
+ getValue: (key: MapStoreKeys<StoreInstance>) => StoreInterface[MapStoreKeys<StoreInstance>];
95
+ setValue: <Key extends MapStoreKeys<StoreInstance>>(path: Key, value: StoreInterface[Key]) => void;
96
+ subscribe: StoreInstance['subscribe'];
97
+ unsubscribe: () => void;
98
+ }
99
+ /**
100
+ * create map store from nanostores
101
+ */
102
+ export const createMapStore: <Data extends object>(initialData: Data) => NMapStore<Data>;
103
+ export type MapStoreListeners<StoreInstance extends NMapStore<StoreInterface>, StoreInterface extends object> = {
104
+ [T in MapStoreKeys<StoreInstance>]: (value: StoreInterface[T]) => void;
105
+ };
106
+ }
107
+ declare module "../../sdk-web-interfaces/src/feature" {
108
+ import { FeatureConfig as SdkOverlay, SdkOverlaySettings } from '../../sdk-web-types/src/index.ts';
109
+ import { PlainMessage } from '@bufbuild/protobuf';
110
+ import { WritableAtom } from 'nanostores';
111
+ import { MapStore } from "../../sdk-web-interfaces/src/store/map";
112
+ type FeatureListener = {
113
+ name: string;
114
+ enabled: boolean;
115
+ onEvent: (...args: unknown[]) => void;
116
+ };
117
+ export type FeatureProps = PlainMessage<SdkOverlay>;
118
+ export enum FeatureSource {
119
+ ORGANIZATION = "ORGANIZATION",
120
+ STREAM = "STREAM"
121
+ }
122
+ type FeatureConfig = Omit<FeatureProps, 'settings'>;
123
+ type FeatureSettings = Exclude<PlainMessage<SdkOverlaySettings>['overlaySettings'], {
124
+ case: 'inplay';
125
+ } | {
126
+ case: 'getstream';
127
+ } | {
128
+ case: undefined;
129
+ }>;
130
+ export enum FeatureStatus {
131
+ Ready = "ready",
132
+ Suspended = "suspended"
133
+ }
134
+ export class AbstractFeature<K extends FeatureSettings['case'] | undefined, C extends FeatureSettings['value'] = FeatureSettings['value']> {
135
+ status: WritableAtom<FeatureStatus>;
136
+ source: FeatureSource;
137
+ protected config: MapStore<FeatureConfig>;
138
+ protected settings: MapStore<C>;
139
+ protected listeners: Set<FeatureListener>;
140
+ protected settingsKey: K;
141
+ constructor({ settings, ...config }: FeatureProps, source: FeatureSource);
142
+ get featureConfig(): import("nanostores").MapStore<FeatureConfig>;
143
+ get featureSettings(): import("nanostores").MapStore<C>;
144
+ registerEventListener(listener: FeatureListener): void;
145
+ enable: () => void;
146
+ disable: () => void;
147
+ setFeatureConfig: ({ settings, ...config }: FeatureProps) => void;
148
+ update: (config: FeatureProps, source: FeatureSource) => void;
149
+ protected fireEvent(event: unknown): void;
150
+ }
151
+ }
152
+ declare module "../../sdk-web-interfaces/src/store/single" {
153
+ import type { StoreValue, WritableAtom } from 'nanostores';
154
+ import { AbstractStore } from "../../sdk-web-interfaces/src/store/abstract";
155
+ /**
156
+ * Wrapper for nanostores WritableAtom
157
+ */
158
+ export class SingleStore<StoreValue, StoreInstance extends WritableAtom<StoreValue | undefined> = WritableAtom<StoreValue | undefined>> extends AbstractStore<StoreInstance> {
159
+ getValue: () => StoreInstance['value'];
160
+ getValues(): unknown;
161
+ setValue: (value?: StoreValue) => void;
162
+ subscribe: (listener: Parameters<StoreInstance['subscribe']>[0]) => () => void;
163
+ unsubscribe: () => void;
164
+ listen(listener: Parameters<StoreInstance['subscribe']>[0]): () => void;
165
+ get(): StoreValue | undefined;
166
+ }
167
+ /**
168
+ * create atom store from nanostores
169
+ */
170
+ export const createSingleStore: <T>(initialData: T) => WritableAtom<T>;
171
+ export const createComputedStore: <Value, T extends WritableAtom<any> = WritableAtom<any>>(store: T, mutator: (value: StoreValue<T>) => Value) => import("nanostores").ReadableAtom<Value>;
172
+ }
173
+ declare module "../../sdk-web-interfaces/src/store/api" {
174
+ import type { FetcherStore } from '@nanostores/query';
175
+ import { WritableAtom } from 'nanostores';
176
+ import { AbstractStore } from "../../sdk-web-interfaces/src/store/abstract";
177
+ /**
178
+ * Wrapper for @nanostores/query FetcherStore
179
+ */
180
+ export class ApiStore<StoreValue, StoreInstance extends FetcherStore<StoreValue, any> = FetcherStore<StoreValue, any>> extends AbstractStore<StoreInstance> {
181
+ private readonly atomStore;
182
+ constructor(store: StoreInstance, name: string, atomPicker?: (val?: StoreInstance['value']) => string | undefined);
183
+ getAtomStore: () => WritableAtom<string | undefined>;
184
+ getValue: () => Promise<StoreValue | undefined>;
185
+ getValues: () => never;
186
+ setValue: (value?: StoreInstance['value']) => void;
187
+ subscribe: StoreInstance['subscribe'];
188
+ unsubscribe: () => never;
189
+ invalidate: () => void;
190
+ listen: (cb: Parameters<StoreInstance['listen']>[0]) => () => void;
191
+ get(): void;
192
+ key: () => string | undefined;
193
+ off: () => void;
194
+ }
195
+ }
196
+ declare module "../../sdk-web-interfaces/src/index" {
197
+ import { FeatureType } from '../../sdk-web-types/src/index.ts';
198
+ export { AbstractAuthenticationProvider } from "../../sdk-web-interfaces/src/auth";
199
+ export { AbstractFeature, FeatureSource, type FeatureProps, FeatureStatus } from "../../sdk-web-interfaces/src/feature";
200
+ export { MapStore, createMapStore } from "../../sdk-web-interfaces/src/store/map";
201
+ export type { MapStoreListeners } from "../../sdk-web-interfaces/src/store/map";
202
+ export { SingleStore, createSingleStore, createComputedStore } from "../../sdk-web-interfaces/src/store/single";
203
+ export { AbstractStore, mergeStores } from "../../sdk-web-interfaces/src/store/abstract";
204
+ export { ApiStore } from "../../sdk-web-interfaces/src/store/api";
205
+ export interface StreamLayerSDK {
206
+ openFeature: (featureType: FeatureType) => void;
207
+ closeFeature: () => void;
208
+ }
209
+ export interface StreamLayerContext {
210
+ sdk: StreamLayerSDK;
211
+ }
212
+ type DoneFn = Function;
213
+ export type StreamLayerPlugin = (instance: StreamLayerContext, opts: unknown, done: DoneFn) => void;
214
+ }
215
+ declare module "../../sdk-web-api/src/utils/devtools" {
216
+ export const __GRPC_DEVTOOLS_EXTENSION__: any;
217
+ }
218
+ declare module "../../sdk-web-api/src/grpc/transport" {
219
+ import { createRouterTransport, ConnectRouter, Interceptor, PromiseClient, CallbackClient, UnaryRequest, StreamRequest } from '@connectrpc/connect';
220
+ import type { ServiceType, Message, PlainMessage } from '@bufbuild/protobuf';
221
+ import { createGrpcWebTransport } from '@connectrpc/connect-web';
222
+ import type { KeyInput } from '@nanostores/query';
223
+ import { nanoquery } from '@nanostores/query';
224
+ import { Atom } from 'nanostores';
225
+ import { ServerStreamSubscription, type ServerStreamSubscriptionOptions } from "../../sdk-web-api/src/grpc/subscription";
226
+ type KnownHeaders = {
227
+ authorization?: string;
228
+ sdk?: string;
229
+ 'sl-device-id': string;
230
+ 'sl-user-id'?: string;
231
+ } & Record<string, string>;
232
+ export type GrpcTransport = Transport['transport'];
233
+ type ReservedHeaders = 'sdk' | 'authorization';
234
+ type ExcludeReservedHeaders<T> = ReservedHeaders extends T ? never : T extends ReservedHeaders ? never : T;
235
+ global {
236
+ interface Window {
237
+ __GRPC_DEVTOOLS_EXTENSION__?: () => import('@connectrpc/connect').Interceptor;
238
+ }
239
+ }
240
+ type NanoqueryReturnType = ReturnType<typeof nanoquery>;
241
+ type NanoqueryObjectType = {
242
+ createFetcherStore: NanoqueryReturnType[0];
243
+ createMutatorStore: NanoqueryReturnType[1];
244
+ utils: NanoqueryReturnType[2];
245
+ };
246
+ /**
247
+ * transport wrapper, initialize grpc transport, store headers and connect interceptors
248
+ */
249
+ export class Transport {
250
+ toJsonOptions: {
251
+ emitDefaultValues: boolean;
252
+ enumAsInteger: boolean;
253
+ useProtoFieldName: boolean;
254
+ };
255
+ readonly transport: ReturnType<typeof createGrpcWebTransport>;
256
+ readonly nanoquery: NanoqueryObjectType;
257
+ readonly host: string;
258
+ protected interceptors: Interceptor[];
259
+ private readonly $headers;
260
+ private clients;
261
+ private callbackClients;
262
+ private subscriptions;
263
+ constructor(host: string);
264
+ addSubscription: <T extends ServiceType, Req extends Message<Req>, Res extends Message<Res>>(method: CallbackClient<T>[import("./subscription").StreamMethod<T>], params: PlainMessage<Req> | Atom<PlainMessage<Req>>, options: ServerStreamSubscriptionOptions) => ServerStreamSubscription<ServiceType, Message<import("@bufbuild/protobuf").AnyMessage>, Message<import("@bufbuild/protobuf").AnyMessage>, never, never> | ServerStreamSubscription<T, Req, Res, import("./subscription").StreamMethod<T>, CallbackClient<T>[import("./subscription").StreamMethod<T>]>;
265
+ removeSubscription: (subscription: ServerStreamSubscription<ServiceType, Message, Message>) => void;
266
+ disconnect: () => void;
267
+ registerInterceptor: (interceptor: Interceptor) => void;
268
+ removeInterceptor: (interceptor: Interceptor) => void;
269
+ getClient: <T extends ServiceType>(service: T) => PromiseClient<T>;
270
+ getCallbackClient: <T extends ServiceType>(service: T) => CallbackClient<T>;
271
+ createPromiseClient: <T extends ServiceType>(service: T, { params, method }: {
272
+ params?: KeyInput | undefined;
273
+ method: keyof T["methods"];
274
+ }) => {
275
+ client: PromiseClient<T>;
276
+ queryKey: ((string | number | true) | import("nanostores").ReadableAtom<(string | number | true) | (false | void | null | undefined)> | import("@nanostores/query").FetcherStore<any, any>)[];
277
+ queryKeyStr: string;
278
+ };
279
+ createCallbackClient: <T extends ServiceType>(service: T) => {
280
+ client: CallbackClient<T>;
281
+ };
282
+ setSdkKey: (sdkKey: string) => void;
283
+ setAuth: (token: string, userId: string) => void;
284
+ setHeader: <T extends string = string>(name: ExcludeReservedHeaders<T>, value: string) => void;
285
+ getHeader: (name: keyof KnownHeaders) => string;
286
+ getHeaders: () => KnownHeaders;
287
+ initInterceptors: () => void;
288
+ }
289
+ export class MockTransport extends Transport {
290
+ transport: ReturnType<typeof createRouterTransport>;
291
+ calls: Array<UnaryRequest | StreamRequest>;
292
+ constructor(transport: (router: ConnectRouter) => void);
293
+ }
294
+ }
295
+ declare module "../../sdk-web-api/src/grpc/subscription" {
296
+ import { CallbackClient } from '@connectrpc/connect';
297
+ import { Atom } from 'nanostores';
298
+ import type { ServiceType, Message, PlainMessage, MethodInfoServerStreaming } from '@bufbuild/protobuf';
299
+ import { Transport } from "../../sdk-web-api/src/grpc/transport";
300
+ type StreamMethods<T extends ServiceType> = {
301
+ [P in keyof CallbackClient<T> as T['methods'][P] extends MethodInfoServerStreaming<any, any> ? P : never]: P;
302
+ };
303
+ export type StreamMethod<T extends ServiceType> = StreamMethods<T>[keyof StreamMethods<T>] extends keyof CallbackClient<T> ? StreamMethods<T>[keyof StreamMethods<T>] : never;
304
+ enum ServerStreamSubscriptionStatus {
305
+ Init = "init",
306
+ Ready = "ready",
307
+ Connecting = "connecting",
308
+ Connected = "connected",
309
+ Disconnected = "disconnected",
310
+ Failed = "failed",
311
+ Reconnecting = "reconnecting"
312
+ }
313
+ export type ServerStreamSubscriptionOptions = {
314
+ name: string;
315
+ withStore?: boolean;
316
+ };
317
+ export class ServerStreamSubscription<T extends ServiceType, Request extends Message<Request>, Response extends Message<Response>, M extends StreamMethod<T> = StreamMethod<T>, Method extends CallbackClient<T>[M] = CallbackClient<T>[M]> {
318
+ params: Atom<PlainMessage<Request>> | PlainMessage<Request>;
319
+ private stream?;
320
+ private method;
321
+ private name;
322
+ private headers;
323
+ private listeners;
324
+ private state;
325
+ private store?;
326
+ constructor(headers: Transport['$headers'], method: Method, params: Atom<PlainMessage<Request>> | PlainMessage<Request>, options: ServerStreamSubscriptionOptions);
327
+ updateState: (status: ServerStreamSubscriptionStatus) => void;
328
+ addStateLog: (msg: string) => void;
329
+ addListener: (name: string, listener: (response: Response) => void) => boolean;
330
+ removeListener: (name: string) => void;
331
+ connect: () => void;
332
+ disconnect: () => void;
333
+ reconnect: () => void;
334
+ getStore: () => import("nanostores").WritableAtom<Response | null | undefined> | undefined;
335
+ private onData;
336
+ private onStreamError;
337
+ }
338
+ }
339
+ declare module "../../sdk-web-api/src/grpc/queries/event" {
340
+ import { ReadableAtom } from 'nanostores';
341
+ import type { StreamSettings } from '@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb';
342
+ import { Transport } from "../../sdk-web-api/src/grpc/transport";
343
+ export const $retrieveEventId: ($providerStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<string | undefined, any>;
344
+ export const $streamSettings: (slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<StreamSettings | undefined, any>;
345
+ }
346
+ declare module "../../sdk-web-api/src/grpc/queries/user" {
347
+ import { ReadableAtom } from 'nanostores';
348
+ import type { BypassAuthRequest } from '@streamlayer/sl-eslib/users/users_pb';
349
+ import { PlainMessage } from '@bufbuild/protobuf';
350
+ import { Transport } from "../../sdk-web-api/src/grpc/transport";
351
+ export const $user: ($userToken: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse, any>;
352
+ export const bypassLogin: (transport: Transport) => ({ userKey, schema, init }: PlainMessage<BypassAuthRequest>) => Promise<import("@streamlayer/sl-eslib/users/users_pb").BypassAuthResponse>;
353
+ export const bypassAuth: (transport: Transport, params: {
354
+ userKey?: string;
355
+ schema?: string;
356
+ init?: boolean;
357
+ }) => Promise<import("@streamlayer/sl-eslib/users/users_pb").BypassAuthResponse>;
358
+ export const $userSettings: ($userToken: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings | undefined, any>;
359
+ export const register: (transport: Transport, phone: string) => Promise<import("@streamlayer/sl-eslib/users/users_pb").RegisterResponse>;
360
+ }
361
+ declare module "../../sdk-web-api/src/grpc/queries/organization" {
362
+ import { ReadableAtom } from 'nanostores';
363
+ import { Transport } from "../../sdk-web-api/src/grpc/transport";
364
+ export { $user } from "../../sdk-web-api/src/grpc/queries/user";
365
+ export const $organizationSettings: ($enabled: ReadableAtom<'on' | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<{
366
+ id: string;
367
+ overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
368
+ buttonIcon?: string | undefined;
369
+ tinodeHost?: string | undefined;
370
+ audience?: string | undefined;
371
+ name?: string | undefined;
372
+ provider?: string | undefined;
373
+ primaryColor?: string | undefined;
374
+ secondaryColor?: string | undefined;
375
+ moderationPrimaryColor?: string | undefined;
376
+ linkShareIcon?: string | undefined;
377
+ linkShareText?: string | undefined;
378
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
379
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
380
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
381
+ } | undefined, any>;
382
+ export const $organizationAdvertising: ($enabled: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising | undefined, any>;
383
+ }
384
+ declare module "../../sdk-web-api/src/grpc/queries/index" {
385
+ export * from "../../sdk-web-api/src/grpc/queries/event";
386
+ export * from "../../sdk-web-api/src/grpc/queries/organization";
387
+ export * from "../../sdk-web-api/src/grpc/queries/user";
388
+ }
389
+ declare module "../../sdk-web-api/src/index" {
390
+ import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
391
+ import { FetcherStore } from '@nanostores/query';
392
+ export type { ServerStreamSubscriptionOptions } from "../../sdk-web-api/src/grpc/subscription";
393
+ export { Transport } from "../../sdk-web-api/src/grpc/transport";
394
+ import { Transport } from "../../sdk-web-api/src/grpc/transport";
395
+ export type { GrpcTransport } from "../../sdk-web-api/src/grpc/transport";
396
+ export * as queries from "../../sdk-web-api/src/grpc/queries/index";
397
+ export type GetApiResponseType<T extends (...args: any[]) => FetcherStore> = ReturnType<ReturnType<T>['get']>['data'];
398
+ module '@streamlayer/sdk-web-interfaces' {
399
+ interface StreamLayerSDK {
400
+ host: string;
401
+ }
402
+ interface StreamLayerContext {
403
+ transport: Transport;
404
+ }
405
+ }
406
+ export const transport: (instance: StreamLayerContext, opts: {
407
+ sdkKey: string;
408
+ host: string;
409
+ }, done: () => void) => void;
410
+ }
411
+ declare module "../../sdk-web-storage/src/index" {
412
+ export class Storage {
413
+ private delimiter;
414
+ private prefix;
415
+ constructor(prefix?: string);
416
+ clear: () => void;
417
+ protected generateKey: (keyParts: string[]) => string;
418
+ protected write: (keyParts_0: string, keyParts_1: string, ...keyParts_2: string[]) => void;
419
+ protected read: (...keyParts: string[]) => string | undefined;
420
+ protected remove: (...keyParts: string[]) => void;
421
+ }
422
+ }
423
+ declare module "../../sdk-web-core/src/storage" {
424
+ import { Storage } from '../../sdk-web-storage/src/index.ts';
425
+ export class UserStorage extends Storage {
426
+ constructor();
427
+ setSchema: (value: string) => void;
428
+ getSchema: () => string | undefined;
429
+ setToken: (value: string) => void;
430
+ getToken: () => string | undefined;
431
+ setExternalToken: (value: string) => void;
432
+ getExternalToken: () => string | undefined;
433
+ removeToken: () => void;
434
+ }
435
+ }
436
+ declare module "../../sdk-web-core/src/store/init" {
437
+ import { SingleStore, ApiStore } from '../../sdk-web-interfaces/src/index.ts';
438
+ import { Transport } from '../../sdk-web-api/src/index.ts';
439
+ export enum CoreStatus {
440
+ DISABLED = "disabled",
441
+ INITIALIZATION = "initialization",
442
+ READY = "ready",
443
+ FAILED = "failed",
444
+ SUSPENDED = "suspended"
445
+ }
446
+ export const initializeStore: (transport: Transport) => {
447
+ readonly enabled: SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
448
+ readonly status: SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus>>;
449
+ readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
450
+ readonly slStreamId: ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined, any>>;
451
+ 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>>;
452
+ readonly user: ApiStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse | undefined, any>>;
453
+ readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
454
+ readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
455
+ 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>>;
456
+ readonly organizationSettings: ApiStore<{
457
+ id: string;
458
+ overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
459
+ buttonIcon?: string | undefined;
460
+ tinodeHost?: string | undefined;
461
+ audience?: string | undefined;
462
+ name?: string | undefined;
463
+ provider?: string | undefined;
464
+ primaryColor?: string | undefined;
465
+ secondaryColor?: string | undefined;
466
+ moderationPrimaryColor?: string | undefined;
467
+ linkShareIcon?: string | undefined;
468
+ linkShareText?: string | undefined;
469
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
470
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
471
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
472
+ } | undefined, import("@nanostores/query").FetcherStore<{
473
+ id: string;
474
+ overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
475
+ buttonIcon?: string | undefined;
476
+ tinodeHost?: string | undefined;
477
+ audience?: string | undefined;
478
+ name?: string | undefined;
479
+ provider?: string | undefined;
480
+ primaryColor?: string | undefined;
481
+ secondaryColor?: string | undefined;
482
+ moderationPrimaryColor?: string | undefined;
483
+ linkShareIcon?: string | undefined;
484
+ linkShareText?: string | undefined;
485
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
486
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
487
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
488
+ } | undefined, any>>;
489
+ readonly organizationAdvertising: 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>>;
490
+ };
491
+ }
492
+ declare module "../../sdk-web-core/src/store/store" {
493
+ import type { OrganizationAdvertising, StreamSettings, OrganizationSettings, User, UserSettings } from '../../sdk-web-types/src/index.ts';
494
+ import { AbstractStore } from '../../sdk-web-interfaces/src/index.ts';
495
+ import { Transport } from '../../sdk-web-api/src/index.ts';
496
+ import { ReadableAtom } from 'nanostores';
497
+ import { FetcherValue } from '@nanostores/query';
498
+ import { initializeStore, CoreStatus } from "../../sdk-web-core/src/store/init";
499
+ export { CoreStatus };
500
+ export interface CoreStoreInterface {
501
+ enabled?: 'on';
502
+ status: string;
503
+ userKey?: string;
504
+ userToken?: string;
505
+ organizationSettings?: OrganizationSettings & {
506
+ id: string;
507
+ };
508
+ organizationAdvertising?: OrganizationAdvertising;
509
+ streamSettings?: StreamSettings;
510
+ user?: User;
511
+ userSettings?: UserSettings;
512
+ providerStreamId?: string;
513
+ slStreamId?: string;
514
+ }
515
+ export type StoreObj = ReturnType<typeof initializeStore>;
516
+ export type CoreStores = {
517
+ [Index in keyof StoreObj]: ReturnType<StoreObj[Index]['getStore']>;
518
+ };
519
+ export type CoreStoresValues = {
520
+ [Index in keyof StoreObj]: ReturnType<StoreObj[Index]['getStore']>['value'];
521
+ };
522
+ export type CoreStoreInstance = ReadableAtom<CoreStoresValues>;
523
+ /**
524
+ * @description `CoreStore` is a store that contains all the necessary data for the SDK to work.
525
+ * `CoreStore` is a singleton and is created when the SDK is initialized. It includes the following stores:
526
+ * - `enabled` - the status of the SDK. The SDK is enabled when the `on` value is set.
527
+ * - `status` - the status of the SDK. Can be one of the following values: `disabled`, `initialization`, `ready`, `failed`, `suspended`.
528
+ * - `userKey` - the user key provided by the host.
529
+ * - `userToken` - the user token received from the StreamLayer after login.
530
+ * - `organizationSettings` - the organization settings.
531
+ * - `organizationAdvertising` - the organization advertising.
532
+ * - `streamSettings` - the stream settings.
533
+ * - `user` - the user data.
534
+ * - `userSettings` - the user settings.
535
+ * - `providerStreamId` - the event id provided by the host.
536
+ * - `slStreamId` - the event id received from the StreamLayer, resolved by the `providerStreamId`.
537
+ */
538
+ export class CoreStore extends AbstractStore<CoreStoreInstance> {
539
+ private stores;
540
+ constructor(transport: Transport);
541
+ getValue(): unknown;
542
+ getValues(): {
543
+ readonly enabled: import('../../sdk-web-interfaces/src/index.ts').SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
544
+ readonly status: import('../../sdk-web-interfaces/src/index.ts').SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus>>;
545
+ readonly providerStreamId: import('../../sdk-web-interfaces/src/index.ts').SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
546
+ readonly slStreamId: import('../../sdk-web-interfaces/src/index.ts').ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined, any>>;
547
+ readonly streamSettings: import('../../sdk-web-interfaces/src/index.ts').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>>;
548
+ readonly user: import('../../sdk-web-interfaces/src/index.ts').ApiStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse | undefined, any>>;
549
+ readonly userKey: import('../../sdk-web-interfaces/src/index.ts').SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
550
+ readonly userToken: import('../../sdk-web-interfaces/src/index.ts').SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
551
+ readonly userSettings: import('../../sdk-web-interfaces/src/index.ts').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>>;
552
+ readonly organizationSettings: import('../../sdk-web-interfaces/src/index.ts').ApiStore<{
553
+ id: string;
554
+ overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
555
+ buttonIcon?: string | undefined;
556
+ tinodeHost?: string | undefined;
557
+ audience?: string | undefined;
558
+ name?: string | undefined;
559
+ provider?: string | undefined;
560
+ primaryColor?: string | undefined;
561
+ secondaryColor?: string | undefined;
562
+ moderationPrimaryColor?: string | undefined;
563
+ linkShareIcon?: string | undefined;
564
+ linkShareText?: string | undefined;
565
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
566
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
567
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
568
+ } | undefined, import("@nanostores/query").FetcherStore<{
569
+ id: string;
570
+ overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
571
+ buttonIcon?: string | undefined;
572
+ tinodeHost?: string | undefined;
573
+ audience?: string | undefined;
574
+ name?: string | undefined;
575
+ provider?: string | undefined;
576
+ primaryColor?: string | undefined;
577
+ secondaryColor?: string | undefined;
578
+ moderationPrimaryColor?: string | undefined;
579
+ linkShareIcon?: string | undefined;
580
+ linkShareText?: string | undefined;
581
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
582
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
583
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
584
+ } | undefined, any>>;
585
+ readonly organizationAdvertising: import('../../sdk-web-interfaces/src/index.ts').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>>;
586
+ };
587
+ setValue(): void;
588
+ subscribe: (subscribes: Partial<StoreListeners>) => void;
589
+ unsubscribe: () => void;
590
+ }
591
+ export type StoreListeners = {
592
+ [Index in keyof StoreObj]: (params: FetcherValue<CoreStoreInterface[Index]>) => void;
593
+ };
594
+ }
595
+ declare module "../../sdk-web-core/src/auth/bypass/index" {
596
+ import { AbstractAuthenticationProvider } from '../../sdk-web-interfaces/src/index.ts';
597
+ import { Transport } from '../../sdk-web-api/src/index.ts';
598
+ import { CoreStore } from "../../sdk-web-core/src/store/store";
599
+ /**
600
+ * An authorization service manages user access by providing login, logout,
601
+ * authentication checks, and the ability to revoke access.
602
+ * Subscribed to $userStore and automatically updates the auth header for the Transport.
603
+ */
604
+ export class BypassAuth extends AbstractAuthenticationProvider {
605
+ private readonly $coreStore;
606
+ private readonly transport;
607
+ private readonly bypassLogin;
608
+ constructor(store: CoreStore, transport: Transport);
609
+ me: () => Promise<import("@streamlayer/sl-eslib/users/users_common_pb").User | undefined>;
610
+ /**
611
+ * Login user by token and schema.
612
+ * On success, save the user and update the token to the Transport, UserStore and cache.
613
+ * @param schema - schema created by the host app and provided to the StreamLayer SDK.
614
+ * @param userKey - user token received from the host app.
615
+ */
616
+ login: (schema: string, userKey: string) => Promise<string>;
617
+ isAuthenticated: () => Promise<import("@streamlayer/sl-eslib/users/users_common_pb").User | undefined>;
618
+ /**
619
+ * Logout user. Clears the all user data from the store.
620
+ */
621
+ logout: () => void;
622
+ /**
623
+ * Soft logout, only clears the StreamLayer user data from the store.
624
+ * Does not clear the external token. And automatically tries to re-login by external token.
625
+ */
626
+ softLogout: () => void;
627
+ /**
628
+ * Try to re-login.
629
+ * - If the user has an token, then try to login by it, by calling the me() method.
630
+ * - If the user has an external token, then try to login by it, by calling the login() method. On failure, logout.
631
+ * -
632
+ * - If no one of the above is true, then logout.
633
+ */
634
+ reLogin: () => Promise<void> | undefined;
635
+ /**
636
+ * Write token to the Transport and UserStore
637
+ */
638
+ private saveUser;
639
+ /**
640
+ * Add interceptor to the Transport to handle 401 and 403 errors.
641
+ * If the user is logged in (auth header is set), then make a soft logout.
642
+ */
643
+ private connect;
644
+ }
645
+ }
646
+ declare module "../../sdk-web-core/src/auth/index" {
647
+ import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
648
+ import { CoreStores } from "../../sdk-web-core/src/store/store";
649
+ import { UserStorage } from "../../sdk-web-core/src/storage";
650
+ import { BypassAuth } from "../../sdk-web-core/src/auth/bypass/index";
651
+ module '@streamlayer/sdk-web-interfaces' {
652
+ interface StreamLayerSDK {
653
+ authorizationBypass: (schema: string, userKey: string) => Promise<void>;
654
+ logout: () => void;
655
+ getUserStore: () => CoreStores['user'];
656
+ isUserAuthorized: BypassAuth['isAuthenticated'];
657
+ }
658
+ interface StreamLayerContext {
659
+ auth: BypassAuth;
660
+ }
661
+ }
662
+ export const storage: UserStorage;
663
+ /**
664
+ * Bypass authorization, used for login with external token.
665
+ * Automatically login user if SDK initialized and READY.
666
+ */
667
+ export const bypass: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
668
+ }
669
+ declare module "../../sdk-web-core/src/store/index" {
670
+ import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
671
+ import { CoreStore, CoreStores, StoreObj, CoreStoreInstance } from "../../sdk-web-core/src/store/store";
672
+ module '@streamlayer/sdk-web-interfaces' {
673
+ interface StreamLayerSDK {
674
+ sdkStore: CoreStoreInstance;
675
+ enabled: CoreStores['enabled'];
676
+ status: CoreStores['status'];
677
+ organizationStore: () => CoreStores['organizationSettings'];
678
+ streamStore: () => CoreStores['streamSettings'];
679
+ }
680
+ interface StreamLayerContext {
681
+ store: CoreStore;
682
+ stores: StoreObj;
683
+ storeSubscribe: () => void;
684
+ storeUnsubscribe: () => void;
685
+ }
686
+ }
687
+ /**
688
+ * store plugin, connect store to sdk
689
+ */
690
+ export const store: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
691
+ }
692
+ declare module "../../sdk-web-core/src/index" {
693
+ import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
694
+ export { bypass, storage } from "../../sdk-web-core/src/auth/index";
695
+ export { store } from "../../sdk-web-core/src/store/index";
696
+ import "../../sdk-web-core/src/store/index";
697
+ import "../../sdk-web-core/src/auth/index";
698
+ module '@streamlayer/sdk-web-interfaces' {
699
+ interface StreamLayerSDK {
700
+ initializeApp: () => Promise<{
701
+ enabled?: boolean;
702
+ err?: string;
703
+ }>;
704
+ disableApp: () => void;
705
+ createEventSession: (providerStreamId: string) => void;
706
+ }
707
+ }
708
+ /**
709
+ * The main application instance is the core of a application. It includes:
710
+ * Store: Manages data storage.
711
+ * Public Methods: Provides a way to interact with the application.
712
+ * Connect Features: Handles communication between components through store.
713
+ * Connect Transport: Handles communication with api.
714
+ * Dependency Injection: Incorporates other necessary instances.
715
+ * Error Handling: Manages errors and logs them.
716
+ * Security: Implements authentication and authorization.
717
+ */
718
+ export const core: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
719
+ }
720
+ declare module "../../react-ui/src/index" {
721
+ export const Demo: React.FC<{
722
+ sdk: unknown;
723
+ }>;
724
+ export { StreamLayerThemeProvider } from 'ui/theme';
725
+ }
726
+ declare module "../../sdk-web-logger/src/index" {
727
+ import { pino, ChildLoggerOptions } from 'pino';
728
+ export const createLogger: (name: string, options?: ChildLoggerOptions) => pino.Logger<{
729
+ level: "trace";
730
+ } & ChildLoggerOptions>;
731
+ export type Logger = ReturnType<typeof createLogger>;
732
+ }
733
+ declare module "../../sdk-web-notifications/src/queue/index" {
734
+ import { SingleStore, createComputedStore } from '../../sdk-web-interfaces/src/index.ts';
735
+ import { Notification } from "../../sdk-web-notifications/src/index";
736
+ export type NotificationsQueueOptions = {
737
+ concurrency: number;
738
+ animationDelay: number;
739
+ };
740
+ export type NotificationsList = ReturnType<typeof createComputedStore<Notification[]>>;
741
+ export class NotificationsQueue {
742
+ notificationsList: ReturnType<SingleStore<Map<Notification['id'], Notification>>['getStore']>;
743
+ private notifications;
744
+ private store;
745
+ private timeouts;
746
+ private waitingQueue;
747
+ private activeQueue;
748
+ private options;
749
+ private logger;
750
+ constructor(options: NotificationsQueueOptions);
751
+ addToQueue: (notification: Notification) => void;
752
+ tickWaitingQueue: () => void;
753
+ tickActiveQueue: (notificationId: string) => void;
754
+ closeNotification: (notificationId: string) => void;
755
+ }
756
+ }
757
+ declare module "../../sdk-web-notifications/src/storage" {
758
+ import { Storage } from '../../sdk-web-storage/src/index.ts';
759
+ export class NotificationStorage extends Storage {
760
+ constructor();
761
+ setOpened: (notificationId: string) => void;
762
+ isOpened: (notificationId: string) => string | undefined;
763
+ clearNotification: () => void;
764
+ }
765
+ }
766
+ declare module "../../sdk-web-notifications/src/notifications" {
767
+ import { InstantView, QuestionType, GameSettings } from '../../sdk-web-types/src/index.ts';
768
+ import { NotificationsQueue, NotificationsQueueOptions } from "../../sdk-web-notifications/src/queue/index";
769
+ export type NotificationData = {
770
+ questionType: QuestionType;
771
+ question?: {
772
+ title: string;
773
+ };
774
+ insight?: InstantView;
775
+ onboarding?: GameSettings;
776
+ };
777
+ export enum NotificationType {
778
+ ONBOARDING = 1,
779
+ QUESTION = 2,
780
+ QUESTION_RESOLVED = 3
781
+ }
782
+ export type Notification<M extends Record<string, Function> = never> = {
783
+ autoHideDuration: number;
784
+ delay?: number;
785
+ hiding?: boolean;
786
+ type: NotificationType;
787
+ action?: (...args: unknown[]) => void;
788
+ close?: (...args: unknown[]) => void;
789
+ methods?: M;
790
+ data: NotificationData;
791
+ id: string;
792
+ };
793
+ /**
794
+ * @description app notifications (inapp)
795
+ */
796
+ export class Notifications {
797
+ queue: NotificationsQueue;
798
+ private storage;
799
+ constructor(options?: Partial<NotificationsQueueOptions>);
800
+ add: (notification: Notification) => void;
801
+ close: (notificationId: string) => void;
802
+ getQueueStore: () => import("nanostores").WritableAtom<Map<string, Notification> | undefined>;
803
+ markAsViewed: (notificationId: string) => void;
804
+ }
805
+ }
806
+ declare module "../../sdk-web-notifications/src/index" {
807
+ import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
808
+ import { Notifications } from "../../sdk-web-notifications/src/notifications";
809
+ export { type Notification, type NotificationData, NotificationType, Notifications } from "../../sdk-web-notifications/src/notifications";
810
+ export { type NotificationsList } from "../../sdk-web-notifications/src/queue/index";
811
+ export type NotificationsStore = ReturnType<Notifications['getQueueStore']>;
812
+ module '@streamlayer/sdk-web-interfaces' {
813
+ interface StreamLayerContext {
814
+ notifications: Notifications;
815
+ addNotification: Notifications['add'];
816
+ }
817
+ interface StreamLayerSDK {
818
+ getNotificationsStore: Notifications['getQueueStore'];
819
+ }
820
+ }
821
+ /**
822
+ * notifications plugin, connect notifications to sdk
823
+ */
824
+ export const notifications: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
825
+ }
826
+ declare module "../../feature-gamification/src/queries/leaderboard" {
827
+ import type { Transport } from '../../sdk-web-api/src/index.ts';
828
+ import { ReadableAtom } from 'nanostores';
829
+ import { ListRequest } from '@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb';
830
+ import { PartialMessage } from '@bufbuild/protobuf';
831
+ export { LeaderboardItem } from '@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb';
832
+ export const $userSummary: ($eventId: ReadableAtom<string | undefined>, $userId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb").LeaderboardSummaryItem | undefined, any>;
833
+ export const $leaderboardList: ($eventId: ReadableAtom<string | undefined>, _: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb").ListResponse_ListResponseData[], any>;
834
+ export const createLeaderboardListFetch: (transport: Transport) => (params: PartialMessage<ListRequest>) => Promise<import("@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb").ListResponse>;
835
+ }
836
+ declare module "../../feature-gamification/src/queries/moderation" {
837
+ import type { Transport } from '../../sdk-web-api/src/index.ts';
838
+ import { ReadableAtom } from 'nanostores';
839
+ 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>;
840
+ }
841
+ declare module "../../feature-gamification/src/queries/index" {
842
+ import type { Transport } from '../../sdk-web-api/src/index.ts';
843
+ import { ReadableAtom } from 'nanostores';
844
+ import type { SubscriptionRequest, SubscriptionResponse, VotingSubscriptionRequest, VotingSubscriptionResponse, QuestionSubscriptionRequest, QuestionSubscriptionResponse } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
845
+ export const $activeQuestion: (slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedQuestion | undefined, any>;
846
+ export const feedSubscription: ($slStreamId: ReadableAtom<string | undefined>, 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<{
847
+ readonly typeName: "streamlayer.interactive.feed.Feed";
848
+ readonly methods: {
849
+ readonly get: {
850
+ readonly name: "Get";
851
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetRequest;
852
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetResponse;
853
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
854
+ };
855
+ readonly subscription: {
856
+ readonly name: "Subscription";
857
+ readonly I: typeof SubscriptionRequest;
858
+ readonly O: typeof SubscriptionResponse;
859
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
860
+ };
861
+ readonly votingSubscription: {
862
+ readonly name: "VotingSubscription";
863
+ readonly I: typeof VotingSubscriptionRequest;
864
+ readonly O: typeof VotingSubscriptionResponse;
865
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
866
+ };
867
+ readonly questionSubscription: {
868
+ readonly name: "QuestionSubscription";
869
+ readonly I: typeof QuestionSubscriptionRequest;
870
+ readonly O: typeof QuestionSubscriptionResponse;
871
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
872
+ };
873
+ readonly questionByUser: {
874
+ readonly name: "QuestionByUser";
875
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserRequest;
876
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserResponse;
877
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
878
+ };
879
+ readonly syncQuestion: {
880
+ readonly name: "SyncQuestion";
881
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionRequest;
882
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionResponse;
883
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
884
+ };
885
+ readonly getQuestion: {
886
+ readonly name: "GetQuestion";
887
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionRequest;
888
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionResponse;
889
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
890
+ };
891
+ readonly questionDetail: {
892
+ readonly name: "QuestionDetail";
893
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailRequest;
894
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailResponse;
895
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
896
+ };
897
+ readonly submitAnswer: {
898
+ readonly name: "SubmitAnswer";
899
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerRequest;
900
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerResponse;
901
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
902
+ };
903
+ readonly submitInplay: {
904
+ readonly name: "SubmitInplay";
905
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayRequest;
906
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayResponse;
907
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
908
+ };
909
+ readonly skipQuestion: {
910
+ readonly name: "SkipQuestion";
911
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionRequest;
912
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse;
913
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
914
+ };
915
+ readonly pickHistory: {
916
+ readonly name: "PickHistory";
917
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryRequest;
918
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryResponse;
919
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
920
+ };
921
+ readonly insightHistory: {
922
+ readonly name: "InsightHistory";
923
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryRequest;
924
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryResponse;
925
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
926
+ };
927
+ readonly tweetHistory: {
928
+ readonly name: "TweetHistory";
929
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryRequest;
930
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryResponse;
931
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
932
+ };
933
+ readonly promotionHistory: {
934
+ readonly name: "PromotionHistory";
935
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryRequest;
936
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryResponse;
937
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
938
+ };
939
+ readonly list: {
940
+ readonly name: "List";
941
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedListRequest;
942
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedListResponse;
943
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
944
+ };
945
+ readonly feedSubscription: {
946
+ readonly name: "FeedSubscription";
947
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionRequest;
948
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionResponse;
949
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
950
+ };
951
+ };
952
+ }, SubscriptionRequest, SubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription" | "feedSubscription", ((request: import("@bufbuild/protobuf").PartialMessage<SubscriptionRequest>, messageCallback: (response: SubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void) | ((request: import("@bufbuild/protobuf").PartialMessage<VotingSubscriptionRequest>, messageCallback: (response: VotingSubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void) | ((request: import("@bufbuild/protobuf").PartialMessage<QuestionSubscriptionRequest>, messageCallback: (response: QuestionSubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void) | ((request: import("@bufbuild/protobuf").PartialMessage<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionRequest>, messageCallback: (response: import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void)>;
953
+ export const votingSubscription: (params: {
954
+ questionId: string;
955
+ feedId: string;
956
+ }, 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<{
957
+ readonly typeName: "streamlayer.interactive.feed.Feed";
958
+ readonly methods: {
959
+ readonly get: {
960
+ readonly name: "Get";
961
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetRequest;
962
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetResponse;
963
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
964
+ };
965
+ readonly subscription: {
966
+ readonly name: "Subscription";
967
+ readonly I: typeof SubscriptionRequest;
968
+ readonly O: typeof SubscriptionResponse;
969
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
970
+ };
971
+ readonly votingSubscription: {
972
+ readonly name: "VotingSubscription";
973
+ readonly I: typeof VotingSubscriptionRequest;
974
+ readonly O: typeof VotingSubscriptionResponse;
975
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
976
+ };
977
+ readonly questionSubscription: {
978
+ readonly name: "QuestionSubscription";
979
+ readonly I: typeof QuestionSubscriptionRequest;
980
+ readonly O: typeof QuestionSubscriptionResponse;
981
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
982
+ };
983
+ readonly questionByUser: {
984
+ readonly name: "QuestionByUser";
985
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserRequest;
986
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserResponse;
987
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
988
+ };
989
+ readonly syncQuestion: {
990
+ readonly name: "SyncQuestion";
991
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionRequest;
992
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionResponse;
993
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
994
+ };
995
+ readonly getQuestion: {
996
+ readonly name: "GetQuestion";
997
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionRequest;
998
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionResponse;
999
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1000
+ };
1001
+ readonly questionDetail: {
1002
+ readonly name: "QuestionDetail";
1003
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailRequest;
1004
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailResponse;
1005
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1006
+ };
1007
+ readonly submitAnswer: {
1008
+ readonly name: "SubmitAnswer";
1009
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerRequest;
1010
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerResponse;
1011
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1012
+ };
1013
+ readonly submitInplay: {
1014
+ readonly name: "SubmitInplay";
1015
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayRequest;
1016
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayResponse;
1017
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1018
+ };
1019
+ readonly skipQuestion: {
1020
+ readonly name: "SkipQuestion";
1021
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionRequest;
1022
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse;
1023
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1024
+ };
1025
+ readonly pickHistory: {
1026
+ readonly name: "PickHistory";
1027
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryRequest;
1028
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryResponse;
1029
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1030
+ };
1031
+ readonly insightHistory: {
1032
+ readonly name: "InsightHistory";
1033
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryRequest;
1034
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryResponse;
1035
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1036
+ };
1037
+ readonly tweetHistory: {
1038
+ readonly name: "TweetHistory";
1039
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryRequest;
1040
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryResponse;
1041
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1042
+ };
1043
+ readonly promotionHistory: {
1044
+ readonly name: "PromotionHistory";
1045
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryRequest;
1046
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryResponse;
1047
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1048
+ };
1049
+ readonly list: {
1050
+ readonly name: "List";
1051
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedListRequest;
1052
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedListResponse;
1053
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1054
+ };
1055
+ readonly feedSubscription: {
1056
+ readonly name: "FeedSubscription";
1057
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionRequest;
1058
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionResponse;
1059
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
1060
+ };
1061
+ };
1062
+ }, VotingSubscriptionRequest, VotingSubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription" | "feedSubscription", ((request: import("@bufbuild/protobuf").PartialMessage<SubscriptionRequest>, messageCallback: (response: SubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void) | ((request: import("@bufbuild/protobuf").PartialMessage<VotingSubscriptionRequest>, messageCallback: (response: VotingSubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void) | ((request: import("@bufbuild/protobuf").PartialMessage<QuestionSubscriptionRequest>, messageCallback: (response: QuestionSubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void) | ((request: import("@bufbuild/protobuf").PartialMessage<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionRequest>, messageCallback: (response: import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void)>;
1063
+ 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<{
1064
+ readonly typeName: "streamlayer.interactive.feed.Feed";
1065
+ readonly methods: {
1066
+ readonly get: {
1067
+ readonly name: "Get";
1068
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetRequest;
1069
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetResponse;
1070
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1071
+ };
1072
+ readonly subscription: {
1073
+ readonly name: "Subscription";
1074
+ readonly I: typeof SubscriptionRequest;
1075
+ readonly O: typeof SubscriptionResponse;
1076
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
1077
+ };
1078
+ readonly votingSubscription: {
1079
+ readonly name: "VotingSubscription";
1080
+ readonly I: typeof VotingSubscriptionRequest;
1081
+ readonly O: typeof VotingSubscriptionResponse;
1082
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
1083
+ };
1084
+ readonly questionSubscription: {
1085
+ readonly name: "QuestionSubscription";
1086
+ readonly I: typeof QuestionSubscriptionRequest;
1087
+ readonly O: typeof QuestionSubscriptionResponse;
1088
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
1089
+ };
1090
+ readonly questionByUser: {
1091
+ readonly name: "QuestionByUser";
1092
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserRequest;
1093
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserResponse;
1094
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1095
+ };
1096
+ readonly syncQuestion: {
1097
+ readonly name: "SyncQuestion";
1098
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionRequest;
1099
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionResponse;
1100
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1101
+ };
1102
+ readonly getQuestion: {
1103
+ readonly name: "GetQuestion";
1104
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionRequest;
1105
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionResponse;
1106
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1107
+ };
1108
+ readonly questionDetail: {
1109
+ readonly name: "QuestionDetail";
1110
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailRequest;
1111
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailResponse;
1112
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1113
+ };
1114
+ readonly submitAnswer: {
1115
+ readonly name: "SubmitAnswer";
1116
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerRequest;
1117
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerResponse;
1118
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1119
+ };
1120
+ readonly submitInplay: {
1121
+ readonly name: "SubmitInplay";
1122
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayRequest;
1123
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayResponse;
1124
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1125
+ };
1126
+ readonly skipQuestion: {
1127
+ readonly name: "SkipQuestion";
1128
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionRequest;
1129
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse;
1130
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1131
+ };
1132
+ readonly pickHistory: {
1133
+ readonly name: "PickHistory";
1134
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryRequest;
1135
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryResponse;
1136
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1137
+ };
1138
+ readonly insightHistory: {
1139
+ readonly name: "InsightHistory";
1140
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryRequest;
1141
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryResponse;
1142
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1143
+ };
1144
+ readonly tweetHistory: {
1145
+ readonly name: "TweetHistory";
1146
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryRequest;
1147
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryResponse;
1148
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1149
+ };
1150
+ readonly promotionHistory: {
1151
+ readonly name: "PromotionHistory";
1152
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryRequest;
1153
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryResponse;
1154
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1155
+ };
1156
+ readonly list: {
1157
+ readonly name: "List";
1158
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedListRequest;
1159
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedListResponse;
1160
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1161
+ };
1162
+ readonly feedSubscription: {
1163
+ readonly name: "FeedSubscription";
1164
+ readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionRequest;
1165
+ readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionResponse;
1166
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
1167
+ };
1168
+ };
1169
+ }, QuestionSubscriptionRequest, QuestionSubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription" | "feedSubscription", ((request: import("@bufbuild/protobuf").PartialMessage<SubscriptionRequest>, messageCallback: (response: SubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void) | ((request: import("@bufbuild/protobuf").PartialMessage<VotingSubscriptionRequest>, messageCallback: (response: VotingSubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void) | ((request: import("@bufbuild/protobuf").PartialMessage<QuestionSubscriptionRequest>, messageCallback: (response: QuestionSubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void) | ((request: import("@bufbuild/protobuf").PartialMessage<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionRequest>, messageCallback: (response: import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionResponse) => void, closeCallback: (error: import("@connectrpc/connect").ConnectError | undefined) => void, options?: import("@connectrpc/connect").CallOptions | undefined) => () => void)>;
1170
+ export const getQuestionByUser: (questionId: string, transport: Transport) => Promise<import("@streamlayer/sl-eslib/interactive/interactive.common_pb").ExtendedQuestion | undefined>;
1171
+ export const $questionByUser: ($questionId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/interactive/interactive.common_pb").ExtendedQuestion | undefined, any>;
1172
+ 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>;
1173
+ export const $feedList: (slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedItem[], any>;
1174
+ export const $insightHistory: (slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<(import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistory | undefined)[] | undefined, any>;
1175
+ export { $userSummary, $leaderboardList } from "../../feature-gamification/src/queries/leaderboard";
1176
+ export { $moderation } from "../../feature-gamification/src/queries/moderation";
1177
+ }
1178
+ declare module "../../feature-gamification/src/detail" {
1179
+ import type { Transport } from '../../sdk-web-api/src/index.ts';
1180
+ import { ReadableAtom } from 'nanostores';
1181
+ import { getQuestionByUser } from "../../feature-gamification/src/queries/index";
1182
+ import { type GamificationBackground } from "../../feature-gamification/src/background";
1183
+ type ExtendedQuestion = Awaited<ReturnType<typeof getQuestionByUser>>;
1184
+ type ExtendedQuestionStore = {
1185
+ data?: ExtendedQuestion;
1186
+ loading?: boolean;
1187
+ error?: string;
1188
+ };
1189
+ export const detail: (transport: Transport, $openedQuestionId: ReadableAtom<string | undefined>, $feedList: ReturnType<GamificationBackground['feedList']['getStore']>) => {
1190
+ $store: ReadableAtom<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedItem | undefined>;
1191
+ $extendedStore: import("nanostores").MapStore<ExtendedQuestionStore>;
1192
+ updateExtendedQuestion: (question: ExtendedQuestion) => void;
1193
+ };
1194
+ }
1195
+ declare module "../../feature-gamification/src/background" {
1196
+ import { ApiStore, type StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
1197
+ import type { GetApiResponseType } from '../../sdk-web-api/src/index.ts';
1198
+ import '@streamlayer/sdk-web-core/store';
1199
+ import { ReadableAtom, WritableAtom } from 'nanostores';
1200
+ import * as queries from "../../feature-gamification/src/queries/index";
1201
+ import { detail } from "../../feature-gamification/src/detail";
1202
+ /**
1203
+ * get GamificationBackground singleton
1204
+ */
1205
+ export const gamificationBackground: (instance: StreamLayerContext) => GamificationBackground;
1206
+ /**
1207
+ * Background Singleton class for Gamification and Highlights overlays
1208
+ */
1209
+ export class GamificationBackground {
1210
+ /** sl event id */
1211
+ slStreamId: ReadableAtom<string | undefined>;
1212
+ /** organization id */
1213
+ organizationId: ReadableAtom<string | undefined>;
1214
+ /** current user id */
1215
+ userId: ReadableAtom<string | undefined>;
1216
+ /** opened question, using to download statistics */
1217
+ openedQuestionId: WritableAtom<string | undefined>;
1218
+ /** opened question statistics */
1219
+ openedQuestion: ReturnType<typeof detail>;
1220
+ /** last active question in feed */
1221
+ activeQuestionId: ApiStore<GetApiResponseType<typeof queries.$activeQuestion>>;
1222
+ feedList: ApiStore<GetApiResponseType<typeof queries.$feedList>>;
1223
+ /** moderation id */
1224
+ moderationId: ReadableAtom<string | undefined>;
1225
+ /** moderation */
1226
+ moderation: ApiStore<GetApiResponseType<typeof queries.$moderation>>;
1227
+ /** feed subscription to receive new active question, update last active question */
1228
+ feedSubscription: ReturnType<typeof queries.feedSubscription>;
1229
+ /** subscription to opened question (vote percentage) */
1230
+ questionSubscription?: ReturnType<typeof queries.questionSubscription>;
1231
+ private notifications;
1232
+ private log;
1233
+ constructor(instance: StreamLayerContext);
1234
+ /**
1235
+ * Get id for notifications and link with current session
1236
+ * @param opts.prefix - id prefix (onboarding, question, tweet, ...etc)
1237
+ * @param opts.userId - current user id, if not presented get from sdk automatically
1238
+ * @param opts.eventId - current event id, if not presented get from sdk automatically
1239
+ * @param opts.organizationId - current organization id, if not presented get from sdk automatically
1240
+ * @param opts.entity - entity id (question id, tweet id, ...etc)
1241
+ */
1242
+ getCurrentSessionId: (opts: {
1243
+ prefix?: string;
1244
+ userId?: string;
1245
+ eventId?: string;
1246
+ organizationId?: string;
1247
+ entity?: string;
1248
+ }) => string;
1249
+ disconnect: () => void;
1250
+ /**
1251
+ * Open question and mark notification for this question as viewed
1252
+ */
1253
+ openQuestion: (questionId: string) => void;
1254
+ /**
1255
+ * Close question and mark notification for this question as viewed
1256
+ */
1257
+ closeQuestion: (questionId?: string) => void;
1258
+ }
1259
+ }
1260
+ declare module "../../feature-gamification/src/queries/actions" {
1261
+ import type { Transport } from '../../sdk-web-api/src/index.ts';
1262
+ export const submitAnswer: (transport: Transport, data: {
1263
+ questionId: string;
1264
+ answerId: string;
1265
+ }) => Promise<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerResponse>;
1266
+ export const submitInplay: (transport: Transport, eventId: string) => Promise<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayResponse>;
1267
+ export const skipQuestion: (transport: Transport, questionId: string) => Promise<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse>;
1268
+ }
1269
+ declare module "../../feature-gamification/src/onboarding" {
1270
+ import { Transport } from '../../sdk-web-api/src/index.ts';
1271
+ import { type Notifications } from '../../sdk-web-notifications/src/index.ts';
1272
+ import { GamificationBackground } from "../../feature-gamification/src/background";
1273
+ import { Gamification } from "../../feature-gamification/src/index";
1274
+ /**
1275
+ * Required: in-app should be displayed and questions not available
1276
+ * Optional: in-app should be displayed but questions are available
1277
+ * Completed: user completed onboarding, cached in browser. Linked by eventId, organizationId and userId
1278
+ * Disabled: no in-app but questions are available
1279
+ * Unavailable: no in-app and questions not available [behavior is discussed]
1280
+ */
1281
+ export enum OnboardingStatus {
1282
+ Unset = "unset",
1283
+ Required = "required",
1284
+ Optional = "optional",
1285
+ Completed = "completed",
1286
+ Disabled = "disabled",
1287
+ Unavailable = "unavailable"
1288
+ }
1289
+ export const onboarding: (service: Gamification, background: GamificationBackground, transport: Transport, notifications: Notifications) => {
1290
+ $store: import("nanostores").WritableAtom<OnboardingStatus>;
1291
+ submitInplay: () => Promise<void>;
1292
+ };
1293
+ }
1294
+ declare module "../../feature-gamification/src/storage" {
1295
+ import { Storage } from '../../sdk-web-storage/src/index.ts';
1296
+ import { OnboardingStatus } from "../../feature-gamification/src/onboarding";
1297
+ type UserProps = {
1298
+ userId: string;
1299
+ eventId: string;
1300
+ organizationId: string;
1301
+ };
1302
+ export class GamificationStorage extends Storage {
1303
+ constructor();
1304
+ saveOnboardingStatus: ({ userId, eventId, organizationId }: UserProps, status: OnboardingStatus) => void;
1305
+ getOnboardingStatus: ({ userId, eventId, organizationId }: UserProps) => string | undefined;
1306
+ }
1307
+ }
1308
+ declare module "../../feature-gamification/src/leaderboard" {
1309
+ import type { Transport } from '../../sdk-web-api/src/index.ts';
1310
+ import { ReadableAtom } from 'nanostores';
1311
+ import { type LeaderboardItem } from "../../feature-gamification/src/queries/leaderboard";
1312
+ type LeaderboardOptions = {
1313
+ pageSize?: number;
1314
+ };
1315
+ type LeaderboardStore = {
1316
+ data?: LeaderboardItem[];
1317
+ loading?: boolean;
1318
+ error?: string;
1319
+ };
1320
+ export const leaderboard: (transport: Transport, $eventId: ReadableAtom<string | undefined>, options?: LeaderboardOptions) => {
1321
+ $store: import("nanostores").MapStore<LeaderboardStore>;
1322
+ fetchMore: () => void;
1323
+ invalidate: () => void;
1324
+ };
1325
+ }
1326
+ declare module "../../feature-gamification/src/gamification" {
1327
+ import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps, type StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
1328
+ import { type GamesOverlaySettings } from '../../sdk-web-types/src/index.ts';
1329
+ import type { GetApiResponseType } from '../../sdk-web-api/src/index.ts';
1330
+ import '@streamlayer/sdk-web-core/store';
1331
+ import type { PlainMessage } from '@bufbuild/protobuf';
1332
+ import { WritableAtom } from 'nanostores';
1333
+ import * as queries from "../../feature-gamification/src/queries/index";
1334
+ import { leaderboard } from "../../feature-gamification/src/leaderboard";
1335
+ import { OnboardingStatus } from "../../feature-gamification/src/onboarding";
1336
+ import { LeaderboardItem } from "../../feature-gamification/src/queries/leaderboard";
1337
+ import { GamificationBackground } from "../../feature-gamification/src/index";
1338
+ /**
1339
+ * Gamification (Games) Overlay
1340
+ * Includes:
1341
+ * - questions list (pick history)
1342
+ * - active question (question from active queue, available from pick history and in-app)
1343
+ * - leaderboard (currently only global pinned leaderboard)
1344
+ * - user summary (current user summary)
1345
+ * - onboarding (welcome book)
1346
+ */
1347
+ export class Gamification extends AbstractFeature<'games', PlainMessage<GamesOverlaySettings>> {
1348
+ /** user statistics (leaderboard panel) */
1349
+ userSummary: ApiStore<GetApiResponseType<typeof queries.$userSummary>>;
1350
+ /** feed list (pick history) */
1351
+ feedList: ApiStore<GetApiResponseType<typeof queries.$feedList>>;
1352
+ /** pinned leaderboard id */
1353
+ leaderboardId: WritableAtom<string | undefined>;
1354
+ /** leaderboard list */
1355
+ leaderboardList: ReturnType<typeof leaderboard>;
1356
+ /** onboarding status */
1357
+ onboardingStatus: {
1358
+ $store: WritableAtom<OnboardingStatus | undefined>;
1359
+ submitInplay: () => Promise<void>;
1360
+ };
1361
+ /** opened question */
1362
+ openedQuestion: GamificationBackground['openedQuestion'];
1363
+ /** pinned leaderboard id */
1364
+ openedUser: WritableAtom<LeaderboardItem | undefined>;
1365
+ closeFeature: () => void;
1366
+ openFeature: () => void;
1367
+ private notifications;
1368
+ private transport;
1369
+ /** gamification background class, handle subscriptions and notifications for closed overlay */
1370
+ private background;
1371
+ /** Browser cache */
1372
+ private storage;
1373
+ constructor(config: FeatureProps, source: FeatureSource, instance: StreamLayerContext);
1374
+ connect: (transport: StreamLayerContext['transport']) => void;
1375
+ disconnect: () => void;
1376
+ submitAnswer: (questionId: string, answerId: string) => Promise<void>;
1377
+ skipQuestion: (questionId: string) => Promise<void>;
1378
+ openQuestion: (questionId: string) => void;
1379
+ closeQuestion: (questionId?: string) => void;
1380
+ openUser: (userId: string) => void;
1381
+ closeUser: () => void;
1382
+ }
1383
+ }
1384
+ declare module "../../feature-gamification/src/highlights" {
1385
+ import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps, type StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
1386
+ import type { GetApiResponseType } from '../../sdk-web-api/src/index.ts';
1387
+ import '@streamlayer/sdk-web-core/store';
1388
+ import * as queries from "../../feature-gamification/src/queries/index";
1389
+ import { GamificationBackground } from "../../feature-gamification/src/index";
1390
+ export class Highlights extends AbstractFeature<undefined> {
1391
+ insights?: ApiStore<GetApiResponseType<typeof queries.$insightHistory>>;
1392
+ closeFeature: () => void;
1393
+ openFeature: () => void;
1394
+ openedInsight: GamificationBackground['openedQuestion'];
1395
+ private notifications;
1396
+ private transport;
1397
+ private background;
1398
+ constructor(config: FeatureProps, source: FeatureSource, instance: StreamLayerContext);
1399
+ connect: () => void;
1400
+ disconnect: () => void;
1401
+ openHighlight: (questionId: string) => void;
1402
+ closeHighlight: (questionId?: string) => void;
1403
+ }
1404
+ }
1405
+ declare module "../../feature-gamification/src/index" {
1406
+ export { GamificationBackground, gamificationBackground } from "../../feature-gamification/src/background";
1407
+ export { Gamification } from "../../feature-gamification/src/gamification";
1408
+ export { Highlights } from "../../feature-gamification/src/highlights";
1409
+ module '@streamlayer/sdk-web-interfaces' {
1410
+ interface StreamLayerContext {
1411
+ gamification: import("../../feature-gamification/src/background").GamificationBackground;
1412
+ }
1413
+ }
1414
+ }
1415
+ declare module "../../sdk-web-features/src/index" {
1416
+ import { FeatureType } from '../../sdk-web-types/src/index.ts';
1417
+ import { AbstractFeature, FeatureSource, FeatureProps, StreamLayerContext, SingleStore } from '../../sdk-web-interfaces/src/index.ts';
1418
+ import { Highlights, Gamification } from '../../feature-gamification/src/index.ts';
1419
+ export type Features = Feature | Gamification | Highlights;
1420
+ export const AvailableFeatures: {
1421
+ 12: boolean;
1422
+ 14: boolean;
1423
+ };
1424
+ export class Feature extends AbstractFeature<undefined> {
1425
+ constructor(overlay: FeatureProps, source: FeatureSource);
1426
+ }
1427
+ export const initFeature: (overlay: FeatureProps, source: FeatureSource, instance: StreamLayerContext) => Gamification | Highlights | Feature;
1428
+ export { FeatureSource } from '../../sdk-web-interfaces/src/index.ts';
1429
+ module '@streamlayer/sdk-web-interfaces' {
1430
+ interface StreamLayerContext {
1431
+ features: Map<FeatureType, Features>;
1432
+ initFeature: (overlay: FeatureProps, source: FeatureSource) => void;
1433
+ updateFeature: (overlay: FeatureProps, source: FeatureSource) => void;
1434
+ destroyFeature: (overlay: FeatureProps) => void;
1435
+ reinitializeFeatures: () => Promise<void>;
1436
+ activeFeature: SingleStore<FeatureType>;
1437
+ }
1438
+ interface StreamLayerSDK {
1439
+ getFeatures: () => Map<FeatureType, Features>;
1440
+ getFeature: <T extends FeatureType = FeatureType>(featureType: T) => (T extends FeatureType.GAMES ? Gamification : T extends FeatureType.HIGHLIGHTS ? Highlights : Feature) | undefined;
1441
+ getActiveFeature: SingleStore<FeatureType>['getStore'];
1442
+ closeFeature: () => void;
1443
+ }
1444
+ }
1445
+ export const features: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
1446
+ }
1447
+ declare module "../../sdk-web/src/index" {
1448
+ import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
1449
+ import avvio from 'avvio';
1450
+ export type StreamLayerInstance = avvio.mixedInstance<StreamLayerContext>;
1451
+ export type StreamLayerPlugin = (instance: StreamLayerContext, opts: unknown, done: DoneFn) => void;
1452
+ type DoneFn = Function;
1453
+ export function StreamLayer(sdkKey: string, production?: boolean, autoEnable?: boolean): avvio.Avvio<StreamLayerContext>;
1454
+ }
1455
+ declare module "app/useStreamLayerApp" {
1456
+ import type { StreamLayerSDK, StreamLayerPlugin } from '../../sdk-web-interfaces/src/index.ts';
1457
+ export const useStreamLayerApp: (sdkKey: string, plugins?: Set<StreamLayerPlugin>, production?: boolean, autoEnable?: boolean) => StreamLayerSDK | null;
1458
+ }
1459
+ declare module "app/provider" {
1460
+ import type { StreamLayerSDK, StreamLayerPlugin } from '../../sdk-web-interfaces/src/index.ts';
1461
+ export enum StreamLayerStatus {
1462
+ UNSET = 0,
1463
+ CONNECTED = 1,
1464
+ READY = 2
1465
+ }
1466
+ export const StreamLayerContext: import("react").Context<{
1467
+ status: StreamLayerStatus;
1468
+ sdk: StreamLayerSDK | null;
1469
+ }>;
1470
+ export type StreamLayerProps = {
1471
+ sdkKey: string;
1472
+ plugins?: Set<StreamLayerPlugin>;
1473
+ production?: boolean;
1474
+ autoEnable?: boolean;
1475
+ };
1476
+ export const StreamLayerProvider: React.FC<StreamLayerProps & {
1477
+ children: React.ReactNode;
1478
+ }>;
1479
+ }
1480
+ declare module "app/masters" {
1481
+ import { StreamLayerProps } from "app/provider";
1482
+ export const MastersStreamLayerProvider: React.FC<StreamLayerProps & {
1483
+ children: React.ReactNode;
1484
+ }>;
1485
+ type Overlays = {
1486
+ leaderboard: React.ReactNode;
1487
+ };
1488
+ type MastersAppChildrenProps = {
1489
+ enableSdk: (event: string) => void;
1490
+ disableSdk: () => void;
1491
+ };
1492
+ type MastersAppProps = {
1493
+ overlays?: Overlays;
1494
+ children: (methods: MastersAppChildrenProps) => React.ReactNode;
1495
+ };
1496
+ export const MastersStreamLayerSDKReact: React.FC<MastersAppProps>;
1497
+ }
1498
+ declare module "app/app" {
1499
+ import type { StreamLayerSDK } from '../../sdk-web-interfaces/src/index.ts';
1500
+ export const useStreamLayer: () => StreamLayerSDK | null;
1501
+ export const StreamLayerSDKReact: React.FC;
1502
+ }
1503
+ declare module "app/auth" {
1504
+ export const StreamLayerLogin: React.FC<{
1505
+ token: string;
1506
+ schema: string;
1507
+ }>;
1508
+ }
1509
+ declare module "app/points" {
1510
+ export const StreamLayerSDKPoints: () => import("react/jsx-runtime").JSX.Element | null;
1511
+ }
1512
+ /// <amd-module name="@streamlayer/react/masters" />
1513
+ declare module "@streamlayer/react/masters" {
1514
+ export * from "app/masters";
1515
+ export * from "app/auth";
1516
+ export * from "app/points";
1517
+ }
1518
+ declare module "index" {
1519
+ import '@streamlayer/sdk-web-api';
1520
+ import '@streamlayer/sdk-web-core';
1521
+ import '@streamlayer/sdk-web-types';
1522
+ import '@streamlayer/sdk-web-logger';
1523
+ import '@streamlayer/sdk-web-storage';
1524
+ import '@streamlayer/sdk-web-features';
1525
+ import '@streamlayer/sdk-web-interfaces';
1526
+ import '@streamlayer/sdk-web-notifications';
1527
+ import '@streamlayer/feature-gamification';
1528
+ export { StreamLayerProvider } from "app/provider";
1529
+ export { StreamLayerSDKReact, useStreamLayer } from "app/app";
1530
+ }