@signageos/front-applet 8.1.1 → 8.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/docs/sos/browser.md +66 -14
- package/docs/sos/command.md +52 -6
- package/docs/sos/debug.md +17 -2
- package/docs/sos/deviceInfo.md +27 -0
- package/docs/sos/display.md +34 -3
- package/docs/sos/fileSystem.md +1135 -59
- package/docs/sos/index.md +36 -12
- package/docs/sos/input.md +42 -1
- package/docs/sos/native/mdc.md +65 -19
- package/docs/sos/offline/cache.md +14 -8
- package/docs/sos/stream.md +1172 -37
- package/docs/sos/sync.md +2 -2
- package/docs/sos/video.md +515 -22
- package/docs/sos_management/security.md +4 -2
- package/docs/sos_management/wifi.md +9 -9
- package/es6/FrontApplet/Browser/Browser.d.ts +25 -9
- package/es6/FrontApplet/Browser/Browser.js +25 -9
- package/es6/FrontApplet/Browser/Browser.js.map +1 -1
- package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +7 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -1
- package/es6/FrontApplet/Browser/events.d.ts +6 -0
- package/es6/FrontApplet/Browser/events.js.map +1 -1
- package/es6/FrontApplet/Command/Command.d.ts +15 -6
- package/es6/FrontApplet/Command/Command.js +15 -6
- package/es6/FrontApplet/Command/Command.js.map +1 -1
- package/es6/FrontApplet/Command/ICommand.d.ts +7 -0
- package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -0
- package/es6/FrontApplet/Debug/Debug.d.ts +11 -3
- package/es6/FrontApplet/Debug/Debug.js +11 -3
- package/es6/FrontApplet/Debug/Debug.js.map +1 -1
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +15 -0
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +16 -2
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
- package/es6/FrontApplet/Display/Display.d.ts +22 -14
- package/es6/FrontApplet/Display/Display.js +22 -14
- package/es6/FrontApplet/Display/Display.js.map +1 -1
- package/es6/FrontApplet/Display/IDisplay.d.ts +4 -0
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +429 -41
- package/es6/FrontApplet/FileSystem/FileSystem.js +427 -39
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
- package/es6/FrontApplet/FileSystem/HashAlgorithm.d.ts +4 -1
- package/es6/FrontApplet/FileSystem/types.d.ts +46 -0
- package/es6/FrontApplet/FileSystem/types.js.map +1 -1
- package/es6/FrontApplet/FrontApplet.d.ts +31 -7
- package/es6/FrontApplet/FrontApplet.js +32 -8
- package/es6/FrontApplet/FrontApplet.js.map +1 -1
- package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +9 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js +6 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -1
- package/es6/FrontApplet/Input/Input.d.ts +17 -1
- package/es6/FrontApplet/Input/Input.js +17 -1
- package/es6/FrontApplet/Input/Input.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +32 -11
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +14 -11
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
- package/es6/FrontApplet/Stream/IStreamTrackInfo.d.ts +34 -0
- package/es6/FrontApplet/Stream/Stream.d.ts +245 -20
- package/es6/FrontApplet/Stream/Stream.js +245 -20
- package/es6/FrontApplet/Stream/Stream.js.map +1 -1
- package/es6/FrontApplet/Stream/StreamProtocol.d.ts +4 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js +4 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -1
- package/es6/FrontApplet/Stream/streamEventProperties.d.ts +11 -1
- package/es6/FrontApplet/Stream/streamEvents.d.ts +26 -0
- package/es6/FrontApplet/Video/IOptions.d.ts +41 -0
- package/es6/FrontApplet/Video/IVideoEvent.d.ts +8 -0
- package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -1
- package/es6/FrontApplet/Video/IVideoProperties.d.ts +3 -0
- package/es6/FrontApplet/Video/Video.d.ts +256 -19
- package/es6/FrontApplet/Video/Video.js +258 -22
- package/es6/FrontApplet/Video/Video.js.map +1 -1
- package/package.json +1 -1
package/docs/sos/browser.md
CHANGED
|
@@ -4,7 +4,7 @@ sidebar_position: 0
|
|
|
4
4
|
|
|
5
5
|
# browser
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
There are several use-cases when you need to open a web browser on a touch-enabled device (also known as a tablet). For these cases, you can use a custom web browser we built. Default URL can be opened and even the whitelisting/blacklisting of certain domains is supported.
|
|
8
8
|
|
|
9
9
|
:::info
|
|
10
10
|
|
|
@@ -29,6 +29,20 @@ The `close()` method closes the browser window opened by the `open()` method.
|
|
|
29
29
|
close(): Promise<void>;
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
#### Return value
|
|
33
|
+
|
|
34
|
+
A promise that resolves when the browser is closed.
|
|
35
|
+
|
|
36
|
+
#### Example
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
await sos.browser.open('https://www.signageos.io', {
|
|
40
|
+
readOnlyAddressBar: true,
|
|
41
|
+
});
|
|
42
|
+
// some time later
|
|
43
|
+
await sos.browser.close();
|
|
44
|
+
```
|
|
45
|
+
|
|
32
46
|
<Separator />
|
|
33
47
|
|
|
34
48
|
### onClose()
|
|
@@ -39,7 +53,13 @@ user request or after a timeout. This doesn't fire between `open` calls or on su
|
|
|
39
53
|
```ts expandable
|
|
40
54
|
onClose(listener: (event: CloseEvent) => void): () => void;
|
|
41
55
|
// show-more
|
|
56
|
+
/**
|
|
57
|
+
* Interface representing a close event in the browser.
|
|
58
|
+
*/
|
|
42
59
|
interface CloseEvent extends Event<EventType.CLOSE> {
|
|
60
|
+
/**
|
|
61
|
+
* The reason for the browser being closed.
|
|
62
|
+
*/
|
|
43
63
|
reason: CloseReason;
|
|
44
64
|
}
|
|
45
65
|
|
|
@@ -59,6 +79,12 @@ type Event<TType extends EventType = EventType> = {
|
|
|
59
79
|
|
|
60
80
|
```
|
|
61
81
|
|
|
82
|
+
#### Params
|
|
83
|
+
|
|
84
|
+
| Name | Type | Description |
|
|
85
|
+
|------------|-------------------------------|-------------------------------------------------------|
|
|
86
|
+
| `listener` | `(event: CloseEvent) => void` | The listener to be called when the browser is closed. |
|
|
87
|
+
|
|
62
88
|
#### Return value
|
|
63
89
|
|
|
64
90
|
A callback which removes the listener.
|
|
@@ -72,6 +98,9 @@ The `open()` method opens the specified url in a browser window.
|
|
|
72
98
|
```ts expandable
|
|
73
99
|
open(uri: string, options?: IOpenLinkOptions): Promise<void>;
|
|
74
100
|
// show-more
|
|
101
|
+
/**
|
|
102
|
+
* Interface defines the options for opening a link in the browser.
|
|
103
|
+
*/
|
|
75
104
|
interface IOpenLinkOptions {
|
|
76
105
|
aclDomains?: string[];
|
|
77
106
|
aclMode?: 'blacklist' | 'whitelist';
|
|
@@ -87,6 +116,10 @@ interface IOpenLinkOptions {
|
|
|
87
116
|
headlessMode?: boolean;
|
|
88
117
|
clearData?: boolean;
|
|
89
118
|
canUserClose?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Method of opening the link.
|
|
121
|
+
* @default 'native'
|
|
122
|
+
*/
|
|
90
123
|
method?: 'native' | 'iframe';
|
|
91
124
|
}
|
|
92
125
|
|
|
@@ -126,23 +159,36 @@ type ITheme = {
|
|
|
126
159
|
|
|
127
160
|
#### Params
|
|
128
161
|
|
|
129
|
-
| Name | Type | Description
|
|
130
|
-
|
|
131
|
-
| `
|
|
132
|
-
| `options
|
|
133
|
-
| `options.
|
|
134
|
-
| `options.
|
|
135
|
-
| `options.
|
|
136
|
-
| `options.
|
|
137
|
-
| `options.
|
|
138
|
-
| `options.
|
|
139
|
-
| `options.
|
|
140
|
-
| `options.
|
|
162
|
+
| Name | Type | Description |
|
|
163
|
+
|-------------------------------------------|------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
164
|
+
| `uri` | `string` | The URL to open in the browser. |
|
|
165
|
+
| `options` *(optional)* | `IOpenLinkOptions` | Optional parameters to configure the browser window. |
|
|
166
|
+
| `options.aclDomains` *(optional)* | `string[]` | List of domains to be interpreted according to `aclMode`. Example: `signageos.io`, `www.example.com` |
|
|
167
|
+
| `options.aclMode` *(optional)* | `"blacklist" \| "whitelist"` | `blacklist` – Allow access to all domains except those in aclDomains and their subdomains, `whitelist` – Allow access only to domains in aclDomains and their subdomains. |
|
|
168
|
+
| `options.readOnlyAddressBar` *(optional)* | `boolean` | If `true`, the address bar is read-only, if `false` the user can navigate away by entering a URL in the address bar. |
|
|
169
|
+
| `options.idleTimeout` *(optional)* | `number` | The browser will automatically close after a specified period of inactivity (in milliseconds). |
|
|
170
|
+
| `options.coordinates` *(optional)* | `{ x: number; y: number; width: number; height: number; }` | Size and position of the browser window. Defaults to fullscreen. |
|
|
171
|
+
| `options.theme` *(optional)* | `ITheme` | Specify custom UI theme. (Android only) |
|
|
172
|
+
| `options.headlessMode` *(optional)* | `boolean` | Headless mode hides the entire address bar. (Android only) |
|
|
173
|
+
| `options.canUserClose` *(optional)* | `boolean` | Whether the user can manually close the browser. (default if headless false, else true) |
|
|
174
|
+
| `options.clearData` *(optional)* | `boolean` | Clear cache after the browser closes. (default if headless false, else true) |
|
|
175
|
+
| `options.method` *(optional)* | `"native" \| "iframe"` | Can only be native (which opens a new, fully sandboxed fullscreen window) or iframe (which opens a configurable-sized window). (only Linux) |
|
|
176
|
+
|
|
177
|
+
#### Return value
|
|
178
|
+
|
|
179
|
+
A promise that resolves when the browser is opened.
|
|
180
|
+
|
|
181
|
+
#### Possible errors
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
- If the `uri` is not a valid URL or string.
|
|
185
|
+
- If the `options` are not valid.
|
|
186
|
+
- If unexpected error occurred when opening link.
|
|
141
187
|
|
|
142
188
|
#### Example
|
|
143
189
|
|
|
144
190
|
```ts
|
|
145
|
-
sos.browser.open('https://www.signageos.io', {
|
|
191
|
+
await sos.browser.open('https://www.signageos.io', {
|
|
146
192
|
aclDomains: ['google.com', 'yahoo.com'],
|
|
147
193
|
aclMode: 'blacklist', // or 'whitelist'
|
|
148
194
|
readOnlyAddressBar: true,
|
|
@@ -157,6 +203,12 @@ sos.browser.open('https://www.signageos.io', {
|
|
|
157
203
|
});
|
|
158
204
|
```
|
|
159
205
|
|
|
206
|
+
:::note[GitHub Example]
|
|
207
|
+
|
|
208
|
+
- [ Example of Applet for using browser on Android ](https://github.com/signageos/applet-examples/tree/master/examples/content-js-api/browser)
|
|
209
|
+
|
|
210
|
+
:::
|
|
211
|
+
|
|
160
212
|
<Separator />
|
|
161
213
|
|
|
162
214
|
### ~openLink()~
|
package/docs/sos/command.md
CHANGED
|
@@ -4,7 +4,9 @@ sidebar_position: 0
|
|
|
4
4
|
|
|
5
5
|
# command
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
In some cases, you might be interested in a complete log of what the device was doing during its operation. All of your business or technical logs can be stored in our storage for later usage. You can identify which events happened or even trigger self-repairing logic.
|
|
8
|
+
|
|
9
|
+
All commands will be available in [Applet Command REST API](https://developers.signageos.io/api/#tag/DeviceApplet-Command) and can be downloaded historically as [CSV export](https://developers.signageos.io/api/#tag/DeviceMonitoring/paths/~1v1~1device~1%7BdeviceUid%7D~1report/get).
|
|
8
10
|
|
|
9
11
|
## Methods
|
|
10
12
|
|
|
@@ -13,22 +15,40 @@ The `sos.command` API groups together methods for sending logs and receiving com
|
|
|
13
15
|
The `dispatch()` method dispatches a new log record to the signageOS.
|
|
14
16
|
|
|
15
17
|
:::warning[Dispatch throttling]
|
|
16
|
-
|
|
17
18
|
Sending commands from an applet is throttled, this means that after if the dispatch frequency is too high, some commands may be
|
|
18
|
-
discarded. Currently the limit is 30 commands per 30 seconds, although this may not be fully accurate and it's not possible to know the
|
|
19
|
+
discarded. Currently, the limit is 30 commands per 30 seconds, although this may not be fully accurate, and it's not possible to know the
|
|
19
20
|
exact limit.
|
|
20
|
-
|
|
21
21
|
:::
|
|
22
22
|
|
|
23
23
|
```ts expandable
|
|
24
24
|
dispatch<TCommand extends ICommand>(command: TCommand): Promise<void>;
|
|
25
25
|
// show-more
|
|
26
|
+
/**
|
|
27
|
+
* Interface represents a command structure with a type and additional data.
|
|
28
|
+
*/
|
|
26
29
|
interface ICommand {
|
|
27
30
|
type: string;
|
|
31
|
+
/**
|
|
32
|
+
* The `data` property is an object that contains additional data related to the command.
|
|
33
|
+
*/
|
|
34
|
+
[key: string]: any;
|
|
28
35
|
}
|
|
29
36
|
|
|
30
37
|
```
|
|
31
38
|
|
|
39
|
+
#### Params
|
|
40
|
+
|
|
41
|
+
| Name | Type | Description |
|
|
42
|
+
|-----------|------------|-------------------------------|
|
|
43
|
+
| `command` | `TCommand` | The command to be dispatched. |
|
|
44
|
+
|
|
45
|
+
#### Possible errors
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
- If type contains invalid characters, allowed to are `/^[a-zA-Z0-9\.\-_]+$/g`
|
|
49
|
+
- If the command type is longer then 100 characters limit.
|
|
50
|
+
- If the command is not an object or is missing required properties.
|
|
51
|
+
|
|
32
52
|
#### Example
|
|
33
53
|
|
|
34
54
|
```ts
|
|
@@ -41,7 +61,10 @@ await sos.command.dispatch({
|
|
|
41
61
|
|
|
42
62
|
:::note[GitHub Example]
|
|
43
63
|
|
|
44
|
-
- [Sending commands](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/sending/)
|
|
64
|
+
- [ Sending commands in Applet](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/sending/)
|
|
65
|
+
- [ Rest API - Dispatching commands](https://developers.signageos.io/api/#tag/DeviceApplet-Command/paths/~1v1~1device~1%7BdeviceUid%7D~1applet~1%7BappletUid%7D~1command/post)
|
|
66
|
+
- [ Rest API - Get commands](https://developers.signageos.io/api/#tag/DeviceApplet-Command/paths/~1v1~1device~1%7BdeviceUid%7D~1applet~1command/get)
|
|
67
|
+
- [ Rest API - Receiving historical data](https://developers.signageos.io/api/#tag/DeviceMonitoring/paths/~1v1~1device~1%7BdeviceUid%7D~1report/get)
|
|
45
68
|
|
|
46
69
|
:::
|
|
47
70
|
|
|
@@ -54,20 +77,43 @@ The `onCommand()` method sets up a listener, which is called whenever a new comm
|
|
|
54
77
|
```ts expandable
|
|
55
78
|
onCommand(listener: (command: ICommandEvent) => void): void;
|
|
56
79
|
// show-more
|
|
80
|
+
/**
|
|
81
|
+
* Received command event interface from signageOS.
|
|
82
|
+
*/
|
|
57
83
|
interface ICommandEvent {
|
|
58
84
|
type: 'command';
|
|
85
|
+
/**
|
|
86
|
+
* Command data received from occurred event.
|
|
87
|
+
*/
|
|
59
88
|
command: ICommand;
|
|
60
89
|
}
|
|
61
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Interface represents a command structure with a type and additional data.
|
|
93
|
+
*/
|
|
62
94
|
interface ICommand {
|
|
63
95
|
type: string;
|
|
96
|
+
/**
|
|
97
|
+
* The `data` property is an object that contains additional data related to the command.
|
|
98
|
+
*/
|
|
99
|
+
[key: string]: any;
|
|
64
100
|
}
|
|
65
101
|
|
|
66
102
|
```
|
|
67
103
|
|
|
104
|
+
#### Params
|
|
105
|
+
|
|
106
|
+
| Name | Type | Description |
|
|
107
|
+
|------------|------------------------------------|-----------------------------------------------------------|
|
|
108
|
+
| `listener` | `(command: ICommandEvent) => void` | The listener to be called when a new command is received. |
|
|
109
|
+
|
|
110
|
+
#### Return value
|
|
111
|
+
|
|
112
|
+
Resolves when the listener is successfully set up.
|
|
113
|
+
|
|
68
114
|
:::note[GitHub Example]
|
|
69
115
|
|
|
70
|
-
- [Receiving commands](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/receiving)
|
|
116
|
+
- [ Receiving commands in Applet](https://github.com/signageos/applet-examples/blob/master/examples/content-js-api/command/receiving)
|
|
71
117
|
|
|
72
118
|
:::
|
|
73
119
|
|
package/docs/sos/debug.md
CHANGED
|
@@ -6,11 +6,16 @@ sidebar_position: 0
|
|
|
6
6
|
|
|
7
7
|
The `sos.debug` API groups together methods for checking the state of remote debug mode.
|
|
8
8
|
|
|
9
|
+
:::note
|
|
10
|
+
- This debug is not the "native debug" of the device, but rather a remote debug mode that allows you to connect to the device using Weinre.
|
|
11
|
+
- State of the remote debug mode or native debug mode can be changed via Cloud Control or [Rest API](https://developers-staging.signageos.io/api/#tag/DeviceDebug/paths/~1v1~1device~1%7BdeviceUid%7D~1debug/put).
|
|
12
|
+
:::
|
|
13
|
+
|
|
9
14
|
## Methods
|
|
10
15
|
|
|
11
16
|
### isRemoteDebugEnabled()
|
|
12
17
|
|
|
13
|
-
The `isRemoteDebugEnabled()` method returns the state of the
|
|
18
|
+
The `isRemoteDebugEnabled()` method returns the state of the Device debug mode.
|
|
14
19
|
|
|
15
20
|
```ts expandable
|
|
16
21
|
isRemoteDebugEnabled(): Promise<boolean>;
|
|
@@ -20,7 +25,7 @@ isRemoteDebugEnabled(): Promise<boolean>;
|
|
|
20
25
|
|
|
21
26
|
### onRemoteDebugChanged()
|
|
22
27
|
|
|
23
|
-
The `onRemoteDebugChanged()` method sets up a listener, which is called whenever the state of the
|
|
28
|
+
The `onRemoteDebugChanged()` method sets up a listener, which is called whenever the state of the Device debug mode is changed.
|
|
24
29
|
|
|
25
30
|
```ts expandable
|
|
26
31
|
onRemoteDebugChanged(listener: (data: {
|
|
@@ -28,6 +33,16 @@ onRemoteDebugChanged(listener: (data: {
|
|
|
28
33
|
}) => void): void;
|
|
29
34
|
```
|
|
30
35
|
|
|
36
|
+
#### Params
|
|
37
|
+
|
|
38
|
+
| Name | Type | Description |
|
|
39
|
+
|------------|-----------------------------------------|-------------------------------------------------------------------------------|
|
|
40
|
+
| `listener` | `(data: { enabled: boolean; }) => void` | The listener to be called when the state of the remote debug mode is changed. |
|
|
41
|
+
|
|
42
|
+
#### Return value
|
|
43
|
+
|
|
44
|
+
Resolves when the listener is successfully set up.
|
|
45
|
+
|
|
31
46
|
## API Example
|
|
32
47
|
|
|
33
48
|
```ts
|
package/docs/sos/deviceInfo.md
CHANGED
|
@@ -18,6 +18,17 @@ updated when changed and persisted in local storage.
|
|
|
18
18
|
getDeviceName(): Promise<string>;
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
#### Return value
|
|
22
|
+
|
|
23
|
+
A promise that resolves to the device name.
|
|
24
|
+
|
|
25
|
+
#### Example
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
const deviceName = await sos.deviceInfo.getDeviceName();
|
|
29
|
+
console.log(`Device name is: ${deviceName}`);
|
|
30
|
+
```
|
|
31
|
+
|
|
21
32
|
<Separator />
|
|
22
33
|
|
|
23
34
|
### getLocation()
|
|
@@ -25,6 +36,10 @@ getDeviceName(): Promise<string>;
|
|
|
25
36
|
The `getLocation()` method returns location of the device. Location is requested from server on application start, automatically
|
|
26
37
|
updated when changed and persisted in local storage.
|
|
27
38
|
|
|
39
|
+
:::note
|
|
40
|
+
Location can be set only in CloudControl on Device Info page, or via Rest API.
|
|
41
|
+
:::
|
|
42
|
+
|
|
28
43
|
```ts expandable
|
|
29
44
|
getLocation(): Promise<IDeviceLocation | null>;
|
|
30
45
|
// show-more
|
|
@@ -36,6 +51,10 @@ interface IDeviceLocation {
|
|
|
36
51
|
|
|
37
52
|
```
|
|
38
53
|
|
|
54
|
+
#### Return value
|
|
55
|
+
|
|
56
|
+
A promise that resolves to the device location or `null` if not set.
|
|
57
|
+
|
|
39
58
|
<Separator />
|
|
40
59
|
|
|
41
60
|
### getOrganizationTags()
|
|
@@ -43,6 +62,10 @@ interface IDeviceLocation {
|
|
|
43
62
|
The `getOrganizationTags()` method returns all tags assigned to the device. Tags are requested from server on application start, automatically
|
|
44
63
|
updated when changed and persisted in local storage.
|
|
45
64
|
|
|
65
|
+
:::note
|
|
66
|
+
Tags can be set only in CloudControl on Device Info page, or via Rest API.
|
|
67
|
+
:::
|
|
68
|
+
|
|
46
69
|
```ts expandable
|
|
47
70
|
getOrganizationTags(): Promise<IOrganizationTag[]>;
|
|
48
71
|
// show-more
|
|
@@ -52,6 +75,10 @@ interface IOrganizationTag {
|
|
|
52
75
|
|
|
53
76
|
```
|
|
54
77
|
|
|
78
|
+
#### Return value
|
|
79
|
+
|
|
80
|
+
A promise that resolves to an array of organization tags.
|
|
81
|
+
|
|
55
82
|
## API Example
|
|
56
83
|
|
|
57
84
|
```ts
|
package/docs/sos/display.md
CHANGED
|
@@ -7,23 +7,54 @@ sidebar_position: 0
|
|
|
7
7
|
The `sos.display` API groups together methods for getting information about the device. Primarily to find out which
|
|
8
8
|
features it supports.
|
|
9
9
|
|
|
10
|
+
<details>
|
|
11
|
+
<summary>List of all display capabilities</summary>
|
|
12
|
+
| Capability | Description |
|
|
13
|
+
|:------------|:-------------|
|
|
14
|
+
| `FILE_SYSTEM_INTERNAL_STORAGE` | If device supports internal storage |
|
|
15
|
+
| `FILE_SYSTEM_EXTERNAL_STORAGE` | If device supports external storage |
|
|
16
|
+
| `FILE_SYSTEM_FILE_CHECKSUM` | If device supports file checksum calculation |
|
|
17
|
+
| `FILE_SYSTEM_LINK` | If device supports file system `link()` |
|
|
18
|
+
| `FILE_SYSTEM_CREATE_ARCHIVE` | If device supports creating archives in the file system |
|
|
19
|
+
| `FILE_SYSTEM_ARCHIVE_EXTRACT_INFO` | If device can determine a total size of a potentially extracted archive |
|
|
20
|
+
| `TIMERS_PROPRIETARY` | If device supports proprietary timers |
|
|
21
|
+
| `VIDEO_4K` | If device supports 4K video playback |
|
|
22
|
+
| `BROWSER` | If device supports opening browser |
|
|
23
|
+
| `SERIAL` | If device supports serial port communication |
|
|
24
|
+
| `BARCODE_SCANNER` | If device supports barcode scanner setup |
|
|
25
|
+
| `FRONT_OSD` | If device supports Front OSD (our on-screen display) |
|
|
26
|
+
| `PROXIMITY_SENSOR` | If device supports proximity sensor |
|
|
27
|
+
</details>
|
|
28
|
+
|
|
10
29
|
## Methods
|
|
11
30
|
|
|
12
31
|
### supports()
|
|
13
32
|
|
|
14
|
-
The `supports()` method determines whether a queried capability is supported.
|
|
15
|
-
|
|
16
|
-
- 'FILE_SYSTEM_INTERNAL_STORAGE' -
|
|
33
|
+
The `supports()` method determines whether a queried capability is supported by the device.
|
|
17
34
|
|
|
18
35
|
```ts expandable
|
|
19
36
|
supports(capability: DisplayCapability): Promise<boolean>;
|
|
20
37
|
// show-more
|
|
38
|
+
/**
|
|
39
|
+
* Represents the capabilities that a display can support.
|
|
40
|
+
* These capabilities are used to determine if a specific feature is available on the display.
|
|
41
|
+
*/
|
|
21
42
|
type DisplayCapability = 'FILE_SYSTEM_INTERNAL_STORAGE' | 'FILE_SYSTEM_EXTERNAL_STORAGE' | 'FILE_SYSTEM_FILE_CHECKSUM' | 'FILE_SYSTEM_LINK' | 'TIMERS_PROPRIETARY' | 'VIDEO_4K' | 'SERIAL' | 'BARCODE_SCANNER' | 'FRONT_OSD' | 'FILE_SYSTEM_CREATE_ARCHIVE' | 'FILE_SYSTEM_ARCHIVE_EXTRACT_INFO' | 'BROWSER' | 'PROXIMITY_SENSOR' | AnyString;
|
|
22
43
|
|
|
23
44
|
type AnyString = string & {};
|
|
24
45
|
|
|
25
46
|
```
|
|
26
47
|
|
|
48
|
+
#### Params
|
|
49
|
+
|
|
50
|
+
| Name | Type | Description |
|
|
51
|
+
|--------------|---------------------|----------------------------------------|
|
|
52
|
+
| `capability` | `DisplayCapability` | - The capability to check for support. |
|
|
53
|
+
|
|
54
|
+
#### Return value
|
|
55
|
+
|
|
56
|
+
Resolves to `true` if the capability is supported, otherwise `false`.
|
|
57
|
+
|
|
27
58
|
## API Example
|
|
28
59
|
|
|
29
60
|
```ts
|