@signageos/front-applet 8.2.4 → 8.4.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.
- package/dist/bundle.js +2 -2
- package/dist/bundle.js.map +1 -1
- package/docs/sos_management/network.md +75 -0
- package/docs/sos_management/screen.md +41 -7
- package/docs/sos_management/wifi.md +37 -7
- package/es6/FrontApplet/Management/Network/INetwork.d.ts +18 -0
- package/es6/FrontApplet/Management/Network/INetwork.js +8 -0
- package/es6/FrontApplet/Management/Network/INetwork.js.map +1 -1
- package/es6/FrontApplet/Management/Network/Network.d.ts +46 -1
- package/es6/FrontApplet/Management/Network/Network.js +52 -0
- package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
- package/es6/FrontApplet/Management/Screen/IScreen.d.ts +19 -5
- package/es6/FrontApplet/Management/Screen/IScreen.js +5 -0
- package/es6/FrontApplet/Management/Screen/IScreen.js.map +1 -1
- package/es6/FrontApplet/Management/Screen/Screen.d.ts +11 -7
- package/es6/FrontApplet/Management/Screen/Screen.js +22 -1
- package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/IWifi.d.ts +18 -0
- package/es6/FrontApplet/Management/Wifi/IWifi.js +8 -0
- package/es6/FrontApplet/Management/Wifi/IWifi.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +18 -0
- package/es6/FrontApplet/Management/Wifi/Wifi.js +18 -0
- package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
- package/package.json +1 -1
|
@@ -53,6 +53,81 @@ await sos.management.network.disableInterface('eth0');
|
|
|
53
53
|
|
|
54
54
|
<Separator />
|
|
55
55
|
|
|
56
|
+
### importCertificate()
|
|
57
|
+
|
|
58
|
+
The `importCertificate()` method imports a certificate to the device. The certificate can then be used when connecting to a Wi-Fi network using the [Wi-Fi API and EAP authentification](https://developers.signageos.io/sdk/sos_management/wifi).
|
|
59
|
+
|
|
60
|
+
:::note
|
|
61
|
+
- This API supports only PEM formatted certificates.
|
|
62
|
+
- Only EAP certificates are supported for now.
|
|
63
|
+
:::
|
|
64
|
+
|
|
65
|
+
```ts expandable
|
|
66
|
+
importCertificate(details: CertificateEapDetails): Promise<void>;
|
|
67
|
+
// show-more
|
|
68
|
+
interface CertificateEapDetails {
|
|
69
|
+
type: EAPType;
|
|
70
|
+
caCertificate?: string;
|
|
71
|
+
clientCertificate?: string;
|
|
72
|
+
clientKey?: string;
|
|
73
|
+
clientCertificatePassword?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
type EAPType = 'EAP-TLS' | 'PEAP' | 'EAP-TTLS';
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### Params
|
|
81
|
+
|
|
82
|
+
| Name | Type | Required | Description |
|
|
83
|
+
|-------------------------------------|-------------------------|------------------|-----------------------------------------------------------------------------------|
|
|
84
|
+
| `details` | `CertificateEapDetails` | <div>Yes</div> | The certificate details. |
|
|
85
|
+
| `details.type` | `EAPType` | <div>Yes</div> | The type of the certificate is for. |
|
|
86
|
+
| `details.caCertificate` | `string` | <div>No</div> | The CA certificate in PEM format. Required for 'PEAP' and 'EAP-TTLS'. |
|
|
87
|
+
| `details.clientCertificate` | `string` | <div>No</div> | The client certificate in PEM format. Required for 'EAP-TLS'. |
|
|
88
|
+
| `details.clientKey` | `string` | <div>No</div> | The private key for the client certificate in PEM format. Required for 'EAP-TLS'. |
|
|
89
|
+
| `details.clientCertificatePassword` | `string` | <div>No</div> | The password for the private key, if it's encrypted. Optional. |
|
|
90
|
+
|
|
91
|
+
#### Return value
|
|
92
|
+
|
|
93
|
+
A promise that resolves when the certificate is imported.
|
|
94
|
+
|
|
95
|
+
#### Possible errors
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
- If the certificate details are invalid.
|
|
99
|
+
- If the device does not support certificate import.
|
|
100
|
+
|
|
101
|
+
#### Example
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
// Importing an EAP-TLS certificate
|
|
105
|
+
const certDetails = {
|
|
106
|
+
type: 'EAP-TLS',
|
|
107
|
+
caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
108
|
+
clientCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
109
|
+
clientKey: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
|
|
110
|
+
clientCertificatePassword: 'your_password', // if the key is encrypted
|
|
111
|
+
};
|
|
112
|
+
await sos.management.network.importCertificate(certDetails);
|
|
113
|
+
|
|
114
|
+
// Importing a PEAP certificate
|
|
115
|
+
const certDetailsEapPeap = {
|
|
116
|
+
type: 'PEAP',
|
|
117
|
+
caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
118
|
+
};
|
|
119
|
+
await sos.management.network.importCertificate(certDetailsEapPeap);
|
|
120
|
+
|
|
121
|
+
// Importing an EAP-TTLS certificate
|
|
122
|
+
const certDetailsEapTtls = {
|
|
123
|
+
type: 'EAP-TTLS',
|
|
124
|
+
caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
125
|
+
};
|
|
126
|
+
await sos.management.network.importCertificate(certDetailsEapTtls);
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
<Separator />
|
|
130
|
+
|
|
56
131
|
### listInterfaces()
|
|
57
132
|
|
|
58
133
|
The `listInterface()` method returns a list of all network interfaces, and their information like MAC address, IP address, etc.
|
|
@@ -277,7 +277,7 @@ await sos.management.screen.setBrightness(
|
|
|
277
277
|
|
|
278
278
|
<Separator />
|
|
279
279
|
|
|
280
|
-
### takeAndUploadScreenshot(uploadBaseUrl,
|
|
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,31 @@ 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,
|
|
295
|
+
takeAndUploadScreenshot(uploadBaseUrl: string, options?: TakeAndUploadScreenshotOptions): Promise<TakeAndUploadScreenshotResult>;
|
|
296
|
+
// show-more
|
|
297
|
+
interface TakeAndUploadScreenshotResult {
|
|
296
298
|
screenshotUrl: string;
|
|
297
299
|
aHash?: string;
|
|
298
|
-
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/** Options for taking and uploading a screenshot. */
|
|
303
|
+
interface TakeAndUploadScreenshotOptions {
|
|
304
|
+
/** Whether to compute the hash of the screenshot. Default is false. */
|
|
305
|
+
computeHash?: boolean;
|
|
306
|
+
/** Additional headers to include in the upload request. */
|
|
307
|
+
headers?: Record<string, string>;
|
|
308
|
+
}
|
|
309
|
+
|
|
299
310
|
```
|
|
300
311
|
|
|
301
312
|
#### Params
|
|
302
313
|
|
|
303
|
-
| Name
|
|
304
|
-
|
|
305
|
-
| `uploadBaseUrl`
|
|
306
|
-
| `
|
|
314
|
+
| Name | Type | Required | Description |
|
|
315
|
+
|-----------------------|----------------------------------|------------------|---------------------------------------------------------------------------------------------------------------|
|
|
316
|
+
| `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. |
|
|
317
|
+
| `options` | `TakeAndUploadScreenshotOptions` | <div>No</div> | Optional parameters for taking and uploading the screenshot. |
|
|
318
|
+
| `options.computeHash` | `boolean` | <div>No</div> | Whether to compute a hash of the screenshot and return it in the response. |
|
|
319
|
+
| `options.headers` | `Record<string, string>` | <div>No</div> | Additional headers to include in the upload request for POST requests. |
|
|
307
320
|
|
|
308
321
|
#### Return value
|
|
309
322
|
|
|
@@ -314,6 +327,7 @@ A promise that resolves to an object containing the screenshot URL and optionall
|
|
|
314
327
|
|
|
315
328
|
- If `uploadBaseUrl` is not a valid URL
|
|
316
329
|
- If `computeHash` is not a boolean
|
|
330
|
+
- If `headers` is not a valid object
|
|
317
331
|
- If the screenshot cannot be taken or uploaded.
|
|
318
332
|
|
|
319
333
|
#### Example
|
|
@@ -333,6 +347,26 @@ const { screenshotUrl, aHash } = await sos.management.screen.takeAndUploadScreen
|
|
|
333
347
|
|
|
334
348
|
<Separator />
|
|
335
349
|
|
|
350
|
+
### ~takeAndUploadScreenshot(uploadBaseUrl, computeHash)~
|
|
351
|
+
|
|
352
|
+
:::danger Deprecated
|
|
353
|
+
|
|
354
|
+
This method was deprecated. Use `takeAndUploadScreenshot(uploadBaseUrl: string, options: TakeAndUploadScreenshotOptions): Promise<TakeAndUploadScreenshotResult>` instead.
|
|
355
|
+
|
|
356
|
+
:::
|
|
357
|
+
|
|
358
|
+
```ts expandable
|
|
359
|
+
takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<TakeAndUploadScreenshotResult>;
|
|
360
|
+
// show-more
|
|
361
|
+
interface TakeAndUploadScreenshotResult {
|
|
362
|
+
screenshotUrl: string;
|
|
363
|
+
aHash?: string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
<Separator />
|
|
369
|
+
|
|
336
370
|
### ~takeAndUploadScreenshot(uploadBaseUrl)~
|
|
337
371
|
|
|
338
372
|
:::danger Deprecated
|
|
@@ -58,21 +58,39 @@ connect(ssid: string, password?: string, options?: IWifiConnectOptions): Promise
|
|
|
58
58
|
interface IWifiConnectOptions {
|
|
59
59
|
hidden?: boolean;
|
|
60
60
|
securityType?: WifiEncryptionType;
|
|
61
|
+
eap?: {
|
|
62
|
+
method: EAPMethod;
|
|
63
|
+
identity: string;
|
|
64
|
+
anonymousIdentity?: string;
|
|
65
|
+
passphrase: string;
|
|
66
|
+
phase2Auth?: EAPPhase2Auth;
|
|
67
|
+
useCACert?: boolean;
|
|
68
|
+
};
|
|
61
69
|
}
|
|
62
70
|
|
|
63
71
|
type WifiEncryptionType = 'OPEN' | 'WEP' | 'WPA2' | 'WPA2_WPA_MIXED' | 'WPA3' | '802.1X_EAP';
|
|
64
72
|
|
|
73
|
+
type EAPMethod = 'PEAP' | 'TLS' | 'TTLS';
|
|
74
|
+
|
|
75
|
+
type EAPPhase2Auth = 'PAP' | 'MSCHAP' | 'MSCHAPV2' | 'GTC';
|
|
76
|
+
|
|
65
77
|
```
|
|
66
78
|
|
|
67
79
|
#### Params
|
|
68
80
|
|
|
69
|
-
| Name
|
|
70
|
-
|
|
71
|
-
| `ssid`
|
|
72
|
-
| `password`
|
|
73
|
-
| `options`
|
|
74
|
-
| `options.hidden`
|
|
75
|
-
| `options.securityType`
|
|
81
|
+
| Name | Type | Required | Description |
|
|
82
|
+
|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------|-------------------------------------------------------------------------------------|
|
|
83
|
+
| `ssid` | `string` | <div>Yes</div> | Name of the network, max. allowed length is 32 characters. |
|
|
84
|
+
| `password` | `string` | <div>No</div> | Password of the device, must be between 8 and 32 characters. |
|
|
85
|
+
| `options` | `IWifiConnectOptions` | <div>No</div> | Additional options for the connection. |
|
|
86
|
+
| `options.hidden` | `boolean` | <div>No</div> | If the network is hidden, defaults to `false`. |
|
|
87
|
+
| `options.securityType` | `WifiEncryptionType` | <div>No</div> | The security type of the network. |
|
|
88
|
+
| `options.eap` | `{ method: EAPMethod; identity: string; anonymousIdentity?: string \| undefined; passphrase: string; phase2Auth?: EAPPhase2Auth \| undefined; useCACert?: boolean \| undefined; }` | <div>No</div> | Authentication details for networks that require EAP. |
|
|
89
|
+
| `options.eap.method` | `EAPMethod` | <div>Yes</div> | The type of EAP authentication to use. |
|
|
90
|
+
| `options.eap.identity` | `string` | <div>Yes</div> | Username or identity for authentication. |
|
|
91
|
+
| `options.eap.passphrase` | `string` | <div>Yes</div> | Password or passphrase for authentication. |
|
|
92
|
+
| `options.eap.phase2Auth` | `EAPPhase2Auth` | <div>No</div> | Secondary authentication method, if required by the EAP method. Not needed for TLS. |
|
|
93
|
+
| `options.eap.useCACert` | `boolean` | <div>No</div> | Whether to use a CA certificate for authentication. Not needed for TLS. |
|
|
76
94
|
|
|
77
95
|
#### Return value
|
|
78
96
|
|
|
@@ -101,6 +119,18 @@ await sos.management.wifi.connect('MyOpenNetwork', undefined, { hidden: true });
|
|
|
101
119
|
|
|
102
120
|
// To connect to an encrypted Wi-Fi network with WPA2 security
|
|
103
121
|
await sos.management.wifi.connect('MyEncryptedNetwork', 'my-password', { securityType: 'WPA2' });
|
|
122
|
+
|
|
123
|
+
// To connect to an enterprise Wi-Fi network using EAP
|
|
124
|
+
await sos.management.wifi.connect('MyEnterpriseNetwork', undefined, {
|
|
125
|
+
securityType: '802.1X_EAP',
|
|
126
|
+
eap: {
|
|
127
|
+
method: 'PEAP',
|
|
128
|
+
identity: 'my-username',
|
|
129
|
+
passphrase: 'my-password',
|
|
130
|
+
phase2Auth: 'MSCHAPV2',
|
|
131
|
+
useCACert: false,
|
|
132
|
+
},
|
|
133
|
+
});
|
|
104
134
|
```
|
|
105
135
|
|
|
106
136
|
<Separator />
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import INetworkInfo, { INetworkInterface, INetworkOptions, INetworkOptionsLegacy, NetworkInterface } from './INetworkInfo';
|
|
2
|
+
export type EAPType = 'EAP-TLS' | 'PEAP' | 'EAP-TTLS';
|
|
3
|
+
export interface CertificateEapDetails {
|
|
4
|
+
type: EAPType;
|
|
5
|
+
caCertificate?: string;
|
|
6
|
+
clientCertificate?: string;
|
|
7
|
+
clientKey?: string;
|
|
8
|
+
clientCertificatePassword?: string;
|
|
9
|
+
}
|
|
2
10
|
export default interface INetwork {
|
|
3
11
|
getActiveInfo(): Promise<INetworkInfo>;
|
|
4
12
|
listInterfaces(): Promise<INetworkInterface[]>;
|
|
@@ -7,4 +15,14 @@ export default interface INetwork {
|
|
|
7
15
|
setDHCP(networkInterface: NetworkInterface): Promise<void>;
|
|
8
16
|
setDHCP(interfaceName: string): Promise<void>;
|
|
9
17
|
disableInterface(interfaceName: string): Promise<void>;
|
|
18
|
+
importCertificate(details: CertificateEapDetails): Promise<void>;
|
|
10
19
|
}
|
|
20
|
+
export declare const VCertificateEapDetails: {
|
|
21
|
+
type: {
|
|
22
|
+
string: string[];
|
|
23
|
+
};
|
|
24
|
+
caCertificate: string;
|
|
25
|
+
clientCertificate: string;
|
|
26
|
+
clientKey: string;
|
|
27
|
+
clientCertificatePassword: string;
|
|
28
|
+
};
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VCertificateEapDetails = void 0;
|
|
4
|
+
exports.VCertificateEapDetails = {
|
|
5
|
+
type: { string: ['EAP-TLS', 'PEAP', 'EAP-TTLS'] },
|
|
6
|
+
caCertificate: '?string',
|
|
7
|
+
clientCertificate: '?string',
|
|
8
|
+
clientKey: '?string',
|
|
9
|
+
clientCertificatePassword: '?string',
|
|
10
|
+
};
|
|
3
11
|
//# sourceMappingURL=INetwork.js.map
|
|
@@ -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":";;;AA8Ba,QAAA,sBAAsB,GAAG;IACrC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE;IACjD,aAAa,EAAE,SAAS;IACxB,iBAAiB,EAAE,SAAS;IAC5B,SAAS,EAAE,SAAS;IACpB,yBAAyB,EAAE,SAAS;CACpC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import IPostMessage from '../../IPostMessage';
|
|
2
2
|
import INetworkInfo, { INetworkInterface, INetworkOptions, INetworkOptionsLegacy, NetworkInterface } from './INetworkInfo';
|
|
3
|
-
import INetwork from './INetwork';
|
|
3
|
+
import INetwork, { CertificateEapDetails } from './INetwork';
|
|
4
4
|
/**
|
|
5
5
|
* The `sos.management.network` API groups together networking methods. For Wi-Fi setup, use the [Wi-Fi API](https://developers.signageos.io/sdk/sos_management/wifi).
|
|
6
6
|
*
|
|
@@ -91,5 +91,50 @@ export default class Network implements INetwork {
|
|
|
91
91
|
* await sos.management.network.disableInterface('eth0');
|
|
92
92
|
*/
|
|
93
93
|
disableInterface(interfaceName: string): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* The `importCertificate()` method imports a certificate to the device. The certificate can then be used when connecting to a Wi-Fi network using the [Wi-Fi API and EAP authentification](https://developers.signageos.io/sdk/sos_management/wifi).
|
|
96
|
+
*
|
|
97
|
+
* :::note
|
|
98
|
+
* - This API supports only PEM formatted certificates.
|
|
99
|
+
* - Only EAP certificates are supported for now.
|
|
100
|
+
* :::
|
|
101
|
+
*
|
|
102
|
+
* @param details The certificate details.
|
|
103
|
+
* @param details.type The type of the certificate is for.
|
|
104
|
+
* @param details.caCertificate The CA certificate in PEM format. Required for 'PEAP' and 'EAP-TTLS'.
|
|
105
|
+
* @param details.clientCertificate The client certificate in PEM format. Required for 'EAP-TLS'.
|
|
106
|
+
* @param details.clientKey The private key for the client certificate in PEM format. Required for 'EAP-TLS'.
|
|
107
|
+
* @param details.clientCertificatePassword The password for the private key, if it's encrypted. Optional.
|
|
108
|
+
* @returns {Promise<void>} A promise that resolves when the certificate is imported.
|
|
109
|
+
* @throws {Error} If the certificate details are invalid.
|
|
110
|
+
* @throws {Error} If the device does not support certificate import.
|
|
111
|
+
* @since 8.3.0
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* // Importing an EAP-TLS certificate
|
|
115
|
+
* const certDetails = {
|
|
116
|
+
* type: 'EAP-TLS',
|
|
117
|
+
* caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
118
|
+
* clientCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
119
|
+
* clientKey: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
|
|
120
|
+
* clientCertificatePassword: 'your_password', // if the key is encrypted
|
|
121
|
+
* };
|
|
122
|
+
* await sos.management.network.importCertificate(certDetails);
|
|
123
|
+
*
|
|
124
|
+
* // Importing a PEAP certificate
|
|
125
|
+
* const certDetailsEapPeap = {
|
|
126
|
+
* type: 'PEAP',
|
|
127
|
+
* caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
128
|
+
* };
|
|
129
|
+
* await sos.management.network.importCertificate(certDetailsEapPeap);
|
|
130
|
+
*
|
|
131
|
+
* // Importing an EAP-TTLS certificate
|
|
132
|
+
* const certDetailsEapTtls = {
|
|
133
|
+
* type: 'EAP-TTLS',
|
|
134
|
+
* caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
135
|
+
* };
|
|
136
|
+
* await sos.management.network.importCertificate(certDetailsEapTtls);
|
|
137
|
+
*/
|
|
138
|
+
importCertificate(details: CertificateEapDetails): Promise<void>;
|
|
94
139
|
private getMessage;
|
|
95
140
|
}
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const INetworkInfo_1 = require("./INetworkInfo");
|
|
7
7
|
const Validate_1 = __importDefault(require("../../Validate/Validate"));
|
|
8
|
+
const INetwork_1 = require("./INetwork");
|
|
8
9
|
/**
|
|
9
10
|
* The `sos.management.network` API groups together networking methods. For Wi-Fi setup, use the [Wi-Fi API](https://developers.signageos.io/sdk/sos_management/wifi).
|
|
10
11
|
*
|
|
@@ -116,6 +117,57 @@ class Network {
|
|
|
116
117
|
interfaceName,
|
|
117
118
|
});
|
|
118
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* The `importCertificate()` method imports a certificate to the device. The certificate can then be used when connecting to a Wi-Fi network using the [Wi-Fi API and EAP authentification](https://developers.signageos.io/sdk/sos_management/wifi).
|
|
122
|
+
*
|
|
123
|
+
* :::note
|
|
124
|
+
* - This API supports only PEM formatted certificates.
|
|
125
|
+
* - Only EAP certificates are supported for now.
|
|
126
|
+
* :::
|
|
127
|
+
*
|
|
128
|
+
* @param details The certificate details.
|
|
129
|
+
* @param details.type The type of the certificate is for.
|
|
130
|
+
* @param details.caCertificate The CA certificate in PEM format. Required for 'PEAP' and 'EAP-TTLS'.
|
|
131
|
+
* @param details.clientCertificate The client certificate in PEM format. Required for 'EAP-TLS'.
|
|
132
|
+
* @param details.clientKey The private key for the client certificate in PEM format. Required for 'EAP-TLS'.
|
|
133
|
+
* @param details.clientCertificatePassword The password for the private key, if it's encrypted. Optional.
|
|
134
|
+
* @returns {Promise<void>} A promise that resolves when the certificate is imported.
|
|
135
|
+
* @throws {Error} If the certificate details are invalid.
|
|
136
|
+
* @throws {Error} If the device does not support certificate import.
|
|
137
|
+
* @since 8.3.0
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* // Importing an EAP-TLS certificate
|
|
141
|
+
* const certDetails = {
|
|
142
|
+
* type: 'EAP-TLS',
|
|
143
|
+
* caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
144
|
+
* clientCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
145
|
+
* clientKey: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
|
|
146
|
+
* clientCertificatePassword: 'your_password', // if the key is encrypted
|
|
147
|
+
* };
|
|
148
|
+
* await sos.management.network.importCertificate(certDetails);
|
|
149
|
+
*
|
|
150
|
+
* // Importing a PEAP certificate
|
|
151
|
+
* const certDetailsEapPeap = {
|
|
152
|
+
* type: 'PEAP',
|
|
153
|
+
* caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
154
|
+
* };
|
|
155
|
+
* await sos.management.network.importCertificate(certDetailsEapPeap);
|
|
156
|
+
*
|
|
157
|
+
* // Importing an EAP-TTLS certificate
|
|
158
|
+
* const certDetailsEapTtls = {
|
|
159
|
+
* type: 'EAP-TTLS',
|
|
160
|
+
* caCertificate: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----',
|
|
161
|
+
* };
|
|
162
|
+
* await sos.management.network.importCertificate(certDetailsEapTtls);
|
|
163
|
+
*/
|
|
164
|
+
async importCertificate(details) {
|
|
165
|
+
(0, Validate_1.default)({ details }).required().object(INetwork_1.VCertificateEapDetails);
|
|
166
|
+
await this.postMessage({
|
|
167
|
+
type: this.getMessage('import_certificate'),
|
|
168
|
+
details,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
119
171
|
getMessage(name) {
|
|
120
172
|
return this.messagePrefix + '.' + name;
|
|
121
173
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Network.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Network/Network.ts"],"names":[],"mappings":";;;;;AACA,iDAQwB;AACxB,uEAA+C;
|
|
1
|
+
{"version":3,"file":"Network.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Network/Network.ts"],"names":[],"mappings":";;;;;AACA,iDAQwB;AACxB,uEAA+C;AAC/C,yCAAqF;AAErF;;;;;;;;;;;GAWG;AACH,MAAqB,OAAO;IAGlB;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ,yEAAyE;IAClE,KAAK,CAAC,aAAa;QACzB,MAAM,EAAE,WAAW,EAAE,GA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AAM,CAAC,iCAAsB,CAAC,CAAC;QAChE,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;YAC3C,OAAO;SACP,CAAC,CAAC;IACJ,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;IACxC,CAAC;CACD;AAvMD,0BAuMC"}
|
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
import IOrientation from './IOrientation';
|
|
2
2
|
import IBrightness from './IBrightness';
|
|
3
|
+
export interface TakeAndUploadScreenshotResult {
|
|
4
|
+
screenshotUrl: string;
|
|
5
|
+
aHash?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Options for taking and uploading a screenshot. */
|
|
8
|
+
export interface TakeAndUploadScreenshotOptions {
|
|
9
|
+
/** Whether to compute the hash of the screenshot. Default is false. */
|
|
10
|
+
computeHash?: boolean;
|
|
11
|
+
/** Additional headers to include in the upload request. */
|
|
12
|
+
headers?: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export declare const VTakeAndUploadScreenshotOptions: {
|
|
15
|
+
computeHash: string;
|
|
16
|
+
headers: string;
|
|
17
|
+
};
|
|
3
18
|
export default interface IScreen {
|
|
4
19
|
resize(baseUrl: string, orientation: string, resolution: string, currentVersion: string, videoOrientation?: string): Promise<void>;
|
|
5
20
|
getOrientation(): Promise<IOrientation>;
|
|
6
21
|
setBrightness(timeFrom1: string, brightness1: number, timeFrom2: string, brightness2: number): Promise<void>;
|
|
7
22
|
getBrightness(): Promise<IBrightness>;
|
|
8
|
-
/** @deprecated use takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<
|
|
23
|
+
/** @deprecated use takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<TakeAndUploadScreenshotResult> */
|
|
9
24
|
takeAndUploadScreenshot(uploadBaseUrl: string): Promise<string>;
|
|
10
|
-
takeAndUploadScreenshot(uploadBaseUrl: string,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}>;
|
|
25
|
+
/** @deprecated use takeAndUploadScreenshot(uploadBaseUrl: string, options: TakeAndUploadScreenshotOptions): Promise<TakeAndUploadScreenshotResult> */
|
|
26
|
+
takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<TakeAndUploadScreenshotResult>;
|
|
27
|
+
takeAndUploadScreenshot(uploadBaseUrl: string, options: TakeAndUploadScreenshotOptions): Promise<TakeAndUploadScreenshotResult>;
|
|
14
28
|
powerOn(): Promise<void>;
|
|
15
29
|
powerOff(): Promise<void>;
|
|
16
30
|
isPoweredOn(): Promise<boolean>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VTakeAndUploadScreenshotOptions = void 0;
|
|
4
|
+
exports.VTakeAndUploadScreenshotOptions = {
|
|
5
|
+
computeHash: '?boolean',
|
|
6
|
+
headers: '?object',
|
|
7
|
+
};
|
|
3
8
|
//# sourceMappingURL=IScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IScreen.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Screen/IScreen.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"IScreen.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Screen/IScreen.ts"],"names":[],"mappings":";;;AAkBa,QAAA,+BAA+B,GAAG;IAC9C,WAAW,EAAE,UAAU;IACvB,OAAO,EAAE,SAAS;CAClB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import IPostMessage from '../../IPostMessage';
|
|
2
2
|
import IBrightness from './IBrightness';
|
|
3
3
|
import IOrientation from './IOrientation';
|
|
4
|
-
import IScreen from './IScreen';
|
|
4
|
+
import IScreen, { TakeAndUploadScreenshotOptions, TakeAndUploadScreenshotResult } from './IScreen';
|
|
5
5
|
/**
|
|
6
6
|
* The `sos.management.screen` API groups together methods for controlling the screen of the device. It allows for manipulating the screen
|
|
7
7
|
* resolution or orientation, set brightness, retrieve the current brightness of the display, and manipulate the power mode.
|
|
@@ -138,6 +138,10 @@ export default class Screen implements IScreen {
|
|
|
138
138
|
* @deprecated Use `takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<{ screenshotUrl: string; aHash?: string }>` instead.
|
|
139
139
|
*/
|
|
140
140
|
takeAndUploadScreenshot(uploadBaseUrl: string): Promise<string>;
|
|
141
|
+
/**
|
|
142
|
+
* @deprecated Use `takeAndUploadScreenshot(uploadBaseUrl: string, options: TakeAndUploadScreenshotOptions): Promise<TakeAndUploadScreenshotResult>` instead.
|
|
143
|
+
*/
|
|
144
|
+
takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<TakeAndUploadScreenshotResult>;
|
|
141
145
|
/**
|
|
142
146
|
* The `takeAndUploadScreenshot()` method takes a screenshot and uploads it to a specified URL. This can be either a signageOS upload URL
|
|
143
147
|
* (`https://upload.signageos.io`) or a dedicated server URL for uploading screenshots. The format in which the screenshot is uploaded may be
|
|
@@ -152,10 +156,13 @@ export default class Screen implements IScreen {
|
|
|
152
156
|
* [support ticketing system](https://box.signageos.io/support/).
|
|
153
157
|
*
|
|
154
158
|
* @param uploadBaseUrl URL to which the screenshot will be uploaded. It can be either a signageOS upload URL or a custom server URL.
|
|
155
|
-
* @param
|
|
156
|
-
* @
|
|
159
|
+
* @param options Optional parameters for taking and uploading the screenshot.
|
|
160
|
+
* @param options.computeHash Whether to compute a hash of the screenshot and return it in the response.
|
|
161
|
+
* @param options.headers Additional headers to include in the upload request for POST requests.
|
|
162
|
+
* @return {Promise<TakeAndUploadScreenshotResult>} A promise that resolves to an object containing the screenshot URL and optionally a hash of the screenshot.
|
|
157
163
|
* @throws {Error} If `uploadBaseUrl` is not a valid URL
|
|
158
164
|
* @throws {Error} If `computeHash` is not a boolean
|
|
165
|
+
* @throws {Error} If `headers` is not a valid object
|
|
159
166
|
* @throws {Error} If the screenshot cannot be taken or uploaded.
|
|
160
167
|
* @since 3.0.0
|
|
161
168
|
*
|
|
@@ -167,10 +174,7 @@ export default class Screen implements IScreen {
|
|
|
167
174
|
* true,
|
|
168
175
|
* );
|
|
169
176
|
*/
|
|
170
|
-
takeAndUploadScreenshot(uploadBaseUrl: string,
|
|
171
|
-
screenshotUrl: string;
|
|
172
|
-
aHash?: string;
|
|
173
|
-
}>;
|
|
177
|
+
takeAndUploadScreenshot(uploadBaseUrl: string, options?: TakeAndUploadScreenshotOptions): Promise<TakeAndUploadScreenshotResult>;
|
|
174
178
|
/**
|
|
175
179
|
* The `powerOn()` method turns the screen on.
|
|
176
180
|
*
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const DeviceHelper_1 = require("../helpers/DeviceHelper");
|
|
7
7
|
const VideoHelper_1 = require("../helpers/VideoHelper");
|
|
8
8
|
const Validate_1 = __importDefault(require("../../Validate/Validate"));
|
|
9
|
+
const IScreen_1 = require("./IScreen");
|
|
9
10
|
/**
|
|
10
11
|
* The `sos.management.screen` API groups together methods for controlling the screen of the device. It allows for manipulating the screen
|
|
11
12
|
* resolution or orientation, set brightness, retrieve the current brightness of the display, and manipulate the power mode.
|
|
@@ -196,6 +197,7 @@ class Screen {
|
|
|
196
197
|
/** @internal */
|
|
197
198
|
async takeAndUploadScreenshot(...args) {
|
|
198
199
|
if (typeof args[0] === 'string' && typeof args[1] === 'undefined') {
|
|
200
|
+
// 1st implementation (deprecated) - takeAndUploadScreenshot(uploadBaseUrl: string): Promise<string>
|
|
199
201
|
const [uploadBaseUrl] = args;
|
|
200
202
|
(0, Validate_1.default)({ uploadBaseUrl }).required().uri();
|
|
201
203
|
const response = await this.postMessage({
|
|
@@ -210,7 +212,8 @@ class Screen {
|
|
|
210
212
|
return screenshotUrl;
|
|
211
213
|
}
|
|
212
214
|
}
|
|
213
|
-
else {
|
|
215
|
+
else if (typeof args[0] === 'string' && typeof args[1] === 'boolean') {
|
|
216
|
+
// 2nd implementation (deprecated) - takeAndUploadScreenshot(uploadBaseUrl: string, computeHash?: boolean): Promise<TakeAndUploadScreenshotResult>
|
|
214
217
|
const [uploadBaseUrl, computeHash] = args;
|
|
215
218
|
(0, Validate_1.default)({ uploadBaseUrl }).required().uri();
|
|
216
219
|
(0, Validate_1.default)({ computeHash }).boolean();
|
|
@@ -224,6 +227,24 @@ class Screen {
|
|
|
224
227
|
aHash,
|
|
225
228
|
};
|
|
226
229
|
}
|
|
230
|
+
else if (typeof args[0] === 'string' && typeof args[1] === 'object') {
|
|
231
|
+
// 3rd implementation - takeAndUploadScreenshot(uploadBaseUrl: string, options: TakeAndUploadScreenshotOptions): Promise<TakeAndUploadScreenshotResult>
|
|
232
|
+
const [uploadBaseUrl, options] = args;
|
|
233
|
+
(0, Validate_1.default)({ uploadBaseUrl }).required().uri();
|
|
234
|
+
if (options !== undefined) {
|
|
235
|
+
(0, Validate_1.default)({ options }).object(IScreen_1.VTakeAndUploadScreenshotOptions);
|
|
236
|
+
}
|
|
237
|
+
const { screenshotUrl, aHash } = await this.postMessage({
|
|
238
|
+
type: this.getMessage('upload_screenshot'),
|
|
239
|
+
uploadBaseUrl,
|
|
240
|
+
computeHash: options.computeHash,
|
|
241
|
+
headers: options.headers,
|
|
242
|
+
});
|
|
243
|
+
return {
|
|
244
|
+
screenshotUrl,
|
|
245
|
+
aHash,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
227
248
|
}
|
|
228
249
|
/**
|
|
229
250
|
* The `powerOn()` method turns the screen on.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Screen.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Screen/Screen.ts"],"names":[],"mappings":";;;;;AAGA,0DAAkE;AAClE,wDAAyE;AACzE,uEAA+C;
|
|
1
|
+
{"version":3,"file":"Screen.js","sourceRoot":"","sources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pB,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;SAC1C,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,WAAW;QACvB,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YACnD,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC;SAChD,CAAC,CAAC;QAEH,OAAO,gBAAgB,CAAC;IACzB,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,gBAAgB,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC;IAC7C,CAAC;IAEO,gBAAgB;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;CACD;AAjUD,yBAiUC"}
|
|
@@ -25,11 +25,29 @@ export interface IScannedDevice {
|
|
|
25
25
|
encrypted: boolean;
|
|
26
26
|
}
|
|
27
27
|
export type WifiEncryptionType = 'OPEN' | 'WEP' | 'WPA2' | 'WPA2_WPA_MIXED' | 'WPA3' | '802.1X_EAP';
|
|
28
|
+
export type EAPMethod = 'PEAP' | 'TLS' | 'TTLS';
|
|
29
|
+
export type EAPPhase2Auth = 'PAP' | 'MSCHAP' | 'MSCHAPV2' | 'GTC';
|
|
28
30
|
export interface IWifiConnectOptions {
|
|
29
31
|
hidden?: boolean;
|
|
30
32
|
securityType?: WifiEncryptionType;
|
|
33
|
+
eap?: {
|
|
34
|
+
method: EAPMethod;
|
|
35
|
+
identity: string;
|
|
36
|
+
anonymousIdentity?: string;
|
|
37
|
+
passphrase: string;
|
|
38
|
+
phase2Auth?: EAPPhase2Auth;
|
|
39
|
+
useCACert?: boolean;
|
|
40
|
+
};
|
|
31
41
|
}
|
|
32
42
|
export declare const VIWifiConnectOptions: {
|
|
33
43
|
hidden: string;
|
|
34
44
|
securityType: string;
|
|
45
|
+
eap: {
|
|
46
|
+
method: string;
|
|
47
|
+
identity: string;
|
|
48
|
+
anonymousIdentity: string;
|
|
49
|
+
passphrase: string;
|
|
50
|
+
phase2Auth: string;
|
|
51
|
+
useCACert: string;
|
|
52
|
+
};
|
|
35
53
|
};
|
|
@@ -4,5 +4,13 @@ exports.VIWifiConnectOptions = void 0;
|
|
|
4
4
|
exports.VIWifiConnectOptions = {
|
|
5
5
|
hidden: '?boolean',
|
|
6
6
|
securityType: '?string',
|
|
7
|
+
eap: {
|
|
8
|
+
method: 'string',
|
|
9
|
+
identity: 'string',
|
|
10
|
+
anonymousIdentity: '?string',
|
|
11
|
+
passphrase: 'string',
|
|
12
|
+
phase2Auth: '?string',
|
|
13
|
+
useCACert: '?boolean',
|
|
14
|
+
},
|
|
7
15
|
};
|
|
8
16
|
//# sourceMappingURL=IWifi.js.map
|