@signageos/front-applet 8.1.2 → 8.1.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 (110) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/bundle.js.map +1 -1
  3. package/docs/sos/browser.md +66 -14
  4. package/docs/sos/command.md +52 -6
  5. package/docs/sos/debug.md +21 -2
  6. package/docs/sos/deviceInfo.md +31 -0
  7. package/docs/sos/display.md +34 -3
  8. package/docs/sos/fileSystem.md +1135 -59
  9. package/docs/sos/hardware/barcodeScanner.md +58 -15
  10. package/docs/sos/hardware/index.md +72 -15
  11. package/docs/sos/hardware/led.md +32 -3
  12. package/docs/sos/index.md +3 -3
  13. package/docs/sos/input.md +42 -1
  14. package/docs/sos/monitors.md +8 -0
  15. package/docs/sos/native/mdc.md +69 -23
  16. package/docs/sos/offline/cache.md +376 -30
  17. package/docs/sos/offline/index.md +127 -24
  18. package/docs/sos/osd.md +8 -1
  19. package/docs/sos/proofOfPlay.md +28 -0
  20. package/docs/sos/stream.md +78 -78
  21. package/docs/sos/sync.md +228 -21
  22. package/docs/sos/video.md +73 -73
  23. package/docs/sos_management/app.md +11 -11
  24. package/docs/sos_management/audio.md +3 -3
  25. package/docs/sos_management/firmware.md +11 -11
  26. package/docs/sos_management/index.md +9 -9
  27. package/docs/sos_management/network.md +10 -10
  28. package/docs/sos_management/package.md +6 -6
  29. package/docs/sos_management/power.md +27 -27
  30. package/docs/sos_management/screen.md +17 -17
  31. package/docs/sos_management/security.md +3 -3
  32. package/docs/sos_management/time.md +8 -8
  33. package/docs/sos_management/wifi.md +12 -12
  34. package/es6/FrontApplet/Browser/Browser.d.ts +25 -9
  35. package/es6/FrontApplet/Browser/Browser.js +25 -9
  36. package/es6/FrontApplet/Browser/Browser.js.map +1 -1
  37. package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +7 -0
  38. package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -1
  39. package/es6/FrontApplet/Browser/events.d.ts +6 -0
  40. package/es6/FrontApplet/Browser/events.js.map +1 -1
  41. package/es6/FrontApplet/Command/Command.d.ts +15 -6
  42. package/es6/FrontApplet/Command/Command.js +15 -6
  43. package/es6/FrontApplet/Command/Command.js.map +1 -1
  44. package/es6/FrontApplet/Command/ICommand.d.ts +7 -0
  45. package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -0
  46. package/es6/FrontApplet/Debug/Debug.d.ts +11 -3
  47. package/es6/FrontApplet/Debug/Debug.js +11 -3
  48. package/es6/FrontApplet/Debug/Debug.js.map +1 -1
  49. package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +19 -0
  50. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +20 -2
  51. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
  52. package/es6/FrontApplet/Display/Display.d.ts +22 -14
  53. package/es6/FrontApplet/Display/Display.js +22 -14
  54. package/es6/FrontApplet/Display/Display.js.map +1 -1
  55. package/es6/FrontApplet/Display/IDisplay.d.ts +4 -0
  56. package/es6/FrontApplet/FileSystem/FileSystem.d.ts +429 -41
  57. package/es6/FrontApplet/FileSystem/FileSystem.js +427 -39
  58. package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
  59. package/es6/FrontApplet/FileSystem/HashAlgorithm.d.ts +4 -1
  60. package/es6/FrontApplet/FileSystem/types.d.ts +46 -0
  61. package/es6/FrontApplet/FileSystem/types.js.map +1 -1
  62. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +36 -8
  63. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +34 -2
  64. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
  65. package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScanner.d.ts +5 -0
  66. package/es6/FrontApplet/Hardware/Hardware.d.ts +34 -5
  67. package/es6/FrontApplet/Hardware/Hardware.js +33 -5
  68. package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
  69. package/es6/FrontApplet/Hardware/ISerialPort.d.ts +17 -1
  70. package/es6/FrontApplet/Hardware/ISerialPortDataMessage.d.ts +3 -0
  71. package/es6/FrontApplet/Hardware/ISerialPortOptions.d.ts +6 -0
  72. package/es6/FrontApplet/Hardware/ISerialPortOptions.js +3 -0
  73. package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -1
  74. package/es6/FrontApplet/Hardware/Led/Led.d.ts +19 -3
  75. package/es6/FrontApplet/Hardware/Led/Led.js +19 -3
  76. package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -1
  77. package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +9 -0
  78. package/es6/FrontApplet/Input/IKeyUpEvent.js +6 -0
  79. package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -1
  80. package/es6/FrontApplet/Input/Input.d.ts +17 -1
  81. package/es6/FrontApplet/Input/Input.js +17 -1
  82. package/es6/FrontApplet/Input/Input.js.map +1 -1
  83. package/es6/FrontApplet/Monitors/Monitors.d.ts +5 -0
  84. package/es6/FrontApplet/Monitors/Monitors.js +5 -0
  85. package/es6/FrontApplet/Monitors/Monitors.js.map +1 -1
  86. package/es6/FrontApplet/NativeCommands/MDC/INativeMdcCommands.d.ts +1 -0
  87. package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +32 -11
  88. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +14 -11
  89. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
  90. package/es6/FrontApplet/OSD/OSD.d.ts +5 -1
  91. package/es6/FrontApplet/OSD/OSD.js +5 -1
  92. package/es6/FrontApplet/OSD/OSD.js.map +1 -1
  93. package/es6/FrontApplet/Offline/Cache/Cache.d.ts +205 -28
  94. package/es6/FrontApplet/Offline/Cache/Cache.js +205 -28
  95. package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -1
  96. package/es6/FrontApplet/Offline/IAddFont.js.map +1 -1
  97. package/es6/FrontApplet/Offline/IFileType.js.map +1 -1
  98. package/es6/FrontApplet/Offline/ISaveFile.d.ts +3 -0
  99. package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -1
  100. package/es6/FrontApplet/Offline/Offline.d.ts +58 -15
  101. package/es6/FrontApplet/Offline/Offline.js +56 -13
  102. package/es6/FrontApplet/Offline/Offline.js.map +1 -1
  103. package/es6/FrontApplet/ProofOfPlay/IRecordItemOptions.d.ts +3 -0
  104. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.d.ts +15 -1
  105. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +15 -1
  106. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -1
  107. package/es6/FrontApplet/Sync/Sync.d.ts +101 -18
  108. package/es6/FrontApplet/Sync/Sync.js +84 -10
  109. package/es6/FrontApplet/Sync/Sync.js.map +1 -1
  110. package/package.json +1 -1
