buzzcasting-storage 2.4.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,7 +40,7 @@ export declare class BuzzcastingStorageReader {
40
40
  getSeries: (query: IQuery) => Promise<IResponse>;
41
41
  }
42
42
 
43
- declare interface Category {
43
+ export declare interface Category {
44
44
  type: string;
45
45
  data: string[];
46
46
  }
@@ -73,7 +73,7 @@ export declare interface Dynamics {
73
73
  trending_score?: number;
74
74
  }
75
75
 
76
- declare interface Geo {
76
+ export declare interface Geo {
77
77
  latitude: number;
78
78
  longitude: number;
79
79
  zip: string;
@@ -105,7 +105,7 @@ export declare interface IMessages {
105
105
  data?: Message[];
106
106
  }
107
107
 
108
- declare interface IMessagesData {
108
+ export declare interface IMessagesData {
109
109
  messages: IMessages;
110
110
  presentation?: string;
111
111
  slide?: string;
@@ -113,7 +113,7 @@ declare interface IMessagesData {
113
113
  query: IQuery;
114
114
  }
115
115
 
116
- declare interface Indicators {
116
+ export declare interface Indicators {
117
117
  value: number;
118
118
  }
119
119
 
@@ -169,10 +169,12 @@ export declare interface ISeries {
169
169
  */
170
170
  export declare interface IStorageOptions {
171
171
  app: string;
172
+ domain?: string;
173
+ channel?: string;
174
+ presentation?: string;
175
+ slide?: string;
172
176
  version: string;
173
177
  storage: string;
174
- slide?: string;
175
- presentation?: string;
176
178
  token?: string;
177
179
  bearer?: string;
178
180
  csrf?: string;
@@ -226,7 +228,7 @@ export declare const MESSAGES = "messages";
226
228
 
227
229
  export declare const MESSAGES_CSS = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;";
228
230
 
229
- declare interface Metrics {
231
+ export declare interface Metrics {
230
232
  doc: number;
231
233
  previous: number;
232
234
  change: number;
@@ -290,7 +292,7 @@ export declare const SUBSCRIBE = "subscribe";
290
292
 
291
293
  export declare const SUBSCRIBE_CSS = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;";
292
294
 
293
- declare interface Topic {
295
+ export declare interface Topic {
294
296
  topic: string;
295
297
  engagement: number;
296
298
  impressions: number;
@@ -302,6 +304,33 @@ export declare const TOPICS = "topics";
302
304
 
303
305
  export declare const WIDGET = "widget";
304
306
 
307
+ export declare class Widget {
308
+ private storageReader;
309
+ private broadcastChannel;
310
+ private query;
311
+ private readonly listeners;
312
+ /**
313
+ *
314
+ * @param callbacks functions in the widget that will receive the update
315
+ * @param query
316
+ */
317
+ constructor(callbacks: Array<(arg: IResponse) => void>, query: IQuery);
318
+ addListener(cb: (arg: IResponse) => void): void;
319
+ /**
320
+ * Data received from BroadcastChannel
321
+ * @param messageEvent
322
+ */
323
+ startListener(): void;
324
+ subscribe(): void;
325
+ getCloud: () => Promise<IResponse>;
326
+ getMessages: () => Promise<IResponse>;
327
+ getSeries: () => Promise<IResponse>;
328
+ }
329
+
330
+ export declare const WIDGET_CSS = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;";
331
+
332
+ export declare function widgetParams(query: IQuery): IQuery;
333
+
305
334
  export declare const WIDGETS = "widgets";
306
335
 
307
336
  export declare const WS_CSS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;";