appium-android-driver 5.14.7 → 6.0.1

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.
Files changed (210) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/lib/commands/actions.d.ts +6 -224
  3. package/build/lib/commands/actions.d.ts.map +1 -1
  4. package/build/lib/commands/actions.js +306 -405
  5. package/build/lib/commands/actions.js.map +1 -1
  6. package/build/lib/commands/alert.d.ts +7 -9
  7. package/build/lib/commands/alert.d.ts.map +1 -1
  8. package/build/lib/commands/alert.js +24 -18
  9. package/build/lib/commands/alert.js.map +1 -1
  10. package/build/lib/commands/app-management.d.ts +7 -313
  11. package/build/lib/commands/app-management.d.ts.map +1 -1
  12. package/build/lib/commands/app-management.js +135 -293
  13. package/build/lib/commands/app-management.js.map +1 -1
  14. package/build/lib/commands/context.d.ts +8 -92
  15. package/build/lib/commands/context.d.ts.map +1 -1
  16. package/build/lib/commands/context.js +381 -439
  17. package/build/lib/commands/context.js.map +1 -1
  18. package/build/lib/commands/element.d.ts +8 -35
  19. package/build/lib/commands/element.d.ts.map +1 -1
  20. package/build/lib/commands/element.js +153 -136
  21. package/build/lib/commands/element.js.map +1 -1
  22. package/build/lib/commands/emu-console.d.ts +6 -48
  23. package/build/lib/commands/emu-console.d.ts.map +1 -1
  24. package/build/lib/commands/emu-console.js +19 -34
  25. package/build/lib/commands/emu-console.js.map +1 -1
  26. package/build/lib/commands/execute.d.ts +6 -5
  27. package/build/lib/commands/execute.d.ts.map +1 -1
  28. package/build/lib/commands/execute.js +77 -66
  29. package/build/lib/commands/execute.js.map +1 -1
  30. package/build/lib/commands/file-actions.d.ts +7 -128
  31. package/build/lib/commands/file-actions.d.ts.map +1 -1
  32. package/build/lib/commands/file-actions.js +183 -219
  33. package/build/lib/commands/file-actions.js.map +1 -1
  34. package/build/lib/commands/find.d.ts +8 -12
  35. package/build/lib/commands/find.d.ts.map +1 -1
  36. package/build/lib/commands/find.js +19 -23
  37. package/build/lib/commands/find.js.map +1 -1
  38. package/build/lib/commands/general.d.ts +9 -132
  39. package/build/lib/commands/general.d.ts.map +1 -1
  40. package/build/lib/commands/general.js +281 -312
  41. package/build/lib/commands/general.js.map +1 -1
  42. package/build/lib/commands/ime.d.ts +7 -10
  43. package/build/lib/commands/ime.d.ts.map +1 -1
  44. package/build/lib/commands/ime.js +47 -35
  45. package/build/lib/commands/ime.js.map +1 -1
  46. package/build/lib/commands/index.d.ts +27 -2
  47. package/build/lib/commands/index.d.ts.map +1 -1
  48. package/build/lib/commands/index.js +41 -19
  49. package/build/lib/commands/index.js.map +1 -1
  50. package/build/lib/commands/intent.d.ts +7 -417
  51. package/build/lib/commands/intent.d.ts.map +1 -1
  52. package/build/lib/commands/intent.js +104 -216
  53. package/build/lib/commands/intent.js.map +1 -1
  54. package/build/lib/commands/keyboard.d.ts +6 -5
  55. package/build/lib/commands/keyboard.d.ts.map +1 -1
  56. package/build/lib/commands/keyboard.js +16 -8
  57. package/build/lib/commands/keyboard.js.map +1 -1
  58. package/build/lib/commands/log.d.ts +7 -44
  59. package/build/lib/commands/log.d.ts.map +1 -1
  60. package/build/lib/commands/log.js +146 -108
  61. package/build/lib/commands/log.js.map +1 -1
  62. package/build/lib/commands/media-projection.d.ts +7 -143
  63. package/build/lib/commands/media-projection.d.ts.map +1 -1
  64. package/build/lib/commands/media-projection.js +113 -140
  65. package/build/lib/commands/media-projection.js.map +1 -1
  66. package/build/lib/commands/mixins.d.ts +740 -0
  67. package/build/lib/commands/mixins.d.ts.map +1 -0
  68. package/build/lib/commands/mixins.js +19 -0
  69. package/build/lib/commands/mixins.js.map +1 -0
  70. package/build/lib/commands/network.d.ts +7 -138
  71. package/build/lib/commands/network.d.ts.map +1 -1
  72. package/build/lib/commands/network.js +212 -254
  73. package/build/lib/commands/network.js.map +1 -1
  74. package/build/lib/commands/performance.d.ts +24 -70
  75. package/build/lib/commands/performance.d.ts.map +1 -1
  76. package/build/lib/commands/performance.js +144 -100
  77. package/build/lib/commands/performance.js.map +1 -1
  78. package/build/lib/commands/permissions.d.ts +8 -92
  79. package/build/lib/commands/permissions.d.ts.map +1 -1
  80. package/build/lib/commands/permissions.js +75 -87
  81. package/build/lib/commands/permissions.js.map +1 -1
  82. package/build/lib/commands/recordscreen.d.ts +7 -193
  83. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  84. package/build/lib/commands/recordscreen.js +151 -182
  85. package/build/lib/commands/recordscreen.js.map +1 -1
  86. package/build/lib/commands/shell.d.ts +7 -7
  87. package/build/lib/commands/shell.d.ts.map +1 -1
  88. package/build/lib/commands/shell.js +40 -33
  89. package/build/lib/commands/shell.js.map +1 -1
  90. package/build/lib/commands/streamscreen.d.ts +9 -103
  91. package/build/lib/commands/streamscreen.d.ts.map +1 -1
  92. package/build/lib/commands/streamscreen.js +261 -218
  93. package/build/lib/commands/streamscreen.js.map +1 -1
  94. package/build/lib/commands/system-bars.d.ts +22 -90
  95. package/build/lib/commands/system-bars.d.ts.map +1 -1
  96. package/build/lib/commands/system-bars.js +76 -74
  97. package/build/lib/commands/system-bars.js.map +1 -1
  98. package/build/lib/commands/touch.d.ts +10 -29
  99. package/build/lib/commands/touch.d.ts.map +1 -1
  100. package/build/lib/commands/touch.js +301 -285
  101. package/build/lib/commands/touch.js.map +1 -1
  102. package/build/lib/commands/types.d.ts +978 -0
  103. package/build/lib/commands/types.d.ts.map +1 -0
  104. package/build/lib/commands/types.js +3 -0
  105. package/build/lib/commands/types.js.map +1 -0
  106. package/build/lib/constraints.d.ts +291 -0
  107. package/build/lib/constraints.d.ts.map +1 -0
  108. package/build/lib/{desired-caps.js → constraints.js} +103 -102
  109. package/build/lib/constraints.js.map +1 -0
  110. package/build/lib/driver.d.ts +68 -37
  111. package/build/lib/driver.d.ts.map +1 -1
  112. package/build/lib/driver.js +123 -80
  113. package/build/lib/driver.js.map +1 -1
  114. package/build/lib/helpers/android.d.ts +164 -0
  115. package/build/lib/helpers/android.d.ts.map +1 -0
  116. package/build/lib/helpers/android.js +819 -0
  117. package/build/lib/helpers/android.js.map +1 -0
  118. package/build/lib/helpers/index.d.ts +7 -0
  119. package/build/lib/helpers/index.d.ts.map +1 -0
  120. package/build/lib/helpers/index.js +29 -0
  121. package/build/lib/helpers/index.js.map +1 -0
  122. package/build/lib/helpers/types.d.ts +121 -0
  123. package/build/lib/helpers/types.d.ts.map +1 -0
  124. package/build/lib/helpers/types.js +3 -0
  125. package/build/lib/helpers/types.js.map +1 -0
  126. package/build/lib/helpers/unlock.d.ts +32 -0
  127. package/build/lib/helpers/unlock.d.ts.map +1 -0
  128. package/build/lib/helpers/unlock.js +273 -0
  129. package/build/lib/helpers/unlock.js.map +1 -0
  130. package/build/lib/helpers/webview.d.ts +74 -0
  131. package/build/lib/helpers/webview.d.ts.map +1 -0
  132. package/build/lib/helpers/webview.js +421 -0
  133. package/build/lib/helpers/webview.js.map +1 -0
  134. package/build/lib/index.d.ts +9 -0
  135. package/build/lib/index.d.ts.map +1 -0
  136. package/build/lib/index.js +37 -0
  137. package/build/lib/index.js.map +1 -0
  138. package/build/lib/method-map.d.ts +0 -8
  139. package/build/lib/method-map.d.ts.map +1 -1
  140. package/build/lib/method-map.js +63 -74
  141. package/build/lib/method-map.js.map +1 -1
  142. package/build/lib/stubs.d.ts +0 -1
  143. package/build/lib/stubs.d.ts.map +1 -1
  144. package/build/lib/stubs.js +1 -0
  145. package/build/lib/stubs.js.map +1 -1
  146. package/build/lib/utils.d.ts +1 -1
  147. package/build/lib/utils.d.ts.map +1 -1
  148. package/lib/commands/actions.js +351 -464
  149. package/lib/commands/alert.js +27 -17
  150. package/lib/commands/app-management.js +156 -314
  151. package/lib/commands/context.js +457 -441
  152. package/lib/commands/element.js +201 -157
  153. package/lib/commands/emu-console.js +25 -45
  154. package/lib/commands/execute.js +106 -90
  155. package/lib/commands/file-actions.js +222 -240
  156. package/lib/commands/find.ts +103 -0
  157. package/lib/commands/general.js +327 -339
  158. package/lib/commands/ime.js +50 -34
  159. package/lib/commands/{index.js → index.ts} +20 -24
  160. package/lib/commands/intent.js +108 -249
  161. package/lib/commands/keyboard.js +20 -8
  162. package/lib/commands/log.js +172 -116
  163. package/lib/commands/media-projection.js +134 -161
  164. package/lib/commands/mixins.ts +966 -0
  165. package/lib/commands/network.js +252 -281
  166. package/lib/commands/performance.js +203 -132
  167. package/lib/commands/permissions.js +108 -109
  168. package/lib/commands/recordscreen.js +212 -209
  169. package/lib/commands/shell.js +51 -40
  170. package/lib/commands/streamscreen.js +355 -289
  171. package/lib/commands/system-bars.js +92 -83
  172. package/lib/commands/touch.js +357 -294
  173. package/lib/commands/types.ts +1097 -0
  174. package/lib/{desired-caps.js → constraints.ts} +106 -103
  175. package/lib/{driver.js → driver.ts} +278 -132
  176. package/lib/helpers/android.ts +1143 -0
  177. package/lib/helpers/index.ts +6 -0
  178. package/lib/helpers/types.ts +134 -0
  179. package/lib/helpers/unlock.ts +329 -0
  180. package/lib/helpers/webview.ts +582 -0
  181. package/lib/index.ts +18 -0
  182. package/lib/method-map.js +87 -98
  183. package/lib/stubs.ts +0 -1
  184. package/package.json +26 -19
  185. package/build/index.js +0 -51
  186. package/build/lib/android-helpers.d.ts +0 -136
  187. package/build/lib/android-helpers.d.ts.map +0 -1
  188. package/build/lib/android-helpers.js +0 -855
  189. package/build/lib/android-helpers.js.map +0 -1
  190. package/build/lib/commands/coverage.d.ts +0 -5
  191. package/build/lib/commands/coverage.d.ts.map +0 -1
  192. package/build/lib/commands/coverage.js +0 -19
  193. package/build/lib/commands/coverage.js.map +0 -1
  194. package/build/lib/desired-caps.d.ts +0 -353
  195. package/build/lib/desired-caps.d.ts.map +0 -1
  196. package/build/lib/desired-caps.js.map +0 -1
  197. package/build/lib/unlock-helpers.d.ts +0 -38
  198. package/build/lib/unlock-helpers.d.ts.map +0 -1
  199. package/build/lib/unlock-helpers.js +0 -266
  200. package/build/lib/unlock-helpers.js.map +0 -1
  201. package/build/lib/webview-helpers.d.ts +0 -224
  202. package/build/lib/webview-helpers.d.ts.map +0 -1
  203. package/build/lib/webview-helpers.js +0 -528
  204. package/build/lib/webview-helpers.js.map +0 -1
  205. package/index.js +0 -24
  206. package/lib/android-helpers.js +0 -983
  207. package/lib/commands/coverage.js +0 -18
  208. package/lib/commands/find.js +0 -82
  209. package/lib/unlock-helpers.js +0 -278
  210. package/lib/webview-helpers.js +0 -602