@@ -3,7 +3,9 @@ import IPostMessage from '../IPostMessage';
3
3
  import ICommandDispatchToAppletMessage from './ICommandDispatchToAppletMessage';
4
4
  import ICommandEvent from './ICommandEvent';
5
5
  /**
6
- * The `sos.command` API groups together methods for sending logs and receiving commands from signageOS.
6
+ * In some cases, you might be interested in a complete log of what the device was doing during its operation. All of your business or technical logs can be stored in our storage for later usage. You can identify which events happened or even trigger self-repairing logic.
7
+ *
8
+ * All commands will be available in [Applet Command REST API](https://developers.signageos.io/api/#tag/DeviceApplet-Command) and can be downloaded historically as [CSV export](https://developers.signageos.io/api/#tag/DeviceMonitoring/paths/~1v1~1device~1%7BdeviceUid%7D~1report/get).
7
9
  */
8
10
  export default class Command {
9
11
  private messagePrefix;
@@ -16,16 +18,21 @@ export default class Command {
16
18
  * The `dispatch()` method dispatches a new log record to the signageOS.
17
19
  *
18
20
  * :::warning[Dispatch throttling]
19
- *
20
21
  * Sending commands from an applet is throttled, this means that after if the dispatch frequency is too high, some commands may be
21
- * discarded. Currently the limit is 30 commands per 30 seconds, although this may not be fully accurate and it's not possible to know the
22
+ * discarded. Currently, the limit is 30 commands per 30 seconds, although this may not be fully accurate, and it's not possible to know the
22
23
  * exact limit.
23
- *
24
24
  * :::
25
25
  *
26
+ * @param command The command to be dispatched.
27
+ * @throws {AppletCommandError} If type contains invalid characters, allowed to are `/^[a-zA-Z0-9\.\-_]+$/g`
28
+ * @throws {AppletCommandError} If the command type is longer then 100 characters limit.
29
+ * @throws {AppletCommandError} If the command is not an object or is missing required properties.
26
30
  * @since 1.0.3
27
31
  *
28
- * @example // {@link https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/sending/ |Sending commands}
32
+ * @example // {@link https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/sending/ | Sending commands in Applet}
33
+ * @example // {@link https://developers.signageos.io/api/#tag/DeviceApplet-Command/paths/~1v1~1device~1%7BdeviceUid%7D~1applet~1%7BappletUid%7D~1command/post | Rest API - Dispatching commands}
34
+ * @example // {@link https://developers.signageos.io/api/#tag/DeviceApplet-Command/paths/~1v1~1device~1%7BdeviceUid%7D~1applet~1command/get | Rest API - Get commands}
35
+ * @example // {@link https://developers.signageos.io/api/#tag/DeviceMonitoring/paths/~1v1~1device~1%7BdeviceUid%7D~1report/get | Rest API - Receiving historical data}
29
36
  *
30
37
  * @example
31
38
  * await sos.command.dispatch({
@@ -38,9 +45,11 @@ export default class Command {
38
45
  /**
39
46
  * The `onCommand()` method sets up a listener, which is called whenever a new command from signageOS is received.
40
47
  *
48
+ * @param listener The listener to be called when a new command is received.
49
+ * @returns {void} Resolves when the listener is successfully set up.
41
50
  * @since 1.0.3
42
51
  *
43
- * @example // {@link https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/receiving |Receiving commands}
52
+ * @example // {@link https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/receiving | Receiving commands in Applet}
44
53
  */
45
54
  onCommand(listener: (command: ICommandEvent) => void): void;
46
55
  /** @internal */
@@ -9,7 +9,9 @@ const ErrorCodes_1 = __importDefault(require("../Error/ErrorCodes"));
9
9
  const ErrorSuggestions_1 = __importDefault(require("../Error/ErrorSuggestions"));
10
10
  const Validate_1 = __importDefault(require("../Validate/Validate"));
11
11
  /**
12
- * The `sos.command` API groups together methods for sending logs and receiving commands from signageOS.
12
+ * In some cases, you might be interested in a complete log of what the device was doing during its operation. All of your business or technical logs can be stored in our storage for later usage. You can identify which events happened or even trigger self-repairing logic.
13
+ *
14
+ * All commands will be available in [Applet Command REST API](https://developers.signageos.io/api/#tag/DeviceApplet-Command) and can be downloaded historically as [CSV export](https://developers.signageos.io/api/#tag/DeviceMonitoring/paths/~1v1~1device~1%7BdeviceUid%7D~1report/get).
13
15
  */
14
16
  class Command {
15
17
  messagePrefix;
@@ -26,16 +28,21 @@ class Command {
26
28
  * The `dispatch()` method dispatches a new log record to the signageOS.
27
29
  *
28
30
  * :::warning[Dispatch throttling]
29
- *
30
31
  * Sending commands from an applet is throttled, this means that after if the dispatch frequency is too high, some commands may be
31
- * discarded. Currently the limit is 30 commands per 30 seconds, although this may not be fully accurate and it's not possible to know the
32
+ * discarded. Currently, the limit is 30 commands per 30 seconds, although this may not be fully accurate, and it's not possible to know the
32
33
  * exact limit.
33
- *
34
34
  * :::
35
35
  *
36
+ * @param command The command to be dispatched.
37
+ * @throws {AppletCommandError} If type contains invalid characters, allowed to are `/^[a-zA-Z0-9\.\-_]+$/g`
38
+ * @throws {AppletCommandError} If the command type is longer then 100 characters limit.
39
+ * @throws {AppletCommandError} If the command is not an object or is missing required properties.
36
40
  * @since 1.0.3
37
41
  *
38
- * @example // {@link https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/sending/ |Sending commands}
42
+ * @example // {@link https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/sending/ | Sending commands in Applet}
43
+ * @example // {@link https://developers.signageos.io/api/#tag/DeviceApplet-Command/paths/~1v1~1device~1%7BdeviceUid%7D~1applet~1%7BappletUid%7D~1command/post | Rest API - Dispatching commands}
44
+ * @example // {@link https://developers.signageos.io/api/#tag/DeviceApplet-Command/paths/~1v1~1device~1%7BdeviceUid%7D~1applet~1command/get | Rest API - Get commands}
45
+ * @example // {@link https://developers.signageos.io/api/#tag/DeviceMonitoring/paths/~1v1~1device~1%7BdeviceUid%7D~1report/get | Rest API - Receiving historical data}
39
46
  *
40
47
  * @example
41
48
  * await sos.command.dispatch({
@@ -54,9 +61,11 @@ class Command {
54
61
  /**
55
62
  * The `onCommand()` method sets up a listener, which is called whenever a new command from signageOS is received.
56
63
  *
64
+ * @param listener The listener to be called when a new command is received.
65
+ * @returns {void} Resolves when the listener is successfully set up.
57
66
  * @since 1.0.3
58
67
  *
59
- * @example // {@link https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/receiving |Receiving commands}
68
+ * @example // {@link https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/receiving | Receiving commands in Applet}
60
69
  */
61
70
  onCommand(listener) {
62
71
  (0, Validate_1.default)({ listener }).required().function();
@@ -1 +1 @@
1
- {"version":3,"file":"Command.js","sourceRoot":"","sources":["../../../src/FrontApplet/Command/Command.ts"],"names":[],"mappings":";;;;;AAAA,mCAAsC;AAItC,qFAA6D;AAC7D,qEAA6C;AAC7C,iFAAyD;AACzD,oEAA4C;AAG5C;;GAEG;AACH,MAAqB,OAAO;IAOlB;IACA;IAPF,MAAM,CAAC,cAAc,GAAW,SAAS,CAAC;IAEzC,YAAY,CAAe;IAEnC,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA+B;QAD/B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAoB;QAEvC,IAAI,CAAC,YAAY,GAAG,IAAI,qBAAY,EAAE,CAAC;IACxC,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACI,KAAK,CAAC,QAAQ,CAA4B,OAAiB;QACjE,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAA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AAE,CAAC;YACnB,KAAK,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;gBACzC,MAAM,YAAY,GAAG;oBACpB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,IAAI,CAAC,OAAO;iBACrB,CAAC;gBACF,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;gBAChD,MAAM;YACP,QAAQ;QACT,CAAC;IACF,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,OAAO,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;IACvE,CAAC;IAEO,iBAAiB,CAAC,IAAY;QACrC,MAAM,KAAK,GAAG,sBAAsB,CAAC;QAErC,IAAA,kBAAQ,EAAC,EAAE,IAAI,EAAE,CAAC;aAChB,QAAQ,CACR,IAAI,4BAAkB,CAAC;YACtB,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,mCAAmC;YAC5C,IAAI,EAAE,oBAAU,CAAC,sBAAsB;YACvC,UAAU,EAAE,0BAAgB,CAAC,sBAAsB;SACnD,CAAC,CACF;aACA,QAAQ,EAAE;aACV,MAAM,EAAE;aACR,WAAW,CAAC,KAAK,CAAC,CAAC;QAErB,IAAA,kBAAQ,EAAC,EAAE,IAAI,EAAE,CAAC;aAChB,QAAQ,CACR,IAAI,4BAAkB,CAAC;YACtB,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,qCAAqC;YAC9C,IAAI,EAAE,oBAAU,CAAC,wBAAwB;SACzC,CAAC,CACF;aACA,SAAS,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC;;AAzGF,0BA0GC"}
@@ -1,4 +1,11 @@
1
+ /**
2
+ * Interface represents a command structure with a type and additional data.
3
+ */
1
4
  interface ICommand {
2
5
  type: string;
6
+ /**
7
+ * The `data` property is an object that contains additional data related to the command.
8
+ */
9
+ [key: string]: any;
3
10
  }
4
11
  export default ICommand;
@@ -1,6 +1,12 @@
1
1
  import ICommand from './ICommand';
2
+ /**
3
+ * Received command event interface from signageOS.
4
+ */
2
5
  interface ICommandEvent {
3
6
  type: 'command';
7
+ /**
8
+ * Command data received from occurred event.
9
+ */
4
10
  command: ICommand;
5
11
  }
6
12
  export default ICommandEvent;
@@ -3,6 +3,11 @@ import IPostMessage from '../IPostMessage';
3
3
  import IDebug, { IDebugSetWeinreMessage, WeinreData } from './IDebug';
4
4
  /**
5
5
  * The `sos.debug` API groups together methods for checking the state of remote debug mode.
6
+ *
7
+ * :::note
8
+ * - This debug is not the "native debug" of the device, but rather a remote debug mode that allows you to connect to the device using Weinre.
9
+ * - State of the remote debug mode or native debug mode can be changed via Cloud Control or [Rest API](https://developers-staging.signageos.io/api/#tag/DeviceDebug/paths/~1v1~1device~1%7BdeviceUid%7D~1debug/put).
10
+ * :::
6
11
  */
7
12
  export default class Debug extends EventEmitter implements IDebug {
8
13
  readonly window: Window & WeinreData;
@@ -13,15 +18,18 @@ export default class Debug extends EventEmitter implements IDebug {
13
18
  /** @internal */
14
19
  constructor(window: Window & WeinreData, messagePrefix: string, postMessage: IPostMessage<any>);
15
20
  /**
16
- * The `isRemoteDebugEnabled()` method returns the state of the [Device debug](https://docs.signageos.io/hc/en-us/articles/4416366711442-Device-debug).
21
+ * The `isRemoteDebugEnabled()` method returns the state of the Device debug mode.
17
22
  *
23
+ * @returns {Promise<boolean>} Resolves to `true` if the remote debug mode is enabled, otherwise `false`.
18
24
  * @since 5.8.0
19
25
  */
20
26
  isRemoteDebugEnabled(): Promise<boolean>;
21
27
  /**
22
- * The `onRemoteDebugChanged()` method sets up a listener, which is called whenever the state of the [Device debug](https://docs.signageos.io/hc/en-us/articles/4416366711442-Device-debug) is changed.
28
+ * The `onRemoteDebugChanged()` method sets up a listener, which is called whenever the state of the Device debug mode is changed.
23
29
  *
24
- * @since
30
+ * @param listener The listener to be called when the state of the remote debug mode is changed.
31
+ * @returns {void} Resolves when the listener is successfully set up.
32
+ * @since 5.8.0
25
33
  */
26
34
  onRemoteDebugChanged(listener: (data: {
27
35
  enabled: boolean;
@@ -7,6 +7,11 @@ const events_1 = require("events");
7
7
  const Validate_1 = __importDefault(require("../Validate/Validate"));
8
8
  /**
9
9
  * The `sos.debug` API groups together methods for checking the state of remote debug mode.
10
+ *
11
+ * :::note
12
+ * - This debug is not the "native debug" of the device, but rather a remote debug mode that allows you to connect to the device using Weinre.
13
+ * - State of the remote debug mode or native debug mode can be changed via Cloud Control or [Rest API](https://developers-staging.signageos.io/api/#tag/DeviceDebug/paths/~1v1~1device~1%7BdeviceUid%7D~1debug/put).
14
+ * :::
10
15
  */
11
16
  class Debug extends events_1.EventEmitter {
12
17
  window;
@@ -22,8 +27,9 @@ class Debug extends events_1.EventEmitter {
22
27
  this.postMessage = postMessage;
23
28
  }
24
29
  /**
25
- * The `isRemoteDebugEnabled()` method returns the state of the [Device debug](https://docs.signageos.io/hc/en-us/articles/4416366711442-Device-debug).
30
+ * The `isRemoteDebugEnabled()` method returns the state of the Device debug mode.
26
31
  *
32
+ * @returns {Promise<boolean>} Resolves to `true` if the remote debug mode is enabled, otherwise `false`.
27
33
  * @since 5.8.0
28
34
  */
29
35
  async isRemoteDebugEnabled() {
@@ -33,9 +39,11 @@ class Debug extends events_1.EventEmitter {
33
39
  return isEnabled;
34
40
  }
35
41
  /**
36
- * The `onRemoteDebugChanged()` method sets up a listener, which is called whenever the state of the [Device debug](https://docs.signageos.io/hc/en-us/articles/4416366711442-Device-debug) is changed.
42
+ * The `onRemoteDebugChanged()` method sets up a listener, which is called whenever the state of the Device debug mode is changed.
37
43
  *
38
- * @since
44
+ * @param listener The listener to be called when the state of the remote debug mode is changed.
45
+ * @returns {void} Resolves when the listener is successfully set up.
46
+ * @since 5.8.0
39
47
  */
40
48
  onRemoteDebugChanged(listener) {
41
49
  (0, Validate_1.default)({ listener }).required().function();
@@ -1 +1 @@
1
- {"version":3,"file":"Debug.js","sourceRoot":"","sources":["../../../src/FrontApplet/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I,CAAC,GAAG,GAAG,8BAA8B,CAAC;wBACvD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;wBAE9C,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;oBACnC,CAAC;gBACF,CAAC;qBAAM,CAAC;oBACP,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,SAAS,CAAC;oBACxC,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,SAAS,CAAC;gBACxC,CAAC;gBACD,MAAM;YACP,QAAQ;QACT,CAAC;IACF,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,KAAK,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;IACrE,CAAC;;AAnEF,wBAoEC"}
@@ -14,6 +14,11 @@ export default class DeviceInfo implements IDeviceInfo {
14
14
  * The `getLocation()` method returns location of the device. Location is requested from server on application start, automatically
15
15
  * updated when changed and persisted in local storage.
16
16
  *
17
+ * :::note
18
+ * Location can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/DeviceLocation/paths/~1v1~1device~1%7BdeviceUid%7D~1location~1%7BlocationUid%7D/get).
19
+ * :::
20
+ *
21
+ * @returns {Promise<IDeviceLocation | null>} A promise that resolves to the device location or `null` if not set.
17
22
  * @since 5.2.0
18
23
  */
19
24
  getLocation(): Promise<IDeviceLocation | null>;
@@ -21,6 +26,11 @@ export default class DeviceInfo implements IDeviceInfo {
21
26
  * The `getOrganizationTags()` method returns all tags assigned to the device. Tags are requested from server on application start, automatically
22
27
  * updated when changed and persisted in local storage.
23
28
  *
29
+ * :::note
30
+ * Tags can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/DeviceTag-(Device-Tags)).
31
+ * :::
32
+ *
33
+ * @returns {Promise<IOrganizationTag[]>} A promise that resolves to an array of organization tags.
24
34
  * @since 5.2.0
25
35
  */
26
36
  getOrganizationTags(): Promise<IOrganizationTag[]>;
@@ -28,7 +38,16 @@ export default class DeviceInfo implements IDeviceInfo {
28
38
  * The `getDeviceName()` method returns a name of the device. Name is requested from server on application start, automatically
29
39
  * updated when changed and persisted in local storage.
30
40
  *
41
+ * :::note
42
+ * Device name can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/Device/paths/~1v2~1device~1%7BdeviceUid%7D/get).
43
+ * :::
44
+ *
45
+ * @returns {Promise<string>} A promise that resolves to the device name.
31
46
  * @since 6.6.0
47
+ *
48
+ * @example
49
+ * const deviceName = await sos.deviceInfo.getDeviceName();
50
+ * console.log(`Device name is: ${deviceName}`);
32
51
  */
33
52
  getDeviceName(): Promise<string>;
34
53
  private getMessage;
@@ -17,6 +17,11 @@ class DeviceInfo {
17
17
  * The `getLocation()` method returns location of the device. Location is requested from server on application start, automatically
18
18
  * updated when changed and persisted in local storage.
19
19
  *
20
+ * :::note
21
+ * Location can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/DeviceLocation/paths/~1v1~1device~1%7BdeviceUid%7D~1location~1%7BlocationUid%7D/get).
22
+ * :::
23
+ *
24
+ * @returns {Promise<IDeviceLocation | null>} A promise that resolves to the device location or `null` if not set.
20
25
  * @since 5.2.0
21
26
  */
22
27
  async getLocation() {
@@ -27,6 +32,11 @@ class DeviceInfo {
27
32
  * The `getOrganizationTags()` method returns all tags assigned to the device. Tags are requested from server on application start, automatically
28
33
  * updated when changed and persisted in local storage.
29
34
  *
35
+ * :::note
36
+ * Tags can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/DeviceTag-(Device-Tags)).
37
+ * :::
38
+ *
39
+ * @returns {Promise<IOrganizationTag[]>} A promise that resolves to an array of organization tags.
30
40
  * @since 5.2.0
31
41
  */
32
42
  async getOrganizationTags() {
@@ -37,11 +47,19 @@ class DeviceInfo {
37
47
  * The `getDeviceName()` method returns a name of the device. Name is requested from server on application start, automatically
38
48
  * updated when changed and persisted in local storage.
39
49
  *
50
+ * :::note
51
+ * Device name can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/Device/paths/~1v2~1device~1%7BdeviceUid%7D/get).
52
+ * :::
53
+ *
54
+ * @returns {Promise<string>} A promise that resolves to the device name.
40
55
  * @since 6.6.0
56
+ *
57
+ * @example
58
+ * const deviceName = await sos.deviceInfo.getDeviceName();
59
+ * console.log(`Device name is: ${deviceName}`);
41
60
  */
42
61
  async getDeviceName() {
43
- const deviceName = this.geDeviceNameFromTittle();
44
- return deviceName;
62
+ return this.geDeviceNameFromTittle();
45
63
  }
46
64
  getMessage(name) {
47
65
  return [this.messagePrefix, DeviceInfo.MESSAGE_PREFIX, name].join('.');
@@ -1 +1 @@
1
- {"version":3,"file":"DeviceInfo.js","sourceRoot":"","sources":["../../../src/FrontApplet/DeviceInfo/DeviceInfo.ts"],"names":[],"mappings":";;AAGA;;;GAGG;AACH,MAAqB,UAAU;IAKrB;IACA;IALF,MAAM,CAAC,cAAc,GAAW,aAAa,CAAC;IAErD,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;;OAKG;IACI,KAAK,CAAC,WAAW;QACvB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QACvF,OAAO,QAAQ,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,mBAAmB;QAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;QAC5F,OAAO,IAAI,CAAC;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,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;QAC5F,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,KAAK,CAAC,aAAa;QACzB,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC;IACtC,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC;IAEO,sBAAsB;QAC7B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC5C,MAAM,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,MAAM,aAAa,GAAG,YAAY,CAAC,aAAc,CAAC;QAClD,OAAO,aAAa,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC;IACvE,CAAC;;AArEF,6BAsEC"}
@@ -3,6 +3,25 @@ import IDisplay, { DisplayCapability } from './IDisplay';
3
3
  /**
4
4
  * The `sos.display` API groups together methods for getting information about the device. Primarily to find out which
5
5
  * features it supports.
6
+ *
7
+ * <details>
8
+ * <summary>List of all display capabilities</summary>
9
+ * | Capability | Description |
10
+ * |:------------|:-------------|
11
+ * | `FILE_SYSTEM_INTERNAL_STORAGE` | If device supports internal storage |
12
+ * | `FILE_SYSTEM_EXTERNAL_STORAGE` | If device supports external storage |
13
+ * | `FILE_SYSTEM_FILE_CHECKSUM` | If device supports file checksum calculation |
14
+ * | `FILE_SYSTEM_LINK` | If device supports file system `link()` |
15
+ * | `FILE_SYSTEM_CREATE_ARCHIVE` | If device supports creating archives in the file system |
16
+ * | `FILE_SYSTEM_ARCHIVE_EXTRACT_INFO` | If device can determine a total size of a potentially extracted archive |
17
+ * | `TIMERS_PROPRIETARY` | If device supports proprietary timers |
18
+ * | `VIDEO_4K` | If device supports 4K video playback |
19
+ * | `BROWSER` | If device supports opening browser |
20
+ * | `SERIAL` | If device supports serial port communication |
21
+ * | `BARCODE_SCANNER` | If device supports barcode scanner setup |
22
+ * | `FRONT_OSD` | If device supports Front OSD (our on-screen display) |
23
+ * | `PROXIMITY_SENSOR` | If device supports proximity sensor |
24
+ * </details>
6
25
  */
7
26
  declare class Display implements IDisplay {
8
27
  private messagePrefix;
@@ -12,20 +31,9 @@ declare class Display implements IDisplay {
12
31
  /** @internal */
13
32
  constructor(messagePrefix: string, postMessage: IPostMessage<any>);
14
33
  /**
15
- * The `supports()` method determines whether a queried capability is supported.
16
- *
17
- * - 'FILE_SYSTEM_INTERNAL_STORAGE' - @todo
18
- * - 'FILE_SYSTEM_EXTERNAL_STORAGE' - @todo
19
- * - 'FILE_SYSTEM_FILE_CHECKSUM' - @todo
20
- * - 'FILE_SYSTEM_LINK' - @todo
21
- * - 'TIMERS_PROPRIETARY' - @todo
22
- * - 'VIDEO_4K' - @todo
23
- * - 'SERIAL' - @todo
24
- * - 'BARCODE_SCANNER' - @todo
25
- * - 'FRONT_OSD' - @todo
26
- * - 'FILE_SYSTEM_CREATE_ARCHIVE' - @todo
27
- * - 'FILE_SYSTEM_ARCHIVE_EXTRACT_INFO' - Device can determine a total size of a potentially extracted archive
28
- *
34
+ * The `supports()` method determines whether a queried capability is supported by the device.
35
+ * @param capability The capability to check for support.
36
+ * @returns {Promise<boolean>} Resolves to `true` if the capability is supported, otherwise `false`.
29
37
  * @since 3.1.0
30
38
  */
31
39
  supports(capability: DisplayCapability): Promise<boolean>;
@@ -7,6 +7,25 @@ const Validate_1 = __importDefault(require("../Validate/Validate"));
7
7
  /**
8
8
  * The `sos.display` API groups together methods for getting information about the device. Primarily to find out which
9
9
  * features it supports.
10
+ *
11
+ * <details>
12
+ * <summary>List of all display capabilities</summary>
13
+ * | Capability | Description |
14
+ * |:------------|:-------------|
15
+ * | `FILE_SYSTEM_INTERNAL_STORAGE` | If device supports internal storage |
16
+ * | `FILE_SYSTEM_EXTERNAL_STORAGE` | If device supports external storage |
17
+ * | `FILE_SYSTEM_FILE_CHECKSUM` | If device supports file checksum calculation |
18
+ * | `FILE_SYSTEM_LINK` | If device supports file system `link()` |
19
+ * | `FILE_SYSTEM_CREATE_ARCHIVE` | If device supports creating archives in the file system |
20
+ * | `FILE_SYSTEM_ARCHIVE_EXTRACT_INFO` | If device can determine a total size of a potentially extracted archive |
21
+ * | `TIMERS_PROPRIETARY` | If device supports proprietary timers |
22
+ * | `VIDEO_4K` | If device supports 4K video playback |
23
+ * | `BROWSER` | If device supports opening browser |
24
+ * | `SERIAL` | If device supports serial port communication |
25
+ * | `BARCODE_SCANNER` | If device supports barcode scanner setup |
26
+ * | `FRONT_OSD` | If device supports Front OSD (our on-screen display) |
27
+ * | `PROXIMITY_SENSOR` | If device supports proximity sensor |
28
+ * </details>
10
29
  */
11
30
  class Display {
12
31
  messagePrefix;
@@ -19,20 +38,9 @@ class Display {
19
38
  this.postMessage = postMessage;
20
39
  }
21
40
  /**
22
- * The `supports()` method determines whether a queried capability is supported.
23
- *
24
- * - 'FILE_SYSTEM_INTERNAL_STORAGE' - @todo
25
- * - 'FILE_SYSTEM_EXTERNAL_STORAGE' - @todo
26
- * - 'FILE_SYSTEM_FILE_CHECKSUM' - @todo
27
- * - 'FILE_SYSTEM_LINK' - @todo
28
- * - 'TIMERS_PROPRIETARY' - @todo
29
- * - 'VIDEO_4K' - @todo
30
- * - 'SERIAL' - @todo
31
- * - 'BARCODE_SCANNER' - @todo
32
- * - 'FRONT_OSD' - @todo
33
- * - 'FILE_SYSTEM_CREATE_ARCHIVE' - @todo
34
- * - 'FILE_SYSTEM_ARCHIVE_EXTRACT_INFO' - Device can determine a total size of a potentially extracted archive
35
- *
41
+ * The `supports()` method determines whether a queried capability is supported by the device.
42
+ * @param capability The capability to check for support.
43
+ * @returns {Promise<boolean>} Resolves to `true` if the capability is supported, otherwise `false`.
36
44
  * @since 3.1.0
37
45
  */
38
46
  async supports(capability) {
@@ -1 +1 @@
1
- {"version":3,"file":"Display.js","sourceRoot":"","sources":["../../../src/FrontApplet/Display/Display.ts"],"names":[],"mappings":";;;;;AACA,oEAA4C;AAG5C;;;GAGG;AACH,MAAM,OAAO;IAOH;IACA;IAPF,MAAM,CAAC,cAAc,GAAW,SAAS,CAAC;IAE1C,OAAO,GAAW,SAAU,CAAC;IAEpC,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;;;;;;;;;;;;;OAgBG;IACI,KAAK,CAAC,QAAQ,CAAC,UAA6B;QAClD,IAAA,kBAAQ,EAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;QAClC,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YAC3C,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;YACjC,UAAU;SACV,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IACjB,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,OAAO,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;IACvE,CAAC;;AAGF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Display.js","sourceRoot":"","sources":["../../../src/FrontApplet/Display/Display.ts"],"names":[],"mappings":";;;;;AACA,oEAA4C;AAG5C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO;IAOH;IACA;IAPF,MAAM,CAAC,cAAc,GAAW,SAAS,CAAC;IAE1C,OAAO,GAAW,SAAU,CAAC;IAEpC,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;;OAKG;IACI,KAAK,CAAC,QAAQ,CAAC,UAA6B;QAClD,IAAA,kBAAQ,EAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;QAClC,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YAC3C,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;YACjC,UAAU;SACV,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IACjB,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,OAAO,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;IACvE,CAAC;;AAGF,kBAAe,OAAO,CAAC"}
@@ -1,4 +1,8 @@
1
1
  import { AnyString } from '../../utils/types';
2
+ /**
3
+ * Represents the capabilities that a display can support.
4
+ * These capabilities are used to determine if a specific feature is available on the display.
5
+ */
2
6
  export type DisplayCapability = 'FILE_SYSTEM_INTERNAL_STORAGE' | 'FILE_SYSTEM_EXTERNAL_STORAGE' | 'FILE_SYSTEM_FILE_CHECKSUM' | 'FILE_SYSTEM_LINK' | 'TIMERS_PROPRIETARY' | 'VIDEO_4K' | 'SERIAL' | 'BARCODE_SCANNER' | 'FRONT_OSD' | 'FILE_SYSTEM_CREATE_ARCHIVE' | 'FILE_SYSTEM_ARCHIVE_EXTRACT_INFO' | 'BROWSER' | 'PROXIMITY_SENSOR' | AnyString;
3
7
  export default interface IDisplay {
4
8
  supports(capability: DisplayCapability): Promise<boolean>;