@signageos/front-applet 5.5.0 → 5.6.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/bundle.js +1 -1
  3. package/dist/bundle.js.map +1 -1
  4. package/docs/js-api/js-api-introduction.md +6 -0
  5. package/docs/js-api/js-display.md +1 -1
  6. package/docs/js-api/js-hardware-serial.md +9 -6
  7. package/docs/management-api/5-js-management-screen.md +16 -0
  8. package/es6/FrontApplet/Browser/IOpenLinkOptions.js +9 -9
  9. package/es6/FrontApplet/Dimensions/coordinationsHelper.js +2 -1
  10. package/es6/FrontApplet/Dimensions/coordinationsHelper.js.map +1 -1
  11. package/es6/FrontApplet/Error/SosError.js +1 -1
  12. package/es6/FrontApplet/Exchange/Exchange.js +1 -1
  13. package/es6/FrontApplet/Font/fontFaceGenerator.js +1 -1
  14. package/es6/FrontApplet/FrontApplet.js +1 -1
  15. package/es6/FrontApplet/Input/Input.d.ts +1 -1
  16. package/es6/FrontApplet/Management/App.js +2 -2
  17. package/es6/FrontApplet/Management/Audio.js +2 -2
  18. package/es6/FrontApplet/Management/Debug.js +2 -2
  19. package/es6/FrontApplet/Management/Firmware.js +1 -1
  20. package/es6/FrontApplet/Management/Management.js +4 -4
  21. package/es6/FrontApplet/Management/Network.js +1 -1
  22. package/es6/FrontApplet/Management/OS.js +3 -3
  23. package/es6/FrontApplet/Management/Package.js +1 -1
  24. package/es6/FrontApplet/Management/PeerRecovery.d.ts +1 -1
  25. package/es6/FrontApplet/Management/PeerRecovery.js +2 -2
  26. package/es6/FrontApplet/Management/Power.js +3 -3
  27. package/es6/FrontApplet/Management/Proxy.js +3 -3
  28. package/es6/FrontApplet/Management/RemoteControl.js +2 -2
  29. package/es6/FrontApplet/Management/Screen.js +7 -7
  30. package/es6/FrontApplet/Management/Time.js +1 -1
  31. package/es6/FrontApplet/Offline/Cache/Cache.js +2 -2
  32. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +1 -1
  33. package/es6/FrontApplet/Offline/IElement.js +1 -1
  34. package/es6/FrontApplet/Offline/ISaveFile.js +4 -4
  35. package/es6/FrontApplet/Offline/Types.js +1 -1
  36. package/es6/FrontApplet/Stream/Stream.js +1 -1
  37. package/es6/FrontApplet/Video/Video.js +5 -5
  38. package/es6/Monitoring/Montoring.js +5 -5
  39. package/package.json +4 -4
