@signageos/front-applet 8.5.1 → 8.5.3
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.
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/docs/fpath/index.md +623 -13
- package/docs/sos/browser.md +14 -14
- package/docs/sos/fileSystem.md +12 -12
- package/docs/sos/hardware/barcodeScanner.md +2 -2
- package/docs/sos/hardware/index.md +8 -8
- package/docs/sos/offline/index.md +18 -18
- package/docs/sos/proofOfPlay.md +10 -10
- package/docs/sos/video.md +10 -10
- package/docs/sos_management/autoRecovery.md +1 -1
- package/docs/sos_management/network.md +10 -11
- package/docs/sos_management/screen.md +6 -6
- package/docs/sos_management/wifi.md +89 -37
- package/es6/FrontApplet/Management/Network/INetwork.d.ts +2 -3
- package/es6/FrontApplet/Management/Network/INetwork.js +1 -1
- package/es6/FrontApplet/Management/Network/INetwork.js.map +1 -1
- package/es6/FrontApplet/Management/Network/Network.d.ts +3 -3
- package/es6/FrontApplet/Management/Network/Network.js +3 -3
- package/es6/FrontApplet/Management/Wifi/IWifi.d.ts +57 -19
- package/es6/FrontApplet/Management/Wifi/IWifi.js +7 -2
- package/es6/FrontApplet/Management/Wifi/IWifi.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +24 -7
- package/es6/FrontApplet/Management/Wifi/Wifi.js +24 -7
- package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
- package/es6/fpath.d.ts +46 -11
- package/es6/fpath.js +46 -11
- package/es6/fpath.js.map +1 -1
- package/package.json +1 -1
package/docs/sos/browser.md
CHANGED
|
@@ -167,20 +167,20 @@ type ITheme = {
|
|
|
167
167
|
|
|
168
168
|
#### Params
|
|
169
169
|
|
|
170
|
-
| Name | Type
|
|
171
|
-
|
|
172
|
-
| `uri` | `string`
|
|
173
|
-
| `options` | `IOpenLinkOptions`
|
|
174
|
-
| `options.aclDomains` | `string[]` | <div>No</div> | List of domains to be interpreted according to `aclMode`. Example: `signageos.io`, `www.example.com` |
|
|
175
|
-
| `options.aclMode` | `"blacklist" \| "whitelist"` | <div>No</div> | `blacklist` – Allow access to all domains except those in aclDomains and their subdomains, `whitelist` – Allow access only to domains in aclDomains and their subdomains. |
|
|
176
|
-
| `options.readOnlyAddressBar` | `boolean` | <div>No</div> | If `true`, the address bar is read-only, if `false` the user can navigate away by entering a URL in the address bar. |
|
|
177
|
-
| `options.idleTimeout` | `number` | <div>No</div> | The browser will automatically close after a specified period of inactivity (in milliseconds). |
|
|
178
|
-
| `options.coordinates` | `{ x: number; y: number; width: number; height: number; }` | <div>No</div> | Size and position of the browser window. Defaults to fullscreen. |
|
|
179
|
-
| `options.theme` | `ITheme` | <div>No</div> | Specify custom UI theme. (Android only) |
|
|
180
|
-
| `options.headlessMode` | `boolean` | <div>No</div> | Headless mode hides the entire address bar. (Android only) |
|
|
181
|
-
| `options.canUserClose` | `boolean` | <div>No</div> | Whether the user can manually close the browser. (default if headless false, else true) |
|
|
182
|
-
| `options.clearData` | `boolean` | <div>No</div> | Clear cache after the browser closes. (default if headless false, else true) |
|
|
183
|
-
| `options.method` | `"native" \| "iframe"` | <div>No</div> | Can only be native (which opens a new, fully sandboxed fullscreen window) or iframe (which opens a configurable-sized window). (only Linux) |
|
|
170
|
+
| Name | Type | Required | Description |
|
|
171
|
+
|------------------------------|-------------------------------------------------------------------------|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
172
|
+
| `uri` | `string` | <div>Yes</div> | The URL to open in the browser. |
|
|
173
|
+
| `options` | `IOpenLinkOptions` | <div>No</div> | Optional parameters to configure the browser window. |
|
|
174
|
+
| `options.aclDomains` | `string[] \| undefined` | <div>No</div> | List of domains to be interpreted according to `aclMode`. Example: `signageos.io`, `www.example.com` |
|
|
175
|
+
| `options.aclMode` | `"blacklist" \| "whitelist" \| undefined` | <div>No</div> | `blacklist` – Allow access to all domains except those in aclDomains and their subdomains, `whitelist` – Allow access only to domains in aclDomains and their subdomains. |
|
|
176
|
+
| `options.readOnlyAddressBar` | `boolean \| undefined` | <div>No</div> | If `true`, the address bar is read-only, if `false` the user can navigate away by entering a URL in the address bar. |
|
|
177
|
+
| `options.idleTimeout` | `number \| undefined` | <div>No</div> | The browser will automatically close after a specified period of inactivity (in milliseconds). |
|
|
178
|
+
| `options.coordinates` | `{ x: number; y: number; width: number; height: number; } \| undefined` | <div>No</div> | Size and position of the browser window. Defaults to fullscreen. |
|
|
179
|
+
| `options.theme` | `ITheme \| undefined` | <div>No</div> | Specify custom UI theme. (Android only) |
|
|
180
|
+
| `options.headlessMode` | `boolean \| undefined` | <div>No</div> | Headless mode hides the entire address bar. (Android only) |
|
|
181
|
+
| `options.canUserClose` | `boolean \| undefined` | <div>No</div> | Whether the user can manually close the browser. (default if headless false, else true) |
|
|
182
|
+
| `options.clearData` | `boolean \| undefined` | <div>No</div> | Clear cache after the browser closes. (default if headless false, else true) |
|
|
183
|
+
| `options.method` | `"native" \| "iframe" \| undefined` | <div>No</div> | Can only be native (which opens a new, fully sandboxed fullscreen window) or iframe (which opens a configurable-sized window). (only Linux) |
|
|
184
184
|
|
|
185
185
|
#### Return value
|
|
186
186
|
|
package/docs/sos/fileSystem.md
CHANGED
|
@@ -196,12 +196,12 @@ interface ICopyFileOptions {
|
|
|
196
196
|
|
|
197
197
|
#### Params
|
|
198
198
|
|
|
199
|
-
| Name | Type
|
|
200
|
-
|
|
201
|
-
| `sourceFilePath` | `IFilePath`
|
|
202
|
-
| `destinationFilePath` | `IFilePath`
|
|
203
|
-
| `options` | `ICopyFileOptions`
|
|
204
|
-
| `options.overwrite` | `boolean`
|
|
199
|
+
| Name | Type | Required | Description |
|
|
200
|
+
|-----------------------|------------------------|------------------|----------------------------------------------------------------------------------------|
|
|
201
|
+
| `sourceFilePath` | `IFilePath` | <div>Yes</div> | The path to the file to be copied. |
|
|
202
|
+
| `destinationFilePath` | `IFilePath` | <div>Yes</div> | The path where the file will be copied to. |
|
|
203
|
+
| `options` | `ICopyFileOptions` | <div>No</div> | Options for copying the file. |
|
|
204
|
+
| `options.overwrite` | `boolean \| undefined` | <div>No</div> | If set to `true`, the method will overwrite the destination file if it already exists. |
|
|
205
205
|
|
|
206
206
|
#### Return value
|
|
207
207
|
|
|
@@ -1448,12 +1448,12 @@ interface IMoveFileOptions {
|
|
|
1448
1448
|
|
|
1449
1449
|
#### Params
|
|
1450
1450
|
|
|
1451
|
-
| Name | Type
|
|
1452
|
-
|
|
1453
|
-
| `sourceFilePath` | `IFilePath`
|
|
1454
|
-
| `destinationFilePath` | `IFilePath`
|
|
1455
|
-
| `options` | `IMoveFileOptions`
|
|
1456
|
-
| `options.overwrite` | `boolean`
|
|
1451
|
+
| Name | Type | Required | Description |
|
|
1452
|
+
|-----------------------|------------------------|------------------|----------------------------------------------------------------------------------------|
|
|
1453
|
+
| `sourceFilePath` | `IFilePath` | <div>Yes</div> | The path to the file to be moved. |
|
|
1454
|
+
| `destinationFilePath` | `IFilePath` | <div>Yes</div> | The path where the file will be moved to. |
|
|
1455
|
+
| `options` | `IMoveFileOptions` | <div>No</div> | Options for moving the file. |
|
|
1456
|
+
| `options.overwrite` | `boolean \| undefined` | <div>No</div> | If set to `true`, the method will overwrite the destination file if it already exists. |
|
|
1457
1457
|
|
|
1458
1458
|
#### Return value
|
|
1459
1459
|
|
|
@@ -66,8 +66,8 @@ interface IBarcodeScannerResponse {
|
|
|
66
66
|
| Name | Type | Required | Description |
|
|
67
67
|
|------------------------------|---------------------------------------------|-----------------|-------------------------------------------------------------------------------------------|
|
|
68
68
|
| `userOptions` | `Omit<IBarcodeScannerOptions, "scannerId">` | <div>No</div> | User options to configure the scanner. |
|
|
69
|
-
| `userOptions.timeout` | `number`
|
|
70
|
-
| `userOptions.cancelPrevious` | `boolean`
|
|
69
|
+
| `userOptions.timeout` | `number \| undefined` | <div>No</div> | The maximum time to wait for a scan before timing out. |
|
|
70
|
+
| `userOptions.cancelPrevious` | `boolean \| undefined` | <div>No</div> | If set to `true`, it will cancel any previous scanner instance with the same `scannerId`. |
|
|
71
71
|
|
|
72
72
|
#### Return value
|
|
73
73
|
|
|
@@ -114,14 +114,14 @@ interface ISerialPort {
|
|
|
114
114
|
|
|
115
115
|
#### Params
|
|
116
116
|
|
|
117
|
-
| Name | Type
|
|
118
|
-
|
|
119
|
-
| `options.device` | `string` | <div>No</div> | Specifies the address of the external device, check the table above for ports. |
|
|
120
|
-
| `options.baudRate` | `number`
|
|
121
|
-
| `options.parity` | `Parity` | <div>No</div> | Specifies the form of error checking, whether (or what) extra bits are added to a byte. |
|
|
122
|
-
| `options.databits` | `number` | <div>No</div> | Specifies the number of bits in a byte. |
|
|
123
|
-
| `options.stopbits` | `number` | <div>No</div> | Specifies the number of bits used to signal the end of a communication packet. |
|
|
124
|
-
| `options.rtscts` | `boolean` | <div>No</div> | Enables or disables RTS/CTS handshaking over the serial port. Currently supported by selected models of BrightSign. |
|
|
117
|
+
| Name | Type | Required | Description |
|
|
118
|
+
|--------------------|------------------------|------------------|---------------------------------------------------------------------------------------------------------------------|
|
|
119
|
+
| `options.device` | `string \| undefined` | <div>No</div> | Specifies the address of the external device, check the table above for ports. |
|
|
120
|
+
| `options.baudRate` | `number` | <div>Yes</div> | Specifies the data transmission speed in bits per second. |
|
|
121
|
+
| `options.parity` | `Parity \| undefined` | <div>No</div> | Specifies the form of error checking, whether (or what) extra bits are added to a byte. |
|
|
122
|
+
| `options.databits` | `number \| undefined` | <div>No</div> | Specifies the number of bits in a byte. |
|
|
123
|
+
| `options.stopbits` | `number \| undefined` | <div>No</div> | Specifies the number of bits used to signal the end of a communication packet. |
|
|
124
|
+
| `options.rtscts` | `boolean \| undefined` | <div>No</div> | Enables or disables RTS/CTS handshaking over the serial port. Currently supported by selected models of BrightSign. |
|
|
125
125
|
|
|
126
126
|
#### Return value
|
|
127
127
|
|
|
@@ -70,13 +70,13 @@ interface IElement {
|
|
|
70
70
|
|
|
71
71
|
#### Params
|
|
72
72
|
|
|
73
|
-
| Name | Type
|
|
74
|
-
|
|
75
|
-
| `file` | `ISaveFile`
|
|
76
|
-
| `file.uid` | `string`
|
|
77
|
-
| `file.type` | `IFileType`
|
|
78
|
-
| `file.headers` | `{ [key: string]: string; }` | <div>No</div> | HTTP headers to be sent with the request for the file. |
|
|
79
|
-
| `file.flags` | `IFlag[]` | <div>No</div> | Additional flags for appending stored files to the DOM or other operations |
|
|
73
|
+
| Name | Type | Required | Description |
|
|
74
|
+
|----------------|-------------------------------------------|------------------|-----------------------------------------------------------------------------------------------|
|
|
75
|
+
| `file` | `ISaveFile` | <div>Yes</div> | URI of the file to be downloaded. |
|
|
76
|
+
| `file.uid` | `string` | <div>Yes</div> | Unique file identifier is used for later file retrieval, must contain a-z,A-Z,0-9 characters. |
|
|
77
|
+
| `file.type` | `IFileType` | <div>Yes</div> | Type of the file, e.g. 'javascript', 'css', etc. |
|
|
78
|
+
| `file.headers` | `{ [key: string]: string; } \| undefined` | <div>No</div> | HTTP headers to be sent with the request for the file. |
|
|
79
|
+
| `file.flags` | `IFlag[] \| undefined` | <div>No</div> | Additional flags for appending stored files to the DOM or other operations |
|
|
80
80
|
|
|
81
81
|
#### Return value
|
|
82
82
|
|
|
@@ -290,17 +290,17 @@ type AnyString = string & {};
|
|
|
290
290
|
|
|
291
291
|
#### Params
|
|
292
292
|
|
|
293
|
-
| Name | Type
|
|
294
|
-
|
|
295
|
-
| `font.uid` | `string`
|
|
296
|
-
| `font.append` | `HTMLElement`
|
|
297
|
-
| `font.fontFamily` | `string`
|
|
298
|
-
| `font.formats` | `IFontFormats`
|
|
299
|
-
| `font.fontStretch` | `string`
|
|
300
|
-
| `font.fontStyle` | `IFontStyle`
|
|
301
|
-
| `font.fontWeight` | `string`
|
|
302
|
-
| `font.unicodeRange` | `string`
|
|
303
|
-
| `font.formats` | `IFontFormats`
|
|
293
|
+
| Name | Type | Required | Description |
|
|
294
|
+
|---------------------|---------------------------|------------------|-----------------------------------------------------------------------------------------------------|
|
|
295
|
+
| `font.uid` | `string` | <div>Yes</div> | Unique file identifier is used for later file retrieval, must contain a-z,A-Z,0-9 and . characters. |
|
|
296
|
+
| `font.append` | `HTMLElement` | <div>Yes</div> | Reference to HTMLElement where the generated font-face will resist. |
|
|
297
|
+
| `font.fontFamily` | `string` | <div>Yes</div> | Font family that can be referenced from your CSS. |
|
|
298
|
+
| `font.formats` | `IFontFormats` | <div>Yes</div> | URI where these formats will be downloaded from. |
|
|
299
|
+
| `font.fontStretch` | `string \| undefined` | <div>No</div> | Allows you to make text wider or narrower. |
|
|
300
|
+
| `font.fontStyle` | `IFontStyle \| undefined` | <div>No</div> | Specifies the font style for a text. (Either `normal`, `italic`, `oblique`, `initial` or `inherit`) |
|
|
301
|
+
| `font.fontWeight` | `string \| undefined` | <div>No</div> | Sets how thick or thin characters in text should be displayed |
|
|
302
|
+
| `font.unicodeRange` | `string \| undefined` | <div>No</div> | Defines the range of Unicode characters the font supports, default value is "U+0-10FFFF" |
|
|
303
|
+
| `font.formats` | `IFontFormats` | <div>Yes</div> | Dictionary of supported formats with its files |
|
|
304
304
|
|
|
305
305
|
#### Return value
|
|
306
306
|
|
package/docs/sos/proofOfPlay.md
CHANGED
|
@@ -42,16 +42,16 @@ interface IRecordItemOptions {
|
|
|
42
42
|
|
|
43
43
|
#### Params
|
|
44
44
|
|
|
45
|
-
| Name | Type
|
|
46
|
-
|
|
47
|
-
| `options` | `IRecordItemOptions`
|
|
48
|
-
| `options.name` | `string`
|
|
49
|
-
| `options.customId` | `string` | <div>No</div> | An optional custom identifier for the item. |
|
|
50
|
-
| `options.type` | `"video" \| "image" \| "html" \| "custom"` | <div>No</div> | The type of the item that was played. It can be one of the following: `video`, `image`, `html`, or `custom`. |
|
|
51
|
-
| `options.tags` | `string[]` | <div>No</div> | An array of tags associated with the item. |
|
|
52
|
-
| `options.fileName` | `string` | <div>No</div> | The name of the file that was played. |
|
|
53
|
-
| `options.playbackSuccess` | `boolean` | <div>No</div> | A boolean indicating whether the playback was successful. |
|
|
54
|
-
| `options.errorMessage` | `string` | <div>No</div> | An optional error message if the playback was not successful. |
|
|
45
|
+
| Name | Type | Required | Description |
|
|
46
|
+
|---------------------------|---------------------------------------------------------|------------------|--------------------------------------------------------------------------------------------------------------|
|
|
47
|
+
| `options` | `IRecordItemOptions` | <div>Yes</div> | The options for recording the played item. |
|
|
48
|
+
| `options.name` | `string` | <div>Yes</div> | The name of the item that was played. |
|
|
49
|
+
| `options.customId` | `string \| undefined` | <div>No</div> | An optional custom identifier for the item. |
|
|
50
|
+
| `options.type` | `"video" \| "image" \| "html" \| "custom" \| undefined` | <div>No</div> | The type of the item that was played. It can be one of the following: `video`, `image`, `html`, or `custom`. |
|
|
51
|
+
| `options.tags` | `string[] \| undefined` | <div>No</div> | An array of tags associated with the item. |
|
|
52
|
+
| `options.fileName` | `string \| undefined` | <div>No</div> | The name of the file that was played. |
|
|
53
|
+
| `options.playbackSuccess` | `boolean \| undefined` | <div>No</div> | A boolean indicating whether the playback was successful. |
|
|
54
|
+
| `options.errorMessage` | `string \| undefined` | <div>No</div> | An optional error message if the playback was not successful. |
|
|
55
55
|
|
|
56
56
|
#### Return value
|
|
57
57
|
|
package/docs/sos/video.md
CHANGED
|
@@ -662,16 +662,16 @@ interface IOptions {
|
|
|
662
662
|
|
|
663
663
|
#### Params
|
|
664
664
|
|
|
665
|
-
| Name | Type
|
|
666
|
-
|
|
667
|
-
| `uri` | `string`
|
|
668
|
-
| `x` | `number`
|
|
669
|
-
| `y` | `number`
|
|
670
|
-
| `width` | `number`
|
|
671
|
-
| `height` | `number`
|
|
672
|
-
| `options` | `IOptions`
|
|
673
|
-
| `options.background` | `boolean`
|
|
674
|
-
| `options.volume` | `number`
|
|
665
|
+
| Name | Type | Required | Description |
|
|
666
|
+
|----------------------|------------------------|------------------|------------------------------------------------|
|
|
667
|
+
| `uri` | `string` | <div>Yes</div> | Address to remote (online) or local video file |
|
|
668
|
+
| `x` | `number` | <div>Yes</div> | x-position for video on screen |
|
|
669
|
+
| `y` | `number` | <div>Yes</div> | y-position for video on screen |
|
|
670
|
+
| `width` | `number` | <div>Yes</div> | Video width on screen |
|
|
671
|
+
| `height` | `number` | <div>Yes</div> | Video height on screen |
|
|
672
|
+
| `options` | `IOptions` | <div>No</div> | Optional options for preparing the video. |
|
|
673
|
+
| `options.background` | `boolean \| undefined` | <div>No</div> | If view should be prepared in background. |
|
|
674
|
+
| `options.volume` | `number \| undefined` | <div>No</div> | Initial volume value of the video. |
|
|
675
675
|
|
|
676
676
|
#### Return value
|
|
677
677
|
|
|
@@ -78,7 +78,7 @@ type IAutoRecoveryConfiguration = {
|
|
|
78
78
|
| Name | Type | Required | Description |
|
|
79
79
|
|---------------------------------------|------------------------------|------------------|-------------------------------------------------------------------------------------------------------------|
|
|
80
80
|
| `configuration` | `IAutoRecoveryConfiguration` | <div>Yes</div> | The configuration object for auto-recovery settings. |
|
|
81
|
-
| `configuration.enabled` | `
|
|
81
|
+
| `configuration.enabled` | `boolean` | <div>Yes</div> | A boolean to set auto-recovery to enabled or disabled state. |
|
|
82
82
|
| `configuration.autoEnableTimeoutMs` | `number` | <div>No</div> | The timeout in milliseconds after which the auto-recovery will be automatically enabled if it was disabled. |
|
|
83
83
|
| `configuration.healthcheckIntervalMs` | `number` | <div>Yes</div> | The interval in milliseconds for the health check if application is running in foreground. |
|
|
84
84
|
|
|
@@ -68,7 +68,7 @@ importCertificate(details: CertificateEapDetails): Promise<void>;
|
|
|
68
68
|
/** Details for importing a certificate for EAP authentication. */
|
|
69
69
|
interface CertificateEapDetails {
|
|
70
70
|
/** Type of EAP authentication */
|
|
71
|
-
type:
|
|
71
|
+
type: EAPMethod;
|
|
72
72
|
/** CA certificate */
|
|
73
73
|
caCertificate?: string;
|
|
74
74
|
/** Client certificate for EAP-TLS */
|
|
@@ -79,8 +79,7 @@ interface CertificateEapDetails {
|
|
|
79
79
|
clientCertificatePassword?: string;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
type EAPType = 'EAP-TLS' | 'PEAP' | 'EAP-TTLS';
|
|
82
|
+
type EAPMethod = 'PEAP' | 'TLS' | 'TTLS';
|
|
84
83
|
|
|
85
84
|
```
|
|
86
85
|
|
|
@@ -89,11 +88,11 @@ type EAPType = 'EAP-TLS' | 'PEAP' | 'EAP-TTLS';
|
|
|
89
88
|
| Name | Type | Required | Description |
|
|
90
89
|
|-------------------------------------|-------------------------|------------------|-----------------------------------------------------------------------------------|
|
|
91
90
|
| `details` | `CertificateEapDetails` | <div>Yes</div> | The certificate details. |
|
|
92
|
-
| `details.type` | `
|
|
93
|
-
| `details.caCertificate` | `string`
|
|
94
|
-
| `details.clientCertificate` | `string`
|
|
95
|
-
| `details.clientKey` | `string`
|
|
96
|
-
| `details.clientCertificatePassword` | `string`
|
|
91
|
+
| `details.type` | `EAPMethod` | <div>Yes</div> | The type of the certificate is for. |
|
|
92
|
+
| `details.caCertificate` | `string \| undefined` | <div>No</div> | The CA certificate in PEM format. Required for 'PEAP' and 'EAP-TTLS'. |
|
|
93
|
+
| `details.clientCertificate` | `string \| undefined` | <div>No</div> | The client certificate in PEM format. Required for 'EAP-TLS'. |
|
|
94
|
+
| `details.clientKey` | `string \| undefined` | <div>No</div> | The private key for the client certificate in PEM format. Required for 'EAP-TLS'. |
|
|
95
|
+
| `details.clientCertificatePassword` | `string \| undefined` | <div>No</div> | The password for the private key, if it's encrypted. Optional. |
|
|
97
96
|
|
|
98
97
|
#### Return value
|
|
99
98
|
|
|
@@ -110,7 +109,7 @@ A promise that resolves when the certificate is imported.
|
|
|
110
109
|
```ts
|
|
111
110
|
// Importing an EAP-TLS certificate
|
|
112
111
|
const certDetails = {
|
|
113
|
-
type: '
|
|
112
|
+
type: 'TLS',
|
|
114
113
|
caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
115
114
|
clientCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
116
115
|
clientKey: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
|
|
@@ -127,7 +126,7 @@ await sos.management.network.importCertificate(certDetailsEapPeap);
|
|
|
127
126
|
|
|
128
127
|
// Importing an EAP-TTLS certificate
|
|
129
128
|
const certDetailsEapTtls = {
|
|
130
|
-
type: '
|
|
129
|
+
type: 'TTLS',
|
|
131
130
|
caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
132
131
|
};
|
|
133
132
|
await sos.management.network.importCertificate(certDetailsEapTtls);
|
|
@@ -174,7 +173,7 @@ Resolves to an array of network interfaces with their information.
|
|
|
174
173
|
```ts
|
|
175
174
|
const interfaces = await sos.management.network.listInterfaces();
|
|
176
175
|
interfaces.forEach((iface) => {
|
|
177
|
-
console.log(`Interface: ${iface.
|
|
176
|
+
console.log(`Interface: ${iface.type}, IP: ${iface.localAddress ?? 'Unknown'}, MAC: ${iface.macAddress}`);
|
|
178
177
|
});
|
|
179
178
|
```
|
|
180
179
|
|
|
@@ -313,12 +313,12 @@ interface TakeAndUploadScreenshotOptions {
|
|
|
313
313
|
|
|
314
314
|
#### Params
|
|
315
315
|
|
|
316
|
-
| Name | Type
|
|
317
|
-
|
|
318
|
-
| `uploadBaseUrl` | `string`
|
|
319
|
-
| `options` | `TakeAndUploadScreenshotOptions`
|
|
320
|
-
| `options.computeHash` | `boolean`
|
|
321
|
-
| `options.headers` | `Record<string, string
|
|
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 \| undefined` | <div>No</div> | Whether to compute a hash of the screenshot and return it in the response. |
|
|
321
|
+
| `options.headers` | `Record<string, string> \| undefined` | <div>No</div> | Additional headers to include in the upload request for POST requests. |
|
|
322
322
|
|
|
323
323
|
#### Return value
|
|
324
324
|
|
|
@@ -43,7 +43,8 @@ Make sure that you have a backup script or a checking mechanism in place, which
|
|
|
43
43
|
:::
|
|
44
44
|
|
|
45
45
|
:::info
|
|
46
|
-
The security type of Wi-Fi is mandatory for Tizen.
|
|
46
|
+
- The security type of Wi-Fi is mandatory for Tizen.
|
|
47
|
+
- Please note, that Brightsign players use USB drive to read certificates for EAP authentication. For more information check our documentation [How to use Wi-Fi Enterprise](https://developers.signageos.io/docs/device/wifi-enterprise/brightsign).
|
|
47
48
|
:::
|
|
48
49
|
|
|
49
50
|
```ts expandable
|
|
@@ -52,51 +53,91 @@ connect(ssid: string, password?: string, options?: IWifiConnectOptions): Promise
|
|
|
52
53
|
/**
|
|
53
54
|
* Options for connecting to a Wi-Fi network.
|
|
54
55
|
*/
|
|
55
|
-
interface IWifiConnectOptions {
|
|
56
|
-
/** Whether the network is hidden. */
|
|
57
|
-
hidden?: boolean;
|
|
56
|
+
interface IWifiConnectOptions<T extends IEAPConfig = IEAPConfig> {
|
|
58
57
|
/** The type of security/encryption used by the network. */
|
|
59
58
|
securityType?: WifiEncryptionType;
|
|
59
|
+
/** Whether the network is hidden. */
|
|
60
|
+
hidden?: boolean;
|
|
60
61
|
/** Authentication details for networks that require EAP. */
|
|
61
|
-
eap?:
|
|
62
|
-
/** The type of EAP authentication to use. */
|
|
63
|
-
method: EAPMethod;
|
|
64
|
-
/** Username or identity for authentication. */
|
|
65
|
-
identity: string;
|
|
66
|
-
/** Anonymous identity for authentication. */
|
|
67
|
-
anonymousIdentity?: string;
|
|
68
|
-
/** Password or passphrase for authentication. */
|
|
69
|
-
passphrase: string;
|
|
70
|
-
/** Secondary authentication method. Not needed for TLS. */
|
|
71
|
-
phase2Auth?: EAPPhase2Auth;
|
|
72
|
-
/** Whether to use a CA certificate for authentication. Not needed for TLS. */
|
|
73
|
-
useCACert?: boolean;
|
|
74
|
-
};
|
|
62
|
+
eap?: T;
|
|
75
63
|
}
|
|
76
64
|
|
|
77
|
-
type
|
|
65
|
+
type IEAPConfig = IEAP_PEAP | IEAP_TTLS | IEAP_TLS;
|
|
66
|
+
|
|
67
|
+
interface IEAP_PEAP extends IEAPBase {
|
|
68
|
+
/** The type of EAP authentication to use. */
|
|
69
|
+
method: 'PEAP';
|
|
70
|
+
/** Anonymous/outer identity used for initial authentication before the encrypted tunnel is established. */
|
|
71
|
+
anonymousIdentity?: string;
|
|
72
|
+
/** Secondary authentication method.*/
|
|
73
|
+
phase2Auth?: EAPPhase2Auth;
|
|
74
|
+
/** Whether to use a CA certificate for authentication. */
|
|
75
|
+
useCACert: boolean;
|
|
76
|
+
/** CA certificate in PEM format */
|
|
77
|
+
caCertificate?: string;
|
|
78
|
+
}
|
|
78
79
|
|
|
79
|
-
type
|
|
80
|
+
type EAPPhase2Auth = 'PAP' | 'MSCHAP' | 'MSCHAPV2' | 'GTC' | 'CHAP';
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
interface IEAPBase {
|
|
83
|
+
/** Username or identity for authentication. */
|
|
84
|
+
identity: string;
|
|
85
|
+
/** Password or passphrase for authentication. */
|
|
86
|
+
identityPassword?: string;
|
|
87
|
+
/** Optional domain for server certificate validation. */
|
|
88
|
+
domain?: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface IEAP_TTLS extends IEAPBase {
|
|
92
|
+
/** The type of EAP authentication to use. */
|
|
93
|
+
method: 'TTLS';
|
|
94
|
+
/** Anonymous/outer identity used for initial authentication before the encrypted tunnel is established. */
|
|
95
|
+
anonymousIdentity?: string;
|
|
96
|
+
/** Secondary authentication method. */
|
|
97
|
+
phase2Auth?: EAPPhase2Auth;
|
|
98
|
+
/** Whether to use a CA certificate for authentication. */
|
|
99
|
+
useCACert: boolean;
|
|
100
|
+
/** CA certificate in PEM format */
|
|
101
|
+
caCertificate?: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
interface IEAP_TLS extends IEAPBase {
|
|
105
|
+
/** The type of EAP authentication to use. */
|
|
106
|
+
method: 'TLS';
|
|
107
|
+
/** CA certificate in PEM format, if required. */
|
|
108
|
+
caCertificate: string;
|
|
109
|
+
/** Client certificate in PEM format, if required. */
|
|
110
|
+
clientCertificate: string;
|
|
111
|
+
/** Private key in PEM format, if required. */
|
|
112
|
+
privateKey: string;
|
|
113
|
+
/** Password for the private key, if it's encrypted. */
|
|
114
|
+
privateKeyPassword?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
type WifiEncryptionType = 'OPEN' | 'WEP' | 'WPA2' | 'WPA2_WPA_MIXED' | 'WPA3' | '802.1X_EAP';
|
|
82
118
|
|
|
83
119
|
```
|
|
84
120
|
|
|
85
121
|
#### Params
|
|
86
122
|
|
|
87
|
-
| Name
|
|
88
|
-
|
|
89
|
-
| `ssid`
|
|
90
|
-
| `password`
|
|
91
|
-
| `options`
|
|
92
|
-
| `options.hidden`
|
|
93
|
-
| `options.securityType`
|
|
94
|
-
| `options.eap`
|
|
95
|
-
| `options.eap.method`
|
|
96
|
-
| `options.eap.identity`
|
|
97
|
-
| `options.eap.
|
|
98
|
-
| `options.eap.
|
|
99
|
-
| `options.eap.
|
|
123
|
+
| Name | Type | Required | Description |
|
|
124
|
+
|----------------------------------|-----------------------------------|------------------|----------------------------------------------------------------------------------|
|
|
125
|
+
| `ssid` | `string` | <div>Yes</div> | Name of the network, max. allowed length is 32 characters. |
|
|
126
|
+
| `password` | `string` | <div>No</div> | Password of the device, must be between 8 and 32 characters. |
|
|
127
|
+
| `options` | `IWifiConnectOptions<IEAPConfig>` | <div>No</div> | Additional options for the connection. |
|
|
128
|
+
| `options.hidden` | `boolean \| undefined` | <div>No</div> | If the network is hidden, defaults to `false`. |
|
|
129
|
+
| `options.securityType` | `WifiEncryptionType \| undefined` | <div>No</div> | The security type of the network. |
|
|
130
|
+
| `options.eap` | `IEAPConfig \| undefined` | <div>No</div> | Authentication details for networks that require EAP. |
|
|
131
|
+
| `options.eap.method` | `"TLS"` | <div>Yes</div> | The type of EAP authentication to use. |
|
|
132
|
+
| `options.eap.identity` | `string` | <div>Yes</div> | Username or identity for authentication. |
|
|
133
|
+
| `options.eap.identityPassword` | `string` | <div>No</div> | Identity password for authentication. |
|
|
134
|
+
| `options.eap.anonymousIdentity` | `string` | <div>No</div> | Anonymous identity for authentication, if required by the EAP method. |
|
|
135
|
+
| `options.eap.phase2Auth` | `EAPPhase2Auth` | <div>No</div> | Secondary authentication method, if required by the EAP method. |
|
|
136
|
+
| `options.eap.useCACert` | `boolean` | <div>Yes</div> | Whether to use a CA certificate for authentication. |
|
|
137
|
+
| `options.eap.caCertificate` | `string` | <div>Yes</div> | The CA certificate to use for authentication, if `useCACert` is `true`. |
|
|
138
|
+
| `options.eap.clientCertificate` | `string` | <div>Yes</div> | The client certificate to use for authentication, if required by the EAP method. |
|
|
139
|
+
| `options.eap.privateKey` | `string` | <div>Yes</div> | The private key to use for authentication, if required by the EAP method. |
|
|
140
|
+
| `options.eap.privateKeyPassword` | `string` | <div>No</div> | The password for the private key, if it's encrypted. |
|
|
100
141
|
|
|
101
142
|
#### Return value
|
|
102
143
|
|
|
@@ -124,14 +165,25 @@ await sos.management.wifi.connect('MyOpenNetwork', undefined, { hidden: true, se
|
|
|
124
165
|
await sos.management.wifi.connect('MyEncryptedNetwork', 'my-password', { securityType: 'WPA2' });
|
|
125
166
|
|
|
126
167
|
// To connect to an enterprise Wi-Fi network using EAP
|
|
127
|
-
await sos.management.wifi.connect('MyEnterpriseNetwork',
|
|
168
|
+
await sos.management.wifi.connect('MyEnterpriseNetwork', 'identity-password', {
|
|
128
169
|
securityType: '802.1X_EAP',
|
|
129
170
|
eap: {
|
|
130
171
|
method: 'PEAP',
|
|
131
172
|
identity: 'my-username',
|
|
132
|
-
passphrase: 'my-password',
|
|
133
173
|
phase2Auth: 'MSCHAPV2',
|
|
134
|
-
useCACert:
|
|
174
|
+
useCACert: true,
|
|
175
|
+
caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
// To connect to an enterprise Wi-Fi network using EAP-TTLS with a CA certificate
|
|
180
|
+
await sos.management.wifi.connect('MyEnterpriseNetwork', 'identity-password', {
|
|
181
|
+
securityType: '802.1X_EAP',
|
|
182
|
+
eap: {
|
|
183
|
+
method: 'TTLS',
|
|
184
|
+
identity: 'my-username',
|
|
185
|
+
useCACert: true,
|
|
186
|
+
caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
135
187
|
},
|
|
136
188
|
});
|
|
137
189
|
```
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { EAPMethod } from '../Wifi/IWifi';
|
|
1
2
|
import INetworkInfo, { INetworkInterface, INetworkOptions, INetworkOptionsLegacy, NetworkInterface } from './INetworkInfo';
|
|
2
|
-
/** Allowed types of EAP authentication */
|
|
3
|
-
export type EAPType = 'EAP-TLS' | 'PEAP' | 'EAP-TTLS';
|
|
4
3
|
/** Details for importing a certificate for EAP authentication. */
|
|
5
4
|
export interface CertificateEapDetails {
|
|
6
5
|
/** Type of EAP authentication */
|
|
7
|
-
type:
|
|
6
|
+
type: EAPMethod;
|
|
8
7
|
/** CA certificate */
|
|
9
8
|
caCertificate?: string;
|
|
10
9
|
/** Client certificate for EAP-TLS */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VCertificateEapDetails = void 0;
|
|
4
4
|
exports.VCertificateEapDetails = {
|
|
5
|
-
type: { string: ['
|
|
5
|
+
type: { string: ['TLS', 'PEAP', 'TTLS'] },
|
|
6
6
|
caCertificate: '?string',
|
|
7
7
|
clientCertificate: '?string',
|
|
8
8
|
clientKey: '?string',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"INetwork.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Network/INetwork.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"INetwork.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Network/INetwork.ts"],"names":[],"mappings":";;;AA4Ba,QAAA,sBAAsB,GAAG;IACrC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;IACzC,aAAa,EAAE,SAAS;IACxB,iBAAiB,EAAE,SAAS;IAC5B,SAAS,EAAE,SAAS;IACpB,yBAAyB,EAAE,SAAS;CACpC,CAAC"}
|
|
@@ -32,7 +32,7 @@ export default class Network implements INetwork {
|
|
|
32
32
|
* @example
|
|
33
33
|
* const interfaces = await sos.management.network.listInterfaces();
|
|
34
34
|
* interfaces.forEach((iface) => {
|
|
35
|
-
* console.log(`Interface: ${iface.
|
|
35
|
+
* console.log(`Interface: ${iface.type}, IP: ${iface.localAddress ?? 'Unknown'}, MAC: ${iface.macAddress}`);
|
|
36
36
|
* });
|
|
37
37
|
*/
|
|
38
38
|
listInterfaces(): Promise<INetworkInterface[]>;
|
|
@@ -113,7 +113,7 @@ export default class Network implements INetwork {
|
|
|
113
113
|
* @example
|
|
114
114
|
* // Importing an EAP-TLS certificate
|
|
115
115
|
* const certDetails = {
|
|
116
|
-
* type: '
|
|
116
|
+
* type: 'TLS',
|
|
117
117
|
* caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
118
118
|
* clientCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
119
119
|
* clientKey: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
|
|
@@ -130,7 +130,7 @@ export default class Network implements INetwork {
|
|
|
130
130
|
*
|
|
131
131
|
* // Importing an EAP-TTLS certificate
|
|
132
132
|
* const certDetailsEapTtls = {
|
|
133
|
-
* type: '
|
|
133
|
+
* type: 'TTLS',
|
|
134
134
|
* caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
135
135
|
* };
|
|
136
136
|
* await sos.management.network.importCertificate(certDetailsEapTtls);
|
|
@@ -45,7 +45,7 @@ class Network {
|
|
|
45
45
|
* @example
|
|
46
46
|
* const interfaces = await sos.management.network.listInterfaces();
|
|
47
47
|
* interfaces.forEach((iface) => {
|
|
48
|
-
* console.log(`Interface: ${iface.
|
|
48
|
+
* console.log(`Interface: ${iface.type}, IP: ${iface.localAddress ?? 'Unknown'}, MAC: ${iface.macAddress}`);
|
|
49
49
|
* });
|
|
50
50
|
*/
|
|
51
51
|
async listInterfaces() {
|
|
@@ -139,7 +139,7 @@ class Network {
|
|
|
139
139
|
* @example
|
|
140
140
|
* // Importing an EAP-TLS certificate
|
|
141
141
|
* const certDetails = {
|
|
142
|
-
* type: '
|
|
142
|
+
* type: 'TLS',
|
|
143
143
|
* caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
144
144
|
* clientCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
145
145
|
* clientKey: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
|
|
@@ -156,7 +156,7 @@ class Network {
|
|
|
156
156
|
*
|
|
157
157
|
* // Importing an EAP-TTLS certificate
|
|
158
158
|
* const certDetailsEapTtls = {
|
|
159
|
-
* type: '
|
|
159
|
+
* type: 'TTLS',
|
|
160
160
|
* caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
161
161
|
* };
|
|
162
162
|
* await sos.management.network.importCertificate(certDetailsEapTtls);
|