@streamlayer/react 0.19.0 → 0.20.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.
- package/lib/cjs/index.js +1 -29
- package/lib/es/index.js +1392 -18407
- package/lib/index.d.ts +3 -1895
- package/lib/style.css +1 -1
- package/package.json +23 -13
package/lib/index.d.ts
CHANGED
|
@@ -1,1895 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import type { StreamSettings as SLStreamSettings, SdkOverlay, Advertising, OrganizationSettings as SLOrganizationSettings } from '@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb';
|
|
5
|
-
import type { ClientSettings } from '@streamlayer/sl-eslib/sdkSettings/client/client_pb';
|
|
6
|
-
import type { UserAttributes } from '@streamlayer/sl-eslib/users/users_common_pb';
|
|
7
|
-
export { QuestionType, QuestionStatus, QuestionImages, ImagePosition, ExtendedQuestion, } from '@streamlayer/sl-eslib/interactive/interactive.common_pb';
|
|
8
|
-
import type { PickHistory as IPickHistory } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
|
|
9
|
-
import type { InsightHistory as IInsightHistory } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
|
|
10
|
-
export { PickHistoryStatus } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
|
|
11
|
-
export type PickHistory = PlainMessage<IPickHistory>;
|
|
12
|
-
export type InsightHistory = PlainMessage<IInsightHistory>;
|
|
13
|
-
export type OrganizationSettings = SLOrganizationSettings;
|
|
14
|
-
export type OrganizationAdvertising = Advertising;
|
|
15
|
-
export type FeatureConfig = SdkOverlay;
|
|
16
|
-
export type StreamSettings = SLStreamSettings;
|
|
17
|
-
export type User = UserAttributes;
|
|
18
|
-
export type UserSettings = ClientSettings;
|
|
19
|
-
export { SdkOverlayType as FeatureType, SdkOverlaySettings, GamesOverlaySettings, } from '@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb';
|
|
20
|
-
}
|
|
21
|
-
declare module "packages/sdk-web-types/src/index" {
|
|
22
|
-
export * from "packages/sdk-web-types/src/sl-types";
|
|
23
|
-
}
|
|
24
|
-
declare module "packages/sdk-web-interfaces/src/auth" {
|
|
25
|
-
export abstract class AbstractAuthenticationProvider {
|
|
26
|
-
abstract login(...args: unknown[]): Promise<unknown>;
|
|
27
|
-
abstract logout(): void;
|
|
28
|
-
abstract me(): Promise<unknown>;
|
|
29
|
-
abstract isAuthenticated(): Promise<unknown>;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
declare module "packages/sdk-web-interfaces/src/store/abstract" {
|
|
33
|
-
import type { AnyStore } from 'nanostores';
|
|
34
|
-
global {
|
|
35
|
-
interface Window {
|
|
36
|
-
slStore: any;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* An abstract store is a wrapper for third-party stores,
|
|
41
|
-
* providing developers with a consistent interface inspired
|
|
42
|
-
* by the "nanostore" pattern. This simplifies
|
|
43
|
-
* interactions with different storage systems.
|
|
44
|
-
*/
|
|
45
|
-
export abstract class AbstractStore<T extends AnyStore> {
|
|
46
|
-
/**
|
|
47
|
-
* store instance (nanostores)
|
|
48
|
-
*/
|
|
49
|
-
protected readonly store: T;
|
|
50
|
-
protected readonly name: string;
|
|
51
|
-
constructor(store: T, name: string);
|
|
52
|
-
/**
|
|
53
|
-
* return store instance
|
|
54
|
-
*/
|
|
55
|
-
getStore(): T;
|
|
56
|
-
/**
|
|
57
|
-
* get all store values
|
|
58
|
-
*/
|
|
59
|
-
abstract getValues(): unknown;
|
|
60
|
-
/**
|
|
61
|
-
* get store value by key
|
|
62
|
-
*/
|
|
63
|
-
abstract getValue(...args: unknown[]): unknown;
|
|
64
|
-
/**
|
|
65
|
-
* subscribe directly to store changes
|
|
66
|
-
*/
|
|
67
|
-
abstract subscribe(...args: unknown[]): void;
|
|
68
|
-
/**
|
|
69
|
-
* unsubscribe directly to store change
|
|
70
|
-
*/
|
|
71
|
-
abstract unsubscribe(): void;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Merge multiple stores into a single instance using a single
|
|
75
|
-
* subscribe handler, leveraging the `useStore` method from `@nanostores/react` for React subscriptions.
|
|
76
|
-
*/
|
|
77
|
-
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>;
|
|
78
|
-
}
|
|
79
|
-
declare module "packages/sdk-web-interfaces/src/store/map" {
|
|
80
|
-
import type { MapStoreKeys, MapStore as NMapStore } from 'nanostores';
|
|
81
|
-
import { AbstractStore } from "packages/sdk-web-interfaces/src/store/abstract";
|
|
82
|
-
/**
|
|
83
|
-
* Wrapper for nanostores MapStore
|
|
84
|
-
*/
|
|
85
|
-
export class MapStore<StoreInterface extends object, StoreInstance extends NMapStore<StoreInterface> = NMapStore<StoreInterface>> extends AbstractStore<StoreInstance> {
|
|
86
|
-
getValues: () => StoreInterface;
|
|
87
|
-
getValue: (key: MapStoreKeys<StoreInstance>) => StoreInterface[MapStoreKeys<StoreInstance>];
|
|
88
|
-
setValue: <Key extends MapStoreKeys<StoreInstance>>(path: Key, value: StoreInterface[Key]) => void;
|
|
89
|
-
subscribe: StoreInstance['subscribe'];
|
|
90
|
-
unsubscribe: () => void;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* create map store from nanostores
|
|
94
|
-
*/
|
|
95
|
-
export const createMapStore: <Data extends object>(initialData: Data) => NMapStore<Data>;
|
|
96
|
-
export type MapStoreListeners<StoreInstance extends NMapStore<StoreInterface>, StoreInterface extends object> = {
|
|
97
|
-
[T in MapStoreKeys<StoreInstance>]: (value: StoreInterface[T]) => void;
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
declare module "packages/sdk-web-interfaces/src/feature" {
|
|
101
|
-
import { FeatureConfig as SdkOverlay, SdkOverlaySettings } from "packages/sdk-web-types/src/index";
|
|
102
|
-
import { PlainMessage } from '@bufbuild/protobuf';
|
|
103
|
-
import { WritableAtom } from 'nanostores';
|
|
104
|
-
import { MapStore } from "packages/sdk-web-interfaces/src/store/map";
|
|
105
|
-
type FeatureListener = {
|
|
106
|
-
name: string;
|
|
107
|
-
enabled: boolean;
|
|
108
|
-
onEvent: (...args: unknown[]) => void;
|
|
109
|
-
};
|
|
110
|
-
export type FeatureProps = PlainMessage<SdkOverlay>;
|
|
111
|
-
export enum FeatureSource {
|
|
112
|
-
ORGANIZATION = "ORGANIZATION",
|
|
113
|
-
STREAM = "STREAM"
|
|
114
|
-
}
|
|
115
|
-
type FeatureConfig = Omit<FeatureProps, 'settings'>;
|
|
116
|
-
type FeatureSettings = Exclude<PlainMessage<SdkOverlaySettings>['overlaySettings'], {
|
|
117
|
-
case: 'inplay';
|
|
118
|
-
} | {
|
|
119
|
-
case: 'getstream';
|
|
120
|
-
} | {
|
|
121
|
-
case: undefined;
|
|
122
|
-
}>;
|
|
123
|
-
export enum FeatureStatus {
|
|
124
|
-
Ready = "ready",
|
|
125
|
-
Suspended = "suspended"
|
|
126
|
-
}
|
|
127
|
-
export class AbstractFeature<K extends FeatureSettings['case'] | undefined, C extends FeatureSettings['value'] = FeatureSettings['value']> {
|
|
128
|
-
status: WritableAtom<FeatureStatus>;
|
|
129
|
-
source: FeatureSource;
|
|
130
|
-
protected config: MapStore<FeatureConfig>;
|
|
131
|
-
protected settings: MapStore<C>;
|
|
132
|
-
protected listeners: Set<FeatureListener>;
|
|
133
|
-
protected settingsKey: K;
|
|
134
|
-
constructor({ settings, ...config }: FeatureProps, source: FeatureSource);
|
|
135
|
-
get featureConfig(): import("nanostores").MapStore<FeatureConfig>;
|
|
136
|
-
get featureSettings(): import("nanostores").MapStore<C>;
|
|
137
|
-
registerEventListener(listener: FeatureListener): void;
|
|
138
|
-
enable: () => void;
|
|
139
|
-
disable: () => void;
|
|
140
|
-
setFeatureConfig: ({ settings, ...config }: FeatureProps) => void;
|
|
141
|
-
update: (config: FeatureProps, source: FeatureSource) => void;
|
|
142
|
-
protected fireEvent(event: unknown): void;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
declare module "packages/sdk-web-interfaces/src/store/single" {
|
|
146
|
-
import type { StoreValue, WritableAtom } from 'nanostores';
|
|
147
|
-
import { AbstractStore } from "packages/sdk-web-interfaces/src/store/abstract";
|
|
148
|
-
/**
|
|
149
|
-
* Wrapper for nanostores WritableAtom
|
|
150
|
-
*/
|
|
151
|
-
export class SingleStore<StoreValue, StoreInstance extends WritableAtom<StoreValue | undefined> = WritableAtom<StoreValue | undefined>> extends AbstractStore<StoreInstance> {
|
|
152
|
-
getValue: () => StoreInstance['value'];
|
|
153
|
-
getValues(): unknown;
|
|
154
|
-
setValue: (value?: StoreValue) => void;
|
|
155
|
-
subscribe: (listener: Parameters<StoreInstance['subscribe']>[0]) => () => void;
|
|
156
|
-
unsubscribe: () => void;
|
|
157
|
-
listen(listener: Parameters<StoreInstance['subscribe']>[0]): () => void;
|
|
158
|
-
get(): StoreValue | undefined;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* create atom store from nanostores
|
|
162
|
-
*/
|
|
163
|
-
export const createSingleStore: <T>(initialData?: T | undefined) => WritableAtom<T | undefined>;
|
|
164
|
-
export const createComputedStore: <Value, T extends WritableAtom<any> = WritableAtom<any>>(store: T, mutator: (value: StoreValue<T>) => Value) => import("nanostores").ReadableAtom<Value>;
|
|
165
|
-
}
|
|
166
|
-
declare module "packages/sdk-web-interfaces/src/store/api" {
|
|
167
|
-
import type { FetcherStore } from '@nanostores/query';
|
|
168
|
-
import { WritableAtom } from 'nanostores';
|
|
169
|
-
import { AbstractStore } from "packages/sdk-web-interfaces/src/store/abstract";
|
|
170
|
-
/**
|
|
171
|
-
* Wrapper for @nanostores/query FetcherStore
|
|
172
|
-
*/
|
|
173
|
-
export class ApiStore<StoreValue, StoreInstance extends FetcherStore<StoreValue | undefined> = FetcherStore<StoreValue | undefined>> extends AbstractStore<StoreInstance> {
|
|
174
|
-
private readonly atomStore;
|
|
175
|
-
constructor(store: StoreInstance, name: string, atomPicker?: (val?: StoreInstance['value']) => string | undefined);
|
|
176
|
-
getAtomStore: () => WritableAtom<string | undefined>;
|
|
177
|
-
getValue: () => Promise<StoreValue | undefined>;
|
|
178
|
-
getValues: () => never;
|
|
179
|
-
setValue: (value?: StoreInstance['value']) => void;
|
|
180
|
-
subscribe: StoreInstance['subscribe'];
|
|
181
|
-
unsubscribe: () => never;
|
|
182
|
-
invalidate: () => void;
|
|
183
|
-
listen: (cb: Parameters<FetcherStore['listen']>[0]) => () => void;
|
|
184
|
-
get(): void;
|
|
185
|
-
key: () => string | undefined;
|
|
186
|
-
off: () => void;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
declare module "packages/sdk-web-interfaces/src/index" {
|
|
190
|
-
import { FeatureType } from "packages/sdk-web-types/src/index";
|
|
191
|
-
export { AbstractAuthenticationProvider } from "packages/sdk-web-interfaces/src/auth";
|
|
192
|
-
export { AbstractFeature, FeatureSource, type FeatureProps, FeatureStatus } from "packages/sdk-web-interfaces/src/feature";
|
|
193
|
-
export { MapStore, createMapStore } from "packages/sdk-web-interfaces/src/store/map";
|
|
194
|
-
export type { MapStoreListeners } from "packages/sdk-web-interfaces/src/store/map";
|
|
195
|
-
export { SingleStore, createSingleStore, createComputedStore } from "packages/sdk-web-interfaces/src/store/single";
|
|
196
|
-
export { AbstractStore, mergeStores } from "packages/sdk-web-interfaces/src/store/abstract";
|
|
197
|
-
export { ApiStore } from "packages/sdk-web-interfaces/src/store/api";
|
|
198
|
-
export interface StreamLayerSDK {
|
|
199
|
-
openFeature: (featureType: FeatureType) => void;
|
|
200
|
-
closeFeature: () => void;
|
|
201
|
-
}
|
|
202
|
-
export interface StreamLayerContext {
|
|
203
|
-
sdk: StreamLayerSDK;
|
|
204
|
-
}
|
|
205
|
-
type DoneFn = Function;
|
|
206
|
-
export type StreamLayerPlugin = (instance: StreamLayerContext, opts: unknown, done: DoneFn) => void;
|
|
207
|
-
}
|
|
208
|
-
declare module "packages/sdk-web-logger/src/index" {
|
|
209
|
-
import { pino, ChildLoggerOptions } from 'pino';
|
|
210
|
-
export const createLogger: (name: string, options?: ChildLoggerOptions) => pino.Logger<{
|
|
211
|
-
level: "trace";
|
|
212
|
-
} & ChildLoggerOptions>;
|
|
213
|
-
export type Logger = ReturnType<typeof createLogger>;
|
|
214
|
-
}
|
|
215
|
-
declare module "packages/sdk-web-notifications/src/queue/index" {
|
|
216
|
-
import { createComputedStore } from "packages/sdk-web-interfaces/src/index";
|
|
217
|
-
import { Notification } from "packages/sdk-web-notifications/src/index";
|
|
218
|
-
export type NotificationsQueueOptions = {
|
|
219
|
-
concurrency: number;
|
|
220
|
-
animationDelay: number;
|
|
221
|
-
};
|
|
222
|
-
export type NotificationsList = ReturnType<typeof createComputedStore<Notification[]>>;
|
|
223
|
-
export class NotificationsQueue {
|
|
224
|
-
notificationsList: NotificationsList;
|
|
225
|
-
private notifications;
|
|
226
|
-
private store;
|
|
227
|
-
private timeouts;
|
|
228
|
-
private waitingQueue;
|
|
229
|
-
private activeQueue;
|
|
230
|
-
private options;
|
|
231
|
-
private logger;
|
|
232
|
-
constructor(options: NotificationsQueueOptions);
|
|
233
|
-
addToQueue: (notification: Notification) => void;
|
|
234
|
-
tickWaitingQueue: () => void;
|
|
235
|
-
tickActiveQueue: (notificationId: string) => void;
|
|
236
|
-
closeNotification: (notificationId: string) => void;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
declare module "packages/sdk-web-storage/src/index" {
|
|
240
|
-
export class Storage {
|
|
241
|
-
private delimiter;
|
|
242
|
-
private prefix;
|
|
243
|
-
constructor(prefix?: string);
|
|
244
|
-
clear: () => void;
|
|
245
|
-
protected generateKey: (keyParts: string[]) => string;
|
|
246
|
-
protected write: (keyParts_0: string, keyParts_1: string, ...keyParts_2: string[]) => void;
|
|
247
|
-
protected read: (...keyParts: string[]) => string | undefined;
|
|
248
|
-
protected remove: (...keyParts: string[]) => void;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
declare module "packages/sdk-web-notifications/src/storage" {
|
|
252
|
-
import { Storage } from "packages/sdk-web-storage/src/index";
|
|
253
|
-
export class NotificationStorage extends Storage {
|
|
254
|
-
constructor();
|
|
255
|
-
setOpened: (notificationId: string) => void;
|
|
256
|
-
isOpened: (notificationId: string) => string | undefined;
|
|
257
|
-
clearNotification: () => void;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
declare module "packages/sdk-web-notifications/src/notifications" {
|
|
261
|
-
import { QuestionImages, ImagePosition } from "packages/sdk-web-types/src/index";
|
|
262
|
-
import { NotificationsQueue, NotificationsQueueOptions } from "packages/sdk-web-notifications/src/queue/index";
|
|
263
|
-
export type NotificationData = {
|
|
264
|
-
color?: string;
|
|
265
|
-
icon?: string;
|
|
266
|
-
sponsorLogo?: string;
|
|
267
|
-
graphicBg?: string;
|
|
268
|
-
title?: string;
|
|
269
|
-
header?: string;
|
|
270
|
-
subtitle?: string;
|
|
271
|
-
primaryColor?: string;
|
|
272
|
-
imageMode?: QuestionImages;
|
|
273
|
-
imagePosition?: ImagePosition;
|
|
274
|
-
};
|
|
275
|
-
export enum NotificationType {
|
|
276
|
-
ONBOARDING = 1,
|
|
277
|
-
QUESTION = 2
|
|
278
|
-
}
|
|
279
|
-
export type Notification<T extends Record<string, unknown> = any, M extends Record<string, Function> = never> = {
|
|
280
|
-
autoHideDuration: number;
|
|
281
|
-
delay?: number;
|
|
282
|
-
hiding?: boolean;
|
|
283
|
-
type: NotificationType;
|
|
284
|
-
action?: (...args: unknown[]) => void;
|
|
285
|
-
close?: (...args: unknown[]) => void;
|
|
286
|
-
methods?: M;
|
|
287
|
-
data: NotificationData;
|
|
288
|
-
id: string;
|
|
289
|
-
meta?: T;
|
|
290
|
-
};
|
|
291
|
-
/**
|
|
292
|
-
* @description app notifications (inapp)
|
|
293
|
-
*/
|
|
294
|
-
export class Notifications {
|
|
295
|
-
queue: NotificationsQueue;
|
|
296
|
-
private storage;
|
|
297
|
-
constructor(options?: Partial<NotificationsQueueOptions>);
|
|
298
|
-
add: (notification: Notification) => void;
|
|
299
|
-
close: (notificationId: string) => void;
|
|
300
|
-
getQueueStore: () => import("nanostores").ReadableAtom<Notification[]>;
|
|
301
|
-
markAsViewed: (notificationId: string) => void;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
declare module "packages/sdk-web-notifications/src/index" {
|
|
305
|
-
import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
|
|
306
|
-
import { Notifications } from "packages/sdk-web-notifications/src/notifications";
|
|
307
|
-
export { type Notification, type NotificationData, NotificationType, Notifications } from "packages/sdk-web-notifications/src/notifications";
|
|
308
|
-
export { type NotificationsList } from "packages/sdk-web-notifications/src/queue/index";
|
|
309
|
-
export type NotificationsStore = ReturnType<Notifications['getQueueStore']>;
|
|
310
|
-
module "packages/sdk-web-interfaces/src/index" {
|
|
311
|
-
interface StreamLayerContext {
|
|
312
|
-
notifications: Notifications;
|
|
313
|
-
addNotification: Notifications['add'];
|
|
314
|
-
}
|
|
315
|
-
interface StreamLayerSDK {
|
|
316
|
-
getNotificationsStore: Notifications['getQueueStore'];
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* notifications plugin, connect notifications to sdk
|
|
321
|
-
*/
|
|
322
|
-
export const notifications: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
|
|
323
|
-
}
|
|
324
|
-
declare module "packages/react-ui/src/lib/notifications/notification/question-inapp/styles" {
|
|
325
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
326
|
-
export const IconWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
327
|
-
export const Icon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
328
|
-
export const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
329
|
-
export const TitleWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
330
|
-
export const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
331
|
-
export const CloseBtnWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
332
|
-
export const CloseBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
333
|
-
export const CloseIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
334
|
-
}
|
|
335
|
-
declare module "packages/react-ui/src/lib/notifications/notification/question-inapp/index" {
|
|
336
|
-
import type { Notification } from "packages/sdk-web-notifications/src/index";
|
|
337
|
-
export const QuestionInApp: React.FC<Notification>;
|
|
338
|
-
}
|
|
339
|
-
declare module "packages/react-ui/src/lib/theme/constants" {
|
|
340
|
-
export const COLORS: {
|
|
341
|
-
BG_TRANSPARENT: string;
|
|
342
|
-
BG_TRANSPARENT_VOTE_CONTAINER: string;
|
|
343
|
-
BG_TRANSPARENT_ITEM: string;
|
|
344
|
-
BG_TRANSPARENT_ITEM_VOTE: string;
|
|
345
|
-
BG_TRANSPARENT_ITEM_SUCCESS: string;
|
|
346
|
-
BG_TRANSPARENT_ITEM_ERROR: string;
|
|
347
|
-
BG_TRANSPARENT_VOTE_PROGRESS: string;
|
|
348
|
-
BG_TRANSPARENT_VOTE_PROGRESS_SUCCESS: string;
|
|
349
|
-
BG_TRANSPARENT_VOTE_PROGRESS_ERROR: string;
|
|
350
|
-
BG_TRANSPARENT_USER_CONTAINER: string;
|
|
351
|
-
BG_TRANSPARENT_ONBOARDING_INAPP: string;
|
|
352
|
-
BLUE_PRIMARY: string;
|
|
353
|
-
RED_PRIMARY: string;
|
|
354
|
-
RED_SECONDARY: string;
|
|
355
|
-
BLUE_QUESTION_ACTION_BTN: string;
|
|
356
|
-
WHITE: string;
|
|
357
|
-
GREY_1: string;
|
|
358
|
-
GREY_2: string;
|
|
359
|
-
GREY_3: string;
|
|
360
|
-
GREY_4: string;
|
|
361
|
-
GREY_PRIMARY_ONBOARDING_INAPP: string;
|
|
362
|
-
BLACK_1: string;
|
|
363
|
-
GREEN_1: string;
|
|
364
|
-
RED_1: string;
|
|
365
|
-
RED_2: string;
|
|
366
|
-
GREY_PRIMARY: string;
|
|
367
|
-
DIVIDER_COLOR_PRIMARY: string;
|
|
368
|
-
DIVIDER_COLOR_SECONDARY: string;
|
|
369
|
-
GREEN_PRIMARY_BTN: string;
|
|
370
|
-
};
|
|
371
|
-
export const FONT: {
|
|
372
|
-
FAMILY: string;
|
|
373
|
-
COLOR: string;
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
declare module "packages/react-ui/src/lib/gamification/vote/components/voting-header/components/timer/styles" {
|
|
377
|
-
export const RemainingTime: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
378
|
-
}
|
|
379
|
-
declare module "packages/react-ui/src/lib/gamification/vote/components/voting-header/components/timer/index" {
|
|
380
|
-
import React from 'react';
|
|
381
|
-
interface TimerProps {
|
|
382
|
-
isPlaying?: boolean;
|
|
383
|
-
duration?: number;
|
|
384
|
-
setTimeToExpire: (flag: boolean) => void;
|
|
385
|
-
}
|
|
386
|
-
export const Timer: React.FC<TimerProps>;
|
|
387
|
-
}
|
|
388
|
-
declare module "packages/react-ui/src/utils/login" {
|
|
389
|
-
export const requestLoginCode: (host: string, phone: string) => Promise<boolean>;
|
|
390
|
-
export const register: (host: string, phone: string) => Promise<boolean>;
|
|
391
|
-
export const login: (host: string, phone: string, code: string) => Promise<string | undefined>;
|
|
392
|
-
}
|
|
393
|
-
declare module "packages/react-ui/src/lib/login/styles" {
|
|
394
|
-
export const Panel: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
395
|
-
export const Form: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLFormElement> & import("react").FormHTMLAttributes<HTMLFormElement> & Record<never, unknown>>;
|
|
396
|
-
export const FormTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
397
|
-
export const FormDescription: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
398
|
-
export const FormSubmit: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
399
|
-
export const FormInputContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
400
|
-
export const Digits: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
401
|
-
}
|
|
402
|
-
declare module "packages/react-ui/src/lib/login/index" {
|
|
403
|
-
export const Login: React.FC<{
|
|
404
|
-
login: (token: string) => Promise<void>;
|
|
405
|
-
anonymousLogin?: () => Promise<void>;
|
|
406
|
-
host: string;
|
|
407
|
-
}>;
|
|
408
|
-
}
|
|
409
|
-
declare module "packages/sdk-web-api/src/utils/devtools" {
|
|
410
|
-
export const __GRPC_DEVTOOLS_EXTENSION__: any;
|
|
411
|
-
}
|
|
412
|
-
declare module "packages/sdk-web-api/src/grpc/transport" {
|
|
413
|
-
import { createRouterTransport, ConnectRouter, Interceptor, PromiseClient, CallbackClient, UnaryRequest, StreamRequest } from '@connectrpc/connect';
|
|
414
|
-
import type { ServiceType, Message, PlainMessage } from '@bufbuild/protobuf';
|
|
415
|
-
import { createGrpcWebTransport } from '@connectrpc/connect-web';
|
|
416
|
-
import type { KeyInput } from '@nanostores/query';
|
|
417
|
-
import { nanoquery } from '@nanostores/query';
|
|
418
|
-
import { Atom } from 'nanostores';
|
|
419
|
-
import { ServerStreamSubscription, type ServerStreamSubscriptionOptions } from "packages/sdk-web-api/src/grpc/subscription";
|
|
420
|
-
type KnownHeaders = {
|
|
421
|
-
authorization?: string;
|
|
422
|
-
sdk?: string;
|
|
423
|
-
'sl-device-id': string;
|
|
424
|
-
} & Record<string, string>;
|
|
425
|
-
export type GrpcTransport = Transport['transport'];
|
|
426
|
-
type ReservedHeaders = 'sdk' | 'authorization';
|
|
427
|
-
type ExcludeReservedHeaders<T> = ReservedHeaders extends T ? never : T extends ReservedHeaders ? never : T;
|
|
428
|
-
global {
|
|
429
|
-
interface Window {
|
|
430
|
-
__GRPC_DEVTOOLS_EXTENSION__?: () => import('@connectrpc/connect').Interceptor;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
type NanoqueryReturnType = ReturnType<typeof nanoquery>;
|
|
434
|
-
type NanoqueryObjectType = {
|
|
435
|
-
createFetcherStore: NanoqueryReturnType[0];
|
|
436
|
-
createMutatorStore: NanoqueryReturnType[1];
|
|
437
|
-
utils: NanoqueryReturnType[2];
|
|
438
|
-
};
|
|
439
|
-
/**
|
|
440
|
-
* transport wrapper, initialize grpc transport, store headers and connect interceptors
|
|
441
|
-
*/
|
|
442
|
-
export class Transport {
|
|
443
|
-
toJsonOptions: {
|
|
444
|
-
emitDefaultValues: boolean;
|
|
445
|
-
enumAsInteger: boolean;
|
|
446
|
-
useProtoFieldName: boolean;
|
|
447
|
-
};
|
|
448
|
-
readonly transport: ReturnType<typeof createGrpcWebTransport>;
|
|
449
|
-
readonly nanoquery: NanoqueryObjectType;
|
|
450
|
-
readonly host: string;
|
|
451
|
-
protected interceptors: Interceptor[];
|
|
452
|
-
private readonly $headers;
|
|
453
|
-
private clients;
|
|
454
|
-
private callbackClients;
|
|
455
|
-
private subscriptions;
|
|
456
|
-
constructor(host: string);
|
|
457
|
-
addSubscription: <T extends ServiceType, Req extends Message<Req>, Res extends Message<Res>>(method: CallbackClient<T>[import("packages/sdk-web-api/src/grpc/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("packages/sdk-web-api/src/grpc/subscription").StreamMethod<T>, CallbackClient<T>[import("packages/sdk-web-api/src/grpc/subscription").StreamMethod<T>]>;
|
|
458
|
-
removeSubscription: (subscription: ServerStreamSubscription<ServiceType, Message, Message>) => void;
|
|
459
|
-
disconnect: () => void;
|
|
460
|
-
registerInterceptor: (interceptor: Interceptor) => void;
|
|
461
|
-
removeInterceptor: (interceptor: Interceptor) => void;
|
|
462
|
-
getClient: <T extends ServiceType>(service: T) => PromiseClient<T>;
|
|
463
|
-
getCallbackClient: <T extends ServiceType>(service: T) => CallbackClient<T>;
|
|
464
|
-
createPromiseClient: <T extends ServiceType>(service: T, { params, method }: {
|
|
465
|
-
params?: KeyInput | undefined;
|
|
466
|
-
method: keyof T["methods"];
|
|
467
|
-
}) => {
|
|
468
|
-
client: PromiseClient<T>;
|
|
469
|
-
queryKey: ((string | number) | import("nanostores").ReadableAtom<(string | number) | (void | null | undefined)>)[];
|
|
470
|
-
queryKeyStr: string;
|
|
471
|
-
};
|
|
472
|
-
createCallbackClient: <T extends ServiceType>(service: T) => {
|
|
473
|
-
client: CallbackClient<T>;
|
|
474
|
-
};
|
|
475
|
-
setSdkKey: (sdkKey: string) => void;
|
|
476
|
-
setAuth: (token?: string) => void;
|
|
477
|
-
setHeader: <T extends string = string>(name: ExcludeReservedHeaders<T>, value: string) => void;
|
|
478
|
-
getHeader: (name: keyof KnownHeaders) => string;
|
|
479
|
-
getHeaders: () => KnownHeaders;
|
|
480
|
-
initInterceptors: () => void;
|
|
481
|
-
}
|
|
482
|
-
export class MockTransport extends Transport {
|
|
483
|
-
transport: ReturnType<typeof createRouterTransport>;
|
|
484
|
-
calls: Array<UnaryRequest | StreamRequest>;
|
|
485
|
-
constructor(transport: (router: ConnectRouter) => void);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
declare module "packages/sdk-web-api/src/grpc/subscription" {
|
|
489
|
-
import { CallbackClient } from '@connectrpc/connect';
|
|
490
|
-
import { Atom } from 'nanostores';
|
|
491
|
-
import type { ServiceType, Message, PlainMessage, MethodInfoServerStreaming } from '@bufbuild/protobuf';
|
|
492
|
-
import { Transport } from "packages/sdk-web-api/src/grpc/transport";
|
|
493
|
-
type StreamMethods<T extends ServiceType> = {
|
|
494
|
-
[P in keyof CallbackClient<T> as T['methods'][P] extends MethodInfoServerStreaming<any, any> ? P : never]: P;
|
|
495
|
-
};
|
|
496
|
-
export type StreamMethod<T extends ServiceType> = StreamMethods<T>[keyof StreamMethods<T>] extends keyof CallbackClient<T> ? StreamMethods<T>[keyof StreamMethods<T>] : never;
|
|
497
|
-
enum ServerStreamSubscriptionStatus {
|
|
498
|
-
Init = "init",
|
|
499
|
-
Ready = "ready",
|
|
500
|
-
Connecting = "connecting",
|
|
501
|
-
Connected = "connected",
|
|
502
|
-
Disconnected = "disconnected",
|
|
503
|
-
Failed = "failed",
|
|
504
|
-
Reconnecting = "reconnecting"
|
|
505
|
-
}
|
|
506
|
-
export type ServerStreamSubscriptionOptions = {
|
|
507
|
-
name: string;
|
|
508
|
-
withStore?: boolean;
|
|
509
|
-
};
|
|
510
|
-
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]> {
|
|
511
|
-
params: Atom<PlainMessage<Request>> | PlainMessage<Request>;
|
|
512
|
-
private stream?;
|
|
513
|
-
private method;
|
|
514
|
-
private name;
|
|
515
|
-
private headers;
|
|
516
|
-
private listeners;
|
|
517
|
-
private state;
|
|
518
|
-
private store?;
|
|
519
|
-
constructor(headers: Transport['$headers'], method: Method, params: Atom<PlainMessage<Request>> | PlainMessage<Request>, options: ServerStreamSubscriptionOptions);
|
|
520
|
-
updateState: (status: ServerStreamSubscriptionStatus) => void;
|
|
521
|
-
addStateLog: (msg: string) => void;
|
|
522
|
-
addListener: (name: string, listener: (response: Response) => void) => boolean;
|
|
523
|
-
removeListener: (name: string) => void;
|
|
524
|
-
connect: () => void;
|
|
525
|
-
disconnect: () => void;
|
|
526
|
-
reconnect: () => void;
|
|
527
|
-
getStore: () => import("nanostores").WritableAtom<Response | null | undefined> | undefined;
|
|
528
|
-
private onData;
|
|
529
|
-
private onStreamError;
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
declare module "packages/sdk-web-api/src/grpc/queries/event" {
|
|
533
|
-
import { ReadableAtom } from 'nanostores';
|
|
534
|
-
import { Transport } from "packages/sdk-web-api/src/grpc/transport";
|
|
535
|
-
export const $retrieveEventId: ($providerStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<string, any>;
|
|
536
|
-
export const $streamSettings: (slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings | undefined, any>;
|
|
537
|
-
}
|
|
538
|
-
declare module "packages/sdk-web-api/src/grpc/queries/user" {
|
|
539
|
-
import { ReadableAtom } from 'nanostores';
|
|
540
|
-
import type { BypassAuthRequest, BypassAuthResponse } from '@streamlayer/sl-eslib/users/users_pb';
|
|
541
|
-
import { PlainMessage } from '@bufbuild/protobuf';
|
|
542
|
-
import { Transport } from "packages/sdk-web-api/src/grpc/transport";
|
|
543
|
-
export const $user: ($userToken: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse, any>;
|
|
544
|
-
export const $bypassLogin: (transport: Transport) => import("@nanostores/query").MutatorStore<PlainMessage<BypassAuthRequest>, PlainMessage<BypassAuthResponse>, any>;
|
|
545
|
-
export const bypassAuth: (transport: Transport, params: {
|
|
546
|
-
userKey?: string;
|
|
547
|
-
schema?: string;
|
|
548
|
-
init?: boolean;
|
|
549
|
-
}) => Promise<BypassAuthResponse>;
|
|
550
|
-
export const $userSettings: ($userToken: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings | undefined, any>;
|
|
551
|
-
export const register: (transport: Transport, phone: string) => Promise<import("@streamlayer/sl-eslib/users/users_pb").RegisterResponse>;
|
|
552
|
-
}
|
|
553
|
-
declare module "packages/sdk-web-api/src/grpc/queries/organization" {
|
|
554
|
-
import { ReadableAtom } from 'nanostores';
|
|
555
|
-
import { Transport } from "packages/sdk-web-api/src/grpc/transport";
|
|
556
|
-
export { $user } from "packages/sdk-web-api/src/grpc/queries/user";
|
|
557
|
-
export const $organizationSettings: ($enabled: ReadableAtom<'on' | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<{
|
|
558
|
-
id: string;
|
|
559
|
-
overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
|
|
560
|
-
buttonIcon?: string | undefined;
|
|
561
|
-
tinodeHost?: string | undefined;
|
|
562
|
-
audience?: string | undefined;
|
|
563
|
-
name?: string | undefined;
|
|
564
|
-
provider?: string | undefined;
|
|
565
|
-
primaryColor?: string | undefined;
|
|
566
|
-
secondaryColor?: string | undefined;
|
|
567
|
-
moderationPrimaryColor?: string | undefined;
|
|
568
|
-
linkShareIcon?: string | undefined;
|
|
569
|
-
linkShareText?: string | undefined;
|
|
570
|
-
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
|
|
571
|
-
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
|
|
572
|
-
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
|
|
573
|
-
} | undefined, any>;
|
|
574
|
-
export const $organizationAdvertising: ($enabled: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising | undefined, any>;
|
|
575
|
-
}
|
|
576
|
-
declare module "packages/sdk-web-api/src/grpc/queries/index" {
|
|
577
|
-
export * from "packages/sdk-web-api/src/grpc/queries/event";
|
|
578
|
-
export * from "packages/sdk-web-api/src/grpc/queries/organization";
|
|
579
|
-
export * from "packages/sdk-web-api/src/grpc/queries/user";
|
|
580
|
-
}
|
|
581
|
-
declare module "packages/sdk-web-api/src/index" {
|
|
582
|
-
import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
|
|
583
|
-
import { FetcherStore } from '@nanostores/query';
|
|
584
|
-
export type { ServerStreamSubscriptionOptions } from "packages/sdk-web-api/src/grpc/subscription";
|
|
585
|
-
export { Transport } from "packages/sdk-web-api/src/grpc/transport";
|
|
586
|
-
import { Transport } from "packages/sdk-web-api/src/grpc/transport";
|
|
587
|
-
export type { GrpcTransport } from "packages/sdk-web-api/src/grpc/transport";
|
|
588
|
-
export * as queries from "packages/sdk-web-api/src/grpc/queries/index";
|
|
589
|
-
export type GetApiResponseType<T extends (...args: any[]) => FetcherStore> = ReturnType<ReturnType<T>['get']>['data'];
|
|
590
|
-
module "packages/sdk-web-interfaces/src/index" {
|
|
591
|
-
interface StreamLayerSDK {
|
|
592
|
-
host: string;
|
|
593
|
-
}
|
|
594
|
-
interface StreamLayerContext {
|
|
595
|
-
transport: Transport;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
export const transport: (instance: StreamLayerContext, opts: {
|
|
599
|
-
sdkKey: string;
|
|
600
|
-
host: string;
|
|
601
|
-
}, done: () => void) => void;
|
|
602
|
-
}
|
|
603
|
-
declare module "packages/sdk-web-core/src/storage" {
|
|
604
|
-
import { Storage } from "packages/sdk-web-storage/src/index";
|
|
605
|
-
export class UserStorage extends Storage {
|
|
606
|
-
constructor();
|
|
607
|
-
setSchema: (value: string) => void;
|
|
608
|
-
getSchema: () => string | undefined;
|
|
609
|
-
setToken: (value: string) => void;
|
|
610
|
-
getToken: () => string | undefined;
|
|
611
|
-
removeToken: () => void;
|
|
612
|
-
clearNotification: () => void;
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
declare module "packages/sdk-web-core/src/store/store" {
|
|
616
|
-
import type { OrganizationAdvertising, StreamSettings, OrganizationSettings, User, UserSettings } from "packages/sdk-web-types/src/index";
|
|
617
|
-
import { AbstractStore, SingleStore, ApiStore } from "packages/sdk-web-interfaces/src/index";
|
|
618
|
-
import { Transport } from "packages/sdk-web-api/src/index";
|
|
619
|
-
import { ReadableAtom } from 'nanostores';
|
|
620
|
-
import { FetcherValue } from '@nanostores/query';
|
|
621
|
-
export enum CoreStatus {
|
|
622
|
-
DISABLED = "disabled",
|
|
623
|
-
INITIALIZATION = "initialization",
|
|
624
|
-
READY = "ready",
|
|
625
|
-
FAILED = "failed",
|
|
626
|
-
SUSPENDED = "suspended"
|
|
627
|
-
}
|
|
628
|
-
export interface CoreStoreInterface {
|
|
629
|
-
enabled?: 'on';
|
|
630
|
-
status: string;
|
|
631
|
-
userKey?: string;
|
|
632
|
-
userToken?: string;
|
|
633
|
-
organizationSettings?: OrganizationSettings & {
|
|
634
|
-
id: string;
|
|
635
|
-
};
|
|
636
|
-
organizationAdvertising?: OrganizationAdvertising;
|
|
637
|
-
streamSettings?: StreamSettings;
|
|
638
|
-
user?: User;
|
|
639
|
-
userSettings?: UserSettings;
|
|
640
|
-
providerStreamId?: string;
|
|
641
|
-
slStreamId?: string;
|
|
642
|
-
}
|
|
643
|
-
const initializeStore: (transport: Transport) => {
|
|
644
|
-
readonly enabled: SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
|
|
645
|
-
readonly status: SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus | undefined>>;
|
|
646
|
-
readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
647
|
-
readonly slStreamId: ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined>>;
|
|
648
|
-
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>>;
|
|
649
|
-
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>>;
|
|
650
|
-
readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
651
|
-
readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
652
|
-
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>>;
|
|
653
|
-
readonly organizationSettings: ApiStore<{
|
|
654
|
-
id: string;
|
|
655
|
-
overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
|
|
656
|
-
buttonIcon?: string | undefined;
|
|
657
|
-
tinodeHost?: string | undefined;
|
|
658
|
-
audience?: string | undefined;
|
|
659
|
-
name?: string | undefined;
|
|
660
|
-
provider?: string | undefined;
|
|
661
|
-
primaryColor?: string | undefined;
|
|
662
|
-
secondaryColor?: string | undefined;
|
|
663
|
-
moderationPrimaryColor?: string | undefined;
|
|
664
|
-
linkShareIcon?: string | undefined;
|
|
665
|
-
linkShareText?: string | undefined;
|
|
666
|
-
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
|
|
667
|
-
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
|
|
668
|
-
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
|
|
669
|
-
} | undefined, import("@nanostores/query").FetcherStore<{
|
|
670
|
-
id: string;
|
|
671
|
-
overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
|
|
672
|
-
buttonIcon?: string | undefined;
|
|
673
|
-
tinodeHost?: string | undefined;
|
|
674
|
-
audience?: string | undefined;
|
|
675
|
-
name?: string | undefined;
|
|
676
|
-
provider?: string | undefined;
|
|
677
|
-
primaryColor?: string | undefined;
|
|
678
|
-
secondaryColor?: string | undefined;
|
|
679
|
-
moderationPrimaryColor?: string | undefined;
|
|
680
|
-
linkShareIcon?: string | undefined;
|
|
681
|
-
linkShareText?: string | undefined;
|
|
682
|
-
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
|
|
683
|
-
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
|
|
684
|
-
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
|
|
685
|
-
} | undefined>>;
|
|
686
|
-
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>>;
|
|
687
|
-
};
|
|
688
|
-
export type StoreObj = ReturnType<typeof initializeStore>;
|
|
689
|
-
export type CoreStores = {
|
|
690
|
-
[Index in keyof StoreObj]: ReturnType<StoreObj[Index]['getStore']>;
|
|
691
|
-
};
|
|
692
|
-
export type CoreStoresValues = {
|
|
693
|
-
[Index in keyof StoreObj]: ReturnType<StoreObj[Index]['getStore']>['value'];
|
|
694
|
-
};
|
|
695
|
-
export type CoreStoreInstance = ReadableAtom<CoreStoresValues>;
|
|
696
|
-
/**
|
|
697
|
-
* @description main app store
|
|
698
|
-
*/
|
|
699
|
-
export class CoreStore extends AbstractStore<CoreStoreInstance> {
|
|
700
|
-
private stores;
|
|
701
|
-
constructor(transport: Transport);
|
|
702
|
-
getValue(): unknown;
|
|
703
|
-
getValues(): {
|
|
704
|
-
readonly enabled: SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
|
|
705
|
-
readonly status: SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus | undefined>>;
|
|
706
|
-
readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
707
|
-
readonly slStreamId: ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined>>;
|
|
708
|
-
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>>;
|
|
709
|
-
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>>;
|
|
710
|
-
readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
711
|
-
readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
|
|
712
|
-
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>>;
|
|
713
|
-
readonly organizationSettings: ApiStore<{
|
|
714
|
-
id: string;
|
|
715
|
-
overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
|
|
716
|
-
buttonIcon?: string | undefined;
|
|
717
|
-
tinodeHost?: string | undefined;
|
|
718
|
-
audience?: string | undefined;
|
|
719
|
-
name?: string | undefined;
|
|
720
|
-
provider?: string | undefined;
|
|
721
|
-
primaryColor?: string | undefined;
|
|
722
|
-
secondaryColor?: string | undefined;
|
|
723
|
-
moderationPrimaryColor?: string | undefined;
|
|
724
|
-
linkShareIcon?: string | undefined;
|
|
725
|
-
linkShareText?: string | undefined;
|
|
726
|
-
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
|
|
727
|
-
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
|
|
728
|
-
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
|
|
729
|
-
} | undefined, import("@nanostores/query").FetcherStore<{
|
|
730
|
-
id: string;
|
|
731
|
-
overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
|
|
732
|
-
buttonIcon?: string | undefined;
|
|
733
|
-
tinodeHost?: string | undefined;
|
|
734
|
-
audience?: string | undefined;
|
|
735
|
-
name?: string | undefined;
|
|
736
|
-
provider?: string | undefined;
|
|
737
|
-
primaryColor?: string | undefined;
|
|
738
|
-
secondaryColor?: string | undefined;
|
|
739
|
-
moderationPrimaryColor?: string | undefined;
|
|
740
|
-
linkShareIcon?: string | undefined;
|
|
741
|
-
linkShareText?: string | undefined;
|
|
742
|
-
brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
|
|
743
|
-
pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
|
|
744
|
-
getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
|
|
745
|
-
} | undefined>>;
|
|
746
|
-
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>>;
|
|
747
|
-
};
|
|
748
|
-
setValue(): void;
|
|
749
|
-
subscribe: (subscribes: Partial<StoreListeners>) => void;
|
|
750
|
-
unsubscribe: () => void;
|
|
751
|
-
}
|
|
752
|
-
export type StoreListeners = {
|
|
753
|
-
[Index in keyof StoreObj]: (params: FetcherValue<CoreStoreInterface[Index]>) => void;
|
|
754
|
-
};
|
|
755
|
-
}
|
|
756
|
-
declare module "packages/sdk-web-core/src/store/index" {
|
|
757
|
-
import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
|
|
758
|
-
import { CoreStore, CoreStores, StoreObj, CoreStoreInstance } from "packages/sdk-web-core/src/store/store";
|
|
759
|
-
module "packages/sdk-web-interfaces/src/index" {
|
|
760
|
-
interface StreamLayerSDK {
|
|
761
|
-
sdkStore: CoreStoreInstance;
|
|
762
|
-
organizationStore: () => CoreStores['organizationSettings'];
|
|
763
|
-
}
|
|
764
|
-
interface StreamLayerContext {
|
|
765
|
-
store: CoreStore;
|
|
766
|
-
stores: StoreObj;
|
|
767
|
-
storeSubscribe: () => void;
|
|
768
|
-
storeUnsubscribe: () => void;
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
/**
|
|
772
|
-
* store plugin, connect store to sdk
|
|
773
|
-
*/
|
|
774
|
-
export const store: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
|
|
775
|
-
}
|
|
776
|
-
declare module "packages/feature-gamification/src/queries/leaderboard" {
|
|
777
|
-
import type { Transport } from "packages/sdk-web-api/src/index";
|
|
778
|
-
import { ReadableAtom } from 'nanostores';
|
|
779
|
-
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>;
|
|
780
|
-
}
|
|
781
|
-
declare module "packages/feature-gamification/src/queries/moderation" {
|
|
782
|
-
import type { Transport } from "packages/sdk-web-api/src/index";
|
|
783
|
-
import { ReadableAtom } from 'nanostores';
|
|
784
|
-
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>;
|
|
785
|
-
}
|
|
786
|
-
declare module "packages/feature-gamification/src/queries/index" {
|
|
787
|
-
import type { Transport } from "packages/sdk-web-api/src/index";
|
|
788
|
-
import { ReadableAtom } from 'nanostores';
|
|
789
|
-
import type { SubscriptionRequest, SubscriptionResponse, VotingSubscriptionRequest, VotingSubscriptionResponse, QuestionSubscriptionRequest, QuestionSubscriptionResponse } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
|
|
790
|
-
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>;
|
|
791
|
-
export const feedSubscription: ($slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("packages/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("packages/sdk-web-api/src/grpc/subscription").ServerStreamSubscription<{
|
|
792
|
-
readonly typeName: "streamlayer.interactive.feed.Feed";
|
|
793
|
-
readonly methods: {
|
|
794
|
-
readonly get: {
|
|
795
|
-
readonly name: "Get";
|
|
796
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetRequest;
|
|
797
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetResponse;
|
|
798
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
799
|
-
};
|
|
800
|
-
readonly subscription: {
|
|
801
|
-
readonly name: "Subscription";
|
|
802
|
-
readonly I: typeof SubscriptionRequest;
|
|
803
|
-
readonly O: typeof SubscriptionResponse;
|
|
804
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
805
|
-
};
|
|
806
|
-
readonly votingSubscription: {
|
|
807
|
-
readonly name: "VotingSubscription";
|
|
808
|
-
readonly I: typeof VotingSubscriptionRequest;
|
|
809
|
-
readonly O: typeof VotingSubscriptionResponse;
|
|
810
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
811
|
-
};
|
|
812
|
-
readonly questionSubscription: {
|
|
813
|
-
readonly name: "QuestionSubscription";
|
|
814
|
-
readonly I: typeof QuestionSubscriptionRequest;
|
|
815
|
-
readonly O: typeof QuestionSubscriptionResponse;
|
|
816
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
817
|
-
};
|
|
818
|
-
readonly questionByUser: {
|
|
819
|
-
readonly name: "QuestionByUser";
|
|
820
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserRequest;
|
|
821
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserResponse;
|
|
822
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
823
|
-
};
|
|
824
|
-
readonly syncQuestion: {
|
|
825
|
-
readonly name: "SyncQuestion";
|
|
826
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionRequest;
|
|
827
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionResponse;
|
|
828
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
829
|
-
};
|
|
830
|
-
readonly getQuestion: {
|
|
831
|
-
readonly name: "GetQuestion";
|
|
832
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionRequest;
|
|
833
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionResponse;
|
|
834
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
835
|
-
};
|
|
836
|
-
readonly questionDetail: {
|
|
837
|
-
readonly name: "QuestionDetail";
|
|
838
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailRequest;
|
|
839
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailResponse;
|
|
840
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
841
|
-
};
|
|
842
|
-
readonly submitAnswer: {
|
|
843
|
-
readonly name: "SubmitAnswer";
|
|
844
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerRequest;
|
|
845
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerResponse;
|
|
846
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
847
|
-
};
|
|
848
|
-
readonly submitInplay: {
|
|
849
|
-
readonly name: "SubmitInplay";
|
|
850
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayRequest;
|
|
851
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayResponse;
|
|
852
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
853
|
-
};
|
|
854
|
-
readonly skipQuestion: {
|
|
855
|
-
readonly name: "SkipQuestion";
|
|
856
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionRequest;
|
|
857
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse;
|
|
858
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
859
|
-
};
|
|
860
|
-
readonly pickHistory: {
|
|
861
|
-
readonly name: "PickHistory";
|
|
862
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryRequest;
|
|
863
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryResponse;
|
|
864
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
865
|
-
};
|
|
866
|
-
readonly insightHistory: {
|
|
867
|
-
readonly name: "InsightHistory";
|
|
868
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryRequest;
|
|
869
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryResponse;
|
|
870
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
871
|
-
};
|
|
872
|
-
readonly tweetHistory: {
|
|
873
|
-
readonly name: "TweetHistory";
|
|
874
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryRequest;
|
|
875
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryResponse;
|
|
876
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
877
|
-
};
|
|
878
|
-
readonly promotionHistory: {
|
|
879
|
-
readonly name: "PromotionHistory";
|
|
880
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryRequest;
|
|
881
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryResponse;
|
|
882
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
883
|
-
};
|
|
884
|
-
};
|
|
885
|
-
}, SubscriptionRequest, SubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription", ((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)>;
|
|
886
|
-
export const votingSubscription: (params: {
|
|
887
|
-
questionId: string;
|
|
888
|
-
feedId: string;
|
|
889
|
-
}, transport: Transport) => import("packages/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("packages/sdk-web-api/src/grpc/subscription").ServerStreamSubscription<{
|
|
890
|
-
readonly typeName: "streamlayer.interactive.feed.Feed";
|
|
891
|
-
readonly methods: {
|
|
892
|
-
readonly get: {
|
|
893
|
-
readonly name: "Get";
|
|
894
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetRequest;
|
|
895
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetResponse;
|
|
896
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
897
|
-
};
|
|
898
|
-
readonly subscription: {
|
|
899
|
-
readonly name: "Subscription";
|
|
900
|
-
readonly I: typeof SubscriptionRequest;
|
|
901
|
-
readonly O: typeof SubscriptionResponse;
|
|
902
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
903
|
-
};
|
|
904
|
-
readonly votingSubscription: {
|
|
905
|
-
readonly name: "VotingSubscription";
|
|
906
|
-
readonly I: typeof VotingSubscriptionRequest;
|
|
907
|
-
readonly O: typeof VotingSubscriptionResponse;
|
|
908
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
909
|
-
};
|
|
910
|
-
readonly questionSubscription: {
|
|
911
|
-
readonly name: "QuestionSubscription";
|
|
912
|
-
readonly I: typeof QuestionSubscriptionRequest;
|
|
913
|
-
readonly O: typeof QuestionSubscriptionResponse;
|
|
914
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
915
|
-
};
|
|
916
|
-
readonly questionByUser: {
|
|
917
|
-
readonly name: "QuestionByUser";
|
|
918
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserRequest;
|
|
919
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserResponse;
|
|
920
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
921
|
-
};
|
|
922
|
-
readonly syncQuestion: {
|
|
923
|
-
readonly name: "SyncQuestion";
|
|
924
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionRequest;
|
|
925
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionResponse;
|
|
926
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
927
|
-
};
|
|
928
|
-
readonly getQuestion: {
|
|
929
|
-
readonly name: "GetQuestion";
|
|
930
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionRequest;
|
|
931
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionResponse;
|
|
932
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
933
|
-
};
|
|
934
|
-
readonly questionDetail: {
|
|
935
|
-
readonly name: "QuestionDetail";
|
|
936
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailRequest;
|
|
937
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailResponse;
|
|
938
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
939
|
-
};
|
|
940
|
-
readonly submitAnswer: {
|
|
941
|
-
readonly name: "SubmitAnswer";
|
|
942
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerRequest;
|
|
943
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerResponse;
|
|
944
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
945
|
-
};
|
|
946
|
-
readonly submitInplay: {
|
|
947
|
-
readonly name: "SubmitInplay";
|
|
948
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayRequest;
|
|
949
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayResponse;
|
|
950
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
951
|
-
};
|
|
952
|
-
readonly skipQuestion: {
|
|
953
|
-
readonly name: "SkipQuestion";
|
|
954
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionRequest;
|
|
955
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse;
|
|
956
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
957
|
-
};
|
|
958
|
-
readonly pickHistory: {
|
|
959
|
-
readonly name: "PickHistory";
|
|
960
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryRequest;
|
|
961
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryResponse;
|
|
962
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
963
|
-
};
|
|
964
|
-
readonly insightHistory: {
|
|
965
|
-
readonly name: "InsightHistory";
|
|
966
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryRequest;
|
|
967
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryResponse;
|
|
968
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
969
|
-
};
|
|
970
|
-
readonly tweetHistory: {
|
|
971
|
-
readonly name: "TweetHistory";
|
|
972
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryRequest;
|
|
973
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryResponse;
|
|
974
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
975
|
-
};
|
|
976
|
-
readonly promotionHistory: {
|
|
977
|
-
readonly name: "PromotionHistory";
|
|
978
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryRequest;
|
|
979
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryResponse;
|
|
980
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
981
|
-
};
|
|
982
|
-
};
|
|
983
|
-
}, VotingSubscriptionRequest, VotingSubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription", ((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)>;
|
|
984
|
-
export const questionSubscription: (questionId: string, transport: Transport) => import("packages/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("packages/sdk-web-api/src/grpc/subscription").ServerStreamSubscription<{
|
|
985
|
-
readonly typeName: "streamlayer.interactive.feed.Feed";
|
|
986
|
-
readonly methods: {
|
|
987
|
-
readonly get: {
|
|
988
|
-
readonly name: "Get";
|
|
989
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetRequest;
|
|
990
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetResponse;
|
|
991
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
992
|
-
};
|
|
993
|
-
readonly subscription: {
|
|
994
|
-
readonly name: "Subscription";
|
|
995
|
-
readonly I: typeof SubscriptionRequest;
|
|
996
|
-
readonly O: typeof SubscriptionResponse;
|
|
997
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
998
|
-
};
|
|
999
|
-
readonly votingSubscription: {
|
|
1000
|
-
readonly name: "VotingSubscription";
|
|
1001
|
-
readonly I: typeof VotingSubscriptionRequest;
|
|
1002
|
-
readonly O: typeof VotingSubscriptionResponse;
|
|
1003
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
1004
|
-
};
|
|
1005
|
-
readonly questionSubscription: {
|
|
1006
|
-
readonly name: "QuestionSubscription";
|
|
1007
|
-
readonly I: typeof QuestionSubscriptionRequest;
|
|
1008
|
-
readonly O: typeof QuestionSubscriptionResponse;
|
|
1009
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
1010
|
-
};
|
|
1011
|
-
readonly questionByUser: {
|
|
1012
|
-
readonly name: "QuestionByUser";
|
|
1013
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserRequest;
|
|
1014
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionByUserResponse;
|
|
1015
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1016
|
-
};
|
|
1017
|
-
readonly syncQuestion: {
|
|
1018
|
-
readonly name: "SyncQuestion";
|
|
1019
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionRequest;
|
|
1020
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SyncQuestionResponse;
|
|
1021
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1022
|
-
};
|
|
1023
|
-
readonly getQuestion: {
|
|
1024
|
-
readonly name: "GetQuestion";
|
|
1025
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionRequest;
|
|
1026
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").GetQuestionResponse;
|
|
1027
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1028
|
-
};
|
|
1029
|
-
readonly questionDetail: {
|
|
1030
|
-
readonly name: "QuestionDetail";
|
|
1031
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailRequest;
|
|
1032
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").QuestionDetailResponse;
|
|
1033
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1034
|
-
};
|
|
1035
|
-
readonly submitAnswer: {
|
|
1036
|
-
readonly name: "SubmitAnswer";
|
|
1037
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerRequest;
|
|
1038
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerResponse;
|
|
1039
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1040
|
-
};
|
|
1041
|
-
readonly submitInplay: {
|
|
1042
|
-
readonly name: "SubmitInplay";
|
|
1043
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayRequest;
|
|
1044
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayResponse;
|
|
1045
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1046
|
-
};
|
|
1047
|
-
readonly skipQuestion: {
|
|
1048
|
-
readonly name: "SkipQuestion";
|
|
1049
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionRequest;
|
|
1050
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse;
|
|
1051
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1052
|
-
};
|
|
1053
|
-
readonly pickHistory: {
|
|
1054
|
-
readonly name: "PickHistory";
|
|
1055
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryRequest;
|
|
1056
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistoryResponse;
|
|
1057
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1058
|
-
};
|
|
1059
|
-
readonly insightHistory: {
|
|
1060
|
-
readonly name: "InsightHistory";
|
|
1061
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryRequest;
|
|
1062
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").InsightHistoryResponse;
|
|
1063
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1064
|
-
};
|
|
1065
|
-
readonly tweetHistory: {
|
|
1066
|
-
readonly name: "TweetHistory";
|
|
1067
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryRequest;
|
|
1068
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").TweetHistoryResponse;
|
|
1069
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1070
|
-
};
|
|
1071
|
-
readonly promotionHistory: {
|
|
1072
|
-
readonly name: "PromotionHistory";
|
|
1073
|
-
readonly I: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryRequest;
|
|
1074
|
-
readonly O: typeof import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PromotionHistoryResponse;
|
|
1075
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1076
|
-
};
|
|
1077
|
-
};
|
|
1078
|
-
}, QuestionSubscriptionRequest, QuestionSubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription", ((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)>;
|
|
1079
|
-
export const getQuestionByUser: (questionId: string, transport: Transport) => Promise<import('./packages/sdk-web-types/src/index.ts').ExtendedQuestion | undefined>;
|
|
1080
|
-
export const $questionByUser: ($questionId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import('./packages/sdk-web-types/src/index.ts').ExtendedQuestion | undefined, any>;
|
|
1081
|
-
export const $pickHistory: (slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<(import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistory | undefined)[] | undefined, any>;
|
|
1082
|
-
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>;
|
|
1083
|
-
export { $userSummary } from "packages/feature-gamification/src/queries/leaderboard";
|
|
1084
|
-
export { $moderation } from "packages/feature-gamification/src/queries/moderation";
|
|
1085
|
-
}
|
|
1086
|
-
declare module "packages/feature-gamification/src/background" {
|
|
1087
|
-
import { ApiStore, type StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
|
|
1088
|
-
import type { GetApiResponseType } from "packages/sdk-web-api/src/index";
|
|
1089
|
-
import { ReadableAtom, WritableAtom } from 'nanostores';
|
|
1090
|
-
import * as queries from "packages/feature-gamification/src/queries/index";
|
|
1091
|
-
/**
|
|
1092
|
-
* get GamificationBackground singleton
|
|
1093
|
-
*/
|
|
1094
|
-
export const gamificationBackground: (instance: StreamLayerContext) => GamificationBackground;
|
|
1095
|
-
/**
|
|
1096
|
-
* Background Singleton class for Gamification and Highlights overlays
|
|
1097
|
-
*/
|
|
1098
|
-
export class GamificationBackground {
|
|
1099
|
-
/** sl event id */
|
|
1100
|
-
slStreamId: ReadableAtom<string | undefined>;
|
|
1101
|
-
/** organization id */
|
|
1102
|
-
organizationId: ReadableAtom<string | undefined>;
|
|
1103
|
-
/** current user id */
|
|
1104
|
-
userId: ReadableAtom<string | undefined>;
|
|
1105
|
-
/** opened question, using to download statistics */
|
|
1106
|
-
openedQuestionId: WritableAtom<string | undefined>;
|
|
1107
|
-
/** opened question statistics */
|
|
1108
|
-
openedQuestion: ApiStore<GetApiResponseType<typeof queries.$questionByUser>>;
|
|
1109
|
-
/** last active question in feed */
|
|
1110
|
-
activeQuestionId: ApiStore<GetApiResponseType<typeof queries.$activeQuestion>>;
|
|
1111
|
-
/** moderation id */
|
|
1112
|
-
moderationId: ReadableAtom<string | undefined>;
|
|
1113
|
-
/** moderation */
|
|
1114
|
-
moderation: ApiStore<GetApiResponseType<typeof queries.$moderation>>;
|
|
1115
|
-
/** feed subscription to receive new active question, update last active question */
|
|
1116
|
-
feedSubscription: ReturnType<typeof queries.feedSubscription>;
|
|
1117
|
-
/** subscription to opened question (vote percentage) */
|
|
1118
|
-
questionSubscription?: ReturnType<typeof queries.questionSubscription>;
|
|
1119
|
-
private notifications;
|
|
1120
|
-
private log;
|
|
1121
|
-
constructor(instance: StreamLayerContext);
|
|
1122
|
-
/**
|
|
1123
|
-
* Get id for notifications and link with current session
|
|
1124
|
-
* @param opts.prefix - id prefix (onboarding, question, tweet, ...etc)
|
|
1125
|
-
* @param opts.userId - current user id, if not presented get from sdk automatically
|
|
1126
|
-
* @param opts.eventId - current event id, if not presented get from sdk automatically
|
|
1127
|
-
* @param opts.organizationId - current organization id, if not presented get from sdk automatically
|
|
1128
|
-
* @param opts.entity - entity id (question id, tweet id, ...etc)
|
|
1129
|
-
*/
|
|
1130
|
-
getCurrentSessionId: (opts: {
|
|
1131
|
-
prefix?: string;
|
|
1132
|
-
userId?: string;
|
|
1133
|
-
eventId?: string;
|
|
1134
|
-
organizationId?: string;
|
|
1135
|
-
entity?: string;
|
|
1136
|
-
}) => string;
|
|
1137
|
-
disconnect: () => void;
|
|
1138
|
-
/**
|
|
1139
|
-
* Open question and mark notification for this question as viewed
|
|
1140
|
-
*/
|
|
1141
|
-
openQuestion: (questionId: string) => void;
|
|
1142
|
-
/**
|
|
1143
|
-
* Close question and mark notification for this question as viewed
|
|
1144
|
-
*/
|
|
1145
|
-
closeQuestion: (questionId?: string) => void;
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
declare module "packages/feature-gamification/src/queries/actions" {
|
|
1149
|
-
import type { Transport } from "packages/sdk-web-api/src/index";
|
|
1150
|
-
export const submitAnswer: (transport: Transport, data: {
|
|
1151
|
-
questionId: string;
|
|
1152
|
-
answerId: string;
|
|
1153
|
-
}) => Promise<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitAnswerResponse>;
|
|
1154
|
-
export const submitInplay: (transport: Transport, eventId: string) => Promise<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SubmitInplayResponse>;
|
|
1155
|
-
export const skipQuestion: (transport: Transport, questionId: string) => Promise<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse>;
|
|
1156
|
-
}
|
|
1157
|
-
declare module "packages/feature-gamification/src/storage" {
|
|
1158
|
-
import { Storage } from "packages/sdk-web-storage/src/index";
|
|
1159
|
-
import { OnboardingStatus } from "packages/feature-gamification/src/gamification";
|
|
1160
|
-
type UserProps = {
|
|
1161
|
-
userId: string;
|
|
1162
|
-
eventId: string;
|
|
1163
|
-
organizationId: string;
|
|
1164
|
-
};
|
|
1165
|
-
export class GamificationStorage extends Storage {
|
|
1166
|
-
constructor();
|
|
1167
|
-
saveOnboardingStatus: ({ userId, eventId, organizationId }: UserProps, status: OnboardingStatus) => void;
|
|
1168
|
-
getOnboardingStatus: ({ userId, eventId, organizationId }: UserProps) => string | undefined;
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
declare module "packages/feature-gamification/src/gamification" {
|
|
1172
|
-
import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps, type StreamLayerContext, createComputedStore } from "packages/sdk-web-interfaces/src/index";
|
|
1173
|
-
import { type GamesOverlaySettings, ExtendedQuestion } from "packages/sdk-web-types/src/index";
|
|
1174
|
-
import type { GetApiResponseType } from "packages/sdk-web-api/src/index";
|
|
1175
|
-
import type { PlainMessage } from '@bufbuild/protobuf';
|
|
1176
|
-
import { WritableAtom } from 'nanostores';
|
|
1177
|
-
import * as queries from "packages/feature-gamification/src/queries/index";
|
|
1178
|
-
/**
|
|
1179
|
-
* Required: in-app should be displayed and questions not available
|
|
1180
|
-
* Optional: in-app should be displayed but questions are available
|
|
1181
|
-
* Completed: user completed onboarding, cached in browser. Linked by eventId, organizationId and userId
|
|
1182
|
-
* Disabled: no in-app but questions are available
|
|
1183
|
-
* Unavailable: no in-app and questions not available [behavior is discussed]
|
|
1184
|
-
*/
|
|
1185
|
-
export enum OnboardingStatus {
|
|
1186
|
-
Unset = "unset",
|
|
1187
|
-
Required = "required",
|
|
1188
|
-
Optional = "optional",
|
|
1189
|
-
Completed = "completed",
|
|
1190
|
-
Disabled = "disabled",
|
|
1191
|
-
Unavailable = "unavailable"
|
|
1192
|
-
}
|
|
1193
|
-
/**
|
|
1194
|
-
* Gamification (Games) Overlay
|
|
1195
|
-
* Includes:
|
|
1196
|
-
* - questions list (pick history)
|
|
1197
|
-
* - active question (question from active queue, available from pick history and in-app)
|
|
1198
|
-
* - leaderboard (currently only global pinned leaderboard)
|
|
1199
|
-
* - user summary (current user summary)
|
|
1200
|
-
* - onboarding (welcome book)
|
|
1201
|
-
*/
|
|
1202
|
-
export class Gamification extends AbstractFeature<'games', PlainMessage<GamesOverlaySettings>> {
|
|
1203
|
-
/** user statistics (leaderboard panel) */
|
|
1204
|
-
userSummary?: ApiStore<GetApiResponseType<typeof queries.$userSummary>>;
|
|
1205
|
-
/** questions list (pick history) */
|
|
1206
|
-
questions?: ApiStore<GetApiResponseType<typeof queries.$pickHistory>>;
|
|
1207
|
-
/** pinned leaderboard id */
|
|
1208
|
-
leaderboardId: WritableAtom<string | undefined>;
|
|
1209
|
-
/** onboarding status */
|
|
1210
|
-
onboardingStatus: WritableAtom<OnboardingStatus | undefined>;
|
|
1211
|
-
/** opened question */
|
|
1212
|
-
openedQuestion: ReturnType<typeof createComputedStore<ExtendedQuestion | undefined>>;
|
|
1213
|
-
private notifications;
|
|
1214
|
-
private transport;
|
|
1215
|
-
private closeFeature;
|
|
1216
|
-
private openFeature;
|
|
1217
|
-
/** gamification background class, handle subscriptions and notifications for closed overlay */
|
|
1218
|
-
private background;
|
|
1219
|
-
/** Browser cache */
|
|
1220
|
-
private storage;
|
|
1221
|
-
constructor(config: FeatureProps, source: FeatureSource, instance: StreamLayerContext);
|
|
1222
|
-
/**
|
|
1223
|
-
* check onboarding status, sync with browser cache
|
|
1224
|
-
* retrieve onboarding settings from api
|
|
1225
|
-
*/
|
|
1226
|
-
onboardingProcess: () => Promise<void>;
|
|
1227
|
-
showOnboardingInApp: () => void;
|
|
1228
|
-
connect: (transport: StreamLayerContext['transport']) => void;
|
|
1229
|
-
disconnect: () => void;
|
|
1230
|
-
submitInplay: () => Promise<void>;
|
|
1231
|
-
submitAnswer: (questionId: string, answerId: string) => Promise<void>;
|
|
1232
|
-
skipQuestion: (questionId: string) => Promise<void>;
|
|
1233
|
-
openQuestion: (questionId: string) => void;
|
|
1234
|
-
closeQuestion: (questionId?: string) => void;
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
declare module "packages/feature-gamification/src/highlights" {
|
|
1238
|
-
import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps, type StreamLayerContext, createComputedStore } from "packages/sdk-web-interfaces/src/index";
|
|
1239
|
-
import { ExtendedQuestion } from "packages/sdk-web-types/src/index";
|
|
1240
|
-
import type { GetApiResponseType } from "packages/sdk-web-api/src/index";
|
|
1241
|
-
import * as queries from "packages/feature-gamification/src/queries/index";
|
|
1242
|
-
export class Highlights extends AbstractFeature<undefined> {
|
|
1243
|
-
insights?: ApiStore<GetApiResponseType<typeof queries.$insightHistory>>;
|
|
1244
|
-
closeFeature: () => void;
|
|
1245
|
-
openFeature: () => void;
|
|
1246
|
-
openedInsight: ReturnType<typeof createComputedStore<ExtendedQuestion | undefined>>;
|
|
1247
|
-
private notifications;
|
|
1248
|
-
private transport;
|
|
1249
|
-
private background;
|
|
1250
|
-
constructor(config: FeatureProps, source: FeatureSource, instance: StreamLayerContext);
|
|
1251
|
-
connect: () => void;
|
|
1252
|
-
disconnect: () => void;
|
|
1253
|
-
openHighlight: (questionId: string) => void;
|
|
1254
|
-
closeHighlight: (questionId?: string) => void;
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
declare module "packages/feature-gamification/src/index" {
|
|
1258
|
-
export { GamificationBackground, gamificationBackground } from "packages/feature-gamification/src/background";
|
|
1259
|
-
export { Gamification } from "packages/feature-gamification/src/gamification";
|
|
1260
|
-
export { Highlights } from "packages/feature-gamification/src/highlights";
|
|
1261
|
-
module "packages/sdk-web-interfaces/src/index" {
|
|
1262
|
-
interface StreamLayerContext {
|
|
1263
|
-
gamification: import("packages/feature-gamification/src/background").GamificationBackground;
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
declare module "packages/react-ui/src/lib/gamification/onboarding/styles" {
|
|
1268
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1269
|
-
export const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1270
|
-
export const OnboardingHeader: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1271
|
-
export const LeftBlock: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1272
|
-
export const RightBlock: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1273
|
-
export const GameIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1274
|
-
export const SponsorLogo: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1275
|
-
export const CloseBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1276
|
-
export const IconClose: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1277
|
-
export const OnboardingActionBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1278
|
-
}
|
|
1279
|
-
declare module "packages/react-ui/src/lib/gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles" {
|
|
1280
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1281
|
-
export const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1282
|
-
export const Graphic: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1283
|
-
export const Headline: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1284
|
-
}
|
|
1285
|
-
declare module "packages/react-ui/src/lib/gamification/onboarding/components/onboarding-slides/onboarding-instructions/index" {
|
|
1286
|
-
type OnboardingInstructionsProps = {
|
|
1287
|
-
graphic: string;
|
|
1288
|
-
headline: string;
|
|
1289
|
-
};
|
|
1290
|
-
export const OnboardingInstructions: React.FC<OnboardingInstructionsProps>;
|
|
1291
|
-
}
|
|
1292
|
-
declare module "packages/react-ui/src/lib/gamification/onboarding/components/onboarding-slides/onboarding-rules/styles" {
|
|
1293
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1294
|
-
export const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1295
|
-
export const RulesList: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1296
|
-
export const RulesItem: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1297
|
-
export const RuleNumber: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1298
|
-
export const RuleText: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1299
|
-
}
|
|
1300
|
-
declare module "packages/react-ui/src/lib/gamification/onboarding/components/onboarding-slides/onboarding-rules/index" {
|
|
1301
|
-
type OnboardingRulesProps = {
|
|
1302
|
-
rules?: string[];
|
|
1303
|
-
rulesTitle?: string;
|
|
1304
|
-
primaryColor?: string;
|
|
1305
|
-
};
|
|
1306
|
-
export const OnboardingRules: React.FC<OnboardingRulesProps>;
|
|
1307
|
-
}
|
|
1308
|
-
declare module "packages/react-ui/src/lib/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles" {
|
|
1309
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1310
|
-
export const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1311
|
-
export const InviteGameIconWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1312
|
-
export const InviteGameIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1313
|
-
export const Heading: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1314
|
-
export const Subtext: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1315
|
-
export const InviteBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1316
|
-
}
|
|
1317
|
-
declare module "packages/react-ui/src/lib/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index" {
|
|
1318
|
-
type OnboardingInviteCardProps = {
|
|
1319
|
-
inviteCardTitle?: string;
|
|
1320
|
-
inviteCardSubtext?: string;
|
|
1321
|
-
primaryColor?: string;
|
|
1322
|
-
};
|
|
1323
|
-
export const OnboardingInviteCard: React.FC<OnboardingInviteCardProps>;
|
|
1324
|
-
}
|
|
1325
|
-
declare module "packages/react-ui/src/lib/gamification/onboarding/index" {
|
|
1326
|
-
import type { Gamification } from "packages/feature-gamification/src/index";
|
|
1327
|
-
type OnboardingType = {
|
|
1328
|
-
gamification: Gamification;
|
|
1329
|
-
closeFeature: () => void;
|
|
1330
|
-
steps?: {
|
|
1331
|
-
graphic: string;
|
|
1332
|
-
headline: string;
|
|
1333
|
-
}[];
|
|
1334
|
-
gameIcon?: string;
|
|
1335
|
-
sponsorLogo?: string;
|
|
1336
|
-
rules?: string[];
|
|
1337
|
-
rulesBtnLabel?: string;
|
|
1338
|
-
rulesTitle?: string;
|
|
1339
|
-
primaryColor?: string;
|
|
1340
|
-
inviteCardTitle?: string;
|
|
1341
|
-
inviteCardSubtext?: string;
|
|
1342
|
-
inviteCardBtnLabel?: string;
|
|
1343
|
-
};
|
|
1344
|
-
export const Onboarding: React.FC<OnboardingType>;
|
|
1345
|
-
}
|
|
1346
|
-
declare module "packages/react-ui/src/lib/gamification/question/styles" {
|
|
1347
|
-
export const Panel: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1348
|
-
export const QuestionTypeIconWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1349
|
-
export const QuestionTypeIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1350
|
-
export const QuestionContent: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1351
|
-
export const QuestionTypeLabel: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1352
|
-
export const QuestionSubject: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1353
|
-
export const QuestionActionTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1354
|
-
export const QuestionActionIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1355
|
-
export const QuestionStatusIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1356
|
-
export const QuestionTypeTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
1357
|
-
export const ExpiredQuestion: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
1358
|
-
}
|
|
1359
|
-
declare module "packages/react-ui/src/lib/gamification/question/index" {
|
|
1360
|
-
import { type PickHistory } from "packages/sdk-web-types/src/index";
|
|
1361
|
-
export const Question: React.FC<{
|
|
1362
|
-
openQuestion?: (questionId: string) => void;
|
|
1363
|
-
} & PickHistory>;
|
|
1364
|
-
}
|
|
1365
|
-
declare module "packages/react-ui/src/lib/gamification/question-list/styles" {
|
|
1366
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1367
|
-
export const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1368
|
-
export const ItemsContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1369
|
-
}
|
|
1370
|
-
declare module "packages/react-ui/src/lib/gamification/question-list/index" {
|
|
1371
|
-
import type { PickHistory } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
|
|
1372
|
-
interface QuestionListProps {
|
|
1373
|
-
questions: PickHistory[];
|
|
1374
|
-
openQuestion: (questionId: string) => void;
|
|
1375
|
-
}
|
|
1376
|
-
export const QuestionList: React.FC<QuestionListProps>;
|
|
1377
|
-
}
|
|
1378
|
-
declare module "packages/react-ui/src/utils/common" {
|
|
1379
|
-
export const abbreviate: (name: string) => string;
|
|
1380
|
-
}
|
|
1381
|
-
declare module "packages/react-ui/src/lib/gamification/user-statistics/components/statistics/styles" {
|
|
1382
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1383
|
-
export const Indicator: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1384
|
-
}
|
|
1385
|
-
declare module "packages/react-ui/src/lib/gamification/user-statistics/components/statistics/index" {
|
|
1386
|
-
interface StatisticsProps {
|
|
1387
|
-
indicator: string | number;
|
|
1388
|
-
title: 'Win streak' | 'Correct' | 'Incorrect' | 'Success rate';
|
|
1389
|
-
}
|
|
1390
|
-
export const Statistics: React.FC<StatisticsProps>;
|
|
1391
|
-
}
|
|
1392
|
-
declare module "packages/react-ui/src/lib/gamification/user-statistics/components/rank/styles" {
|
|
1393
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1394
|
-
export const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1395
|
-
export const Indicator: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1396
|
-
}
|
|
1397
|
-
declare module "packages/react-ui/src/lib/gamification/user-statistics/components/rank/index" {
|
|
1398
|
-
interface RankProps {
|
|
1399
|
-
indicator: string | number;
|
|
1400
|
-
title: 'Friends rank' | 'Global rank';
|
|
1401
|
-
}
|
|
1402
|
-
export const Rank: React.FC<RankProps>;
|
|
1403
|
-
}
|
|
1404
|
-
declare module "packages/react-ui/src/lib/gamification/user-statistics/styles" {
|
|
1405
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1406
|
-
export const TopInfo: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1407
|
-
export const BottomInfo: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1408
|
-
export const User: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1409
|
-
export const Avatar: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1410
|
-
export const UserInfo: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1411
|
-
export const UserName: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1412
|
-
export const UserRating: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1413
|
-
export const TrophyIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1414
|
-
export const Rts: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1415
|
-
export const RtsIndicator: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1416
|
-
export const Top: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1417
|
-
export const Ranks: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1418
|
-
export const AvatarPlaceholder: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1419
|
-
export const UserAccountBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1420
|
-
}
|
|
1421
|
-
declare module "packages/react-ui/src/lib/gamification/user-statistics/index" {
|
|
1422
|
-
interface UserStatisticsProps {
|
|
1423
|
-
avatar: string;
|
|
1424
|
-
name: string;
|
|
1425
|
-
points: number;
|
|
1426
|
-
grade: string;
|
|
1427
|
-
friendsRank: number;
|
|
1428
|
-
globalRank: number;
|
|
1429
|
-
winStreak: number;
|
|
1430
|
-
correct: number;
|
|
1431
|
-
incorrect: number;
|
|
1432
|
-
successRate?: number;
|
|
1433
|
-
}
|
|
1434
|
-
export const UserStatistics: React.FC<UserStatisticsProps>;
|
|
1435
|
-
}
|
|
1436
|
-
declare module "packages/react-ui/src/lib/gamification/vote/components/voting-option/styles" {
|
|
1437
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1438
|
-
export const AnsweredContainer: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
1439
|
-
as?: import("react").ElementType<any> | undefined;
|
|
1440
|
-
}>;
|
|
1441
|
-
export const ButtonPct: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1442
|
-
export const Button: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1443
|
-
export const Icon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1444
|
-
export const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
1445
|
-
export const Indicators: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
1446
|
-
export const CheckIconWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1447
|
-
export const Percentage: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1448
|
-
export const CheckIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1449
|
-
}
|
|
1450
|
-
declare module "packages/react-ui/src/lib/gamification/vote/components/voting-option/index" {
|
|
1451
|
-
import { QuestionType } from "packages/sdk-web-types/src/index";
|
|
1452
|
-
interface VotingOptionProps {
|
|
1453
|
-
icon: string;
|
|
1454
|
-
title: string;
|
|
1455
|
-
id: string;
|
|
1456
|
-
questionId: string;
|
|
1457
|
-
percentage: number;
|
|
1458
|
-
disabled: boolean;
|
|
1459
|
-
correct: boolean;
|
|
1460
|
-
questionAnswered: boolean;
|
|
1461
|
-
hasCorrectAnswer: boolean;
|
|
1462
|
-
answered: boolean;
|
|
1463
|
-
points: number;
|
|
1464
|
-
questionType: QuestionType;
|
|
1465
|
-
onVote: (questionId: string, answerId: string) => void;
|
|
1466
|
-
toggleIsLoadingSubmitAnswer: (flag: boolean) => void;
|
|
1467
|
-
}
|
|
1468
|
-
export const VotingOption: React.FC<VotingOptionProps>;
|
|
1469
|
-
}
|
|
1470
|
-
declare module "packages/react-ui/src/lib/gamification/vote/styles" {
|
|
1471
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1472
|
-
export const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1473
|
-
export const Options: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1474
|
-
export const Loader: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1475
|
-
export const Feedback: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1476
|
-
export const FeedbackIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1477
|
-
export const FeedbackTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1478
|
-
export const FeedbackDescription: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1479
|
-
}
|
|
1480
|
-
declare module "packages/react-ui/src/lib/gamification/vote/index" {
|
|
1481
|
-
import { QuestionType } from "packages/sdk-web-types/src/index";
|
|
1482
|
-
interface VoteProps {
|
|
1483
|
-
title: string;
|
|
1484
|
-
questionId: string;
|
|
1485
|
-
options: any[];
|
|
1486
|
-
questionType: QuestionType;
|
|
1487
|
-
feedbackMessages: any;
|
|
1488
|
-
questionAnswered: boolean;
|
|
1489
|
-
questionAnsweredCorrectly?: boolean;
|
|
1490
|
-
}
|
|
1491
|
-
export const Vote: React.FC<VoteProps>;
|
|
1492
|
-
}
|
|
1493
|
-
declare module "packages/sdk-web-features/src/index" {
|
|
1494
|
-
import { FeatureType } from "packages/sdk-web-types/src/index";
|
|
1495
|
-
import { AbstractFeature, FeatureSource, FeatureProps, StreamLayerContext, SingleStore } from "packages/sdk-web-interfaces/src/index";
|
|
1496
|
-
import { Highlights, Gamification } from "packages/feature-gamification/src/index";
|
|
1497
|
-
export type Features = Feature | Gamification | Highlights;
|
|
1498
|
-
export const AvailableFeatures: {
|
|
1499
|
-
12: boolean;
|
|
1500
|
-
14: boolean;
|
|
1501
|
-
};
|
|
1502
|
-
export class Feature extends AbstractFeature<undefined> {
|
|
1503
|
-
constructor(overlay: FeatureProps, source: FeatureSource);
|
|
1504
|
-
}
|
|
1505
|
-
export const initFeature: (overlay: FeatureProps, source: FeatureSource, instance: StreamLayerContext) => Gamification | Highlights | Feature;
|
|
1506
|
-
export { FeatureSource } from "packages/sdk-web-interfaces/src/index";
|
|
1507
|
-
module "packages/sdk-web-interfaces/src/index" {
|
|
1508
|
-
interface StreamLayerContext {
|
|
1509
|
-
features: Map<FeatureType, Features>;
|
|
1510
|
-
initFeature: (overlay: FeatureProps, source: FeatureSource) => void;
|
|
1511
|
-
updateFeature: (overlay: FeatureProps, source: FeatureSource) => void;
|
|
1512
|
-
destroyFeature: (overlay: FeatureProps) => void;
|
|
1513
|
-
reinitializeFeatures: () => Promise<void>;
|
|
1514
|
-
activeFeature: SingleStore<FeatureType>;
|
|
1515
|
-
}
|
|
1516
|
-
interface StreamLayerSDK {
|
|
1517
|
-
getFeatures: () => Map<FeatureType, Features>;
|
|
1518
|
-
getFeature: <T extends FeatureType = FeatureType>(featureType: T) => (T extends FeatureType.GAMES ? Gamification : T extends FeatureType.HIGHLIGHTS ? Highlights : Feature) | undefined;
|
|
1519
|
-
getActiveFeature: SingleStore<FeatureType>['getStore'];
|
|
1520
|
-
closeFeature: () => void;
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
export const features: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
|
|
1524
|
-
}
|
|
1525
|
-
declare module "packages/sdk-web-core/src/auth/bypass/index" {
|
|
1526
|
-
import { AbstractAuthenticationProvider } from "packages/sdk-web-interfaces/src/index";
|
|
1527
|
-
import { Transport } from "packages/sdk-web-api/src/index";
|
|
1528
|
-
import { CoreStore } from "packages/sdk-web-core/src/store/store";
|
|
1529
|
-
/**
|
|
1530
|
-
* An authorization service manages user access by providing login, logout,
|
|
1531
|
-
* authentication checks, and the ability to revoke access.
|
|
1532
|
-
* Subscribed to $userStore and automatically updates the auth header for the Transport.
|
|
1533
|
-
*/
|
|
1534
|
-
export class BypassAuth extends AbstractAuthenticationProvider {
|
|
1535
|
-
private readonly $coreStore;
|
|
1536
|
-
private readonly transport;
|
|
1537
|
-
private readonly $bypassLogin;
|
|
1538
|
-
constructor(store: CoreStore, transport: Transport);
|
|
1539
|
-
me: () => Promise<import("@streamlayer/sl-eslib/users/users_common_pb").User | undefined>;
|
|
1540
|
-
login: (schema: string, userKey: string) => Promise<import("@streamlayer/sl-eslib/users/users_common_pb").User | undefined>;
|
|
1541
|
-
isAuthenticated: () => Promise<import("@streamlayer/sl-eslib/users/users_common_pb").User | undefined>;
|
|
1542
|
-
logout: () => void;
|
|
1543
|
-
/**
|
|
1544
|
-
* subscribe to user store and set auth header to the Transport on user update
|
|
1545
|
-
*/
|
|
1546
|
-
private subscribe;
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
declare module "packages/sdk-web-core/src/auth/index" {
|
|
1550
|
-
import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
|
|
1551
|
-
import { CoreStores } from "packages/sdk-web-core/src/store/store";
|
|
1552
|
-
import { BypassAuth } from "packages/sdk-web-core/src/auth/bypass/index";
|
|
1553
|
-
module "packages/sdk-web-interfaces/src/index" {
|
|
1554
|
-
interface StreamLayerSDK {
|
|
1555
|
-
authorizationBypass: (schema: string, userKey: string) => Promise<void>;
|
|
1556
|
-
logout: () => void;
|
|
1557
|
-
getUserStore: () => CoreStores['user'];
|
|
1558
|
-
isUserAuthorized: BypassAuth['isAuthenticated'];
|
|
1559
|
-
}
|
|
1560
|
-
interface StreamLayerContext {
|
|
1561
|
-
auth: BypassAuth;
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
export const bypass: (instance: StreamLayerContext, opts: unknown, done: () => void) => Promise<void>;
|
|
1565
|
-
}
|
|
1566
|
-
declare module "packages/react-ui/src/lib/notifications/notification/onboarding-inapp/styles" {
|
|
1567
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1568
|
-
export const BackgroundBlock: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1569
|
-
export const Icon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1570
|
-
export const ContentWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1571
|
-
export const SponsorLogo: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1572
|
-
export const SponsorText: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
1573
|
-
export const ContentTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1574
|
-
export const ContentSubtitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1575
|
-
export const ActionBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1576
|
-
export const CloseBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1577
|
-
export const IconClose: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1578
|
-
}
|
|
1579
|
-
declare module "packages/react-ui/src/lib/notifications/notification/onboarding-inapp/index" {
|
|
1580
|
-
import type { Notification } from "packages/sdk-web-notifications/src/index";
|
|
1581
|
-
export const OnBoardingInApp: React.FC<Notification>;
|
|
1582
|
-
}
|
|
1583
|
-
declare module "packages/react-ui/src/lib/notifications/notification/styles" {
|
|
1584
|
-
export const NotificationContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1585
|
-
}
|
|
1586
|
-
declare module "packages/react-ui/src/lib/notifications/notification/index" {
|
|
1587
|
-
import { type Notification } from "packages/sdk-web-notifications/src/index";
|
|
1588
|
-
export const NotificationComponent: React.FC<Notification & {
|
|
1589
|
-
index: number;
|
|
1590
|
-
total: number;
|
|
1591
|
-
}>;
|
|
1592
|
-
}
|
|
1593
|
-
declare module "packages/react-ui/src/lib/notifications/styles" {
|
|
1594
|
-
export const NotificationsContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1595
|
-
}
|
|
1596
|
-
declare module "packages/react-ui/src/lib/notifications/index" {
|
|
1597
|
-
import { NotificationsList } from "packages/sdk-web-notifications/src/index";
|
|
1598
|
-
export const Notifications: React.FC<{
|
|
1599
|
-
notificationsStore: NotificationsList;
|
|
1600
|
-
}>;
|
|
1601
|
-
}
|
|
1602
|
-
declare module "packages/react-ui/src/lib/demo/components/UserSummary" {
|
|
1603
|
-
import type { Gamification } from "packages/feature-gamification/src/index";
|
|
1604
|
-
export const UserSummary: React.FC<{
|
|
1605
|
-
store: ReturnType<Exclude<Gamification['userSummary'], undefined>['getStore']>;
|
|
1606
|
-
}>;
|
|
1607
|
-
}
|
|
1608
|
-
declare module "packages/react-ui/src/lib/demo/components/QuestionsList" {
|
|
1609
|
-
import type { Gamification } from "packages/feature-gamification/src/index";
|
|
1610
|
-
export const QuestionsList: React.FC<{
|
|
1611
|
-
store: ReturnType<Exclude<Gamification['questions'], undefined>['getStore']>;
|
|
1612
|
-
openQuestion: (questionId: string) => void;
|
|
1613
|
-
}>;
|
|
1614
|
-
}
|
|
1615
|
-
declare module "packages/react-ui/src/lib/gamification/vote/components/voting-header/styles" {
|
|
1616
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1617
|
-
export const Logo: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1618
|
-
export const RightBlock: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1619
|
-
export const ExitBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1620
|
-
export const ExitIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1621
|
-
export const Interactive: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1622
|
-
export const ReactionIconWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
1623
|
-
isSuccess: boolean;
|
|
1624
|
-
}>;
|
|
1625
|
-
export const ReactionIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1626
|
-
}
|
|
1627
|
-
declare module "packages/react-ui/src/lib/gamification/vote/components/voting-header/components/points/styles" {
|
|
1628
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1629
|
-
export const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1630
|
-
export const PointContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1631
|
-
export const Point: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
1632
|
-
export const PointLabel: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
1633
|
-
}
|
|
1634
|
-
declare module "packages/react-ui/src/lib/gamification/vote/components/voting-header/components/points/index" {
|
|
1635
|
-
interface PointsProps {
|
|
1636
|
-
points: number;
|
|
1637
|
-
}
|
|
1638
|
-
export const Points: React.FC<PointsProps>;
|
|
1639
|
-
}
|
|
1640
|
-
declare module "packages/react-ui/src/lib/gamification/vote/components/voting-header/index" {
|
|
1641
|
-
import { QuestionType } from "packages/sdk-web-types/src/index";
|
|
1642
|
-
export interface VotingHeaderProps {
|
|
1643
|
-
points: number;
|
|
1644
|
-
questionAnswered: boolean;
|
|
1645
|
-
questionAnsweredCorrectly?: boolean;
|
|
1646
|
-
logo: string;
|
|
1647
|
-
questionType: QuestionType;
|
|
1648
|
-
closeQuestion: () => void;
|
|
1649
|
-
setTimeToExpire: (flag: boolean) => void;
|
|
1650
|
-
}
|
|
1651
|
-
export const VotingHeader: React.FC<VotingHeaderProps>;
|
|
1652
|
-
}
|
|
1653
|
-
declare module "packages/react-ui/src/lib/demo/components/Question" {
|
|
1654
|
-
import { GamificationBackground } from "packages/feature-gamification/src/index";
|
|
1655
|
-
export const Question: React.FC<{
|
|
1656
|
-
openedQuestion: Awaited<ReturnType<GamificationBackground['openedQuestion']['getValue']>>;
|
|
1657
|
-
closeQuestion: () => void;
|
|
1658
|
-
vote: (questionId: string, answerId: string) => void;
|
|
1659
|
-
}>;
|
|
1660
|
-
}
|
|
1661
|
-
declare module "packages/react-ui/src/lib/gamification/insight/styles" {
|
|
1662
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1663
|
-
export const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1664
|
-
export const Graphic: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1665
|
-
export const InsightIconDefault: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1666
|
-
export const InsightIconCircle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1667
|
-
export const InsightIconAbsolute: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1668
|
-
export const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1669
|
-
export const NextIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1670
|
-
}
|
|
1671
|
-
declare module "packages/react-ui/src/lib/gamification/insight/index" {
|
|
1672
|
-
import { QuestionImages } from "packages/sdk-web-types/src/index";
|
|
1673
|
-
type InsightProps = {
|
|
1674
|
-
image?: string;
|
|
1675
|
-
imageMode: QuestionImages;
|
|
1676
|
-
questionId: string;
|
|
1677
|
-
title: string;
|
|
1678
|
-
openInsight: (insightId: string) => void;
|
|
1679
|
-
};
|
|
1680
|
-
export const Insight: React.FC<InsightProps>;
|
|
1681
|
-
}
|
|
1682
|
-
declare module "packages/react-ui/src/lib/gamification/insight-list/styles" {
|
|
1683
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1684
|
-
export const ItemsContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1685
|
-
}
|
|
1686
|
-
declare module "packages/react-ui/src/lib/gamification/insight-list/index" {
|
|
1687
|
-
import { QuestionImages } from "packages/sdk-web-types/src/index";
|
|
1688
|
-
interface InsightListProps {
|
|
1689
|
-
insights?: Array<{
|
|
1690
|
-
image?: string;
|
|
1691
|
-
imageMode: QuestionImages;
|
|
1692
|
-
questionId: string;
|
|
1693
|
-
title: string;
|
|
1694
|
-
}>;
|
|
1695
|
-
openInsight: (insightId: string) => void;
|
|
1696
|
-
}
|
|
1697
|
-
export const InsightList: React.FC<InsightListProps>;
|
|
1698
|
-
}
|
|
1699
|
-
declare module "packages/react-ui/src/lib/demo/components/Insights" {
|
|
1700
|
-
import type { Highlights } from "packages/feature-gamification/src/index";
|
|
1701
|
-
export const Insights: React.FC<{
|
|
1702
|
-
highlights: Highlights;
|
|
1703
|
-
store: ReturnType<Exclude<Highlights['insights'], undefined>['getStore']>;
|
|
1704
|
-
}>;
|
|
1705
|
-
}
|
|
1706
|
-
declare module "packages/react-ui/src/lib/gamification/common-header/styles" {
|
|
1707
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1708
|
-
export const Button: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1709
|
-
export const HeaderIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1710
|
-
}
|
|
1711
|
-
declare module "packages/react-ui/src/lib/gamification/common-header/index" {
|
|
1712
|
-
type CommonHeaderProps = {
|
|
1713
|
-
icon?: string;
|
|
1714
|
-
comeBack?: () => void;
|
|
1715
|
-
close?: () => void;
|
|
1716
|
-
};
|
|
1717
|
-
export const CommonHeader: React.FC<CommonHeaderProps>;
|
|
1718
|
-
}
|
|
1719
|
-
declare module "packages/react-ui/src/lib/gamification/detailed-insight/styles" {
|
|
1720
|
-
export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1721
|
-
export const Image: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1722
|
-
export const AdditionalContent: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1723
|
-
export const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1724
|
-
export const Description: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1725
|
-
export const AdditionalBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown>>;
|
|
1726
|
-
export const LinkIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
1727
|
-
}
|
|
1728
|
-
declare module "packages/react-ui/src/lib/gamification/detailed-insight/index" {
|
|
1729
|
-
type DetailedInsightProps = {
|
|
1730
|
-
image?: string;
|
|
1731
|
-
title?: string;
|
|
1732
|
-
description?: string;
|
|
1733
|
-
webLinkLabel?: string;
|
|
1734
|
-
webLink?: string;
|
|
1735
|
-
closeHighlights: () => void;
|
|
1736
|
-
closeInsight: () => void;
|
|
1737
|
-
};
|
|
1738
|
-
export const DetailedInsight: React.FC<DetailedInsightProps>;
|
|
1739
|
-
}
|
|
1740
|
-
declare module "packages/react-ui/src/lib/demo/components/Insight" {
|
|
1741
|
-
import { Highlights } from "packages/feature-gamification/src/index";
|
|
1742
|
-
export const Insight: React.FC<{
|
|
1743
|
-
openedInsight: Exclude<Highlights['openedInsight']['value'], undefined>;
|
|
1744
|
-
closeHighlights: () => void;
|
|
1745
|
-
closeInsight: () => void;
|
|
1746
|
-
}>;
|
|
1747
|
-
}
|
|
1748
|
-
declare module "packages/react-ui/src/lib/demo/components/index" {
|
|
1749
|
-
export { UserSummary } from "packages/react-ui/src/lib/demo/components/UserSummary";
|
|
1750
|
-
export { QuestionsList } from "packages/react-ui/src/lib/demo/components/QuestionsList";
|
|
1751
|
-
export { Question } from "packages/react-ui/src/lib/demo/components/Question";
|
|
1752
|
-
export { Onboarding } from "packages/react-ui/src/lib/gamification/onboarding/index";
|
|
1753
|
-
export { Insights } from "packages/react-ui/src/lib/demo/components/Insights";
|
|
1754
|
-
export { Insight } from "packages/react-ui/src/lib/demo/components/Insight";
|
|
1755
|
-
}
|
|
1756
|
-
declare module "packages/react-ui/src/lib/demo/styles" {
|
|
1757
|
-
export const DemoContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1758
|
-
export const UserStatisticsContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1759
|
-
export const QuestionsContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1760
|
-
export const Buttons: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
1761
|
-
export const Button: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
1762
|
-
}
|
|
1763
|
-
declare module "packages/react-ui/src/lib/demo/Gamification" {
|
|
1764
|
-
import { type StreamLayerSDK } from "packages/sdk-web-interfaces/src/index";
|
|
1765
|
-
import type { Gamification } from "packages/feature-gamification/src/index";
|
|
1766
|
-
export const GamificationComponent: React.FC<{
|
|
1767
|
-
gamification: Gamification;
|
|
1768
|
-
sdk: StreamLayerSDK;
|
|
1769
|
-
}>;
|
|
1770
|
-
}
|
|
1771
|
-
declare module "packages/react-ui/src/lib/demo/Highlights" {
|
|
1772
|
-
import { type StreamLayerSDK } from "packages/sdk-web-interfaces/src/index";
|
|
1773
|
-
import type { Highlights } from "packages/feature-gamification/src/index";
|
|
1774
|
-
export const HighlightsComponent: React.FC<{
|
|
1775
|
-
highlights: Highlights;
|
|
1776
|
-
sdk: StreamLayerSDK;
|
|
1777
|
-
}>;
|
|
1778
|
-
}
|
|
1779
|
-
/// <amd-module name="@streamlayer/sdk-web-anonymous-auth" />
|
|
1780
|
-
declare module "@streamlayer/sdk-web-anonymous-auth" {
|
|
1781
|
-
import { type StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
|
|
1782
|
-
module "packages/sdk-web-interfaces/src/index" {
|
|
1783
|
-
interface StreamLayerSDK {
|
|
1784
|
-
anonymousAuthorization: () => Promise<void>;
|
|
1785
|
-
}
|
|
1786
|
-
}
|
|
1787
|
-
type DoneFn = Function;
|
|
1788
|
-
export const anonymous: (instance: StreamLayerContext, opts: unknown, done: DoneFn) => void;
|
|
1789
|
-
}
|
|
1790
|
-
declare module "packages/react-ui/src/lib/demo/Login" {
|
|
1791
|
-
import type { StreamLayerSDK } from "packages/sdk-web-interfaces/src/index";
|
|
1792
|
-
export const LoginComponent: React.FC<{
|
|
1793
|
-
sdk: StreamLayerSDK;
|
|
1794
|
-
}>;
|
|
1795
|
-
}
|
|
1796
|
-
declare module "packages/react-ui/src/lib/demo/index" {
|
|
1797
|
-
import { type StreamLayerSDK } from "packages/sdk-web-interfaces/src/index";
|
|
1798
|
-
export const Demo: React.FC<{
|
|
1799
|
-
sdk: StreamLayerSDK;
|
|
1800
|
-
}>;
|
|
1801
|
-
}
|
|
1802
|
-
declare module "packages/react-ui/src/lib/theme/theme" {
|
|
1803
|
-
export const theme: import("@linaria/core").LinariaClassName;
|
|
1804
|
-
}
|
|
1805
|
-
declare module "packages/react-ui/src/lib/theme/index" {
|
|
1806
|
-
export const StreamLayerThemeProvider: React.FC<{
|
|
1807
|
-
children: React.ReactNode;
|
|
1808
|
-
}>;
|
|
1809
|
-
}
|
|
1810
|
-
declare module "packages/react-ui/src/index" {
|
|
1811
|
-
export * from "packages/react-ui/src/lib/notifications/notification/question-inapp/index";
|
|
1812
|
-
export * from "packages/react-ui/src/lib/login/index";
|
|
1813
|
-
export * from "packages/react-ui/src/lib/gamification/onboarding/index";
|
|
1814
|
-
export * from "packages/react-ui/src/lib/gamification/question/index";
|
|
1815
|
-
export * from "packages/react-ui/src/lib/gamification/question-list/index";
|
|
1816
|
-
export * from "packages/react-ui/src/lib/gamification/user-statistics/index";
|
|
1817
|
-
export * from "packages/react-ui/src/lib/gamification/vote/index";
|
|
1818
|
-
export * from "packages/react-ui/src/lib/demo/index";
|
|
1819
|
-
export * from "packages/react-ui/src/lib/theme/index";
|
|
1820
|
-
export * from "packages/react-ui/src/lib/theme/theme";
|
|
1821
|
-
}
|
|
1822
|
-
declare module "packages/sdk-web-core/src/index" {
|
|
1823
|
-
import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
|
|
1824
|
-
export { bypass } from "packages/sdk-web-core/src/auth/index";
|
|
1825
|
-
export { store } from "packages/sdk-web-core/src/store/index";
|
|
1826
|
-
module "packages/sdk-web-interfaces/src/index" {
|
|
1827
|
-
interface StreamLayerSDK {
|
|
1828
|
-
initializeApp: () => Promise<{
|
|
1829
|
-
enabled?: boolean;
|
|
1830
|
-
err?: string;
|
|
1831
|
-
}>;
|
|
1832
|
-
disableApp: () => void;
|
|
1833
|
-
createEventSession: (providerStreamId: string) => void;
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
/**
|
|
1837
|
-
* The main application instance is the core of a application. It includes:
|
|
1838
|
-
* Store: Manages data storage.
|
|
1839
|
-
* Public Methods: Provides a way to interact with the application.
|
|
1840
|
-
* Connect Features: Handles communication between components through store.
|
|
1841
|
-
* Connect Transport: Handles communication with api.
|
|
1842
|
-
* Dependency Injection: Incorporates other necessary instances.
|
|
1843
|
-
* Error Handling: Manages errors and logs them.
|
|
1844
|
-
* Security: Implements authentication and authorization.
|
|
1845
|
-
*/
|
|
1846
|
-
export const core: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
|
|
1847
|
-
}
|
|
1848
|
-
declare module "packages/sdk-web/src/index" {
|
|
1849
|
-
import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
|
|
1850
|
-
import avvio from 'avvio';
|
|
1851
|
-
export type StreamLayerInstance = avvio.mixedInstance<StreamLayerContext>;
|
|
1852
|
-
export type StreamLayerPlugin = (instance: StreamLayerContext, opts: unknown, done: DoneFn) => void;
|
|
1853
|
-
type DoneFn = Function;
|
|
1854
|
-
export function StreamLayer(sdkKey: string, production?: boolean): avvio.Avvio<StreamLayerContext>;
|
|
1855
|
-
}
|
|
1856
|
-
/// <amd-module name="@streamlayer/react/app/useStreamLayerApp" />
|
|
1857
|
-
declare module "@streamlayer/react/app/useStreamLayerApp" {
|
|
1858
|
-
import type { StreamLayerSDK, StreamLayerPlugin } from "packages/sdk-web-interfaces/src/index";
|
|
1859
|
-
export const useStreamLayerApp: (sdkKey: string, plugins?: Set<StreamLayerPlugin>, production?: boolean) => StreamLayerSDK | null;
|
|
1860
|
-
}
|
|
1861
|
-
/// <amd-module name="@streamlayer/react/app/provider" />
|
|
1862
|
-
declare module "@streamlayer/react/app/provider" {
|
|
1863
|
-
import type { StreamLayerSDK, StreamLayerPlugin } from "packages/sdk-web-interfaces/src/index";
|
|
1864
|
-
import React from 'react';
|
|
1865
|
-
export enum StreamLayerStatus {
|
|
1866
|
-
UNSET = 0,
|
|
1867
|
-
CONNECTED = 1,
|
|
1868
|
-
READY = 2
|
|
1869
|
-
}
|
|
1870
|
-
export const StreamLayerContext: React.Context<{
|
|
1871
|
-
status: StreamLayerStatus;
|
|
1872
|
-
sdk: StreamLayerSDK | null;
|
|
1873
|
-
}>;
|
|
1874
|
-
type StreamLayerProps = {
|
|
1875
|
-
sdkKey: string;
|
|
1876
|
-
plugins?: Set<StreamLayerPlugin>;
|
|
1877
|
-
production?: boolean;
|
|
1878
|
-
};
|
|
1879
|
-
export const StreamLayerProvider: React.FC<StreamLayerProps & {
|
|
1880
|
-
children: React.ReactNode;
|
|
1881
|
-
}>;
|
|
1882
|
-
}
|
|
1883
|
-
/// <amd-module name="@streamlayer/react/app/app" />
|
|
1884
|
-
declare module "@streamlayer/react/app/app" {
|
|
1885
|
-
import type { StreamLayerSDK } from "packages/sdk-web-interfaces/src/index";
|
|
1886
|
-
import React from 'react';
|
|
1887
|
-
export const useStreamLayer: () => StreamLayerSDK | null;
|
|
1888
|
-
export const StreamLayerSDKReact: React.FC;
|
|
1889
|
-
}
|
|
1890
|
-
/// <amd-module name="@streamlayer/react" />
|
|
1891
|
-
declare module "@streamlayer/react" {
|
|
1892
|
-
export { StreamLayerProvider } from "@streamlayer/react/app/provider";
|
|
1893
|
-
export { StreamLayerSDKReact, useStreamLayer } from "@streamlayer/react/app/app";
|
|
1894
|
-
export { useStreamLayerApp } from "@streamlayer/react/app/useStreamLayerApp";
|
|
1895
|
-
}
|
|
1
|
+
export { StreamLayerProvider } from './app/provider';
|
|
2
|
+
export { StreamLayerSDKReact, useStreamLayer } from './app/app';
|
|
3
|
+
export { useStreamLayerApp } from './app/useStreamLayerApp';
|