@@ -71,6 +71,12 @@ For **Device Management** we strongly recommend using REST APIs. [See the REST A
71
71
  | [Wi-Fi](/api/js/management/latest/13-js-management-wifi) | Manage Wi-Fi |
72
72
  :::
73
73
 
74
+ # Testing Framework SDK
75
+
76
+ Write and then run **automated tests** for your applet on physical devices, streamlining your development and QA efforts.
77
+
78
+ See full [documentation on GitHub](https://github.com/signageos/test-framework)
79
+
74
80
  # Node.JS SDK
75
81
 
76
82
  Library which allows you to fully manage signageOS applets, devices, management & monitoring using Node.JS and REST API.
@@ -33,7 +33,7 @@ with a warning message like this one:
33
33
 
34
34
  ::: alert alert--warning
35
35
  * Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
36
- * More info [**HERE**](/api/js/content/js-display#supports).
36
+ * More info [**HERE**](/api/js/content/latest/js-display#supports).
37
37
  :::
38
38
 
39
39
  ::: table-responsive
@@ -21,7 +21,8 @@ Such hardware could be, for example, printers, payment terminals or sensors.
21
21
 
22
22
  ::: alert alert--warning
23
23
  * Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
24
- * More info [**HERE**](/api/js/content/js-display#supports).
24
+ * More info [**HERE**](/api/js/content/latest/js-display#supports).
25
+ * Samsung Kiosk serial connection only works over serial ports, not over USB ports
25
26
  :::
26
27
 
27
28
  ## All methods
@@ -84,14 +85,15 @@ you can call following methods on it.
84
85
  ::: table-responsive
85
86
  | Method | Description | Supported since |
86
87
  | ---------- | ----------------------------------------------------------- | :-------------: |
87
- | `onData()` | Call a listener callback anytime serial port emits new data | 4.4.0 |
88
+ | `onData()` | Call a listener callback anytime the opened serial port receiving data. | 4.4.0 |
88
89
  | `write()` | Write data to the serial port | 4.4.0 |
89
90
  | `close()` | Close serial port | 4.4.0 |
90
91
  :::
91
92
 
92
93
  ## onData()
93
94
 
94
- Call a listener callback anytime serial port emits data.
95
+ Call a listener callback anytime the opened serial port receiving data.
96
+ The listener will stop if the serial port is closed.
95
97
 
96
98
  Since data may be either text or binary, it's emitted as [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)
97
99
  and should be processed further according to the requirements of your application.
@@ -115,12 +117,12 @@ serialPort.onData((data) => {
115
117
 
116
118
  ## write()
117
119
 
118
- Write data to the serial port. The data can be a string, array of numbers or [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
120
+ Write data to the serial port. The data can be a string of hexadecimal digits, array of numbers or [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array). And converted to hexadecimals
119
121
 
120
122
  ### Javascript example
121
123
  ```javascript
122
124
  // serial port instance previously created via sos.hardware.openSerialPort()
123
- await serialPort.write('string data'); // string
125
+ await serialPort.write('68656c6c6f'); // hexadecimal string
124
126
  await serialPort.write([ 10, 20, 30, 40 ]); // array of numbers
125
127
  await serialPort.write(Uint8Array.from([ 10, 20, 30, 40 ])); // Uint8Array
126
128
  ```
@@ -137,7 +139,8 @@ await serialPort.close();
137
139
 
138
140
  ## Errors
139
141
 
140
- Following errors may occur when working with the serial ports.
142
+ Following errors may occur when working with the serial ports. However they don't reflect on actual physical connectivity of the ports due to Samsung b2bapi does not register these events.
143
+
141
144
 
142
145
  ::: table-responsive
143
146
  | Code | Type | Message |
@@ -19,6 +19,16 @@ This method turns on/off only display/backlight. It will **not** set any power-s
19
19
  reboot any device once a day.
20
20
  :::
21
21
 
22
+ ::: alert alert--info
23
+ There is a specific behavior based on the device type you operate:
24
+ **On SoC displays** (e.g. Samsung Tizen, LG webOS, Android-based SoC displays from Sony, Vestel Philips,...)
25
+ - `powerOn()` and `powerOff()` are turning the display backlight and the panel off
26
+
27
+ **On external media players** (e.g. BrightSign, Windows PC, Android players, Raspberry Pi)
28
+ - `powerOn()` and `powerOff()` are turning off the video output (typically HDMI-out); the connected display backlight is not managed by this functionality and needs to be controlled via RS232 or another way.
29
+ :::
30
+
31
+
22
32
  ## All methods
23
33
 
24
34
  ::: table-responsive
@@ -186,6 +196,12 @@ await sos.management.screen.powerOn(); // Returns void
186
196
  ## powerOff()
187
197
  Method `powerOff()` turns off the targeted display.
188
198
 
199
+ ::: alert alert--warning
200
+ On Android devices, `powerOff()` also shuts down the webview and the Applet. It's default Android behavior that cannot be changed. Once the Applet is off, you cannot call `powerOn()` to resume the playback.
201
+
202
+ To manage the display On/Off state, use [REST API Power Actions](https://api.docs.signageos.io/#138035f6-af92-4345-8eaa-9c7f1ed0efd3) instead.
203
+ :::
204
+
189
205
  ```javascript
190
206
  await sos.management.screen.powerOff(); // Returns void
191
207
  ```
@@ -5,39 +5,39 @@ exports.VITheme = {
5
5
  base: { '?string': ['light', 'dark'] },
6
6
  shape: { '?object': {
7
7
  cornerSize: '?number',
8
- }
8
+ },
9
9
  },
10
10
  colors: { '?object': {
11
11
  primary: '?string',
12
12
  background: '?string',
13
13
  control: '?string',
14
- }
14
+ },
15
15
  },
16
16
  widgets: { '?object': {
17
17
  editAddress: { '?object': {
18
18
  colors: { '?object': {
19
19
  background: '?string',
20
20
  text: '?string',
21
- }
21
+ },
22
22
  },
23
- }
23
+ },
24
24
  },
25
25
  buttonClose: { '?object': {
26
26
  colors: { '?object': {
27
27
  background: '?string',
28
28
  text: '?string',
29
29
  icon: '?string',
30
- }
30
+ },
31
31
  },
32
32
  icon: { '?string': ['none', 'exit_to_app', 'close', 'cancel'] },
33
33
  text: '?string',
34
- }
34
+ },
35
35
  },
36
36
  progress: { '?object': {
37
37
  color: '?string',
38
- }
38
+ },
39
39
  },
40
- }
40
+ },
41
41
  },
42
42
  };
43
43
  exports.VIOpenLinkOptions = {
@@ -50,7 +50,7 @@ exports.VIOpenLinkOptions = {
50
50
  y: 'number',
51
51
  width: 'number',
52
52
  height: 'number',
53
- }
53
+ },
54
54
  },
55
55
  theme: { '?object': exports.VITheme },
56
56
  headlessMode: '?boolean',
@@ -59,7 +59,8 @@ function warnOrErrorWrongCoordination(coordName, castedValue, value) {
59
59
  throw Error(`Coordination ${coordName}="${value}" is not valid number`);
60
60
  }
61
61
  else if (typeof castedValue !== typeof value) {
62
- console.warn(`Coordination ${coordName}="${value}" is not a typeof number but is typeof ${typeof value}. Was automatically casted as "${castedValue}"`);
62
+ console.warn(`Coordination ${coordName}="${value}" is not a typeof number but is typeof ${typeof value}. `
63
+ + `Was automatically casted as "${castedValue}"`);
63
64
  }
64
65
  else if (castedValue !== value) {
65
66
  console.warn(`Coordination ${coordName}="${value}" is not an integer but is float. Was automatically floored to "${castedValue}"`);
@@ -1 +1 @@
1
- {"version":3,"file":"coordinationsHelper.js","sourceRoot":"","sources":["../../../src/FrontApplet/Dimensions/coordinationsHelper.ts"],"names":[],"mappings":";;;AAQA,SAAgB,qBAAqB,CAAC,KAA0B;IAC/D,IAAI,CAAS,CAAC;IACd,IAAI,CAAS,CAAC;IACd,IAAI,KAAa,CAAC;IAClB,IAAI,MAAc,CAAC;IAEnB,IAAI,KAAK,CAAC,CAAC,KAAK,SAAS,IAAI,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE;QAC9C,CAAC,GAAG,CAAC,CAAC;KACN;SAAM,IAAI,OAAO,KAAK,CAAC,CAAC,KAAK,QAAQ,EAAE;QACvC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAQ,CAAC,CAAC;KAC7B;SAAM;QACN,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACxB;IACD,4BAA4B,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAE9C,IAAI,K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gDC;AAED,SAAS,4BAA4B,CAAC,SAAoC,EAAE,WAAmB,EAAE,KAAc;IAC9G,IAAI,KAAK,CAAC,WAAW,CAAC,EAAE;QACvB,MAAM,KAAK,CAAC,gBAAgB,SAAS,KAAK,KAAK,uBAAuB,CAAC,CAAC;KACxE;SAAM,IAAI,OAAO,WAAW,KAAK,OAAO,KAAK,EAAE;QAC/C,OAAO,CAAC,IAAI,CACX,gBAAgB,SAAS,KAAK,KAAK,0CAA0C,OAAO,KAAK,IAAI;cAC3F,gCAAgC,WAAW,GAAG,CAChD,CAAC;KACF;SAAM,IAAI,WAAW,KAAK,KAAK,EAAE;QACjC,OAAO,CAAC,IAAI,CAAC,gBAAgB,SAAS,KAAK,KAAK,mEAAmE,WAAW,GAAG,CAAC,CAAC;KACnI;AACF,CAAC"}
@@ -14,7 +14,7 @@ class SosError extends Error {
14
14
  code,
15
15
  stackTrace: this.stack,
16
16
  suggestion,
17
- pathToDocs
17
+ pathToDocs,
18
18
  });
19
19
  }
