@signageos/front-applet 8.2.1 → 8.2.4

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 (143) hide show
  1. package/dist/bundle.js +20 -6
  2. package/dist/bundle.js.map +1 -1
  3. package/docs/index.md +9 -9
  4. package/docs/sos/browser.md +11 -3
  5. package/docs/sos/display.md +13 -20
  6. package/docs/sos/fileSystem.md +31 -6
  7. package/docs/sos/hardware/barcodeScanner.md +9 -0
  8. package/docs/sos/hardware/index.md +9 -0
  9. package/docs/sos/native/mdc.md +8 -3
  10. package/docs/sos/osd.md +9 -0
  11. package/docs/sos/video.md +9 -0
  12. package/docs/sos_management/app.md +97 -18
  13. package/docs/sos_management/audio.md +43 -2
  14. package/docs/sos_management/autoRecovery.md +101 -0
  15. package/docs/sos_management/debug.md +84 -1
  16. package/docs/sos_management/firmware.md +64 -1
  17. package/docs/sos_management/index.md +217 -19
  18. package/docs/sos_management/network.md +84 -29
  19. package/docs/sos_management/os.md +59 -4
  20. package/docs/sos_management/package.md +25 -3
  21. package/docs/sos_management/power.md +142 -18
  22. package/docs/sos_management/proxy.md +54 -3
  23. package/docs/sos_management/remoteControl.md +55 -4
  24. package/docs/sos_management/screen.md +140 -29
  25. package/docs/sos_management/security.md +48 -5
  26. package/docs/sos_management/time.md +76 -9
  27. package/docs/sos_management/wifi.md +207 -45
  28. package/es6/FrontApplet/Browser/Browser.d.ts +11 -3
  29. package/es6/FrontApplet/Browser/Browser.js +13 -4
  30. package/es6/FrontApplet/Browser/Browser.js.map +1 -1
  31. package/es6/FrontApplet/Command/Command.js +8 -10
  32. package/es6/FrontApplet/Command/Command.js.map +1 -1
  33. package/es6/FrontApplet/Connect/Connect.js +2 -2
  34. package/es6/FrontApplet/Connect/Connect.js.map +1 -1
  35. package/es6/FrontApplet/Debug/debugDecorator.d.ts +1 -1
  36. package/es6/FrontApplet/Debug/debugDecorator.js.map +1 -1
  37. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +1 -1
  38. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
  39. package/es6/FrontApplet/Display/Display.d.ts +14 -19
  40. package/es6/FrontApplet/Display/Display.js +14 -19
  41. package/es6/FrontApplet/Display/Display.js.map +1 -1
  42. package/es6/FrontApplet/FileSystem/FileSystem.d.ts +27 -5
  43. package/es6/FrontApplet/FileSystem/FileSystem.js +27 -5
  44. package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
  45. package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.d.ts +1 -2
  46. package/es6/FrontApplet/Font/fontFaceGenerator.js +1 -1
  47. package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -1
  48. package/es6/FrontApplet/FrontApplet.js +3 -3
  49. package/es6/FrontApplet/FrontApplet.js.map +1 -1
  50. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +10 -1
  51. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +9 -0
  52. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
  53. package/es6/FrontApplet/Hardware/Hardware.d.ts +9 -0
  54. package/es6/FrontApplet/Hardware/Hardware.js +9 -0
  55. package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
  56. package/es6/FrontApplet/Iframe/Iframe.js +1 -1
  57. package/es6/FrontApplet/Iframe/Iframe.js.map +1 -1
  58. package/es6/FrontApplet/Input/Input.js +2 -1
  59. package/es6/FrontApplet/Input/Input.js.map +1 -1
  60. package/es6/FrontApplet/Management/App/App.d.ts +53 -17
  61. package/es6/FrontApplet/Management/App/App.js +23 -12
  62. package/es6/FrontApplet/Management/App/App.js.map +1 -1
  63. package/es6/FrontApplet/Management/App/IApp.d.ts +3 -0
  64. package/es6/FrontApplet/Management/Audio/Audio.d.ts +24 -3
  65. package/es6/FrontApplet/Management/Audio/Audio.js +24 -3
  66. package/es6/FrontApplet/Management/Audio/Audio.js.map +1 -1
  67. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.d.ts +49 -3
  68. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js +49 -3
  69. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js.map +1 -1
  70. package/es6/FrontApplet/Management/Debug/Debug.d.ts +44 -2
  71. package/es6/FrontApplet/Management/Debug/Debug.js +43 -1
  72. package/es6/FrontApplet/Management/Debug/Debug.js.map +1 -1
  73. package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +41 -4
  74. package/es6/FrontApplet/Management/Firmware/Firmware.js +33 -0
  75. package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
  76. package/es6/FrontApplet/Management/Management.d.ts +119 -21
  77. package/es6/FrontApplet/Management/Management.js +119 -22
  78. package/es6/FrontApplet/Management/Management.js.map +1 -1
  79. package/es6/FrontApplet/Management/Network/Network.d.ts +44 -25
  80. package/es6/FrontApplet/Management/Network/Network.js +28 -14
  81. package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
  82. package/es6/FrontApplet/Management/OS/IOS.d.ts +3 -0
  83. package/es6/FrontApplet/Management/OS/OS.d.ts +32 -4
  84. package/es6/FrontApplet/Management/OS/OS.js +32 -4
  85. package/es6/FrontApplet/Management/OS/OS.js.map +1 -1
  86. package/es6/FrontApplet/Management/Package/Package.d.ts +18 -3
  87. package/es6/FrontApplet/Management/Package/Package.js +18 -4
  88. package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
  89. package/es6/FrontApplet/Management/Power/IPower.d.ts +3 -0
  90. package/es6/FrontApplet/Management/Power/IPower.js.map +1 -1
  91. package/es6/FrontApplet/Management/Power/Power.d.ts +67 -20
  92. package/es6/FrontApplet/Management/Power/Power.js +71 -25
  93. package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
  94. package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +28 -3
  95. package/es6/FrontApplet/Management/Proxy/Proxy.js +28 -3
  96. package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
  97. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +23 -5
  98. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +23 -5
  99. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
  100. package/es6/FrontApplet/Management/Screen/Screen.d.ts +77 -32
  101. package/es6/FrontApplet/Management/Screen/Screen.js +65 -26
  102. package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
  103. package/es6/FrontApplet/Management/Security/Security.d.ts +25 -7
  104. package/es6/FrontApplet/Management/Security/Security.js +25 -7
  105. package/es6/FrontApplet/Management/Security/Security.js.map +1 -1
  106. package/es6/FrontApplet/Management/Time/Time.d.ts +47 -11
  107. package/es6/FrontApplet/Management/Time/Time.js +29 -7
  108. package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
  109. package/es6/FrontApplet/Management/Wifi/IWifi.d.ts +3 -0
  110. package/es6/FrontApplet/Management/Wifi/IWifi.js.map +1 -1
  111. package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +137 -42
  112. package/es6/FrontApplet/Management/Wifi/Wifi.js +139 -43
  113. package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
  114. package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +8 -3
  115. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +8 -3
  116. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
  117. package/es6/FrontApplet/OSD/OSD.d.ts +9 -0
  118. package/es6/FrontApplet/OSD/OSD.js +9 -0
  119. package/es6/FrontApplet/OSD/OSD.js.map +1 -1
  120. package/es6/FrontApplet/Offline/Cache/Cache.js +2 -2
  121. package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -1
  122. package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +1 -1
  123. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -1
  124. package/es6/FrontApplet/Offline/Offline.js +2 -2
  125. package/es6/FrontApplet/Offline/Offline.js.map +1 -1
  126. package/es6/FrontApplet/Sync/Sync.js +6 -3
  127. package/es6/FrontApplet/Sync/Sync.js.map +1 -1
  128. package/es6/FrontApplet/Touch/Touch.js +2 -1
  129. package/es6/FrontApplet/Touch/Touch.js.map +1 -1
  130. package/es6/FrontApplet/Validate/Validate.d.ts +1 -1
  131. package/es6/FrontApplet/Validate/Validate.js +9 -9
  132. package/es6/FrontApplet/Validate/Validate.js.map +1 -1
  133. package/es6/FrontApplet/Validate/ValidateObjectInterface.js +10 -10
  134. package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -1
  135. package/es6/FrontApplet/Video/Video.d.ts +9 -0
  136. package/es6/FrontApplet/Video/Video.js +11 -1
  137. package/es6/FrontApplet/Video/Video.js.map +1 -1
  138. package/es6/Monitoring/FileSystem/fileSystemCommands.d.ts +2 -2
  139. package/es6/Monitoring/Management/Screen/handleScreenRequests.js +2 -1
  140. package/es6/Monitoring/Management/Screen/handleScreenRequests.js.map +1 -1
  141. package/es6/bundle.js +5 -5
  142. package/es6/bundle.js.map +1 -1
  143. package/package.json +16 -21
