@xibosignage/xibo-communication-framework 0.0.5 → 0.0.7

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,8 +8,13 @@ export interface XmrEvents {
8
8
  collectNow: () => void;
9
9
  screenShot: () => void;
10
10
  licenceCheck: () => void;
11
- showStatusWindow: (timeout: number) => void;
12
- forceUpdateChromeOS: () => void;
11
+ criteriaUpdate: (criteriaUpdates: {
12
+ metric: string;
13
+ value: string;
14
+ ttl: number;
15
+ }[]) => void;
16
+ commandCodeReceived: (commandCode: string) => void;
17
+ dataUpdate: (widgetId: number) => void;
13
18
  }
14
19
  export default class Xmr {
15
20
  emitter: Emitter<XmrEvents>;
@@ -8504,11 +8504,12 @@ 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');
8507
+ } else if (message.action == 'criteriaUpdate') {
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);
8512
8513
  } else {
8513
8514
  console.error('Xmr::message: unknown action: ' + message.action);
8514
8515
  }