20
20
  }
@@ -22,7 +22,7 @@ function createExchange(messagePrefix, postMessage) {
22
22
  return {
23
23
  messageNameToType,
24
24
  postMessage: typedPostMessage,
25
- createNamespaced: (namespace) => createExchange(messageNameToType(namespace), postMessage)
25
+ createNamespaced: (namespace) => createExchange(messageNameToType(namespace), postMessage),
26
26
  };
27
27
  }
28
28
  exports.createExchange = createExchange;
@@ -42,7 +42,7 @@ const fontFaceGenerator = (window, fontFaceProps) => {
42
42
  };
43
43
  return {
44
44
  setFormat,
45
- generateStyleElement
45
+ generateStyleElement,
46
46
  };
47
47
  };
48
48
  exports.fontFaceGenerator = fontFaceGenerator;
@@ -54,7 +54,7 @@ class FrontApplet {
54
54
  this.window.addEventListener('message', (event) => this.handleMessage(event));
55
55
  this.window.addEventListener('keyup', (event) => this.input.handleKeyEvent(event));
56
56
  this.postMessage({
57
- type: messagePrefix + '_api.ready'
57
+ type: messagePrefix + '_api.ready',
58
58
  });
59
59
  this.startPinging();
60
60
  }
@@ -2,7 +2,7 @@
2
2
  import { EventEmitter } from 'events';
