@sprucelabs/spruce-heartwood-utils 21.4.18 → 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.
@@ -16,4 +16,6 @@ export declare class HeartwoodDevice extends EventEmitter implements Device {
16
16
  enablePushNotifications(): void;
17
17
  signalSkillViewLoaded(): void;
18
18
  sendCommand(command: string, payload?: Record<string, any>): void;
19
+ getIsKioskModeEnabled(): Promise<boolean>;
20
+ setIsKioskModeEnabled(_isKiosk: boolean): void;
19
21
  }
@@ -13,7 +13,7 @@ class HeartwoodDevice extends events_1.default {
13
13
  this.storage = storage;
14
14
  }
15
15
  openUrl(url) {
16
- this.sendCommand('openUrl', {
16
+ void this.sendCommand('openUrl', {
17
17
  url,
18
18
  });
19
19
  }
@@ -36,7 +36,7 @@ class HeartwoodDevice extends events_1.default {
36
36
  window.location.href = `tel:${phoneNumber}`;
37
37
  }
38
38
  vibrate() {
39
- this.sendCommand('vibrate');
39
+ void this.sendCommand('vibrate');
40
40
  }
41
41
  setOrientation(orientation) {
42
42
  this.orientation = orientation;
@@ -45,10 +45,10 @@ class HeartwoodDevice extends events_1.default {
45
45
  return this.orientation;
46
46
  }
47
47
  enablePushNotifications() {
48
- this.sendCommand('enablePushNotifications');
48
+ void this.sendCommand('enablePushNotifications');
49
49
  }
50
50
  signalSkillViewLoaded() {
51
- this.sendCommand('skillViewLoaded');
51
+ void this.sendCommand('skillViewLoaded');
52
52
  }
53
53
  sendCommand(command, payload) {
54
54
  var _a, _b, _c, _d, _e, _f, _g;
@@ -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
@@ -16,4 +16,6 @@ export declare class HeartwoodDevice extends EventEmitter implements Device {
16
16
  enablePushNotifications(): void;
17
17
  signalSkillViewLoaded(): void;
18
18
  sendCommand(command: string, payload?: Record<string, any>): void;
19
+ getIsKioskModeEnabled(): Promise<boolean>;
20
+ setIsKioskModeEnabled(_isKiosk: boolean): void;
19
21
  }
@@ -1,3 +1,12 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  import EventEmitter from 'events';
2
11
  import { assertOptions } from '@sprucelabs/schema';
3
12
  export class HeartwoodDevice extends EventEmitter {
@@ -7,7 +16,7 @@ export class HeartwoodDevice extends EventEmitter {
7
16
  this.storage = storage;
8
17
  }
9
18
  openUrl(url) {
10
- this.sendCommand('openUrl', {
19
+ void this.sendCommand('openUrl', {
11
20
  url,
12
21
  });
13
22
  }
@@ -30,7 +39,7 @@ export class HeartwoodDevice extends EventEmitter {
30
39
  window.location.href = `tel:${phoneNumber}`;
31
40
  }
32
41
  vibrate() {
33
- this.sendCommand('vibrate');
42
+ void this.sendCommand('vibrate');
34
43
  }
35
44
  setOrientation(orientation) {
36
45
  this.orientation = orientation;
@@ -39,10 +48,10 @@ export class HeartwoodDevice extends EventEmitter {
39
48
  return this.orientation;
40
49
  }
41
50
  enablePushNotifications() {
42
- this.sendCommand('enablePushNotifications');
51
+ void this.sendCommand('enablePushNotifications');
43
52
  }
44
53
  signalSkillViewLoaded() {
45
- this.sendCommand('skillViewLoaded');
54
+ void this.sendCommand('skillViewLoaded');
46
55
  }
47
56
  sendCommand(command, payload) {
48
57
  var _a, _b, _c, _d, _e, _f, _g;
@@ -59,4 +68,10 @@ export class HeartwoodDevice extends EventEmitter {
59
68
  (_g = (_f = window.api) === null || _f === void 0 ? void 0 : _f.postMessage) === null || _g === void 0 ? void 0 : _g.call(_f, message);
60
69
  this.emit('command', command, payload);
61
70
  }
71
+ getIsKioskModeEnabled() {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ return false;
74
+ });
75
+ }
76
+ setIsKioskModeEnabled(_isKiosk) { }
62
77
  }
@@ -4,11 +4,11 @@ export default class AutoLogoutViewPluginImpl {
4
4
  this.device = device;
5
5
  }
6
6
  enableAutoLogout(durationSec) {
7
- this.device.sendCommand('enableAutoLogout', {
7
+ void this.device.sendCommand('enableAutoLogout', {
8
8
  durationSec,
9
9
  });
10
10
  }
11
11
  disableAutoLogout() {
12
- this.device.sendCommand('disableAutoLogout', {});
12
+ void this.device.sendCommand('disableAutoLogout', {});
13
13
  }
14
14
  }
@@ -6,12 +6,12 @@ class AutoLogoutViewPluginImpl {
6
6
  this.device = device;
7
7
  }
8
8
  enableAutoLogout(durationSec) {
9
- this.device.sendCommand('enableAutoLogout', {
9
+ void this.device.sendCommand('enableAutoLogout', {
10
10
  durationSec,
11
11
  });
12
12
  }
13
13
  disableAutoLogout() {
14
- this.device.sendCommand('disableAutoLogout', {});
14
+ void this.device.sendCommand('disableAutoLogout', {});
15
15
  }
16
16
  }
17
17
  exports.default = AutoLogoutViewPluginImpl;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-heartwood-utils",
3
3
  "description": "Heartwood Utilities",
4
- "version": "21.4.18",
4
+ "version": "23.0.0",
5
5
  "skill": {
6
6
  "namespace": "heartwood"
7
7
  },