@xibosignage/xibo-communication-framework 0.0.6 → 0.0.8

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.
@@ -1 +1,2 @@
1
- export { default as Xmr, XmrEvents, } from './xmr';
1
+ export type { XmrEvents } from './xmr';
2
+ export { default as Xmr } from './xmr';
@@ -8,14 +8,15 @@ export interface XmrEvents {
8
8
  collectNow: () => void;
9
9
  screenShot: () => void;
10
10
  licenceCheck: () => void;
11
- showStatusWindow: (timeout: number) => void;
12
- forceUpdateChromeOS: () => void;
13
11
  criteriaUpdate: (criteriaUpdates: {
14
12
  metric: string;
15
13
  value: string;
16
14
  ttl: number;
17
15
  }[]) => void;
18
- currentGeoLocation: () => void;
16
+ commandCodeReceived: (commandCode: string) => void;
17
+ dataUpdate: (widgetId: number) => void;
18
+ purgeAll: () => void;
19
+ clearStatsAndLogs: () => void;
19
20
  }
20
21
  export default class Xmr {
21
22
  emitter: Emitter<XmrEvents>;
@@ -8504,15 +8504,16 @@ var Xmr = /*#__PURE__*/function () {
8504
8504
  _this2.emitter.emit('screenShot');
8505
8505
  } else if (message.action === 'licenceCheck') {
8506
8506
  _this2.emitter.emit('licenceCheck');
8507
- } else if (message.action == 'commandAction' && message.commandCode.startsWith('showStatusWindow')) {
8508
- var split = message.commandCode.split('|');
8509
- _this2.emitter.emit('showStatusWindow', parseInt(split[1]) || 60);
8510
- } else if (message.action == 'commandAction' && message.commandCode.startsWith('forceUpdateChromeOS')) {
8511
- _this2.emitter.emit('forceUpdateChromeOS');
8512
- } else if (message.action == 'commandAction' && message.commandCode.startsWith('currentGeoLocation')) {
8513
- _this2.emitter.emit('currentGeoLocation');
8514
8507
  } else if (message.action == 'criteriaUpdate') {
8515
8508
  _this2.emitter.emit('criteriaUpdate', message.criteriaUpdates);
8509
+ } else if (message.action == 'commandAction') {
8510
+ _this2.emitter.emit('commandCodeReceived', message.commandCode);
8511
+ } else if (message.action == 'dataUpdate') {
8512
+ _this2.emitter.emit('dataUpdate', message.widgetId);
8513
+ } else if (message.action == 'purgeAll') {
8514
+ _this2.emitter.emit('purgeAll');
8515
+ } else if (message.action == 'clearStatsAndLogs') {
8516
+ _this2.emitter.emit('clearStatsAndLogs');
8516
8517
  } else {
8517
8518
  console.error('Xmr::message: unknown action: ' + message.action);
8518
8519
  }