@signageos/front-applet 8.2.0 → 8.2.2
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 +5 -5
- package/dist/bundle.js.map +1 -1
- package/docs/index.md +9 -9
- package/docs/sos/browser.md +11 -3
- package/docs/sos/deviceInfo.md +1 -1
- package/docs/sos/display.md +13 -20
- package/docs/sos/fileSystem.md +31 -6
- package/docs/sos/hardware/barcodeScanner.md +9 -0
- package/docs/sos/hardware/index.md +9 -0
- package/docs/sos/native/mdc.md +8 -3
- package/docs/sos/osd.md +9 -0
- package/docs/sos/video.md +9 -0
- package/docs/sos_management/app.md +97 -18
- package/docs/sos_management/audio.md +43 -2
- package/docs/sos_management/autoRecovery.md +101 -0
- package/docs/sos_management/debug.md +84 -1
- package/docs/sos_management/firmware.md +64 -1
- package/docs/sos_management/index.md +217 -19
- package/docs/sos_management/network.md +84 -29
- package/docs/sos_management/os.md +59 -4
- package/docs/sos_management/package.md +25 -3
- package/docs/sos_management/power.md +142 -18
- package/docs/sos_management/proxy.md +54 -3
- package/docs/sos_management/remoteControl.md +55 -4
- package/docs/sos_management/screen.md +140 -29
- package/docs/sos_management/security.md +48 -5
- package/docs/sos_management/time.md +76 -9
- package/docs/sos_management/wifi.md +207 -45
- package/es6/FrontApplet/Browser/Browser.d.ts +11 -3
- package/es6/FrontApplet/Browser/Browser.js +11 -3
- package/es6/FrontApplet/Browser/Browser.js.map +1 -1
- package/es6/FrontApplet/Command/Command.js +1 -0
- package/es6/FrontApplet/Command/Command.js.map +1 -1
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +1 -1
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +15 -5
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
- package/es6/FrontApplet/DeviceInfo/IDeviceInfo.d.ts +1 -1
- package/es6/FrontApplet/Display/Display.d.ts +14 -19
- package/es6/FrontApplet/Display/Display.js +14 -19
- package/es6/FrontApplet/Display/Display.js.map +1 -1
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +27 -5
- package/es6/FrontApplet/FileSystem/FileSystem.js +27 -5
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +9 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +9 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
- package/es6/FrontApplet/Hardware/Hardware.d.ts +9 -0
- package/es6/FrontApplet/Hardware/Hardware.js +9 -0
- package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
- package/es6/FrontApplet/Management/App/App.d.ts +53 -17
- package/es6/FrontApplet/Management/App/App.js +23 -12
- package/es6/FrontApplet/Management/App/App.js.map +1 -1
- package/es6/FrontApplet/Management/App/IApp.d.ts +3 -0
- package/es6/FrontApplet/Management/Audio/Audio.d.ts +24 -3
- package/es6/FrontApplet/Management/Audio/Audio.js +24 -3
- package/es6/FrontApplet/Management/Audio/Audio.js.map +1 -1
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.d.ts +49 -3
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js +49 -3
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/Debug/Debug.d.ts +44 -2
- package/es6/FrontApplet/Management/Debug/Debug.js +43 -1
- package/es6/FrontApplet/Management/Debug/Debug.js.map +1 -1
- package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +41 -4
- package/es6/FrontApplet/Management/Firmware/Firmware.js +33 -0
- package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
- package/es6/FrontApplet/Management/Management.d.ts +119 -21
- package/es6/FrontApplet/Management/Management.js +119 -22
- package/es6/FrontApplet/Management/Management.js.map +1 -1
- package/es6/FrontApplet/Management/Network/Network.d.ts +44 -25
- package/es6/FrontApplet/Management/Network/Network.js +28 -14
- package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
- package/es6/FrontApplet/Management/OS/IOS.d.ts +3 -0
- package/es6/FrontApplet/Management/OS/OS.d.ts +32 -4
- package/es6/FrontApplet/Management/OS/OS.js +32 -4
- package/es6/FrontApplet/Management/OS/OS.js.map +1 -1
- package/es6/FrontApplet/Management/Package/Package.d.ts +18 -3
- package/es6/FrontApplet/Management/Package/Package.js +18 -4
- package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
- package/es6/FrontApplet/Management/Power/IPower.d.ts +3 -0
- package/es6/FrontApplet/Management/Power/IPower.js.map +1 -1
- package/es6/FrontApplet/Management/Power/Power.d.ts +67 -20
- package/es6/FrontApplet/Management/Power/Power.js +70 -24
- package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
- package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +28 -3
- package/es6/FrontApplet/Management/Proxy/Proxy.js +28 -3
- package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +23 -5
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +23 -5
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
- package/es6/FrontApplet/Management/Screen/Screen.d.ts +77 -32
- package/es6/FrontApplet/Management/Screen/Screen.js +65 -26
- package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
- package/es6/FrontApplet/Management/Security/Security.d.ts +25 -7
- package/es6/FrontApplet/Management/Security/Security.js +25 -7
- package/es6/FrontApplet/Management/Security/Security.js.map +1 -1
- package/es6/FrontApplet/Management/Time/Time.d.ts +47 -11
- package/es6/FrontApplet/Management/Time/Time.js +29 -7
- package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/IWifi.d.ts +3 -0
- package/es6/FrontApplet/Management/Wifi/IWifi.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +137 -42
- package/es6/FrontApplet/Management/Wifi/Wifi.js +137 -42
- package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +8 -3
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +8 -3
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
- package/es6/FrontApplet/OSD/OSD.d.ts +9 -0
- package/es6/FrontApplet/OSD/OSD.js +9 -0
- package/es6/FrontApplet/OSD/OSD.js.map +1 -1
- package/es6/FrontApplet/Video/Video.d.ts +9 -0
- package/es6/FrontApplet/Video/Video.js +9 -0
- package/es6/FrontApplet/Video/Video.js.map +1 -1
- package/es6/Monitoring/DeviceInfo/deviceInfoCommands.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7,10 +7,22 @@ const TimerHelper_1 = require("../helpers/TimerHelper");
|
|
|
7
7
|
const Validate_1 = __importDefault(require("../../Validate/Validate"));
|
|
8
8
|
const IPower_1 = require("./IPower");
|
|
9
9
|
const PowerHelper_1 = require("./PowerHelper");
|
|
10
|
-
// TODO: maybe a better description
|
|
11
10
|
/**
|
|
12
11
|
* The `sos.management.power` API groups together methods related to the power state of the device. Such as rebooting, shutting down,
|
|
13
12
|
* setting timers.
|
|
13
|
+
*
|
|
14
|
+
* <details>
|
|
15
|
+
* <summary>Power Management Capabilities</summary>
|
|
16
|
+
* | Capability | Description |
|
|
17
|
+
* |:------------|:-------------|
|
|
18
|
+
* | `SYSTEM_REBOOT` | If device supports system reboot power action |
|
|
19
|
+
* | `APP_RESTART` | If device supports app restart power action |
|
|
20
|
+
* | `TIMERS_PROPRIETARY` | If device supports proprietary timers |
|
|
21
|
+
* | `TIMERS_NATIVE` | If device supports native timers |
|
|
22
|
+
* | `SCHEDULE_POWER_ACTION` | If device supports scheduled power actions |
|
|
23
|
+
*
|
|
24
|
+
* If you want to check if the device supports those capabilities, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
|
|
25
|
+
* </details>
|
|
14
26
|
*/
|
|
15
27
|
class Power {
|
|
16
28
|
messagePrefix;
|
|
@@ -23,8 +35,11 @@ class Power {
|
|
|
23
35
|
/**
|
|
24
36
|
* The `systemReboot()` method initializes a system reboot.
|
|
25
37
|
*
|
|
38
|
+
* @returns {Promise<void>} Resolves when the system reboot is initiated.
|
|
26
39
|
* @since 3.0.0
|
|
27
40
|
*
|
|
41
|
+
* @example // {@link https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/system-reboot | Applet Example for System Reboot}
|
|
42
|
+
*
|
|
28
43
|
* @example
|
|
29
44
|
* await sos.management.power.systemReboot();
|
|
30
45
|
*/
|
|
@@ -36,6 +51,7 @@ class Power {
|
|
|
36
51
|
/**
|
|
37
52
|
* The `appRestart()` method initializes a restart of the signageOS app.
|
|
38
53
|
*
|
|
54
|
+
* @returns {Promise<void>} Resolves when the app restart is initiated.
|
|
39
55
|
* @since 3.0.0
|
|
40
56
|
*
|
|
41
57
|
* @example
|
|
@@ -49,10 +65,11 @@ class Power {
|
|
|
49
65
|
/**
|
|
50
66
|
* The `getTimers()` method returns a list of currently set native timers.
|
|
51
67
|
*
|
|
68
|
+
* @returns {Promise<ITimer[]>} Resolves with an array of timers.
|
|
52
69
|
* @since 4.0.0
|
|
53
70
|
*
|
|
54
71
|
* @example
|
|
55
|
-
*
|
|
72
|
+
* await sos.management.power.getTimers();
|
|
56
73
|
*/
|
|
57
74
|
async getTimers() {
|
|
58
75
|
const { timers } = await this.postMessage({
|
|
@@ -61,18 +78,27 @@ class Power {
|
|
|
61
78
|
return timers;
|
|
62
79
|
}
|
|
63
80
|
/**
|
|
64
|
-
* The `
|
|
81
|
+
* The `setTimer()` method creates or updates a native timer.
|
|
65
82
|
*
|
|
66
83
|
* @param type The type of the timer (`TIMER_1`, ..., `TIMER_7`).
|
|
67
84
|
* @param timeOn The time when the device should turn on.
|
|
68
85
|
* @param timeOff The time when the device should turn off.
|
|
69
86
|
* @param weekdays The days of the week when the timer should be active (`mon`, ..., `sun`).
|
|
70
87
|
* @param volume The volume level set when the device is turned on.
|
|
71
|
-
*
|
|
88
|
+
* @return {Promise<void>} Resolves when the timer is set.
|
|
89
|
+
* @throws {Error} If the timer type is invalid.
|
|
90
|
+
* @throws {Error} If the time format is incorrect.
|
|
91
|
+
* @throws {Error} If the weekdays array contains an invalid weekday.
|
|
92
|
+
* @throws {Error} If the `volume` parameter is not a number between 0 and 100.
|
|
93
|
+
* @throws {Error} If the `timeOn` or `timeOff` parameters do not match the expected time format (`HH:mm:ss`).
|
|
94
|
+
* @throws {Error} If the `weekdays` parameter is not an array of strings.
|
|
95
|
+
* @throws {Error} If the `type` parameter is not a valid timer type (e.g., `TIMER_1`, `TIMER_2`, ..., `TIMER_7`).
|
|
72
96
|
* @since 3.0.0
|
|
73
97
|
*
|
|
98
|
+
* @example // {@link https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/timer | Applet Example for Native Timers}
|
|
99
|
+
*
|
|
74
100
|
* @example
|
|
75
|
-
* await sos.management.power.setTimer("TIMER_1", "08:00", "22:00", ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], 30);
|
|
101
|
+
* await sos.management.power.setTimer("TIMER_1", "08:00:00", "22:00:00", ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], 30);
|
|
76
102
|
*/
|
|
77
103
|
async setTimer(type, timeOn, timeOff, weekdays, volume) {
|
|
78
104
|
if (typeof TimerHelper_1.TimerType[type] === 'undefined') {
|
|
@@ -110,7 +136,8 @@ class Power {
|
|
|
110
136
|
* The `unsetTimer()` method removes the specified native timer.
|
|
111
137
|
*
|
|
112
138
|
* @param type The type of the timer (`TIMER_1`, ..., `TIMER_7`).
|
|
113
|
-
*
|
|
139
|
+
* @returns {Promise<void>} Resolves when the timer is removed.
|
|
140
|
+
* @throws {Error} If the timer type is invalid.
|
|
114
141
|
* @since 4.0.0
|
|
115
142
|
*
|
|
116
143
|
* @example
|
|
@@ -126,6 +153,8 @@ class Power {
|
|
|
126
153
|
* The `getProprietaryTimers()` method returns a list of currently set
|
|
127
154
|
* [proprietary timers](https://docs.signageos.io/hc/en-us/articles/4416384202642-Timers#h_01HCD14GEDP96AZV58NRSN2HNQ).
|
|
128
155
|
*
|
|
156
|
+
* @returns {Promise<IProprietaryTimer[]>} Resolves with an array of proprietary timers.
|
|
157
|
+
* @throws {Error} If the timers cannot be retrieved.
|
|
129
158
|
* @since 5.10.0
|
|
130
159
|
*
|
|
131
160
|
* @example
|
|
@@ -146,11 +175,19 @@ class Power {
|
|
|
146
175
|
* @param timeOff The time when the device should turn off.
|
|
147
176
|
* @param weekdays The days of the week when the timer should be active (`mon`, ..., `sun`).
|
|
148
177
|
* @param keepAppletRunning If `true`, the applet will be kept running when the timer is active on certain devices.
|
|
149
|
-
*
|
|
178
|
+
* @return {Promise<void>} Resolves when the proprietary timer is set.
|
|
179
|
+
* @throws {Error} If the timer type is invalid or if the time format is incorrect.
|
|
180
|
+
* @throws {Error} If the weekdays array contains an invalid weekday.
|
|
181
|
+
* @throws {Error} If the `keepAppletRunning` parameter is not a boolean.
|
|
182
|
+
* @throws {Error} If the `timeOn` or `timeOff` parameters do not match the expected time format (`HH:mm:ss`).
|
|
183
|
+
* @throws {Error} If the `weekdays` parameter is not an array of strings.
|
|
184
|
+
* @throws {Error} If the `weekdays` array contains an invalid weekday.
|
|
185
|
+
* @throws {Error} If the `timeOn` or `timeOff` parameters do not match the expected time format (`HH:mm:ss`).
|
|
186
|
+
* @throws {Error} If the `type` parameter is not a valid timer type (e.g., `TIMER_1`, `TIMER_2`, ..., `TIMER_7`).
|
|
150
187
|
* @since 5.10.0
|
|
151
188
|
*
|
|
152
189
|
* @example
|
|
153
|
-
* await sos.management.power.setProprietaryTimer("
|
|
190
|
+
* await sos.management.power.setProprietaryTimer("TIMER_2", "08:00:00", "22:00:00", ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], false);
|
|
154
191
|
*/
|
|
155
192
|
async setProprietaryTimer(type, timeOn, timeOff, weekdays, keepAppletRunning = false) {
|
|
156
193
|
(0, Validate_1.default)({ type })
|
|
@@ -190,7 +227,8 @@ class Power {
|
|
|
190
227
|
* [proprietary timer](https://docs.signageos.io/hc/en-us/articles/4416384202642-Timers#h_01HCD14GEDP96AZV58NRSN2HNQ).
|
|
191
228
|
*
|
|
192
229
|
* @param type The type of the timer (`TIMER_1`, ..., `TIMER_7`).
|
|
193
|
-
*
|
|
230
|
+
* @returns {Promise<void>} Resolves when the proprietary timer is removed.
|
|
231
|
+
* @throws {Error} If the timer type is invalid.
|
|
194
232
|
* @since 5.10.0
|
|
195
233
|
*
|
|
196
234
|
* @example
|
|
@@ -204,7 +242,7 @@ class Power {
|
|
|
204
242
|
});
|
|
205
243
|
}
|
|
206
244
|
catch (error) {
|
|
207
|
-
// Use failover method if delete fails
|
|
245
|
+
// Use the failover method if the delete fails, which is supported in older front-display versions
|
|
208
246
|
// It can be removed in some front-applet major version
|
|
209
247
|
await this.setProprietaryTimer(type, null, null, []);
|
|
210
248
|
}
|
|
@@ -212,6 +250,7 @@ class Power {
|
|
|
212
250
|
/**
|
|
213
251
|
* Removes all scheduled reboot rules from the device.
|
|
214
252
|
*
|
|
253
|
+
* @returns {Promise<void>} Resolves when all scheduled reboots are cleared.
|
|
215
254
|
* @since 8.1.0
|
|
216
255
|
*
|
|
217
256
|
* @example
|
|
@@ -223,8 +262,9 @@ class Power {
|
|
|
223
262
|
});
|
|
224
263
|
}
|
|
225
264
|
/**
|
|
226
|
-
* Returns all scheduled reboot rules on the device.
|
|
265
|
+
* Returns all scheduled reboot rules on the device set by the `setScheduledReboot()` method.
|
|
227
266
|
*
|
|
267
|
+
* @returns {Promise<IScheduledRebootActions[]>} Resolves with an array of scheduled reboot actions.
|
|
228
268
|
* @since 8.1.0
|
|
229
269
|
*
|
|
230
270
|
* @example
|
|
@@ -234,7 +274,7 @@ class Power {
|
|
|
234
274
|
const { actions } = await this.postMessage({
|
|
235
275
|
type: this.getMessage('get_scheduled_reboots'),
|
|
236
276
|
});
|
|
237
|
-
// We need to convert values of days back to string representation
|
|
277
|
+
// We need to convert the values of days back to a string representation
|
|
238
278
|
for (const action of actions) {
|
|
239
279
|
action.rule.weekdays = action.rule.weekdays.map((weekday) => {
|
|
240
280
|
return (0, PowerHelper_1.convertNumberToWeekday)(weekday); // Can be only number from device
|
|
@@ -243,16 +283,17 @@ class Power {
|
|
|
243
283
|
return actions;
|
|
244
284
|
}
|
|
245
285
|
/**
|
|
246
|
-
* Removes scheduled reboot rule from the device.
|
|
247
|
-
* @param id {string}
|
|
248
|
-
*
|
|
286
|
+
* Removes scheduled reboot rule from the device (if it exists).
|
|
287
|
+
* @param id {string} ID of the rule to be removed.
|
|
288
|
+
* @throws {Error} If the `id` is not a string or is empty.
|
|
289
|
+
* @returns {Promise<void>} Resolves when the scheduled reboot is removed.
|
|
249
290
|
* @since 8.1.0
|
|
250
291
|
*
|
|
251
292
|
* @example
|
|
252
293
|
* // Get scheduled reboots
|
|
253
294
|
* const scheduledReboots = await sos.management.power.getScheduledReboots();
|
|
254
295
|
*
|
|
255
|
-
* // Remove scheduled reboot
|
|
296
|
+
* // Remove scheduled reboot on the first position
|
|
256
297
|
* await sos.management.power.removeScheduledReboot(scheduledReboots[0].id);
|
|
257
298
|
*/
|
|
258
299
|
async removeScheduledReboot(id) {
|
|
@@ -263,17 +304,22 @@ class Power {
|
|
|
263
304
|
});
|
|
264
305
|
}
|
|
265
306
|
/**
|
|
266
|
-
* Schedule automatic reboot on the device. Calling this function will create one rule.
|
|
267
|
-
* It is possible to set multiple rules, which can be later obtained by `getScheduledReboots` function.
|
|
307
|
+
* Schedule an automatic reboot on the device. Calling this function will create one rule.
|
|
308
|
+
* It is possible to set multiple rules, which can be later obtained by the `getScheduledReboots` function.
|
|
268
309
|
*
|
|
269
310
|
* :::note
|
|
270
|
-
* - Setting new scheduled reboot on device might take up to 10 minutes to show in Box.
|
|
271
|
-
* - Every new scheduled reboot rule gets unique identifier generated by device,
|
|
311
|
+
* - Setting a new scheduled reboot on the device might take up to 10 minutes to show in the Box.
|
|
312
|
+
* - Every new scheduled reboot rule gets a unique identifier generated by the device, which might be later returned by `getScheduledReboots()`.
|
|
272
313
|
* :::
|
|
273
314
|
*
|
|
274
|
-
* @param weekdays {@link WeekdayType[]}
|
|
275
|
-
* @param time {string}
|
|
276
|
-
*
|
|
315
|
+
* @param weekdays {@link WeekdayType[]} Array of weekdays when the reboot should be executed.
|
|
316
|
+
* @param time {string} Time when the reboot should be executed. Format is `HH:mm:ss`.
|
|
317
|
+
* @throws {Error} If the `weekdays` parameter is not an array of strings.
|
|
318
|
+
* @throws {Error} If the `time` parameter does not match the expected time format (`HH:mm:ss`).
|
|
319
|
+
* @throws {Error} If the `weekdays` array contains an invalid weekday.
|
|
320
|
+
* @throws {Error} If the `time` parameter is not a string or does not match the expected format (`HH:mm:ss`).
|
|
321
|
+
* @throws {Error} If the `weekdays` array is empty or contains invalid values.
|
|
322
|
+
* @returns {Promise<void>} Resolves when the scheduled reboot is set.
|
|
277
323
|
* @since 8.1.0
|
|
278
324
|
*
|
|
279
325
|
* @example
|
|
@@ -291,7 +337,7 @@ class Power {
|
|
|
291
337
|
throw new Error('Invalid weekday');
|
|
292
338
|
}
|
|
293
339
|
}
|
|
294
|
-
// Days in week
|
|
340
|
+
// Days in week need to be converted to specific numbers to work properly
|
|
295
341
|
const weekdayAsNumbers = weekdays.map(PowerHelper_1.convertWeekdayToNumber);
|
|
296
342
|
(0, Validate_1.default)({ time })
|
|
297
343
|
.required()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Power.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Power/Power.ts"],"names":[],"mappings":";;;;;AACA,wDAAyE;AACzE,uEAA+C;AAE/C,qCAA4G;AAC5G,+CAA+E;AAE/E
|
|
1
|
+
{"version":3,"file":"Power.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Power/Power.ts"],"names":[],"mappings":";;;;;AACA,wDAAyE;AACz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together methods for managing the proxy settings on the device.
|
|
5
|
+
*
|
|
6
|
+
* <details>
|
|
7
|
+
* <summary>Proxy Management Capabilities</summary>
|
|
8
|
+
* | Capability | Description |
|
|
9
|
+
* |:------------|:-------------|
|
|
10
|
+
* | `PROXY` | If device supports Proxy setup connection |
|
|
11
|
+
*
|
|
12
|
+
* If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
|
|
13
|
+
* </details>
|
|
14
|
+
*/
|
|
3
15
|
export default class Proxy implements IProxy {
|
|
4
16
|
private messagePrefix;
|
|
5
17
|
private postMessage;
|
|
@@ -8,24 +20,35 @@ export default class Proxy implements IProxy {
|
|
|
8
20
|
/**
|
|
9
21
|
* The `isEnabled()` method returns whether the proxy is enabled on the device.
|
|
10
22
|
*
|
|
23
|
+
* @returns {Promise<boolean>} A promise that resolves to a boolean indicating if the proxy is enabled.
|
|
11
24
|
* @since 5.4.0
|
|
12
25
|
*
|
|
13
26
|
* @example
|
|
14
27
|
* const enabled = await sos.management.proxy.isEnabled();
|
|
28
|
+
* console.log(`Proxy is enabled: ${enabled}`);
|
|
15
29
|
*/
|
|
16
30
|
isEnabled(): Promise<boolean>;
|
|
17
31
|
/**
|
|
18
|
-
* The `setManual()`
|
|
32
|
+
* The `setManual()` allows you to manually configure the proxy settings on the device.
|
|
19
33
|
*
|
|
34
|
+
* @param uri The URI of the proxy server
|
|
35
|
+
* @param port The port of the proxy server
|
|
36
|
+
* @param username The username for the proxy server
|
|
37
|
+
* @param password The password for the proxy server
|
|
38
|
+
* @return {Promise<void>} A promise that resolves when the proxy is set.
|
|
39
|
+
* @throws {Error} If the proxy settings are invalid.
|
|
40
|
+
* @throws {Error} If the device does not support proxy management.
|
|
20
41
|
* @since 5.4.0
|
|
21
42
|
*
|
|
22
43
|
* @example
|
|
23
|
-
*
|
|
44
|
+
* await sos.management.proxy.setManual('178.62.193.192', 1080, 'username', 'password');
|
|
24
45
|
*/
|
|
25
46
|
setManual(uri: string, port: number, username?: string, password?: string): Promise<void>;
|
|
26
47
|
/**
|
|
27
48
|
* The `disable()` method disables the proxy on the device.
|
|
28
49
|
*
|
|
50
|
+
* @returns {Promise<void>} A promise that resolves when the proxy is disabled.
|
|
51
|
+
* @throws {Error} If the device does not support proxy management.
|
|
29
52
|
* @since 5.4.0
|
|
30
53
|
*
|
|
31
54
|
* @example
|
|
@@ -33,8 +56,10 @@ export default class Proxy implements IProxy {
|
|
|
33
56
|
*/
|
|
34
57
|
disable(): Promise<void>;
|
|
35
58
|
/**
|
|
36
|
-
* The `getConnectedTo()`
|
|
59
|
+
* The `getConnectedTo()` method returns the current connected proxy server URI on the device.
|
|
37
60
|
*
|
|
61
|
+
* @returns {Promise<string>} A promise that resolves to the URI of the connected proxy server.
|
|
62
|
+
* @throws {Error} If the device does not support proxy management.
|
|
38
63
|
* @since 5.4.0
|
|
39
64
|
*
|
|
40
65
|
* @example
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* The `sos.management.proxy` API groups together methods for managing the proxy settings on the device.
|
|
5
|
+
*
|
|
6
|
+
* <details>
|
|
7
|
+
* <summary>Proxy Management Capabilities</summary>
|
|
8
|
+
* | Capability | Description |
|
|
9
|
+
* |:------------|:-------------|
|
|
10
|
+
* | `PROXY` | If device supports Proxy setup connection |
|
|
11
|
+
*
|
|
12
|
+
* If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
|
|
13
|
+
* </details>
|
|
14
|
+
*/
|
|
3
15
|
class Proxy {
|
|
4
16
|
messagePrefix;
|
|
5
17
|
postMessage;
|
|
@@ -11,10 +23,12 @@ class Proxy {
|
|
|
11
23
|
/**
|
|
12
24
|
* The `isEnabled()` method returns whether the proxy is enabled on the device.
|
|
13
25
|
*
|
|
26
|
+
* @returns {Promise<boolean>} A promise that resolves to a boolean indicating if the proxy is enabled.
|
|
14
27
|
* @since 5.4.0
|
|
15
28
|
*
|
|
16
29
|
* @example
|
|
17
30
|
* const enabled = await sos.management.proxy.isEnabled();
|
|
31
|
+
* console.log(`Proxy is enabled: ${enabled}`);
|
|
18
32
|
*/
|
|
19
33
|
async isEnabled() {
|
|
20
34
|
const { isEnabled } = await this.postMessage({
|
|
@@ -23,12 +37,19 @@ class Proxy {
|
|
|
23
37
|
return isEnabled;
|
|
24
38
|
}
|
|
25
39
|
/**
|
|
26
|
-
* The `setManual()`
|
|
40
|
+
* The `setManual()` allows you to manually configure the proxy settings on the device.
|
|
27
41
|
*
|
|
42
|
+
* @param uri The URI of the proxy server
|
|
43
|
+
* @param port The port of the proxy server
|
|
44
|
+
* @param username The username for the proxy server
|
|
45
|
+
* @param password The password for the proxy server
|
|
46
|
+
* @return {Promise<void>} A promise that resolves when the proxy is set.
|
|
47
|
+
* @throws {Error} If the proxy settings are invalid.
|
|
48
|
+
* @throws {Error} If the device does not support proxy management.
|
|
28
49
|
* @since 5.4.0
|
|
29
50
|
*
|
|
30
51
|
* @example
|
|
31
|
-
*
|
|
52
|
+
* await sos.management.proxy.setManual('178.62.193.192', 1080, 'username', 'password');
|
|
32
53
|
*/
|
|
33
54
|
async setManual(uri, port, username, password) {
|
|
34
55
|
await this.postMessage({
|
|
@@ -42,6 +63,8 @@ class Proxy {
|
|
|
42
63
|
/**
|
|
43
64
|
* The `disable()` method disables the proxy on the device.
|
|
44
65
|
*
|
|
66
|
+
* @returns {Promise<void>} A promise that resolves when the proxy is disabled.
|
|
67
|
+
* @throws {Error} If the device does not support proxy management.
|
|
45
68
|
* @since 5.4.0
|
|
46
69
|
*
|
|
47
70
|
* @example
|
|
@@ -53,8 +76,10 @@ class Proxy {
|
|
|
53
76
|
});
|
|
54
77
|
}
|
|
55
78
|
/**
|
|
56
|
-
* The `getConnectedTo()`
|
|
79
|
+
* The `getConnectedTo()` method returns the current connected proxy server URI on the device.
|
|
57
80
|
*
|
|
81
|
+
* @returns {Promise<string>} A promise that resolves to the URI of the connected proxy server.
|
|
82
|
+
* @throws {Error} If the device does not support proxy management.
|
|
58
83
|
* @since 5.4.0
|
|
59
84
|
*
|
|
60
85
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Proxy.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Proxy/Proxy.ts"],"names":[],"mappings":";;AAGA,MAAqB,KAAK;IAGhB;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ
|
|
1
|
+
{"version":3,"file":"Proxy.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/Proxy/Proxy.ts"],"names":[],"mappings":";;AAGA;;;;;;;;;;;GAWG;AACH,MAAqB,KAAK;IAGhB;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;;;;;;OASG;IACI,KAAK,CAAC,SAAS;QACrB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YAC5C,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;SACzC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,KAAK,CAAC,SAAS,CAAC,GAAW,EAAE,IAAY,EAAE,QAAiB,EAAE,QAAiB;QACrF,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;YACzC,GAAG;YACH,IAAI;YACJ,QAAQ;YACR,QAAQ;SACR,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,OAAO;QACnB,MAAM,IAAI,CAAC,WAAW,CAAC;YACtB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;SACtC,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;;;;;OAUG;IACI,KAAK,CAAC,cAAc;QAC1B,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YAC9C,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;SAC/C,CAAC,CAAC;QACH,OAAO,WAAW,CAAC;IACpB,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;IACxC,CAAC;CACD;AAvFD,wBAuFC"}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import IPostMessage from '../../IPostMessage';
|
|
2
2
|
import IRemoteControl from './IRemoteControl';
|
|
3
3
|
/**
|
|
4
|
-
* The `sos.management.remoteControl` groups together methods for enabling or disabling control of the device using IR remote controller (TV controller).
|
|
4
|
+
* The `sos.management.remoteControl` groups together methods for enabling or disabling control of the device using an IR remote controller (TV controller).
|
|
5
|
+
*
|
|
6
|
+
* <details>
|
|
7
|
+
* <summary>Remote Control Management Capabilities</summary>
|
|
8
|
+
* | Capability | Description |
|
|
9
|
+
* |:------------|:-------------|
|
|
10
|
+
* | `SET_REMOTE_CONTROL_ENABLED` | If device supports setting remote control |
|
|
11
|
+
*
|
|
12
|
+
* If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
|
|
13
|
+
* </details>
|
|
5
14
|
*/
|
|
6
15
|
export default class RemoteControl implements IRemoteControl {
|
|
7
16
|
private messagePrefix;
|
|
@@ -12,14 +21,13 @@ export default class RemoteControl implements IRemoteControl {
|
|
|
12
21
|
* The `enable()` method enables remote control.
|
|
13
22
|
*
|
|
14
23
|
* :::warning
|
|
15
|
-
*
|
|
16
|
-
* **Android:** In order to prevent Android from displaying Android homepage and thus not showing your content, you
|
|
24
|
+
* **Android:** To prevent Android from displaying the Android homepage and thus not showing your content, you
|
|
17
25
|
* must Enable Kiosk Mode (or Lock Remote Control) either through Box device settings or through API.
|
|
18
26
|
*
|
|
19
27
|
* Always set the Remote Control Lock to `enable` after the deployment.
|
|
20
|
-
*
|
|
21
28
|
* :::
|
|
22
|
-
*
|
|
29
|
+
* @returns {Promise<void>} A promise that resolves when the remote control is successfully enabled.
|
|
30
|
+
* @throws {Error} If the device does not support remote control management.
|
|
23
31
|
* @since 3.0.0
|
|
24
32
|
*
|
|
25
33
|
* @example
|
|
@@ -29,6 +37,8 @@ export default class RemoteControl implements IRemoteControl {
|
|
|
29
37
|
/**
|
|
30
38
|
* The `disable()` method disables remote control.
|
|
31
39
|
*
|
|
40
|
+
* @retuns {Promise<void>} A promise that resolves when the remote control is successfully disabled.
|
|
41
|
+
* @throws {Error} If the device does not support remote control management.
|
|
32
42
|
* @since 3.0.0
|
|
33
43
|
*
|
|
34
44
|
* @example
|
|
@@ -38,6 +48,8 @@ export default class RemoteControl implements IRemoteControl {
|
|
|
38
48
|
/**
|
|
39
49
|
* The `isEnabled()` method returns whether the remote control is enabled.
|
|
40
50
|
*
|
|
51
|
+
* @returns {Promise<boolean>} A promise that resolves to `true` if remote control is enabled, otherwise `false`.
|
|
52
|
+
* @throws {Error} If the device does not support remote control management.
|
|
41
53
|
* @since 4.0.0
|
|
42
54
|
*
|
|
43
55
|
* @example
|
|
@@ -47,6 +59,8 @@ export default class RemoteControl implements IRemoteControl {
|
|
|
47
59
|
/**
|
|
48
60
|
* The `lock()` method is an alias for the `disable()` method.
|
|
49
61
|
*
|
|
62
|
+
* @returns {Promise<void>} A promise that resolves when the remote control is successfully locked (disabled).
|
|
63
|
+
* @throws {Error} If the device does not support remote control management.
|
|
50
64
|
* @since 4.0.0
|
|
51
65
|
*
|
|
52
66
|
* @example
|
|
@@ -56,6 +70,8 @@ export default class RemoteControl implements IRemoteControl {
|
|
|
56
70
|
/**
|
|
57
71
|
* The `unlock()` method is an alias for the `enable()` method.
|
|
58
72
|
*
|
|
73
|
+
* @returns {Promise<void>} A promise that resolves when the remote control is successfully unlocked (enabled).
|
|
74
|
+
* @throws {Error} If the device does not support remote control management.
|
|
59
75
|
* @since 4.0.0
|
|
60
76
|
*
|
|
61
77
|
* @example
|
|
@@ -65,6 +81,8 @@ export default class RemoteControl implements IRemoteControl {
|
|
|
65
81
|
/**
|
|
66
82
|
* The `isLocked()` method returns whether the remote control is locked (disabled).
|
|
67
83
|
*
|
|
84
|
+
* @returns {Promise<boolean>} A promise that resolves to `true` if the remote control is locked (disabled), otherwise `false`.
|
|
85
|
+
* @throws {Error} If the device does not support remote control management.
|
|
68
86
|
* @since 4.0.0
|
|
69
87
|
*
|
|
70
88
|
* @example
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
/**
|
|
4
|
-
* The `sos.management.remoteControl` groups together methods for enabling or disabling control of the device using IR remote controller (TV controller).
|
|
4
|
+
* The `sos.management.remoteControl` groups together methods for enabling or disabling control of the device using an IR remote controller (TV controller).
|
|
5
|
+
*
|
|
6
|
+
* <details>
|
|
7
|
+
* <summary>Remote Control Management Capabilities</summary>
|
|
8
|
+
* | Capability | Description |
|
|
9
|
+
* |:------------|:-------------|
|
|
10
|
+
* | `SET_REMOTE_CONTROL_ENABLED` | If device supports setting remote control |
|
|
11
|
+
*
|
|
12
|
+
* If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
|
|
13
|
+
* </details>
|
|
5
14
|
*/
|
|
6
15
|
class RemoteControl {
|
|
7
16
|
messagePrefix;
|
|
@@ -15,14 +24,13 @@ class RemoteControl {
|
|
|
15
24
|
* The `enable()` method enables remote control.
|
|
16
25
|
*
|
|
17
26
|
* :::warning
|
|
18
|
-
*
|
|
19
|
-
* **Android:** In order to prevent Android from displaying Android homepage and thus not showing your content, you
|
|
27
|
+
* **Android:** To prevent Android from displaying the Android homepage and thus not showing your content, you
|
|
20
28
|
* must Enable Kiosk Mode (or Lock Remote Control) either through Box device settings or through API.
|
|
21
29
|
*
|
|
22
30
|
* Always set the Remote Control Lock to `enable` after the deployment.
|
|
23
|
-
*
|
|
24
31
|
* :::
|
|
25
|
-
*
|
|
32
|
+
* @returns {Promise<void>} A promise that resolves when the remote control is successfully enabled.
|
|
33
|
+
* @throws {Error} If the device does not support remote control management.
|
|
26
34
|
* @since 3.0.0
|
|
27
35
|
*
|
|
28
36
|
* @example
|
|
@@ -34,6 +42,8 @@ class RemoteControl {
|
|
|
34
42
|
/**
|
|
35
43
|
* The `disable()` method disables remote control.
|
|
36
44
|
*
|
|
45
|
+
* @retuns {Promise<void>} A promise that resolves when the remote control is successfully disabled.
|
|
46
|
+
* @throws {Error} If the device does not support remote control management.
|
|
37
47
|
* @since 3.0.0
|
|
38
48
|
*
|
|
39
49
|
* @example
|
|
@@ -45,6 +55,8 @@ class RemoteControl {
|
|
|
45
55
|
/**
|
|
46
56
|
* The `isEnabled()` method returns whether the remote control is enabled.
|
|
47
57
|
*
|
|
58
|
+
* @returns {Promise<boolean>} A promise that resolves to `true` if remote control is enabled, otherwise `false`.
|
|
59
|
+
* @throws {Error} If the device does not support remote control management.
|
|
48
60
|
* @since 4.0.0
|
|
49
61
|
*
|
|
50
62
|
* @example
|
|
@@ -59,6 +71,8 @@ class RemoteControl {
|
|
|
59
71
|
/**
|
|
60
72
|
* The `lock()` method is an alias for the `disable()` method.
|
|
61
73
|
*
|
|
74
|
+
* @returns {Promise<void>} A promise that resolves when the remote control is successfully locked (disabled).
|
|
75
|
+
* @throws {Error} If the device does not support remote control management.
|
|
62
76
|
* @since 4.0.0
|
|
63
77
|
*
|
|
64
78
|
* @example
|
|
@@ -70,6 +84,8 @@ class RemoteControl {
|
|
|
70
84
|
/**
|
|
71
85
|
* The `unlock()` method is an alias for the `enable()` method.
|
|
72
86
|
*
|
|
87
|
+
* @returns {Promise<void>} A promise that resolves when the remote control is successfully unlocked (enabled).
|
|
88
|
+
* @throws {Error} If the device does not support remote control management.
|
|
73
89
|
* @since 4.0.0
|
|
74
90
|
*
|
|
75
91
|
* @example
|
|
@@ -81,6 +97,8 @@ class RemoteControl {
|
|
|
81
97
|
/**
|
|
82
98
|
* The `isLocked()` method returns whether the remote control is locked (disabled).
|
|
83
99
|
*
|
|
100
|
+
* @returns {Promise<boolean>} A promise that resolves to `true` if the remote control is locked (disabled), otherwise `false`.
|
|
101
|
+
* @throws {Error} If the device does not support remote control management.
|
|
84
102
|
* @since 4.0.0
|
|
85
103
|
*
|
|
86
104
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteControl.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/RemoteControl/RemoteControl.ts"],"names":[],"mappings":";;AAGA
|
|
1
|
+
{"version":3,"file":"RemoteControl.js","sourceRoot":"","sources":["../../../../src/FrontApplet/Management/RemoteControl/RemoteControl.ts"],"names":[],"mappings":";;AAGA;;;;;;;;;;;GAWG;AACH,MAAqB,aAAa;IAGxB;IACA;IAHT,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;;;;;;;;;;;;OAeG;IACI,KAAK,CAAC,MAAM;QAClB,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,OAAO;QACnB,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,SAAS;QACrB,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YACzD,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,+BAA+B,CAAC;SACtD,CA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