@streamlayer/react 0.14.2 → 0.14.4

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/index.d.ts CHANGED
@@ -487,6 +487,213 @@ declare module "packages/sdk-web-api/src/index" {
487
487
  host: string;
488
488
  }, done: () => void) => void;
489
489
  }
490
+ declare module "packages/sdk-web-notifications/src/notifications" {
491
+ import { SingleStore } from "packages/sdk-web-interfaces/src/index";
492
+ export type Nofitication<T extends Record<string, unknown> = any, M extends Record<string, Function> = never> = {
493
+ autoHideDuration?: number;
494
+ delay?: number;
495
+ data?: T;
496
+ type?: string;
497
+ action?: (...args: unknown[]) => void;
498
+ close?: (...args: unknown[]) => void;
499
+ methods?: {
500
+ action?: (...args: unknown[]) => void;
501
+ close?: (...args: unknown[]) => void;
502
+ } & M;
503
+ id: string;
504
+ };
505
+ /**
506
+ * @description app notifications (inapp)
507
+ */
508
+ export class Notifications {
509
+ queue: SingleStore<Nofitication[]>;
510
+ constructor();
511
+ add: (notification: Nofitication) => void;
512
+ getQueueStore: () => import("nanostores").WritableAtom<Nofitication<any, never>[] | undefined>;
513
+ isNewNotify: (id: string) => boolean;
514
+ markAsViewed: (id: string) => void;
515
+ }
516
+ }
517
+ declare module "packages/sdk-web-notifications/src/index" {
518
+ import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
519
+ import { Notifications } from "packages/sdk-web-notifications/src/notifications";
520
+ export type { Nofitication, Notifications } from "packages/sdk-web-notifications/src/notifications";
521
+ export type NotificationsStore = ReturnType<Notifications['getQueueStore']>;
522
+ module "packages/sdk-web-interfaces/src/index" {
523
+ interface StreamLayerContext {
524
+ notifications: Notifications;
525
+ addNotification: Notifications['add'];
526
+ }
527
+ interface StreamLayerSDK {
528
+ getNotificationsStore: Notifications['getQueueStore'];
529
+ }
530
+ }
531
+ /**
532
+ * notifications plugin, connect notifications to sdk
533
+ */
534
+ export const notifications: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
535
+ }
536
+ declare module "packages/sdk-web-core/src/store/store" {
537
+ import type { OrganizationAdvertising, StreamSettings, OrganizationSettings, User, UserSettings } from "packages/sdk-web-types/src/index";
538
+ import { AbstractStore, SingleStore, ApiStore } from "packages/sdk-web-interfaces/src/index";
539
+ import { Transport } from "packages/sdk-web-api/src/index";
540
+ import { ReadableAtom } from 'nanostores';
541
+ import { FetcherValue } from '@nanostores/query';
542
+ export enum CoreStatus {
543
+ DISABLED = "disabled",
544
+ INITIALIZATION = "initialization",
545
+ READY = "ready",
546
+ FAILED = "failed",
547
+ SUSPENDED = "suspended"
548
+ }
549
+ export interface CoreStoreInterface {
550
+ enabled?: 'on';
551
+ status: string;
552
+ userKey?: string;
553
+ userToken?: string;
554
+ organizationSettings?: OrganizationSettings & {
555
+ id: string;
556
+ };
557
+ organizationAdvertising?: OrganizationAdvertising;
558
+ streamSettings?: StreamSettings;
559
+ user?: User;
560
+ userSettings?: UserSettings;
561
+ providerStreamId?: string;
562
+ slStreamId?: string;
563
+ }
564
+ const initializeStore: (transport: Transport) => {
565
+ readonly enabled: SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
566
+ readonly status: SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus | undefined>>;
567
+ readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
568
+ readonly slStreamId: ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined>>;
569
+ 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>>;
570
+ 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>>;
571
+ readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
572
+ readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
573
+ 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>>;
574
+ readonly organizationSettings: ApiStore<{
575
+ id: string;
576
+ overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
577
+ buttonIcon?: string | undefined;
578
+ tinodeHost?: string | undefined;
579
+ audience?: string | undefined;
580
+ name?: string | undefined;
581
+ provider?: string | undefined;
582
+ primaryColor?: string | undefined;
583
+ secondaryColor?: string | undefined;
584
+ moderationPrimaryColor?: string | undefined;
585
+ linkShareIcon?: string | undefined;
586
+ linkShareText?: string | undefined;
587
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
588
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
589
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
590
+ } | undefined, import("@nanostores/query").FetcherStore<{
591
+ id: string;
592
+ overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
593
+ buttonIcon?: string | undefined;
594
+ tinodeHost?: string | undefined;
595
+ audience?: string | undefined;
596
+ name?: string | undefined;
597
+ provider?: string | undefined;
598
+ primaryColor?: string | undefined;
599
+ secondaryColor?: string | undefined;
600
+ moderationPrimaryColor?: string | undefined;
601
+ linkShareIcon?: string | undefined;
602
+ linkShareText?: string | undefined;
603
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
604
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
605
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
606
+ } | undefined>>;
607
+ 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>>;
608
+ };
609
+ export type StoreObj = ReturnType<typeof initializeStore>;
610
+ export type CoreStores = {
611
+ [Index in keyof StoreObj]: ReturnType<StoreObj[Index]['getStore']>;
612
+ };
613
+ export type CoreStoresValues = {
614
+ [Index in keyof StoreObj]: ReturnType<StoreObj[Index]['getStore']>['value'];
615
+ };
616
+ export type CoreStoreInstance = ReadableAtom<CoreStoresValues>;
617
+ /**
618
+ * @description main app store
619
+ */
620
+ export class CoreStore extends AbstractStore<CoreStoreInstance> {
621
+ private stores;
622
+ constructor(transport: Transport);
623
+ getValue(): unknown;
624
+ getValues(): {
625
+ readonly enabled: SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
626
+ readonly status: SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus | undefined>>;
627
+ readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
628
+ readonly slStreamId: ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined>>;
629
+ 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>>;
630
+ 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>>;
631
+ readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
632
+ readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
633
+ 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>>;
634
+ readonly organizationSettings: ApiStore<{
635
+ id: string;
636
+ overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
637
+ buttonIcon?: string | undefined;
638
+ tinodeHost?: string | undefined;
639
+ audience?: string | undefined;
640
+ name?: string | undefined;
641
+ provider?: string | undefined;
642
+ primaryColor?: string | undefined;
643
+ secondaryColor?: string | undefined;
644
+ moderationPrimaryColor?: string | undefined;
645
+ linkShareIcon?: string | undefined;
646
+ linkShareText?: string | undefined;
647
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
648
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
649
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
650
+ } | undefined, import("@nanostores/query").FetcherStore<{
651
+ id: string;
652
+ overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
653
+ buttonIcon?: string | undefined;
654
+ tinodeHost?: string | undefined;
655
+ audience?: string | undefined;
656
+ name?: string | undefined;
657
+ provider?: string | undefined;
658
+ primaryColor?: string | undefined;
659
+ secondaryColor?: string | undefined;
660
+ moderationPrimaryColor?: string | undefined;
661
+ linkShareIcon?: string | undefined;
662
+ linkShareText?: string | undefined;
663
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
664
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
665
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
666
+ } | undefined>>;
667
+ 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>>;
668
+ };
669
+ setValue(): void;
670
+ subscribe: (subscribes: Partial<StoreListeners>) => void;
671
+ unsubscribe: () => void;
672
+ }
673
+ export type StoreListeners = {
674
+ [Index in keyof StoreObj]: (params: FetcherValue<CoreStoreInterface[Index]>) => void;
675
+ };
676
+ }
677
+ declare module "packages/sdk-web-core/src/store/index" {
678
+ import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
679
+ import { CoreStore, CoreStores, StoreObj, CoreStoreInstance } from "packages/sdk-web-core/src/store/store";
680
+ module "packages/sdk-web-interfaces/src/index" {
681
+ interface StreamLayerSDK {
682
+ sdkStore: CoreStoreInstance;
683
+ organizationStore: () => CoreStores['organizationSettings'];
684
+ }
685
+ interface StreamLayerContext {
686
+ store: CoreStore;
687
+ stores: StoreObj;
688
+ storeSubscribe: () => void;
689
+ storeUnsubscribe: () => void;
690
+ }
691
+ }
692
+ /**
693
+ * store plugin, connect store to sdk
694
+ */
695
+ export const store: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
696
+ }
490
697
  declare module "packages/feature-gamification/src/queries/leaderboard" {
491
698
  import type { Transport } from "packages/sdk-web-api/src/index";
492
699
  import { ReadableAtom } from 'nanostores';
@@ -800,11 +1007,10 @@ declare module "packages/feature-gamification/src/queries/actions" {
800
1007
  export const skipQuestion: (transport: Transport, questionId: string) => Promise<import("@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb").SkipQuestionResponse>;
801
1008
  }
802
1009
  declare module "packages/feature-gamification/src/index" {
803
- import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps } from "packages/sdk-web-interfaces/src/index";
1010
+ import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps, type StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
804
1011
  import type { GetApiResponseType } from "packages/sdk-web-api/src/index";
805
- type StreamLayerContext = any;
806
1012
  import { type GamesOverlaySettings } from "packages/sdk-web-types/src/index";
807
- import type { PlainMessage } from '@bufbuild/protobuf';
1013
+ import type { PlainMessage } from '@bufbuild/protobuf';
808
1014
  import { ReadableAtom, WritableAtom } from 'nanostores';
809
1015
  import * as queries from "packages/feature-gamification/src/queries/index";
810
1016
  export class Gamification extends AbstractFeature<'games', PlainMessage<GamesOverlaySettings>> {
@@ -1091,147 +1297,6 @@ declare module "packages/sdk-web-features/src/index" {
1091
1297
  }
1092
1298
  export const features: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
1093
1299
  }
1094
- declare module "packages/sdk-web-core/src/store/store" {
1095
- import type { OrganizationAdvertising, StreamSettings, OrganizationSettings, User, UserSettings } from "packages/sdk-web-types/src/index";
1096
- import { AbstractStore, SingleStore, ApiStore } from "packages/sdk-web-interfaces/src/index";
1097
- import { Transport } from "packages/sdk-web-api/src/index";
1098
- import { ReadableAtom } from 'nanostores';
1099
- import { FetcherValue } from '@nanostores/query';
1100
- export enum CoreStatus {
1101
- DISABLED = "disabled",
1102
- INITIALIZATION = "initialization",
1103
- READY = "ready",
1104
- FAILED = "failed",
1105
- SUSPENDED = "suspended"
1106
- }
1107
- export interface CoreStoreInterface {
1108
- enabled?: 'on';
1109
- status: string;
1110
- userKey?: string;
1111
- userToken?: string;
1112
- organizationSettings?: OrganizationSettings & {
1113
- id: string;
1114
- };
1115
- organizationAdvertising?: OrganizationAdvertising;
1116
- streamSettings?: StreamSettings;
1117
- user?: User;
1118
- userSettings?: UserSettings;
1119
- providerStreamId?: string;
1120
- slStreamId?: string;
1121
- }
1122
- const initializeStore: (transport: Transport) => {
1123
- readonly enabled: SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
1124
- readonly status: SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus | undefined>>;
1125
- readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
1126
- readonly slStreamId: ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined>>;
1127
- 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>>;
1128
- 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>>;
1129
- readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
1130
- readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
1131
- 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>>;
1132
- readonly organizationSettings: ApiStore<{
1133
- id: string;
1134
- overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
1135
- buttonIcon?: string | undefined;
1136
- tinodeHost?: string | undefined;
1137
- audience?: string | undefined;
1138
- name?: string | undefined;
1139
- provider?: string | undefined;
1140
- primaryColor?: string | undefined;
1141
- secondaryColor?: string | undefined;
1142
- moderationPrimaryColor?: string | undefined;
1143
- linkShareIcon?: string | undefined;
1144
- linkShareText?: string | undefined;
1145
- brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
1146
- pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
1147
- getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
1148
- } | undefined, import("@nanostores/query").FetcherStore<{
1149
- id: string;
1150
- overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
1151
- buttonIcon?: string | undefined;
1152
- tinodeHost?: string | undefined;
1153
- audience?: string | undefined;
1154
- name?: string | undefined;
1155
- provider?: string | undefined;
1156
- primaryColor?: string | undefined;
1157
- secondaryColor?: string | undefined;
1158
- moderationPrimaryColor?: string | undefined;
1159
- linkShareIcon?: string | undefined;
1160
- linkShareText?: string | undefined;
1161
- brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
1162
- pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
1163
- getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
1164
- } | undefined>>;
1165
- 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>>;
1166
- };
1167
- export type StoreObj = ReturnType<typeof initializeStore>;
1168
- export type CoreStores = {
1169
- [Index in keyof StoreObj]: ReturnType<StoreObj[Index]['getStore']>;
1170
- };
1171
- export type CoreStoresValues = {
1172
- [Index in keyof StoreObj]: ReturnType<StoreObj[Index]['getStore']>['value'];
1173
- };
1174
- export type CoreStoreInstance = ReadableAtom<CoreStoresValues>;
1175
- /**
1176
- * @description main app store
1177
- */
1178
- export class CoreStore extends AbstractStore<CoreStoreInstance> {
1179
- private stores;
1180
- constructor(transport: Transport);
1181
- getValue(): unknown;
1182
- getValues(): {
1183
- readonly enabled: SingleStore<unknown, import("nanostores").WritableAtom<"on" | undefined>>;
1184
- readonly status: SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus | undefined>>;
1185
- readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
1186
- readonly slStreamId: ApiStore<string | undefined, import("@nanostores/query").FetcherStore<string | undefined>>;
1187
- 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>>;
1188
- 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>>;
1189
- readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
1190
- readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string | undefined>>;
1191
- 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>>;
1192
- readonly organizationSettings: ApiStore<{
1193
- id: string;
1194
- overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
1195
- buttonIcon?: string | undefined;
1196
- tinodeHost?: string | undefined;
1197
- audience?: string | undefined;
1198
- name?: string | undefined;
1199
- provider?: string | undefined;
1200
- primaryColor?: string | undefined;
1201
- secondaryColor?: string | undefined;
1202
- moderationPrimaryColor?: string | undefined;
1203
- linkShareIcon?: string | undefined;
1204
- linkShareText?: string | undefined;
1205
- brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
1206
- pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
1207
- getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
1208
- } | undefined, import("@nanostores/query").FetcherStore<{
1209
- id: string;
1210
- overlays?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[] | undefined;
1211
- buttonIcon?: string | undefined;
1212
- tinodeHost?: string | undefined;
1213
- audience?: string | undefined;
1214
- name?: string | undefined;
1215
- provider?: string | undefined;
1216
- primaryColor?: string | undefined;
1217
- secondaryColor?: string | undefined;
1218
- moderationPrimaryColor?: string | undefined;
1219
- linkShareIcon?: string | undefined;
1220
- linkShareText?: string | undefined;
1221
- brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults | undefined;
1222
- pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK | undefined;
1223
- getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient | undefined;
1224
- } | undefined>>;
1225
- 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>>;
1226
- };
1227
- setValue(): void;
1228
- subscribe: (subscribes: Partial<StoreListeners>) => void;
1229
- unsubscribe: () => void;
1230
- }
1231
- export type StoreListeners = {
1232
- [Index in keyof StoreObj]: (params: FetcherValue<CoreStoreInterface[Index]>) => void;
1233
- };
1234
- }
1235
1300
  declare module "packages/sdk-web-core/src/auth/bypass/index" {
1236
1301
  import { AbstractAuthenticationProvider } from "packages/sdk-web-interfaces/src/index";
1237
1302
  import { Transport } from "packages/sdk-web-api/src/index";
@@ -1273,26 +1338,6 @@ declare module "packages/sdk-web-core/src/auth/index" {
1273
1338
  }
1274
1339
  export const bypass: (instance: StreamLayerContext, opts: unknown, done: () => void) => Promise<void>;
1275
1340
  }
1276
- declare module "packages/sdk-web-core/src/store/index" {
1277
- import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
1278
- import { CoreStore, CoreStores, StoreObj, CoreStoreInstance } from "packages/sdk-web-core/src/store/store";
1279
- module "packages/sdk-web-interfaces/src/index" {
1280
- interface StreamLayerSDK {
1281
- sdkStore: CoreStoreInstance;
1282
- organizationStore: () => CoreStores['organizationSettings'];
1283
- }
1284
- interface StreamLayerContext {
1285
- store: CoreStore;
1286
- stores: StoreObj;
1287
- storeSubscribe: () => void;
1288
- storeUnsubscribe: () => void;
1289
- }
1290
- }
1291
- /**
1292
- * store plugin, connect store to sdk
1293
- */
1294
- export const store: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
1295
- }
1296
1341
  declare module "packages/react-ui/src/lib/demo/components/UserSummary" {
1297
1342
  import type { Gamification } from "packages/feature-gamification/src/index";
1298
1343
  export const UserSummary: React.FC<{
@@ -1352,49 +1397,6 @@ declare module "packages/react-ui/src/lib/demo/components/Question" {
1352
1397
  vote: (questionId: string, answerId: string) => void;
1353
1398
  }>;
1354
1399
  }
1355
- declare module "packages/sdk-web-core/src/notifications/notifications" {
1356
- import { SingleStore } from "packages/sdk-web-interfaces/src/index";
1357
- export type Nofitication<T extends Record<string, unknown> = any> = {
1358
- variant?: 'default' | 'error' | 'success' | 'warning' | 'info';
1359
- autoHideDuration?: number;
1360
- delay?: number;
1361
- data?: T;
1362
- type?: string;
1363
- action?: (...args: unknown[]) => void;
1364
- close?: (...args: unknown[]) => void;
1365
- id: string;
1366
- };
1367
- /**
1368
- * @description app notifications (inapp)
1369
- */
1370
- export class Notifications {
1371
- queue: SingleStore<Nofitication[]>;
1372
- constructor();
1373
- add: (notification: Nofitication) => void;
1374
- getQueueStore: () => import("nanostores").WritableAtom<Nofitication<any>[] | undefined>;
1375
- isNewNotify: (id: string) => boolean;
1376
- markAsViewed: (id: string) => void;
1377
- }
1378
- }
1379
- declare module "packages/sdk-web-core/src/notifications/index" {
1380
- import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
1381
- import { Notifications } from "packages/sdk-web-core/src/notifications/notifications";
1382
- export type { Nofitication } from "packages/sdk-web-core/src/notifications/notifications";
1383
- export type NotificationsStore = ReturnType<Notifications['getQueueStore']>;
1384
- module "packages/sdk-web-interfaces/src/index" {
1385
- interface StreamLayerContext {
1386
- notifications: Notifications;
1387
- addNotification: Notifications['add'];
1388
- }
1389
- interface StreamLayerSDK {
1390
- getNotificationsStore: Notifications['getQueueStore'];
1391
- }
1392
- }
1393
- /**
1394
- * notifications plugin, connect notifications to sdk
1395
- */
1396
- export const notifications: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;
1397
- }
1398
1400
  declare module "packages/react-ui/src/lib/demo/notifications/components/onboarding-inapp/styles" {
1399
1401
  export const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
1400
1402
  export const BackgroundBlock: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1493,7 +1495,7 @@ declare module "packages/react-ui/src/index" {
1493
1495
  }
1494
1496
  declare module "packages/sdk-web-core/src/index" {
1495
1497
  import { StreamLayerContext } from "packages/sdk-web-interfaces/src/index";
1496
- module "packages/sdk-web-interfaces/src/index" {
1498
+ module "packages/sdk-web-interfaces/src/index" {
1497
1499
  interface StreamLayerSDK {
1498
1500
  initializeApp: () => Promise<{
1499
1501
  enabled?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react",
3
- "version": "0.14.2",
3
+ "version": "0.14.4",
4
4
  "type": "module",
5
5
  "author": "Renat Berezovsky (gh:BrRenat)",
6
6
  "main": "./lib/cjs/index.js",
@@ -67,10 +67,10 @@
67
67
  "size-limit": "*",
68
68
  "url-loader": "^4.1.1",
69
69
  "vite-plugin-dts": "^3.6.0",
70
- "@streamlayer/react-ui": "^0.11.14",
71
- "@streamlayer/sdk-web-core": "^0.5.15",
72
- "@streamlayer/sdk-web": "^0.21.15",
73
- "@streamlayer/sdk-web-features": "^0.3.15"
70
+ "@streamlayer/sdk-web": "^0.22.1",
71
+ "@streamlayer/react-ui": "^0.12.1",
72
+ "@streamlayer/sdk-web-core": "^0.6.1",
73
+ "@streamlayer/sdk-web-features": "^0.4.1"
74
74
  },
75
75
  "dependencies": {
76
76
  "@connectrpc/connect-web": "^1.1.2"