@@ -58,7 +58,7 @@ class Input {
58
58
  /** @internal */
59
59
  handleMessageData(data) {
60
60
  switch (data.type) {
61
- case this.getMessage('keyup'):
61
+ case this.getMessage('keyup'): {
62
62
  const keyupEvent = {
63
63
  type: 'keyup',
64
64
  keyCode: data.keyCode,
@@ -66,6 +66,7 @@ class Input {
66
66
  };
67
67
  this.emitKeyUpEvent(keyupEvent);
68
68
  break;
69
+ }
69
70
  default:
70
71
  }
71
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/FrontApplet/Input/Input.ts"],"names":[],"mappings":";;;;;AAAA,mCAAsC;AAGtC,oEAA4C;AAG5C;;;GAGG;AACH,MAAqB,KAAK;IAUR;IACC;IAVX,MAAM,CAAU,cAAc,GAAW,OAAO,CAAC;IAEvC,YAAY,GAAiB,IAAI,qBAAY,EAAE,CAA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AM,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAClD,CAAC;iBAAM,CAAC;gBACP,MAAM,CAAC,CAAC;YACT,CAAC;QACF,CAAC;IACF,CAAC,CAAC;IAEM,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,KAAK,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;IACrE,CAAC;IAEO,UAAU;QACjB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;QAC9B,CAAC;IACF,CAAC;;AAzIF,wBA0IC"}
@@ -2,6 +2,15 @@ import IPostMessage from '../../IPostMessage';
2
2
  import IApp, { AppType } from './IApp';
3
3
  /**
4
4
  * The `sos.management.app` API groups together methods for managing the signageOS application installed on the system.
5
+ *
6
+ * <details>
7
+ * <summary>App Management Capabilities</summary>
8
+ * | Capability | Description |
9
+ * |:------------|:-------------|
10
+ * | `APP_UPGRADE` | If the signageOS application can upgrade itself to a specific version |
11
+ *
12
+ * If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
13
+ * </details>
5
14
  */
6
15
  export default class App implements IApp {
7
16
  private messagePrefix;
@@ -9,38 +18,47 @@ export default class App implements IApp {
9
18
  /** @internal */
10
19
  constructor(messagePrefix: string, postMessage: IPostMessage<any>);
11
20
  /**
12
- * The `getType()` method returns type of the platform the application is running on.
21
+ * The `getType()` method returns the type of the platform the application is running on.
13
22
  *
14
23
  * :::info
15
- *
16
- * If you need to get specific Android brand or Raspberry Pi model, use the `sos.management.firmware.getType()`.
17
- *
24
+ * - If you need to get a specific Android brand or Raspberry Pi model, use the `sos.management.firmware.getType()`.
25
+ * - `default` type is always Emulator.
18
26
  * :::
19
27
  *
28
+ * @returns {Promise<AppType>} Resolves to the type of the application platform.
20
29
  * @since 4.0.0
30
+ *
31
+ * @example
32
+ * const appType = await sos.management.app.getType();
33
+ * console.log(appType); // tizen, linux, webos, etc.
21
34
  */
22
35
  getType(): Promise<AppType>;
23
36
  /**
24
- * The `getVersion()` method returns version of the application currently running.
25
- *
26
- * :::info
27
- *
28
- * This API is only available for Applets deployed via Timing from Box or REST API.
29
- *
30
- * :::
37
+ * The `getVersion()` method returns the version of the Core App that is currently running on the device.
31
38
  *
39
+ * @returns {Promise<string>} Resolves to the version of the Core application.
32
40
  * @since 4.0.0
41
+ *
42
+ * @example
43
+ * const version = await sos.management.app.getVersion();
44
+ * console.log(`Current application version is: ${version}`); // e.g. '4.0.0', '5.2.1', etc.
33
45
  */
34
46
  getVersion(): Promise<string>;
35
47
  /**
36
- * The `upgrade(version, baseUrl?)` method upgrades the signageOS application using version and baseUrl. Platform users can install general
37
- * application version directly with passing just version number. Optionally, the baseUrl can be passed as argument to specify server
48
+ * The `upgrade(version, baseUrl?)` method upgrades the signageOS application using version and baseUrl. Platform users can install the general
49
+ * application version directly with passing just the version number. Optionally, the baseUrl can be passed as an argument to specify the server
38
50
  * where the application files are accessible.
39
51
  *
40
52
  * @param version The version of the application being installed.
41
53
  * @param [baseUrl='https://2.signageos.io'] Optional server URL where application files are located.
42
- *
54
+ * @returns {Promise<void>} A promise that resolves when the upgrade starts.
55
+ * @throws {Error} If the upgrade fails.
43
56
  * @since 4.0.0
57
+ *
58
+ * @example // {@link https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/app-upgrade | How to upgrade application via applets}
59
+ *
60
+ * @example
61
+ * await sos.management.app.upgrade('4.0.0', 'https://2.signageos.io')
44
62
  */
45
63
  upgrade(version: string, baseUrl?: string): Promise<void>;
46
64
  /**
@@ -55,8 +73,8 @@ export default class App implements IApp {
55
73
  */
56
74
  upgrade(baseUrl: string, version: string): Promise<void>;
57
75
  /**
58
- * The `upgrade(appUri)` method upgrades the signageOS application with provided appUri. Open users can upgrade app passing FQN
59
- * uri where the application main file is located.
76
+ * The `upgrade(appUri)` method upgrades the signageOS application with the provided `appUri`. Open users can upgrade the app passing FQN
77
+ * URI where the application's main file is located.
60
78
  *
61
79
  * This file type/extension differs for every platform. E.g.:
62
80
  * - SSSP: http://example.com/apps/sssp_config.xml or http://example.com/apps/ApplicationName.zip
@@ -66,10 +84,28 @@ export default class App implements IApp {
66
84
  * - Brightsign: http://example.com/apps/ApplicationName.zip
67
85
  * - Linux: http://example.com/apps/ApplicationName.apk
68
86
  * - Android: http://example.com/apps/ApplicationName.apk
87
+ * - ChromeOS: Not supported
69
88
  *
70
- * @param appUri FQN uri where the application main file is located.
89
+ * :::tip
90
+ * Check our latest versions in our [changelogs](https://docs.signageos.io/hc/en-us/sections/4409161443730-Core-Apps).
91
+ * :::
71
92
  *
93
+ * @param appUri FQN uri where the application's main file is located.
94
+ * @returns {Promise<void>} A promise that resolves when the upgrade starts.
95
+ * @throws {Error} If the upgrade fails.
72
96
  * @since 4.0.0
97
+ *
98
+ * @example // {@link https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/app-upgrade | How to upgrade application via applets}
99
+ *
100
+ * @example
101
+ * // Upgrade the application to a specific version
102
+ * await sos.management.app.upgrade('http://example.com/apps/ApplicationName.zip')
103
+ * .then(() => {
104
+ * console.log('Application upgrade started successfully.');
105
+ * })
106
+ * .catch((error) => {
107
+ * console.error('Failed to start application upgrade:', error);
108
+ * });
73
109
  */
74
110
  upgrade(appUri: string): Promise<void>;
75
111
  private getMessage;
@@ -3,6 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const UpgradeHelper_1 = require("../helpers/UpgradeHelper");
4
4
  /**
5
5
  * The `sos.management.app` API groups together methods for managing the signageOS application installed on the system.
6
+ *
7
+ * <details>
8
+ * <summary>App Management Capabilities</summary>
9
+ * | Capability | Description |
10
+ * |:------------|:-------------|
11
+ * | `APP_UPGRADE` | If the signageOS application can upgrade itself to a specific version |
12
+ *
13
+ * If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
14
+ * </details>
6
15
  */
7
16
  class App {
8
17
  messagePrefix;
@@ -13,15 +22,19 @@ class App {
13
22
  this.postMessage = postMessage;
14
23
  }
15
24
  /**
16
- * The `getType()` method returns type of the platform the application is running on.
25
+ * The `getType()` method returns the type of the platform the application is running on.
17
26
  *
18
27
  * :::info
19
- *
20
- * If you need to get specific Android brand or Raspberry Pi model, use the `sos.management.firmware.getType()`.
21
- *
28
+ * - If you need to get a specific Android brand or Raspberry Pi model, use the `sos.management.firmware.getType()`.
29
+ * - `default` type is always Emulator.
22
30
  * :::
23
31
  *
32
+ * @returns {Promise<AppType>} Resolves to the type of the application platform.
24
33
  * @since 4.0.0
34
+ *
35
+ * @example
36
+ * const appType = await sos.management.app.getType();
37
+ * console.log(appType); // tizen, linux, webos, etc.
25
38
  */
26
39
  async getType() {
27
40
  const { applicationType } = await this.postMessage({
@@ -29,17 +42,15 @@ class App {
29
42
  });
30
43
  return applicationType;
31
44
  }
32
- // TODO: unify box/cloud control
33
45
  /**
34
- * The `getVersion()` method returns version of the application currently running.
35
- *
36
- * :::info
37
- *
38
- * This API is only available for Applets deployed via Timing from Box or REST API.
39
- *
40
- * :::
46
+ * The `getVersion()` method returns the version of the Core App that is currently running on the device.
41
47
  *
48
+ * @returns {Promise<string>} Resolves to the version of the Core application.
42
49
  * @since 4.0.0
50
+ *
51
+ * @example
52
+ * const version = await sos.management.app.getVersion();
53
+ * console.log(`Current application version is: ${version}`); // e.g. '4.0.0', '5.2.1', etc.
43
54
  */
44
55
  async getVersion() {
45
56
  const { applicationVersion } = await this.postMessage({
@@ -1 +1 @@
1
- {"version":3,"file":"App.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/App/App.ts"],"names":[],"mappings":";;AACA,4DAAiE;AAGjE;;GAEG;AACH,MAAqB,GAAG;IAGd;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,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,CAAC,OAAO;QACnB,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YAClD,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;SAC7C,CAAC,CAAC;QAEH,OAAO,eAAe,CAAC;IACxB,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,UAAU;QACtB,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YACrD,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC;SAChD,CAAC,CAAC;QAEH,OAAO,kBAAkB,CAAC;IAC3B,CAAC;IAqED,gBAAgB;IACT,KAAK,CAAC,OAAO,CAAC,IAAY,EAAE,IAAa;QAC/C,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAA,qCAAqB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1E,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;YACpC,OAAO;YACP,OAAO;YACP,SAAS;SACT,CAAC,CAAC;IACJ,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;IACxC,CAAC;CACD;AAjID,sBAiIC"}
@@ -1,4 +1,7 @@
1
1
  import { AnyString } from '../../../utils/types';
2
+ /**
3
+ * All available app types
4
+ */
2
5
  export type AppType = 'android' | 'brightsign' | 'default' | 'linux' | 'sssp' | 'tizen' | 'webos' | 'windows' | 'chromeos' | AnyString;
3
6
  export default interface IApp {
4
7
  getType(): Promise<AppType>;
@@ -2,6 +2,16 @@ import IPostMessage from '../../IPostMessage';
2
2
  import IAudio from './IAudio';
3
3
  /**
4
4
  * The `sos.management.audio` API groups methods for managing audio settings.
5
+ *
6
+ * <details>
7
+ * <summary>Volume Management Capabilities</summary>
8
+ * | Capability | Description |
9
+ * |:------------|:-------------|
10
+ * | `SET_VOLUME` | If device can set volume level |
11
+ * | `GET_VOLUME` | If device can get current volume level |
12
+ *
13
+ * If you want to check if the device supports those capabilities, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
14
+ * </details>
5
15
  */
6
16
  export default class Audio implements IAudio {
7
17
  private messagePrefix;
@@ -9,17 +19,28 @@ export default class Audio implements IAudio {
9
19
  /** @internal */
10
20
  constructor(messagePrefix: string, postMessage: IPostMessage<any>);
11
21
  /**
12
- * The `getVolume()` method returns current volume level of the device.
22
+ * The `getVolume()` method returns the current volume level of the device.
13
23
  *
24
+ * @returns {Promise<number>} A promise that resolves to the current volume level, which is a value between 0 and 100.
14
25
  * @since 2.0.0
26
+ *
27
+ * @example
28
+ * const currentVolume = await sos.management.audio.getVolume();
29
+ * console.log(`Current volume level is: ${currentVolume}`); // e.g. 75
15
30
  */
16
31
  getVolume(): Promise<number>;
17
32
  /**
18
- * The `getVolume()` method set the volume level of the device.
33
+ * The `setVolume()` method sets the volume level of the device.
19
34
  *
20
35
  * @param volume Value between 0 and 100.
21
- *
36
+ * @returns {Promise<void>} A promise that resolves when the volume is set.
37
+ * @throws {Error} If the volume is not a number or is outside the range of 0 to 100.
22
38
  * @since 2.0.0
39
+ *
40
+ * @example // {@link https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/volume | Example applet with setting volume}
41
+ *
42
+ * @example
43
+ * await sos.management.audio.setVolume(50);
23
44
  */
24
45
  setVolume(volume: number): Promise<void>;
25
46
  private getMessage;
@@ -6,6 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Validate_1 = __importDefault(require("../../Validate/Validate"));
7
7
  /**
8
8
  * The `sos.management.audio` API groups methods for managing audio settings.
9
+ *
10
+ * <details>
11
+ * <summary>Volume Management Capabilities</summary>
12
+ * | Capability | Description |
13
+ * |:------------|:-------------|
14
+ * | `SET_VOLUME` | If device can set volume level |
15
+ * | `GET_VOLUME` | If device can get current volume level |
16
+ *
17
+ * If you want to check if the device supports those capabilities, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
18
+ * </details>
9
19
  */
10
20
  class Audio {
11
21
  messagePrefix;
@@ -16,9 +26,14 @@ class Audio {
16
26
  this.postMessage = postMessage;
17
27
  }
18
28
  /**
19
- * The `getVolume()` method returns current volume level of the device.
29
+ * The `getVolume()` method returns the current volume level of the device.
20
30
  *
31
+ * @returns {Promise<number>} A promise that resolves to the current volume level, which is a value between 0 and 100.
21
32
  * @since 2.0.0
33
+ *
34
+ * @example
35
+ * const currentVolume = await sos.management.audio.getVolume();
36
+ * console.log(`Current volume level is: ${currentVolume}`); // e.g. 75
22
37
  */
23
38
  async getVolume() {
24
39
  const { volume } = await this.postMessage({
@@ -27,11 +42,17 @@ class Audio {
27
42
  return volume;
28
43
  }
29
44
  /**
30
- * The `getVolume()` method set the volume level of the device.
45
+ * The `setVolume()` method sets the volume level of the device.
31
46
  *
32
47
  * @param volume Value between 0 and 100.
33
- *
48
+ * @returns {Promise<void>} A promise that resolves when the volume is set.
49
+ * @throws {Error} If the volume is not a number or is outside the range of 0 to 100.
34
50
  * @since 2.0.0
51
+ *
52
+ * @example // {@link https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/volume | Example applet with setting volume}
53
+ *
54
+ * @example
55
+ * await sos.management.audio.setVolume(50);
35
56
  */
36
57
  async setVolume(volume) {
37
58
  (0, Validate_1.default)({ volume }).required().number().min(0).max(100);
@@ -1 +1 @@
1
- {"version":3,"file":"Audio.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Audio/Audio.ts"],"names":[],"mappings":";;;;;AACA,uEAA+C;AAG/C;;GAEG;AACH,MAAqB,KAAK;IAGhB;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;OAIG;IACI,KAAK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E,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACzD,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;YACnC,MAAM;SACN,CAAC,CAAC;IACJ,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;IACxC,CAAC;CACD;AAhDD,wBAgDC"}
@@ -1,14 +1,60 @@
1
1
  import IPostMessage from '../../IPostMessage';
2
2
  import IAutoRecovery, { IAutoRecoveryConfiguration } from './IAutoRecovery';
3
- /** @todo */
3
+ /**
4
+ * The `sos.management.autoRecovery` API provides methods for managing the auto-recovery feature of the signageOS app.
5
+ *
6
+ * The Auto Recovery feature is designed to automatically recover the signageOS app in case of a crash or unexpected shutdown
7
+ * or switching input to a different value, e.g., HDMI.
8
+ *
9
+ * <details>
10
+ * <summary>Auto Recovery Management Capabilities</summary>
11
+ * | Capability | Description |
12
+ * |:------------|:-------------|
13
+ * | `AUTO_RECOVERY` | If the device can enable or disable the auto recovery function. |
14
+ *
15
+ * If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
16
+ * </details>
17
+ */
4
18
  export default class AutoRecovery implements IAutoRecovery {
5
19
  private messagePrefix;
6
20
  private postMessage;
7
21
  /** @internal */
8
22
  constructor(messagePrefix: string, postMessage: IPostMessage<IAutoRecoveryConfiguration>);
9
- /** @internal */
23
+ /**
24
+ * The `get()` method retrieves the current auto-recovery configuration.
25
+ *
26
+ * @returns {Promise<IAutoRecoveryConfiguration>} A promise that resolves to the current auto-recovery configuration.
27
+ * @since 5.0.0
28
+ *
29
+ * @example
30
+ * const autoRecoveryConfig = await sos.management.autoRecovery.get();
31
+ * if (autoRecoveryConfig.enabled) {
32
+ * console.log(`Auto-recovery is enabled with a healthcheck interval of ${autoRecoveryConfig.healthcheckIntervalMs} ms.`);
33
+ * }
34
+ */
10
35
  get(): Promise<IAutoRecoveryConfiguration>;
11
- /** @internal */
36
+ /**
37
+ * The `set()` method allows to enable or disable the auto-recovery feature and configure its settings.
38
+ *
39
+ * :::note
40
+ * The configuration object has different properties depending on if enabled is true or false.
41
+ * :::
42
+ *
43
+ * @param configuration The configuration object for auto-recovery settings.
44
+ * @param configuration.enabled A boolean to set auto-recovery to enabled or disabled state.
45
+ * @param configuration.autoEnableTimeoutMs The timeout in milliseconds after which the auto-recovery will be automatically enabled if it was disabled.
46
+ * @param configuration.healthcheckIntervalMs The interval in milliseconds for the health check if application is running in foreground.
47
+ * @returns {Promise<void>} A promise that resolves when the auto-recovery settings are successfully set.
48
+ * @throws {Error} If the configuration is invalid.
49
+ * @since 5.0.0
50
+ *
51
+ * @example
52
+ * // Enable auto-recovery with a healthcheck interval of 5000 ms
53
+ * await sos.management.autoRecovery.set({
54
+ * enabled: true,
55
+ * healthcheckIntervalMs: 5000,
56
+ * });
57
+ */
12
58
  set(configuration: IAutoRecoveryConfiguration): Promise<void>;
13
59
  private getMessage;
14
60
  }
@@ -2,7 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const lodash_1 = require("lodash");
4
4
  const IAutoRecovery_1 = require("./IAutoRecovery");
5
- /** @todo */
5
+ /**
6
+ * The `sos.management.autoRecovery` API provides methods for managing the auto-recovery feature of the signageOS app.
7
+ *
8
+ * The Auto Recovery feature is designed to automatically recover the signageOS app in case of a crash or unexpected shutdown
9
+ * or switching input to a different value, e.g., HDMI.
10
+ *
11
+ * <details>
12
+ * <summary>Auto Recovery Management Capabilities</summary>
13
+ * | Capability | Description |
14
+ * |:------------|:-------------|
15
+ * | `AUTO_RECOVERY` | If the device can enable or disable the auto recovery function. |
16
+ *
17
+ * If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
18
+ * </details>
19
+ */
6
20
  class AutoRecovery {
7
21
  messagePrefix;
8
22
  postMessage;
@@ -11,7 +25,18 @@ class AutoRecovery {
11
25
  this.messagePrefix = messagePrefix;
12
26
  this.postMessage = postMessage;
13
27
  }
14
- /** @internal */
28
+ /**
29
+ * The `get()` method retrieves the current auto-recovery configuration.
30
+ *
31
+ * @returns {Promise<IAutoRecoveryConfiguration>} A promise that resolves to the current auto-recovery configuration.
32
+ * @since 5.0.0
33
+ *
34
+ * @example
35
+ * const autoRecoveryConfig = await sos.management.autoRecovery.get();
36
+ * if (autoRecoveryConfig.enabled) {
37
+ * console.log(`Auto-recovery is enabled with a healthcheck interval of ${autoRecoveryConfig.healthcheckIntervalMs} ms.`);
38
+ * }
39
+ */
15
40
  async get() {
16
41
  const settings = await this.postMessage({ type: this.getMessage('get_auto_recovery') });
17
42
  if (!settings.enabled) {
@@ -19,7 +44,28 @@ class AutoRecovery {
19
44
  }
20
45
  return (0, lodash_1.pick)(settings, ['enabled', 'healthcheckIntervalMs']);
21
46
  }
22
- /** @internal */
47
+ /**
48
+ * The `set()` method allows to enable or disable the auto-recovery feature and configure its settings.
49
+ *
50
+ * :::note
51
+ * The configuration object has different properties depending on if enabled is true or false.
52
+ * :::
53
+ *
54
+ * @param configuration The configuration object for auto-recovery settings.
55
+ * @param configuration.enabled A boolean to set auto-recovery to enabled or disabled state.
56
+ * @param configuration.autoEnableTimeoutMs The timeout in milliseconds after which the auto-recovery will be automatically enabled if it was disabled.
57
+ * @param configuration.healthcheckIntervalMs The interval in milliseconds for the health check if application is running in foreground.
58
+ * @returns {Promise<void>} A promise that resolves when the auto-recovery settings are successfully set.
59
+ * @throws {Error} If the configuration is invalid.
60
+ * @since 5.0.0
61
+ *
62
+ * @example
63
+ * // Enable auto-recovery with a healthcheck interval of 5000 ms
64
+ * await sos.management.autoRecovery.set({
65
+ * enabled: true,
66
+ * healthcheckIntervalMs: 5000,
67
+ * });
68
+ */
23
69
  async set(configuration) {
24
70
  (0, IAutoRecovery_1.validateAutoRecoveryConfiguration)(configuration);
25
71
  await this.postMessage({ type: this.getMessage('set_auto_recovery'), ...configuration });
@@ -1 +1 @@
1
- {"version":3,"file":"AutoRecovery.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/AutoRecovery/AutoRecovery.ts"],"names":[],"mappings":";;AAAA,mCAA8B;AAE9B,mDAA+G;AAE/G,YAAY;AACZ,MAAqB,YAAY;IAGvB;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAAqD;QADrD,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAA0C;IAC3D,CAAC;IAEJ,gBAAgB;IACT,KAAK,CAAC,GAAG;QACf,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC;QACxF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACvB,OAAO,IAAA,aAAI,EAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAA,aAAI,EAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,gBAAgB;IACT,KAAK,CAAC,GAAG,CAAC,aAAyC;QACzD,IAAA,iDAAiC,EAAC,aAAa,CAAC,CAAC;QACjD,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,GAAG,aAAa,EAAE,CAAC,CAAC;IAC1F,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;IACxC,CAAC;CACD;AAzBD,+BAyBC"}
1
+ {"version":3,"file":"AutoRecovery.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/AutoRecovery/AutoRecovery.ts"],"names":[],"mappings":";;AAAA,mCAA8B;AAE9B,mDAA+G;AAE/G;;;;;;;;;;;;;;GAcG;AACH,MAAqB,YAAY;IAGvB;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAAqD;QADrD,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAA0C;IAC3D,CAAC;IAEJ;;;;;;;;;;;OAWG;IACI,KAAK,CAAC,GAAG;QACf,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC;QACxF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACvB,OAAO,IAAA,aAAI,EAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAA,aAAI,EAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACI,KAAK,CAAC,GAAG,CAAC,aAAyC;QACzD,IAAA,iDAAiC,EAAC,aAAa,CAAC,CAAC;QACjD,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,GAAG,aAAa,EAAE,CAAC,CAAC;IAC1F,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;IACxC,CAAC;CACD;AAzDD,+BAyDC"}
@@ -1,7 +1,20 @@
1
1
  import IPostMessage from '../../IPostMessage';
2
2
  import IDebug from './IDebug';
3
3
  /**
4
- * The `sos.management.debug` API groups together method for working with native debug mode.
4
+ * The `sos.management.debug` API groups together methods for working with native debug mode.
5
+ *
6
+ * :::note
7
+ * Some modern systems might require additional steps to enable the native debug mode. Please refer to the [native debug documentation](https://docs.signageos.io/hc/en-us/articles/4413935787154-Applet-Native-Device-Debug) for more information.
8
+ * :::
9
+ *
10
+ * <details>
11
+ * <summary>Debug Management Capabilities</summary>
12
+ * | Capability | Description |
13
+ * |:------------|:-------------|
14
+ * | `SET_DEBUG` | If the device can enable or disable the native debug mode. |
15
+ *
16
+ * If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
17
+ * </details>
5
18
  */
6
19
  export default class Debug implements IDebug {
7
20
  private messagePrefix;
@@ -11,21 +24,50 @@ export default class Debug implements IDebug {
11
24
  /**
12
25
  * The `enable()` method enables the [native debug](https://docs.signageos.io/hc/en-us/articles/4413935787154-Applet-Native-Device-Debug) mode.
13
26
  *
27
+ * @returns {Promise<void>} A promise that resolves when the debug mode is enabled.
14
28
  * @since 3.0.0
29
+ *
30
+ * @example // {@link https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/debug | Example applet with activating debug mode}
31
+ *
32
+ * @example
33
+ * await sos.management.debug.enable();
15
34
  */
16
35
  enable(): Promise<void>;
17
36
  /**
18
37
  * The `enable()` method disables the [native debug](https://docs.signageos.io/hc/en-us/articles/4413935787154-Applet-Native-Device-Debug) mode.
19
38
  *
39
+ * @returns {Promise<void>} A promise that resolves when the debug mode is disabled.
20
40
  * @since 3.0.0
41
+ *
42
+ * @example
43
+ * await sos.management.debug.disable();
21
44
  */
22
45
  disable(): Promise<void>;
23
46
  /**
24
47
  * The `isEnabled()` method returns whether the [native debug](https://docs.signageos.io/hc/en-us/articles/4413935787154-Applet-Native-Device-Debug) mode is enabled.
25
48
  *
49
+ * @returns {Promise<boolean>} A promise that resolves to `true` if the debug mode is enabled, otherwise `false`.
26
50
  * @since 4.1.0
51
+ *
52
+ * @example
53
+ * const isDebugEnabled = await sos.management.debug.isEnabled();
54
+ * console.log(`Native debug mode is ${isDebugEnabled ? 'enabled' : 'disabled'}.`);
27
55
  */
28
56
  isEnabled(): Promise<boolean>;
29
- private setDebug;
57
+ /**
58
+ * The `setDebug(enabled)` method sets the native debug mode to the specified state.
59
+ *
60
+ * @param enabled `true` to enable the debug mode, `false` to disable it.
61
+ * @returns {Promise<void>} A promise that resolves when the debug mode is set.
62
+ * @throws {Error} If the `enabled` parameter is not a boolean.
63
+ * @since 4.1.0
64
+ *
65
+ * @example
66
+ * const enabled = await sos.management.debug.isEnabled();
67
+ * if (!enabled) {
68
+ * await sos.management.debug.setDebug(true);
69
+ * }
70
+ */
71
+ setDebug(enabled: boolean): Promise<void>;
30
72
  private getMessage;
31
73
  }
@@ -5,7 +5,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Validate_1 = __importDefault(require("../../Validate/Validate"));
7
7
  /**
8
- * The `sos.management.debug` API groups together method for working with native debug mode.
8
+ * The `sos.management.debug` API groups together methods for working with native debug mode.
9
+ *
10
+ * :::note
11
+ * Some modern systems might require additional steps to enable the native debug mode. Please refer to the [native debug documentation](https://docs.signageos.io/hc/en-us/articles/4413935787154-Applet-Native-Device-Debug) for more information.
12
+ * :::
13
+ *
14
+ * <details>
15
+ * <summary>Debug Management Capabilities</summary>
16
+ * | Capability | Description |
17
+ * |:------------|:-------------|
18
+ * | `SET_DEBUG` | If the device can enable or disable the native debug mode. |
19
+ *
20
+ * If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
21
+ * </details>
9
22
  */
10
23
  class Debug {
11
24
  messagePrefix;
@@ -18,7 +31,13 @@ class Debug {
18
31
  /**
19
32
  * The `enable()` method enables the [native debug](https://docs.signageos.io/hc/en-us/articles/4413935787154-Applet-Native-Device-Debug) mode.
20
33
  *
34
+ * @returns {Promise<void>} A promise that resolves when the debug mode is enabled.
21
35
  * @since 3.0.0
36
+ *
37
+ * @example // {@link https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/debug | Example applet with activating debug mode}
38
+ *
39
+ * @example
40
+ * await sos.management.debug.enable();
22
41
  */
23
42
  async enable() {
24
43
  await this.setDebug(true);
@@ -26,7 +45,11 @@ class Debug {
26
45
  /**
27
46
  * The `enable()` method disables the [native debug](https://docs.signageos.io/hc/en-us/articles/4413935787154-Applet-Native-Device-Debug) mode.
28
47
  *
48
+ * @returns {Promise<void>} A promise that resolves when the debug mode is disabled.
29
49
  * @since 3.0.0
50
+ *
51
+ * @example
52
+ * await sos.management.debug.disable();
30
53
  */
31
54
  async disable() {
32
55
  await this.setDebug(false);
@@ -34,7 +57,12 @@ class Debug {
34
57
  /**
35
58
  * The `isEnabled()` method returns whether the [native debug](https://docs.signageos.io/hc/en-us/articles/4413935787154-Applet-Native-Device-Debug) mode is enabled.
36
59
  *
60
+ * @returns {Promise<boolean>} A promise that resolves to `true` if the debug mode is enabled, otherwise `false`.
37
61
  * @since 4.1.0
62
+ *
63
+ * @example
64
+ * const isDebugEnabled = await sos.management.debug.isEnabled();
65
+ * console.log(`Native debug mode is ${isDebugEnabled ? 'enabled' : 'disabled'}.`);
38
66
  */
39
67
  async isEnabled() {
40
68
  const { isEnabled } = await this.postMessage({
@@ -42,6 +70,20 @@ class Debug {
42
70
  });
43
71
  return isEnabled;
44
72
  }
73
+ /**
74
+ * The `setDebug(enabled)` method sets the native debug mode to the specified state.
75
+ *
76
+ * @param enabled `true` to enable the debug mode, `false` to disable it.
77
+ * @returns {Promise<void>} A promise that resolves when the debug mode is set.
78
+ * @throws {Error} If the `enabled` parameter is not a boolean.
79
+ * @since 4.1.0
80
+ *
81
+ * @example
82
+ * const enabled = await sos.management.debug.isEnabled();
83
+ * if (!enabled) {
84
+ * await sos.management.debug.setDebug(true);
85
+ * }
86
+ */
45
87
  async setDebug(enabled) {
46
88
  (0, Validate_1.default)({ enabled }).required().boolean();
47
89
  await this.postMessage({
@@ -1 +1 @@
1
- {"version":3,"file":"Debug.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Debug/Debug.ts"],"names":[],"mappings":";;;;;AACA,uEAA+C;AAG/C;;GAEG;AACH,MAAqB,KAAK;IAGhB;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;OAIG;IACI,KAAK,CAAC,MAAM;QAClB,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,OAAO;QACnB,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,SAAS;QACrB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YAC5C,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;SACnC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IAClB,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,OAAgB;QACtC,IAAA,kBAAQ,EAAC,EAAE,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC;QAC3C,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;YAClC,OAAO;SACP,CAAC,CAAC;IACJ,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;IACxC,CAAC;CACD;AAjDD,wBAiDC"}
1
+ {"version":3,"file":"Debug.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Debug/Debug.ts"],"names":[],"mappings":";;;;;AACA,uEAA+C;AAG/C;;;;;;;;;;;;;;;GAeG;AACH,MAAqB,KAAK;IAGhB;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,W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