@streamlayer/react 0.35.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,8 +10,8 @@ declare module "../../sdk-web-types/src/sl-types" {
10
10
  export { PickHistoryStatus } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
11
11
  import type { LeaderboardItem as ILeaderboardItem } from '@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb';
12
12
  import type { ExtendedQuestionAnswer as IExtendedQuestionAnswer } from '@streamlayer/sl-eslib/interactive/interactive.common_pb';
13
- export type ExtendedQuestionAnswer = PlainMessage<IExtendedQuestionAnswer>;
14
13
  export type PickHistory = PlainMessage<IPickHistory>;
14
+ export type ExtendedQuestionAnswer = PlainMessage<IExtendedQuestionAnswer>;
15
15
  export type InsightHistory = PlainMessage<IInsightHistory>;
16
16
  export type TweetHistory = PlainMessage<ITweetHistory>;
17
17
  export type OrganizationSettings = SLOrganizationSettings;
@@ -106,7 +106,7 @@ declare module "../../sdk-web-interfaces/src/store/map" {
106
106
  };
107
107
  }
108
108
  declare module "../../sdk-web-interfaces/src/feature" {
109
- import { FeatureConfig as SdkOverlay, SdkOverlaySettings } from '../../sdk-web-types/src/index.ts';
109
+ import { FeatureConfig as SdkOverlay, SdkOverlaySettings } from '../../sdk-web/src/index.ts-types';
110
110
  import { PlainMessage } from '@bufbuild/protobuf';
111
111
  import { WritableAtom } from 'nanostores';
112
112
  import { MapStore } from "../../sdk-web-interfaces/src/store/map";
@@ -183,7 +183,7 @@ declare module "../../sdk-web-interfaces/src/store/api" {
183
183
  constructor(store: StoreInstance, name: string, atomPicker?: (val: FetcherValue<StoreValue, unknown>, prevVal?: string) => string | undefined);
184
184
  getAtomStore: () => WritableAtom<string | undefined>;
185
185
  getValue: () => Promise<StoreValue | undefined>;
186
- getValues: () => never;
186
+ getValues: () => FetcherValue<StoreValue, any>;
187
187
  setValue: (value?: StoreInstance['value']) => void;
188
188
  subscribe: StoreInstance['subscribe'];
189
189
  unsubscribe: () => never;
@@ -195,7 +195,7 @@ declare module "../../sdk-web-interfaces/src/store/api" {
195
195
  }
196
196
  }
197
197
  declare module "../../sdk-web-interfaces/src/index" {
198
- import { FeatureType } from '../../sdk-web-types/src/index.ts';
198
+ import { FeatureType } from '../../sdk-web/src/index.ts-types';
199
199
  export { AbstractAuthenticationProvider } from "../../sdk-web-interfaces/src/auth";
200
200
  export { AbstractFeature, FeatureSource, type FeatureProps, FeatureStatus } from "../../sdk-web-interfaces/src/feature";
201
201
  export { MapStore, createMapStore } from "../../sdk-web-interfaces/src/store/map";
@@ -204,8 +204,8 @@ declare module "../../sdk-web-interfaces/src/index" {
204
204
  export { AbstractStore, mergeStores } from "../../sdk-web-interfaces/src/store/abstract";
205
205
  export { ApiStore } from "../../sdk-web-interfaces/src/store/api";
206
206
  export interface StreamLayerSDK {
207
- openFeature: (featureType: FeatureType) => void;
208
207
  closeFeature: (destroy?: boolean) => void;
208
+ openFeature: (featureType: FeatureType) => void;
209
209
  }
210
210
  export interface StreamLayerContext {
211
211
  sdk: StreamLayerSDK;
@@ -254,6 +254,7 @@ declare module "../../sdk-web-api/src/grpc/transport" {
254
254
  useProtoFieldName: boolean;
255
255
  };
256
256
  readonly transport: ReturnType<typeof createGrpcWebTransport>;
257
+ readonly streamTransport: ReturnType<typeof createGrpcWebTransport>;
257
258
  readonly nanoquery: NanoqueryObjectType;
258
259
  readonly host: string;
259
260
  protected interceptors: Interceptor[];
@@ -268,6 +269,7 @@ declare module "../../sdk-web-api/src/grpc/transport" {
268
269
  registerInterceptor: (interceptor: Interceptor) => void;
269
270
  removeInterceptor: (interceptor: Interceptor) => void;
270
271
  getClient: <T extends ServiceType>(service: T) => PromiseClient<T>;
272
+ getStreamClient: <T extends ServiceType>(service: T) => PromiseClient<T>;
271
273
  createPromiseClient: <T extends ServiceType>(service: T, { params, method }: {
272
274
  params?: KeyInput | undefined;
273
275
  method: keyof T["methods"];
@@ -405,7 +407,7 @@ declare module "../../sdk-web-api/src/grpc/queries/index" {
405
407
  export * from "../../sdk-web-api/src/grpc/queries/user";
406
408
  }
407
409
  declare module "../../sdk-web-api/src/index" {
408
- import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
410
+ import { StreamLayerContext } from '../../sdk-web/src/index.ts-interfaces';
409
411
  import { FetcherStore } from '@nanostores/query';
410
412
  export type { ServerStreamSubscriptionOptions } from "../../sdk-web-api/src/grpc/subscription";
411
413
  export { Transport } from "../../sdk-web-api/src/grpc/transport";
@@ -440,7 +442,7 @@ declare module "../../sdk-web-storage/src/index" {
440
442
  }
441
443
  }
442
444
  declare module "../../sdk-web-core/src/storage" {
443
- import { Storage } from '../../sdk-web-storage/src/index.ts';
445
+ import { Storage } from '../../sdk-web/src/index.ts-storage';
444
446
  export class UserStorage extends Storage {
445
447
  constructor();
446
448
  setSchema: (value: string) => void;
@@ -453,8 +455,8 @@ declare module "../../sdk-web-core/src/storage" {
453
455
  }
454
456
  }
455
457
  declare module "../../sdk-web-core/src/store/init" {
456
- import { SingleStore, ApiStore } from '../../sdk-web-interfaces/src/index.ts';
457
- import { Transport } from '../../sdk-web-api/src/index.ts';
458
+ import { SingleStore, ApiStore } from '../../sdk-web/src/index.ts-interfaces';
459
+ import { Transport } from '../../sdk-web/src/index.ts-api';
458
460
  export enum CoreStatus {
459
461
  DISABLED = "disabled",
460
462
  INITIALIZATION = "initialization",
@@ -509,9 +511,9 @@ declare module "../../sdk-web-core/src/store/init" {
509
511
  };
510
512
  }
511
513
  declare module "../../sdk-web-core/src/store/store" {
512
- import type { OrganizationAdvertising, StreamSettings, OrganizationSettings, User, UserSettings } from '../../sdk-web-types/src/index.ts';
513
- import { AbstractStore } from '../../sdk-web-interfaces/src/index.ts';
514
- import { Transport } from '../../sdk-web-api/src/index.ts';
514
+ import type { OrganizationAdvertising, StreamSettings, OrganizationSettings, User, UserSettings } from '../../sdk-web/src/index.ts-types';
515
+ import { AbstractStore } from '../../sdk-web/src/index.ts-interfaces';
516
+ import { Transport } from '../../sdk-web/src/index.ts-api';
515
517
  import { ReadableAtom } from 'nanostores';
516
518
  import { FetcherValue } from '@nanostores/query';
517
519
  import { initializeStore, CoreStatus } from "../../sdk-web-core/src/store/init";
@@ -559,16 +561,16 @@ declare module "../../sdk-web-core/src/store/store" {
559
561
  constructor(transport: Transport);
560
562
  getValue(): unknown;
561
563
  getValues(): {
562
- readonly enabled: import('../../sdk-web-interfaces/src/index.ts').SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
563
- readonly status: import('../../sdk-web-interfaces/src/index.ts').SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus>>;
564
- readonly providerStreamId: import('../../sdk-web-interfaces/src/index.ts').SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
565
- readonly slStreamId: import('../../sdk-web-interfaces/src/index.ts').ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined, any>>;
566
- readonly streamSettings: import('../../sdk-web-interfaces/src/index.ts').ApiStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings | undefined, any>>;
567
- readonly user: import('../../sdk-web-interfaces/src/index.ts').ApiStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse | undefined, any>>;
568
- readonly userKey: import('../../sdk-web-interfaces/src/index.ts').SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
569
- readonly userToken: import('../../sdk-web-interfaces/src/index.ts').SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
570
- readonly userSettings: import('../../sdk-web-interfaces/src/index.ts').ApiStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings | undefined, any>>;
571
- readonly organizationSettings: import('../../sdk-web-interfaces/src/index.ts').ApiStore<{
564
+ readonly enabled: import('../../sdk-web/src/index.ts-interfaces').SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
565
+ readonly status: import('../../sdk-web/src/index.ts-interfaces').SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus>>;
566
+ readonly providerStreamId: import('../../sdk-web/src/index.ts-interfaces').SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
567
+ readonly slStreamId: import('../../sdk-web/src/index.ts-interfaces').ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined, any>>;
568
+ readonly streamSettings: import('../../sdk-web/src/index.ts-interfaces').ApiStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings | undefined, any>>;
569
+ readonly user: import('../../sdk-web/src/index.ts-interfaces').ApiStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse | undefined, any>>;
570
+ readonly userKey: import('../../sdk-web/src/index.ts-interfaces').SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
571
+ readonly userToken: import('../../sdk-web/src/index.ts-interfaces').SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
572
+ readonly userSettings: import('../../sdk-web/src/index.ts-interfaces').ApiStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings | undefined, any>>;
573
+ readonly organizationSettings: import('../../sdk-web/src/index.ts-interfaces').ApiStore<{
572
574
  id: string;
573
575
  overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
574
576
  buttonIcon?: string | undefined;
@@ -601,7 +603,7 @@ declare module "../../sdk-web-core/src/store/store" {
601
603
  pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
602
604
  getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
603
605
  } | undefined, any>>;
604
- readonly organizationAdvertising: import('../../sdk-web-interfaces/src/index.ts').ApiStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising | undefined, any>>;
606
+ readonly organizationAdvertising: import('../../sdk-web/src/index.ts-interfaces').ApiStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising | undefined, import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising | undefined, any>>;
605
607
  };
606
608
  setValue(): void;
607
609
  subscribe: (subscribes: Partial<StoreListeners>) => void;
@@ -612,8 +614,8 @@ declare module "../../sdk-web-core/src/store/store" {
612
614
  };
613
615
  }
614
616
  declare module "../../sdk-web-core/src/auth/bypass/index" {
615
- import { AbstractAuthenticationProvider } from '../../sdk-web-interfaces/src/index.ts';
616
- import { Transport } from '../../sdk-web-api/src/index.ts';
617
+ import { AbstractAuthenticationProvider } from '../../sdk-web/src/index.ts-interfaces';
618
+ import { Transport } from '../../sdk-web/src/index.ts-api';
617
619
  import { CoreStore } from "../../sdk-web-core/src/store/store";
618
620
  /**
619
621
  * An authorization service manages user access by providing login, logout,
@@ -663,7 +665,7 @@ declare module "../../sdk-web-core/src/auth/bypass/index" {
663
665
  }
664
666
  }
665
667
  declare module "../../sdk-web-core/src/auth/index" {
666
- import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
668
+ import { StreamLayerContext } from '../../sdk-web/src/index.ts-interfaces';
667
669
  import { CoreStores, StoreObj } from "../../sdk-web-core/src/store/store";
668
670
  import { UserStorage } from "../../sdk-web-core/src/storage";
669
671
  import { BypassAuth } from "../../sdk-web-core/src/auth/bypass/index";
@@ -687,7 +689,7 @@ declare module "../../sdk-web-core/src/auth/index" {
687
689
  export const bypass: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
688
690
  }
689
691
  declare module "../../sdk-web-core/src/store/index" {
690
- import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
692
+ import { StreamLayerContext } from '../../sdk-web/src/index.ts-interfaces';
691
693
  import { CoreStore, CoreStores, StoreObj } from "../../sdk-web-core/src/store/store";
692
694
  module '@streamlayer/sdk-web-interfaces' {
693
695
  interface StreamLayerSDK {
@@ -717,7 +719,7 @@ declare module "../../sdk-web-core/src/store/index" {
717
719
  export const store: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
718
720
  }
719
721
  declare module "../../sdk-web-core/src/index" {
720
- import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
722
+ import { StreamLayerContext } from '../../sdk-web/src/index.ts-interfaces';
721
723
  export { bypass, storage } from "../../sdk-web-core/src/auth/index";
722
724
  export { store } from "../../sdk-web-core/src/store/index";
723
725
  import "../../sdk-web-core/src/store/index";
@@ -752,17 +754,11 @@ declare module "../../react-ui/src/index" {
752
754
  }
753
755
  declare module "../../sdk-web-logger/src/index" {
754
756
  import { pino, ChildLoggerOptions } from 'pino';
755
- export const createLogger: (name: string, options?: ChildLoggerOptions) => pino.Logger<{
756
- level: "trace";
757
- enabled: false;
758
- browser: {
759
- write: (o: object) => void;
760
- };
761
- } & ChildLoggerOptions>;
757
+ export const createLogger: (name: string, options?: ChildLoggerOptions) => pino.Logger<never>;
762
758
  export type Logger = ReturnType<typeof createLogger>;
763
759
  }
764
760
  declare module "../../sdk-web-notifications/src/queue/index" {
765
- import { SingleStore, createComputedStore } from '../../sdk-web-interfaces/src/index.ts';
761
+ import { SingleStore, createComputedStore } from '../../sdk-web/src/index.ts-interfaces';
766
762
  import { Notification } from "../../sdk-web-notifications/src/index";
767
763
  export type NotificationsQueueOptions = {
768
764
  concurrency: number;
@@ -786,7 +782,7 @@ declare module "../../sdk-web-notifications/src/queue/index" {
786
782
  }
787
783
  }
788
784
  declare module "../../sdk-web-notifications/src/storage" {
789
- import { Storage } from '../../sdk-web-storage/src/index.ts';
785
+ import { Storage } from '../../sdk-web/src/index.ts-storage';
790
786
  export class NotificationStorage extends Storage {
791
787
  constructor();
792
788
  setOpened: (notificationId: string) => void;
@@ -795,7 +791,7 @@ declare module "../../sdk-web-notifications/src/storage" {
795
791
  }
796
792
  }
797
793
  declare module "../../sdk-web-notifications/src/notifications" {
798
- import { InstantView, QuestionType, GameSettings } from '../../sdk-web-types/src/index.ts';
794
+ import { InstantView, QuestionType, GameSettings } from '../../sdk-web/src/index.ts-types';
799
795
  import { NotificationsQueue, NotificationsQueueOptions } from "../../sdk-web-notifications/src/queue/index";
800
796
  export type NotificationData = {
801
797
  questionType: QuestionType;
@@ -837,6 +833,7 @@ declare module "../../sdk-web-notifications/src/notifications" {
837
833
  methods?: M;
838
834
  data: NotificationData;
839
835
  id: string;
836
+ persistent?: boolean;
840
837
  };
841
838
  /**
842
839
  * @description app notifications (inapp)
@@ -846,13 +843,13 @@ declare module "../../sdk-web-notifications/src/notifications" {
846
843
  private storage;
847
844
  constructor(options?: Partial<NotificationsQueueOptions>);
848
845
  add: (notification: Notification) => void;
849
- close: (notificationId: string) => void;
846
+ close: (notificationId: string, markAsViewed?: boolean) => void;
850
847
  getQueueStore: () => import("nanostores").WritableAtom<Map<string, Notification> | undefined>;
851
848
  markAsViewed: (notificationId: string) => void;
852
849
  }
853
850
  }
854
851
  declare module "../../sdk-web-notifications/src/index" {
855
- import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
852
+ import { StreamLayerContext } from '../../sdk-web/src/index.ts-interfaces';
856
853
  import { Notifications } from "../../sdk-web-notifications/src/notifications";
857
854
  export { type Notification, type NotificationData, NotificationType, Notifications } from "../../sdk-web-notifications/src/notifications";
858
855
  export { type NotificationsList } from "../../sdk-web-notifications/src/queue/index";
@@ -872,7 +869,7 @@ declare module "../../sdk-web-notifications/src/index" {
872
869
  export const notifications: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
873
870
  }
874
871
  declare module "../../feature-gamification/src/queries/leaderboard" {
875
- import type { Transport } from '../../sdk-web-api/src/index.ts';
872
+ import type { Transport } from '../../sdk-web/src/index.ts-api';
876
873
  import { ReadableAtom } from 'nanostores';
877
874
  import { ListRequest } from '@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb';
878
875
  import { PartialMessage } from '@bufbuild/protobuf';
@@ -881,15 +878,21 @@ declare module "../../feature-gamification/src/queries/leaderboard" {
881
878
  export const $leaderboardList: ($eventId: ReadableAtom<string | undefined>, _: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb").ListResponse_ListResponseData[], any>;
882
879
  export const createLeaderboardListFetch: (transport: Transport) => (params: PartialMessage<ListRequest>) => Promise<import("@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb").ListResponse>;
883
880
  }
881
+ declare module "../../feature-gamification/src/queries/friends" {
882
+ import type { Transport } from '../../sdk-web/src/index.ts-api';
883
+ import { ReadableAtom } from 'nanostores';
884
+ export const $friends: ($userId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").GetFriendsResponse_FriendData[], any>;
885
+ }
884
886
  declare module "../../feature-gamification/src/queries/moderation" {
885
- import type { Transport } from '../../sdk-web-api/src/index.ts';
887
+ import type { Transport } from '../../sdk-web/src/index.ts-api';
886
888
  import { ReadableAtom } from 'nanostores';
887
889
  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>;
888
890
  }
889
891
  declare module "../../feature-gamification/src/queries/index" {
890
- import type { Transport } from '../../sdk-web-api/src/index.ts';
892
+ import type { Transport } from '../../sdk-web/src/index.ts-api';
891
893
  import { ReadableAtom } from 'nanostores';
892
894
  import type { SubscriptionRequest, SubscriptionResponse, VotingSubscriptionRequest, VotingSubscriptionResponse, QuestionSubscriptionRequest, QuestionSubscriptionResponse } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
895
+ import { InteractiveAllowed } from "../../feature-gamification/src/background";
893
896
  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>;
894
897
  export const feedSubscription: ($slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("../../../sdk-web-api/src/grpc/subscription").ServerStreamSubscription<import("@bufbuild/protobuf").ServiceType, import("@bufbuild/protobuf").Message<import("@bufbuild/protobuf").AnyMessage>, import("@bufbuild/protobuf").Message<import("@bufbuild/protobuf").AnyMessage>, never, never> | import("../../../sdk-web-api/src/grpc/subscription").ServerStreamSubscription<{
895
898
  readonly typeName: "streamlayer.interactive.feed.Feed";
@@ -1215,16 +1218,17 @@ declare module "../../feature-gamification/src/queries/index" {
1215
1218
  };
1216
1219
  };
1217
1220
  }, QuestionSubscriptionRequest, QuestionSubscriptionResponse, "subscription" | "votingSubscription" | "questionSubscription" | "feedSubscription", ((request: import("@bufbuild/protobuf").PartialMessage<SubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions | undefined) => AsyncIterable<SubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<VotingSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions | undefined) => AsyncIterable<VotingSubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<QuestionSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions | undefined) => AsyncIterable<QuestionSubscriptionResponse>) | ((request: import("@bufbuild/protobuf").PartialMessage<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionRequest>, options?: import("@connectrpc/connect").CallOptions | undefined) => AsyncIterable<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedSubscriptionResponse>)>;
1218
- export const getQuestionByUser: (questionId: string, transport: Transport) => Promise<import('../../sdk-web-types/src/index.ts').ExtendedQuestion | undefined>;
1219
- export const $questionByUser: ($questionId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import('../../sdk-web-types/src/index.ts').ExtendedQuestion | undefined, any>;
1221
+ export const getQuestionByUser: (questionId: string, transport: Transport) => Promise<import('../../sdk-web/src/index.ts-types').ExtendedQuestion | undefined>;
1222
+ export const getQuestionDetail: (questionId: string, transport: Transport) => Promise<import("@streamlayer/sl-eslib/interactive/interactive.common_pb").Question | undefined>;
1223
+ export const $questionByUser: ($questionId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import('../../sdk-web/src/index.ts-types').ExtendedQuestion | undefined, any>;
1220
1224
  export const $pickHistory: (slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<(import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").PickHistory | undefined)[], any>;
1221
- export const $feedList: (slStreamId: ReadableAtom<string | undefined>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedItem[], any>;
1222
- 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>;
1225
+ export const $feedList: ($slStreamId: ReadableAtom<string | undefined>, $interactiveAllowed: ReadableAtom<InteractiveAllowed>, transport: Transport) => import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").FeedItem[], any>;
1223
1226
  export { $userSummary, $leaderboardList } from "../../feature-gamification/src/queries/leaderboard";
1227
+ export { $friends } from "../../feature-gamification/src/queries/friends";
1224
1228
  export { $moderation } from "../../feature-gamification/src/queries/moderation";
1225
1229
  }
1226
1230
  declare module "../../feature-gamification/src/detail" {
1227
- import type { Transport } from '../../sdk-web-api/src/index.ts';
1231
+ import type { Transport } from '../../sdk-web/src/index.ts-api';
1228
1232
  import { ReadableAtom } from 'nanostores';
1229
1233
  import { getQuestionByUser } from "../../feature-gamification/src/queries/index";
1230
1234
  import { type GamificationBackground } from "../../feature-gamification/src/background";
@@ -1241,12 +1245,16 @@ declare module "../../feature-gamification/src/detail" {
1241
1245
  };
1242
1246
  }
1243
1247
  declare module "../../feature-gamification/src/background" {
1244
- import { ApiStore, type StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
1245
- import type { GetApiResponseType } from '../../sdk-web-api/src/index.ts';
1248
+ import { ApiStore, type StreamLayerContext } from '../../sdk-web/src/index.ts-interfaces';
1249
+ import type { GetApiResponseType } from '../../sdk-web/src/index.ts-api';
1246
1250
  import '@streamlayer/sdk-web-core/store';
1247
1251
  import { ReadableAtom, WritableAtom } from 'nanostores';
1248
1252
  import * as queries from "../../feature-gamification/src/queries/index";
1249
1253
  import { detail } from "../../feature-gamification/src/detail";
1254
+ export enum InteractiveAllowed {
1255
+ ALLOWED = "allowed",
1256
+ DISALLOWED = "disallowed"
1257
+ }
1250
1258
  /**
1251
1259
  * Background class for Gamification feature
1252
1260
  */
@@ -1257,6 +1265,11 @@ declare module "../../feature-gamification/src/background" {
1257
1265
  organizationId: ReadableAtom<string | undefined>;
1258
1266
  /** current user id */
1259
1267
  userId: ReadableAtom<string | undefined>;
1268
+ /**
1269
+ * flag to allow interactive questions (polls, trivia, predictions)
1270
+ * controlled by opt-in and onboarding flags
1271
+ */
1272
+ interactiveAllowed: WritableAtom<InteractiveAllowed>;
1260
1273
  /** opened question, using to download statistics */
1261
1274
  openedQuestionId: WritableAtom<string | undefined>;
1262
1275
  /** opened question statistics */
@@ -1302,7 +1315,7 @@ declare module "../../feature-gamification/src/background" {
1302
1315
  }
1303
1316
  }
1304
1317
  declare module "../../feature-gamification/src/queries/actions" {
1305
- import type { Transport } from '../../sdk-web-api/src/index.ts';
1318
+ import type { Transport } from '../../sdk-web/src/index.ts-api';
1306
1319
  export const submitAnswer: (transport: Transport, data: {
1307
1320
  questionId: string;
1308
1321
  answerId: string;
@@ -1311,8 +1324,8 @@ declare module "../../feature-gamification/src/queries/actions" {
1311
1324
  export const skipQuestion: (transport: Transport, questionId: string) => Promise<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse>;
1312
1325
  }
1313
1326
  declare module "../../feature-gamification/src/onboarding" {
1314
- import { Transport } from '../../sdk-web-api/src/index.ts';
1315
- import { type Notifications } from '../../sdk-web-notifications/src/index.ts';
1327
+ import { Transport } from '../../sdk-web/src/index.ts-api';
1328
+ import { type Notifications } from '../../sdk-web/src/index.ts-notifications';
1316
1329
  import { GamificationBackground } from "../../feature-gamification/src/background";
1317
1330
  import { Gamification } from "../../feature-gamification/src/index";
1318
1331
  /**
@@ -1336,7 +1349,7 @@ declare module "../../feature-gamification/src/onboarding" {
1336
1349
  };
1337
1350
  }
1338
1351
  declare module "../../feature-gamification/src/storage" {
1339
- import { Storage } from '../../sdk-web-storage/src/index.ts';
1352
+ import { Storage } from '../../sdk-web/src/index.ts-storage';
1340
1353
  import { OnboardingStatus } from "../../feature-gamification/src/onboarding";
1341
1354
  type UserProps = {
1342
1355
  userId: string;
@@ -1352,26 +1365,28 @@ declare module "../../feature-gamification/src/storage" {
1352
1365
  }
1353
1366
  }
1354
1367
  declare module "../../feature-gamification/src/leaderboard" {
1355
- import type { Transport } from '../../sdk-web-api/src/index.ts';
1368
+ import type { Transport } from '../../sdk-web/src/index.ts-api';
1356
1369
  import { ReadableAtom } from 'nanostores';
1357
1370
  import { type LeaderboardItem } from "../../feature-gamification/src/queries/leaderboard";
1371
+ import { Gamification } from "../../feature-gamification/src/index";
1358
1372
  type LeaderboardOptions = {
1359
1373
  pageSize?: number;
1360
1374
  };
1361
1375
  type LeaderboardStore = {
1362
- data?: LeaderboardItem[];
1376
+ data: LeaderboardItem[];
1363
1377
  loading?: boolean;
1378
+ key: number;
1364
1379
  hasMore: boolean;
1365
1380
  error?: string;
1366
1381
  };
1367
- export const leaderboard: (transport: Transport, $eventId: ReadableAtom<string | undefined>, options?: LeaderboardOptions) => {
1382
+ export const leaderboard: (transport: Transport, $eventId: ReadableAtom<string | undefined>, $userId: ReadableAtom<string | undefined>, $friends: Gamification['friends'], options?: LeaderboardOptions) => {
1368
1383
  $store: import("nanostores").MapStore<LeaderboardStore>;
1369
1384
  fetchMore: (page?: number) => void;
1370
1385
  invalidate: () => void;
1371
1386
  };
1372
1387
  }
1373
1388
  declare module "../../feature-gamification/src/queries/deepLink" {
1374
- import type { Transport } from '../../sdk-web-api/src/index.ts';
1389
+ import type { Transport } from '../../sdk-web/src/index.ts-api';
1375
1390
  import { ReadableAtom } from 'nanostores';
1376
1391
  import { DeepLink } from '@streamlayer/sl-eslib/sdkSettings/client/client_pb';
1377
1392
  type EventId = ReadableAtom<string | undefined>;
@@ -1379,10 +1394,10 @@ declare module "../../feature-gamification/src/queries/deepLink" {
1379
1394
  export const generateShortLink: (transport: Transport, { web, mobile }: {
1380
1395
  web: string;
1381
1396
  mobile: string;
1382
- }) => Promise<import("@streamlayer/sl-eslib/shortLinks/client_pb").GenerateResponse>;
1397
+ }) => Promise<import("@streamlayer/sl-eslib/shortLinks/linksClient_pb").GenerateResponse>;
1383
1398
  }
1384
1399
  declare module "../../feature-gamification/src/deepLink" {
1385
- import type { Transport } from '../../sdk-web-api/src/index.ts';
1400
+ import type { Transport } from '../../sdk-web/src/index.ts-api';
1386
1401
  import { ReadableAtom } from 'nanostores';
1387
1402
  type DeepLinkData = {
1388
1403
  data?: string;
@@ -1395,9 +1410,9 @@ declare module "../../feature-gamification/src/deepLink" {
1395
1410
  };
1396
1411
  }
1397
1412
  declare module "../../feature-gamification/src/gamification" {
1398
- import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps, type StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
1399
- import { type GamesOverlaySettings } from '../../sdk-web-types/src/index.ts';
1400
- import type { GetApiResponseType } from '../../sdk-web-api/src/index.ts';
1413
+ import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps, type StreamLayerContext } from '../../sdk-web/src/index.ts-interfaces';
1414
+ import { type GamesOverlaySettings } from '../../sdk-web/src/index.ts-types';
1415
+ import type { GetApiResponseType } from '../../sdk-web/src/index.ts-api';
1401
1416
  import '@streamlayer/sdk-web-core/store';
1402
1417
  import type { PlainMessage } from '@bufbuild/protobuf';
1403
1418
  import { WritableAtom } from 'nanostores';
@@ -1406,7 +1421,7 @@ declare module "../../feature-gamification/src/gamification" {
1406
1421
  import { deepLink } from "../../feature-gamification/src/deepLink";
1407
1422
  import { OnboardingStatus } from "../../feature-gamification/src/onboarding";
1408
1423
  import { LeaderboardItem } from "../../feature-gamification/src/queries/leaderboard";
1409
- import { GamificationBackground } from "../../feature-gamification/src/index";
1424
+ import { GamificationBackground } from "../../feature-gamification/src/background";
1410
1425
  /**
1411
1426
  * Gamification (Games) Overlay
1412
1427
  * Includes:
@@ -1421,6 +1436,8 @@ declare module "../../feature-gamification/src/gamification" {
1421
1436
  userSummary: ApiStore<GetApiResponseType<typeof queries.$userSummary>>;
1422
1437
  /** feed list (pick history) */
1423
1438
  feedList: ApiStore<GetApiResponseType<typeof queries.$feedList>>;
1439
+ /** friends list */
1440
+ friends: ApiStore<GetApiResponseType<typeof queries.$friends>>;
1424
1441
  /** pinned leaderboard id */
1425
1442
  leaderboardId: WritableAtom<string | undefined>;
1426
1443
  /** leaderboard list */
@@ -1446,6 +1463,8 @@ declare module "../../feature-gamification/src/gamification" {
1446
1463
  /** Browser cache */
1447
1464
  private storage;
1448
1465
  constructor(config: FeatureProps, source: FeatureSource, instance: StreamLayerContext);
1466
+ get isInteractiveAllowed(): boolean;
1467
+ checkInteractiveFlag: () => void;
1449
1468
  connect: (transport: StreamLayerContext['transport']) => void;
1450
1469
  disconnect: () => void;
1451
1470
  submitAnswer: (questionId: string, answerId: string) => Promise<void>;
@@ -1454,6 +1473,13 @@ declare module "../../feature-gamification/src/gamification" {
1454
1473
  closeQuestion: (questionId?: string) => void;
1455
1474
  openUser: (userId: string) => void;
1456
1475
  closeUser: () => void;
1476
+ /**
1477
+ * Show in-app notification for active question
1478
+ * for interactive questions we show notification only if interactiveAllowed
1479
+ * for factoid and tweet questions we show notification always
1480
+ * skipping questions with inAppSilence === ON
1481
+ */
1482
+ private showInApp;
1457
1483
  }
1458
1484
  }
1459
1485
  declare module "../../feature-gamification/src/index" {
@@ -1466,8 +1492,8 @@ declare module "../../feature-gamification/src/index" {
1466
1492
  }
1467
1493
  }
1468
1494
  declare module "../../sdk-web-features/src/index" {
1469
- import { FeatureType } from '../../sdk-web-types/src/index.ts';
1470
- import { AbstractFeature, FeatureSource, FeatureProps, StreamLayerContext, SingleStore } from '../../sdk-web-interfaces/src/index.ts';
1495
+ import { FeatureType } from '../../sdk-web/src/index.ts-types';
1496
+ import { AbstractFeature, FeatureSource, FeatureProps, StreamLayerContext, SingleStore } from '../../sdk-web/src/index.ts-interfaces';
1471
1497
  import { Gamification } from '../../feature-gamification/src/index.ts';
1472
1498
  export type Features = Feature | Gamification;
1473
1499
  export const AvailableFeatures: {
@@ -1477,7 +1503,7 @@ declare module "../../sdk-web-features/src/index" {
1477
1503
  constructor(overlay: FeatureProps, source: FeatureSource);
1478
1504
  }
1479
1505
  export const initFeature: (overlay: FeatureProps, source: FeatureSource, instance: StreamLayerContext) => Gamification | Feature;
1480
- export { FeatureSource } from '../../sdk-web-interfaces/src/index.ts';
1506
+ export { FeatureSource } from '../../sdk-web/src/index.ts-interfaces';
1481
1507
  module '@streamlayer/sdk-web-interfaces' {
1482
1508
  interface StreamLayerContext {
1483
1509
  features: Map<FeatureType, Features>;
@@ -1497,7 +1523,7 @@ declare module "../../sdk-web-features/src/index" {
1497
1523
  export const features: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
1498
1524
  }
1499
1525
  declare module "../../sdk-web/src/index" {
1500
- import { StreamLayerContext } from '../../sdk-web-interfaces/src/index.ts';
1526
+ import { StreamLayerContext } from '../../sdk-web/src/index.ts-interfaces';
1501
1527
  import avvio from 'avvio';
1502
1528
  export type StreamLayerInstance = avvio.mixedInstance<StreamLayerContext>;
1503
1529
  export type StreamLayerPlugin = (instance: StreamLayerContext, opts: unknown, done: DoneFn) => void;
@@ -1507,7 +1533,7 @@ declare module "../../sdk-web/src/index" {
1507
1533
  }): avvio.Avvio<StreamLayerContext>;
1508
1534
  }
1509
1535
  declare module "app/useStreamLayerApp" {
1510
- import type { StreamLayerSDK, StreamLayerPlugin } from '../../sdk-web-interfaces/src/index.ts';
1536
+ import type { StreamLayerSDK, StreamLayerPlugin } from '../../sdk-web/src/index.ts-interfaces';
1511
1537
  global {
1512
1538
  interface Window {
1513
1539
  sl: unknown;
@@ -1516,7 +1542,7 @@ declare module "app/useStreamLayerApp" {
1516
1542
  export const useStreamLayerApp: (sdkKey: string, plugins?: Set<StreamLayerPlugin>, production?: boolean, autoEnable?: boolean) => StreamLayerSDK | null;
1517
1543
  }
1518
1544
  declare module "app/provider" {
1519
- import type { StreamLayerSDK, StreamLayerPlugin } from '../../sdk-web-interfaces/src/index.ts';
1545
+ import type { StreamLayerSDK, StreamLayerPlugin } from '../../sdk-web/src/index.ts-interfaces';
1520
1546
  export enum StreamLayerStatus {
1521
1547
  UNSET = 0,
1522
1548
  CONNECTED = 1,
@@ -1539,7 +1565,7 @@ declare module "app/provider" {
1539
1565
  declare module "app/masters" {
1540
1566
  import { StreamLayerProps } from "app/provider";
1541
1567
  import '@streamlayer/react-ui/style.css';
1542
- export const MastersStreamLayerProvider: React.FC<StreamLayerProps & {
1568
+ export const MastersStreamLayerProvider: React.FC<Omit<StreamLayerProps, 'autoEnable'> & {
1543
1569
  children: React.ReactNode;
1544
1570
  }>;
1545
1571
  type Overlays = {
@@ -1556,7 +1582,7 @@ declare module "app/masters" {
1556
1582
  export const MastersStreamLayerSDKReact: React.FC<MastersAppProps>;
1557
1583
  }
1558
1584
  declare module "app/app" {
1559
- import type { StreamLayerSDK } from '../../sdk-web-interfaces/src/index.ts';
1585
+ import type { StreamLayerSDK } from '../../sdk-web/src/index.ts-interfaces';
1560
1586
  export const useStreamLayer: () => StreamLayerSDK | null;
1561
1587
  export const StreamLayerSDKReact: React.FC;
1562
1588
  }