@sprucelabs/heartwood-view-controllers 113.1.1 → 114.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.
@@ -12,7 +12,7 @@ export default class SpyDevice implements Device {
12
12
  getCachedValue(key: string): CachedValue;
13
13
  vibrate(): void;
14
14
  call(phoneNumber: string): void;
15
- sendCommand(command: string, payload?: Record<string, any>): void;
15
+ sendCommand(command: string, payload?: Record<string, any>): Promise<void>;
16
16
  }
17
17
  interface TrackedCommand {
18
18
  command: string;
@@ -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
  export default class SpyDevice {
2
11
  constructor() {
3
12
  this.vibrateCount = 0;
@@ -20,8 +29,10 @@ export default class SpyDevice {
20
29
  this.lastPhoneCalled = phoneNumber;
21
30
  }
22
31
  sendCommand(command, payload) {
23
- this.lastCommand = command;
24
- this.lastCommandPayload = payload;
25
- this.allCommands.push({ command, payload });
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ this.lastCommand = command;
34
+ this.lastCommandPayload = payload;
35
+ this.allCommands.push({ command, payload });
36
+ });
26
37
  }
27
38
  }
@@ -463,7 +463,7 @@ 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>): void;
466
+ sendCommand(command: string, payload?: Record<string, any>): Promise<Record<string, any> | void>;
467
467
  }
468
468
  export interface AuthorizerCanOptions<ContractId extends PermissionContractId, Ids extends PermissionId<ContractId> = PermissionId<ContractId>> {
469
469
  contractId: ContractId;
@@ -12,7 +12,7 @@ export default class SpyDevice implements Device {
12
12
  getCachedValue(key: string): CachedValue;
13
13
  vibrate(): void;
14
14
  call(phoneNumber: string): void;
15
- sendCommand(command: string, payload?: Record<string, any>): void;
15
+ sendCommand(command: string, payload?: Record<string, any>): Promise<void>;
16
16
  }
17
17
  interface TrackedCommand {
18
18
  command: string;
@@ -21,7 +21,7 @@ class SpyDevice {
21
21
  call(phoneNumber) {
22
22
  this.lastPhoneCalled = phoneNumber;
23
23
  }
24
- sendCommand(command, payload) {
24
+ async sendCommand(command, payload) {
25
25
  this.lastCommand = command;
26
26
  this.lastCommandPayload = payload;
27
27
  this.allCommands.push({ command, payload });
@@ -463,7 +463,7 @@ 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>): void;
466
+ sendCommand(command: string, payload?: Record<string, any>): Promise<Record<string, any> | void>;
467
467
  }
468
468
  export interface AuthorizerCanOptions<ContractId extends PermissionContractId, Ids extends PermissionId<ContractId> = PermissionId<ContractId>> {
469
469
  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": "113.1.1",
16
+ "version": "114.0.0",
17
17
  "skill": {
18
18
  "namespace": "HeartwoodViewControllers",
19
19
  "commandOverrides": {