@sprucelabs/heartwood-view-controllers 114.0.4 → 115.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.
@@ -7,12 +7,15 @@ export default class SpyDevice implements Device {
7
7
  openedUrl?: string;
8
8
  lastCommandPayload?: Record<string, any>;
9
9
  allCommands: TrackedCommand[];
10
+ private isKioskMode;
10
11
  setCachedValue(key: string, value: CachedValue): void;
11
12
  openUrl(url: string): void;
12
13
  getCachedValue(key: string): CachedValue;
13
14
  vibrate(): void;
14
15
  call(phoneNumber: string): void;
15
- sendCommand(command: string, payload?: Record<string, any>): Promise<void>;
16
+ sendCommand(command: string, payload?: Record<string, any>): void;
17
+ getIsKioskModeEnabled(): Promise<boolean>;
18
+ setIsKioskModeEnabled(isKiosk: boolean): void;
16
19
  }
17
20
  interface TrackedCommand {
18
21
  command: string;
@@ -12,6 +12,7 @@ export default class SpyDevice {
12
12
  this.vibrateCount = 0;
13
13
  this.cachedValues = {};
14
14
  this.allCommands = [];
15
+ this.isKioskMode = false;
15
16
  }
16
17
  setCachedValue(key, value) {
17
18
  this.cachedValues[key] = value;
@@ -29,10 +30,16 @@ export default class SpyDevice {
29
30
  this.lastPhoneCalled = phoneNumber;
30
31
  }
31
32
  sendCommand(command, payload) {
33
+ this.lastCommand = command;
34
+ this.lastCommandPayload = payload;
35
+ this.allCommands.push({ command, payload });
36
+ }
37
+ getIsKioskModeEnabled() {
32
38
  return __awaiter(this, void 0, void 0, function* () {
33
- this.lastCommand = command;
34
- this.lastCommandPayload = payload;
35
- this.allCommands.push({ command, payload });
39
+ return this.isKioskMode;
36
40
  });
37
41
  }
42
+ setIsKioskModeEnabled(isKiosk) {
43
+ this.isKioskMode = isKiosk;
44
+ }
38
45
  }
@@ -463,7 +463,9 @@ export interface Device {
463
463
  call(phoneNumber: string): void;
464
464
  setCachedValue(key: string, value: CachedValue): void;
465
465
  getCachedValue(key: string): CachedValue;
466
- sendCommand(command: string, payload?: Record<string, any>): Promise<Record<string, any> | void>;
466
+ sendCommand(command: string, payload?: Record<string, any>): void;
467
+ getIsKioskModeEnabled(): Promise<boolean>;
468
+ setIsKioskModeEnabled(isKiosk: boolean): void;
467
469
  }
468
470
  export interface AuthorizerCanOptions<ContractId extends PermissionContractId, Ids extends PermissionId<ContractId> = PermissionId<ContractId>> {
469
471
  contractId: ContractId;
@@ -7,12 +7,15 @@ export default class SpyDevice implements Device {
7
7
  openedUrl?: string;
8
8
  lastCommandPayload?: Record<string, any>;
9
9
  allCommands: TrackedCommand[];
10
+ private isKioskMode;
10
11
  setCachedValue(key: string, value: CachedValue): void;
11
12
  openUrl(url: string): void;
12
13
  getCachedValue(key: string): CachedValue;
13
14
  vibrate(): void;
14
15
  call(phoneNumber: string): void;
15
- sendCommand(command: string, payload?: Record<string, any>): Promise<void>;
16
+ sendCommand(command: string, payload?: Record<string, any>): void;
17
+ getIsKioskModeEnabled(): Promise<boolean>;
18
+ setIsKioskModeEnabled(isKiosk: boolean): void;
16
19
  }
17
20
  interface TrackedCommand {
18
21
  command: string;
@@ -5,6 +5,7 @@ class SpyDevice {
5
5
  this.vibrateCount = 0;
6
6
  this.cachedValues = {};
7
7
  this.allCommands = [];
8
+ this.isKioskMode = false;
8
9
  }
9
10
  setCachedValue(key, value) {
10
11
  this.cachedValues[key] = value;
@@ -21,10 +22,16 @@ class SpyDevice {
21
22
  call(phoneNumber) {
22
23
  this.lastPhoneCalled = phoneNumber;
23
24
  }
24
- async sendCommand(command, payload) {
25
+ sendCommand(command, payload) {
25
26
  this.lastCommand = command;
26
27
  this.lastCommandPayload = payload;
27
28
  this.allCommands.push({ command, payload });
28
29
  }
30
+ async getIsKioskModeEnabled() {
31
+ return this.isKioskMode;
32
+ }
33
+ setIsKioskModeEnabled(isKiosk) {
34
+ this.isKioskMode = isKiosk;
35
+ }
29
36
  }
30
37
  exports.default = SpyDevice;
@@ -463,7 +463,9 @@ export interface Device {
463
463
  call(phoneNumber: string): void;
464
464
  setCachedValue(key: string, value: CachedValue): void;
465
465
  getCachedValue(key: string): CachedValue;
466
- sendCommand(command: string, payload?: Record<string, any>): Promise<Record<string, any> | void>;
466
+ sendCommand(command: string, payload?: Record<string, any>): void;
467
+ getIsKioskModeEnabled(): Promise<boolean>;
468
+ setIsKioskModeEnabled(isKiosk: boolean): void;
467
469
  }
468
470
  export interface AuthorizerCanOptions<ContractId extends PermissionContractId, Ids extends PermissionId<ContractId> = PermissionId<ContractId>> {
469
471
  contractId: ContractId;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "sideEffects": false,
14
14
  "license": "MIT",
15
15
  "description": "All the power of Heartwood in one, convenient package.",
16
- "version": "114.0.4",
16
+ "version": "115.0.0",
17
17
  "skill": {
18
18
  "namespace": "HeartwoodViewControllers",
19
19
  "commandOverrides": {