3
3
  import IKeyUpEventListener from './IKeyUpEventListener';
4
4
  import IInputKeyMessage from './IInputKeyMessage';
5
- import IPostMessage from 'FrontApplet/IPostMessage';
5
+ import IPostMessage from '../IPostMessage';
6
6
  export default class Input extends EventEmitter implements IInputEventEmitter {
7
7
  readonly window: Window;
8
8
  private messagePrefix;
@@ -18,7 +18,7 @@ class App {
18
18
  getType() {
19
19
  return __awaiter(this, void 0, void 0, function* () {
20
20
  const { applicationType } = yield this.postMessage({
21
- type: this.getMessage('get_application_type')
21
+ type: this.getMessage('get_application_type'),
22
22
  });
23
23
  return applicationType;
24
24
  });
@@ -26,7 +26,7 @@ class App {
26
26
  getVersion() {
27
27
  return __awaiter(this, void 0, void 0, function* () {
28
28
  const { applicationVersion } = yield this.postMessage({
29
- type: this.getMessage('get_application_version')
29
+ type: this.getMessage('get_application_version'),
30
30
  });
31
31
  return applicationVersion;
32
32
  });
@@ -18,7 +18,7 @@ class Audio {
18
18
  getVolume() {
19
19
  return __awaiter(this, void 0, void 0, function* () {
20
20
  const { volume } = yield this.postMessage({
21
- type: this.getMessage('get_volume')
21
+ type: this.getMessage('get_volume'),
22
22
  });
23
23
  return volume;
24
24
  });
@@ -28,7 +28,7 @@ class Audio {
28
28
  Validate_1.default({ volume }).required().number().min(0).max(100);
29
29
  yield this.postMessage({
30
30
  type: this.getMessage('set_volume'),
31
- volume
31
+ volume,
32
32
  });
33
33
  });
34
34
  }
@@ -28,7 +28,7 @@ class Debug {
28
28
  isEnabled() {
29
29
  return __awaiter(this, void 0, void 0, function* () {
30
30
  const { isEnabled } = yield this.postMessage({
31
- type: this.getMessage('is_enabled')
31
+ type: this.getMessage('is_enabled'),
32
32
  });
33
33
  return isEnabled;
34
34
  });
@@ -38,7 +38,7 @@ class Debug {
38
38
  Validate_1.default({ enabled }).required().boolean();
39
39
  yield this.postMessage({
40
40
  type: this.getMessage('set_debug'),
41
- enabled
41
+ enabled,
42
42
  });
43
43
  });
44
44
  }
@@ -29,7 +29,7 @@ class Firmware {
29
29
  getVersion() {
30
30
  return __awaiter(this, void 0, void 0, function* () {
31
31
  const { firmwareVersion } = yield this.postMessage({
32
- type: this.getMessage('get_firmware_version')
32
+ type: this.getMessage('get_firmware_version'),
33
33
  });
34
34
  return firmwareVersion;
35
35
  });
@@ -58,7 +58,7 @@ class Management {
58
58
  getModel() {
59
59
  return __awaiter(this, void 0, void 0, function* () {
60
60
  const { model } = yield this.postMessage({
61
- type: this.getMessage('get_model')
61
+ type: this.getMessage('get_model'),
62
62
  });
63
63
  return model;
64
64
  });
@@ -66,7 +66,7 @@ class Management {
66
66
  getSerialNumber() {
67
67
  return __awaiter(this, void 0, void 0, function* () {
68
68
  const { serialNumber } = yield this.postMessage({
69
- type: this.getMessage('get_serial_number')
69
+ type: this.getMessage('get_serial_number'),
70
70
  });
71
71
  return serialNumber;
72
72
  });
@@ -80,7 +80,7 @@ class Management {
80
80
  getBatteryStatus() {
81
81
  return __awaiter(this, void 0, void 0, function* () {
82
82
  const { batteryStatus } = yield this.postMessage({
83
- type: this.getMessage('get_battery_status')
83
+ type: this.getMessage('get_battery_status'),
84
84
  });
85
85
  return batteryStatus;
86
86
  });
@@ -88,7 +88,7 @@ class Management {
88
88
  getTemperature() {
89
89
  return __awaiter(this, void 0, void 0, function* () {
90
90
  const { currentTemperature } = yield this.postMessage({
91
- type: this.getMessage('get_current_temperature')
91
+ type: this.getMessage('get_current_temperature'),
92
92
  });
93
93
  return currentTemperature;
94
94
  });
@@ -20,7 +20,7 @@ class Network {
20
20
  getActiveInfo() {
21
21
  return __awaiter(this, void 0, void 0, function* () {
22
22
  const { networkInfo } = yield this.postMessage({
23
- type: this.getMessage('get_network_info')
23
+ type: this.getMessage('get_network_info'),
24
24
  });
25
25
  return networkInfo;
26
26
  });
@@ -17,7 +17,7 @@ class OS {
17
17
  getInfo() {
18
18
  return __awaiter(this, void 0, void 0, function* () {
19
19
  const { osInfo } = yield this.postMessage({
20
- type: this.getMessage('get_os_info')
20
+ type: this.getMessage('get_os_info'),
21
21
  });
22
22
  return osInfo;
23
23
  });
@@ -25,7 +25,7 @@ class OS {
25
25
  getCpuUsage() {
26
26
  return __awaiter(this, void 0, void 0, function* () {
27
27
  const { cpuUsage } = yield this.postMessage({
28
- type: this.getMessage('get_cpu_usage')
28
+ type: this.getMessage('get_cpu_usage'),
29
29
  });
30
30
  return cpuUsage;
31
31
  });
@@ -33,7 +33,7 @@ class OS {
33
33
  getMemoryUsage() {
34
34
  return __awaiter(this, void 0, void 0, function* () {
35
35
  const { memoryUsage } = yield this.postMessage({
36
- type: this.getMessage('get_memory_usage')
36
+ type: this.getMessage('get_memory_usage'),
37
37
  });
38
38
  return memoryUsage;
39
39
  });
@@ -26,7 +26,7 @@ class Package {
26
26
  baseUrl,
27
27
  packageName,
28
28
  version,
29
- build
29
+ build,
30
30
  });
31
31
  });
32
32
  }
@@ -1,4 +1,4 @@
1
- import IPostMessage from "FrontApplet/IPostMessage";
1
+ import IPostMessage from "../IPostMessage";
2
2
  export default class PeerRecovery {
3
3
  private messagePrefix;
4
4
  private postMessage;
@@ -17,7 +17,7 @@ class PeerRecovery {
17
17
  isEnabled() {
18
18
  return __awaiter(this, void 0, void 0, function* () {
19
19
  const { enabled } = yield this.postMessage({
20
- type: this.getMessage('peer_recovery_is_enabled')
20
+ type: this.getMessage('peer_recovery_is_enabled'),
21
21
  });
22
22
  return enabled;
23
23
  });
@@ -27,7 +27,7 @@ class PeerRecovery {
27
27
  yield this.postMessage({
28
28
  type: this.getMessage('set_peer_recovery'),
29
29
  enabled: args[0],
30
- time: args[1]
30
+ time: args[1],
31
31
  });
32
32
  });
33
33
  }
@@ -19,14 +19,14 @@ class Power {
19
19
  systemReboot() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
21
21
  yield this.postMessage({
22
- type: this.getMessage('reboot_system')
22
+ type: this.getMessage('reboot_system'),
23
23
  });
24
24
  });
25
25
  }
26
26
  appRestart() {
27
27
  return __awaiter(this, void 0, void 0, function* () {
28
28
  yield this.postMessage({
29
- type: this.getMessage('restart_app')
29
+ type: this.getMessage('restart_app'),
30
30
  });
31
31
  });
32
32
  }
@@ -58,7 +58,7 @@ class Power {
58
58
  timeOn,
59
59
  timeOff,
60
60
  weekdays,
61
- volume
61
+ volume,
62
62
  });
63
63
  });
64
64
  }
@@ -17,7 +17,7 @@ class Proxy {
17
17
  isEnabled() {
18
18
  return __awaiter(this, void 0, void 0, function* () {
19
19
  const { isEnabled } = yield this.postMessage({
20
- type: this.getMessage('proxy_is_enabled')
20
+ type: this.getMessage('proxy_is_enabled'),
21
21
  });
22
22
  return isEnabled;
23
23
  });
@@ -36,14 +36,14 @@ class Proxy {
36
36
  disable() {
37
37
  return __awaiter(this, void 0, void 0, function* () {
38
38
  yield this.postMessage({
39
- type: this.getMessage('proxy_disable')
39
+ type: this.getMessage('proxy_disable'),
40
40
  });
41
41
  });
42
42
  }
43
43
  getConnectedTo() {
44
44
  return __awaiter(this, void 0, void 0, function* () {
45
45
  const { connectedTo } = yield this.postMessage({
46
- type: this.getMessage('proxy_get_connected_to')
46
+ type: this.getMessage('proxy_get_connected_to'),
47
47
  });
48
48
  return connectedTo;
49
49
  });
@@ -27,7 +27,7 @@ class RemoteControl {
27
27
  isEnabled() {
28
28
  return __awaiter(this, void 0, void 0, function* () {
29
29
  const { isRemoteControlEnabled } = yield this.postMessage({
30
- type: this.getMessage('get_is_remote_control_enabled')
30
+ type: this.getMessage('get_is_remote_control_enabled'),
31
31
  });
32
32
  return isRemoteControlEnabled;
33
33
  });
@@ -49,7 +49,7 @@ class RemoteControl {
49
49
  return __awaiter(this, void 0, void 0, function* () {
50
50
  yield this.postMessage({
51
51
  type: this.getMessage('set_remote_control_enabled'),
52
- enabled
52
+ enabled,
53
53
  });
54
54
  });
55
55
  }
@@ -43,7 +43,7 @@ class Screen {
43
43
  getOrientation() {
44
44
  return __awaiter(this, void 0, void 0, function* () {
45
45
  const { screenOrientation } = yield this.postMessage({
46
- type: this.getMessage('get_screen_orientation')
46
+ type: this.getMessage('get_screen_orientation'),
47
47
  });
48
48
  return screenOrientation;
49
49
  });
@@ -59,14 +59,14 @@ class Screen {
59
59
  timeFrom1,
60
60
  brightness1,
61
61
  timeFrom2,
62
- brightness2
62
+ brightness2,
63
63
  });
64
64
  });
65
65
  }
66
66
  getBrightness() {
67
67
  return __awaiter(this, void 0, void 0, function* () {
68
68
  const { screenBrightness } = yield this.postMessage({
69
- type: this.getMessage('get_screen_brightness')
69
+ type: this.getMessage('get_screen_brightness'),
70
70
  });
71
71
  return screenBrightness;
72
72
  });
@@ -76,7 +76,7 @@ class Screen {
76
76
  Validate_1.default({ uploadBaseUrl }).required().uri();
77
77
  const { screenshotUrl } = yield this.postMessage({
78
78
  type: this.getMessage('upload_screenshot'),
79
- uploadBaseUrl
79
+ uploadBaseUrl,
80
80
  });
81
81
  return screenshotUrl;
82
82
  });
@@ -84,21 +84,21 @@ class Screen {
84
84
  powerOn() {
85
85
  return __awaiter(this, void 0, void 0, function* () {
86
86
  yield this.postMessage({
87
- type: this.getMessage('power_on_display')
87
+ type: this.getMessage('power_on_display'),
88
88
  });
89
89
  });
90
90
  }
91
91
  powerOff() {
92
92
  return __awaiter(this, void 0, void 0, function* () {
93
93
  yield this.postMessage({
94
- type: this.getMessage('power_off_display')
94
+ type: this.getMessage('power_off_display'),
95
95
  });
96
96
  });
97
97
  }
98
98
  isPoweredOn() {
99
99
  return __awaiter(this, void 0, void 0, function* () {
100
100
  const { isDisplayPowerOn } = yield this.postMessage({
101
- type: this.getMessage('get_is_display_power_on')
101
+ type: this.getMessage('get_is_display_power_on'),
102
102
  });
103
103
  return isDisplayPowerOn;
104
104
  });
@@ -26,7 +26,7 @@ class Time {
26
26
  get() {
27
27
  return __awaiter(this, void 0, void 0, function* () {
28
28
  const { currentTimeWithTimezone } = yield this.postMessage({
29
- type: this.getMessage('get_current_time_with_timezone')
29
+ type: this.getMessage('get_current_time_with_timezone'),
30
30
  });
31
31
  return currentTimeWithTimezone;
32
32
  });
@@ -46,7 +46,7 @@ class Cache {
46
46
  throw new AppletOfflineCacheError_1.default({
47
47
  kind: 'appletOfflineCacheError',
48
48
  message: `Invalid headers ${headers}`,
49
- code: ErrorCodes_1.default.OFFLINE_CACHE_HEADERS_NOT_VALID
49
+ code: ErrorCodes_1.default.OFFLINE_CACHE_HEADERS_NOT_VALID,
50
50
  });
51
51
  }
52
52
  const response = yield this.postMessage({
@@ -169,7 +169,7 @@ class Cache {
169
169
  throw new FileNotFoundError_1.default({
170
170
  kind: 'fileNotFoundError',
171
171
  message: 'File was not found ' + uid,
172
- code: ErrorCodes_1.default.FILE_NOT_FOUND_IN_CACHE
172
+ code: ErrorCodes_1.default.FILE_NOT_FOUND_IN_CACHE,
173
173
  });
174
174
  }
175
175
  return this.savedFiles[uid];
@@ -23,7 +23,7 @@ class AppendFlagController {
23
23
  type: "append",
24
24
  element: {
25
25
  uid,
26
- }
26
+ },
27
27
  };
28
28
  }
29
29
  applyFlag(flag, fileType, filePath) {
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VIElement = void 0;
4
4
  exports.VIElement = {
5
- uid: 'string'
5
+ uid: 'string',
6
6
  };
7
7
  //# sourceMappingURL=IElement.js.map
@@ -9,19 +9,19 @@ exports.VISaveFile = {
9
9
  uid: { 'string': null, 'error': {
10
10
  code: ErrorCodes_1.default.FILE_DOES_NOT_HAVE_UID,
11
11
  message: ErrorCodesMessages_1.default[ErrorCodes_1.default.FILE_DOES_NOT_HAVE_UID],
12
- }
12
+ },
13
13
  },
14
14
  uri: 'string',
15
15
  type: { 'string': IFileType_1.VIFileType, 'error': {
16
16
  code: ErrorCodes_1.default.FILE_FLAGS_ARE_NOT_IN_ARRAY,
17
17
  message: ErrorCodesMessages_1.default[ErrorCodes_1.default.FILE_FLAGS_ARE_NOT_IN_ARRAY],
18
- }
18
+ },
19
19
  },
20
20
  headers: '?object',
21
21
  flags: { '?array': {
22
22
  'object': IFlag_1.VIFlag,
23
- 'error': { code: ErrorCodes_1.default.FILE_FLAG_IS_NOT_OBJECT, message: ErrorCodesMessages_1.default[ErrorCodes_1.default.FILE_FLAG_IS_NOT_OBJECT] }
24
- }
23
+ 'error': { code: ErrorCodes_1.default.FILE_FLAG_IS_NOT_OBJECT, message: ErrorCodesMessages_1.default[ErrorCodes_1.default.FILE_FLAG_IS_NOT_OBJECT] },
24
+ },
25
25
  },
26
26
  };
27
27
  //# sourceMappingURL=ISaveFile.js.map
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const Types = {
4
4
  javascript: "javascript",
5
5
  css: "css",
6
- video: "video"
6
+ video: "video",
7
7
  };
8
8
  exports.default = Types;
9
9
  //# sourceMappingURL=Types.js.map
@@ -29,7 +29,7 @@ class Stream {
29
29
  throw new AppletStreamError_1.default({
30
30
  kind: 'appletStreamError',
31
31
  message: 'Invalid stream protocol type: ' + protocol,
32
- code: ErrorCodes_1.default.STREAM_INVALID_PROTOCOL_TYPE
32
+ code: ErrorCodes_1.default.STREAM_INVALID_PROTOCOL_TYPE,
33
33
  });
34
34
  }
35
35
  }