@signageos/front-applet 8.3.0 → 8.5.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 (62) hide show
  1. package/dist/bundle.js +6 -6
  2. package/dist/bundle.js.map +1 -1
  3. package/docs/index.md +1 -1
  4. package/docs/sos/command.md +1 -1
  5. package/docs/sos/deviceInfo.md +60 -14
  6. package/docs/sos/display.md +32 -0
  7. package/docs/sos/hardware/index.md +9 -0
  8. package/docs/sos/input.md +3 -0
  9. package/docs/sos/offline/index.md +18 -0
  10. package/docs/sos/proofOfPlay.md +7 -0
  11. package/docs/sos/sync.md +2 -0
  12. package/docs/sos_management/index.md +28 -0
  13. package/docs/sos_management/network.md +7 -0
  14. package/docs/sos_management/power.md +5 -0
  15. package/docs/sos_management/screen.md +59 -8
  16. package/docs/sos_management/wifi.md +18 -13
  17. package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +15 -11
  18. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +17 -10
  19. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
  20. package/es6/FrontApplet/DeviceInfo/IDeviceInfo.d.ts +24 -0
  21. package/es6/FrontApplet/Display/Display.d.ts +13 -0
  22. package/es6/FrontApplet/Display/Display.js +18 -0
  23. package/es6/FrontApplet/Display/Display.js.map +1 -1
  24. package/es6/FrontApplet/Display/IDisplay.d.ts +1 -0
  25. package/es6/FrontApplet/Hardware/ISerialPortDataMessage.d.ts +2 -0
  26. package/es6/FrontApplet/Hardware/ISerialPortOptions.d.ts +9 -0
  27. package/es6/FrontApplet/Hardware/ISerialPortOptions.js +1 -1
  28. package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +3 -0
  29. package/es6/FrontApplet/Management/IManagement.d.ts +1 -0
  30. package/es6/FrontApplet/Management/Management.d.ts +13 -0
  31. package/es6/FrontApplet/Management/Management.js +18 -0
  32. package/es6/FrontApplet/Management/Management.js.map +1 -1
  33. package/es6/FrontApplet/Management/Network/INetwork.d.ts +7 -0
  34. package/es6/FrontApplet/Management/Power/IPower.d.ts +5 -0
  35. package/es6/FrontApplet/Management/Screen/IScreen.d.ts +21 -5
  36. package/es6/FrontApplet/Management/Screen/IScreen.js +5 -0
  37. package/es6/FrontApplet/Management/Screen/IScreen.js.map +1 -1
  38. package/es6/FrontApplet/Management/Screen/Screen.d.ts +25 -8
  39. package/es6/FrontApplet/Management/Screen/Screen.js +22 -1
  40. package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
  41. package/es6/FrontApplet/Management/Wifi/IWifi.d.ts +14 -0
  42. package/es6/FrontApplet/Management/Wifi/IWifi.js.map +1 -1
  43. package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +4 -13
  44. package/es6/FrontApplet/Management/Wifi/Wifi.js +4 -13
  45. package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
  46. package/es6/FrontApplet/Offline/IAddFont.d.ts +3 -0
  47. package/es6/FrontApplet/Offline/ISaveFile.d.ts +5 -0
  48. package/es6/FrontApplet/ProofOfPlay/IRecordItemOptions.d.ts +7 -0
  49. package/es6/FrontApplet/Sync/Sync.d.ts +2 -0
  50. package/es6/Monitoring/Display/displayCommands.d.ts +11 -1
  51. package/es6/Monitoring/Display/displayCommands.js +3 -1
  52. package/es6/Monitoring/Display/displayCommands.js.map +1 -1
  53. package/es6/Monitoring/Display/handleDisplayRequests.js +6 -0
  54. package/es6/Monitoring/Display/handleDisplayRequests.js.map +1 -1
  55. package/es6/Monitoring/FileSystem/handleFileSystemRequests.js +2 -1
  56. package/es6/Monitoring/FileSystem/handleFileSystemRequests.js.map +1 -1
  57. package/es6/Monitoring/Management/handleManagementRequests.js +6 -0
  58. package/es6/Monitoring/Management/handleManagementRequests.js.map +1 -1
  59. package/es6/Monitoring/Management/managementCommands.d.ts +11 -1
  60. package/es6/Monitoring/Management/managementCommands.js +3 -1
  61. package/es6/Monitoring/Management/managementCommands.js.map +1 -1
  62. package/package.json +1 -1
