@streamlayer/sdk-web 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@streamlayer/sdk-web",
3
3
  "dependencies": {
4
- "@streamlayer/sdk-web-api": "*",
5
- "@streamlayer/sdk-web-interfaces": "*",
6
- "@streamlayer/sdk-web-types": "*",
7
- "@swc/helpers": "*",
8
- "avvio": "*"
4
+ "@streamlayer/sdk-web-api": "workspace:^",
5
+ "@streamlayer/sdk-web-interfaces": "workspace:^",
6
+ "@streamlayer/sdk-web-types": "workspace:^",
7
+ "avvio": "^8.2.1"
9
8
  },
10
- "version": "0.15.0",
9
+ "version": "0.17.0",
11
10
  "type": "module",
12
11
  "main": "./src/index.js",
13
12
  "typings": "./src/index.d.ts",
@@ -19,7 +18,7 @@
19
18
  "src/"
20
19
  ],
21
20
  "devDependencies": {
22
- "webpack": "*"
21
+ "@swc/helpers": "^0.5.2"
23
22
  },
24
23
  "module": "./src/index.js"
25
24
  }
@@ -11,9 +11,9 @@ export declare class BypassAuth extends AbstractAuthenticationProvider {
11
11
  private readonly transport;
12
12
  private readonly $bypassLogin;
13
13
  constructor(store: CoreStore, transport: Transport);
14
- me: () => Promise<any>;
15
- login: (schema: string, userKey: string) => Promise<any>;
16
- isAuthenticated: () => Promise<any>;
14
+ me: () => Promise<import("@streamlayer/sl-eslib/users/users_common_pb").User>;
15
+ login: (schema: string, userKey: string) => Promise<import("@streamlayer/sl-eslib/users/users_common_pb").User>;
16
+ isAuthenticated: () => Promise<import("@streamlayer/sl-eslib/users/users_common_pb").User>;
17
17
  logout: () => void;
18
18
  /**
19
19
  * subscribe to user store and set auth header to the Transport on user update
package/src/core.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Feature } from './features';
1
2
  /**
2
3
  * The main application instance is the core of a application. It includes:
3
4
  * Store: Manages data storage.
@@ -13,6 +14,7 @@ export declare class StreamLayerSDK {
13
14
  * On initialize we subscribe to store and launch listeners
14
15
  * that activate data downloading over the network
15
16
  */
17
+ getFeatures: () => Map<string, Feature>;
16
18
  initializeApp: () => Promise<{
17
19
  enabled: boolean;
18
20
  err?: undefined;
@@ -21,6 +23,7 @@ export declare class StreamLayerSDK {
21
23
  enabled?: undefined;
22
24
  }>;
23
25
  disableApp: () => void;
26
+ invalidateSettings: () => void;
24
27
  /**
25
28
  * Configure the "event id" using the "provider," enabling subscribed stores to
26
29
  * trigger their logic in response to a new event.
package/src/core.js CHANGED
@@ -11,10 +11,7 @@ import { CoreStatus } from './store/store';
11
11
  * Security: Implements authentication and authorization.
12
12
  */ export class StreamLayerSDK {
13
13
  constructor(){
14
- /**
15
- * On initialize we subscribe to store and launch listeners
16
- * that activate data downloading over the network
17
- */ this.initializeApp = async ()=>{
14
+ this.initializeApp = async ()=>{
18
15
  this[kStoreSubscribe]();
19
16
  this[kStore].getStoreItem('enabled').setValue('on');
20
17
  this[kStore].getStoreItem('status').setValue(CoreStatus.INITIALIZATION);
@@ -43,6 +40,11 @@ import { CoreStatus } from './store/store';
43
40
  this[kStore].getStoreItem('status').setValue(CoreStatus.DISABLED);
44
41
  this[kStoreUnsubscribe]();
45
42
  };
43
+ this.invalidateSettings = ()=>{
44
+ this.transport.nanoquery.utils.invalidateKeys(()=>{
45
+ return true;
46
+ });
47
+ };
46
48
  /**
47
49
  * Configure the "event id" using the "provider," enabling subscribed stores to
48
50
  * trigger their logic in response to a new event.
package/src/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../packages/sdk-web/src/core.ts"],"sourcesContent":["import { kStore, kStoreSubscribe, kStoreUnsubscribe } from './keys'\nimport { CoreStatus } from './store/store'\n\n/**\n * The main application instance is the core of a application. It includes:\n * Store: Manages data storage.\n * Public Methods: Provides a way to interact with the application.\n * Connect Features: Handles communication between components throught store.\n * Connect Transport: Handles communication with api.\n * Dependency Injection: Incorporates other necessary instances.\n * Error Handling: Manages errors and logs them.\n * Security: Implements authentication and authorization.\n */\nexport class StreamLayerSDK {\n /**\n * On initialize we subscribe to store and launch listeners\n * that activate data downloading over the network\n */\n public initializeApp = async () => {\n this[kStoreSubscribe]()\n this[kStore].getStoreItem('enabled').setValue('on')\n this[kStore].getStoreItem('status').setValue(CoreStatus.INITIALIZATION)\n\n try {\n const organizationSettings = await this[kStore].getStoreItem('organizationSettings').getValue()\n\n if (organizationSettings) {\n this[kStore].getStoreItem('status').setValue(CoreStatus.READY)\n\n return { enabled: !!organizationSettings }\n }\n\n this[kStore].getStoreItem('status').setValue(CoreStatus.FAILED)\n\n return { err: 'failed' }\n } catch (err) {\n this[kStore].getStoreItem('enabled').setValue()\n this[kStore].getStoreItem('status').setValue(CoreStatus.FAILED)\n\n return { err }\n }\n }\n\n public disableApp = () => {\n this[kStore].getStoreItem('enabled').setValue()\n this[kStore].getStoreItem('status').setValue(CoreStatus.DISABLED)\n this[kStoreUnsubscribe]()\n }\n\n /**\n * Configure the \"event id\" using the \"provider,\" enabling subscribed stores to\n * trigger their logic in response to a new event.\n */\n public createEventSession = (providerStreamId: string) => {\n this[kStore].getStoreItem('providerStreamId').setValue(providerStreamId)\n }\n}\n"],"names":["kStore","kStoreSubscribe","kStoreUnsubscribe","CoreStatus","StreamLayerSDK","initializeApp","getStoreItem","setValue","INITIALIZATION","organizationSettings","getValue","READY","enabled","FAILED","err","disableApp","DISABLED","createEventSession","providerStreamId"],"mappings":"AAAA,SAASA,MAAM,EAAEC,eAAe,EAAEC,iBAAiB,QAAQ,SAAQ;AACnE,SAASC,UAAU,QAAQ,gBAAe;AAE1C;;;;;;;;;CASC,GACD,OAAO,MAAMC;;QACX;;;GAGC,QACMC,gBAAgB;YACrB,IAAI,CAACJ,gBAAgB;YACrB,IAAI,CAACD,OAAO,CAACM,YAAY,CAAC,WAAWC,QAAQ,CAAC;YAC9C,IAAI,CAACP,OAAO,CAACM,YAAY,CAAC,UAAUC,QAAQ,CAACJ,WAAWK,cAAc;YAEtE,IAAI;gBACF,MAAMC,uBAAuB,MAAM,IAAI,CAACT,OAAO,CAACM,YAAY,CAAC,wBAAwBI,QAAQ;gBAE7F,IAAID,sBAAsB;oBACxB,IAAI,CAACT,OAAO,CAACM,YAAY,CAAC,UAAUC,QAAQ,CAACJ,WAAWQ,KAAK;oBAE7D,OAAO;wBAAEC,SAAS,CAAC,CAACH;oBAAqB;gBAC3C;gBAEA,IAAI,CAACT,OAAO,CAACM,YAAY,CAAC,UAAUC,QAAQ,CAACJ,WAAWU,MAAM;gBAE9D,OAAO;oBAAEC,KAAK;gBAAS;YACzB,EAAE,OAAOA,KAAK;gBACZ,IAAI,CAACd,OAAO,CAACM,YAAY,CAAC,WAAWC,QAAQ;gBAC7C,IAAI,CAACP,OAAO,CAACM,YAAY,CAAC,UAAUC,QAAQ,CAACJ,WAAWU,MAAM;gBAE9D,OAAO;oBAAEC;gBAAI;YACf;QACF;aAEOC,aAAa;YAClB,IAAI,CAACf,OAAO,CAACM,YAAY,CAAC,WAAWC,QAAQ;YAC7C,IAAI,CAACP,OAAO,CAACM,YAAY,CAAC,UAAUC,QAAQ,CAACJ,WAAWa,QAAQ;YAChE,IAAI,CAACd,kBAAkB;QACzB;QAEA;;;GAGC,QACMe,qBAAqB,CAACC;YAC3B,IAAI,CAAClB,OAAO,CAACM,YAAY,CAAC,oBAAoBC,QAAQ,CAACW;QACzD;;AACF"}
1
+ {"version":3,"sources":["../../../../packages/sdk-web/src/core.ts"],"sourcesContent":["import { kStore, kStoreSubscribe, kStoreUnsubscribe } from './keys'\nimport { CoreStatus } from './store/store'\nimport { Feature } from './features'\n\n/**\n * The main application instance is the core of a application. It includes:\n * Store: Manages data storage.\n * Public Methods: Provides a way to interact with the application.\n * Connect Features: Handles communication between components throught store.\n * Connect Transport: Handles communication with api.\n * Dependency Injection: Incorporates other necessary instances.\n * Error Handling: Manages errors and logs them.\n * Security: Implements authentication and authorization.\n */\nexport class StreamLayerSDK {\n /**\n * On initialize we subscribe to store and launch listeners\n * that activate data downloading over the network\n */\n getFeatures: () => Map<string, Feature>\n\n public initializeApp = async () => {\n this[kStoreSubscribe]()\n this[kStore].getStoreItem('enabled').setValue('on')\n this[kStore].getStoreItem('status').setValue(CoreStatus.INITIALIZATION)\n\n try {\n const organizationSettings = await this[kStore].getStoreItem('organizationSettings').getValue()\n\n if (organizationSettings) {\n this[kStore].getStoreItem('status').setValue(CoreStatus.READY)\n\n return { enabled: !!organizationSettings }\n }\n\n this[kStore].getStoreItem('status').setValue(CoreStatus.FAILED)\n\n return { err: 'failed' }\n } catch (err) {\n this[kStore].getStoreItem('enabled').setValue()\n this[kStore].getStoreItem('status').setValue(CoreStatus.FAILED)\n\n return { err }\n }\n }\n\n public disableApp = () => {\n this[kStore].getStoreItem('enabled').setValue()\n this[kStore].getStoreItem('status').setValue(CoreStatus.DISABLED)\n this[kStoreUnsubscribe]()\n }\n\n public invalidateSettings = () => {\n this.transport.nanoquery.utils.invalidateKeys(() => {\n return true\n })\n }\n\n /**\n * Configure the \"event id\" using the \"provider,\" enabling subscribed stores to\n * trigger their logic in response to a new event.\n */\n public createEventSession = (providerStreamId: string) => {\n this[kStore].getStoreItem('providerStreamId').setValue(providerStreamId)\n }\n}\n"],"names":["kStore","kStoreSubscribe","kStoreUnsubscribe","CoreStatus","StreamLayerSDK","initializeApp","getStoreItem","setValue","INITIALIZATION","organizationSettings","getValue","READY","enabled","FAILED","err","disableApp","DISABLED","invalidateSettings","transport","nanoquery","utils","invalidateKeys","createEventSession","providerStreamId"],"mappings":"AAAA,SAASA,MAAM,EAAEC,eAAe,EAAEC,iBAAiB,QAAQ,SAAQ;AACnE,SAASC,UAAU,QAAQ,gBAAe;AAG1C;;;;;;;;;CASC,GACD,OAAO,MAAMC;;aAOJC,gBAAgB;YACrB,IAAI,CAACJ,gBAAgB;YACrB,IAAI,CAACD,OAAO,CAACM,YAAY,CAAC,WAAWC,QAAQ,CAAC;YAC9C,IAAI,CAACP,OAAO,CAACM,YAAY,CAAC,UAAUC,QAAQ,CAACJ,WAAWK,cAAc;YAEtE,IAAI;gBACF,MAAMC,uBAAuB,MAAM,IAAI,CAACT,OAAO,CAACM,YAAY,CAAC,wBAAwBI,QAAQ;gBAE7F,IAAID,sBAAsB;oBACxB,IAAI,CAACT,OAAO,CAACM,YAAY,CAAC,UAAUC,QAAQ,CAACJ,WAAWQ,KAAK;oBAE7D,OAAO;wBAAEC,SAAS,CAAC,CAACH;oBAAqB;gBAC3C;gBAEA,IAAI,CAACT,OAAO,CAACM,YAAY,CAAC,UAAUC,QAAQ,CAACJ,WAAWU,MAAM;gBAE9D,OAAO;oBAAEC,KAAK;gBAAS;YACzB,EAAE,OAAOA,KAAK;gBACZ,IAAI,CAACd,OAAO,CAACM,YAAY,CAAC,WAAWC,QAAQ;gBAC7C,IAAI,CAACP,OAAO,CAACM,YAAY,CAAC,UAAUC,QAAQ,CAACJ,WAAWU,MAAM;gBAE9D,OAAO;oBAAEC;gBAAI;YACf;QACF;aAEOC,aAAa;YAClB,IAAI,CAACf,OAAO,CAACM,YAAY,CAAC,WAAWC,QAAQ;YAC7C,IAAI,CAACP,OAAO,CAACM,YAAY,CAAC,UAAUC,QAAQ,CAACJ,WAAWa,QAAQ;YAChE,IAAI,CAACd,kBAAkB;QACzB;aAEOe,qBAAqB;YAC1B,IAAI,CAACC,SAAS,CAACC,SAAS,CAACC,KAAK,CAACC,cAAc,CAAC;gBAC5C,OAAO;YACT;QACF;QAEA;;;GAGC,QACMC,qBAAqB,CAACC;YAC3B,IAAI,CAACvB,OAAO,CAACM,YAAY,CAAC,oBAAoBC,QAAQ,CAACgB;QACzD;;AACF"}
@@ -1,14 +1,15 @@
1
1
  import { FeatureConfig } from '@streamlayer/sdk-web-types';
2
- import { AbstractFeature } from '@streamlayer/sdk-web-interfaces';
2
+ import { AbstractFeature, FeatureSource } from '@streamlayer/sdk-web-interfaces';
3
3
  import { StreamLayerContext } from '../';
4
4
  import { kFeatures, kFeatureInit } from '../keys';
5
5
  declare module '../core' {
6
6
  interface StreamLayerSDK {
7
7
  [kFeatures]: Map<FeatureConfig['name'], Feature>;
8
- [kFeatureInit]: (overlay: FeatureConfig) => void;
8
+ [kFeatureInit]: (overlay: FeatureConfig, source: FeatureSource) => Promise<void>;
9
9
  }
10
10
  }
11
11
  export declare class Feature extends AbstractFeature {
12
12
  }
13
- export declare const initFeature: (overlay: FeatureConfig) => Feature;
13
+ export declare const initFeature: (overlay: FeatureConfig, source: FeatureSource) => Feature;
14
+ export { FeatureSource } from '@streamlayer/sdk-web-interfaces';
14
15
  export declare const features: (instance: StreamLayerContext, opts: any, done: any) => void;
@@ -1,18 +1,34 @@
1
1
  import { AbstractFeature } from '@streamlayer/sdk-web-interfaces';
2
- import { kFeatures, kFeatureInit } from '../keys';
2
+ import { kFeatures, kFeatureInit, kFeatureUpdate, kFeatureDestroy } from '../keys';
3
3
  export class Feature extends AbstractFeature {
4
4
  }
5
- export const initFeature = (overlay)=>{
6
- return new Feature(overlay);
5
+ export const initFeature = (overlay, source)=>{
6
+ return new Feature(overlay, source);
7
7
  };
8
+ export { FeatureSource } from '@streamlayer/sdk-web-interfaces';
8
9
  export const features = (instance, opts, done)=>{
9
10
  instance.sdk[kFeatures] = new Map();
10
11
  /**
11
12
  * A distinct object instance is created and initialized for each overlay.
12
- */ instance.sdk[kFeatureInit] = (overlay)=>{
13
- const feature = initFeature(overlay);
13
+ */ instance.sdk.getFeatures = ()=>{
14
+ return instance.sdk[kFeatures];
15
+ };
16
+ instance.sdk[kFeatureInit] = async (overlay, source)=>{
17
+ if (instance.sdk[kFeatures].has(overlay.name)) {
18
+ await instance.sdk[kFeatureUpdate](overlay, source);
19
+ return;
20
+ }
21
+ const feature = initFeature(overlay, source);
14
22
  instance.sdk[kFeatures].set(overlay.name, feature);
15
23
  };
24
+ // eslint-disable-next-line require-await
25
+ instance.sdk[kFeatureUpdate] = async (overlay, source)=>{
26
+ instance.sdk[kFeatures].get(overlay.name).update(overlay, source);
27
+ };
28
+ // eslint-disable-next-line require-await
29
+ instance.sdk[kFeatureDestroy] = async (overlay)=>{
30
+ instance.sdk[kFeatures].delete(overlay.name);
31
+ };
16
32
  done();
17
33
  };
18
34
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/sdk-web/src/features/index.ts"],"sourcesContent":["import { FeatureConfig } from '@streamlayer/sdk-web-types'\nimport { AbstractFeature } from '@streamlayer/sdk-web-interfaces'\n\nimport { StreamLayerContext } from '../'\nimport { kFeatures, kFeatureInit } from '../keys'\n\ndeclare module '../core' {\n interface StreamLayerSDK {\n [kFeatures]: Map<FeatureConfig['name'], Feature>\n [kFeatureInit]: (overlay: FeatureConfig) => void\n }\n}\n\nexport class Feature extends AbstractFeature {}\n\nexport const initFeature = (overlay: FeatureConfig) => {\n return new Feature(overlay)\n}\n\nexport const features = (instance: StreamLayerContext, opts, done) => {\n instance.sdk[kFeatures] = new Map()\n\n /**\n * A distinct object instance is created and initialized for each overlay.\n */\n instance.sdk[kFeatureInit] = (overlay: FeatureConfig) => {\n const feature = initFeature(overlay)\n\n instance.sdk[kFeatures].set(overlay.name, feature)\n }\n\n done()\n}\n"],"names":["AbstractFeature","kFeatures","kFeatureInit","Feature","initFeature","overlay","features","instance","opts","done","sdk","Map","feature","set","name"],"mappings":"AACA,SAASA,eAAe,QAAQ,kCAAiC;AAGjE,SAASC,SAAS,EAAEC,YAAY,QAAQ,UAAS;AASjD,OAAO,MAAMC,gBAAgBH;AAAiB;AAE9C,OAAO,MAAMI,cAAc,CAACC;IAC1B,OAAO,IAAIF,QAAQE;AACrB,EAAC;AAED,OAAO,MAAMC,WAAW,CAACC,UAA8BC,MAAMC;IAC3DF,SAASG,GAAG,CAACT,UAAU,GAAG,IAAIU;IAE9B;;GAEC,GACDJ,SAASG,GAAG,CAACR,aAAa,GAAG,CAACG;QAC5B,MAAMO,UAAUR,YAAYC;QAE5BE,SAASG,GAAG,CAACT,UAAU,CAACY,GAAG,CAACR,QAAQS,IAAI,EAAEF;IAC5C;IAEAH;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../packages/sdk-web/src/features/index.ts"],"sourcesContent":["import { FeatureConfig } from '@streamlayer/sdk-web-types'\nimport { AbstractFeature, FeatureSource } from '@streamlayer/sdk-web-interfaces'\n\nimport { StreamLayerContext } from '../'\nimport { kFeatures, kFeatureInit, kFeatureUpdate, kFeatureDestroy } from '../keys'\n\ndeclare module '../core' {\n interface StreamLayerSDK {\n [kFeatures]: Map<FeatureConfig['name'], Feature>\n [kFeatureInit]: (overlay: FeatureConfig, source: FeatureSource) => Promise<void>\n }\n}\n\nexport class Feature extends AbstractFeature {}\nexport const initFeature = (overlay: FeatureConfig, source: FeatureSource) => {\n return new Feature(overlay, source)\n}\nexport { FeatureSource } from '@streamlayer/sdk-web-interfaces'\n\nexport const features = (instance: StreamLayerContext, opts, done) => {\n instance.sdk[kFeatures] = new Map()\n /**\n * A distinct object instance is created and initialized for each overlay.\n */\n instance.sdk.getFeatures = () => {\n return instance.sdk[kFeatures]\n }\n\n instance.sdk[kFeatureInit] = async (overlay: FeatureConfig, source: FeatureSource) => {\n if (instance.sdk[kFeatures].has(overlay.name)) {\n await instance.sdk[kFeatureUpdate](overlay, source)\n\n return\n }\n\n const feature = initFeature(overlay, source)\n\n instance.sdk[kFeatures].set(overlay.name, feature)\n }\n // eslint-disable-next-line require-await\n instance.sdk[kFeatureUpdate] = async (overlay: FeatureConfig, source: FeatureSource) => {\n instance.sdk[kFeatures].get(overlay.name).update(overlay, source)\n }\n\n // eslint-disable-next-line require-await\n instance.sdk[kFeatureDestroy] = async (overlay: FeatureConfig) => {\n instance.sdk[kFeatures].delete(overlay.name)\n }\n\n done()\n}\n"],"names":["AbstractFeature","kFeatures","kFeatureInit","kFeatureUpdate","kFeatureDestroy","Feature","initFeature","overlay","source","FeatureSource","features","instance","opts","done","sdk","Map","getFeatures","has","name","feature","set","get","update","delete"],"mappings":"AACA,SAASA,eAAe,QAAuB,kCAAiC;AAGhF,SAASC,SAAS,EAAEC,YAAY,EAAEC,cAAc,EAAEC,eAAe,QAAQ,UAAS;AASlF,OAAO,MAAMC,gBAAgBL;AAAiB;AAC9C,OAAO,MAAMM,cAAc,CAACC,SAAwBC;IAClD,OAAO,IAAIH,QAAQE,SAASC;AAC9B,EAAC;AACD,SAASC,aAAa,QAAQ,kCAAiC;AAE/D,OAAO,MAAMC,WAAW,CAACC,UAA8BC,MAAMC;IAC3DF,SAASG,GAAG,CAACb,UAAU,GAAG,IAAIc;IAC9B;;GAEC,GACDJ,SAASG,GAAG,CAACE,WAAW,GAAG;QACzB,OAAOL,SAASG,GAAG,CAACb,UAAU;IAChC;IAEAU,SAASG,GAAG,CAACZ,aAAa,GAAG,OAAOK,SAAwBC;QAC1D,IAAIG,SAASG,GAAG,CAACb,UAAU,CAACgB,GAAG,CAACV,QAAQW,IAAI,GAAG;YAC7C,MAAMP,SAASG,GAAG,CAACX,eAAe,CAACI,SAASC;YAE5C;QACF;QAEA,MAAMW,UAAUb,YAAYC,SAASC;QAErCG,SAASG,GAAG,CAACb,UAAU,CAACmB,GAAG,CAACb,QAAQW,IAAI,EAAEC;IAC5C;IACA,yCAAyC;IACzCR,SAASG,GAAG,CAACX,eAAe,GAAG,OAAOI,SAAwBC;QAC5DG,SAASG,GAAG,CAACb,UAAU,CAACoB,GAAG,CAACd,QAAQW,IAAI,EAAEI,MAAM,CAACf,SAASC;IAC5D;IAEA,yCAAyC;IACzCG,SAASG,GAAG,CAACV,gBAAgB,GAAG,OAAOG;QACrCI,SAASG,GAAG,CAACb,UAAU,CAACsB,MAAM,CAAChB,QAAQW,IAAI;IAC7C;IAEAL;AACF,EAAC"}
package/src/keys.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  export declare const kAuth: unique symbol;
2
2
  export declare const kFeatures: unique symbol;
3
3
  export declare const kFeatureInit: unique symbol;
4
+ export declare const kFeatureUpdate: unique symbol;
5
+ export declare const kFeatureDestroy: unique symbol;
4
6
  export declare const kStore: unique symbol;
5
7
  export declare const kStoreSubscribe: unique symbol;
6
8
  export declare const kStoreUnsubscribe: unique symbol;
package/src/keys.js CHANGED
@@ -1,6 +1,8 @@
1
1
  export const kAuth = Symbol('sdk-auth');
2
2
  export const kFeatures = Symbol('sdk-features');
3
3
  export const kFeatureInit = Symbol('sdk-features:initFeature');
4
+ export const kFeatureUpdate = Symbol('sdk-features:updateFeature');
5
+ export const kFeatureDestroy = Symbol('sdk-features:destroyFeature');
4
6
  export const kStore = Symbol('sdk-store');
5
7
  export const kStoreSubscribe = Symbol('sdk-store:storeSubscribe');
6
8
  export const kStoreUnsubscribe = Symbol('sdk-store:storeUnsubscribe');
package/src/keys.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../packages/sdk-web/src/keys.ts"],"sourcesContent":["export const kAuth = Symbol('sdk-auth')\n\nexport const kFeatures = Symbol('sdk-features')\nexport const kFeatureInit = Symbol('sdk-features:initFeature')\n\nexport const kStore = Symbol('sdk-store')\nexport const kStoreSubscribe = Symbol('sdk-store:storeSubscribe')\nexport const kStoreUnsubscribe = Symbol('sdk-store:storeUnsubscribe')\n"],"names":["kAuth","Symbol","kFeatures","kFeatureInit","kStore","kStoreSubscribe","kStoreUnsubscribe"],"mappings":"AAAA,OAAO,MAAMA,QAAQC,OAAO,YAAW;AAEvC,OAAO,MAAMC,YAAYD,OAAO,gBAAe;AAC/C,OAAO,MAAME,eAAeF,OAAO,4BAA2B;AAE9D,OAAO,MAAMG,SAASH,OAAO,aAAY;AACzC,OAAO,MAAMI,kBAAkBJ,OAAO,4BAA2B;AACjE,OAAO,MAAMK,oBAAoBL,OAAO,8BAA6B"}
1
+ {"version":3,"sources":["../../../../packages/sdk-web/src/keys.ts"],"sourcesContent":["export const kAuth = Symbol('sdk-auth')\n\nexport const kFeatures = Symbol('sdk-features')\nexport const kFeatureInit = Symbol('sdk-features:initFeature')\nexport const kFeatureUpdate = Symbol('sdk-features:updateFeature')\nexport const kFeatureDestroy = Symbol('sdk-features:destroyFeature')\n\nexport const kStore = Symbol('sdk-store')\nexport const kStoreSubscribe = Symbol('sdk-store:storeSubscribe')\nexport const kStoreUnsubscribe = Symbol('sdk-store:storeUnsubscribe')\n"],"names":["kAuth","Symbol","kFeatures","kFeatureInit","kFeatureUpdate","kFeatureDestroy","kStore","kStoreSubscribe","kStoreUnsubscribe"],"mappings":"AAAA,OAAO,MAAMA,QAAQC,OAAO,YAAW;AAEvC,OAAO,MAAMC,YAAYD,OAAO,gBAAe;AAC/C,OAAO,MAAME,eAAeF,OAAO,4BAA2B;AAC9D,OAAO,MAAMG,iBAAiBH,OAAO,8BAA6B;AAClE,OAAO,MAAMI,kBAAkBJ,OAAO,+BAA8B;AAEpE,OAAO,MAAMK,SAASL,OAAO,aAAY;AACzC,OAAO,MAAMM,kBAAkBN,OAAO,4BAA2B;AACjE,OAAO,MAAMO,oBAAoBP,OAAO,8BAA6B"}
@@ -1,3 +1,4 @@
1
+ import { FeatureSource } from '@streamlayer/sdk-web-interfaces';
1
2
  import { kStore, kStoreSubscribe, kStoreUnsubscribe, kFeatureInit } from '../keys';
2
3
  import { CoreStore } from './store';
3
4
  /**
@@ -10,6 +11,17 @@ import { CoreStore } from './store';
10
11
  * based on their dependencies. In certain cases, specific logic is
11
12
  * directly invoked in response to changes in the store.
12
13
  */ instance.sdk[kStoreSubscribe] = ()=>{
14
+ const processSettings = (source, settings)=>{
15
+ if (!settings.data) return;
16
+ const featureNames = new Set();
17
+ for (const overlay of settings.data.overlays){
18
+ const featureName = overlay.name;
19
+ featureNames.add(featureName);
20
+ instance.sdk[kFeatureInit](overlay, source).catch((initError)=>{
21
+ console.error(`Error initializing feature "${featureName}": ${initError}`);
22
+ });
23
+ }
24
+ };
13
25
  const subscribes = {
14
26
  /**
15
27
  * During the initial SDK initialization, it's imperative to initialize features first,
@@ -19,12 +31,19 @@ import { CoreStore } from './store';
19
31
  * has already been initialized. If it has, events related to
20
32
  * that feature should be skipped. Conversely, if a feature is
21
33
  * missing in the new settings, it should be deinitialized.
22
- */ organizationSettings: (orgSettings, changedKey)=>{
23
- if (changedKey === 'data' && orgSettings.data) {
34
+ */ organizationSettings: (orgSettings)=>{
35
+ if (orgSettings.data) {
36
+ try {
37
+ processSettings(FeatureSource.ORGANIZATION, orgSettings);
38
+ } catch (err) {
39
+ console.log(err);
40
+ }
41
+ }
42
+ },
43
+ streamSettings: (streamSettings)=>{
44
+ if (streamSettings.data) {
24
45
  try {
25
- for (const overlay of orgSettings.data.overlays){
26
- instance.sdk[kFeatureInit](overlay);
27
- }
46
+ processSettings(FeatureSource.STREAM, streamSettings);
28
47
  } catch (err) {
29
48
  console.log(err);
30
49
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/sdk-web/src/store/index.ts"],"sourcesContent":["import { StreamLayerContext } from '../'\nimport { kStore, kStoreSubscribe, kStoreUnsubscribe, kFeatureInit } from '../keys'\n\nimport { CoreStore, StoreListeners } from './store'\n\ndeclare module '../core' {\n interface StreamLayerSDK {\n [kStore]: CoreStore\n sdkStore: () => CoreStore\n [kStoreSubscribe]: () => void\n [kStoreUnsubscribe]: () => void\n }\n}\n\n/**\n * store plugin, connect store to sdk\n */\nexport const store = (instance: StreamLayerContext, opts, done) => {\n instance.sdk[kStore] = new CoreStore(instance.sdk.transport)\n\n instance.sdk.sdkStore = () => instance.sdk[kStore]\n\n /**\n * Essentially, features and stores establish subscriptions to other stores\n * based on their dependencies. In certain cases, specific logic is\n * directly invoked in response to changes in the store.\n */\n instance.sdk[kStoreSubscribe] = () => {\n const subscribes: Partial<StoreListeners> = {\n /**\n * During the initial SDK initialization, it's imperative to initialize features first,\n * followed by their direct subscriptions to store fields.\n * This section is currently in development, and it's\n * essential to implement checks to determine whether a feature\n * has already been initialized. If it has, events related to\n * that feature should be skipped. Conversely, if a feature is\n * missing in the new settings, it should be deinitialized.\n */\n organizationSettings: (orgSettings, changedKey) => {\n if (changedKey === 'data' && orgSettings.data) {\n try {\n for (const overlay of orgSettings.data.overlays) {\n instance.sdk[kFeatureInit](overlay)\n }\n } catch (err) {\n console.log(err)\n }\n }\n },\n }\n\n instance.sdk[kStore].subscribe(subscribes)\n }\n\n instance.sdk[kStoreUnsubscribe] = () => {\n instance.sdk[kStore].unsubscribe()\n }\n\n done()\n}\n"],"names":["kStore","kStoreSubscribe","kStoreUnsubscribe","kFeatureInit","CoreStore","store","instance","opts","done","sdk","transport","sdkStore","subscribes","organizationSettings","orgSettings","changedKey","data","overlay","overlays","err","console","log","subscribe","unsubscribe"],"mappings":"AACA,SAASA,MAAM,EAAEC,eAAe,EAAEC,iBAAiB,EAAEC,YAAY,QAAQ,UAAS;AAElF,SAASC,SAAS,QAAwB,UAAS;AAWnD;;CAEC,GACD,OAAO,MAAMC,QAAQ,CAACC,UAA8BC,MAAMC;IACxDF,SAASG,GAAG,CAACT,OAAO,GAAG,IAAII,UAAUE,SAASG,GAAG,CAACC,SAAS;IAE3DJ,SAASG,GAAG,CAACE,QAAQ,GAAG,IAAML,SAASG,GAAG,CAACT,OAAO;IAElD;;;;GAIC,GACDM,SAASG,GAAG,CAACR,gBAAgB,GAAG;QAC9B,MAAMW,aAAsC;YAC1C;;;;;;;;OAQC,GACDC,sBAAsB,CAACC,aAAaC;gBAClC,IAAIA,eAAe,UAAUD,YAAYE,IAAI,EAAE;oBAC7C,IAAI;wBACF,KAAK,MAAMC,WAAWH,YAAYE,IAAI,CAACE,QAAQ,CAAE;4BAC/CZ,SAASG,GAAG,CAACN,aAAa,CAACc;wBAC7B;oBACF,EAAE,OAAOE,KAAK;wBACZC,QAAQC,GAAG,CAACF;oBACd;gBACF;YACF;QACF;QAEAb,SAASG,GAAG,CAACT,OAAO,CAACsB,SAAS,CAACV;IACjC;IAEAN,SAASG,GAAG,CAACP,kBAAkB,GAAG;QAChCI,SAASG,GAAG,CAACT,OAAO,CAACuB,WAAW;IAClC;IAEAf;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../packages/sdk-web/src/store/index.ts"],"sourcesContent":["import { FeatureSource } from '@streamlayer/sdk-web-interfaces'\n\nimport { StreamLayerContext } from '../'\nimport { kStore, kStoreSubscribe, kStoreUnsubscribe, kFeatureInit } from '../keys'\n\nimport { CoreStore, StoreListeners } from './store'\n\ndeclare module '../core' {\n interface StreamLayerSDK {\n [kStore]: CoreStore\n sdkStore: () => CoreStore\n [kStoreSubscribe]: () => void\n [kStoreUnsubscribe]: () => void\n }\n}\n\n/**\n * store plugin, connect store to sdk\n */\nexport const store = (instance: StreamLayerContext, opts, done) => {\n instance.sdk[kStore] = new CoreStore(instance.sdk.transport)\n\n instance.sdk.sdkStore = () => instance.sdk[kStore]\n\n /**\n * Essentially, features and stores establish subscriptions to other stores\n * based on their dependencies. In certain cases, specific logic is\n * directly invoked in response to changes in the store.\n */\n instance.sdk[kStoreSubscribe] = () => {\n const processSettings = (source, settings) => {\n if (!settings.data) return\n\n const featureNames = new Set()\n\n for (const overlay of settings.data.overlays) {\n const featureName = overlay.name\n\n featureNames.add(featureName)\n\n instance.sdk[kFeatureInit](overlay, source).catch((initError) => {\n console.error(`Error initializing feature \"${featureName}\": ${initError}`)\n })\n }\n }\n\n const subscribes: Partial<StoreListeners> = {\n /**\n * During the initial SDK initialization, it's imperative to initialize features first,\n * followed by their direct subscriptions to store fields.\n * This section is currently in development, and it's\n * essential to implement checks to determine whether a feature\n * has already been initialized. If it has, events related to\n * that feature should be skipped. Conversely, if a feature is\n * missing in the new settings, it should be deinitialized.\n */\n organizationSettings: (orgSettings) => {\n if (orgSettings.data) {\n try {\n processSettings(FeatureSource.ORGANIZATION, orgSettings)\n } catch (err) {\n console.log(err)\n }\n }\n },\n streamSettings: (streamSettings) => {\n if (streamSettings.data) {\n try {\n processSettings(FeatureSource.STREAM, streamSettings)\n } catch (err) {\n console.log(err)\n }\n }\n },\n }\n\n instance.sdk[kStore].subscribe(subscribes)\n }\n\n instance.sdk[kStoreUnsubscribe] = () => {\n instance.sdk[kStore].unsubscribe()\n }\n\n done()\n}\n"],"names":["FeatureSource","kStore","kStoreSubscribe","kStoreUnsubscribe","kFeatureInit","CoreStore","store","instance","opts","done","sdk","transport","sdkStore","processSettings","source","settings","data","featureNames","Set","overlay","overlays","featureName","name","add","catch","initError","console","error","subscribes","organizationSettings","orgSettings","ORGANIZATION","err","log","streamSettings","STREAM","subscribe","unsubscribe"],"mappings":"AAAA,SAASA,aAAa,QAAQ,kCAAiC;AAG/D,SAASC,MAAM,EAAEC,eAAe,EAAEC,iBAAiB,EAAEC,YAAY,QAAQ,UAAS;AAElF,SAASC,SAAS,QAAwB,UAAS;AAWnD;;CAEC,GACD,OAAO,MAAMC,QAAQ,CAACC,UAA8BC,MAAMC;IACxDF,SAASG,GAAG,CAACT,OAAO,GAAG,IAAII,UAAUE,SAASG,GAAG,CAACC,SAAS;IAE3DJ,SAASG,GAAG,CAACE,QAAQ,GAAG,IAAML,SAASG,GAAG,CAACT,OAAO;IAElD;;;;GAIC,GACDM,SAASG,GAAG,CAACR,gBAAgB,GAAG;QAC9B,MAAMW,kBAAkB,CAACC,QAAQC;YAC/B,IAAI,CAACA,SAASC,IAAI,EAAE;YAEpB,MAAMC,eAAe,IAAIC;YAEzB,KAAK,MAAMC,WAAWJ,SAASC,IAAI,CAACI,QAAQ,CAAE;gBAC5C,MAAMC,cAAcF,QAAQG,IAAI;gBAEhCL,aAAaM,GAAG,CAACF;gBAEjBd,SAASG,GAAG,CAACN,aAAa,CAACe,SAASL,QAAQU,KAAK,CAAC,CAACC;oBACjDC,QAAQC,KAAK,CAAC,CAAC,4BAA4B,EAAEN,YAAY,GAAG,EAAEI,UAAU,CAAC;gBAC3E;YACF;QACF;QAEA,MAAMG,aAAsC;YAC1C;;;;;;;;OAQC,GACDC,sBAAsB,CAACC;gBACrB,IAAIA,YAAYd,IAAI,EAAE;oBACpB,IAAI;wBACFH,gBAAgBb,cAAc+B,YAAY,EAAED;oBAC9C,EAAE,OAAOE,KAAK;wBACZN,QAAQO,GAAG,CAACD;oBACd;gBACF;YACF;YACAE,gBAAgB,CAACA;gBACf,IAAIA,eAAelB,IAAI,EAAE;oBACvB,IAAI;wBACFH,gBAAgBb,cAAcmC,MAAM,EAAED;oBACxC,EAAE,OAAOF,KAAK;wBACZN,QAAQO,GAAG,CAACD;oBACd;gBACF;YACF;QACF;QAEAzB,SAASG,GAAG,CAACT,OAAO,CAACmC,SAAS,CAACR;IACjC;IAEArB,SAASG,GAAG,CAACP,kBAAkB,GAAG;QAChCI,SAASG,GAAG,CAACT,OAAO,CAACoC,WAAW;IAClC;IAEA5B;AACF,EAAC"}
@@ -25,14 +25,30 @@ declare const initializeStore: (transport: Transport) => {
25
25
  readonly enabled: SingleStore<unknown, import("nanostores").WritableAtom<"on">>;
26
26
  readonly status: SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus>>;
27
27
  readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string>>;
28
- readonly slStreamId: ApiStore<any>;
29
- readonly streamSettings: ApiStore<any>;
30
- readonly user: ApiStore<any>;
28
+ readonly slStreamId: ApiStore<import("@nanostores/query").FetcherStore<string, any>>;
29
+ readonly streamSettings: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings, any>>;
30
+ readonly user: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse, any>>;
31
31
  readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string>>;
32
32
  readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string>>;
33
- readonly userSettings: ApiStore<any>;
34
- readonly organizationSettings: ApiStore<any>;
35
- readonly organizationAdvertising: ApiStore<any>;
33
+ readonly userSettings: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings, any>>;
34
+ readonly organizationSettings: ApiStore<import("@nanostores/query").FetcherStore<{
35
+ id: string;
36
+ overlays: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[];
37
+ buttonIcon: string;
38
+ tinodeHost: string;
39
+ audience: string;
40
+ name: string;
41
+ provider: string;
42
+ primaryColor: string;
43
+ secondaryColor: string;
44
+ moderationPrimaryColor: string;
45
+ linkShareIcon: string;
46
+ linkShareText: string;
47
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults;
48
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK;
49
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient;
50
+ }, any>>;
51
+ readonly organizationAdvertising: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising, any>>;
36
52
  };
37
53
  type StoreObj = ReturnType<typeof initializeStore>;
38
54
  export type CoreStores = {
@@ -45,32 +61,64 @@ export type CoreStoreInstance = ReturnType<typeof mergeStores<StoreObj>>;
45
61
  export declare class CoreStore extends AbstractStore<CoreStoreInstance> {
46
62
  private stores;
47
63
  constructor(transport: Transport);
48
- getStoreItem: <T extends "enabled" | "status" | "providerStreamId" | "slStreamId" | "streamSettings" | "user" | "userKey" | "userToken" | "userSettings" | "organizationSettings" | "organizationAdvertising" = "enabled" | "status" | "providerStreamId" | "slStreamId" | "streamSettings" | "user" | "userKey" | "userToken" | "userSettings" | "organizationSettings" | "organizationAdvertising">(key: T) => {
64
+ getStoreItem: <T extends "userKey" | "enabled" | "status" | "providerStreamId" | "slStreamId" | "streamSettings" | "user" | "userToken" | "userSettings" | "organizationSettings" | "organizationAdvertising" = "userKey" | "enabled" | "status" | "providerStreamId" | "slStreamId" | "streamSettings" | "user" | "userToken" | "userSettings" | "organizationSettings" | "organizationAdvertising">(key: T) => {
49
65
  readonly enabled: SingleStore<unknown, import("nanostores").WritableAtom<"on">>;
50
66
  readonly status: SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus>>;
51
67
  readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string>>;
52
- readonly slStreamId: ApiStore<any>;
53
- readonly streamSettings: ApiStore<any>;
54
- readonly user: ApiStore<any>;
68
+ readonly slStreamId: ApiStore<import("@nanostores/query").FetcherStore<string, any>>;
69
+ readonly streamSettings: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings, any>>;
70
+ readonly user: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse, any>>;
55
71
  readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string>>;
56
72
  readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string>>;
57
- readonly userSettings: ApiStore<any>;
58
- readonly organizationSettings: ApiStore<any>;
59
- readonly organizationAdvertising: ApiStore<any>;
73
+ readonly userSettings: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings, any>>;
74
+ readonly organizationSettings: ApiStore<import("@nanostores/query").FetcherStore<{
75
+ id: string;
76
+ overlays: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[];
77
+ buttonIcon: string;
78
+ tinodeHost: string;
79
+ audience: string;
80
+ name: string;
81
+ provider: string;
82
+ primaryColor: string;
83
+ secondaryColor: string;
84
+ moderationPrimaryColor: string;
85
+ linkShareIcon: string;
86
+ linkShareText: string;
87
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults;
88
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK;
89
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient;
90
+ }, any>>;
91
+ readonly organizationAdvertising: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising, any>>;
60
92
  }[T];
61
93
  getValue(): unknown;
62
94
  getValues(): {
63
95
  readonly enabled: SingleStore<unknown, import("nanostores").WritableAtom<"on">>;
64
96
  readonly status: SingleStore<unknown, import("nanostores").WritableAtom<CoreStatus>>;
65
97
  readonly providerStreamId: SingleStore<unknown, import("nanostores").WritableAtom<string>>;
66
- readonly slStreamId: ApiStore<any>;
67
- readonly streamSettings: ApiStore<any>;
68
- readonly user: ApiStore<any>;
98
+ readonly slStreamId: ApiStore<import("@nanostores/query").FetcherStore<string, any>>;
99
+ readonly streamSettings: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").StreamSettings, any>>;
100
+ readonly user: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/users/users_pb").MeResponse, any>>;
69
101
  readonly userKey: SingleStore<unknown, import("nanostores").WritableAtom<string>>;
70
102
  readonly userToken: SingleStore<unknown, import("nanostores").WritableAtom<string>>;
71
- readonly userSettings: ApiStore<any>;
72
- readonly organizationSettings: ApiStore<any>;
73
- readonly organizationAdvertising: ApiStore<any>;
103
+ readonly userSettings: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/client/client_pb").ClientSettings, any>>;
104
+ readonly organizationSettings: ApiStore<import("@nanostores/query").FetcherStore<{
105
+ id: string;
106
+ overlays: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").SdkOverlay[];
107
+ buttonIcon: string;
108
+ tinodeHost: string;
109
+ audience: string;
110
+ name: string;
111
+ provider: string;
112
+ primaryColor: string;
113
+ secondaryColor: string;
114
+ moderationPrimaryColor: string;
115
+ linkShareIcon: string;
116
+ linkShareText: string;
117
+ brandDefaults?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").BrandDefaults;
118
+ pub?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").JWK;
119
+ getstream?: import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").GetStreamSettingsClient;
120
+ }, any>>;
121
+ readonly organizationAdvertising: ApiStore<import("@nanostores/query").FetcherStore<import("@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb").Advertising, any>>;
74
122
  };
75
123
  setValue(): void;
76
124
  subscribe: (subscribes: Partial<StoreListeners>) => void;