@signageos/front-applet 8.6.0 → 8.8.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 +7 -7
- package/dist/bundle.js.map +1 -1
- package/docs/fpath/index.md +0 -270
- package/docs/sos/browser.md +0 -14
- package/docs/sos/command.md +0 -18
- package/docs/sos/deviceInfo.md +0 -17
- package/docs/sos/display.md +0 -8
- package/docs/sos/fileSystem.md +0 -488
- package/docs/sos/hardware/index.md +2 -49
- package/docs/sos/input.md +0 -12
- package/docs/sos/native/mdc.md +1 -35
- package/docs/sos/native/nmc.md +127 -0
- package/docs/sos/offline/cache.md +0 -6
- package/docs/sos/offline/index.md +0 -27
- package/docs/sos/proofOfPlay.md +0 -10
- package/docs/sos/stream.md +11 -781
- package/docs/sos/sync.md +0 -23
- package/docs/sos/video.md +0 -86
- package/docs/sos_management/app.md +32 -29
- package/docs/sos_management/index.md +2 -10
- package/docs/sos_management/network.md +73 -19
- package/docs/sos_management/os.md +0 -11
- package/docs/sos_management/package.md +20 -0
- package/docs/sos_management/power.md +50 -30
- package/docs/sos_management/screen.md +0 -7
- package/docs/sos_management/time.md +0 -3
- package/docs/sos_management/wifi.md +0 -101
- package/es6/FrontApplet/Management/App/App.d.ts +34 -24
- package/es6/FrontApplet/Management/App/App.js.map +1 -1
- package/es6/FrontApplet/Management/IManagement.d.ts +1 -1
- package/es6/FrontApplet/Management/Network/INetwork.d.ts +2 -0
- package/es6/FrontApplet/Management/Network/INetwork.js.map +1 -1
- package/es6/FrontApplet/Management/Network/Network.d.ts +35 -0
- package/es6/FrontApplet/Management/Network/Network.js +68 -0
- package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
- package/es6/FrontApplet/Management/Network/wakeOnLan.d.ts +18 -0
- package/es6/FrontApplet/Management/Network/wakeOnLan.js +43 -0
- package/es6/FrontApplet/Management/Network/wakeOnLan.js.map +1 -0
- package/es6/FrontApplet/Management/Package/Package.d.ts +9 -0
- package/es6/FrontApplet/Management/Package/Package.js +15 -0
- package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
- package/es6/FrontApplet/Management/Power/IPower.d.ts +32 -10
- package/es6/FrontApplet/Management/Power/IPower.js +3 -0
- package/es6/FrontApplet/Management/Power/IPower.js.map +1 -1
- package/es6/FrontApplet/Management/Power/Power.d.ts +12 -8
- package/es6/FrontApplet/Management/Power/Power.js +23 -32
- package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
- package/es6/FrontApplet/Management/Power/PowerHelper.d.ts +8 -3
- package/es6/FrontApplet/Management/Power/PowerHelper.js +32 -0
- package/es6/FrontApplet/Management/Power/PowerHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/ProprietaryTimerHelper.d.ts +2 -1
- package/es6/FrontApplet/Management/helpers/TimerHelper.d.ts +3 -1
- package/es6/FrontApplet/Management/helpers/TimerHelper.js +2 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/NMC/CommandsNmc.d.ts +4 -0
- package/es6/FrontApplet/NativeCommands/NMC/CommandsNmc.js +66 -0
- package/es6/FrontApplet/NativeCommands/NMC/CommandsNmc.js.map +1 -0
- package/es6/FrontApplet/NativeCommands/NMC/INativeNmcCommands.d.ts +21 -0
- package/es6/FrontApplet/NativeCommands/NMC/INativeNmcCommands.js +3 -0
- package/es6/FrontApplet/NativeCommands/NMC/INativeNmcCommands.js.map +1 -0
- package/es6/FrontApplet/NativeCommands/NMC/Nmc.d.ts +50 -0
- package/es6/FrontApplet/NativeCommands/NMC/Nmc.js +77 -0
- package/es6/FrontApplet/NativeCommands/NMC/Nmc.js.map +1 -0
- package/es6/FrontApplet/NativeCommands/NativeCommands.d.ts +2 -0
- package/es6/FrontApplet/NativeCommands/NativeCommands.js +3 -0
- package/es6/FrontApplet/NativeCommands/NativeCommands.js.map +1 -1
- package/es6/FrontApplet/Video/IOptions.d.ts +5 -0
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js +14 -0
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js.map +1 -1
- package/es6/Monitoring/Management/Network/managementNetworkCommands.d.ts +23 -1
- package/es6/Monitoring/Management/Network/managementNetworkCommands.js +5 -1
- package/es6/Monitoring/Management/Network/managementNetworkCommands.js.map +1 -1
- package/es6/Monitoring/Management/Power/powerCommands.d.ts +3 -3
- package/package.json +1 -1
package/docs/sos/sync.md
CHANGED
|
@@ -139,49 +139,28 @@ other.
|
|
|
139
139
|
```ts expandable
|
|
140
140
|
connect(options?: SynchronizationEngineOptions): Promise<void>;
|
|
141
141
|
// show-more
|
|
142
|
-
/** Options for the `connect()` method based selected synchronization type. */
|
|
143
142
|
type SynchronizationEngineOptions = ConnectSyncServerOptions | ConnectP2PLocalOptions | ConnectUdpOptions;
|
|
144
143
|
|
|
145
|
-
/**
|
|
146
|
-
* Options for sync-server synchronization.
|
|
147
|
-
*/
|
|
148
144
|
interface ConnectSyncServerOptions {
|
|
149
145
|
engine?: SyncEngine.SyncServer;
|
|
150
|
-
/** Address of the sync server engine. If omitted, the default server from device configuration will be used. */
|
|
151
146
|
uri?: string;
|
|
152
|
-
/** Optional configuration for sync server behavior */
|
|
153
147
|
config?: SynchronizerConfig;
|
|
154
148
|
}
|
|
155
149
|
|
|
156
|
-
/**
|
|
157
|
-
* The `SyncEngine` enum defines the available synchronization engines that can be used to synchronize devices.
|
|
158
|
-
* Each engine has its own method of connecting devices and synchronizing data.
|
|
159
|
-
*/
|
|
160
150
|
enum SyncEngine {
|
|
161
|
-
/** Use external sync server. Device will connect to the server via websocket. */
|
|
162
151
|
SyncServer = "sync-server",
|
|
163
|
-
/** Synchronize directly with other devices in the local network via UDP and TCP. */
|
|
164
152
|
P2PLocal = "p2p-local",
|
|
165
|
-
/**
|
|
166
|
-
* Synchronize directly with other devices in the local network via UDP.
|
|
167
|
-
* @deprecated use {@link P2PLocal}
|
|
168
|
-
*/
|
|
169
153
|
Udp = "udp"
|
|
170
154
|
}
|
|
171
155
|
|
|
172
156
|
interface SynchronizerConfig {
|
|
173
|
-
/** Allow slave devices to broadcast values to all devices in group (default: false) */
|
|
174
157
|
allowSlaveBroadcast?: boolean;
|
|
175
158
|
}
|
|
176
159
|
|
|
177
|
-
/**
|
|
178
|
-
* Options for P2P local synchronization.
|
|
179
|
-
*/
|
|
180
160
|
interface ConnectP2PLocalOptions {
|
|
181
161
|
engine: SyncEngine.P2PLocal;
|
|
182
162
|
}
|
|
183
163
|
|
|
184
|
-
/** @deprecated use SyncEngine.P2PLocal and ConnectP2PLocalOptions */
|
|
185
164
|
interface ConnectUdpOptions {
|
|
186
165
|
engine: SyncEngine.Udp;
|
|
187
166
|
}
|
|
@@ -366,9 +345,7 @@ onStatus(listener: (status: StatusEvent) => void): void;
|
|
|
366
345
|
// show-more
|
|
367
346
|
interface StatusEvent {
|
|
368
347
|
groupName?: string;
|
|
369
|
-
/** Array of device identifications connected to the group. */
|
|
370
348
|
connectedPeers: string[];
|
|
371
|
-
/** True if this device is currently master of the group (this may change over time). */
|
|
372
349
|
isMaster: boolean;
|
|
373
350
|
}
|
|
374
351
|
|
package/docs/sos/video.md
CHANGED
|
@@ -148,24 +148,13 @@ The `onEnded()` method sets up a listener, which is called whenever a video fini
|
|
|
148
148
|
```ts expandable
|
|
149
149
|
onEnded(listener: (event: IVideoEvent) => void): void;
|
|
150
150
|
// show-more
|
|
151
|
-
/**
|
|
152
|
-
* Represents an event related to video playback.
|
|
153
|
-
*/
|
|
154
151
|
interface IVideoEvent {
|
|
155
|
-
/** The type of the video event. */
|
|
156
152
|
type: VideoEventType;
|
|
157
|
-
/** Properties of video that created the event */
|
|
158
153
|
srcArguments: IVideoProperties;
|
|
159
154
|
}
|
|
160
155
|
|
|
161
|
-
/**
|
|
162
|
-
* Represents the types of video events that can occur.
|
|
163
|
-
*/
|
|
164
156
|
type VideoEventType = 'prepare' | 'play' | 'stop' | 'pause' | 'resume' | 'ended' | 'error';
|
|
165
157
|
|
|
166
|
-
/**
|
|
167
|
-
* Video properties interface for defining the properties of a played video.
|
|
168
|
-
*/
|
|
169
158
|
interface IVideoProperties {
|
|
170
159
|
uri: string;
|
|
171
160
|
x: number;
|
|
@@ -205,24 +194,13 @@ The `onError()` method sets up a listener, which is called whenever a video fail
|
|
|
205
194
|
```ts expandable
|
|
206
195
|
onError(listener: (event: IVideoEvent) => void): void;
|
|
207
196
|
// show-more
|
|
208
|
-
/**
|
|
209
|
-
* Represents an event related to video playback.
|
|
210
|
-
*/
|
|
211
197
|
interface IVideoEvent {
|
|
212
|
-
/** The type of the video event. */
|
|
213
198
|
type: VideoEventType;
|
|
214
|
-
/** Properties of video that created the event */
|
|
215
199
|
srcArguments: IVideoProperties;
|
|
216
200
|
}
|
|
217
201
|
|
|
218
|
-
/**
|
|
219
|
-
* Represents the types of video events that can occur.
|
|
220
|
-
*/
|
|
221
202
|
type VideoEventType = 'prepare' | 'play' | 'stop' | 'pause' | 'resume' | 'ended' | 'error';
|
|
222
203
|
|
|
223
|
-
/**
|
|
224
|
-
* Video properties interface for defining the properties of a played video.
|
|
225
|
-
*/
|
|
226
204
|
interface IVideoProperties {
|
|
227
205
|
uri: string;
|
|
228
206
|
x: number;
|
|
@@ -262,24 +240,13 @@ The `onPause()` method sets up a listener, which is called whenever a video is p
|
|
|
262
240
|
```ts expandable
|
|
263
241
|
onPause(listener: (event: IVideoEvent) => void): void;
|
|
264
242
|
// show-more
|
|
265
|
-
/**
|
|
266
|
-
* Represents an event related to video playback.
|
|
267
|
-
*/
|
|
268
243
|
interface IVideoEvent {
|
|
269
|
-
/** The type of the video event. */
|
|
270
244
|
type: VideoEventType;
|
|
271
|
-
/** Properties of video that created the event */
|
|
272
245
|
srcArguments: IVideoProperties;
|
|
273
246
|
}
|
|
274
247
|
|
|
275
|
-
/**
|
|
276
|
-
* Represents the types of video events that can occur.
|
|
277
|
-
*/
|
|
278
248
|
type VideoEventType = 'prepare' | 'play' | 'stop' | 'pause' | 'resume' | 'ended' | 'error';
|
|
279
249
|
|
|
280
|
-
/**
|
|
281
|
-
* Video properties interface for defining the properties of a played video.
|
|
282
|
-
*/
|
|
283
250
|
interface IVideoProperties {
|
|
284
251
|
uri: string;
|
|
285
252
|
x: number;
|
|
@@ -319,24 +286,13 @@ The `onPlay()` method sets up a listener, which is called whenever a video start
|
|
|
319
286
|
```ts expandable
|
|
320
287
|
onPlay(listener: (event: IVideoEvent) => void): void;
|
|
321
288
|
// show-more
|
|
322
|
-
/**
|
|
323
|
-
* Represents an event related to video playback.
|
|
324
|
-
*/
|
|
325
289
|
interface IVideoEvent {
|
|
326
|
-
/** The type of the video event. */
|
|
327
290
|
type: VideoEventType;
|
|
328
|
-
/** Properties of video that created the event */
|
|
329
291
|
srcArguments: IVideoProperties;
|
|
330
292
|
}
|
|
331
293
|
|
|
332
|
-
/**
|
|
333
|
-
* Represents the types of video events that can occur.
|
|
334
|
-
*/
|
|
335
294
|
type VideoEventType = 'prepare' | 'play' | 'stop' | 'pause' | 'resume' | 'ended' | 'error';
|
|
336
295
|
|
|
337
|
-
/**
|
|
338
|
-
* Video properties interface for defining the properties of a played video.
|
|
339
|
-
*/
|
|
340
296
|
interface IVideoProperties {
|
|
341
297
|
uri: string;
|
|
342
298
|
x: number;
|
|
@@ -377,24 +333,13 @@ The `onPrepare()` method sets up a listener, which is called whenever a video st
|
|
|
377
333
|
```ts expandable
|
|
378
334
|
onPrepare(listener: (event: IVideoEvent) => void): void;
|
|
379
335
|
// show-more
|
|
380
|
-
/**
|
|
381
|
-
* Represents an event related to video playback.
|
|
382
|
-
*/
|
|
383
336
|
interface IVideoEvent {
|
|
384
|
-
/** The type of the video event. */
|
|
385
337
|
type: VideoEventType;
|
|
386
|
-
/** Properties of video that created the event */
|
|
387
338
|
srcArguments: IVideoProperties;
|
|
388
339
|
}
|
|
389
340
|
|
|
390
|
-
/**
|
|
391
|
-
* Represents the types of video events that can occur.
|
|
392
|
-
*/
|
|
393
341
|
type VideoEventType = 'prepare' | 'play' | 'stop' | 'pause' | 'resume' | 'ended' | 'error';
|
|
394
342
|
|
|
395
|
-
/**
|
|
396
|
-
* Video properties interface for defining the properties of a played video.
|
|
397
|
-
*/
|
|
398
343
|
interface IVideoProperties {
|
|
399
344
|
uri: string;
|
|
400
345
|
x: number;
|
|
@@ -434,24 +379,13 @@ The `onResume()` method sets up a listener, which is called whenever a video is
|
|
|
434
379
|
```ts expandable
|
|
435
380
|
onResume(listener: (event: IVideoEvent) => void): void;
|
|
436
381
|
// show-more
|
|
437
|
-
/**
|
|
438
|
-
* Represents an event related to video playback.
|
|
439
|
-
*/
|
|
440
382
|
interface IVideoEvent {
|
|
441
|
-
/** The type of the video event. */
|
|
442
383
|
type: VideoEventType;
|
|
443
|
-
/** Properties of video that created the event */
|
|
444
384
|
srcArguments: IVideoProperties;
|
|
445
385
|
}
|
|
446
386
|
|
|
447
|
-
/**
|
|
448
|
-
* Represents the types of video events that can occur.
|
|
449
|
-
*/
|
|
450
387
|
type VideoEventType = 'prepare' | 'play' | 'stop' | 'pause' | 'resume' | 'ended' | 'error';
|
|
451
388
|
|
|
452
|
-
/**
|
|
453
|
-
* Video properties interface for defining the properties of a played video.
|
|
454
|
-
*/
|
|
455
389
|
interface IVideoProperties {
|
|
456
390
|
uri: string;
|
|
457
391
|
x: number;
|
|
@@ -493,24 +427,13 @@ The `onStop()` method sets up a listener, which is called whenever a video has b
|
|
|
493
427
|
```ts expandable
|
|
494
428
|
onStop(listener: (event: IVideoEvent) => void): void;
|
|
495
429
|
// show-more
|
|
496
|
-
/**
|
|
497
|
-
* Represents an event related to video playback.
|
|
498
|
-
*/
|
|
499
430
|
interface IVideoEvent {
|
|
500
|
-
/** The type of the video event. */
|
|
501
431
|
type: VideoEventType;
|
|
502
|
-
/** Properties of video that created the event */
|
|
503
432
|
srcArguments: IVideoProperties;
|
|
504
433
|
}
|
|
505
434
|
|
|
506
|
-
/**
|
|
507
|
-
* Represents the types of video events that can occur.
|
|
508
|
-
*/
|
|
509
435
|
type VideoEventType = 'prepare' | 'play' | 'stop' | 'pause' | 'resume' | 'ended' | 'error';
|
|
510
436
|
|
|
511
|
-
/**
|
|
512
|
-
* Video properties interface for defining the properties of a played video.
|
|
513
|
-
*/
|
|
514
437
|
interface IVideoProperties {
|
|
515
438
|
uri: string;
|
|
516
439
|
x: number;
|
|
@@ -644,17 +567,8 @@ The `prepare()` method loads the video into memory and prepares it for a playbac
|
|
|
644
567
|
prepare(uri: string, x: number, y: number, width: number, height: number, options?: IOptions): Promise<void>;
|
|
645
568
|
// show-more
|
|
646
569
|
interface IOptions {
|
|
647
|
-
/** @deprecated */
|
|
648
570
|
'4k'?: boolean;
|
|
649
|
-
/**
|
|
650
|
-
* Prepare stream or video in background.
|
|
651
|
-
* @default false
|
|
652
|
-
*/
|
|
653
571
|
background?: boolean;
|
|
654
|
-
/**
|
|
655
|
-
* Initial volume value of the stream.
|
|
656
|
-
* @default 100
|
|
657
|
-
*/
|
|
658
572
|
volume?: number;
|
|
659
573
|
}
|
|
660
574
|
|
|
@@ -29,9 +29,6 @@ The `getType()` method returns the type of the platform the application is runni
|
|
|
29
29
|
```ts expandable
|
|
30
30
|
getType(): Promise<AppType>;
|
|
31
31
|
// show-more
|
|
32
|
-
/**
|
|
33
|
-
* All available app types
|
|
34
|
-
*/
|
|
35
32
|
type AppType = 'android' | 'brightsign' | 'default' | 'linux' | 'sssp' | 'tizen' | 'webos' | 'windows' | 'chromeos' | AnyString;
|
|
36
33
|
|
|
37
34
|
type AnyString = string & {};
|
|
@@ -74,32 +71,44 @@ console.log(`Current application version is: ${version}`); // e.g. '4.0.0', '5.2
|
|
|
74
71
|
|
|
75
72
|
### upgrade(appUri)
|
|
76
73
|
|
|
77
|
-
The `upgrade(appUri)` method upgrades the signageOS application with the provided `appUri`. Open users can upgrade the app passing
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
- ChromeOS: Not supported
|
|
89
|
-
|
|
90
|
-
:::tip
|
|
91
|
-
Check our latest versions in our [changelogs](https://docs.signageos.io/hc/en-us/sections/4409161443730-Core-Apps).
|
|
74
|
+
The `upgrade(appUri)` method upgrades the signageOS application with the provided `appUri`. Open users can upgrade the app passing
|
|
75
|
+
a URL where the application files are hosted.
|
|
76
|
+
|
|
77
|
+
:::warning Strict URL and folder structure requirements
|
|
78
|
+
The `appUri` **must** follow the exact folder structure produced by the signageOS Device-app Builder.
|
|
79
|
+
The upgrade will fail silently (device reverts to the previous version) if the URL does not match the expected format.
|
|
80
|
+
|
|
81
|
+
Key rules:
|
|
82
|
+
1. **The folder structure on your server must match the ZIP package from signageOS exactly.** Do not rename files or reorganize folders.
|
|
83
|
+
2. **HTTP redirects (e.g., 302) are not supported.** Files must be directly accessible at the expected URLs.
|
|
84
|
+
3. **The URL must not end with a trailing slash (`/`).** A trailing slash causes the upgrade to fail.
|
|
92
85
|
:::
|
|
93
86
|
|
|
87
|
+
The expected URL format differs per platform:
|
|
88
|
+
|
|
89
|
+
| Platform | URL format |
|
|
90
|
+
|----------|-----------|
|
|
91
|
+
| **Tizen** | Point to the **folder** containing `sssp_config.xml` and `*.wgt` — not to a specific file. E.g. `https://cdn.example.com/app/tizen/2.10.1/landscape` |
|
|
92
|
+
| **SSSP** | Point to the **folder** containing `sssp_config.xml` and `*.wgt`. E.g. `https://cdn.example.com/app/sssp/2.10.1/landscape_full-hd` |
|
|
93
|
+
| **webOS 1, 2** | Point to the **ZIP file** directly. E.g. `https://cdn.example.com/app/webos/2.10.1/ApplicationName.zip` |
|
|
94
|
+
| **webOS 3+** | Point to the **IPK file** directly. E.g. `https://cdn.example.com/app/webos/2.10.1/ApplicationName.ipk` |
|
|
95
|
+
| **BrightSign** | Point to the **zip file** directly. E.g. `https://cdn.example.com/app/brightsign/2.10.1/display-brightsign.zip` |
|
|
96
|
+
| **Android** | Point to the **APK file** directly. E.g. `https://cdn.example.com/app/android/2.10.1/io.signageos.android.apk` |
|
|
97
|
+
| **Windows** | Point to the **zip file** directly. E.g. `https://cdn.example.com/app/windows/2.10.1/windows_2.10.1.zip` |
|
|
98
|
+
| **ChromeOS** | Not supported |
|
|
99
|
+
|
|
100
|
+
For the full folder structure reference and deployment guide, see
|
|
101
|
+
[Build & Deploy Your Applet Via Core App with built-in Applet](https://docs.signageos.io/devspace/general-topics/deployment/build-deploy-your-applet-via-core-app-with-built-in-applet).
|
|
102
|
+
|
|
94
103
|
```ts expandable
|
|
95
104
|
upgrade(appUri: string): Promise<void>;
|
|
96
105
|
```
|
|
97
106
|
|
|
98
107
|
#### Params
|
|
99
108
|
|
|
100
|
-
| Name | Type | Required | Description
|
|
101
|
-
|
|
102
|
-
| `appUri` | `string` | <div>Yes</div> |
|
|
109
|
+
| Name | Type | Required | Description |
|
|
110
|
+
|----------|----------|------------------|-------------------------------------------------------------------------------------------------------|
|
|
111
|
+
| `appUri` | `string` | <div>Yes</div> | URL where the application files are hosted. Must follow the platform-specific format described above. |
|
|
103
112
|
|
|
104
113
|
#### Return value
|
|
105
114
|
|
|
@@ -112,14 +121,8 @@ If the upgrade fails.
|
|
|
112
121
|
#### Example
|
|
113
122
|
|
|
114
123
|
```ts
|
|
115
|
-
// Upgrade
|
|
116
|
-
await sos.management.app.upgrade('
|
|
117
|
-
.then(() => {
|
|
118
|
-
console.log('Application upgrade started successfully.');
|
|
119
|
-
})
|
|
120
|
-
.catch((error) => {
|
|
121
|
-
console.error('Failed to start application upgrade:', error);
|
|
122
|
-
});
|
|
124
|
+
// Upgrade Tizen device — point to the FOLDER, not a specific file. No trailing slash.
|
|
125
|
+
await sos.management.app.upgrade('https://cdn.your-cms.com/app/tizen/2.10.1/landscape');
|
|
123
126
|
```
|
|
124
127
|
|
|
125
128
|
:::note[GitHub Example]
|
|
@@ -121,7 +121,7 @@ For more information what are capabilities, see the description of the `supports
|
|
|
121
121
|
```ts expandable
|
|
122
122
|
getCapabilities(): Promise<ManagementCapability[]>;
|
|
123
123
|
// show-more
|
|
124
|
-
type ManagementCapability = 'MODEL' | 'SERIAL_NUMBER' | 'BRAND' | 'OS_VERSION' | 'BATTERY_STATUS' | 'STORAGE_UNITS' | 'TEMPERATURE' | 'SCREENSHOT_UPLOAD' | 'NETWORK_INFO' | 'WIFI' | 'WIFI_SCAN' | 'WIFI_AP' | 'WIFI_STRENGTH' | 'TIMERS_PROPRIETARY' | 'BRIGHTNESS_SCHEDULING' | 'TIMERS_NATIVE' | 'SET_BRIGHTNESS' | 'GET_BRIGHTNESS' | 'SCREEN_RESIZE' | 'SET_TIME' | 'SET_TIMEZONE' | 'GET_TIMEZONE' | 'NTP_TIME' | 'APP_UPGRADE' | 'FIRMWARE_UPGRADE' | 'PACKAGE_INSTALL' | 'SET_VOLUME' | 'GET_VOLUME' | 'SET_REMOTE_CONTROL_ENABLED' | 'SET_DEBUG' | 'SYSTEM_REBOOT' | 'APP_RESTART' | 'DISPLAY_POWER' | 'SERVLET' | 'HARDWARE_LED_SET_COLOR' | 'PROXIMITY_SENSOR' | 'FACTORY_RESET' | 'ORIENTATION_LANDSCAPE' | 'ORIENTATION_PORTRAIT' | 'ORIENTATION_LANDSCAPE_FLIPPED' | 'ORIENTATION_PORTRAIT_FLIPPED' | 'ORIENTATION_AUTO' | 'SCHEDULE_POWER_ACTION' | 'EXTENDED_MANAGEMENT' | 'SYSTEM_CPU' | 'SYSTEM_MEMORY' | 'PROXY' | 'AUTO_RECOVERY' | 'PEER_RECOVERY' | 'FILE_SYSTEM_WIPEOUT' | 'REMOTE_DESKTOP' | 'HOTEL_MODE' | 'VPN' | 'CUSTOM_SCRIPTS' | 'NATIVE_COMMANDS_MDC' | 'DEVICE_OWNER' | 'ACCESSIBILITY_SERVICE' | 'DISPLAY_MANAGER' | 'SECRETS' | 'HARDWARE_ACCELERATION' | 'WIFI_COUNTRY' | 'STOP_PACKAGE' | AnyString;
|
|
124
|
+
type ManagementCapability = 'MODEL' | 'SERIAL_NUMBER' | 'BRAND' | 'OS_VERSION' | 'BATTERY_STATUS' | 'STORAGE_UNITS' | 'TEMPERATURE' | 'SCREENSHOT_UPLOAD' | 'NETWORK_INFO' | 'WIFI' | 'WIFI_SCAN' | 'WIFI_AP' | 'WIFI_STRENGTH' | 'TIMERS_PROPRIETARY' | 'BRIGHTNESS_SCHEDULING' | 'TIMERS_NATIVE' | 'SET_BRIGHTNESS' | 'GET_BRIGHTNESS' | 'SCREEN_RESIZE' | 'SET_TIME' | 'SET_TIMEZONE' | 'GET_TIMEZONE' | 'NTP_TIME' | 'APP_UPGRADE' | 'FIRMWARE_UPGRADE' | 'PACKAGE_INSTALL' | 'SET_VOLUME' | 'GET_VOLUME' | 'SET_REMOTE_CONTROL_ENABLED' | 'SET_DEBUG' | 'SYSTEM_REBOOT' | 'APP_RESTART' | 'DISPLAY_POWER' | 'SERVLET' | 'HARDWARE_LED_SET_COLOR' | 'PROXIMITY_SENSOR' | 'FACTORY_RESET' | 'ORIENTATION_LANDSCAPE' | 'ORIENTATION_PORTRAIT' | 'ORIENTATION_LANDSCAPE_FLIPPED' | 'ORIENTATION_PORTRAIT_FLIPPED' | 'ORIENTATION_AUTO' | 'SCHEDULE_POWER_ACTION' | 'EXTENDED_MANAGEMENT' | 'SYSTEM_CPU' | 'SYSTEM_MEMORY' | 'PROXY' | 'AUTO_RECOVERY' | 'PEER_RECOVERY' | 'FILE_SYSTEM_WIPEOUT' | 'REMOTE_DESKTOP' | 'HOTEL_MODE' | 'VPN' | 'CUSTOM_SCRIPTS' | 'NATIVE_COMMANDS_MDC' | 'DEVICE_OWNER' | 'ACCESSIBILITY_SERVICE' | 'DISPLAY_MANAGER' | 'SECRETS' | 'HARDWARE_ACCELERATION' | 'WIFI_COUNTRY' | 'STOP_PACKAGE' | 'SEND_UDP' | 'WAKE_ON_LAN' | 'CLEAR_PACKAGE_DATA' | AnyString;
|
|
125
125
|
|
|
126
126
|
type AnyString = string & {};
|
|
127
127
|
|
|
@@ -376,7 +376,7 @@ or check the **ManagementCapability** type in `supports()` method. It has a list
|
|
|
376
376
|
```ts expandable
|
|
377
377
|
supports(capability: ManagementCapability): Promise<boolean>;
|
|
378
378
|
// show-more
|
|
379
|
-
type ManagementCapability = 'MODEL' | 'SERIAL_NUMBER' | 'BRAND' | 'OS_VERSION' | 'BATTERY_STATUS' | 'STORAGE_UNITS' | 'TEMPERATURE' | 'SCREENSHOT_UPLOAD' | 'NETWORK_INFO' | 'WIFI' | 'WIFI_SCAN' | 'WIFI_AP' | 'WIFI_STRENGTH' | 'TIMERS_PROPRIETARY' | 'BRIGHTNESS_SCHEDULING' | 'TIMERS_NATIVE' | 'SET_BRIGHTNESS' | 'GET_BRIGHTNESS' | 'SCREEN_RESIZE' | 'SET_TIME' | 'SET_TIMEZONE' | 'GET_TIMEZONE' | 'NTP_TIME' | 'APP_UPGRADE' | 'FIRMWARE_UPGRADE' | 'PACKAGE_INSTALL' | 'SET_VOLUME' | 'GET_VOLUME' | 'SET_REMOTE_CONTROL_ENABLED' | 'SET_DEBUG' | 'SYSTEM_REBOOT' | 'APP_RESTART' | 'DISPLAY_POWER' | 'SERVLET' | 'HARDWARE_LED_SET_COLOR' | 'PROXIMITY_SENSOR' | 'FACTORY_RESET' | 'ORIENTATION_LANDSCAPE' | 'ORIENTATION_PORTRAIT' | 'ORIENTATION_LANDSCAPE_FLIPPED' | 'ORIENTATION_PORTRAIT_FLIPPED' | 'ORIENTATION_AUTO' | 'SCHEDULE_POWER_ACTION' | 'EXTENDED_MANAGEMENT' | 'SYSTEM_CPU' | 'SYSTEM_MEMORY' | 'PROXY' | 'AUTO_RECOVERY' | 'PEER_RECOVERY' | 'FILE_SYSTEM_WIPEOUT' | 'REMOTE_DESKTOP' | 'HOTEL_MODE' | 'VPN' | 'CUSTOM_SCRIPTS' | 'NATIVE_COMMANDS_MDC' | 'DEVICE_OWNER' | 'ACCESSIBILITY_SERVICE' | 'DISPLAY_MANAGER' | 'SECRETS' | 'HARDWARE_ACCELERATION' | 'WIFI_COUNTRY' | 'STOP_PACKAGE' | AnyString;
|
|
379
|
+
type ManagementCapability = 'MODEL' | 'SERIAL_NUMBER' | 'BRAND' | 'OS_VERSION' | 'BATTERY_STATUS' | 'STORAGE_UNITS' | 'TEMPERATURE' | 'SCREENSHOT_UPLOAD' | 'NETWORK_INFO' | 'WIFI' | 'WIFI_SCAN' | 'WIFI_AP' | 'WIFI_STRENGTH' | 'TIMERS_PROPRIETARY' | 'BRIGHTNESS_SCHEDULING' | 'TIMERS_NATIVE' | 'SET_BRIGHTNESS' | 'GET_BRIGHTNESS' | 'SCREEN_RESIZE' | 'SET_TIME' | 'SET_TIMEZONE' | 'GET_TIMEZONE' | 'NTP_TIME' | 'APP_UPGRADE' | 'FIRMWARE_UPGRADE' | 'PACKAGE_INSTALL' | 'SET_VOLUME' | 'GET_VOLUME' | 'SET_REMOTE_CONTROL_ENABLED' | 'SET_DEBUG' | 'SYSTEM_REBOOT' | 'APP_RESTART' | 'DISPLAY_POWER' | 'SERVLET' | 'HARDWARE_LED_SET_COLOR' | 'PROXIMITY_SENSOR' | 'FACTORY_RESET' | 'ORIENTATION_LANDSCAPE' | 'ORIENTATION_PORTRAIT' | 'ORIENTATION_LANDSCAPE_FLIPPED' | 'ORIENTATION_PORTRAIT_FLIPPED' | 'ORIENTATION_AUTO' | 'SCHEDULE_POWER_ACTION' | 'EXTENDED_MANAGEMENT' | 'SYSTEM_CPU' | 'SYSTEM_MEMORY' | 'PROXY' | 'AUTO_RECOVERY' | 'PEER_RECOVERY' | 'FILE_SYSTEM_WIPEOUT' | 'REMOTE_DESKTOP' | 'HOTEL_MODE' | 'VPN' | 'CUSTOM_SCRIPTS' | 'NATIVE_COMMANDS_MDC' | 'DEVICE_OWNER' | 'ACCESSIBILITY_SERVICE' | 'DISPLAY_MANAGER' | 'SECRETS' | 'HARDWARE_ACCELERATION' | 'WIFI_COUNTRY' | 'STOP_PACKAGE' | 'SEND_UDP' | 'WAKE_ON_LAN' | 'CLEAR_PACKAGE_DATA' | AnyString;
|
|
380
380
|
|
|
381
381
|
type AnyString = string & {};
|
|
382
382
|
|
|
@@ -416,9 +416,6 @@ This method was deprecated. Use `sos.management.network.listInterfaces()` instea
|
|
|
416
416
|
```ts expandable
|
|
417
417
|
getNetworkInfo(): Promise<INetworkInfo>;
|
|
418
418
|
// show-more
|
|
419
|
-
/**
|
|
420
|
-
* @deprecated use `INetworkInterface` instead
|
|
421
|
-
*/
|
|
422
419
|
interface INetworkInfo {
|
|
423
420
|
localAddress: string;
|
|
424
421
|
ethernetMacAddress: string;
|
|
@@ -428,11 +425,6 @@ interface INetworkInfo {
|
|
|
428
425
|
netmask?: string;
|
|
429
426
|
dns?: string[];
|
|
430
427
|
interfaceName?: string;
|
|
431
|
-
/**
|
|
432
|
-
* Number in range from 0 to 100 (percentage)
|
|
433
|
-
* mapped from -90 dBm unusable signal
|
|
434
|
-
* to -30 dBm excellent signal.
|
|
435
|
-
*/
|
|
436
428
|
wifiStrength?: number;
|
|
437
429
|
wifiSsid?: string;
|
|
438
430
|
}
|
|
@@ -65,17 +65,11 @@ The `importCertificate()` method imports a certificate to the device. The certif
|
|
|
65
65
|
```ts expandable
|
|
66
66
|
importCertificate(details: CertificateEapDetails): Promise<void>;
|
|
67
67
|
// show-more
|
|
68
|
-
/** Details for importing a certificate for EAP authentication. */
|
|
69
68
|
interface CertificateEapDetails {
|
|
70
|
-
/** Type of EAP authentication */
|
|
71
69
|
type: EAPMethod;
|
|
72
|
-
/** CA certificate */
|
|
73
70
|
caCertificate?: string;
|
|
74
|
-
/** Client certificate for EAP-TLS */
|
|
75
71
|
clientCertificate?: string;
|
|
76
|
-
/** Private key for client certificate for EAP-TLS */
|
|
77
72
|
clientKey?: string;
|
|
78
|
-
/** Password for the private key, if it's encrypted */
|
|
79
73
|
clientCertificatePassword?: string;
|
|
80
74
|
}
|
|
81
75
|
|
|
@@ -151,11 +145,6 @@ interface INetworkInterface {
|
|
|
151
145
|
netmask?: string;
|
|
152
146
|
dns?: string[];
|
|
153
147
|
disabled?: boolean;
|
|
154
|
-
/**
|
|
155
|
-
* Number in range from 0 to 100 (percentage)
|
|
156
|
-
* mapped from -90 dBm unusable signal
|
|
157
|
-
* to -30 dBm excellent signal.
|
|
158
|
-
*/
|
|
159
148
|
wifiStrength?: number;
|
|
160
149
|
wifiSsid?: string;
|
|
161
150
|
}
|
|
@@ -185,6 +174,79 @@ interfaces.forEach((iface) => {
|
|
|
185
174
|
|
|
186
175
|
<Separator />
|
|
187
176
|
|
|
177
|
+
### sendUdp()
|
|
178
|
+
|
|
179
|
+
The `sendUdp()` method sends a raw UDP datagram to the specified IP address and port.
|
|
180
|
+
This is a low-level network primitive that can be used for protocols like Wake-on-LAN.
|
|
181
|
+
|
|
182
|
+
```ts expandable
|
|
183
|
+
sendUdp(ip: string, port: number, data: number[]): Promise<void>;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### Params
|
|
187
|
+
|
|
188
|
+
| Name | Type | Required | Description |
|
|
189
|
+
|--------|------------|------------------|-----------------------------------------------------------------------------------------------------------------------|
|
|
190
|
+
| `ip` | `string` | <div>Yes</div> | The destination IP address. Use `'255.255.255.255'` for broadcast. |
|
|
191
|
+
| `port` | `number` | <div>Yes</div> | The destination UDP port number (1-65535). |
|
|
192
|
+
| `data` | `number[]` | <div>Yes</div> | The payload as a byte array. Each element must be an integer between 0 and 255. Maximum 1500 elements (Ethernet MTU). |
|
|
193
|
+
|
|
194
|
+
#### Return value
|
|
195
|
+
|
|
196
|
+
A promise that resolves when the UDP packet has been sent.
|
|
197
|
+
|
|
198
|
+
#### Possible errors
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
- If the parameters are invalid.
|
|
202
|
+
- If the device does not support sending UDP packets.
|
|
203
|
+
|
|
204
|
+
#### Example
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
// Send a Wake-on-LAN magic packet
|
|
208
|
+
await sos.management.network.sendUdp('255.255.255.255', 9, [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ...]);
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
<Separator />
|
|
212
|
+
|
|
213
|
+
### sendWakeOnLan()
|
|
214
|
+
|
|
215
|
+
The `sendWakeOnLan()` method sends a Wake-on-LAN magic packet to wake a device with the given MAC address.
|
|
216
|
+
The target device must have Wake-on-LAN enabled and be on the same local network.
|
|
217
|
+
|
|
218
|
+
Internally, this generates a 102-byte magic packet (6×0xFF + 16× MAC address) and sends it
|
|
219
|
+
as a UDP broadcast to `255.255.255.255` on port 9 via `sendUdp()`.
|
|
220
|
+
|
|
221
|
+
```ts expandable
|
|
222
|
+
sendWakeOnLan(macAddress: string): Promise<void>;
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### Params
|
|
226
|
+
|
|
227
|
+
| Name | Type | Required | Description |
|
|
228
|
+
|--------------|----------|------------------|-------------------------------------------------------------------------------------------------------------------|
|
|
229
|
+
| `macAddress` | `string` | <div>Yes</div> | The MAC address of the target device. Accepted formats: `AA:BB:CC:DD:EE:FF`, `AA-BB-CC-DD-EE-FF`, `AABBCCDDEEFF`. |
|
|
230
|
+
|
|
231
|
+
#### Return value
|
|
232
|
+
|
|
233
|
+
A promise that resolves when the magic packet has been sent.
|
|
234
|
+
|
|
235
|
+
#### Possible errors
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
- If the MAC address format is invalid.
|
|
239
|
+
- If the device does not support sending UDP packets.
|
|
240
|
+
|
|
241
|
+
#### Example
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
// Wake a device by its MAC address
|
|
245
|
+
await sos.management.network.sendWakeOnLan('AA:BB:CC:DD:EE:FF');
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
<Separator />
|
|
249
|
+
|
|
188
250
|
### setDHCP(interfaceName)
|
|
189
251
|
|
|
190
252
|
The `setDHCP()` method configures a selected network interface to use DHCP.
|
|
@@ -269,9 +331,6 @@ This method was deprecated. Use `sos.management.network.listInterfaces()` instea
|
|
|
269
331
|
```ts expandable
|
|
270
332
|
getActiveInfo(): Promise<INetworkInfo>;
|
|
271
333
|
// show-more
|
|
272
|
-
/**
|
|
273
|
-
* @deprecated use `INetworkInterface` instead
|
|
274
|
-
*/
|
|
275
334
|
interface INetworkInfo {
|
|
276
335
|
localAddress: string;
|
|
277
336
|
ethernetMacAddress: string;
|
|
@@ -281,11 +340,6 @@ interface INetworkInfo {
|
|
|
281
340
|
netmask?: string;
|
|
282
341
|
dns?: string[];
|
|
283
342
|
interfaceName?: string;
|
|
284
|
-
/**
|
|
285
|
-
* Number in range from 0 to 100 (percentage)
|
|
286
|
-
* mapped from -90 dBm unusable signal
|
|
287
|
-
* to -30 dBm excellent signal.
|
|
288
|
-
*/
|
|
289
343
|
wifiStrength?: number;
|
|
290
344
|
wifiSsid?: string;
|
|
291
345
|
}
|
|
@@ -53,14 +53,6 @@ version of the current operating system. It's usually 1 or 2 digits, including o
|
|
|
53
53
|
getInfo(): Promise<IOSInfo>;
|
|
54
54
|
// show-more
|
|
55
55
|
interface IOSInfo {
|
|
56
|
-
/**
|
|
57
|
-
* Major version of current operating system.
|
|
58
|
-
* It's usually 1 or 2 digits including or excluding dot notation.
|
|
59
|
-
* E.g.:
|
|
60
|
-
* Windows -> 7, 8, 10, 11
|
|
61
|
-
* WebOS -> 3, 3.2, 4, 4.1
|
|
62
|
-
* Tizen -> 2.4, 3, 4, 5
|
|
63
|
-
*/
|
|
64
56
|
version: string;
|
|
65
57
|
}
|
|
66
58
|
|
|
@@ -86,9 +78,6 @@ The `getMemoryUsage()` method returns the total memory amount in bytes, the curr
|
|
|
86
78
|
```ts expandable
|
|
87
79
|
getMemoryUsage(): Promise<SystemMemoryInfo>;
|
|
88
80
|
// show-more
|
|
89
|
-
/**
|
|
90
|
-
* Returned object from `getMemoryUsage()` method.
|
|
91
|
-
*/
|
|
92
81
|
interface SystemMemoryInfo {
|
|
93
82
|
used: number;
|
|
94
83
|
total: number;
|
|
@@ -18,6 +18,26 @@ The `sos.management.package` API groups together methods for installing custom A
|
|
|
18
18
|
|
|
19
19
|
## Methods
|
|
20
20
|
|
|
21
|
+
### clearData()
|
|
22
|
+
|
|
23
|
+
The `clearData()` method stops a certain package and clears its user data.
|
|
24
|
+
|
|
25
|
+
```ts expandable
|
|
26
|
+
clearData(packageName: string): Promise<void>;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### Params
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Description |
|
|
32
|
+
|---------------|----------|------------------|-----------------------------|
|
|
33
|
+
| `packageName` | `string` | <div>Yes</div> | Name of the android package |
|
|
34
|
+
|
|
35
|
+
#### Return value
|
|
36
|
+
|
|
37
|
+
Resolves if the package data was cleared.
|
|
38
|
+
|
|
39
|
+
<Separator />
|
|
40
|
+
|
|
21
41
|
### install()
|
|
22
42
|
|
|
23
43
|
The `install()` method installs a particular package from the specified URL.
|