@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;
|
|
@@ -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;
|
package/build/tests/SpyDevice.js
CHANGED
|
@@ -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