@sprucelabs/heartwood-view-controllers 125.0.28 → 126.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.
@@ -1,4 +1,4 @@
1
- import { CachedValue, Device, PowerBehaviorOptions, TheaterSettingValueTypes, TheatreSettingName } from '../types/heartwood.types';
1
+ import { CachedValue, Device, SubmitFeedbackOptions, PowerBehaviorOptions, TheaterSettingValueTypes, TheatreSettingName } from '../types/heartwood.types';
2
2
  import MockAudioController from './MockAudioController';
3
3
  export default class SpyDevice implements Device {
4
4
  lastCommand?: string;
@@ -11,6 +11,7 @@ export default class SpyDevice implements Device {
11
11
  private kioskSettings;
12
12
  private brightness;
13
13
  lastPowerBehaviorOptions?: PowerBehaviorOptions;
14
+ lastFeedbackOptions?: SubmitFeedbackOptions;
14
15
  setCachedValue(key: string, value: CachedValue): void;
15
16
  openUrl(url: string): void;
16
17
  getCachedValue(key: string): CachedValue;
@@ -24,6 +25,7 @@ export default class SpyDevice implements Device {
24
25
  turnTorchOff(): void;
25
26
  AudioController(audioFileUrl: string): Promise<MockAudioController>;
26
27
  setPowerBehavior(options: PowerBehaviorOptions): void;
28
+ submitFeedback(options: SubmitFeedbackOptions): void;
27
29
  }
28
30
  interface TrackedCommand {
29
31
  command: string;
@@ -70,4 +70,7 @@ export default class SpyDevice {
70
70
  setPowerBehavior(options) {
71
71
  this.lastPowerBehaviorOptions = options;
72
72
  }
73
+ submitFeedback(options) {
74
+ this.lastFeedbackOptions = options;
75
+ }
73
76
  }
@@ -519,11 +519,19 @@ export interface Device {
519
519
  sendCommand(command: string, payload?: Record<string, any>): void;
520
520
  turnTorchOn(brightness?: number): void;
521
521
  turnTorchOff(): void;
522
+ submitFeedback(options: SubmitFeedbackOptions): void;
522
523
  setTheatreSetting<N extends TheatreSettingName>(name: N, value: TheaterSettingValueTypes[N]): void;
523
524
  getTheatreSetting<N extends TheatreSettingName>(name: N): Promise<TheaterSettingValueTypes[N] | null>;
524
525
  AudioController(audioFileUrl: string): Promise<AudioController>;
525
526
  setPowerBehavior(options: PowerBehaviorOptions): void;
526
527
  }
528
+ export interface SubmitFeedbackOptions {
529
+ feedback: string;
530
+ context?: Record<string, any>;
531
+ fromPhone?: string;
532
+ fromEmail?: string;
533
+ fromPersonId?: string;
534
+ }
527
535
  export type AudioControllerStatus = 'pending' | 'stopped' | 'playing' | 'paused';
528
536
  export interface AudioController {
529
537
  play(): void;
@@ -1,4 +1,4 @@
1
- import { CachedValue, Device, PowerBehaviorOptions, TheaterSettingValueTypes, TheatreSettingName } from '../types/heartwood.types';
1
+ import { CachedValue, Device, SubmitFeedbackOptions, PowerBehaviorOptions, TheaterSettingValueTypes, TheatreSettingName } from '../types/heartwood.types';
2
2
  import MockAudioController from './MockAudioController';
3
3
  export default class SpyDevice implements Device {
4
4
  lastCommand?: string;
@@ -11,6 +11,7 @@ export default class SpyDevice implements Device {
11
11
  private kioskSettings;
12
12
  private brightness;
13
13
  lastPowerBehaviorOptions?: PowerBehaviorOptions;
14
+ lastFeedbackOptions?: SubmitFeedbackOptions;
14
15
  setCachedValue(key: string, value: CachedValue): void;
15
16
  openUrl(url: string): void;
16
17
  getCachedValue(key: string): CachedValue;
@@ -24,6 +25,7 @@ export default class SpyDevice implements Device {
24
25
  turnTorchOff(): void;
25
26
  AudioController(audioFileUrl: string): Promise<MockAudioController>;
26
27
  setPowerBehavior(options: PowerBehaviorOptions): void;
28
+ submitFeedback(options: SubmitFeedbackOptions): void;
27
29
  }
28
30
  interface TrackedCommand {
29
31
  command: string;
@@ -62,5 +62,8 @@ class SpyDevice {
62
62
  setPowerBehavior(options) {
63
63
  this.lastPowerBehaviorOptions = options;
64
64
  }
65
+ submitFeedback(options) {
66
+ this.lastFeedbackOptions = options;
67
+ }
65
68
  }
66
69
  exports.default = SpyDevice;
@@ -519,11 +519,19 @@ export interface Device {
519
519
  sendCommand(command: string, payload?: Record<string, any>): void;
520
520
  turnTorchOn(brightness?: number): void;
521
521
  turnTorchOff(): void;
522
+ submitFeedback(options: SubmitFeedbackOptions): void;
522
523
  setTheatreSetting<N extends TheatreSettingName>(name: N, value: TheaterSettingValueTypes[N]): void;
523
524
  getTheatreSetting<N extends TheatreSettingName>(name: N): Promise<TheaterSettingValueTypes[N] | null>;
524
525
  AudioController(audioFileUrl: string): Promise<AudioController>;
525
526
  setPowerBehavior(options: PowerBehaviorOptions): void;
526
527
  }
528
+ export interface SubmitFeedbackOptions {
529
+ feedback: string;
530
+ context?: Record<string, any>;
531
+ fromPhone?: string;
532
+ fromEmail?: string;
533
+ fromPersonId?: string;
534
+ }
527
535
  export type AudioControllerStatus = 'pending' | 'stopped' | 'playing' | 'paused';
528
536
  export interface AudioController {
529
537
  play(): void;
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": "125.0.28",
16
+ "version": "126.0.0",
17
17
  "skill": {
18
18
  "namespace": "HeartwoodViewControllers",
19
19
  "commandOverrides": {