@sprucelabs/spruce-heartwood-utils 22.0.0 → 23.0.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.
@@ -15,5 +15,7 @@ export declare class HeartwoodDevice extends EventEmitter implements Device {
15
15
  getOrientation(): Orientation;
16
16
  enablePushNotifications(): void;
17
17
  signalSkillViewLoaded(): void;
18
- sendCommand(command: string, payload?: Record<string, any>): Promise<void>;
18
+ sendCommand(command: string, payload?: Record<string, any>): void;
19
+ getIsKioskModeEnabled(): Promise<boolean>;
20
+ setIsKioskModeEnabled(_isKiosk: boolean): void;
19
21
  }
@@ -50,7 +50,7 @@ class HeartwoodDevice extends events_1.default {
50
50
  signalSkillViewLoaded() {
51
51
  void this.sendCommand('skillViewLoaded');
52
52
  }
53
- async sendCommand(command, payload) {
53
+ sendCommand(command, payload) {
54
54
  var _a, _b, _c, _d, _e, _f, _g;
55
55
  const options = {
56
56
  command,
@@ -65,6 +65,10 @@ class HeartwoodDevice extends events_1.default {
65
65
  (_g = (_f = window.api) === null || _f === void 0 ? void 0 : _f.postMessage) === null || _g === void 0 ? void 0 : _g.call(_f, message);
66
66
  this.emit('command', command, payload);
67
67
  }
68
+ async getIsKioskModeEnabled() {
69
+ return false;
70
+ }
71
+ setIsKioskModeEnabled(_isKiosk) { }
68
72
  }
69
73
  exports.HeartwoodDevice = HeartwoodDevice;
70
74
  //# sourceMappingURL=HeartwoodDevice.js.map
@@ -15,5 +15,7 @@ export declare class HeartwoodDevice extends EventEmitter implements Device {
15
15
  getOrientation(): Orientation;
16
16
  enablePushNotifications(): void;
17
17
  signalSkillViewLoaded(): void;
18
- sendCommand(command: string, payload?: Record<string, any>): Promise<void>;
18
+ sendCommand(command: string, payload?: Record<string, any>): void;
19
+ getIsKioskModeEnabled(): Promise<boolean>;
20
+ setIsKioskModeEnabled(_isKiosk: boolean): void;
19
21
  }
@@ -54,20 +54,24 @@ export class HeartwoodDevice extends EventEmitter {
54
54
  void this.sendCommand('skillViewLoaded');
55
55
  }
56
56
  sendCommand(command, payload) {
57
+ var _a, _b, _c, _d, _e, _f, _g;
58
+ const options = {
59
+ command,
60
+ payload,
61
+ };
62
+ const message = JSON.stringify(options);
63
+ //@ts-ignore
64
+ (_d = (_c = (_b = (_a = window.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.messages) === null || _c === void 0 ? void 0 : _c.postMessage) === null || _d === void 0 ? void 0 : _d.call(_c, message);
65
+ // @ts-ignore
66
+ (_e = window.AndroidInterface) === null || _e === void 0 ? void 0 : _e.postMessage(message);
67
+ //@ts-ignore
68
+ (_g = (_f = window.api) === null || _f === void 0 ? void 0 : _f.postMessage) === null || _g === void 0 ? void 0 : _g.call(_f, message);
69
+ this.emit('command', command, payload);
70
+ }
71
+ getIsKioskModeEnabled() {
57
72
  return __awaiter(this, void 0, void 0, function* () {
58
- var _a, _b, _c, _d, _e, _f, _g;
59
- const options = {
60
- command,
61
- payload,
62
- };
63
- const message = JSON.stringify(options);
64
- //@ts-ignore
65
- (_d = (_c = (_b = (_a = window.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.messages) === null || _c === void 0 ? void 0 : _c.postMessage) === null || _d === void 0 ? void 0 : _d.call(_c, message);
66
- // @ts-ignore
67
- (_e = window.AndroidInterface) === null || _e === void 0 ? void 0 : _e.postMessage(message);
68
- //@ts-ignore
69
- (_g = (_f = window.api) === null || _f === void 0 ? void 0 : _f.postMessage) === null || _g === void 0 ? void 0 : _g.call(_f, message);
70
- this.emit('command', command, payload);
73
+ return false;
71
74
  });
72
75
  }
76
+ setIsKioskModeEnabled(_isKiosk) { }
73
77
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-heartwood-utils",
3
3
  "description": "Heartwood Utilities",
4
- "version": "22.0.0",
4
+ "version": "23.0.0",
5
5
  "skill": {
6
6
  "namespace": "heartwood"
7
7
  },