package/docs/index.md CHANGED
@@ -21,7 +21,7 @@ sos.onReady(async () => {
21
21
  ## Getting started
22
22
  This section refers to the JS SDK API reference and provides detailed information for every function, including rich examples.
23
23
 
24
- To develop an applet using the Applet JS SDK, you need to install our [CLI](https://developers.signageos.io/docs/cli-setup) and follow our guide [Getting started with Applets](https://developers-staging.signageos.io/docs/applets/getting-started/).
24
+ To develop an applet using the Applet JS SDK, you need to install our [CLI](https://developers.signageos.io/docs/cli-setup) and follow our guide [Getting started with Applets](https://developers.signageos.io/docs/applets/getting-started/).
25
25
 
26
26
  ## API Reference
27
27
  The JS API reference is divided into two main sections:
@@ -123,7 +123,7 @@ Resolves when the listener is successfully set up.
123
123
  import { sos } from '@signageos/front-applet';
124
124
 
125
125
  void sos.onReady(async () => {
126
- /* Example of dispatching information about file download */
126
+ /** Example of dispatching information about file download */
127
127
  await sos.command.dispatch({
128
128
  type: 'Files.StartLoading', // mandatory *type* with custom value
129
129
  fileName: 'my-file', // custom parameter and value
@@ -35,9 +35,43 @@ console.log(`Device name is: ${deviceName}`);
35
35
 
36
36
  <Separator />
37
37
 
38
+ ### getDeviceTags()
39
+
40
+ The `getDeviceTags()` method returns all organization tags assigned to the device including parent tags, if available.
41
+ Tags are requested from server on application start, automatically updated when changed and persisted in local storage.
42
+
43
+ :::note
44
+ Tags can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/DeviceTag-(Device-Tags)).
45
+ :::
46
+
47
+ ```ts expandable
48
+ getDeviceTags(): Promise<IDeviceTag[]>;
49
+ // show-more
50
+ /**
51
+ * Represents a device tag which may have a parent (organization) tag.
52
+ */
53
+ interface IDeviceTag extends ITag {
54
+ parentTag?: ITag;
55
+ }
56
+
57
+ /**
58
+ * Represents organization tags assigned to a device.
59
+ */
60
+ interface ITag {
61
+ name: string;
62
+ }
63
+
64
+ ```
65
+
66
+ #### Return value
67
+
68
+ A promise that returns the device tags.
69
+
70
+ <Separator />
71
+
38
72
  ### getLocation()
39
73
 
40
- The `getLocation()` method returns location of the device. Location is requested from server on application start, automatically
74
+ The `getLocation()` method returns location of the device with child tags if available. Location is requested from server on application start, automatically
41
75
  updated when changed and persisted in local storage.
42
76
 
43
77
  :::note
@@ -47,10 +81,25 @@ Location can be set only in CloudControl on Device Info page, or via [Rest API](
47
81
  ```ts expandable
48
82
  getLocation(): Promise<IDeviceLocation | null>;
49
83
  // show-more
84
+ /**
85
+ * Represents device location information set via Rest API.
86
+ */
50
87
  interface IDeviceLocation {
88
+ /** Name of the location. */
51
89
  name: string;
90
+ /** Optional custom identifier for the location. */
52
91
  customId?: string;
92
+ /** Optional description of the location. */
53
93
  description?: string;
94
+ /** Optional child array of tags associated with the location. */
95
+ tags?: ITag[];
96
+ }
97
+
98
+ /**
99
+ * Represents organization tags assigned to a device.
100
+ */
101
+ interface ITag {
102
+ name: string;
54
103
  }
55
104
 
56
105
  ```
@@ -61,28 +110,24 @@ A promise that resolves to the device location or `null` if not set.
61
110
 
62
111
  <Separator />
63
112
 
64
- ### getOrganizationTags()
113
+ ### ~getOrganizationTags()~
65
114
 
66
- The `getOrganizationTags()` method returns all tags assigned to the device. Tags are requested from server on application start, automatically
67
- updated when changed and persisted in local storage.
115
+ :::danger Deprecated
116
+
117
+ This method was deprecated. Please use `getDeviceTags()` method instead.
68
118
 
69
- :::note
70
- Tags can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/DeviceTag-(Device-Tags)).
71
119
  :::
72
120
 
73
121
  ```ts expandable
74
122
  getOrganizationTags(): Promise<IOrganizationTag[]>;
75
123
  // show-more
124
+ /** @deprecated */
76
125
  interface IOrganizationTag {
77
126
  name: string;
78
127
  }
79
128
 
80
129
  ```
81
130
 
82
- #### Return value
83
-
84
- A promise that resolves to an array of organization tags.
85
-
86
131
  ## API Example
87
132
 
88
133
  ```ts
@@ -95,15 +140,16 @@ void sos.onReady(async () => {
95
140
 
96
141
  const printLocation = async () => {
97
142
  const { name, customId, description } = (await sos.deviceInfo.getLocation()) ?? {};
98
-
99
143
  console.log('Location: ', { name, customId, description });
100
144
  };
101
145
 
102
146
  const printTags = async () => {
103
- const tags = await sos.deviceInfo.getOrganizationTags();
104
-
105
- for (const { name } of tags) {
147
+ const tags = await sos.deviceInfo.getDeviceTags();
148
+ for (const { name, parentTag } of tags) {
106
149
  console.log('Tag: ', name);
150
+ if (parentTag) {
151
+ console.log(' Parent Tag: ', parentTag.name);
152
+ }
107
153
  }
108
154
  };
109
155
 
@@ -9,6 +9,38 @@ features it supports.
9
9
 
10
10
  ## Methods
11
11
 
12
+ ### getCapabilities()
13
+
14
+ The `getCapabilities()` method returns a list of all supported front capabilities of the device.
15
+
16
+ For more information what are capabilities, see the description of the `supports()` method.
17
+
18
+ ```ts expandable
19
+ getCapabilities(): Promise<DisplayCapability[]>;
20
+ // show-more
21
+ /**
22
+ * Represents the capabilities that a display can support.
23
+ * These capabilities are used to determine if a specific feature is available on the display.
24
+ */
25
+ 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;
26
+
27
+ type AnyString = string & {};
28
+
29
+ ```
30
+
31
+ #### Return value
32
+
33
+ Resolves to an array of supported capabilities.
34
+
35
+ #### Example
36
+
37
+ ```ts
38
+ const capabilities = await sos.display.getCapabilities();
39
+ console.log('Supported display capabilities:', capabilities.join(', '));
40
+ ```
41
+
42
+ <Separator />
43
+
12
44
  ### supports()
13
45
 
14
46
  The `supports()` method determines whether the device supports a queried capability.
@@ -47,14 +47,23 @@ openSerialPort(options: ISerialPortOptions): Promise<ISerialPort>;
47
47
  * All properties are optional except `baudRate`.
48
48
  */
49
49
  interface ISerialPortOptions {
50
+ /** Unique address of the external device. */
50
51
  device?: string;
52
+ /** Data transmission speed in bits per second. */
51
53
  baudRate: number;
54
+ /** Form of error checking, whether (or what) extra bits are added to a byte. */
52
55
  parity?: Parity;
56
+ /** Number of bits in a byte. */
53
57
  databits?: number;
58
+ /** Number of bits used to signal the end of a communication packet. */
54
59
  stopbits?: number;
60
+ /** Enables or disables RTS/CTS handshaking over the serial port. Currently supported by selected models of BrightSign. */
55
61
  rtscts?: boolean;
56
62
  }
57
63
 
64
+ /**
65
+ * Available parity options for the serial port.
66
+ */
58
67
  enum Parity {
59
68
  NONE = "none",
60
69
  EVEN = "even",
package/docs/sos/input.md CHANGED
@@ -26,8 +26,11 @@ onKeyUp(listener: (event: IKeyUpEvent) => void): void;
26
26
  * KeyUp event interface for handling key release events.
27
27
  */
28
28
  interface IKeyUpEvent {
29
+ /** KeyUp event type */
29
30
  type: 'keyup';
31
+ /** Key code representing the key that was released */
30
32
  keyCode: KeyUpEventMap;
33
+ /** Key name representing the key that was released */
31
34
  keyName: keyof typeof KeyUpEventMap;
32
35
  }
33
36
 
@@ -41,12 +41,17 @@ addFile(file: ISaveFile): Promise<void>;
41
41
  * Interface represents a file that can be saved to cache and loaded into applet resources.
42
42
  */
43
43
  interface ISaveFile {
44
+ /** Unique identifier for the file. This is used to reference the file in the applet. */
44
45
  uid: string;
46
+ /** URI of the file to be saved. */
45
47
  uri: string;
48
+ /** Type of the file, e.g. 'javascript', 'css', etc. */
46
49
  type: IFileType;
50
+ /** HTTP headers to be sent with the request for the file. */
47
51
  headers?: {
48
52
  [key: string]: string;
49
53
  };
54
+ /** Additional flags for appending stored files to the DOM or other operations. */
50
55
  flags?: IFlag[];
51
56
  }
52
57
 
@@ -110,12 +115,17 @@ addFiles(files: ISaveFile[]): Promise<Awaited<void>[]>;
110
115
  * Interface represents a file that can be saved to cache and loaded into applet resources.
111
116
  */
112
117
  interface ISaveFile {
118
+ /** Unique identifier for the file. This is used to reference the file in the applet. */
113
119
  uid: string;
120
+ /** URI of the file to be saved. */
114
121
  uri: string;
122
+ /** Type of the file, e.g. 'javascript', 'css', etc. */
115
123
  type: IFileType;
124
+ /** HTTP headers to be sent with the request for the file. */
116
125
  headers?: {
117
126
  [key: string]: string;
118
127
  };
128
+ /** Additional flags for appending stored files to the DOM or other operations. */
119
129
  flags?: IFlag[];
120
130
  }
121
131
 
@@ -183,12 +193,17 @@ addFilesSync(files: ISaveFile[]): Promise<void>;
183
193
  * Interface represents a file that can be saved to cache and loaded into applet resources.
184
194
  */
185
195
  interface ISaveFile {
196
+ /** Unique identifier for the file. This is used to reference the file in the applet. */
186
197
  uid: string;
198
+ /** URI of the file to be saved. */
187
199
  uri: string;
200
+ /** Type of the file, e.g. 'javascript', 'css', etc. */
188
201
  type: IFileType;
202
+ /** HTTP headers to be sent with the request for the file. */
189
203
  headers?: {
190
204
  [key: string]: string;
191
205
  };
206
+ /** Additional flags for appending stored files to the DOM or other operations. */
192
207
  flags?: IFlag[];
193
208
  }
194
209
 
@@ -243,8 +258,11 @@ using `addFile()`, because it also generates appropriate font-face definition.
243
258
  addFont(font: IAddFont): Promise<void>;
244
259
  // show-more
245
260
  interface IAddFont extends IFontFaceProperties {
261
+ /** Unique identifier for the font face. This is used to reference the font in the applet. */
246
262
  uid: string;
263
+ /** Element to which the font face will be appended. */
247
264
  append: HTMLElement;
265
+ /** Available formats for the font. */
248
266
  formats: IFontFormats;
249
267
  }
250
268
 
@@ -22,12 +22,19 @@ recordItemPlayed(options: IRecordItemOptions): Promise<void>;
22
22
  * Interface representing options for a record item in the Proof of Play applet.
23
23
  */
24
24
  interface IRecordItemOptions {
25
+ /** The name of the item that was played. */
25
26
  name: string;
27
+ /** An optional custom identifier for the item. */
26
28
  customId?: string;
29
+ /** The type of the item that was played. */
27
30
  type?: 'video' | 'image' | 'html' | 'custom';
31
+ /** An array of tags associated with the item. */
28
32
  tags?: string[];
33
+ /** The name of the file that was played. */
29
34
  fileName?: string;
35
+ /** A boolean indicating whether the playback was successful. */
30
36
  playbackSuccess?: boolean;
37
+ /** An optional error message if the playback was not successful. */
31
38
  errorMessage?: string;
32
39
  }
33
40
 
package/docs/sos/sync.md CHANGED
@@ -139,6 +139,7 @@ other.
139
139
  ```ts expandable
140
140
  connect(options?: SynchronizationEngineOptions): Promise<void>;
141
141
  // show-more
142
+ /** Options for the `connect()` method based selected synchronization type. */
142
143
  type SynchronizationEngineOptions = ConnectSyncServerOptions | ConnectP2PLocalOptions | ConnectUdpOptions;
143
144
 
144
145
  /**
@@ -146,6 +147,7 @@ type SynchronizationEngineOptions = ConnectSyncServerOptions | ConnectP2PLocalOp
146
147
  */
147
148
  interface ConnectSyncServerOptions {
148
149
  engine?: SyncEngine.SyncServer;
150
+ /** Address of the sync server engine. If omitted, the default server from device configuration will be used. */
149
151
  uri?: string;
150
152
  }
151
153
 
@@ -112,6 +112,34 @@ console.log(`Device brand is: ${brand}`); // e.g., 'Samsung', 'LG', BrightSign,
112
112
 
113
113
  <Separator />
114
114
 
115
+ ### getCapabilities()
116
+
117
+ The `getCapabilities()` method returns a list of all supported management capabilities of the device.
118
+
119
+ For more information what are capabilities, see the description of the `supports()` method.
120
+
121
+ ```ts expandable
122
+ getCapabilities(): Promise<ManagementCapability[]>;
123
+ // show-more
124
+ type ManagementCapability = 'MODEL' | 'SERIAL_NUMBER' | 'BRAND' | 'OS_VERSION' | 'BATTERY_STATUS' | 'STORAGE_UNITS' | 'TEMPERATURE' | 'SCREENSHOT_UPLOAD' | 'NETWORK_INFO' | 'WIFI' | 'WIFI_SCAN' | 'WIFI_AP' | 'WIFI_STRENGTH' | 'TIMERS_PROPRIETARY' | 'BRIGHTNESS_SCHEDULING' | 'TIMERS_NATIVE' | 'SET_BRIGHTNESS' | 'GET_BRIGHTNESS' | 'SCREEN_RESIZE' | 'SET_TIME' | 'SET_TIMEZONE' | 'GET_TIMEZONE' | 'NTP_TIME' | 'APP_UPGRADE' | 'FIRMWARE_UPGRADE' | 'PACKAGE_INSTALL' | 'SET_VOLUME' | 'GET_VOLUME' | 'SET_REMOTE_CONTROL_ENABLED' | 'SET_DEBUG' | 'SYSTEM_REBOOT' | 'APP_RESTART' | 'DISPLAY_POWER' | 'SERVLET' | 'HARDWARE_LED_SET_COLOR' | 'PROXIMITY_SENSOR' | 'FACTORY_RESET' | 'ORIENTATION_LANDSCAPE' | 'ORIENTATION_PORTRAIT' | 'ORIENTATION_LANDSCAPE_FLIPPED' | 'ORIENTATION_PORTRAIT_FLIPPED' | 'ORIENTATION_AUTO' | 'SCHEDULE_POWER_ACTION' | 'EXTENDED_MANAGEMENT' | 'SYSTEM_CPU' | 'SYSTEM_MEMORY' | 'PROXY' | 'AUTO_RECOVERY' | 'PEER_RECOVERY' | 'FILE_SYSTEM_WIPEOUT' | 'REMOTE_DESKTOP' | 'HOTEL_MODE' | 'VPN' | 'CUSTOM_SCRIPTS' | 'NATIVE_COMMANDS_MDC' | 'DEVICE_OWNER' | 'ACCESSIBILITY_SERVICE' | 'DISPLAY_MANAGER' | 'SECRETS' | 'HARDWARE_ACCELERATION' | 'WIFI_COUNTRY' | 'STOP_PACKAGE' | AnyString;
125
+
126
+ type AnyString = string & {};
127
+
128
+ ```
129
+
130
+ #### Return value
131
+
132
+ A promise that resolves to an array of supported management capabilities.
133
+
134
+ #### Example
135
+
136
+ ```ts
137
+ const capabilities = await sos.management.getCapabilities();
138
+ console.log('Supported management capabilities:', capabilities.join(', '));
139
+ ```
140
+
141
+ <Separator />
142
+
115
143
  ### getExtendedManagementUrl()
116
144
 
117
145
  The `getExtendedManagementUrl()` method returns the management URL of the device.
@@ -65,14 +65,21 @@ The `importCertificate()` method imports a certificate to the device. The certif
65
65
  ```ts expandable
66
66
  importCertificate(details: CertificateEapDetails): Promise<void>;
67
67
  // show-more
68
+ /** Details for importing a certificate for EAP authentication. */
68
69
  interface CertificateEapDetails {
70
+ /** Type of EAP authentication */
69
71
  type: EAPType;
72
+ /** CA certificate */
70
73
  caCertificate?: string;
74
+ /** Client certificate for EAP-TLS */
71
75
  clientCertificate?: string;
76
+ /** Private key for client certificate for EAP-TLS */
72
77
  clientKey?: string;
78
+ /** Password for the private key, if it's encrypted */
73
79
  clientCertificatePassword?: string;
74
80
  }
75
81
 
82
+ /** Allowed types of EAP authentication */
76
83
  type EAPType = 'EAP-TLS' | 'PEAP' | 'EAP-TTLS';
77
84
 
78
85
  ```
@@ -106,12 +106,16 @@ getScheduledReboots(): Promise<IScheduledRebootActions[]>;
106
106
  * Interface representing the scheduled reboot action.
107
107
  */
108
108
  interface IScheduledRebootActions {
109
+ /** Random generated ID for the scheduled reboot action */
109
110
  id: string;
111
+ /** The rule of the scheduled reboot */
110
112
  rule: IScheduledRebootRule;
111
113
  }
112
114
 
113
115
  interface IScheduledRebootRule {
116
+ /** Weekdays as numbers or strings. Number types are received from server. */
114
117
  weekdays: number[] | string[];
118
+ /** Time in HH:mm:ss format */
115
119
  time: string;
116
120
  }
117
121
 
@@ -248,6 +252,7 @@ It is possible to set multiple rules, which can be later obtained by the `getSch
248
252
  ```ts expandable
249
253
  setScheduledReboot(weekdays: WeekdayType[], time: string): Promise<void>;
250
254
  // show-more
255
+ /** Allowed scheduled action weekday types */
251
256
  type WeekdayType = 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY';
252
257
 
253
258
  ```
@@ -277,7 +277,7 @@ await sos.management.screen.setBrightness(
277
277
 
278
278
  <Separator />
279
279
 
280
- ### takeAndUploadScreenshot(uploadBaseUrl, computeHash)
280
+ ### takeAndUploadScreenshot(uploadBaseUrl, options)
281
281
 
282
282
  The `takeAndUploadScreenshot()` method takes a screenshot and uploads it to a specified URL. This can be either a signageOS upload URL
283
283
  (`https://upload.signageos.io`) or a dedicated server URL for uploading screenshots. The format in which the screenshot is uploaded may be
@@ -292,18 +292,33 @@ signageOS provides a standalone server that implements all of those methods. It
292
292
  [support ticketing system](https://box.signageos.io/support/).
293
293
 
294
294
  ```ts expandable
295
- takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<{
295
+ takeAndUploadScreenshot(uploadBaseUrl: string, options?: TakeAndUploadScreenshotOptions): Promise<TakeAndUploadScreenshotResult>;
296
+ // show-more
297
+ interface TakeAndUploadScreenshotResult {
298
+ /** URL of the uploaded screenshot. */
296
299
  screenshotUrl: string;
300
+ /** aHash of the screenshot, if computed. */
297
301
  aHash?: string;
298
- }>;
302
+ }
303
+
304
+ /** Options for taking and uploading a screenshot. */
305
+ interface TakeAndUploadScreenshotOptions {
306
+ /** Whether to compute the hash of the screenshot. Default is false. */
307
+ computeHash?: boolean;
308
+ /** Additional headers to include in the upload request. */
309
+ headers?: Record<string, string>;
310
+ }
311
+
299
312
  ```
300
313
 
301
314
  #### Params
302
315
 
303
- | Name | Type | Required | Description |
304
- |-----------------|-----------|------------------|---------------------------------------------------------------------------------------------------------------|
305
- | `uploadBaseUrl` | `string` | <div>Yes</div> | URL to which the screenshot will be uploaded. It can be either a signageOS upload URL or a custom server URL. |
306
- | `computeHash` | `boolean` | <div>No</div> | Whether to compute a hash of the screenshot and return it in the response. |
316
+ | Name | Type | Required | Description |
317
+ |-----------------------|----------------------------------|------------------|---------------------------------------------------------------------------------------------------------------|
318
+ | `uploadBaseUrl` | `string` | <div>Yes</div> | URL to which the screenshot will be uploaded. It can be either a signageOS upload URL or a custom server URL. |
319
+ | `options` | `TakeAndUploadScreenshotOptions` | <div>No</div> | Optional parameters for taking and uploading the screenshot. |
320
+ | `options.computeHash` | `boolean` | <div>No</div> | Whether to compute a hash of the screenshot and return it in the response. |
321
+ | `options.headers` | `Record<string, string>` | <div>No</div> | Additional headers to include in the upload request for POST requests. |
307
322
 
308
323
  #### Return value
309
324
 
@@ -314,14 +329,28 @@ A promise that resolves to an object containing the screenshot URL and optionall
314
329
 
315
330
  - If `uploadBaseUrl` is not a valid URL
316
331
  - If `computeHash` is not a boolean
332
+ - If `headers` is not a valid object
317
333
  - If the screenshot cannot be taken or uploaded.
318
334
 
319
335
  #### Example
320
336
 
321
337
  ```ts
322
338
  const { screenshotUrl, aHash } = await sos.management.screen.takeAndUploadScreenshot(
339
+ 'https://your.upload.server/upload/file?prefix=screenshot/',
340
+ { computeHash: true },
341
+ );
342
+ console.log(`Screenshot uploaded to: ${screenshotUrl} with aHash: ${aHash}`);
343
+
344
+ // Upload screenshot with custom headers
345
+ const { screenshotUrl } = await sos.management.screen.takeAndUploadScreenshot(
323
346
  'https://your.upload.server/upload/file?prefix=screenshot/',
324
- true,
347
+ {
348
+ computeHash: false,
349
+ headers: {
350
+ 'Authorization': 'Bearer yourTokenHere',
351
+ 'Custom-Header': 'CustomValue'
352
+ }
353
+ },
325
354
  );
326
355
  ```
327
356
 
@@ -333,6 +362,28 @@ const { screenshotUrl, aHash } = await sos.management.screen.takeAndUploadScreen
333
362
 
334
363
  <Separator />
335
364
 
365
+ ### ~takeAndUploadScreenshot(uploadBaseUrl, computeHash)~
366
+
367
+ :::danger Deprecated
368
+
369
+ This method was deprecated. Use `takeAndUploadScreenshot(uploadBaseUrl: string, options: TakeAndUploadScreenshotOptions): Promise<TakeAndUploadScreenshotResult>` instead.
370
+
371
+ :::
372
+
373
+ ```ts expandable
374
+ takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<TakeAndUploadScreenshotResult>;
375
+ // show-more
376
+ interface TakeAndUploadScreenshotResult {
377
+ /** URL of the uploaded screenshot. */
378
+ screenshotUrl: string;
379
+ /** aHash of the screenshot, if computed. */
380
+ aHash?: string;
381
+ }
382
+
383
+ ```
384
+
385
+ <Separator />
386
+
336
387
  ### ~takeAndUploadScreenshot(uploadBaseUrl)~
337
388
 
338
389
  :::danger Deprecated
@@ -42,12 +42,6 @@ On Tizen, make sure that the connection credentials are correct. If the device f
42
42
  Make sure that you have a backup script or a checking mechanism in place, which will allow you to recover from the situation if the connection fails.
43
43
  :::
44
44
 
45
- :::warning
46
- Connecting to an OPEN Wi-Fi network for Tizen and WebOS is different.
47
- - For Tizen, make sure that the `password` is an empty string (`''`) and in the options you have selected `OPEN` as encryption type.
48
- - For WebOS, you can pass `undefined` as the `password` parameter.
49
- :::
50
-
51
45
  :::info
52
46
  The security type of Wi-Fi is mandatory for Tizen.
53
47
  :::
@@ -55,15 +49,27 @@ The security type of Wi-Fi is mandatory for Tizen.
55
49
  ```ts expandable
56
50
  connect(ssid: string, password?: string, options?: IWifiConnectOptions): Promise<void>;
57
51
  // show-more
52
+ /**
53
+ * Options for connecting to a Wi-Fi network.
54
+ */
58
55
  interface IWifiConnectOptions {
56
+ /** Whether the network is hidden. */
59
57
  hidden?: boolean;
58
+ /** The type of security/encryption used by the network. */
60
59
  securityType?: WifiEncryptionType;
60
+ /** Authentication details for networks that require EAP. */
61
61
  eap?: {
62
+ /** The type of EAP authentication to use. */
62
63
  method: EAPMethod;
64
+ /** Username or identity for authentication. */
63
65
  identity: string;
66
+ /** Anonymous identity for authentication. */
64
67
  anonymousIdentity?: string;
68
+ /** Password or passphrase for authentication. */
65
69
  passphrase: string;
70
+ /** Secondary authentication method. Not needed for TLS. */
66
71
  phase2Auth?: EAPPhase2Auth;
72
+ /** Whether to use a CA certificate for authentication. Not needed for TLS. */
67
73
  useCACert?: boolean;
68
74
  };
69
75
  }
@@ -101,21 +107,18 @@ A promise that resolves when the connection is established or if the connection
101
107
 
102
108
  - Error If the Wi-Fi state is not in the `client` state.
103
109
  - Error If the `ssid` is not a string or is empty.
104
- - Error If the `password` is not a string or is empty (if required).
110
+ - Error If the `password` is not a string
105
111
  - Error If the `options` is not an object or does not match the expected schema.
106
112
  - Error If the `securityType` is not one of the allowed values.
107
113
 
108
114
  #### Example
109
115
 
110
116
  ```ts
111
- // To connect to an open Wi-Fi network, e.g., WebOS
112
- await sos.management.wifi.connect('MyOpenNetwork');
113
-
114
- // To connect an open Wi-Fi network with an empty password (Tizen)
115
- await sos.management.wifi.connect('MyOpenNetwork', '', { securityType: 'OPEN' });
117
+ // To connect an open Wi-Fi network with an empty password
118
+ await sos.management.wifi.connect('MyOpenNetwork', undefined, { securityType: 'OPEN' });
116
119
 
117
120
  // If the network is hidden
118
- await sos.management.wifi.connect('MyOpenNetwork', undefined, { hidden: true });
121
+ await sos.management.wifi.connect('MyOpenNetwork', undefined, { hidden: true, securityType: 'WPA2' });
119
122
 
120
123
  // To connect to an encrypted Wi-Fi network with WPA2 security
121
124
  await sos.management.wifi.connect('MyEncryptedNetwork', 'my-password', { securityType: 'WPA2' });
@@ -565,7 +568,9 @@ scanDevices(): Promise<IScannedDevice[]>;
565
568
  * Interface representing a scanned Wi-Fi device.
566
569
  */
567
570
  interface IScannedDevice {
571
+ /** SSID of the Wi-Fi network */
568
572
  ssid: string;
573
+ /** If Wi-Fi SSID is encrypted */
569
574
  encrypted: boolean;
570
575
  }
571
576
 
@@ -1,5 +1,5 @@
1
1
  import IPostMessage from '../IPostMessage';
2
- import { IDeviceInfo, IDeviceLocation, IOrganizationTag } from './IDeviceInfo';
2
+ import { IDeviceInfo, IDeviceLocation, IDeviceTag, IOrganizationTag } from './IDeviceInfo';
3
3
  /**
4
4
  * The `sos.deviceInfo` API groups together methods for retrieving information about the device set in the CloudControl, such as location or
5
5
  * tags.
@@ -11,7 +11,7 @@ export default class DeviceInfo implements IDeviceInfo {
11
11
  /** @internal */
12
12
  constructor(messagePrefix: string, postMessage: IPostMessage<any>);
13
13
  /**
14
- * The `getLocation()` method returns location of the device. Location is requested from server on application start, automatically
14
+ * The `getLocation()` method returns location of the device with child tags if available. Location is requested from server on application start, automatically
15
15
  * updated when changed and persisted in local storage.
16
16
  *
17
17
  * :::note
@@ -23,15 +23,7 @@ export default class DeviceInfo implements IDeviceInfo {
23
23
  */
24
24
  getLocation(): Promise<IDeviceLocation | null>;
25
25
  /**
26
- * The `getOrganizationTags()` method returns all tags assigned to the device. Tags are requested from server on application start, automatically
27
- * updated when changed and persisted in local storage.
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.
34
- * @since 5.2.0
26
+ * @deprecated Please use `getDeviceTags()` method instead.
35
27
  */
36
28
  getOrganizationTags(): Promise<IOrganizationTag[]>;
37
29
  /**
@@ -50,6 +42,18 @@ export default class DeviceInfo implements IDeviceInfo {
50
42
  * console.log(`Device name is: ${deviceName}`);
51
43
  */
52
44
  getDeviceName(): Promise<string | null>;
45
+ /**
46
+ * The `getDeviceTags()` method returns all organization tags assigned to the device including parent tags, if available.
47
+ * Tags are requested from server on application start, automatically updated when changed and persisted in local storage.
48
+ *
49
+ * :::note
50
+ * Tags can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/DeviceTag-(Device-Tags)).
51
+ * :::
52
+ *
53
+ * @returns {Promise<IDeviceTag[]>} A promise that returns the device tags.
54
+ * @since 8.5.0
55
+ */
56
+ getDeviceTags(): Promise<IDeviceTag[]>;
53
57
  private getMessage;
54
58
  private geDeviceNameFromTittle;
55
59
  }