@signageos/front-applet 8.4.0 → 8.5.1

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 (59) 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 +18 -1
  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 +2 -0
  36. package/es6/FrontApplet/Management/Screen/Screen.d.ts +14 -1
  37. package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
  38. package/es6/FrontApplet/Management/Wifi/IWifi.d.ts +14 -0
  39. package/es6/FrontApplet/Management/Wifi/IWifi.js.map +1 -1
  40. package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +4 -13
  41. package/es6/FrontApplet/Management/Wifi/Wifi.js +5 -14
  42. package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
  43. package/es6/FrontApplet/Offline/IAddFont.d.ts +3 -0
  44. package/es6/FrontApplet/Offline/ISaveFile.d.ts +5 -0
  45. package/es6/FrontApplet/ProofOfPlay/IRecordItemOptions.d.ts +7 -0
  46. package/es6/FrontApplet/Sync/Sync.d.ts +2 -0
  47. package/es6/Monitoring/Display/displayCommands.d.ts +11 -1
  48. package/es6/Monitoring/Display/displayCommands.js +3 -1
  49. package/es6/Monitoring/Display/displayCommands.js.map +1 -1
  50. package/es6/Monitoring/Display/handleDisplayRequests.js +6 -0
  51. package/es6/Monitoring/Display/handleDisplayRequests.js.map +1 -1
  52. package/es6/Monitoring/FileSystem/handleFileSystemRequests.js +2 -1
  53. package/es6/Monitoring/FileSystem/handleFileSystemRequests.js.map +1 -1
  54. package/es6/Monitoring/Management/handleManagementRequests.js +6 -0
  55. package/es6/Monitoring/Management/handleManagementRequests.js.map +1 -1
  56. package/es6/Monitoring/Management/managementCommands.d.ts +11 -1
  57. package/es6/Monitoring/Management/managementCommands.js +3 -1
  58. package/es6/Monitoring/Management/managementCommands.js.map +1 -1
  59. 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
  ```
@@ -295,7 +295,9 @@ signageOS provides a standalone server that implements all of those methods. It
295
295
  takeAndUploadScreenshot(uploadBaseUrl: string, options?: TakeAndUploadScreenshotOptions): Promise<TakeAndUploadScreenshotResult>;
296
296
  // show-more
297
297
  interface TakeAndUploadScreenshotResult {
298
+ /** URL of the uploaded screenshot. */
298
299
  screenshotUrl: string;
300
+ /** aHash of the screenshot, if computed. */
299
301
  aHash?: string;
300
302
  }
301
303
 
@@ -334,8 +336,21 @@ A promise that resolves to an object containing the screenshot URL and optionall
334
336
 
335
337
  ```ts
336
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(
337
346
  'https://your.upload.server/upload/file?prefix=screenshot/',
338
- true,
347
+ {
348
+ computeHash: false,
349
+ headers: {
350
+ 'Authorization': 'Bearer yourTokenHere',
351
+ 'Custom-Header': 'CustomValue'
352
+ }
353
+ },
339
354
  );
340
355
  ```
341
356
 
@@ -359,7 +374,9 @@ This method was deprecated. Use `takeAndUploadScreenshot(uploadBaseUrl: string,
359
374
  takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<TakeAndUploadScreenshotResult>;
360
375
  // show-more
361
376
  interface TakeAndUploadScreenshotResult {
377
+ /** URL of the uploaded screenshot. */
362
378
  screenshotUrl: string;
379
+ /** aHash of the screenshot, if computed. */
363
380
  aHash?: string;
364
381
  }
365
382
 
@@ -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
  }
@@ -14,7 +14,7 @@ class DeviceInfo {
14
14
  this.postMessage = postMessage;
15
15
  }
16
16
  /**
17
- * The `getLocation()` method returns location of the device. Location is requested from server on application start, automatically
17
+ * The `getLocation()` method returns location of the device with child tags if available. Location is requested from server on application start, automatically
18
18
  * updated when changed and persisted in local storage.
19
19
  *
20
20
  * :::note
@@ -29,15 +29,7 @@ class DeviceInfo {
29
29
  return location;
30
30
  }
31
31
  /**
32
- * The `getOrganizationTags()` method returns all tags assigned to the device. Tags are requested from server on application start, automatically
33
- * updated when changed and persisted in local storage.
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.
40
- * @since 5.2.0
32
+ * @deprecated Please use `getDeviceTags()` method instead.
41
33
  */
42
34
  async getOrganizationTags() {
43
35
  const { tags } = await this.postMessage({ type: this.getMessage('get_organization_tags') });
@@ -66,6 +58,21 @@ class DeviceInfo {
66
58
  const { name } = await this.postMessage({ type: this.getMessage('get_device_name') });
67
59
  return name;
68
60
  }
61
+ /**
62
+ * The `getDeviceTags()` method returns all organization tags assigned to the device including parent tags, if available.
63
+ * Tags are requested from server on application start, automatically updated when changed and persisted in local storage.
64
+ *
65
+ * :::note
66
+ * Tags can be set only in CloudControl on Device Info page, or via [Rest API](https://developers.signageos.io/api/#tag/DeviceTag-(Device-Tags)).
67
+ * :::
68
+ *
69
+ * @returns {Promise<IDeviceTag[]>} A promise that returns the device tags.
70
+ * @since 8.5.0
71
+ */
72
+ async getDeviceTags() {
73
+ const { tags } = await this.postMessage({ type: this.getMessage('get_device_tags') });
74
+ return tags;
75
+ }
69
76
  getMessage(name) {
70
77
  return [this.messagePrefix, DeviceInfo.MESSAGE_PREFIX, name].join('.');
71
78
  }
@@ -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;;;;;;;;;;OAUG;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;;;;;;;;;;OAUG;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;IACb,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,KAAK,CAAC,aAAa;QACzB,MAAM,oBAAoB,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC3D,IAAI,OAAO,oBAAoB,KAAK,QAAQ,EAAE,CAAC;YAC9C,OAAO,oBAAoB,CAAC;QAC7B,CAAC;QACD,MAAM,EAAE,IAAI,EAAE,GAA4B,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;QAC/G,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