@@ -0,0 +1,1097 @@
1
+ import {HTTPMethod, StringRecord} from '@appium/types';
2
+ import {InstallOptions, UninstallOptions} from 'appium-adb';
3
+
4
+ export interface SwipeOpts {
5
+ startX: number;
6
+ startY: number;
7
+ endX: number;
8
+ endY: number;
9
+ steps: number;
10
+ elementId?: string | number;
11
+ }
12
+
13
+ export interface DragOpts {
14
+ elementId?: string | number;
15
+ destElId?: string | number;
16
+ startX: number;
17
+ startY: number;
18
+ endX: number;
19
+ endY: number;
20
+ steps: number;
21
+ }
22
+
23
+ /**
24
+ * @privateRemarks probably better defined in `appium-adb`
25
+ */
26
+ export type GsmAction = 'call' | 'accept' | 'cancel' | 'hold';
27
+
28
+ export interface GsmCallOpts {
29
+ /**
30
+ * The phone number to call to
31
+ */
32
+ phoneNumber: string;
33
+ /**
34
+ * Action to take
35
+ */
36
+ action: GsmAction;
37
+ }
38
+
39
+ /**
40
+ * One of possible signal strength values, where 4 is the best signal.
41
+ * @privateRemarks maybe should be an enum?
42
+ */
43
+ export type GsmSignalStrength = 0 | 1 | 2 | 3 | 4;
44
+
45
+ export interface GsmSignalStrengthOpts {
46
+ /**
47
+ * The signal strength value
48
+ */
49
+ strength: GsmSignalStrength;
50
+ }
51
+
52
+ export interface SendSMSOpts {
53
+ /**
54
+ * The phone number to send SMS to
55
+ */
56
+ phoneNumber: string;
57
+ /**
58
+ * The message payload
59
+ */
60
+ message: string;
61
+ }
62
+
63
+ export interface FingerprintOpts {
64
+ /**
65
+ * The value is the `finger_id` for the finger that was "scanned". It is a
66
+ * unique integer that you assign for each virtual fingerprint. When the app
67
+ * is running you can run this same command each time the emulator prompts you
68
+ * for a fingerprint, you can run the adb command and pass it the `finger_id`
69
+ * to simulate the fingerprint scan.
70
+ */
71
+ fingerprintId: string | number;
72
+ }
73
+
74
+ export type GsmVoiceState = 'on' | 'off';
75
+
76
+ export type PowerACState = 'on' | 'off';
77
+
78
+ export interface GsmVoiceOpts {
79
+ state: GsmVoiceState;
80
+ }
81
+
82
+ export interface PowerACOpts {
83
+ state: PowerACState;
84
+ }
85
+
86
+ export interface PowerCapacityOpts {
87
+ /**
88
+ * Percentage value in range `[0, 100]`
89
+ */
90
+ percent: number;
91
+ }
92
+
93
+ export interface SensorSetOpts {
94
+ /**
95
+ * Sensor type as declared in `adb.SENSORS`
96
+ * @privateRemarks what is `adb.SENSORS`?
97
+ *
98
+ */
99
+ sensorType: string;
100
+ /**
101
+ * Value to set to the sensor
102
+ */
103
+ value: string;
104
+ }
105
+
106
+ export type NetworkSpeed =
107
+ | 'gsm'
108
+ | 'scsd'
109
+ | 'gprs'
110
+ | 'edge'
111
+ | 'umts'
112
+ | 'hsdpa'
113
+ | 'lte'
114
+ | 'evdo'
115
+ | 'full';
116
+
117
+ export interface NetworkSpeedOpts {
118
+ speed: NetworkSpeed;
119
+ }
120
+
121
+ export interface IsAppInstalledOpts {
122
+ /**
123
+ * Application package identifier
124
+ */
125
+ appId: string;
126
+ }
127
+
128
+ export interface ClearAppOpts {
129
+ /**
130
+ * Application package identifier
131
+ */
132
+ appId: string;
133
+ }
134
+
135
+ export interface QueryAppStateOpts {
136
+ /**
137
+ * Application package identifier
138
+ */
139
+ appId: string;
140
+ }
141
+
142
+ /**
143
+ * Returned by `queryAppState`
144
+ * - `0` - is the app is not installed
145
+ * - `1` - if the app is installed, but is not running
146
+ * - `3` - if the app is running in the background
147
+ * - `4` - if the app is running in the foreground
148
+ */
149
+ export type AppState = 0 | 1 | 3 | 4;
150
+
151
+ export interface TerminateAppOpts {
152
+ /**
153
+ * The count of milliseconds to wait until the app is terminated.
154
+ * @defaultValue 500
155
+ */
156
+ timeout?: number | string;
157
+ /**
158
+ * Application package identifier
159
+ */
160
+ appId: string;
161
+ }
162
+
163
+ export interface ActivateAppOpts {
164
+ /**
165
+ * Application package identifier
166
+ */
167
+ appId: string;
168
+ }
169
+
170
+ export interface RemoveAppOpts extends UninstallOptions {
171
+ appId: string;
172
+ }
173
+
174
+ export interface InstallAppOpts extends InstallOptions {
175
+ appPath: string;
176
+ }
177
+
178
+ export interface WebviewsMapping {
179
+ /**
180
+ * The name of the Devtools Unix socket
181
+ */
182
+ proc: string;
183
+ /**
184
+ * The web view alias. Looks like `WEBVIEW_` prefix plus PID or package name
185
+ */
186
+ webview: string;
187
+ /**
188
+ * Webview information as it is retrieved by `/json/version` CDP endpoint
189
+ */
190
+ info?: StringRecord;
191
+ /**
192
+ * Webview pages list as it is retrieved by `/json/list` CDP endpoint
193
+ */
194
+ pages: StringRecord[];
195
+ /**
196
+ * An actual webview name for switching context.
197
+ *
198
+ * This value becomes `null` when failing to find a PID for a webview.
199
+ *
200
+ * In the example, `description` in `page` can be an empty string most likely when it comes to Mobile Chrome.
201
+ *
202
+ * @example
203
+ *
204
+ * ```json
205
+ * {
206
+ * "proc": "@webview_devtools_remote_22138",
207
+ * "webview": "WEBVIEW_22138",
208
+ * "info": {
209
+ * "Android-Package": "io.appium.settings",
210
+ * "Browser": "Chrome/74.0.3729.185",
211
+ * "Protocol-Version": "1.3",
212
+ * "User-Agent": "Mozilla/5.0 (Linux; Android 10; Android SDK built for x86 Build/QSR1.190920.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36",
213
+ * "V8-Version": "7.4.288.28",
214
+ * "WebKit-Version": "537.36 (@22955682f94ce09336197bfb8dffea991fa32f0d)",
215
+ * "webSocketDebuggerUrl": "ws://127.0.0.1:10900/devtools/browser"
216
+ * },
217
+ * "pages": [
218
+ * {
219
+ * "description": "{\"attached\":true,\"empty\":false,\"height\":1458,\"screenX\":0,\"screenY\":336,\"visible\":true,\"width\":1080}",
220
+ * "devtoolsFrontendUrl": "http://chrome-devtools-frontend.appspot.com/serve_rev/@22955682f94ce09336197bfb8dffea991fa32f0d/inspector.html?ws=127.0.0.1:10900/devtools/page/27325CC50B600D31B233F45E09487B1F",
221
+ * "id": "27325CC50B600D31B233F45E09487B1F",
222
+ * "title": "Releases · appium/appium · GitHub",
223
+ * "type": "page",
224
+ * "url": "https://github.com/appium/appium/releases",
225
+ * "webSocketDebuggerUrl": "ws://127.0.0.1:10900/devtools/page/27325CC50B600D31B233F45E09487B1F"
226
+ * }
227
+ * ],
228
+ * "webviewName": "WEBVIEW_com.io.appium.setting"
229
+ * }
230
+ * ```
231
+ */
232
+ webviewName?: string | null;
233
+ }
234
+
235
+ /**
236
+ * A list of ports.
237
+ *
238
+ * Tuples are used to specify a range of ports. If values are strings, they
239
+ * must be convertable to integers.
240
+ *
241
+ * @example
242
+ * ```js
243
+ * [8000, 8001, 8002]
244
+ * [[8000, 8005]]
245
+ * [8000, [9000, 9100]]
246
+ * ```
247
+ */
248
+ export type PortSpec = Array<
249
+ number | string | [startPort: number | string, endPort: number | string]
250
+ >;
251
+
252
+ export interface DoSetElementValueOpts {
253
+ elementId: string;
254
+ text: string;
255
+ replace: boolean;
256
+ unicodeKeyboard?: boolean;
257
+ }
258
+
259
+ export interface ExecOptions {
260
+ /**
261
+ * The actual command to execute.
262
+ *
263
+ * @see {@link https://developer.android.com/studio/run/emulator-console}
264
+ */
265
+ command: string | string[];
266
+ /**
267
+ * A timeout used to wait for a server reply to the given command in
268
+ * milliseconds
269
+ * @defaultValue 60000
270
+ */
271
+ execTimeout?: number;
272
+ /**
273
+ * Console connection timeout in milliseconds
274
+ * @defaultValue 5000
275
+ */
276
+ connTimeout?: number;
277
+ /**
278
+ * Telnet console initialization timeout in milliseconds (the time between the
279
+ * connection happens and the command prompt is available)
280
+ */
281
+ initTimeout?: number;
282
+ }
283
+
284
+ export interface PullFileOpts {
285
+ /**
286
+ * The full path to the remote file or a specially formatted path, which
287
+ * points to an item inside an app bundle, for example `@my.app.id/my/path`.
288
+ * It is mandatory for the app bundle to have debugging enabled in order to
289
+ * use the latter `remotePath` format.
290
+ */
291
+ remotePath: string;
292
+ }
293
+
294
+ export interface PushFileOpts {
295
+ /**
296
+ * The full path to the remote file or a specially formatted path, which
297
+ * points to an item inside an app bundle, for example `@my.app.id/my/path`.
298
+ * It is mandatory for the app bundle to have debugging enabled in order to
299
+ * use the latter `remotePath` format.
300
+ */
301
+ remotePath: string;
302
+ /**
303
+ * Base64-encoded content of the file to be pushed.
304
+ */
305
+ payload: string;
306
+ }
307
+
308
+ export interface PullFolderOpts {
309
+ /**
310
+ * The full path to the remote folder
311
+ */
312
+ remotePath: string;
313
+ }
314
+
315
+ export interface DeleteFileOpts {
316
+ /**
317
+ * The full path to the remote file or a file inside an application bundle
318
+ * (for example `@my.app.id/path/in/bundle`)
319
+ */
320
+ remotePath: string;
321
+ }
322
+
323
+ export interface FindElementOpts {
324
+ strategy: string;
325
+ selector: string;
326
+ context: string;
327
+ multiple: boolean;
328
+ }
329
+
330
+ export interface SendKeysOpts {
331
+ text: string;
332
+ // XXX: unclear if this is required
333
+ replace?: boolean;
334
+ unicodeKeyboard?: boolean;
335
+ }
336
+
337
+ export interface DeviceTimeOpts {
338
+ /**
339
+ * @defaultValue 'YYYY-MM-DDTHH:mm:ssZ'
340
+ */
341
+ format?: string;
342
+ }
343
+
344
+ export interface PerformEditorActionOpts {
345
+ action: string | number;
346
+ }
347
+
348
+ export interface ListSmsOpts {
349
+ /**
350
+ * Maximum count of recent SMS messages
351
+ * @defaultValue 100
352
+ */
353
+ max?: number;
354
+ }
355
+
356
+ export type UnlockType = 'pin' | 'pinWithKeyEvent' | 'password' | 'pattern';
357
+
358
+ export type UnlockStrategy = 'locksettings' | 'uiautomator';
359
+
360
+ export interface UnlockOptions {
361
+ /**
362
+ * The unlock key. The value of this key depends on the actual unlock type and
363
+ * could be a pin/password/pattern value or a biometric finger id.
364
+ *
365
+ * If not provided then the corresponding value from session capabilities is
366
+ * used.
367
+ */
368
+ key?: string;
369
+ /**
370
+ * The unlock type.
371
+ *
372
+ * If not provided then the corresponding value from session capabilities is
373
+ * used.
374
+ */
375
+ type?: UnlockType;
376
+ /**
377
+ * Setting it to 'uiautomator' will enforce the driver to avoid using special
378
+ * ADB shortcuts in order to speed up the unlock procedure.
379
+ * @defaultValue 'uiautomator'
380
+ */
381
+ strategy?: UnlockStrategy;
382
+ /**
383
+ * The maximum time in milliseconds to wait until the screen gets unlocked
384
+ * @defaultValue 2000
385
+ */
386
+ timeoutMs?: number;
387
+ }
388
+
389
+ export interface IntentOpts {
390
+ /**
391
+ * The user ID for which the service is started.
392
+ * The `current` user id is used by default
393
+ * @defaultValue 'current'
394
+ * @example
395
+ */
396
+ user?: string | number;
397
+ /**
398
+ * The name of the activity intent to start, for example
399
+ * `com.some.package.name/.YourServiceSubClassName`
400
+ */
401
+ intent?: string;
402
+ /**
403
+ * Action name
404
+ */
405
+ action?: string;
406
+ /**
407
+ * Package name
408
+ */
409
+ package?: string;
410
+ /**
411
+ * Unified resource identifier
412
+ */
413
+ uri?: string;
414
+ /**
415
+ * Mime type
416
+ */
417
+ mimeType?: string;
418
+ /**
419
+ * Optional identifier
420
+ */
421
+ identifier?: string;
422
+ /**
423
+ * Component name
424
+ */
425
+ component?: string;
426
+
427
+ /**
428
+ * One or more category names
429
+ */
430
+ categories?: string | string[];
431
+ /**
432
+ * Optional intent arguments.
433
+ *
434
+ * Must be represented as array of arrays, where each subarray item contains
435
+ * two or three string items:* value type, key name and the value itself.
436
+ *
437
+ * Supported value types are:
438
+ *
439
+ * - s: string. Value must be a valid string
440
+ * - sn: null. Value is ignored for this type
441
+ * - z: boolean. Value must be either `true` or `false`
442
+ * - i: integer. Value must be a valid 4-byte integer number
443
+ * - l: long. Value must be a valid 8-byte long number
444
+ * - f: float: Value must be a valid float number
445
+ * - u: uri. Value must be a valid uniform resource identifier string
446
+ * - cn: component name. Value must be a valid component name string
447
+ * - ia: Integer[]. Value must be a string of comma-separated integers
448
+ * - ial: List<Integer>. Value must be a string of comma-separated integers
449
+ * - la: Long[]. Value must be a string of comma-separated long numbers
450
+ * - lal: List<Long>. Value must be a string of comma-separated long numbers
451
+ * - fa: Float[]. Value must be a string of comma-separated float numbers
452
+ * - fal: List<Float>. Value must be a string of comma-separated float numbers
453
+ * - sa: String[]. Value must be comma-separated strings. To embed a comma
454
+ * into a string, escape it using "\,"
455
+ * - sal: List<String>. Value must be comma-separated strings. To embed a
456
+ * comma into a string, escape it using "\," For example: `[['s',
457
+ * 'varName1', 'My String1'], ['s', 'varName2', 'My String2'], ['ia',
458
+ * 'arrName', '1,2,3,4']]`
459
+ */
460
+ extras?: string[][];
461
+
462
+ /**
463
+ * Intent startup-specific flags as a hexadecimal string.
464
+ *
465
+ * See https://developer.android.com/reference/android/content/Intent.html for
466
+ * the list of available flag values (constants starting with
467
+ * `FLAG_ACTIVITY_`). Flag values could be merged using the logical 'or'
468
+ * operation. For example, 0x10200000 is the combination of two flags:
469
+ * 0x10000000 `FLAG_ACTIVITY_NEW_TASK` | 0x00200000
470
+ * `FLAG_ACTIVITY_RESET_TASK_IF_NEEDED`
471
+ */
472
+ flags?: string;
473
+ }
474
+
475
+ export interface StartActivityOpts extends IntentOpts {
476
+ /**
477
+ * Set it to `true` if you want to block the method call
478
+ * until the activity manager's process returns the control to the system.
479
+ * @defaultValue false
480
+ */
481
+ wait?: boolean;
482
+ /**
483
+ * Set it to `true` to force stop the target
484
+ * app before starting the activity
485
+ * @defaultValue false
486
+ */
487
+ stop?: boolean;
488
+ /**
489
+ * The windowing mode to launch the activity into.
490
+ *
491
+ * Check
492
+ * https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/WindowConfiguration.java
493
+ * for more details on possible windowing modes (constants starting with
494
+ * `WINDOWING_MODE_`).
495
+ */
496
+ windowingMode?: number | string;
497
+ /**
498
+ * The activity type to launch the activity as.
499
+ *
500
+ * Check https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/WindowConfiguration.java
501
+ * for more details on possible activity types (constants starting with `ACTIVITY_TYPE_`).
502
+ */
503
+ activityType?: number | string;
504
+ /**
505
+ * The display identifier to launch the activity into.
506
+ */
507
+ display?: number | string;
508
+ }
509
+
510
+ export interface BroadcastOpts extends IntentOpts {
511
+ /**
512
+ * The user ID for which the broadcast is sent.
513
+ *
514
+ * The `current` alias assumes the current user ID.
515
+ * @defaultValue `all`
516
+ */
517
+ user?: string | number;
518
+ /**
519
+ * Require receiver to hold the given permission.
520
+ */
521
+ receiverPermission?: string;
522
+ /**
523
+ * Whether the receiver may start activities even if in the background.
524
+ */
525
+ allowBackgroundActivityStarts?: boolean;
526
+ }
527
+
528
+ export interface StartServiceOpts extends IntentOpts {
529
+ /**
530
+ * Set it to `true` if your service must be started as foreground service.
531
+ *
532
+ * This option is ignored if the API level of the device under test is below
533
+ * 26 (Android 8).
534
+ */
535
+ foreground?: boolean;
536
+ }
537
+
538
+ export type StopServiceOpts = IntentOpts;
539
+
540
+ export interface StartMediaProjectionRecordingOpts {
541
+ /**
542
+ * Maximum supported resolution on-device (Detected automatically by the app
543
+ * itself), which usually equals to Full HD 1920x1080 on most phones however
544
+ * you can change it to following supported resolutions as well: "1920x1080",
545
+ * "1280x720", "720x480", "320x240", "176x144".
546
+ */
547
+ resolution?: string;
548
+ /**
549
+ * Maximum allowed duration is 15 minutes; you can increase it if your test
550
+ * takes longer than that.
551
+ * @defaultValue 900
552
+ */
553
+ maxDurationSec?: number;
554
+ /**
555
+ * Recording thread priority.
556
+ *
557
+ * If you face performance drops during testing with recording enabled, you
558
+ * can reduce recording priority
559
+ *
560
+ * @defaultValue 'high'
561
+ */
562
+ priority?: 'high' | 'normal' | 'low';
563
+ /**
564
+ * You can type recording video file name as you want, but recording currently
565
+ * supports only "mp4" format so your filename must end with ".mp4". An
566
+ * invalid file name will fail to start the recording. If not provided then
567
+ * the current timestamp will be used as file name.
568
+ */
569
+ filename?: string;
570
+ }
571
+
572
+ export interface StopMediaProjectionRecordingOpts {
573
+ /**
574
+ * The path to the remote location, where the resulting video should be
575
+ * uploaded. The following protocols are supported: http/https, ftp. Null or
576
+ * empty string value (the default setting) means the content of resulting
577
+ * file should be encoded as Base64 and passed as the endpoont response value.
578
+ * An exception will be thrown if the generated media file is too big to fit
579
+ * into the available process memory.
580
+ */
581
+ remotePath?: string;
582
+ /**
583
+ * The name of the user for the remote authentication.
584
+ */
585
+ user?: string;
586
+ /**
587
+ * The password for the remote authentication.
588
+ */
589
+ pass?: string;
590
+ /**
591
+ * The http multipart upload method name.
592
+ * @defaultValue 'PUT'
593
+ */
594
+ method?: HTTPMethod;
595
+ /**
596
+ * Additional headers mapping for multipart http(s) uploads
597
+ */
598
+ headers?: StringRecord;
599
+ /**
600
+ * The name of the form field, where the file content BLOB should be stored
601
+ * for http(s) uploads
602
+ * @defaultValue 'file'
603
+ */
604
+ fileFieldName?: string;
605
+ /**
606
+ * Additional form fields for multipart http(s) uploads
607
+ */
608
+ formFields?: FormFields;
609
+ /**
610
+ * The actual media upload request timeout in milliseconds.
611
+ *
612
+ * Defaults to `@appium/support.net.DEFAULT_TIMEOUT_MS`
613
+ */
614
+ uploadTimeout?: number;
615
+ }
616
+
617
+ export type FormFields = StringRecord | [key: string, value: any][];
618
+
619
+ export interface GetConnectivityResult {
620
+ /**
621
+ * True if wifi is enabled
622
+ */
623
+ wifi: boolean;
624
+ /**
625
+ * True if mobile data connection is enabled
626
+ */
627
+ data: boolean;
628
+ /**
629
+ * True if Airplane Mode is enabled
630
+ */
631
+ airplaneMode: boolean;
632
+ }
633
+
634
+ export type ServiceType = 'wifi' | 'data' | 'airplaneMode';
635
+
636
+ export interface GetConnectivityOpts {
637
+ /**
638
+ * one or more services to get the connectivity for.
639
+ */
640
+ services?: ServiceType[] | ServiceType;
641
+ }
642
+
643
+ export interface SetConnectivityOpts {
644
+ /**
645
+ * Either to enable or disable Wi-Fi.
646
+ * An unset value means to not change the state for the given service.
647
+ */
648
+ wifi?: boolean;
649
+
650
+ /**
651
+ * Either to enable or disable mobile data connection.
652
+ * An unset value means to not change the state for the given service.
653
+ */
654
+ data?: boolean;
655
+
656
+ /**
657
+ * Either to enable to disable the Airplane Mode
658
+ * An unset value means to not change the state for the given service.
659
+ */
660
+ airplaneMode?: boolean;
661
+ }
662
+
663
+ export interface GpsCacheRefreshOpts {
664
+ /**
665
+ * The maximum number of milliseconds
666
+ * to block until GPS cache is refreshed. Providing zero or a negative
667
+ * value to it skips waiting completely.
668
+ * @defaultValue 20000
669
+ */
670
+ timeoutMs?: number;
671
+ }
672
+
673
+ export interface PerformanceDataOpts {
674
+ /**
675
+ * The name of the package identifier to fetch the data for
676
+ */
677
+ packageName: string;
678
+ /**
679
+ * One of supported subsystem to fetch the data for.
680
+ */
681
+ dataType: PerformanceDataType;
682
+ }
683
+
684
+ export type PerformanceDataType = 'batteryinfo' | 'cpuinfo' | 'memoryinfo' | 'networkinfo';
685
+
686
+ export interface GetPermissionsOpts {
687
+ /**
688
+ * One of possible permission types to get.
689
+ * @defaultValue 'requested'
690
+ */
691
+ type?: string;
692
+ /**
693
+ * The application package to set change permissions on. Defaults to the
694
+ * package name under test
695
+ */
696
+ appPackage?: string;
697
+ }
698
+
699
+ export interface ChangePermissionsOpts {
700
+ /**
701
+ * If `target` is set to 'pm':
702
+ * The full name of the permission to be changed
703
+ * or a list of permissions. Check https://developer.android.com/reference/android/Manifest.permission
704
+ * to get the full list of standard Android permssion names. Mandatory argument.
705
+ * If 'all' magic string is passed then the chosen action is going to be applied to all
706
+ * permisisons requested/granted by 'appPackage'.
707
+ * If `target` is set to 'appops':
708
+ * The full name of the appops permission to be changed
709
+ * or a list of permissions. Check AppOpsManager.java sources to get the full list of
710
+ * available appops permission names. Mandatory argument.
711
+ * Examples: 'ACTIVITY_RECOGNITION', 'SMS_FINANCIAL_TRANSACTIONS', 'READ_SMS', 'ACCESS_NOTIFICATIONS'.
712
+ * The 'all' magic string is unsupported.
713
+ */
714
+ permissions: string | string[];
715
+ /**
716
+ * The application package to set change permissions on. Defaults to the
717
+ * package name under test
718
+ */
719
+ appPackage?: string;
720
+ /**
721
+ * One of `PM_ACTION` values if `target` is set to 'pm', otherwise one of `APPOPS_ACTION` values
722
+ */
723
+ action?: string;
724
+ /**
725
+ * Either 'pm' or 'appops'. The 'appops' one requires 'adb_shell' server security option to be enabled.
726
+ * @defaultValue 'pm'
727
+ */
728
+ target?: 'pm' | 'appops';
729
+ }
730
+
731
+ export interface StartScreenRecordingOpts {
732
+ /**
733
+ * The path to the remote location, where the captured video should be
734
+ * uploaded.
735
+ *
736
+ * The following protocols are supported: http/https, ftp. Null or empty
737
+ * string value (the default setting) means the content of resulting file
738
+ * should be encoded as Base64 and passed as the endpount response value. An
739
+ * exception will be thrown if the generated media file is too big to fit into
740
+ * the available process memory. This option only has an effect if there is
741
+ * screen recording process in progreess and `forceRestart` parameter is not
742
+ * set to `true`.
743
+ */
744
+ remotePath?: string;
745
+ /**
746
+ * The name of the user for the remote authentication. Only works if
747
+ * `remotePath` is provided.
748
+ */
749
+ user?: string;
750
+ /**
751
+ * The password for the remote authentication. Only works if `remotePath` is
752
+ * provided.
753
+ */
754
+ pass?: string;
755
+ /**
756
+ * The http multipart upload method name. Only works if `remotePath` is provided.
757
+ * @defaultValue 'PUT
758
+ */
759
+ method?: HTTPMethod;
760
+ /**
761
+ * Additional headers mapping for multipart http(s) uploads
762
+ */
763
+ headers?: StringRecord;
764
+ /**
765
+ * The name of the form field, where the file content BLOB should be stored
766
+ * for http(s) uploads
767
+ * @defaultValue 'file'
768
+ */
769
+ fileFieldName?: string;
770
+ /**
771
+ * Additional form fields for multipart http(s) uploads
772
+ */
773
+ formFields?: FormFields;
774
+ /**
775
+ * The format is `<width>x<height>`.
776
+ *
777
+ * The default value is the device's native display resolution (if supported),
778
+ * `1280x720` if not. For best results, use a size supported by your device's
779
+ * Advanced Video Coding (AVC) encoder. For example, `1280x720`
780
+ */
781
+ videoSize?: string;
782
+ /**
783
+ * Set it to `true` in order to display additional information on the video
784
+ * overlay, such as a timestamp, that is helpful in videos captured to
785
+ * illustrate bugs. This option is only supported since API level 27 (Android
786
+ * P).
787
+ */
788
+ bugReport?: boolean;
789
+ /**
790
+ * The maximum recording time, in seconds.
791
+ *
792
+ * The maximum value is 1800 (30 minutes). If the passed value is greater than
793
+ * 180 then the algorithm will try to schedule multiple screen recording
794
+ * chunks and merge the resulting videos into a single media file using
795
+ * `ffmpeg` utility. If the utility is not available in PATH then the most
796
+ * recent screen recording chunk is going to be returned.
797
+ *
798
+ * @defaultValue 180
799
+ */
800
+ timeLimit?: string | number;
801
+ /**
802
+ * The video bit rate for the video, in bits per second.
803
+ *
804
+ * The default value is 4 Mbit/s. You can increase the bit rate to improve
805
+ * video quality, but doing so results in larger movie files.
806
+ *
807
+ * @defaultValue 4000000
808
+ */
809
+ bitRate?: string | number;
810
+ /**
811
+ * Whether to try to catch and upload/return the currently running screen
812
+ * recording
813
+ *
814
+ * Set to `true` top ignore the result of the currently-running screen
815
+ * recording and start a new recording immediately
816
+ */
817
+ forceRestart?: boolean;
818
+ }
819
+
820
+ export interface StopScreenRecordingOpts {
821
+ /**
822
+ * The path to the remote location, where the resulting video should be
823
+ * uploaded.
824
+ *
825
+ * The following protocols are supported: http/https, ftp. Null or empty
826
+ * string value (the default setting) means the content of resulting file
827
+ * should be encoded as Base64 and passed as the endpount response value. An
828
+ * exception will be thrown if the generated media file is too big to fit into
829
+ * the available process memory.
830
+ */
831
+ remotePath?: string;
832
+ /**
833
+ * The name of the user for the remote authentication.
834
+ */
835
+ user?: string;
836
+ /**
837
+ * The password for the remote authentication.
838
+ */
839
+ pass?: string;
840
+ /**
841
+ * The http multipart upload method name. The 'PUT' one is used by default.
842
+ */
843
+ method?: HTTPMethod;
844
+ /**
845
+ * Additional headers mapping for multipart http(s) uploads
846
+ */
847
+ headers?: StringRecord;
848
+ /**
849
+ * The name of the form field, where the file content BLOB should be stored for http(s) uploads
850
+ *
851
+ * @defaultValue 'file'
852
+ */
853
+ fileFieldName?: string;
854
+ /**
855
+ * Additional form fields for multipart http(s) uploads
856
+ */
857
+ formFields?: FormFields;
858
+ }
859
+
860
+ /**
861
+ * @privateRemarks inferred from usage
862
+ */
863
+ export interface ShellOpts {
864
+ command: string;
865
+ args?: string[];
866
+ timeout?: number;
867
+ includeStderr?: boolean;
868
+ }
869
+
870
+ export interface StartScreenStreamingOpts {
871
+ /**
872
+ * The scaled width of the device's screen.
873
+ *
874
+ * If unset then the script will assign it to the actual screen width measured
875
+ * in pixels.
876
+ */
877
+ width?: number;
878
+ /**
879
+ * The scaled height of the device's screen.
880
+ *
881
+ * If unset then the script will assign it to the actual screen height
882
+ * measured in pixels.
883
+ */
884
+ height?: number;
885
+ /**
886
+ * The video bit rate for the video, in bits per second.
887
+ *
888
+ * The default value is 4 Mb/s. You can increase the bit rate to improve video
889
+ * quality, but doing so results in larger movie files.
890
+ * @defaultValue 4000000
891
+ */
892
+ bitRate?: number;
893
+ /**
894
+ * The IP address/host name to start the MJPEG server on.
895
+ *
896
+ * You can set it to `0.0.0.0` to trigger the broadcast on all available
897
+ * network interfaces.
898
+ *
899
+ * @defaultValue '127.0.0.1'
900
+ */
901
+ host?: string;
902
+ /**
903
+ * The HTTP request path the MJPEG server should be available on.
904
+ *
905
+ * If unset, then any pathname on the given `host`/`port` combination will
906
+ * work. Note that the value should always start with a single slash: `/`
907
+ */
908
+ pathname?: string;
909
+ /**
910
+ * The port number to start the internal TCP MJPEG broadcast on.
911
+ *
912
+ * This type of broadcast always starts on the loopback interface
913
+ * (`127.0.0.1`).
914
+ *
915
+ * @defaultValue 8094
916
+ */
917
+ tcpPort?: number;
918
+ /**
919
+ * The port number to start the MJPEG server on.
920
+ *
921
+ * @defaultValue 8093
922
+ */
923
+ port?: number;
924
+ /**
925
+ * The quality value for the streamed JPEG images.
926
+ *
927
+ * This number should be in range `[1,100]`, where `100` is the best quality.
928
+ *
929
+ * @defaultValue 70
930
+ */
931
+ quality?: number;
932
+ /**
933
+ * If set to `true` then GStreamer pipeline will increase the dimensions of
934
+ * the resulting images to properly fit images in both landscape and portrait
935
+ * orientations.
936
+ *
937
+ * Set it to `true` if the device rotation is not going to be the same during
938
+ * the broadcasting session.
939
+ */
940
+ considerRotation?: boolean;
941
+ /**
942
+ * Whether to log GStreamer pipeline events into the standard log output.
943
+ *
944
+ * Might be useful for debugging purposes.
945
+ */
946
+ logPipelineDetails?: boolean;
947
+ }
948
+
949
+ export interface DeviceInfo {
950
+ width: number;
951
+ height: number;
952
+ fps: number;
953
+ udid: string;
954
+ }
955
+
956
+ /**
957
+ * @internal
958
+ */
959
+ export interface InitGStreamerPipelineOpts {
960
+ width?: number | string;
961
+ height?: number | string;
962
+ quality: number;
963
+ tcpPort: number;
964
+ considerRotation?: boolean;
965
+ logPipelineDetails?: boolean;
966
+ }
967
+ export interface WindowProperties {
968
+ /**
969
+ * Whether the window is visible
970
+ */
971
+ visible: boolean;
972
+ /**
973
+ * Window x coordinate
974
+ */
975
+ x: number;
976
+ /**
977
+ * Window y coordinate
978
+ */
979
+ y: number;
980
+ /**
981
+ * Window width
982
+ */
983
+ width: number;
984
+ /**
985
+ * Window height
986
+ */
987
+ height: number;
988
+ }
989
+
990
+ /**
991
+ * Commands for interacting with the Android status bar.
992
+ *
993
+ * - expandNotifications: Open the notifications panel.
994
+ * - expandSettings: Open the notifications panel and expand quick settings if present.
995
+ * - collapse: Collapse the notifications and settings panel.
996
+ * - addTile: Add a TileService of the specified component.
997
+ * - removeTile: Remove a TileService of the specified component.
998
+ * - clickTile: Click on a TileService of the specified component.
999
+ * - getStatusIcons: Print the list of status bar icons and the order they appear in.
1000
+ */
1001
+ export type StatusBarCommand =
1002
+ | 'expandNotifications'
1003
+ | 'expandSettings'
1004
+ | 'collapse'
1005
+ | 'addTile'
1006
+ | 'removeTile'
1007
+ | 'clickTile'
1008
+ | 'getStatusIcons';
1009
+
1010
+ export interface StatusBarCommandOpts {
1011
+ /**
1012
+ * Each list item must separated with a new line (`\n`) character.
1013
+ */
1014
+ command: StatusBarCommand;
1015
+ /**
1016
+ * The name of the tile component.
1017
+ *
1018
+ * It is only required for `(add|remove|click)Tile` commands.
1019
+ * Example value: `com.package.name/.service.QuickSettingsTileComponent`
1020
+ */
1021
+ component?: string;
1022
+ }
1023
+
1024
+ export type TouchActionKind =
1025
+ | 'tap'
1026
+ | 'press'
1027
+ | 'release'
1028
+ | 'moveTo'
1029
+ | 'wait'
1030
+ | 'longPress'
1031
+ | 'cancel';
1032
+
1033
+ export interface TouchActionOpts {
1034
+ element?: string;
1035
+ x?: number;
1036
+ y?: number;
1037
+ count?: number;
1038
+ ms?: number;
1039
+ duration?: number;
1040
+ }
1041
+
1042
+ export interface TouchOpts {
1043
+ x?: number;
1044
+ y?: number;
1045
+ element?: string;
1046
+ duration?: number;
1047
+ ms?: number;
1048
+ }
1049
+
1050
+ export type TouchState = TouchAction & {
1051
+ timeOffset: number;
1052
+ };
1053
+
1054
+ /**
1055
+ * @privateRemarks FIXME: Is this the same as {@link SwipeOpts}?
1056
+ */
1057
+ export interface TouchSwipeOpts {
1058
+ startX: number;
1059
+ startY: number;
1060
+ endX: number;
1061
+ endY: number;
1062
+ duration: number;
1063
+ touchCount: number;
1064
+ element: string;
1065
+ }
1066
+
1067
+ // XXX: these touchaction types are pretty hinky. I don't have enough context
1068
+ // to do better, sorry !
1069
+
1070
+ export type TouchAction = ReleaseTouchAction | NonReleaseTouchAction;
1071
+
1072
+ export interface NonReleaseTouchAction {
1073
+ action: Exclude<TouchActionKind, 'release'>;
1074
+ options: TouchActionOpts;
1075
+ }
1076
+
1077
+ export interface ReleaseTouchAction {
1078
+ action: 'release';
1079
+ options?: TouchActionOpts;
1080
+ }
1081
+
1082
+ export type SwipeAction = [
1083
+ NonReleaseTouchAction,
1084
+ NonReleaseTouchAction,
1085
+ NonReleaseTouchAction,
1086
+ ReleaseTouchAction
1087
+ ];
1088
+
1089
+ export type TouchDragAction = [NonReleaseTouchAction, NonReleaseTouchAction, ReleaseTouchAction];
1090
+
1091
+ export interface LockOpts {
1092
+ /**
1093
+ * The number to keep the locked.
1094
+ * 0 or empty value will keep the device locked.
1095
+ */
1096
+ seconds?: number;
1097
+ }