droidline 0.0.0-stage → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3586 @@
1
+ import { EventEmitter } from "node:events";
2
+ import { type Params } from "./args.js";
3
+ import type { Element } from "./element.js";
4
+ export declare const PROTO = 1;
5
+ export type ReturnKind = "value" | "fields" | "none";
6
+ /** Which dump field a selector matches. */
7
+ export type By = "text" | "textContains" | "textMatches" | "id" | "desc" | "descContains" | "descMatches" | "class";
8
+ /** A selector written as an object. Every condition must hold on the same element. Pass it as by and leave value out. */
9
+ export interface Query {
10
+ /** Exact text. */
11
+ text?: string;
12
+ /** Part of the text. */
13
+ textContains?: string;
14
+ /** Regular expression on the whole text. */
15
+ textMatches?: string;
16
+ /** resource-id, or just its name after :id/. */
17
+ id?: string;
18
+ /** Exact content-desc. */
19
+ desc?: string;
20
+ /** Part of the content-desc. */
21
+ descContains?: string;
22
+ /** Regular expression on the whole content-desc. */
23
+ descMatches?: string;
24
+ /** Exact class name. */
25
+ class?: string;
26
+ /** Package the element belongs to. */
27
+ package?: string;
28
+ /** The node's clickable flag is this value. */
29
+ clickable?: boolean;
30
+ /** The node's long_clickable flag is this value. */
31
+ long_clickable?: boolean;
32
+ /** The node's checkable flag is this value. */
33
+ checkable?: boolean;
34
+ /** The node's checked flag is this value. */
35
+ checked?: boolean;
36
+ /** The node's enabled flag is this value. */
37
+ enabled?: boolean;
38
+ /** The node's focused flag is this value. */
39
+ focused?: boolean;
40
+ /** The node's selected flag is this value. */
41
+ selected?: boolean;
42
+ /** The node's scrollable flag is this value. */
43
+ scrollable?: boolean;
44
+ /** The node's editable flag is this value. */
45
+ editable?: boolean;
46
+ /** The node's password flag is this value. */
47
+ password?: boolean;
48
+ /** Whether the element is on screen. Lists keep items just past the edge in the tree; visible: true skips them. */
49
+ visible?: boolean;
50
+ /** Exact bounds [left, top, right, bottom], as dump and find return them. */
51
+ bounds?: readonly [number, number, number, number];
52
+ /** One of its descendants matches this query. */
53
+ has?: Query;
54
+ /** One of its ancestors matches this query. */
55
+ inside?: Query;
56
+ /** Its row holds an element that matches this query. The row is the item of the nearest list (RecyclerView, ListView, GridView, or a scrollable view with several children); outside lists, the nearest clickable ancestor. */
57
+ row?: Query;
58
+ /** Its center is below the first match of this query. Matches come back nearest first. */
59
+ below?: Query;
60
+ /** Its center is above the first match of this query. Matches come back nearest first. */
61
+ above?: Query;
62
+ /** Its center is left of the first match of this query. Matches come back nearest first. */
63
+ left_of?: Query;
64
+ /** Its center is right of the first match of this query. Matches come back nearest first. */
65
+ right_of?: Query;
66
+ }
67
+ /** One batch step: [cmd, ...args] or { cmd, ...params }. */
68
+ export type Step = ReadonlyArray<unknown> | {
69
+ readonly cmd: string;
70
+ readonly [param: string]: unknown;
71
+ };
72
+ /** One element of the screen tree. Field names match the selector names. */
73
+ export interface Node {
74
+ text?: any;
75
+ id?: any;
76
+ desc?: any;
77
+ class?: any;
78
+ package?: any;
79
+ bounds?: any;
80
+ clickable?: any;
81
+ long_clickable?: any;
82
+ checkable?: any;
83
+ checked?: any;
84
+ enabled?: any;
85
+ focused?: any;
86
+ selected?: any;
87
+ scrollable?: any;
88
+ editable?: any;
89
+ password?: any;
90
+ visible?: any;
91
+ children?: any;
92
+ [field: string]: any;
93
+ }
94
+ export interface DeviceInfo {
95
+ id?: any;
96
+ name?: any;
97
+ model?: any;
98
+ sdk?: any;
99
+ online?: any;
100
+ route?: any;
101
+ agent?: any;
102
+ ready?: any;
103
+ last_seen?: any;
104
+ leased?: any;
105
+ [field: string]: any;
106
+ }
107
+ export interface Notification {
108
+ key?: any;
109
+ package?: any;
110
+ title?: any;
111
+ text?: any;
112
+ time?: any;
113
+ actions?: any;
114
+ [field: string]: any;
115
+ }
116
+ export interface App {
117
+ package?: any;
118
+ label?: any;
119
+ version?: any;
120
+ system?: any;
121
+ [field: string]: any;
122
+ }
123
+ /** Error codes the server can answer with, from spec/commands.json. */
124
+ export type ErrorCode = "NOT_FOUND" | "AMBIGUOUS" | "NOT_CLICKABLE" | "TIMEOUT" | "NO_ACCESSIBILITY" | "NO_IME" | "NO_PERMISSION" | "APP_NOT_FOUND" | "ACTIVITY_BLOCKED" | "PROXY_FAILED" | "UNKNOWN_CMD" | "UNSUPPORTED" | "BAD_ARGS" | "DEVICE_NOT_FOUND" | "DEVICE_OFFLINE" | "DEVICE_AMBIGUOUS" | "DEVICE_LEASED" | "LEASE_NOT_FOUND" | "NO_FREE_DEVICE" | "OCR_UNAVAILABLE" | "AGENT_RESTARTED" | "UNAUTHORIZED" | "PAIRING_FAILED" | "INTERNAL";
125
+ /** HTTP status and default retryable flag of each error code. */
126
+ export declare const ERRORS: Readonly<Record<ErrorCode, {
127
+ readonly http: number;
128
+ readonly retryable: boolean;
129
+ }>>;
130
+ export interface DumpOptions {
131
+ /** Include system windows such as the status bar and keyboard. @default false */
132
+ all_windows?: boolean;
133
+ }
134
+ export interface DumpResult {
135
+ package: string;
136
+ activity: string;
137
+ width: number;
138
+ height: number;
139
+ tree: Node;
140
+ }
141
+ export interface ScreenshotOptions {
142
+ /** Image format. @default "jpeg" */
143
+ format?: "png" | "jpeg";
144
+ /** JPEG quality 1-100. @default 80 */
145
+ quality?: number;
146
+ /** Resize factor 0.1-1.0, useful on mobile data. @default 1 */
147
+ scale?: number;
148
+ }
149
+ export interface ScreenshotResult {
150
+ format: string;
151
+ width: number;
152
+ height: number;
153
+ data: string;
154
+ }
155
+ export interface RecordOptions {
156
+ /** Turn off by itself after this long. @default 30 */
157
+ minutes?: number;
158
+ }
159
+ export interface FindImageOptions {
160
+ /** How close the match must be, from 0 to 1. @default 0.9 */
161
+ threshold?: number;
162
+ /** Seconds to wait for the target to appear. @default 10 */
163
+ timeout?: number;
164
+ }
165
+ export interface FindImageResult {
166
+ x: number;
167
+ y: number;
168
+ bounds: Array<number>;
169
+ score: number;
170
+ }
171
+ export interface TapImageOptions {
172
+ /** How close the match must be, from 0 to 1. @default 0.9 */
173
+ threshold?: number;
174
+ /** Seconds to wait for the target to appear. @default 10 */
175
+ timeout?: number;
176
+ }
177
+ export interface TapImageResult {
178
+ x: number;
179
+ y: number;
180
+ score: number;
181
+ ms: number;
182
+ }
183
+ export interface OcrOptions {
184
+ /** Tesseract languages, such as kor+eng. Each needs its language data installed. @default "eng" */
185
+ lang?: string;
186
+ }
187
+ export interface OcrResult {
188
+ text: string;
189
+ lines: Array<Record<string, any>>;
190
+ }
191
+ export interface OcrFindOptions {
192
+ /** Tesseract languages, such as kor+eng. Each needs its language data installed. @default "eng" */
193
+ lang?: string;
194
+ /** Seconds to wait for the target to appear. @default 10 */
195
+ timeout?: number;
196
+ }
197
+ export interface OcrFindResult {
198
+ text: string;
199
+ x: number;
200
+ y: number;
201
+ bounds: Array<number>;
202
+ }
203
+ export interface OcrTapOptions {
204
+ /** Tesseract languages, such as kor+eng. Each needs its language data installed. @default "eng" */
205
+ lang?: string;
206
+ /** Seconds to wait for the target to appear. @default 10 */
207
+ timeout?: number;
208
+ }
209
+ export interface OcrTapResult {
210
+ text: string;
211
+ x: number;
212
+ y: number;
213
+ ms: number;
214
+ }
215
+ export interface CurrentResult {
216
+ package: string;
217
+ activity: string;
218
+ }
219
+ export interface TapResult {
220
+ ms: number;
221
+ }
222
+ export interface LongTapOptions {
223
+ /** Hold time in milliseconds. @default 800 */
224
+ ms?: number;
225
+ }
226
+ export interface LongTapResult {
227
+ ms: number;
228
+ }
229
+ export interface SwipeOptions {
230
+ /** Start Y. */
231
+ y1?: number;
232
+ /** End X. */
233
+ x2?: number;
234
+ /** End Y. */
235
+ y2?: number;
236
+ /** Duration in milliseconds. @default 300 */
237
+ ms?: number;
238
+ }
239
+ export interface SwipeResult {
240
+ ms: number;
241
+ }
242
+ export interface TouchOptions {
243
+ /** Index when several elements match, starting at 0. @default 0 */
244
+ nth?: number;
245
+ /** Seconds to wait for the target to appear. @default 10 */
246
+ timeout?: number;
247
+ }
248
+ export interface TouchResult {
249
+ via: string;
250
+ ms: number;
251
+ }
252
+ export interface LongTouchOptions {
253
+ /** Hold time in milliseconds. @default 800 */
254
+ ms?: number;
255
+ /** Index when several elements match, starting at 0. @default 0 */
256
+ nth?: number;
257
+ /** Seconds to wait for the target to appear. @default 10 */
258
+ timeout?: number;
259
+ }
260
+ export interface LongTouchResult {
261
+ via: string;
262
+ ms: number;
263
+ }
264
+ export interface ScrollToOptions {
265
+ /** Direction the content moves toward. @default "down" */
266
+ direction?: "down" | "up" | "left" | "right";
267
+ /** Give up after this many swipes. @default 20 */
268
+ max_swipes?: number;
269
+ /** Index when several elements match, starting at 0. @default 0 */
270
+ nth?: number;
271
+ }
272
+ export interface ScrollToResult {
273
+ swipes: number;
274
+ }
275
+ export interface InputOptions {
276
+ /** Keep existing text and add to the end. @default false */
277
+ append?: boolean;
278
+ /** Index when several elements match, starting at 0. @default 0 */
279
+ nth?: number;
280
+ /** Seconds to wait for the target to appear. @default 10 */
281
+ timeout?: number;
282
+ }
283
+ export interface InputResult {
284
+ via: string;
285
+ ms: number;
286
+ }
287
+ export interface ClearOptions {
288
+ /** Index when several elements match, starting at 0. @default 0 */
289
+ nth?: number;
290
+ /** Seconds to wait for the target to appear. @default 10 */
291
+ timeout?: number;
292
+ }
293
+ export interface ClearResult {
294
+ ms: number;
295
+ }
296
+ export interface SendkeyOptions {
297
+ /** Key name (enter, tab, del, space, escape, up, down, left, right, back, home...), Android key code, or text to type. */
298
+ key?: string | number;
299
+ /** Type this text literally, even if it equals a key name. */
300
+ text?: string;
301
+ }
302
+ export interface SendkeyResult {
303
+ via: string;
304
+ }
305
+ export interface ExistsOptions {
306
+ /** Index when several elements match, starting at 0. @default 0 */
307
+ nth?: number;
308
+ }
309
+ export interface WaitOptions {
310
+ /** Seconds to wait for the target to appear. @default 10 */
311
+ timeout?: number;
312
+ /** Index when several elements match, starting at 0. @default 0 */
313
+ nth?: number;
314
+ }
315
+ export interface WaitResult {
316
+ ms: number;
317
+ }
318
+ export interface WaitGoneOptions {
319
+ /** Seconds to wait for the target to appear. @default 10 */
320
+ timeout?: number;
321
+ }
322
+ export interface WaitGoneResult {
323
+ ms: number;
324
+ }
325
+ export interface WaitIdleOptions {
326
+ /** How long the screen must stay unchanged. @default 500 */
327
+ ms?: number;
328
+ /** Seconds to wait before giving up. @default 10 */
329
+ timeout?: number;
330
+ }
331
+ export interface WaitIdleResult {
332
+ ms: number;
333
+ }
334
+ export interface FindOptions {
335
+ /** Index when several elements match, starting at 0. @default 0 */
336
+ nth?: number;
337
+ /** Seconds to wait for the target to appear. @default 10 */
338
+ timeout?: number;
339
+ }
340
+ export interface FindAllOptions {
341
+ /** Seconds to wait for at least one match. 0 answers at once. @default 0 */
342
+ timeout?: number;
343
+ }
344
+ export interface GetTextOptions {
345
+ /** Index when several elements match, starting at 0. @default 0 */
346
+ nth?: number;
347
+ }
348
+ export interface CheckedOptions {
349
+ /** Index when several elements match, starting at 0. @default 0 */
350
+ nth?: number;
351
+ }
352
+ export interface EnabledOptions {
353
+ /** Index when several elements match, starting at 0. @default 0 */
354
+ nth?: number;
355
+ }
356
+ export interface SelectedOptions {
357
+ /** Index when several elements match, starting at 0. @default 0 */
358
+ nth?: number;
359
+ }
360
+ export interface CountOptions {
361
+ }
362
+ export interface WhichOptions {
363
+ /** Seconds to wait for any candidate. @default 10 */
364
+ timeout?: number;
365
+ }
366
+ export interface LastToastOptions {
367
+ /** Ignore toasts older than this many seconds. @default 30 */
368
+ max_age?: number;
369
+ }
370
+ export interface WakeResult {
371
+ screen_on: boolean;
372
+ locked: boolean;
373
+ }
374
+ export interface BatteryResult {
375
+ level: number;
376
+ charging: boolean;
377
+ temperature: number;
378
+ }
379
+ export interface InfoResult {
380
+ model: string;
381
+ manufacturer: string;
382
+ sdk: number;
383
+ release: string;
384
+ agent: string;
385
+ width: number;
386
+ height: number;
387
+ ready: Record<string, any>;
388
+ }
389
+ export interface NetworkResult {
390
+ type: string;
391
+ airplane: boolean;
392
+ metered: boolean;
393
+ }
394
+ export interface LaunchOptions {
395
+ /** Activity name, either full or starting with a dot. */
396
+ activity?: string;
397
+ }
398
+ export interface LaunchResult {
399
+ ms: number;
400
+ }
401
+ export interface OpenUrlOptions {
402
+ /** Open with this app only. */
403
+ package?: string;
404
+ }
405
+ export interface IntentOptions {
406
+ /** Data URI, such as package:com.example. */
407
+ data?: string;
408
+ /** Only this app may handle it. */
409
+ package?: string;
410
+ }
411
+ export interface ClearDataResult {
412
+ ms: number;
413
+ }
414
+ export interface AppsOptions {
415
+ /** Include system packages. @default false */
416
+ system?: boolean;
417
+ }
418
+ export interface ClipboardOptions {
419
+ /** Text to copy. Omit to read. */
420
+ text?: string;
421
+ }
422
+ export interface BatchOptions {
423
+ /** Stop at the first failing step. @default true */
424
+ stop_on_error?: boolean;
425
+ /** The steps drop the phone's link. Answer accepted first and send the result after reconnecting. @default false */
426
+ cuts_network?: boolean;
427
+ /** Resolve with the final result once the phone is back. Without it, batch(..., { cuts_network: true }) resolves with { accepted: true } as soon as the phone accepts, and the final result arrives later as a "result" event. */
428
+ wait?: boolean;
429
+ }
430
+ export interface BatchResult {
431
+ results?: Array<Record<string, any>>;
432
+ /** Present instead of the other fields when the phone accepted a network-cutting call without wait. */
433
+ accepted?: boolean;
434
+ }
435
+ export interface ProxyOptions {
436
+ /** Package or packages to route. */
437
+ app?: string | ReadonlyArray<string>;
438
+ }
439
+ export interface ProxyResult {
440
+ active: boolean;
441
+ apps: Array<string>;
442
+ }
443
+ export interface ProxyCheckOptions {
444
+ /** Package to check. */
445
+ app?: string;
446
+ }
447
+ export interface ProxyCheckResult {
448
+ active: boolean;
449
+ ip: string;
450
+ upstream: string;
451
+ error: string;
452
+ }
453
+ export interface NotificationsOptions {
454
+ /** Only this app. */
455
+ package?: string;
456
+ }
457
+ export interface HasNotificationOptions {
458
+ }
459
+ export interface WaitNotificationOptions {
460
+ /** Seconds to wait. @default 60 */
461
+ timeout?: number;
462
+ /** Only from this app. */
463
+ package?: string;
464
+ }
465
+ export interface NotifyFilterOptions {
466
+ /** Allowed packages. Omit to read the current list. */
467
+ packages?: ReadonlyArray<string>;
468
+ }
469
+ export interface ChromeGoOptions {
470
+ /** Open in a new tab. @default false */
471
+ new_tab?: boolean;
472
+ }
473
+ export interface ChromeGoResult {
474
+ ms: number;
475
+ }
476
+ export interface PairOptions {
477
+ /** Name to give the device. */
478
+ name?: string;
479
+ }
480
+ export interface PairQrOptions {
481
+ /** Name to give the device. */
482
+ name?: string;
483
+ }
484
+ export interface PairQrResult {
485
+ uri: string;
486
+ expires: number;
487
+ }
488
+ export interface SubscribeOptions {
489
+ /** Only from this device. Omit for all. */
490
+ device?: string;
491
+ }
492
+ export interface ServerInfoResult {
493
+ version: string;
494
+ server: string;
495
+ name: string;
496
+ proto: number;
497
+ agent_port: number;
498
+ client_port: number;
499
+ }
500
+ type Runner = (cmd: string, kind: ReturnKind, params: Params) => Promise<any>;
501
+ /** The chrome.* commands, reached as d.chrome. */
502
+ export declare class ChromeCommands {
503
+ private readonly _run;
504
+ constructor(_run: Runner);
505
+ /**
506
+ * Open a URL in Chrome.
507
+ *
508
+ * @param url Address. https:// is added if missing.
509
+ * @param new_tab Open in a new tab. Default: false.
510
+ * @param opts Optional parameters by name, see ChromeGoOptions.
511
+ * @throws {DroidlineError} with code APP_NOT_FOUND.
512
+ * @example await d.chrome.go("naver.com")
513
+ */
514
+ go(url: string, opts?: ChromeGoOptions): Promise<ChromeGoResult>;
515
+ /**
516
+ * Open a URL in Chrome.
517
+ *
518
+ * @param url Address. https:// is added if missing.
519
+ * @param new_tab Open in a new tab. Default: false.
520
+ * @param opts Optional parameters by name, see ChromeGoOptions.
521
+ * @throws {DroidlineError} with code APP_NOT_FOUND.
522
+ * @example await d.chrome.go("naver.com")
523
+ */
524
+ go(url: string, new_tab?: boolean, opts?: ChromeGoOptions): Promise<ChromeGoResult>;
525
+ }
526
+ /** Commands that run on one phone. Device extends this and implements the hooks. */
527
+ export declare abstract class DeviceCommands {
528
+ protected abstract _run(cmd: string, kind: ReturnKind, params: Params): Promise<any>;
529
+ protected abstract _saveImage(cmd: string, params: Params): Promise<any>;
530
+ protected abstract _saveJson(cmd: string, params: Params): Promise<any>;
531
+ protected abstract _runElement(cmd: string, kind: ReturnKind, params: Params): Promise<any>;
532
+ protected abstract _loadImage(image: unknown): Promise<string>;
533
+ get chrome(): ChromeCommands;
534
+ /**
535
+ * Return the current screen as a node tree.
536
+ *
537
+ * @param path Save the tree as JSON to this local file.
538
+ * @param opts Optional parameters by name, see DumpOptions.
539
+ * @example await d.dump("screen.json")
540
+ */
541
+ dump(opts?: DumpOptions): Promise<DumpResult>;
542
+ /**
543
+ * Return the current screen as a node tree.
544
+ *
545
+ * @param path Save the tree as JSON to this local file.
546
+ * @param opts Optional parameters by name, see DumpOptions.
547
+ * @example await d.dump("screen.json")
548
+ */
549
+ dump(path: string, opts?: DumpOptions): Promise<DumpResult>;
550
+ /**
551
+ * Capture the screen.
552
+ *
553
+ * Android 11+ uses the accessibility screenshot. Android 9-10 asks once for screen capture permission.
554
+ *
555
+ * @param path Save the image to this local file. The extension picks png or jpeg.
556
+ * @param opts Optional parameters by name, see ScreenshotOptions.
557
+ * @example await d.screenshot("a.png")
558
+ */
559
+ screenshot(opts?: ScreenshotOptions): Promise<Buffer>;
560
+ /**
561
+ * Capture the screen.
562
+ *
563
+ * Android 11+ uses the accessibility screenshot. Android 9-10 asks once for screen capture permission.
564
+ *
565
+ * @param path Save the image to this local file. The extension picks png or jpeg.
566
+ * @param opts Optional parameters by name, see ScreenshotOptions.
567
+ * @example await d.screenshot("a.png")
568
+ */
569
+ screenshot(path: string, opts?: ScreenshotOptions): Promise<string>;
570
+ /**
571
+ * Turn recording of taps and typing on or off.
572
+ *
573
+ * Optional, and off until you turn it on. While on, the phone sends an action event for every tap, long press and text change in other apps, with the screen it happened on; password fields send no text. It turns itself off after minutes. droidline inspect uses it to write a script as you use the phone.
574
+ *
575
+ * @param on true to start, false to stop.
576
+ * @param minutes Turn off by itself after this long. Default: 30.
577
+ * @param opts Optional parameters by name, see RecordOptions.
578
+ * @example await d.record(true)
579
+ */
580
+ record(on: boolean, opts?: RecordOptions): Promise<void>;
581
+ /**
582
+ * Turn recording of taps and typing on or off.
583
+ *
584
+ * Optional, and off until you turn it on. While on, the phone sends an action event for every tap, long press and text change in other apps, with the screen it happened on; password fields send no text. It turns itself off after minutes. droidline inspect uses it to write a script as you use the phone.
585
+ *
586
+ * @param on true to start, false to stop.
587
+ * @param minutes Turn off by itself after this long. Default: 30.
588
+ * @param opts Optional parameters by name, see RecordOptions.
589
+ * @example await d.record(true)
590
+ */
591
+ record(on: boolean, minutes?: number, opts?: RecordOptions): Promise<void>;
592
+ /**
593
+ * Find a picture on the screen.
594
+ *
595
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
596
+ *
597
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
598
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
599
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
600
+ * @param opts Optional parameters by name, see FindImageOptions.
601
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
602
+ * @example await d.find_image("ok-button.png")
603
+ */
604
+ find_image(image: string | Uint8Array, opts?: FindImageOptions): Promise<FindImageResult>;
605
+ /**
606
+ * Find a picture on the screen.
607
+ *
608
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
609
+ *
610
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
611
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
612
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
613
+ * @param opts Optional parameters by name, see FindImageOptions.
614
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
615
+ * @example await d.find_image("ok-button.png")
616
+ */
617
+ find_image(image: string | Uint8Array, threshold?: number, opts?: FindImageOptions): Promise<FindImageResult>;
618
+ /**
619
+ * Find a picture on the screen.
620
+ *
621
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
622
+ *
623
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
624
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
625
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
626
+ * @param opts Optional parameters by name, see FindImageOptions.
627
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
628
+ * @example await d.find_image("ok-button.png")
629
+ */
630
+ find_image(image: string | Uint8Array, threshold?: number, timeout?: number, opts?: FindImageOptions): Promise<FindImageResult>;
631
+ /**
632
+ * Find a picture on the screen.
633
+ *
634
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
635
+ *
636
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
637
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
638
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
639
+ * @param opts Optional parameters by name, see FindImageOptions.
640
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
641
+ * @example await d.find_image("ok-button.png")
642
+ * @alias find_image
643
+ */
644
+ findImage(image: string | Uint8Array, opts?: FindImageOptions): Promise<FindImageResult>;
645
+ /**
646
+ * Find a picture on the screen.
647
+ *
648
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
649
+ *
650
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
651
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
652
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
653
+ * @param opts Optional parameters by name, see FindImageOptions.
654
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
655
+ * @example await d.find_image("ok-button.png")
656
+ * @alias find_image
657
+ */
658
+ findImage(image: string | Uint8Array, threshold?: number, opts?: FindImageOptions): Promise<FindImageResult>;
659
+ /**
660
+ * Find a picture on the screen.
661
+ *
662
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
663
+ *
664
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
665
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
666
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
667
+ * @param opts Optional parameters by name, see FindImageOptions.
668
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
669
+ * @example await d.find_image("ok-button.png")
670
+ * @alias find_image
671
+ */
672
+ findImage(image: string | Uint8Array, threshold?: number, timeout?: number, opts?: FindImageOptions): Promise<FindImageResult>;
673
+ /**
674
+ * Find a picture on the screen and tap its center.
675
+ *
676
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
677
+ *
678
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
679
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
680
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
681
+ * @param opts Optional parameters by name, see TapImageOptions.
682
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
683
+ * @example await d.tap_image("ok-button.png")
684
+ */
685
+ tap_image(image: string | Uint8Array, opts?: TapImageOptions): Promise<TapImageResult>;
686
+ /**
687
+ * Find a picture on the screen and tap its center.
688
+ *
689
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
690
+ *
691
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
692
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
693
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
694
+ * @param opts Optional parameters by name, see TapImageOptions.
695
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
696
+ * @example await d.tap_image("ok-button.png")
697
+ */
698
+ tap_image(image: string | Uint8Array, threshold?: number, opts?: TapImageOptions): Promise<TapImageResult>;
699
+ /**
700
+ * Find a picture on the screen and tap its center.
701
+ *
702
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
703
+ *
704
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
705
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
706
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
707
+ * @param opts Optional parameters by name, see TapImageOptions.
708
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
709
+ * @example await d.tap_image("ok-button.png")
710
+ */
711
+ tap_image(image: string | Uint8Array, threshold?: number, timeout?: number, opts?: TapImageOptions): Promise<TapImageResult>;
712
+ /**
713
+ * Find a picture on the screen and tap its center.
714
+ *
715
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
716
+ *
717
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
718
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
719
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
720
+ * @param opts Optional parameters by name, see TapImageOptions.
721
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
722
+ * @example await d.tap_image("ok-button.png")
723
+ * @alias tap_image
724
+ */
725
+ tapImage(image: string | Uint8Array, opts?: TapImageOptions): Promise<TapImageResult>;
726
+ /**
727
+ * Find a picture on the screen and tap its center.
728
+ *
729
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
730
+ *
731
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
732
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
733
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
734
+ * @param opts Optional parameters by name, see TapImageOptions.
735
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
736
+ * @example await d.tap_image("ok-button.png")
737
+ * @alias tap_image
738
+ */
739
+ tapImage(image: string | Uint8Array, threshold?: number, opts?: TapImageOptions): Promise<TapImageResult>;
740
+ /**
741
+ * Find a picture on the screen and tap its center.
742
+ *
743
+ * Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone, because another screen size or density will not match. On Android 9 and 10 screenshots need screen capture permission.
744
+ *
745
+ * @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
746
+ * @param threshold How close the match must be, from 0 to 1. Default: 0.9.
747
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
748
+ * @param opts Optional parameters by name, see TapImageOptions.
749
+ * @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
750
+ * @example await d.tap_image("ok-button.png")
751
+ * @alias tap_image
752
+ */
753
+ tapImage(image: string | Uint8Array, threshold?: number, timeout?: number, opts?: TapImageOptions): Promise<TapImageResult>;
754
+ /**
755
+ * Read the text on the screen with OCR.
756
+ *
757
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
758
+ *
759
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
760
+ * @param opts Optional parameters by name, see OcrOptions.
761
+ * @throws {DroidlineError} with code OCR_UNAVAILABLE, NO_PERMISSION.
762
+ * @example await d.ocr("kor+eng")
763
+ */
764
+ ocr(opts?: OcrOptions): Promise<OcrResult>;
765
+ /**
766
+ * Read the text on the screen with OCR.
767
+ *
768
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
769
+ *
770
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
771
+ * @param opts Optional parameters by name, see OcrOptions.
772
+ * @throws {DroidlineError} with code OCR_UNAVAILABLE, NO_PERMISSION.
773
+ * @example await d.ocr("kor+eng")
774
+ */
775
+ ocr(lang?: string, opts?: OcrOptions): Promise<OcrResult>;
776
+ /**
777
+ * Wait until OCR reads some text on the screen and return where it is.
778
+ *
779
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
780
+ *
781
+ * @param text Text to look for: a whole word, or part of a line.
782
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
783
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
784
+ * @param opts Optional parameters by name, see OcrFindOptions.
785
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
786
+ * @example await d.ocr_find("확인", "kor")
787
+ */
788
+ ocr_find(text: string, opts?: OcrFindOptions): Promise<OcrFindResult>;
789
+ /**
790
+ * Wait until OCR reads some text on the screen and return where it is.
791
+ *
792
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
793
+ *
794
+ * @param text Text to look for: a whole word, or part of a line.
795
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
796
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
797
+ * @param opts Optional parameters by name, see OcrFindOptions.
798
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
799
+ * @example await d.ocr_find("확인", "kor")
800
+ */
801
+ ocr_find(text: string, lang?: string, opts?: OcrFindOptions): Promise<OcrFindResult>;
802
+ /**
803
+ * Wait until OCR reads some text on the screen and return where it is.
804
+ *
805
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
806
+ *
807
+ * @param text Text to look for: a whole word, or part of a line.
808
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
809
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
810
+ * @param opts Optional parameters by name, see OcrFindOptions.
811
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
812
+ * @example await d.ocr_find("확인", "kor")
813
+ */
814
+ ocr_find(text: string, lang?: string, timeout?: number, opts?: OcrFindOptions): Promise<OcrFindResult>;
815
+ /**
816
+ * Wait until OCR reads some text on the screen and return where it is.
817
+ *
818
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
819
+ *
820
+ * @param text Text to look for: a whole word, or part of a line.
821
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
822
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
823
+ * @param opts Optional parameters by name, see OcrFindOptions.
824
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
825
+ * @example await d.ocr_find("확인", "kor")
826
+ * @alias ocr_find
827
+ */
828
+ ocrFind(text: string, opts?: OcrFindOptions): Promise<OcrFindResult>;
829
+ /**
830
+ * Wait until OCR reads some text on the screen and return where it is.
831
+ *
832
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
833
+ *
834
+ * @param text Text to look for: a whole word, or part of a line.
835
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
836
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
837
+ * @param opts Optional parameters by name, see OcrFindOptions.
838
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
839
+ * @example await d.ocr_find("확인", "kor")
840
+ * @alias ocr_find
841
+ */
842
+ ocrFind(text: string, lang?: string, opts?: OcrFindOptions): Promise<OcrFindResult>;
843
+ /**
844
+ * Wait until OCR reads some text on the screen and return where it is.
845
+ *
846
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
847
+ *
848
+ * @param text Text to look for: a whole word, or part of a line.
849
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
850
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
851
+ * @param opts Optional parameters by name, see OcrFindOptions.
852
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
853
+ * @example await d.ocr_find("확인", "kor")
854
+ * @alias ocr_find
855
+ */
856
+ ocrFind(text: string, lang?: string, timeout?: number, opts?: OcrFindOptions): Promise<OcrFindResult>;
857
+ /**
858
+ * Wait until OCR reads some text on the screen and tap it.
859
+ *
860
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
861
+ *
862
+ * @param text Text to look for: a whole word, or part of a line.
863
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
864
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
865
+ * @param opts Optional parameters by name, see OcrTapOptions.
866
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
867
+ * @example await d.ocr_tap("확인", "kor")
868
+ */
869
+ ocr_tap(text: string, opts?: OcrTapOptions): Promise<OcrTapResult>;
870
+ /**
871
+ * Wait until OCR reads some text on the screen and tap it.
872
+ *
873
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
874
+ *
875
+ * @param text Text to look for: a whole word, or part of a line.
876
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
877
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
878
+ * @param opts Optional parameters by name, see OcrTapOptions.
879
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
880
+ * @example await d.ocr_tap("확인", "kor")
881
+ */
882
+ ocr_tap(text: string, lang?: string, opts?: OcrTapOptions): Promise<OcrTapResult>;
883
+ /**
884
+ * Wait until OCR reads some text on the screen and tap it.
885
+ *
886
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
887
+ *
888
+ * @param text Text to look for: a whole word, or part of a line.
889
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
890
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
891
+ * @param opts Optional parameters by name, see OcrTapOptions.
892
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
893
+ * @example await d.ocr_tap("확인", "kor")
894
+ */
895
+ ocr_tap(text: string, lang?: string, timeout?: number, opts?: OcrTapOptions): Promise<OcrTapResult>;
896
+ /**
897
+ * Wait until OCR reads some text on the screen and tap it.
898
+ *
899
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
900
+ *
901
+ * @param text Text to look for: a whole word, or part of a line.
902
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
903
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
904
+ * @param opts Optional parameters by name, see OcrTapOptions.
905
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
906
+ * @example await d.ocr_tap("확인", "kor")
907
+ * @alias ocr_tap
908
+ */
909
+ ocrTap(text: string, opts?: OcrTapOptions): Promise<OcrTapResult>;
910
+ /**
911
+ * Wait until OCR reads some text on the screen and tap it.
912
+ *
913
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
914
+ *
915
+ * @param text Text to look for: a whole word, or part of a line.
916
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
917
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
918
+ * @param opts Optional parameters by name, see OcrTapOptions.
919
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
920
+ * @example await d.ocr_tap("확인", "kor")
921
+ * @alias ocr_tap
922
+ */
923
+ ocrTap(text: string, lang?: string, opts?: OcrTapOptions): Promise<OcrTapResult>;
924
+ /**
925
+ * Wait until OCR reads some text on the screen and tap it.
926
+ *
927
+ * Optional, and runs on the PC with Tesseract, which you install yourself along with the language data you need. Nothing is installed for you. On Android 9 and 10 screenshots need screen capture permission.
928
+ *
929
+ * @param text Text to look for: a whole word, or part of a line.
930
+ * @param lang Tesseract languages, such as kor+eng. Each needs its language data installed. Default: "eng".
931
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
932
+ * @param opts Optional parameters by name, see OcrTapOptions.
933
+ * @throws {DroidlineError} with code NOT_FOUND, OCR_UNAVAILABLE, NO_PERMISSION.
934
+ * @example await d.ocr_tap("확인", "kor")
935
+ * @alias ocr_tap
936
+ */
937
+ ocrTap(text: string, lang?: string, timeout?: number, opts?: OcrTapOptions): Promise<OcrTapResult>;
938
+ /**
939
+ * Foreground package and activity.
940
+ *
941
+ * @example await d.current()
942
+ */
943
+ current(): Promise<CurrentResult>;
944
+ /**
945
+ * Tap a screen coordinate.
946
+ *
947
+ * @param x X in screen pixels.
948
+ * @param y Y in screen pixels.
949
+ * @example await d.tap(540, 1200)
950
+ */
951
+ tap(x: number, y: number): Promise<TapResult>;
952
+ /**
953
+ * Press and hold a coordinate.
954
+ *
955
+ * @param x X in screen pixels.
956
+ * @param y Y in screen pixels.
957
+ * @param ms Hold time in milliseconds. Default: 800.
958
+ * @param opts Optional parameters by name, see LongTapOptions.
959
+ * @example await d.long_tap(540, 1200, 800)
960
+ */
961
+ long_tap(x: number, y: number, opts?: LongTapOptions): Promise<LongTapResult>;
962
+ /**
963
+ * Press and hold a coordinate.
964
+ *
965
+ * @param x X in screen pixels.
966
+ * @param y Y in screen pixels.
967
+ * @param ms Hold time in milliseconds. Default: 800.
968
+ * @param opts Optional parameters by name, see LongTapOptions.
969
+ * @example await d.long_tap(540, 1200, 800)
970
+ */
971
+ long_tap(x: number, y: number, ms?: number, opts?: LongTapOptions): Promise<LongTapResult>;
972
+ /**
973
+ * Press and hold a coordinate.
974
+ *
975
+ * @param x X in screen pixels.
976
+ * @param y Y in screen pixels.
977
+ * @param ms Hold time in milliseconds. Default: 800.
978
+ * @param opts Optional parameters by name, see LongTapOptions.
979
+ * @example await d.long_tap(540, 1200, 800)
980
+ * @alias long_tap
981
+ */
982
+ longTap(x: number, y: number, opts?: LongTapOptions): Promise<LongTapResult>;
983
+ /**
984
+ * Press and hold a coordinate.
985
+ *
986
+ * @param x X in screen pixels.
987
+ * @param y Y in screen pixels.
988
+ * @param ms Hold time in milliseconds. Default: 800.
989
+ * @param opts Optional parameters by name, see LongTapOptions.
990
+ * @example await d.long_tap(540, 1200, 800)
991
+ * @alias long_tap
992
+ */
993
+ longTap(x: number, y: number, ms?: number, opts?: LongTapOptions): Promise<LongTapResult>;
994
+ /**
995
+ * Swipe between two points, or in a direction.
996
+ *
997
+ * @param x1 Start X, or a direction: up, down, left, right.
998
+ * @param y1 Start Y.
999
+ * @param x2 End X.
1000
+ * @param y2 End Y.
1001
+ * @param ms Duration in milliseconds. Default: 300.
1002
+ * @param opts Optional parameters by name, see SwipeOptions.
1003
+ * @example await d.swipe(540, 1600, 540, 400, 300)
1004
+ */
1005
+ swipe(x1: number | string, opts?: SwipeOptions): Promise<SwipeResult>;
1006
+ /**
1007
+ * Swipe between two points, or in a direction.
1008
+ *
1009
+ * @param x1 Start X, or a direction: up, down, left, right.
1010
+ * @param y1 Start Y.
1011
+ * @param x2 End X.
1012
+ * @param y2 End Y.
1013
+ * @param ms Duration in milliseconds. Default: 300.
1014
+ * @param opts Optional parameters by name, see SwipeOptions.
1015
+ * @example await d.swipe(540, 1600, 540, 400, 300)
1016
+ */
1017
+ swipe(x1: number | string, y1?: number, opts?: SwipeOptions): Promise<SwipeResult>;
1018
+ /**
1019
+ * Swipe between two points, or in a direction.
1020
+ *
1021
+ * @param x1 Start X, or a direction: up, down, left, right.
1022
+ * @param y1 Start Y.
1023
+ * @param x2 End X.
1024
+ * @param y2 End Y.
1025
+ * @param ms Duration in milliseconds. Default: 300.
1026
+ * @param opts Optional parameters by name, see SwipeOptions.
1027
+ * @example await d.swipe(540, 1600, 540, 400, 300)
1028
+ */
1029
+ swipe(x1: number | string, y1?: number, x2?: number, opts?: SwipeOptions): Promise<SwipeResult>;
1030
+ /**
1031
+ * Swipe between two points, or in a direction.
1032
+ *
1033
+ * @param x1 Start X, or a direction: up, down, left, right.
1034
+ * @param y1 Start Y.
1035
+ * @param x2 End X.
1036
+ * @param y2 End Y.
1037
+ * @param ms Duration in milliseconds. Default: 300.
1038
+ * @param opts Optional parameters by name, see SwipeOptions.
1039
+ * @example await d.swipe(540, 1600, 540, 400, 300)
1040
+ */
1041
+ swipe(x1: number | string, y1?: number, x2?: number, y2?: number, opts?: SwipeOptions): Promise<SwipeResult>;
1042
+ /**
1043
+ * Swipe between two points, or in a direction.
1044
+ *
1045
+ * @param x1 Start X, or a direction: up, down, left, right.
1046
+ * @param y1 Start Y.
1047
+ * @param x2 End X.
1048
+ * @param y2 End Y.
1049
+ * @param ms Duration in milliseconds. Default: 300.
1050
+ * @param opts Optional parameters by name, see SwipeOptions.
1051
+ * @example await d.swipe(540, 1600, 540, 400, 300)
1052
+ */
1053
+ swipe(x1: number | string, y1?: number, x2?: number, y2?: number, ms?: number, opts?: SwipeOptions): Promise<SwipeResult>;
1054
+ /**
1055
+ * Wait for an element and tap it.
1056
+ *
1057
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1058
+ *
1059
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1060
+ * @param value The value to match. Leave it out when by is a query object.
1061
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1062
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1063
+ * @param opts Optional parameters by name, see TouchOptions.
1064
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1065
+ * @example await d.touch("id", "com.kakao.talk:id/login")
1066
+ */
1067
+ touch(by: By, value: string, opts?: TouchOptions): Promise<TouchResult>;
1068
+ /**
1069
+ * Wait for an element and tap it.
1070
+ *
1071
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1072
+ *
1073
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1074
+ * @param value The value to match. Leave it out when by is a query object.
1075
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1076
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1077
+ * @param opts Optional parameters by name, see TouchOptions.
1078
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1079
+ * @example await d.touch("id", "com.kakao.talk:id/login")
1080
+ */
1081
+ touch(by: By, value: string, nth?: number, opts?: TouchOptions): Promise<TouchResult>;
1082
+ /**
1083
+ * Wait for an element and tap it.
1084
+ *
1085
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1086
+ *
1087
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1088
+ * @param value The value to match. Leave it out when by is a query object.
1089
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1090
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1091
+ * @param opts Optional parameters by name, see TouchOptions.
1092
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1093
+ * @example await d.touch("id", "com.kakao.talk:id/login")
1094
+ */
1095
+ touch(by: By, value: string, nth?: number, timeout?: number, opts?: TouchOptions): Promise<TouchResult>;
1096
+ /**
1097
+ * Wait for an element and tap it.
1098
+ *
1099
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1100
+ *
1101
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1102
+ * @param value The value to match. Leave it out when by is a query object.
1103
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1104
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1105
+ * @param opts Optional parameters by name, see TouchOptions.
1106
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1107
+ * @example await d.touch("id", "com.kakao.talk:id/login")
1108
+ */
1109
+ touch(by: Query, opts?: TouchOptions): Promise<TouchResult>;
1110
+ /**
1111
+ * Wait for an element and tap it.
1112
+ *
1113
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1114
+ *
1115
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1116
+ * @param value The value to match. Leave it out when by is a query object.
1117
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1118
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1119
+ * @param opts Optional parameters by name, see TouchOptions.
1120
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1121
+ * @example await d.touch("id", "com.kakao.talk:id/login")
1122
+ */
1123
+ touch(by: Query, nth?: number, opts?: TouchOptions): Promise<TouchResult>;
1124
+ /**
1125
+ * Wait for an element and tap it.
1126
+ *
1127
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1128
+ *
1129
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1130
+ * @param value The value to match. Leave it out when by is a query object.
1131
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1132
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1133
+ * @param opts Optional parameters by name, see TouchOptions.
1134
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1135
+ * @example await d.touch("id", "com.kakao.talk:id/login")
1136
+ */
1137
+ touch(by: Query, nth?: number, timeout?: number, opts?: TouchOptions): Promise<TouchResult>;
1138
+ /**
1139
+ * Wait for an element and tap it. Shorthand for touch("id", value).
1140
+ *
1141
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1142
+ *
1143
+ * @param value The value to match. Leave it out when by is a query object.
1144
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1145
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1146
+ * @param opts Optional parameters by name, see TouchOptions.
1147
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1148
+ */
1149
+ touchById(value: string, opts?: TouchOptions): Promise<TouchResult>;
1150
+ /**
1151
+ * Wait for an element and tap it. Shorthand for touch("id", value).
1152
+ *
1153
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1154
+ *
1155
+ * @param value The value to match. Leave it out when by is a query object.
1156
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1157
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1158
+ * @param opts Optional parameters by name, see TouchOptions.
1159
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1160
+ */
1161
+ touchById(value: string, nth?: number, opts?: TouchOptions): Promise<TouchResult>;
1162
+ /**
1163
+ * Wait for an element and tap it. Shorthand for touch("id", value).
1164
+ *
1165
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1166
+ *
1167
+ * @param value The value to match. Leave it out when by is a query object.
1168
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1169
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1170
+ * @param opts Optional parameters by name, see TouchOptions.
1171
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1172
+ */
1173
+ touchById(value: string, nth?: number, timeout?: number, opts?: TouchOptions): Promise<TouchResult>;
1174
+ /**
1175
+ * Wait for an element and tap it. Shorthand for touch("text", value).
1176
+ *
1177
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1178
+ *
1179
+ * @param value The value to match. Leave it out when by is a query object.
1180
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1181
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1182
+ * @param opts Optional parameters by name, see TouchOptions.
1183
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1184
+ */
1185
+ touchByText(value: string, opts?: TouchOptions): Promise<TouchResult>;
1186
+ /**
1187
+ * Wait for an element and tap it. Shorthand for touch("text", value).
1188
+ *
1189
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1190
+ *
1191
+ * @param value The value to match. Leave it out when by is a query object.
1192
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1193
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1194
+ * @param opts Optional parameters by name, see TouchOptions.
1195
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1196
+ */
1197
+ touchByText(value: string, nth?: number, opts?: TouchOptions): Promise<TouchResult>;
1198
+ /**
1199
+ * Wait for an element and tap it. Shorthand for touch("text", value).
1200
+ *
1201
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1202
+ *
1203
+ * @param value The value to match. Leave it out when by is a query object.
1204
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1205
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1206
+ * @param opts Optional parameters by name, see TouchOptions.
1207
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1208
+ */
1209
+ touchByText(value: string, nth?: number, timeout?: number, opts?: TouchOptions): Promise<TouchResult>;
1210
+ /**
1211
+ * Wait for an element and tap it. Shorthand for touch("desc", value).
1212
+ *
1213
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1214
+ *
1215
+ * @param value The value to match. Leave it out when by is a query object.
1216
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1217
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1218
+ * @param opts Optional parameters by name, see TouchOptions.
1219
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1220
+ */
1221
+ touchByDesc(value: string, opts?: TouchOptions): Promise<TouchResult>;
1222
+ /**
1223
+ * Wait for an element and tap it. Shorthand for touch("desc", value).
1224
+ *
1225
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1226
+ *
1227
+ * @param value The value to match. Leave it out when by is a query object.
1228
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1229
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1230
+ * @param opts Optional parameters by name, see TouchOptions.
1231
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1232
+ */
1233
+ touchByDesc(value: string, nth?: number, opts?: TouchOptions): Promise<TouchResult>;
1234
+ /**
1235
+ * Wait for an element and tap it. Shorthand for touch("desc", value).
1236
+ *
1237
+ * If the node refuses the click, the center of its bounds is tapped instead. via tells which path worked: node, parent or gesture.
1238
+ *
1239
+ * @param value The value to match. Leave it out when by is a query object.
1240
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1241
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1242
+ * @param opts Optional parameters by name, see TouchOptions.
1243
+ * @throws {DroidlineError} with code NOT_FOUND, NOT_CLICKABLE, NO_ACCESSIBILITY.
1244
+ */
1245
+ touchByDesc(value: string, nth?: number, timeout?: number, opts?: TouchOptions): Promise<TouchResult>;
1246
+ /**
1247
+ * Wait for an element and press and hold it.
1248
+ *
1249
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1250
+ * @param value The value to match. Leave it out when by is a query object.
1251
+ * @param ms Hold time in milliseconds. Default: 800.
1252
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1253
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1254
+ * @param opts Optional parameters by name, see LongTouchOptions.
1255
+ * @example await d.long_touch("text", "메시지")
1256
+ */
1257
+ long_touch(by: By, value: string, opts?: LongTouchOptions): Promise<LongTouchResult>;
1258
+ /**
1259
+ * Wait for an element and press and hold it.
1260
+ *
1261
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1262
+ * @param value The value to match. Leave it out when by is a query object.
1263
+ * @param ms Hold time in milliseconds. Default: 800.
1264
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1265
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1266
+ * @param opts Optional parameters by name, see LongTouchOptions.
1267
+ * @example await d.long_touch("text", "메시지")
1268
+ */
1269
+ long_touch(by: By, value: string, ms?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1270
+ /**
1271
+ * Wait for an element and press and hold it.
1272
+ *
1273
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1274
+ * @param value The value to match. Leave it out when by is a query object.
1275
+ * @param ms Hold time in milliseconds. Default: 800.
1276
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1277
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1278
+ * @param opts Optional parameters by name, see LongTouchOptions.
1279
+ * @example await d.long_touch("text", "메시지")
1280
+ */
1281
+ long_touch(by: By, value: string, ms?: number, nth?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1282
+ /**
1283
+ * Wait for an element and press and hold it.
1284
+ *
1285
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1286
+ * @param value The value to match. Leave it out when by is a query object.
1287
+ * @param ms Hold time in milliseconds. Default: 800.
1288
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1289
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1290
+ * @param opts Optional parameters by name, see LongTouchOptions.
1291
+ * @example await d.long_touch("text", "메시지")
1292
+ */
1293
+ long_touch(by: By, value: string, ms?: number, nth?: number, timeout?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1294
+ /**
1295
+ * Wait for an element and press and hold it.
1296
+ *
1297
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1298
+ * @param value The value to match. Leave it out when by is a query object.
1299
+ * @param ms Hold time in milliseconds. Default: 800.
1300
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1301
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1302
+ * @param opts Optional parameters by name, see LongTouchOptions.
1303
+ * @example await d.long_touch("text", "메시지")
1304
+ */
1305
+ long_touch(by: Query, opts?: LongTouchOptions): Promise<LongTouchResult>;
1306
+ /**
1307
+ * Wait for an element and press and hold it.
1308
+ *
1309
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1310
+ * @param value The value to match. Leave it out when by is a query object.
1311
+ * @param ms Hold time in milliseconds. Default: 800.
1312
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1313
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1314
+ * @param opts Optional parameters by name, see LongTouchOptions.
1315
+ * @example await d.long_touch("text", "메시지")
1316
+ */
1317
+ long_touch(by: Query, ms?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1318
+ /**
1319
+ * Wait for an element and press and hold it.
1320
+ *
1321
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1322
+ * @param value The value to match. Leave it out when by is a query object.
1323
+ * @param ms Hold time in milliseconds. Default: 800.
1324
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1325
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1326
+ * @param opts Optional parameters by name, see LongTouchOptions.
1327
+ * @example await d.long_touch("text", "메시지")
1328
+ */
1329
+ long_touch(by: Query, ms?: number, nth?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1330
+ /**
1331
+ * Wait for an element and press and hold it.
1332
+ *
1333
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1334
+ * @param value The value to match. Leave it out when by is a query object.
1335
+ * @param ms Hold time in milliseconds. Default: 800.
1336
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1337
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1338
+ * @param opts Optional parameters by name, see LongTouchOptions.
1339
+ * @example await d.long_touch("text", "메시지")
1340
+ */
1341
+ long_touch(by: Query, ms?: number, nth?: number, timeout?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1342
+ /**
1343
+ * Wait for an element and press and hold it.
1344
+ *
1345
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1346
+ * @param value The value to match. Leave it out when by is a query object.
1347
+ * @param ms Hold time in milliseconds. Default: 800.
1348
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1349
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1350
+ * @param opts Optional parameters by name, see LongTouchOptions.
1351
+ * @example await d.long_touch("text", "메시지")
1352
+ * @alias long_touch
1353
+ */
1354
+ longTouch(by: By, value: string, opts?: LongTouchOptions): Promise<LongTouchResult>;
1355
+ /**
1356
+ * Wait for an element and press and hold it.
1357
+ *
1358
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1359
+ * @param value The value to match. Leave it out when by is a query object.
1360
+ * @param ms Hold time in milliseconds. Default: 800.
1361
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1362
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1363
+ * @param opts Optional parameters by name, see LongTouchOptions.
1364
+ * @example await d.long_touch("text", "메시지")
1365
+ * @alias long_touch
1366
+ */
1367
+ longTouch(by: By, value: string, ms?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1368
+ /**
1369
+ * Wait for an element and press and hold it.
1370
+ *
1371
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1372
+ * @param value The value to match. Leave it out when by is a query object.
1373
+ * @param ms Hold time in milliseconds. Default: 800.
1374
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1375
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1376
+ * @param opts Optional parameters by name, see LongTouchOptions.
1377
+ * @example await d.long_touch("text", "메시지")
1378
+ * @alias long_touch
1379
+ */
1380
+ longTouch(by: By, value: string, ms?: number, nth?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1381
+ /**
1382
+ * Wait for an element and press and hold it.
1383
+ *
1384
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1385
+ * @param value The value to match. Leave it out when by is a query object.
1386
+ * @param ms Hold time in milliseconds. Default: 800.
1387
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1388
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1389
+ * @param opts Optional parameters by name, see LongTouchOptions.
1390
+ * @example await d.long_touch("text", "메시지")
1391
+ * @alias long_touch
1392
+ */
1393
+ longTouch(by: By, value: string, ms?: number, nth?: number, timeout?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1394
+ /**
1395
+ * Wait for an element and press and hold it.
1396
+ *
1397
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1398
+ * @param value The value to match. Leave it out when by is a query object.
1399
+ * @param ms Hold time in milliseconds. Default: 800.
1400
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1401
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1402
+ * @param opts Optional parameters by name, see LongTouchOptions.
1403
+ * @example await d.long_touch("text", "메시지")
1404
+ * @alias long_touch
1405
+ */
1406
+ longTouch(by: Query, opts?: LongTouchOptions): Promise<LongTouchResult>;
1407
+ /**
1408
+ * Wait for an element and press and hold it.
1409
+ *
1410
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1411
+ * @param value The value to match. Leave it out when by is a query object.
1412
+ * @param ms Hold time in milliseconds. Default: 800.
1413
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1414
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1415
+ * @param opts Optional parameters by name, see LongTouchOptions.
1416
+ * @example await d.long_touch("text", "메시지")
1417
+ * @alias long_touch
1418
+ */
1419
+ longTouch(by: Query, ms?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1420
+ /**
1421
+ * Wait for an element and press and hold it.
1422
+ *
1423
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1424
+ * @param value The value to match. Leave it out when by is a query object.
1425
+ * @param ms Hold time in milliseconds. Default: 800.
1426
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1427
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1428
+ * @param opts Optional parameters by name, see LongTouchOptions.
1429
+ * @example await d.long_touch("text", "메시지")
1430
+ * @alias long_touch
1431
+ */
1432
+ longTouch(by: Query, ms?: number, nth?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1433
+ /**
1434
+ * Wait for an element and press and hold it.
1435
+ *
1436
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1437
+ * @param value The value to match. Leave it out when by is a query object.
1438
+ * @param ms Hold time in milliseconds. Default: 800.
1439
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1440
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1441
+ * @param opts Optional parameters by name, see LongTouchOptions.
1442
+ * @example await d.long_touch("text", "메시지")
1443
+ * @alias long_touch
1444
+ */
1445
+ longTouch(by: Query, ms?: number, nth?: number, timeout?: number, opts?: LongTouchOptions): Promise<LongTouchResult>;
1446
+ /**
1447
+ * Scroll until an element is visible.
1448
+ *
1449
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1450
+ * @param value The value to match. Leave it out when by is a query object.
1451
+ * @param direction Direction the content moves toward. Default: "down".
1452
+ * @param max_swipes Give up after this many swipes. Default: 20.
1453
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1454
+ * @param opts Optional parameters by name, see ScrollToOptions.
1455
+ * @example await d.scroll_to("text", "설정")
1456
+ */
1457
+ scroll_to(by: By, value: string, opts?: ScrollToOptions): Promise<ScrollToResult>;
1458
+ /**
1459
+ * Scroll until an element is visible.
1460
+ *
1461
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1462
+ * @param value The value to match. Leave it out when by is a query object.
1463
+ * @param direction Direction the content moves toward. Default: "down".
1464
+ * @param max_swipes Give up after this many swipes. Default: 20.
1465
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1466
+ * @param opts Optional parameters by name, see ScrollToOptions.
1467
+ * @example await d.scroll_to("text", "설정")
1468
+ */
1469
+ scroll_to(by: By, value: string, direction?: "down" | "up" | "left" | "right", opts?: ScrollToOptions): Promise<ScrollToResult>;
1470
+ /**
1471
+ * Scroll until an element is visible.
1472
+ *
1473
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1474
+ * @param value The value to match. Leave it out when by is a query object.
1475
+ * @param direction Direction the content moves toward. Default: "down".
1476
+ * @param max_swipes Give up after this many swipes. Default: 20.
1477
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1478
+ * @param opts Optional parameters by name, see ScrollToOptions.
1479
+ * @example await d.scroll_to("text", "설정")
1480
+ */
1481
+ scroll_to(by: By, value: string, direction?: "down" | "up" | "left" | "right", max_swipes?: number, opts?: ScrollToOptions): Promise<ScrollToResult>;
1482
+ /**
1483
+ * Scroll until an element is visible.
1484
+ *
1485
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1486
+ * @param value The value to match. Leave it out when by is a query object.
1487
+ * @param direction Direction the content moves toward. Default: "down".
1488
+ * @param max_swipes Give up after this many swipes. Default: 20.
1489
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1490
+ * @param opts Optional parameters by name, see ScrollToOptions.
1491
+ * @example await d.scroll_to("text", "설정")
1492
+ */
1493
+ scroll_to(by: By, value: string, direction?: "down" | "up" | "left" | "right", max_swipes?: number, nth?: number, opts?: ScrollToOptions): Promise<ScrollToResult>;
1494
+ /**
1495
+ * Scroll until an element is visible.
1496
+ *
1497
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1498
+ * @param value The value to match. Leave it out when by is a query object.
1499
+ * @param direction Direction the content moves toward. Default: "down".
1500
+ * @param max_swipes Give up after this many swipes. Default: 20.
1501
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1502
+ * @param opts Optional parameters by name, see ScrollToOptions.
1503
+ * @example await d.scroll_to("text", "설정")
1504
+ */
1505
+ scroll_to(by: Query, opts?: ScrollToOptions): Promise<ScrollToResult>;
1506
+ /**
1507
+ * Scroll until an element is visible.
1508
+ *
1509
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1510
+ * @param value The value to match. Leave it out when by is a query object.
1511
+ * @param direction Direction the content moves toward. Default: "down".
1512
+ * @param max_swipes Give up after this many swipes. Default: 20.
1513
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1514
+ * @param opts Optional parameters by name, see ScrollToOptions.
1515
+ * @example await d.scroll_to("text", "설정")
1516
+ */
1517
+ scroll_to(by: Query, direction?: "down" | "up" | "left" | "right", opts?: ScrollToOptions): Promise<ScrollToResult>;
1518
+ /**
1519
+ * Scroll until an element is visible.
1520
+ *
1521
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1522
+ * @param value The value to match. Leave it out when by is a query object.
1523
+ * @param direction Direction the content moves toward. Default: "down".
1524
+ * @param max_swipes Give up after this many swipes. Default: 20.
1525
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1526
+ * @param opts Optional parameters by name, see ScrollToOptions.
1527
+ * @example await d.scroll_to("text", "설정")
1528
+ */
1529
+ scroll_to(by: Query, direction?: "down" | "up" | "left" | "right", max_swipes?: number, opts?: ScrollToOptions): Promise<ScrollToResult>;
1530
+ /**
1531
+ * Scroll until an element is visible.
1532
+ *
1533
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1534
+ * @param value The value to match. Leave it out when by is a query object.
1535
+ * @param direction Direction the content moves toward. Default: "down".
1536
+ * @param max_swipes Give up after this many swipes. Default: 20.
1537
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1538
+ * @param opts Optional parameters by name, see ScrollToOptions.
1539
+ * @example await d.scroll_to("text", "설정")
1540
+ */
1541
+ scroll_to(by: Query, direction?: "down" | "up" | "left" | "right", max_swipes?: number, nth?: number, opts?: ScrollToOptions): Promise<ScrollToResult>;
1542
+ /**
1543
+ * Scroll until an element is visible.
1544
+ *
1545
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1546
+ * @param value The value to match. Leave it out when by is a query object.
1547
+ * @param direction Direction the content moves toward. Default: "down".
1548
+ * @param max_swipes Give up after this many swipes. Default: 20.
1549
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1550
+ * @param opts Optional parameters by name, see ScrollToOptions.
1551
+ * @example await d.scroll_to("text", "설정")
1552
+ * @alias scroll_to
1553
+ */
1554
+ scrollTo(by: By, value: string, opts?: ScrollToOptions): Promise<ScrollToResult>;
1555
+ /**
1556
+ * Scroll until an element is visible.
1557
+ *
1558
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1559
+ * @param value The value to match. Leave it out when by is a query object.
1560
+ * @param direction Direction the content moves toward. Default: "down".
1561
+ * @param max_swipes Give up after this many swipes. Default: 20.
1562
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1563
+ * @param opts Optional parameters by name, see ScrollToOptions.
1564
+ * @example await d.scroll_to("text", "설정")
1565
+ * @alias scroll_to
1566
+ */
1567
+ scrollTo(by: By, value: string, direction?: "down" | "up" | "left" | "right", opts?: ScrollToOptions): Promise<ScrollToResult>;
1568
+ /**
1569
+ * Scroll until an element is visible.
1570
+ *
1571
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1572
+ * @param value The value to match. Leave it out when by is a query object.
1573
+ * @param direction Direction the content moves toward. Default: "down".
1574
+ * @param max_swipes Give up after this many swipes. Default: 20.
1575
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1576
+ * @param opts Optional parameters by name, see ScrollToOptions.
1577
+ * @example await d.scroll_to("text", "설정")
1578
+ * @alias scroll_to
1579
+ */
1580
+ scrollTo(by: By, value: string, direction?: "down" | "up" | "left" | "right", max_swipes?: number, opts?: ScrollToOptions): Promise<ScrollToResult>;
1581
+ /**
1582
+ * Scroll until an element is visible.
1583
+ *
1584
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1585
+ * @param value The value to match. Leave it out when by is a query object.
1586
+ * @param direction Direction the content moves toward. Default: "down".
1587
+ * @param max_swipes Give up after this many swipes. Default: 20.
1588
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1589
+ * @param opts Optional parameters by name, see ScrollToOptions.
1590
+ * @example await d.scroll_to("text", "설정")
1591
+ * @alias scroll_to
1592
+ */
1593
+ scrollTo(by: By, value: string, direction?: "down" | "up" | "left" | "right", max_swipes?: number, nth?: number, opts?: ScrollToOptions): Promise<ScrollToResult>;
1594
+ /**
1595
+ * Scroll until an element is visible.
1596
+ *
1597
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1598
+ * @param value The value to match. Leave it out when by is a query object.
1599
+ * @param direction Direction the content moves toward. Default: "down".
1600
+ * @param max_swipes Give up after this many swipes. Default: 20.
1601
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1602
+ * @param opts Optional parameters by name, see ScrollToOptions.
1603
+ * @example await d.scroll_to("text", "설정")
1604
+ * @alias scroll_to
1605
+ */
1606
+ scrollTo(by: Query, opts?: ScrollToOptions): Promise<ScrollToResult>;
1607
+ /**
1608
+ * Scroll until an element is visible.
1609
+ *
1610
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1611
+ * @param value The value to match. Leave it out when by is a query object.
1612
+ * @param direction Direction the content moves toward. Default: "down".
1613
+ * @param max_swipes Give up after this many swipes. Default: 20.
1614
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1615
+ * @param opts Optional parameters by name, see ScrollToOptions.
1616
+ * @example await d.scroll_to("text", "설정")
1617
+ * @alias scroll_to
1618
+ */
1619
+ scrollTo(by: Query, direction?: "down" | "up" | "left" | "right", opts?: ScrollToOptions): Promise<ScrollToResult>;
1620
+ /**
1621
+ * Scroll until an element is visible.
1622
+ *
1623
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1624
+ * @param value The value to match. Leave it out when by is a query object.
1625
+ * @param direction Direction the content moves toward. Default: "down".
1626
+ * @param max_swipes Give up after this many swipes. Default: 20.
1627
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1628
+ * @param opts Optional parameters by name, see ScrollToOptions.
1629
+ * @example await d.scroll_to("text", "설정")
1630
+ * @alias scroll_to
1631
+ */
1632
+ scrollTo(by: Query, direction?: "down" | "up" | "left" | "right", max_swipes?: number, opts?: ScrollToOptions): Promise<ScrollToResult>;
1633
+ /**
1634
+ * Scroll until an element is visible.
1635
+ *
1636
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1637
+ * @param value The value to match. Leave it out when by is a query object.
1638
+ * @param direction Direction the content moves toward. Default: "down".
1639
+ * @param max_swipes Give up after this many swipes. Default: 20.
1640
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1641
+ * @param opts Optional parameters by name, see ScrollToOptions.
1642
+ * @example await d.scroll_to("text", "설정")
1643
+ * @alias scroll_to
1644
+ */
1645
+ scrollTo(by: Query, direction?: "down" | "up" | "left" | "right", max_swipes?: number, nth?: number, opts?: ScrollToOptions): Promise<ScrollToResult>;
1646
+ /**
1647
+ * Wait for a field and set its text.
1648
+ *
1649
+ * Uses the accessibility set-text action. Fields that ignore it fall back to the Droidline keyboard when it is selected.
1650
+ *
1651
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1652
+ * @param value The value to match. Leave it out when by is a query object.
1653
+ * @param text Text to enter.
1654
+ * @param append Keep existing text and add to the end. Default: false.
1655
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1656
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1657
+ * @param opts Optional parameters by name, see InputOptions.
1658
+ * @example await d.input("id", "com.kakao.talk:id/email", "knife")
1659
+ */
1660
+ input(by: By, value: string, text: string, opts?: InputOptions): Promise<InputResult>;
1661
+ /**
1662
+ * Wait for a field and set its text.
1663
+ *
1664
+ * Uses the accessibility set-text action. Fields that ignore it fall back to the Droidline keyboard when it is selected.
1665
+ *
1666
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1667
+ * @param value The value to match. Leave it out when by is a query object.
1668
+ * @param text Text to enter.
1669
+ * @param append Keep existing text and add to the end. Default: false.
1670
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1671
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1672
+ * @param opts Optional parameters by name, see InputOptions.
1673
+ * @example await d.input("id", "com.kakao.talk:id/email", "knife")
1674
+ */
1675
+ input(by: By, value: string, text: string, append?: boolean, opts?: InputOptions): Promise<InputResult>;
1676
+ /**
1677
+ * Wait for a field and set its text.
1678
+ *
1679
+ * Uses the accessibility set-text action. Fields that ignore it fall back to the Droidline keyboard when it is selected.
1680
+ *
1681
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1682
+ * @param value The value to match. Leave it out when by is a query object.
1683
+ * @param text Text to enter.
1684
+ * @param append Keep existing text and add to the end. Default: false.
1685
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1686
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1687
+ * @param opts Optional parameters by name, see InputOptions.
1688
+ * @example await d.input("id", "com.kakao.talk:id/email", "knife")
1689
+ */
1690
+ input(by: By, value: string, text: string, append?: boolean, nth?: number, opts?: InputOptions): Promise<InputResult>;
1691
+ /**
1692
+ * Wait for a field and set its text.
1693
+ *
1694
+ * Uses the accessibility set-text action. Fields that ignore it fall back to the Droidline keyboard when it is selected.
1695
+ *
1696
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1697
+ * @param value The value to match. Leave it out when by is a query object.
1698
+ * @param text Text to enter.
1699
+ * @param append Keep existing text and add to the end. Default: false.
1700
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1701
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1702
+ * @param opts Optional parameters by name, see InputOptions.
1703
+ * @example await d.input("id", "com.kakao.talk:id/email", "knife")
1704
+ */
1705
+ input(by: By, value: string, text: string, append?: boolean, nth?: number, timeout?: number, opts?: InputOptions): Promise<InputResult>;
1706
+ /**
1707
+ * Wait for a field and set its text.
1708
+ *
1709
+ * Uses the accessibility set-text action. Fields that ignore it fall back to the Droidline keyboard when it is selected.
1710
+ *
1711
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1712
+ * @param value The value to match. Leave it out when by is a query object.
1713
+ * @param text Text to enter.
1714
+ * @param append Keep existing text and add to the end. Default: false.
1715
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1716
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1717
+ * @param opts Optional parameters by name, see InputOptions.
1718
+ * @example await d.input("id", "com.kakao.talk:id/email", "knife")
1719
+ */
1720
+ input(by: Query, text: string, opts?: InputOptions): Promise<InputResult>;
1721
+ /**
1722
+ * Wait for a field and set its text.
1723
+ *
1724
+ * Uses the accessibility set-text action. Fields that ignore it fall back to the Droidline keyboard when it is selected.
1725
+ *
1726
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1727
+ * @param value The value to match. Leave it out when by is a query object.
1728
+ * @param text Text to enter.
1729
+ * @param append Keep existing text and add to the end. Default: false.
1730
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1731
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1732
+ * @param opts Optional parameters by name, see InputOptions.
1733
+ * @example await d.input("id", "com.kakao.talk:id/email", "knife")
1734
+ */
1735
+ input(by: Query, text: string, append?: boolean, opts?: InputOptions): Promise<InputResult>;
1736
+ /**
1737
+ * Wait for a field and set its text.
1738
+ *
1739
+ * Uses the accessibility set-text action. Fields that ignore it fall back to the Droidline keyboard when it is selected.
1740
+ *
1741
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1742
+ * @param value The value to match. Leave it out when by is a query object.
1743
+ * @param text Text to enter.
1744
+ * @param append Keep existing text and add to the end. Default: false.
1745
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1746
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1747
+ * @param opts Optional parameters by name, see InputOptions.
1748
+ * @example await d.input("id", "com.kakao.talk:id/email", "knife")
1749
+ */
1750
+ input(by: Query, text: string, append?: boolean, nth?: number, opts?: InputOptions): Promise<InputResult>;
1751
+ /**
1752
+ * Wait for a field and set its text.
1753
+ *
1754
+ * Uses the accessibility set-text action. Fields that ignore it fall back to the Droidline keyboard when it is selected.
1755
+ *
1756
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1757
+ * @param value The value to match. Leave it out when by is a query object.
1758
+ * @param text Text to enter.
1759
+ * @param append Keep existing text and add to the end. Default: false.
1760
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1761
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1762
+ * @param opts Optional parameters by name, see InputOptions.
1763
+ * @example await d.input("id", "com.kakao.talk:id/email", "knife")
1764
+ */
1765
+ input(by: Query, text: string, append?: boolean, nth?: number, timeout?: number, opts?: InputOptions): Promise<InputResult>;
1766
+ /**
1767
+ * Empty a text field.
1768
+ *
1769
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1770
+ * @param value The value to match. Leave it out when by is a query object.
1771
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1772
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1773
+ * @param opts Optional parameters by name, see ClearOptions.
1774
+ * @example await d.clear("id", "com.kakao.talk:id/email")
1775
+ */
1776
+ clear(by: By, value: string, opts?: ClearOptions): Promise<ClearResult>;
1777
+ /**
1778
+ * Empty a text field.
1779
+ *
1780
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1781
+ * @param value The value to match. Leave it out when by is a query object.
1782
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1783
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1784
+ * @param opts Optional parameters by name, see ClearOptions.
1785
+ * @example await d.clear("id", "com.kakao.talk:id/email")
1786
+ */
1787
+ clear(by: By, value: string, nth?: number, opts?: ClearOptions): Promise<ClearResult>;
1788
+ /**
1789
+ * Empty a text field.
1790
+ *
1791
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1792
+ * @param value The value to match. Leave it out when by is a query object.
1793
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1794
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1795
+ * @param opts Optional parameters by name, see ClearOptions.
1796
+ * @example await d.clear("id", "com.kakao.talk:id/email")
1797
+ */
1798
+ clear(by: By, value: string, nth?: number, timeout?: number, opts?: ClearOptions): Promise<ClearResult>;
1799
+ /**
1800
+ * Empty a text field.
1801
+ *
1802
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1803
+ * @param value The value to match. Leave it out when by is a query object.
1804
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1805
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1806
+ * @param opts Optional parameters by name, see ClearOptions.
1807
+ * @example await d.clear("id", "com.kakao.talk:id/email")
1808
+ */
1809
+ clear(by: Query, opts?: ClearOptions): Promise<ClearResult>;
1810
+ /**
1811
+ * Empty a text field.
1812
+ *
1813
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1814
+ * @param value The value to match. Leave it out when by is a query object.
1815
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1816
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1817
+ * @param opts Optional parameters by name, see ClearOptions.
1818
+ * @example await d.clear("id", "com.kakao.talk:id/email")
1819
+ */
1820
+ clear(by: Query, nth?: number, opts?: ClearOptions): Promise<ClearResult>;
1821
+ /**
1822
+ * Empty a text field.
1823
+ *
1824
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1825
+ * @param value The value to match. Leave it out when by is a query object.
1826
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1827
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1828
+ * @param opts Optional parameters by name, see ClearOptions.
1829
+ * @example await d.clear("id", "com.kakao.talk:id/email")
1830
+ */
1831
+ clear(by: Query, nth?: number, timeout?: number, opts?: ClearOptions): Promise<ClearResult>;
1832
+ /**
1833
+ * Send a key name, a key code, or text.
1834
+ *
1835
+ * back, home, recents, notifications, quick_settings and lock use accessibility global actions. Other keys and text go through the Droidline keyboard to the focused field.
1836
+ *
1837
+ * @param key Key name (enter, tab, del, space, escape, up, down, left, right, back, home...), Android key code, or text to type.
1838
+ * @param text Type this text literally, even if it equals a key name.
1839
+ * @param opts Optional parameters by name, see SendkeyOptions.
1840
+ * @throws {DroidlineError} with code NO_IME, BAD_ARGS.
1841
+ * @example await d.sendkey("enter")
1842
+ */
1843
+ sendkey(opts?: SendkeyOptions): Promise<SendkeyResult>;
1844
+ /**
1845
+ * Send a key name, a key code, or text.
1846
+ *
1847
+ * back, home, recents, notifications, quick_settings and lock use accessibility global actions. Other keys and text go through the Droidline keyboard to the focused field.
1848
+ *
1849
+ * @param key Key name (enter, tab, del, space, escape, up, down, left, right, back, home...), Android key code, or text to type.
1850
+ * @param text Type this text literally, even if it equals a key name.
1851
+ * @param opts Optional parameters by name, see SendkeyOptions.
1852
+ * @throws {DroidlineError} with code NO_IME, BAD_ARGS.
1853
+ * @example await d.sendkey("enter")
1854
+ */
1855
+ sendkey(key?: string | number, opts?: SendkeyOptions): Promise<SendkeyResult>;
1856
+ /**
1857
+ * Send a key name, a key code, or text.
1858
+ *
1859
+ * back, home, recents, notifications, quick_settings and lock use accessibility global actions. Other keys and text go through the Droidline keyboard to the focused field.
1860
+ *
1861
+ * @param key Key name (enter, tab, del, space, escape, up, down, left, right, back, home...), Android key code, or text to type.
1862
+ * @param text Type this text literally, even if it equals a key name.
1863
+ * @param opts Optional parameters by name, see SendkeyOptions.
1864
+ * @throws {DroidlineError} with code NO_IME, BAD_ARGS.
1865
+ * @example await d.sendkey("enter")
1866
+ */
1867
+ sendkey(key?: string | number, text?: string, opts?: SendkeyOptions): Promise<SendkeyResult>;
1868
+ /**
1869
+ * Whether an element is on screen right now. Never waits.
1870
+ *
1871
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1872
+ * @param value The value to match. Leave it out when by is a query object.
1873
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1874
+ * @param opts Optional parameters by name, see ExistsOptions.
1875
+ * @example await d.exists("text", "광고 닫기")
1876
+ */
1877
+ exists(by: By, value: string, opts?: ExistsOptions): Promise<boolean>;
1878
+ /**
1879
+ * Whether an element is on screen right now. Never waits.
1880
+ *
1881
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1882
+ * @param value The value to match. Leave it out when by is a query object.
1883
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1884
+ * @param opts Optional parameters by name, see ExistsOptions.
1885
+ * @example await d.exists("text", "광고 닫기")
1886
+ */
1887
+ exists(by: By, value: string, nth?: number, opts?: ExistsOptions): Promise<boolean>;
1888
+ /**
1889
+ * Whether an element is on screen right now. Never waits.
1890
+ *
1891
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1892
+ * @param value The value to match. Leave it out when by is a query object.
1893
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1894
+ * @param opts Optional parameters by name, see ExistsOptions.
1895
+ * @example await d.exists("text", "광고 닫기")
1896
+ */
1897
+ exists(by: Query, opts?: ExistsOptions): Promise<boolean>;
1898
+ /**
1899
+ * Whether an element is on screen right now. Never waits.
1900
+ *
1901
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1902
+ * @param value The value to match. Leave it out when by is a query object.
1903
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1904
+ * @param opts Optional parameters by name, see ExistsOptions.
1905
+ * @example await d.exists("text", "광고 닫기")
1906
+ */
1907
+ exists(by: Query, nth?: number, opts?: ExistsOptions): Promise<boolean>;
1908
+ /**
1909
+ * Wait until an element appears.
1910
+ *
1911
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1912
+ * @param value The value to match. Leave it out when by is a query object.
1913
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1914
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1915
+ * @param opts Optional parameters by name, see WaitOptions.
1916
+ * @throws {DroidlineError} with code NOT_FOUND.
1917
+ * @example await d.wait("text", "완료", 30)
1918
+ */
1919
+ wait(by: By, value: string, opts?: WaitOptions): Promise<WaitResult>;
1920
+ /**
1921
+ * Wait until an element appears.
1922
+ *
1923
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1924
+ * @param value The value to match. Leave it out when by is a query object.
1925
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1926
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1927
+ * @param opts Optional parameters by name, see WaitOptions.
1928
+ * @throws {DroidlineError} with code NOT_FOUND.
1929
+ * @example await d.wait("text", "완료", 30)
1930
+ */
1931
+ wait(by: By, value: string, timeout?: number, opts?: WaitOptions): Promise<WaitResult>;
1932
+ /**
1933
+ * Wait until an element appears.
1934
+ *
1935
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1936
+ * @param value The value to match. Leave it out when by is a query object.
1937
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1938
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1939
+ * @param opts Optional parameters by name, see WaitOptions.
1940
+ * @throws {DroidlineError} with code NOT_FOUND.
1941
+ * @example await d.wait("text", "완료", 30)
1942
+ */
1943
+ wait(by: By, value: string, timeout?: number, nth?: number, opts?: WaitOptions): Promise<WaitResult>;
1944
+ /**
1945
+ * Wait until an element appears.
1946
+ *
1947
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1948
+ * @param value The value to match. Leave it out when by is a query object.
1949
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1950
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1951
+ * @param opts Optional parameters by name, see WaitOptions.
1952
+ * @throws {DroidlineError} with code NOT_FOUND.
1953
+ * @example await d.wait("text", "완료", 30)
1954
+ */
1955
+ wait(by: Query, opts?: WaitOptions): Promise<WaitResult>;
1956
+ /**
1957
+ * Wait until an element appears.
1958
+ *
1959
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1960
+ * @param value The value to match. Leave it out when by is a query object.
1961
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1962
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1963
+ * @param opts Optional parameters by name, see WaitOptions.
1964
+ * @throws {DroidlineError} with code NOT_FOUND.
1965
+ * @example await d.wait("text", "완료", 30)
1966
+ */
1967
+ wait(by: Query, timeout?: number, opts?: WaitOptions): Promise<WaitResult>;
1968
+ /**
1969
+ * Wait until an element appears.
1970
+ *
1971
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1972
+ * @param value The value to match. Leave it out when by is a query object.
1973
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1974
+ * @param nth Index when several elements match, starting at 0. Default: 0.
1975
+ * @param opts Optional parameters by name, see WaitOptions.
1976
+ * @throws {DroidlineError} with code NOT_FOUND.
1977
+ * @example await d.wait("text", "완료", 30)
1978
+ */
1979
+ wait(by: Query, timeout?: number, nth?: number, opts?: WaitOptions): Promise<WaitResult>;
1980
+ /**
1981
+ * Wait until an element disappears.
1982
+ *
1983
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1984
+ * @param value The value to match. Leave it out when by is a query object.
1985
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1986
+ * @param opts Optional parameters by name, see WaitGoneOptions.
1987
+ * @throws {DroidlineError} with code TIMEOUT.
1988
+ * @example await d.wait_gone("text", "로딩 중")
1989
+ */
1990
+ wait_gone(by: By, value: string, opts?: WaitGoneOptions): Promise<WaitGoneResult>;
1991
+ /**
1992
+ * Wait until an element disappears.
1993
+ *
1994
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
1995
+ * @param value The value to match. Leave it out when by is a query object.
1996
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
1997
+ * @param opts Optional parameters by name, see WaitGoneOptions.
1998
+ * @throws {DroidlineError} with code TIMEOUT.
1999
+ * @example await d.wait_gone("text", "로딩 중")
2000
+ */
2001
+ wait_gone(by: By, value: string, timeout?: number, opts?: WaitGoneOptions): Promise<WaitGoneResult>;
2002
+ /**
2003
+ * Wait until an element disappears.
2004
+ *
2005
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2006
+ * @param value The value to match. Leave it out when by is a query object.
2007
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2008
+ * @param opts Optional parameters by name, see WaitGoneOptions.
2009
+ * @throws {DroidlineError} with code TIMEOUT.
2010
+ * @example await d.wait_gone("text", "로딩 중")
2011
+ */
2012
+ wait_gone(by: Query, opts?: WaitGoneOptions): Promise<WaitGoneResult>;
2013
+ /**
2014
+ * Wait until an element disappears.
2015
+ *
2016
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2017
+ * @param value The value to match. Leave it out when by is a query object.
2018
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2019
+ * @param opts Optional parameters by name, see WaitGoneOptions.
2020
+ * @throws {DroidlineError} with code TIMEOUT.
2021
+ * @example await d.wait_gone("text", "로딩 중")
2022
+ */
2023
+ wait_gone(by: Query, timeout?: number, opts?: WaitGoneOptions): Promise<WaitGoneResult>;
2024
+ /**
2025
+ * Wait until an element disappears.
2026
+ *
2027
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2028
+ * @param value The value to match. Leave it out when by is a query object.
2029
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2030
+ * @param opts Optional parameters by name, see WaitGoneOptions.
2031
+ * @throws {DroidlineError} with code TIMEOUT.
2032
+ * @example await d.wait_gone("text", "로딩 중")
2033
+ * @alias wait_gone
2034
+ */
2035
+ waitGone(by: By, value: string, opts?: WaitGoneOptions): Promise<WaitGoneResult>;
2036
+ /**
2037
+ * Wait until an element disappears.
2038
+ *
2039
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2040
+ * @param value The value to match. Leave it out when by is a query object.
2041
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2042
+ * @param opts Optional parameters by name, see WaitGoneOptions.
2043
+ * @throws {DroidlineError} with code TIMEOUT.
2044
+ * @example await d.wait_gone("text", "로딩 중")
2045
+ * @alias wait_gone
2046
+ */
2047
+ waitGone(by: By, value: string, timeout?: number, opts?: WaitGoneOptions): Promise<WaitGoneResult>;
2048
+ /**
2049
+ * Wait until an element disappears.
2050
+ *
2051
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2052
+ * @param value The value to match. Leave it out when by is a query object.
2053
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2054
+ * @param opts Optional parameters by name, see WaitGoneOptions.
2055
+ * @throws {DroidlineError} with code TIMEOUT.
2056
+ * @example await d.wait_gone("text", "로딩 중")
2057
+ * @alias wait_gone
2058
+ */
2059
+ waitGone(by: Query, opts?: WaitGoneOptions): Promise<WaitGoneResult>;
2060
+ /**
2061
+ * Wait until an element disappears.
2062
+ *
2063
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2064
+ * @param value The value to match. Leave it out when by is a query object.
2065
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2066
+ * @param opts Optional parameters by name, see WaitGoneOptions.
2067
+ * @throws {DroidlineError} with code TIMEOUT.
2068
+ * @example await d.wait_gone("text", "로딩 중")
2069
+ * @alias wait_gone
2070
+ */
2071
+ waitGone(by: Query, timeout?: number, opts?: WaitGoneOptions): Promise<WaitGoneResult>;
2072
+ /**
2073
+ * Wait until the screen stops changing.
2074
+ *
2075
+ * Waits until the app in front has drawn nothing new for ms milliseconds. Use it after an action that loads content, instead of a fixed sleep. A screen that animates all the time ends in TIMEOUT.
2076
+ *
2077
+ * @param ms How long the screen must stay unchanged. Default: 500.
2078
+ * @param timeout Seconds to wait before giving up. Default: 10.
2079
+ * @param opts Optional parameters by name, see WaitIdleOptions.
2080
+ * @throws {DroidlineError} with code TIMEOUT.
2081
+ * @example await d.wait_idle()
2082
+ */
2083
+ wait_idle(opts?: WaitIdleOptions): Promise<WaitIdleResult>;
2084
+ /**
2085
+ * Wait until the screen stops changing.
2086
+ *
2087
+ * Waits until the app in front has drawn nothing new for ms milliseconds. Use it after an action that loads content, instead of a fixed sleep. A screen that animates all the time ends in TIMEOUT.
2088
+ *
2089
+ * @param ms How long the screen must stay unchanged. Default: 500.
2090
+ * @param timeout Seconds to wait before giving up. Default: 10.
2091
+ * @param opts Optional parameters by name, see WaitIdleOptions.
2092
+ * @throws {DroidlineError} with code TIMEOUT.
2093
+ * @example await d.wait_idle()
2094
+ */
2095
+ wait_idle(ms?: number, opts?: WaitIdleOptions): Promise<WaitIdleResult>;
2096
+ /**
2097
+ * Wait until the screen stops changing.
2098
+ *
2099
+ * Waits until the app in front has drawn nothing new for ms milliseconds. Use it after an action that loads content, instead of a fixed sleep. A screen that animates all the time ends in TIMEOUT.
2100
+ *
2101
+ * @param ms How long the screen must stay unchanged. Default: 500.
2102
+ * @param timeout Seconds to wait before giving up. Default: 10.
2103
+ * @param opts Optional parameters by name, see WaitIdleOptions.
2104
+ * @throws {DroidlineError} with code TIMEOUT.
2105
+ * @example await d.wait_idle()
2106
+ */
2107
+ wait_idle(ms?: number, timeout?: number, opts?: WaitIdleOptions): Promise<WaitIdleResult>;
2108
+ /**
2109
+ * Wait until the screen stops changing.
2110
+ *
2111
+ * Waits until the app in front has drawn nothing new for ms milliseconds. Use it after an action that loads content, instead of a fixed sleep. A screen that animates all the time ends in TIMEOUT.
2112
+ *
2113
+ * @param ms How long the screen must stay unchanged. Default: 500.
2114
+ * @param timeout Seconds to wait before giving up. Default: 10.
2115
+ * @param opts Optional parameters by name, see WaitIdleOptions.
2116
+ * @throws {DroidlineError} with code TIMEOUT.
2117
+ * @example await d.wait_idle()
2118
+ * @alias wait_idle
2119
+ */
2120
+ waitIdle(opts?: WaitIdleOptions): Promise<WaitIdleResult>;
2121
+ /**
2122
+ * Wait until the screen stops changing.
2123
+ *
2124
+ * Waits until the app in front has drawn nothing new for ms milliseconds. Use it after an action that loads content, instead of a fixed sleep. A screen that animates all the time ends in TIMEOUT.
2125
+ *
2126
+ * @param ms How long the screen must stay unchanged. Default: 500.
2127
+ * @param timeout Seconds to wait before giving up. Default: 10.
2128
+ * @param opts Optional parameters by name, see WaitIdleOptions.
2129
+ * @throws {DroidlineError} with code TIMEOUT.
2130
+ * @example await d.wait_idle()
2131
+ * @alias wait_idle
2132
+ */
2133
+ waitIdle(ms?: number, opts?: WaitIdleOptions): Promise<WaitIdleResult>;
2134
+ /**
2135
+ * Wait until the screen stops changing.
2136
+ *
2137
+ * Waits until the app in front has drawn nothing new for ms milliseconds. Use it after an action that loads content, instead of a fixed sleep. A screen that animates all the time ends in TIMEOUT.
2138
+ *
2139
+ * @param ms How long the screen must stay unchanged. Default: 500.
2140
+ * @param timeout Seconds to wait before giving up. Default: 10.
2141
+ * @param opts Optional parameters by name, see WaitIdleOptions.
2142
+ * @throws {DroidlineError} with code TIMEOUT.
2143
+ * @example await d.wait_idle()
2144
+ * @alias wait_idle
2145
+ */
2146
+ waitIdle(ms?: number, timeout?: number, opts?: WaitIdleOptions): Promise<WaitIdleResult>;
2147
+ /**
2148
+ * Wait for an element and return it.
2149
+ *
2150
+ * The SDKs return an element object with click, input, find and the node fields. The node comes without children.
2151
+ *
2152
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2153
+ * @param value The value to match. Leave it out when by is a query object.
2154
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2155
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2156
+ * @param opts Optional parameters by name, see FindOptions.
2157
+ * @throws {DroidlineError} with code NOT_FOUND.
2158
+ * @example await d.find("text", "로그인")
2159
+ */
2160
+ find(by: By, value: string, opts?: FindOptions): Promise<Element>;
2161
+ /**
2162
+ * Wait for an element and return it.
2163
+ *
2164
+ * The SDKs return an element object with click, input, find and the node fields. The node comes without children.
2165
+ *
2166
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2167
+ * @param value The value to match. Leave it out when by is a query object.
2168
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2169
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2170
+ * @param opts Optional parameters by name, see FindOptions.
2171
+ * @throws {DroidlineError} with code NOT_FOUND.
2172
+ * @example await d.find("text", "로그인")
2173
+ */
2174
+ find(by: By, value: string, nth?: number, opts?: FindOptions): Promise<Element>;
2175
+ /**
2176
+ * Wait for an element and return it.
2177
+ *
2178
+ * The SDKs return an element object with click, input, find and the node fields. The node comes without children.
2179
+ *
2180
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2181
+ * @param value The value to match. Leave it out when by is a query object.
2182
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2183
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2184
+ * @param opts Optional parameters by name, see FindOptions.
2185
+ * @throws {DroidlineError} with code NOT_FOUND.
2186
+ * @example await d.find("text", "로그인")
2187
+ */
2188
+ find(by: By, value: string, nth?: number, timeout?: number, opts?: FindOptions): Promise<Element>;
2189
+ /**
2190
+ * Wait for an element and return it.
2191
+ *
2192
+ * The SDKs return an element object with click, input, find and the node fields. The node comes without children.
2193
+ *
2194
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2195
+ * @param value The value to match. Leave it out when by is a query object.
2196
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2197
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2198
+ * @param opts Optional parameters by name, see FindOptions.
2199
+ * @throws {DroidlineError} with code NOT_FOUND.
2200
+ * @example await d.find("text", "로그인")
2201
+ */
2202
+ find(by: Query, opts?: FindOptions): Promise<Element>;
2203
+ /**
2204
+ * Wait for an element and return it.
2205
+ *
2206
+ * The SDKs return an element object with click, input, find and the node fields. The node comes without children.
2207
+ *
2208
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2209
+ * @param value The value to match. Leave it out when by is a query object.
2210
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2211
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2212
+ * @param opts Optional parameters by name, see FindOptions.
2213
+ * @throws {DroidlineError} with code NOT_FOUND.
2214
+ * @example await d.find("text", "로그인")
2215
+ */
2216
+ find(by: Query, nth?: number, opts?: FindOptions): Promise<Element>;
2217
+ /**
2218
+ * Wait for an element and return it.
2219
+ *
2220
+ * The SDKs return an element object with click, input, find and the node fields. The node comes without children.
2221
+ *
2222
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2223
+ * @param value The value to match. Leave it out when by is a query object.
2224
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2225
+ * @param timeout Seconds to wait for the target to appear. Default: 10.
2226
+ * @param opts Optional parameters by name, see FindOptions.
2227
+ * @throws {DroidlineError} with code NOT_FOUND.
2228
+ * @example await d.find("text", "로그인")
2229
+ */
2230
+ find(by: Query, nth?: number, timeout?: number, opts?: FindOptions): Promise<Element>;
2231
+ /**
2232
+ * Every element that matches right now.
2233
+ *
2234
+ * Answers at once, with an empty list when nothing matches, unless timeout is set. Directional queries come back nearest first.
2235
+ *
2236
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2237
+ * @param value The value to match. Leave it out when by is a query object.
2238
+ * @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
2239
+ * @param opts Optional parameters by name, see FindAllOptions.
2240
+ * @example await d.find_all("id", "title")
2241
+ */
2242
+ find_all(by: By, value: string, opts?: FindAllOptions): Promise<Element[]>;
2243
+ /**
2244
+ * Every element that matches right now.
2245
+ *
2246
+ * Answers at once, with an empty list when nothing matches, unless timeout is set. Directional queries come back nearest first.
2247
+ *
2248
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2249
+ * @param value The value to match. Leave it out when by is a query object.
2250
+ * @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
2251
+ * @param opts Optional parameters by name, see FindAllOptions.
2252
+ * @example await d.find_all("id", "title")
2253
+ */
2254
+ find_all(by: By, value: string, timeout?: number, opts?: FindAllOptions): Promise<Element[]>;
2255
+ /**
2256
+ * Every element that matches right now.
2257
+ *
2258
+ * Answers at once, with an empty list when nothing matches, unless timeout is set. Directional queries come back nearest first.
2259
+ *
2260
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2261
+ * @param value The value to match. Leave it out when by is a query object.
2262
+ * @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
2263
+ * @param opts Optional parameters by name, see FindAllOptions.
2264
+ * @example await d.find_all("id", "title")
2265
+ */
2266
+ find_all(by: Query, opts?: FindAllOptions): Promise<Element[]>;
2267
+ /**
2268
+ * Every element that matches right now.
2269
+ *
2270
+ * Answers at once, with an empty list when nothing matches, unless timeout is set. Directional queries come back nearest first.
2271
+ *
2272
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2273
+ * @param value The value to match. Leave it out when by is a query object.
2274
+ * @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
2275
+ * @param opts Optional parameters by name, see FindAllOptions.
2276
+ * @example await d.find_all("id", "title")
2277
+ */
2278
+ find_all(by: Query, timeout?: number, opts?: FindAllOptions): Promise<Element[]>;
2279
+ /**
2280
+ * Every element that matches right now.
2281
+ *
2282
+ * Answers at once, with an empty list when nothing matches, unless timeout is set. Directional queries come back nearest first.
2283
+ *
2284
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2285
+ * @param value The value to match. Leave it out when by is a query object.
2286
+ * @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
2287
+ * @param opts Optional parameters by name, see FindAllOptions.
2288
+ * @example await d.find_all("id", "title")
2289
+ * @alias find_all
2290
+ */
2291
+ findAll(by: By, value: string, opts?: FindAllOptions): Promise<Element[]>;
2292
+ /**
2293
+ * Every element that matches right now.
2294
+ *
2295
+ * Answers at once, with an empty list when nothing matches, unless timeout is set. Directional queries come back nearest first.
2296
+ *
2297
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2298
+ * @param value The value to match. Leave it out when by is a query object.
2299
+ * @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
2300
+ * @param opts Optional parameters by name, see FindAllOptions.
2301
+ * @example await d.find_all("id", "title")
2302
+ * @alias find_all
2303
+ */
2304
+ findAll(by: By, value: string, timeout?: number, opts?: FindAllOptions): Promise<Element[]>;
2305
+ /**
2306
+ * Every element that matches right now.
2307
+ *
2308
+ * Answers at once, with an empty list when nothing matches, unless timeout is set. Directional queries come back nearest first.
2309
+ *
2310
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2311
+ * @param value The value to match. Leave it out when by is a query object.
2312
+ * @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
2313
+ * @param opts Optional parameters by name, see FindAllOptions.
2314
+ * @example await d.find_all("id", "title")
2315
+ * @alias find_all
2316
+ */
2317
+ findAll(by: Query, opts?: FindAllOptions): Promise<Element[]>;
2318
+ /**
2319
+ * Every element that matches right now.
2320
+ *
2321
+ * Answers at once, with an empty list when nothing matches, unless timeout is set. Directional queries come back nearest first.
2322
+ *
2323
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2324
+ * @param value The value to match. Leave it out when by is a query object.
2325
+ * @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
2326
+ * @param opts Optional parameters by name, see FindAllOptions.
2327
+ * @example await d.find_all("id", "title")
2328
+ * @alias find_all
2329
+ */
2330
+ findAll(by: Query, timeout?: number, opts?: FindAllOptions): Promise<Element[]>;
2331
+ /**
2332
+ * Text of an element, or an empty string.
2333
+ *
2334
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2335
+ * @param value The value to match. Leave it out when by is a query object.
2336
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2337
+ * @param opts Optional parameters by name, see GetTextOptions.
2338
+ * @example await d.get_text("id", "com.example:id/balance")
2339
+ */
2340
+ get_text(by: By, value: string, opts?: GetTextOptions): Promise<string>;
2341
+ /**
2342
+ * Text of an element, or an empty string.
2343
+ *
2344
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2345
+ * @param value The value to match. Leave it out when by is a query object.
2346
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2347
+ * @param opts Optional parameters by name, see GetTextOptions.
2348
+ * @example await d.get_text("id", "com.example:id/balance")
2349
+ */
2350
+ get_text(by: By, value: string, nth?: number, opts?: GetTextOptions): Promise<string>;
2351
+ /**
2352
+ * Text of an element, or an empty string.
2353
+ *
2354
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2355
+ * @param value The value to match. Leave it out when by is a query object.
2356
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2357
+ * @param opts Optional parameters by name, see GetTextOptions.
2358
+ * @example await d.get_text("id", "com.example:id/balance")
2359
+ */
2360
+ get_text(by: Query, opts?: GetTextOptions): Promise<string>;
2361
+ /**
2362
+ * Text of an element, or an empty string.
2363
+ *
2364
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2365
+ * @param value The value to match. Leave it out when by is a query object.
2366
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2367
+ * @param opts Optional parameters by name, see GetTextOptions.
2368
+ * @example await d.get_text("id", "com.example:id/balance")
2369
+ */
2370
+ get_text(by: Query, nth?: number, opts?: GetTextOptions): Promise<string>;
2371
+ /**
2372
+ * Text of an element, or an empty string.
2373
+ *
2374
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2375
+ * @param value The value to match. Leave it out when by is a query object.
2376
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2377
+ * @param opts Optional parameters by name, see GetTextOptions.
2378
+ * @example await d.get_text("id", "com.example:id/balance")
2379
+ * @alias get_text
2380
+ */
2381
+ getText(by: By, value: string, opts?: GetTextOptions): Promise<string>;
2382
+ /**
2383
+ * Text of an element, or an empty string.
2384
+ *
2385
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2386
+ * @param value The value to match. Leave it out when by is a query object.
2387
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2388
+ * @param opts Optional parameters by name, see GetTextOptions.
2389
+ * @example await d.get_text("id", "com.example:id/balance")
2390
+ * @alias get_text
2391
+ */
2392
+ getText(by: By, value: string, nth?: number, opts?: GetTextOptions): Promise<string>;
2393
+ /**
2394
+ * Text of an element, or an empty string.
2395
+ *
2396
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2397
+ * @param value The value to match. Leave it out when by is a query object.
2398
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2399
+ * @param opts Optional parameters by name, see GetTextOptions.
2400
+ * @example await d.get_text("id", "com.example:id/balance")
2401
+ * @alias get_text
2402
+ */
2403
+ getText(by: Query, opts?: GetTextOptions): Promise<string>;
2404
+ /**
2405
+ * Text of an element, or an empty string.
2406
+ *
2407
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2408
+ * @param value The value to match. Leave it out when by is a query object.
2409
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2410
+ * @param opts Optional parameters by name, see GetTextOptions.
2411
+ * @example await d.get_text("id", "com.example:id/balance")
2412
+ * @alias get_text
2413
+ */
2414
+ getText(by: Query, nth?: number, opts?: GetTextOptions): Promise<string>;
2415
+ /**
2416
+ * true if a switch or checkbox is on.
2417
+ *
2418
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2419
+ * @param value The value to match. Leave it out when by is a query object.
2420
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2421
+ * @param opts Optional parameters by name, see CheckedOptions.
2422
+ * @example await d.checked("id", "com.kakao.talk:id/auto_login")
2423
+ */
2424
+ checked(by: By, value: string, opts?: CheckedOptions): Promise<boolean>;
2425
+ /**
2426
+ * true if a switch or checkbox is on.
2427
+ *
2428
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2429
+ * @param value The value to match. Leave it out when by is a query object.
2430
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2431
+ * @param opts Optional parameters by name, see CheckedOptions.
2432
+ * @example await d.checked("id", "com.kakao.talk:id/auto_login")
2433
+ */
2434
+ checked(by: By, value: string, nth?: number, opts?: CheckedOptions): Promise<boolean>;
2435
+ /**
2436
+ * true if a switch or checkbox is on.
2437
+ *
2438
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2439
+ * @param value The value to match. Leave it out when by is a query object.
2440
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2441
+ * @param opts Optional parameters by name, see CheckedOptions.
2442
+ * @example await d.checked("id", "com.kakao.talk:id/auto_login")
2443
+ */
2444
+ checked(by: Query, opts?: CheckedOptions): Promise<boolean>;
2445
+ /**
2446
+ * true if a switch or checkbox is on.
2447
+ *
2448
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2449
+ * @param value The value to match. Leave it out when by is a query object.
2450
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2451
+ * @param opts Optional parameters by name, see CheckedOptions.
2452
+ * @example await d.checked("id", "com.kakao.talk:id/auto_login")
2453
+ */
2454
+ checked(by: Query, nth?: number, opts?: CheckedOptions): Promise<boolean>;
2455
+ /**
2456
+ * true if the element can be pressed.
2457
+ *
2458
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2459
+ * @param value The value to match. Leave it out when by is a query object.
2460
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2461
+ * @param opts Optional parameters by name, see EnabledOptions.
2462
+ * @example await d.enabled("text", "다음")
2463
+ */
2464
+ enabled(by: By, value: string, opts?: EnabledOptions): Promise<boolean>;
2465
+ /**
2466
+ * true if the element can be pressed.
2467
+ *
2468
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2469
+ * @param value The value to match. Leave it out when by is a query object.
2470
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2471
+ * @param opts Optional parameters by name, see EnabledOptions.
2472
+ * @example await d.enabled("text", "다음")
2473
+ */
2474
+ enabled(by: By, value: string, nth?: number, opts?: EnabledOptions): Promise<boolean>;
2475
+ /**
2476
+ * true if the element can be pressed.
2477
+ *
2478
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2479
+ * @param value The value to match. Leave it out when by is a query object.
2480
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2481
+ * @param opts Optional parameters by name, see EnabledOptions.
2482
+ * @example await d.enabled("text", "다음")
2483
+ */
2484
+ enabled(by: Query, opts?: EnabledOptions): Promise<boolean>;
2485
+ /**
2486
+ * true if the element can be pressed.
2487
+ *
2488
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2489
+ * @param value The value to match. Leave it out when by is a query object.
2490
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2491
+ * @param opts Optional parameters by name, see EnabledOptions.
2492
+ * @example await d.enabled("text", "다음")
2493
+ */
2494
+ enabled(by: Query, nth?: number, opts?: EnabledOptions): Promise<boolean>;
2495
+ /**
2496
+ * true if a tab or item is selected.
2497
+ *
2498
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2499
+ * @param value The value to match. Leave it out when by is a query object.
2500
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2501
+ * @param opts Optional parameters by name, see SelectedOptions.
2502
+ * @example await d.selected("text", "채팅")
2503
+ */
2504
+ selected(by: By, value: string, opts?: SelectedOptions): Promise<boolean>;
2505
+ /**
2506
+ * true if a tab or item is selected.
2507
+ *
2508
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2509
+ * @param value The value to match. Leave it out when by is a query object.
2510
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2511
+ * @param opts Optional parameters by name, see SelectedOptions.
2512
+ * @example await d.selected("text", "채팅")
2513
+ */
2514
+ selected(by: By, value: string, nth?: number, opts?: SelectedOptions): Promise<boolean>;
2515
+ /**
2516
+ * true if a tab or item is selected.
2517
+ *
2518
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2519
+ * @param value The value to match. Leave it out when by is a query object.
2520
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2521
+ * @param opts Optional parameters by name, see SelectedOptions.
2522
+ * @example await d.selected("text", "채팅")
2523
+ */
2524
+ selected(by: Query, opts?: SelectedOptions): Promise<boolean>;
2525
+ /**
2526
+ * true if a tab or item is selected.
2527
+ *
2528
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2529
+ * @param value The value to match. Leave it out when by is a query object.
2530
+ * @param nth Index when several elements match, starting at 0. Default: 0.
2531
+ * @param opts Optional parameters by name, see SelectedOptions.
2532
+ * @example await d.selected("text", "채팅")
2533
+ */
2534
+ selected(by: Query, nth?: number, opts?: SelectedOptions): Promise<boolean>;
2535
+ /**
2536
+ * Number of matching elements.
2537
+ *
2538
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2539
+ * @param value The value to match. Leave it out when by is a query object.
2540
+ * @param opts Optional parameters by name, see CountOptions.
2541
+ * @example await d.count("class", "android.widget.CheckBox")
2542
+ */
2543
+ count(by: By, value: string, opts?: CountOptions): Promise<number>;
2544
+ /**
2545
+ * Number of matching elements.
2546
+ *
2547
+ * @param by Which dump field to match (text, textContains, textMatches, id, desc, descContains, descMatches, class), or a query object with several conditions.
2548
+ * @param value The value to match. Leave it out when by is a query object.
2549
+ * @param opts Optional parameters by name, see CountOptions.
2550
+ * @example await d.count("class", "android.widget.CheckBox")
2551
+ */
2552
+ count(by: Query, opts?: CountOptions): Promise<number>;
2553
+ /**
2554
+ * Index of the first candidate to appear, or -1.
2555
+ *
2556
+ * @param candidates List of [by, value] pairs or query objects.
2557
+ * @param timeout Seconds to wait for any candidate. Default: 10.
2558
+ * @param opts Optional parameters by name, see WhichOptions.
2559
+ * @example await d.which([["text", "로그인"], ["text", "홈"]], { timeout: 10 })
2560
+ */
2561
+ which(candidates: ReadonlyArray<readonly [By, string] | Query>, opts?: WhichOptions): Promise<number>;
2562
+ /**
2563
+ * Index of the first candidate to appear, or -1.
2564
+ *
2565
+ * @param candidates List of [by, value] pairs or query objects.
2566
+ * @param timeout Seconds to wait for any candidate. Default: 10.
2567
+ * @param opts Optional parameters by name, see WhichOptions.
2568
+ * @example await d.which([["text", "로그인"], ["text", "홈"]], { timeout: 10 })
2569
+ */
2570
+ which(candidates: ReadonlyArray<readonly [By, string] | Query>, timeout?: number, opts?: WhichOptions): Promise<number>;
2571
+ /**
2572
+ * true if that app is in the foreground.
2573
+ *
2574
+ * @param pkg Package name, for example com.android.chrome.
2575
+ * @example await d.in_app("com.kakao.talk")
2576
+ */
2577
+ in_app(pkg: string): Promise<boolean>;
2578
+ /**
2579
+ * true if that app is in the foreground.
2580
+ *
2581
+ * @param pkg Package name, for example com.android.chrome.
2582
+ * @example await d.in_app("com.kakao.talk")
2583
+ * @alias in_app
2584
+ */
2585
+ inApp(pkg: string): Promise<boolean>;
2586
+ /**
2587
+ * true if a soft keyboard is showing.
2588
+ *
2589
+ * @example await d.keyboard_shown()
2590
+ */
2591
+ keyboard_shown(): Promise<boolean>;
2592
+ /**
2593
+ * true if a soft keyboard is showing.
2594
+ *
2595
+ * @example await d.keyboard_shown()
2596
+ * @alias keyboard_shown
2597
+ */
2598
+ keyboardShown(): Promise<boolean>;
2599
+ /**
2600
+ * Text of the most recent toast, or an empty string.
2601
+ *
2602
+ * @param max_age Ignore toasts older than this many seconds. Default: 30.
2603
+ * @param opts Optional parameters by name, see LastToastOptions.
2604
+ * @example await d.last_toast()
2605
+ */
2606
+ last_toast(opts?: LastToastOptions): Promise<string>;
2607
+ /**
2608
+ * Text of the most recent toast, or an empty string.
2609
+ *
2610
+ * @param max_age Ignore toasts older than this many seconds. Default: 30.
2611
+ * @param opts Optional parameters by name, see LastToastOptions.
2612
+ * @example await d.last_toast()
2613
+ */
2614
+ last_toast(max_age?: number, opts?: LastToastOptions): Promise<string>;
2615
+ /**
2616
+ * Text of the most recent toast, or an empty string.
2617
+ *
2618
+ * @param max_age Ignore toasts older than this many seconds. Default: 30.
2619
+ * @param opts Optional parameters by name, see LastToastOptions.
2620
+ * @example await d.last_toast()
2621
+ * @alias last_toast
2622
+ */
2623
+ lastToast(opts?: LastToastOptions): Promise<string>;
2624
+ /**
2625
+ * Text of the most recent toast, or an empty string.
2626
+ *
2627
+ * @param max_age Ignore toasts older than this many seconds. Default: 30.
2628
+ * @param opts Optional parameters by name, see LastToastOptions.
2629
+ * @example await d.last_toast()
2630
+ * @alias last_toast
2631
+ */
2632
+ lastToast(max_age?: number, opts?: LastToastOptions): Promise<string>;
2633
+ /**
2634
+ * Pixel color at a coordinate as #RRGGBB.
2635
+ *
2636
+ * For screens without accessibility nodes, such as games.
2637
+ *
2638
+ * @param x X in screen pixels.
2639
+ * @param y Y in screen pixels.
2640
+ * @example await d.color(540, 1200)
2641
+ */
2642
+ color(x: number, y: number): Promise<string>;
2643
+ /**
2644
+ * true if the screen is on.
2645
+ *
2646
+ * @example await d.screen_on()
2647
+ */
2648
+ screen_on(): Promise<boolean>;
2649
+ /**
2650
+ * true if the screen is on.
2651
+ *
2652
+ * @example await d.screen_on()
2653
+ * @alias screen_on
2654
+ */
2655
+ screenOn(): Promise<boolean>;
2656
+ /**
2657
+ * true if the lock screen is showing.
2658
+ *
2659
+ * @example await d.locked()
2660
+ */
2661
+ locked(): Promise<boolean>;
2662
+ /**
2663
+ * Turn the screen on and dismiss a lock screen that has no PIN.
2664
+ *
2665
+ * Gestures fail while the screen is off. A PIN, pattern or password lock cannot be dismissed without the user.
2666
+ *
2667
+ * @example await d.wake()
2668
+ */
2669
+ wake(): Promise<WakeResult>;
2670
+ /**
2671
+ * Turn the screen off and lock.
2672
+ *
2673
+ * @example await d.lock()
2674
+ */
2675
+ lock(): Promise<void>;
2676
+ /** Battery level and charging state. */
2677
+ battery(): Promise<BatteryResult>;
2678
+ /** portrait or landscape. */
2679
+ orientation(): Promise<string>;
2680
+ /**
2681
+ * Model, Android version, screen size and permission readiness.
2682
+ *
2683
+ * @example await d.info()
2684
+ */
2685
+ info(): Promise<InfoResult>;
2686
+ /** Connection type (wifi, mobile, none) and airplane mode. */
2687
+ network(): Promise<NetworkResult>;
2688
+ /**
2689
+ * Start an app, optionally at a specific activity.
2690
+ *
2691
+ * @param pkg Package name, for example com.android.chrome.
2692
+ * @param activity Activity name, either full or starting with a dot.
2693
+ * @param opts Optional parameters by name, see LaunchOptions.
2694
+ * @throws {DroidlineError} with code APP_NOT_FOUND, ACTIVITY_BLOCKED.
2695
+ * @example await d.launch("com.kakao.talk")
2696
+ */
2697
+ launch(pkg: string, opts?: LaunchOptions): Promise<LaunchResult>;
2698
+ /**
2699
+ * Start an app, optionally at a specific activity.
2700
+ *
2701
+ * @param pkg Package name, for example com.android.chrome.
2702
+ * @param activity Activity name, either full or starting with a dot.
2703
+ * @param opts Optional parameters by name, see LaunchOptions.
2704
+ * @throws {DroidlineError} with code APP_NOT_FOUND, ACTIVITY_BLOCKED.
2705
+ * @example await d.launch("com.kakao.talk")
2706
+ */
2707
+ launch(pkg: string, activity?: string, opts?: LaunchOptions): Promise<LaunchResult>;
2708
+ /**
2709
+ * Open a URL or deep link.
2710
+ *
2711
+ * @param url http(s) URL or app deep link.
2712
+ * @param pkg Open with this app only.
2713
+ * @param opts Optional parameters by name, see OpenUrlOptions.
2714
+ * @example await d.open_url("myapp://orders/42")
2715
+ */
2716
+ open_url(url: string, opts?: OpenUrlOptions): Promise<void>;
2717
+ /**
2718
+ * Open a URL or deep link.
2719
+ *
2720
+ * @param url http(s) URL or app deep link.
2721
+ * @param pkg Open with this app only.
2722
+ * @param opts Optional parameters by name, see OpenUrlOptions.
2723
+ * @example await d.open_url("myapp://orders/42")
2724
+ */
2725
+ open_url(url: string, pkg?: string, opts?: OpenUrlOptions): Promise<void>;
2726
+ /**
2727
+ * Open a URL or deep link.
2728
+ *
2729
+ * @param url http(s) URL or app deep link.
2730
+ * @param pkg Open with this app only.
2731
+ * @param opts Optional parameters by name, see OpenUrlOptions.
2732
+ * @example await d.open_url("myapp://orders/42")
2733
+ * @alias open_url
2734
+ */
2735
+ openUrl(url: string, opts?: OpenUrlOptions): Promise<void>;
2736
+ /**
2737
+ * Open a URL or deep link.
2738
+ *
2739
+ * @param url http(s) URL or app deep link.
2740
+ * @param pkg Open with this app only.
2741
+ * @param opts Optional parameters by name, see OpenUrlOptions.
2742
+ * @example await d.open_url("myapp://orders/42")
2743
+ * @alias open_url
2744
+ */
2745
+ openUrl(url: string, pkg?: string, opts?: OpenUrlOptions): Promise<void>;
2746
+ /**
2747
+ * Open a screen by its intent action, such as a Settings page.
2748
+ *
2749
+ * Opens any screen other apps are allowed to open, for example android.settings.WIFI_SETTINGS, or android.settings.APPLICATION_DETAILS_SETTINGS with data package:com.example. The screen opens fresh, closing other screens of the same app. What to tap after that differs by phone maker and language, so Wi-Fi, airplane mode, force stop and clearing data are recipes in the docs rather than commands.
2750
+ *
2751
+ * @param action Intent action, such as android.settings.WIFI_SETTINGS.
2752
+ * @param data Data URI, such as package:com.example.
2753
+ * @param pkg Only this app may handle it.
2754
+ * @param opts Optional parameters by name, see IntentOptions.
2755
+ * @throws {DroidlineError} with code APP_NOT_FOUND, BAD_ARGS.
2756
+ * @example await d.intent("android.settings.WIFI_SETTINGS")
2757
+ */
2758
+ intent(action: string, opts?: IntentOptions): Promise<void>;
2759
+ /**
2760
+ * Open a screen by its intent action, such as a Settings page.
2761
+ *
2762
+ * Opens any screen other apps are allowed to open, for example android.settings.WIFI_SETTINGS, or android.settings.APPLICATION_DETAILS_SETTINGS with data package:com.example. The screen opens fresh, closing other screens of the same app. What to tap after that differs by phone maker and language, so Wi-Fi, airplane mode, force stop and clearing data are recipes in the docs rather than commands.
2763
+ *
2764
+ * @param action Intent action, such as android.settings.WIFI_SETTINGS.
2765
+ * @param data Data URI, such as package:com.example.
2766
+ * @param pkg Only this app may handle it.
2767
+ * @param opts Optional parameters by name, see IntentOptions.
2768
+ * @throws {DroidlineError} with code APP_NOT_FOUND, BAD_ARGS.
2769
+ * @example await d.intent("android.settings.WIFI_SETTINGS")
2770
+ */
2771
+ intent(action: string, data?: string, opts?: IntentOptions): Promise<void>;
2772
+ /**
2773
+ * Open a screen by its intent action, such as a Settings page.
2774
+ *
2775
+ * Opens any screen other apps are allowed to open, for example android.settings.WIFI_SETTINGS, or android.settings.APPLICATION_DETAILS_SETTINGS with data package:com.example. The screen opens fresh, closing other screens of the same app. What to tap after that differs by phone maker and language, so Wi-Fi, airplane mode, force stop and clearing data are recipes in the docs rather than commands.
2776
+ *
2777
+ * @param action Intent action, such as android.settings.WIFI_SETTINGS.
2778
+ * @param data Data URI, such as package:com.example.
2779
+ * @param pkg Only this app may handle it.
2780
+ * @param opts Optional parameters by name, see IntentOptions.
2781
+ * @throws {DroidlineError} with code APP_NOT_FOUND, BAD_ARGS.
2782
+ * @example await d.intent("android.settings.WIFI_SETTINGS")
2783
+ */
2784
+ intent(action: string, data?: string, pkg?: string, opts?: IntentOptions): Promise<void>;
2785
+ /**
2786
+ * Clear an app's data in device owner mode.
2787
+ *
2788
+ * Optional, and only in device owner mode, where the phone wipes the app directly without opening Settings. Without it the answer is NO_PERMISSION; the docs have a recipe that goes through Settings instead.
2789
+ *
2790
+ * @param pkg Package name, for example com.android.chrome.
2791
+ * @throws {DroidlineError} with code APP_NOT_FOUND, NO_PERMISSION.
2792
+ * @example await d.clear_data("com.android.chrome")
2793
+ */
2794
+ clear_data(pkg: string): Promise<ClearDataResult>;
2795
+ /**
2796
+ * Clear an app's data in device owner mode.
2797
+ *
2798
+ * Optional, and only in device owner mode, where the phone wipes the app directly without opening Settings. Without it the answer is NO_PERMISSION; the docs have a recipe that goes through Settings instead.
2799
+ *
2800
+ * @param pkg Package name, for example com.android.chrome.
2801
+ * @throws {DroidlineError} with code APP_NOT_FOUND, NO_PERMISSION.
2802
+ * @example await d.clear_data("com.android.chrome")
2803
+ * @alias clear_data
2804
+ */
2805
+ clearData(pkg: string): Promise<ClearDataResult>;
2806
+ /**
2807
+ * Installed packages.
2808
+ *
2809
+ * @param system Include system packages. Default: false.
2810
+ * @param opts Optional parameters by name, see AppsOptions.
2811
+ * @example await d.apps()
2812
+ */
2813
+ apps(opts?: AppsOptions): Promise<Array<App>>;
2814
+ /**
2815
+ * Installed packages.
2816
+ *
2817
+ * @param system Include system packages. Default: false.
2818
+ * @param opts Optional parameters by name, see AppsOptions.
2819
+ * @example await d.apps()
2820
+ */
2821
+ apps(system?: boolean, opts?: AppsOptions): Promise<Array<App>>;
2822
+ /**
2823
+ * Version name if installed, empty string if not.
2824
+ *
2825
+ * @param pkg Package name, for example com.android.chrome.
2826
+ * @example await d.installed("com.kakao.talk")
2827
+ */
2828
+ installed(pkg: string): Promise<string>;
2829
+ /**
2830
+ * Back.
2831
+ *
2832
+ * @example await d.back()
2833
+ */
2834
+ back(): Promise<void>;
2835
+ /**
2836
+ * Home screen.
2837
+ *
2838
+ * @example await d.home()
2839
+ */
2840
+ home(): Promise<void>;
2841
+ /**
2842
+ * Recent apps.
2843
+ *
2844
+ * @example await d.recents()
2845
+ */
2846
+ recents(): Promise<void>;
2847
+ /**
2848
+ * Pull down the notification shade.
2849
+ *
2850
+ * @example await d.open_notifications()
2851
+ */
2852
+ open_notifications(): Promise<void>;
2853
+ /**
2854
+ * Pull down the notification shade.
2855
+ *
2856
+ * @example await d.open_notifications()
2857
+ * @alias open_notifications
2858
+ */
2859
+ openNotifications(): Promise<void>;
2860
+ /**
2861
+ * Open quick settings.
2862
+ *
2863
+ * @example await d.quick_settings()
2864
+ */
2865
+ quick_settings(): Promise<void>;
2866
+ /**
2867
+ * Open quick settings.
2868
+ *
2869
+ * @example await d.quick_settings()
2870
+ * @alias quick_settings
2871
+ */
2872
+ quickSettings(): Promise<void>;
2873
+ /**
2874
+ * Write the clipboard, or read it when called without text.
2875
+ *
2876
+ * Reading on Android 10+ needs the Droidline keyboard to be the current input method.
2877
+ *
2878
+ * @param text Text to copy. Omit to read.
2879
+ * @param opts Optional parameters by name, see ClipboardOptions.
2880
+ * @throws {DroidlineError} with code NO_IME.
2881
+ * @example await d.clipboard("복사할 글")
2882
+ */
2883
+ clipboard(opts?: ClipboardOptions): Promise<string>;
2884
+ /**
2885
+ * Write the clipboard, or read it when called without text.
2886
+ *
2887
+ * Reading on Android 10+ needs the Droidline keyboard to be the current input method.
2888
+ *
2889
+ * @param text Text to copy. Omit to read.
2890
+ * @param opts Optional parameters by name, see ClipboardOptions.
2891
+ * @throws {DroidlineError} with code NO_IME.
2892
+ * @example await d.clipboard("복사할 글")
2893
+ */
2894
+ clipboard(text?: string, opts?: ClipboardOptions): Promise<string>;
2895
+ /**
2896
+ * Run several commands on the phone in one go, even while it is offline.
2897
+ *
2898
+ * Steps are [cmd, args...] lists or {cmd, ...} objects. The step sleep(ms) only exists inside batch. When the steps turn off the phone's network, for example Wi-Fi off and on again, pass cuts_network: the phone answers accepted first, runs the steps while offline, and the result arrives after it reconnects.
2899
+ *
2900
+ * @param steps Commands to run in order.
2901
+ * @param stop_on_error Stop at the first failing step. Default: true.
2902
+ * @param cuts_network The steps drop the phone's link. Answer accepted first and send the result after reconnecting. Default: false.
2903
+ * @param opts Optional parameters by name, see BatchOptions.
2904
+ * @example await d.batch([["home",], ["sleep", 500], ["recents",]])
2905
+ */
2906
+ batch(steps: ReadonlyArray<Step>, opts?: BatchOptions): Promise<BatchResult>;
2907
+ /**
2908
+ * Run several commands on the phone in one go, even while it is offline.
2909
+ *
2910
+ * Steps are [cmd, args...] lists or {cmd, ...} objects. The step sleep(ms) only exists inside batch. When the steps turn off the phone's network, for example Wi-Fi off and on again, pass cuts_network: the phone answers accepted first, runs the steps while offline, and the result arrives after it reconnects.
2911
+ *
2912
+ * @param steps Commands to run in order.
2913
+ * @param stop_on_error Stop at the first failing step. Default: true.
2914
+ * @param cuts_network The steps drop the phone's link. Answer accepted first and send the result after reconnecting. Default: false.
2915
+ * @param opts Optional parameters by name, see BatchOptions.
2916
+ * @example await d.batch([["home",], ["sleep", 500], ["recents",]])
2917
+ */
2918
+ batch(steps: ReadonlyArray<Step>, stop_on_error?: boolean, opts?: BatchOptions): Promise<BatchResult>;
2919
+ /**
2920
+ * Run several commands on the phone in one go, even while it is offline.
2921
+ *
2922
+ * Steps are [cmd, args...] lists or {cmd, ...} objects. The step sleep(ms) only exists inside batch. When the steps turn off the phone's network, for example Wi-Fi off and on again, pass cuts_network: the phone answers accepted first, runs the steps while offline, and the result arrives after it reconnects.
2923
+ *
2924
+ * @param steps Commands to run in order.
2925
+ * @param stop_on_error Stop at the first failing step. Default: true.
2926
+ * @param cuts_network The steps drop the phone's link. Answer accepted first and send the result after reconnecting. Default: false.
2927
+ * @param opts Optional parameters by name, see BatchOptions.
2928
+ * @example await d.batch([["home",], ["sleep", 500], ["recents",]])
2929
+ */
2930
+ batch(steps: ReadonlyArray<Step>, stop_on_error?: boolean, cuts_network?: boolean, opts?: BatchOptions): Promise<BatchResult>;
2931
+ /**
2932
+ * Route chosen apps through an upstream proxy with a per-app VPN.
2933
+ *
2934
+ * Supports http:// (CONNECT) and socks5:// with user:pass. Pass null or "off" to stop. One upstream at a time. Apps that ignore the proxy setting lose network access instead of leaking.
2935
+ *
2936
+ * @param url socks5://user:pass@host:port, http://host:port, a saved profile like @kr1, or off.
2937
+ * @param app Package or packages to route.
2938
+ * @param opts Optional parameters by name, see ProxyOptions.
2939
+ * @throws {DroidlineError} with code NO_PERMISSION, PROXY_FAILED, UNSUPPORTED.
2940
+ * @example await d.proxy("socks5://user:pass@1.2.3.4:1080", { app: "com.android.chrome" })
2941
+ */
2942
+ proxy(url: string | null, opts?: ProxyOptions): Promise<ProxyResult>;
2943
+ /**
2944
+ * Route chosen apps through an upstream proxy with a per-app VPN.
2945
+ *
2946
+ * Supports http:// (CONNECT) and socks5:// with user:pass. Pass null or "off" to stop. One upstream at a time. Apps that ignore the proxy setting lose network access instead of leaking.
2947
+ *
2948
+ * @param url socks5://user:pass@host:port, http://host:port, a saved profile like @kr1, or off.
2949
+ * @param app Package or packages to route.
2950
+ * @param opts Optional parameters by name, see ProxyOptions.
2951
+ * @throws {DroidlineError} with code NO_PERMISSION, PROXY_FAILED, UNSUPPORTED.
2952
+ * @example await d.proxy("socks5://user:pass@1.2.3.4:1080", { app: "com.android.chrome" })
2953
+ */
2954
+ proxy(url: string | null, app?: string | ReadonlyArray<string>, opts?: ProxyOptions): Promise<ProxyResult>;
2955
+ /**
2956
+ * Per-app proxy state and the IP the outside world sees.
2957
+ *
2958
+ * @param app Package to check.
2959
+ * @param opts Optional parameters by name, see ProxyCheckOptions.
2960
+ */
2961
+ proxy_check(opts?: ProxyCheckOptions): Promise<ProxyCheckResult>;
2962
+ /**
2963
+ * Per-app proxy state and the IP the outside world sees.
2964
+ *
2965
+ * @param app Package to check.
2966
+ * @param opts Optional parameters by name, see ProxyCheckOptions.
2967
+ */
2968
+ proxy_check(app?: string, opts?: ProxyCheckOptions): Promise<ProxyCheckResult>;
2969
+ /**
2970
+ * Per-app proxy state and the IP the outside world sees.
2971
+ *
2972
+ * @param app Package to check.
2973
+ * @param opts Optional parameters by name, see ProxyCheckOptions.
2974
+ * @alias proxy_check
2975
+ */
2976
+ proxyCheck(opts?: ProxyCheckOptions): Promise<ProxyCheckResult>;
2977
+ /**
2978
+ * Per-app proxy state and the IP the outside world sees.
2979
+ *
2980
+ * @param app Package to check.
2981
+ * @param opts Optional parameters by name, see ProxyCheckOptions.
2982
+ * @alias proxy_check
2983
+ */
2984
+ proxyCheck(app?: string, opts?: ProxyCheckOptions): Promise<ProxyCheckResult>;
2985
+ /**
2986
+ * Notifications currently showing.
2987
+ *
2988
+ * @param pkg Only this app.
2989
+ * @param opts Optional parameters by name, see NotificationsOptions.
2990
+ * @example await d.notifications()
2991
+ */
2992
+ notifications(opts?: NotificationsOptions): Promise<Array<Notification>>;
2993
+ /**
2994
+ * Notifications currently showing.
2995
+ *
2996
+ * @param pkg Only this app.
2997
+ * @param opts Optional parameters by name, see NotificationsOptions.
2998
+ * @example await d.notifications()
2999
+ */
3000
+ notifications(pkg?: string, opts?: NotificationsOptions): Promise<Array<Notification>>;
3001
+ /**
3002
+ * true if a showing notification matches.
3003
+ *
3004
+ * @param by text and textContains look at both title and text.
3005
+ * @param value The value to match. Leave it out when by is a query object.
3006
+ * @param opts Optional parameters by name, see HasNotificationOptions.
3007
+ * @example await d.has_notification("textContains", "배송")
3008
+ */
3009
+ has_notification(by: By, value: string, opts?: HasNotificationOptions): Promise<boolean>;
3010
+ /**
3011
+ * true if a showing notification matches.
3012
+ *
3013
+ * @param by text and textContains look at both title and text.
3014
+ * @param value The value to match. Leave it out when by is a query object.
3015
+ * @param opts Optional parameters by name, see HasNotificationOptions.
3016
+ * @example await d.has_notification("textContains", "배송")
3017
+ */
3018
+ has_notification(by: Query, opts?: HasNotificationOptions): Promise<boolean>;
3019
+ /**
3020
+ * true if a showing notification matches.
3021
+ *
3022
+ * @param by text and textContains look at both title and text.
3023
+ * @param value The value to match. Leave it out when by is a query object.
3024
+ * @param opts Optional parameters by name, see HasNotificationOptions.
3025
+ * @example await d.has_notification("textContains", "배송")
3026
+ * @alias has_notification
3027
+ */
3028
+ hasNotification(by: By, value: string, opts?: HasNotificationOptions): Promise<boolean>;
3029
+ /**
3030
+ * true if a showing notification matches.
3031
+ *
3032
+ * @param by text and textContains look at both title and text.
3033
+ * @param value The value to match. Leave it out when by is a query object.
3034
+ * @param opts Optional parameters by name, see HasNotificationOptions.
3035
+ * @example await d.has_notification("textContains", "배송")
3036
+ * @alias has_notification
3037
+ */
3038
+ hasNotification(by: Query, opts?: HasNotificationOptions): Promise<boolean>;
3039
+ /**
3040
+ * Wait for a matching notification and return it.
3041
+ *
3042
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3043
+ *
3044
+ * @param by text and textContains look at both title and text.
3045
+ * @param value The value to match. Leave it out when by is a query object.
3046
+ * @param timeout Seconds to wait. Default: 60.
3047
+ * @param pkg Only from this app.
3048
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3049
+ * @throws {DroidlineError} with code TIMEOUT.
3050
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3051
+ */
3052
+ wait_notification(by: By, value: string, opts?: WaitNotificationOptions): Promise<Notification>;
3053
+ /**
3054
+ * Wait for a matching notification and return it.
3055
+ *
3056
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3057
+ *
3058
+ * @param by text and textContains look at both title and text.
3059
+ * @param value The value to match. Leave it out when by is a query object.
3060
+ * @param timeout Seconds to wait. Default: 60.
3061
+ * @param pkg Only from this app.
3062
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3063
+ * @throws {DroidlineError} with code TIMEOUT.
3064
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3065
+ */
3066
+ wait_notification(by: By, value: string, timeout?: number, opts?: WaitNotificationOptions): Promise<Notification>;
3067
+ /**
3068
+ * Wait for a matching notification and return it.
3069
+ *
3070
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3071
+ *
3072
+ * @param by text and textContains look at both title and text.
3073
+ * @param value The value to match. Leave it out when by is a query object.
3074
+ * @param timeout Seconds to wait. Default: 60.
3075
+ * @param pkg Only from this app.
3076
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3077
+ * @throws {DroidlineError} with code TIMEOUT.
3078
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3079
+ */
3080
+ wait_notification(by: By, value: string, timeout?: number, pkg?: string, opts?: WaitNotificationOptions): Promise<Notification>;
3081
+ /**
3082
+ * Wait for a matching notification and return it.
3083
+ *
3084
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3085
+ *
3086
+ * @param by text and textContains look at both title and text.
3087
+ * @param value The value to match. Leave it out when by is a query object.
3088
+ * @param timeout Seconds to wait. Default: 60.
3089
+ * @param pkg Only from this app.
3090
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3091
+ * @throws {DroidlineError} with code TIMEOUT.
3092
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3093
+ */
3094
+ wait_notification(by: Query, opts?: WaitNotificationOptions): Promise<Notification>;
3095
+ /**
3096
+ * Wait for a matching notification and return it.
3097
+ *
3098
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3099
+ *
3100
+ * @param by text and textContains look at both title and text.
3101
+ * @param value The value to match. Leave it out when by is a query object.
3102
+ * @param timeout Seconds to wait. Default: 60.
3103
+ * @param pkg Only from this app.
3104
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3105
+ * @throws {DroidlineError} with code TIMEOUT.
3106
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3107
+ */
3108
+ wait_notification(by: Query, timeout?: number, opts?: WaitNotificationOptions): Promise<Notification>;
3109
+ /**
3110
+ * Wait for a matching notification and return it.
3111
+ *
3112
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3113
+ *
3114
+ * @param by text and textContains look at both title and text.
3115
+ * @param value The value to match. Leave it out when by is a query object.
3116
+ * @param timeout Seconds to wait. Default: 60.
3117
+ * @param pkg Only from this app.
3118
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3119
+ * @throws {DroidlineError} with code TIMEOUT.
3120
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3121
+ */
3122
+ wait_notification(by: Query, timeout?: number, pkg?: string, opts?: WaitNotificationOptions): Promise<Notification>;
3123
+ /**
3124
+ * Wait for a matching notification and return it.
3125
+ *
3126
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3127
+ *
3128
+ * @param by text and textContains look at both title and text.
3129
+ * @param value The value to match. Leave it out when by is a query object.
3130
+ * @param timeout Seconds to wait. Default: 60.
3131
+ * @param pkg Only from this app.
3132
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3133
+ * @throws {DroidlineError} with code TIMEOUT.
3134
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3135
+ * @alias wait_notification
3136
+ */
3137
+ waitNotification(by: By, value: string, opts?: WaitNotificationOptions): Promise<Notification>;
3138
+ /**
3139
+ * Wait for a matching notification and return it.
3140
+ *
3141
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3142
+ *
3143
+ * @param by text and textContains look at both title and text.
3144
+ * @param value The value to match. Leave it out when by is a query object.
3145
+ * @param timeout Seconds to wait. Default: 60.
3146
+ * @param pkg Only from this app.
3147
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3148
+ * @throws {DroidlineError} with code TIMEOUT.
3149
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3150
+ * @alias wait_notification
3151
+ */
3152
+ waitNotification(by: By, value: string, timeout?: number, opts?: WaitNotificationOptions): Promise<Notification>;
3153
+ /**
3154
+ * Wait for a matching notification and return it.
3155
+ *
3156
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3157
+ *
3158
+ * @param by text and textContains look at both title and text.
3159
+ * @param value The value to match. Leave it out when by is a query object.
3160
+ * @param timeout Seconds to wait. Default: 60.
3161
+ * @param pkg Only from this app.
3162
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3163
+ * @throws {DroidlineError} with code TIMEOUT.
3164
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3165
+ * @alias wait_notification
3166
+ */
3167
+ waitNotification(by: By, value: string, timeout?: number, pkg?: string, opts?: WaitNotificationOptions): Promise<Notification>;
3168
+ /**
3169
+ * Wait for a matching notification and return it.
3170
+ *
3171
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3172
+ *
3173
+ * @param by text and textContains look at both title and text.
3174
+ * @param value The value to match. Leave it out when by is a query object.
3175
+ * @param timeout Seconds to wait. Default: 60.
3176
+ * @param pkg Only from this app.
3177
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3178
+ * @throws {DroidlineError} with code TIMEOUT.
3179
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3180
+ * @alias wait_notification
3181
+ */
3182
+ waitNotification(by: Query, opts?: WaitNotificationOptions): Promise<Notification>;
3183
+ /**
3184
+ * Wait for a matching notification and return it.
3185
+ *
3186
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3187
+ *
3188
+ * @param by text and textContains look at both title and text.
3189
+ * @param value The value to match. Leave it out when by is a query object.
3190
+ * @param timeout Seconds to wait. Default: 60.
3191
+ * @param pkg Only from this app.
3192
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3193
+ * @throws {DroidlineError} with code TIMEOUT.
3194
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3195
+ * @alias wait_notification
3196
+ */
3197
+ waitNotification(by: Query, timeout?: number, opts?: WaitNotificationOptions): Promise<Notification>;
3198
+ /**
3199
+ * Wait for a matching notification and return it.
3200
+ *
3201
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3202
+ *
3203
+ * @param by text and textContains look at both title and text.
3204
+ * @param value The value to match. Leave it out when by is a query object.
3205
+ * @param timeout Seconds to wait. Default: 60.
3206
+ * @param pkg Only from this app.
3207
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3208
+ * @throws {DroidlineError} with code TIMEOUT.
3209
+ * @example await d.wait_notification("textContains", "인증번호", 60)
3210
+ * @alias wait_notification
3211
+ */
3212
+ waitNotification(by: Query, timeout?: number, pkg?: string, opts?: WaitNotificationOptions): Promise<Notification>;
3213
+ /**
3214
+ * Reply inline to a notification that has a reply action.
3215
+ *
3216
+ * @param key Notification key from notifications() or a notification event.
3217
+ * @param text Reply text.
3218
+ * @example await d.notification_reply(key, "확인했습니다")
3219
+ */
3220
+ notification_reply(key: string, text: string): Promise<void>;
3221
+ /**
3222
+ * Reply inline to a notification that has a reply action.
3223
+ *
3224
+ * @param key Notification key from notifications() or a notification event.
3225
+ * @param text Reply text.
3226
+ * @example await d.notification_reply(key, "확인했습니다")
3227
+ * @alias notification_reply
3228
+ */
3229
+ notificationReply(key: string, text: string): Promise<void>;
3230
+ /**
3231
+ * Open a notification.
3232
+ *
3233
+ * @param key Notification key from notifications() or a notification event.
3234
+ * @example await d.notification_click(key)
3235
+ */
3236
+ notification_click(key: string): Promise<void>;
3237
+ /**
3238
+ * Open a notification.
3239
+ *
3240
+ * @param key Notification key from notifications() or a notification event.
3241
+ * @example await d.notification_click(key)
3242
+ * @alias notification_click
3243
+ */
3244
+ notificationClick(key: string): Promise<void>;
3245
+ /**
3246
+ * Dismiss a notification.
3247
+ *
3248
+ * @param key Notification key from notifications() or a notification event.
3249
+ * @example await d.notification_dismiss(key)
3250
+ */
3251
+ notification_dismiss(key: string): Promise<void>;
3252
+ /**
3253
+ * Dismiss a notification.
3254
+ *
3255
+ * @param key Notification key from notifications() or a notification event.
3256
+ * @example await d.notification_dismiss(key)
3257
+ * @alias notification_dismiss
3258
+ */
3259
+ notificationDismiss(key: string): Promise<void>;
3260
+ /**
3261
+ * Choose which apps' notifications are sent to the PC. Default is none.
3262
+ *
3263
+ * @param packages Allowed packages. Omit to read the current list.
3264
+ * @param opts Optional parameters by name, see NotifyFilterOptions.
3265
+ * @example await d.notify_filter(["com.kakao.talk"])
3266
+ */
3267
+ notify_filter(opts?: NotifyFilterOptions): Promise<Array<string>>;
3268
+ /**
3269
+ * Choose which apps' notifications are sent to the PC. Default is none.
3270
+ *
3271
+ * @param packages Allowed packages. Omit to read the current list.
3272
+ * @param opts Optional parameters by name, see NotifyFilterOptions.
3273
+ * @example await d.notify_filter(["com.kakao.talk"])
3274
+ */
3275
+ notify_filter(packages?: ReadonlyArray<string>, opts?: NotifyFilterOptions): Promise<Array<string>>;
3276
+ /**
3277
+ * Choose which apps' notifications are sent to the PC. Default is none.
3278
+ *
3279
+ * @param packages Allowed packages. Omit to read the current list.
3280
+ * @param opts Optional parameters by name, see NotifyFilterOptions.
3281
+ * @example await d.notify_filter(["com.kakao.talk"])
3282
+ * @alias notify_filter
3283
+ */
3284
+ notifyFilter(opts?: NotifyFilterOptions): Promise<Array<string>>;
3285
+ /**
3286
+ * Choose which apps' notifications are sent to the PC. Default is none.
3287
+ *
3288
+ * @param packages Allowed packages. Omit to read the current list.
3289
+ * @param opts Optional parameters by name, see NotifyFilterOptions.
3290
+ * @example await d.notify_filter(["com.kakao.talk"])
3291
+ * @alias notify_filter
3292
+ */
3293
+ notifyFilter(packages?: ReadonlyArray<string>, opts?: NotifyFilterOptions): Promise<Array<string>>;
3294
+ }
3295
+ /** Commands the PC server answers itself. Droidline extends this and implements _run. */
3296
+ export declare abstract class ClientCommands extends EventEmitter {
3297
+ protected abstract _run(cmd: string, kind: ReturnKind, params: Params): Promise<any>;
3298
+ /**
3299
+ * Wait for a matching notification and return it.
3300
+ *
3301
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3302
+ *
3303
+ * @param by text and textContains look at both title and text.
3304
+ * @param value The value to match. Leave it out when by is a query object.
3305
+ * @param timeout Seconds to wait. Default: 60.
3306
+ * @param pkg Only from this app.
3307
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3308
+ * @throws {DroidlineError} with code TIMEOUT.
3309
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3310
+ */
3311
+ wait_notification(by: By, value: string, opts?: WaitNotificationOptions): Promise<Notification>;
3312
+ /**
3313
+ * Wait for a matching notification and return it.
3314
+ *
3315
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3316
+ *
3317
+ * @param by text and textContains look at both title and text.
3318
+ * @param value The value to match. Leave it out when by is a query object.
3319
+ * @param timeout Seconds to wait. Default: 60.
3320
+ * @param pkg Only from this app.
3321
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3322
+ * @throws {DroidlineError} with code TIMEOUT.
3323
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3324
+ */
3325
+ wait_notification(by: By, value: string, timeout?: number, opts?: WaitNotificationOptions): Promise<Notification>;
3326
+ /**
3327
+ * Wait for a matching notification and return it.
3328
+ *
3329
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3330
+ *
3331
+ * @param by text and textContains look at both title and text.
3332
+ * @param value The value to match. Leave it out when by is a query object.
3333
+ * @param timeout Seconds to wait. Default: 60.
3334
+ * @param pkg Only from this app.
3335
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3336
+ * @throws {DroidlineError} with code TIMEOUT.
3337
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3338
+ */
3339
+ wait_notification(by: By, value: string, timeout?: number, pkg?: string, opts?: WaitNotificationOptions): Promise<Notification>;
3340
+ /**
3341
+ * Wait for a matching notification and return it.
3342
+ *
3343
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3344
+ *
3345
+ * @param by text and textContains look at both title and text.
3346
+ * @param value The value to match. Leave it out when by is a query object.
3347
+ * @param timeout Seconds to wait. Default: 60.
3348
+ * @param pkg Only from this app.
3349
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3350
+ * @throws {DroidlineError} with code TIMEOUT.
3351
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3352
+ */
3353
+ wait_notification(by: Query, opts?: WaitNotificationOptions): Promise<Notification>;
3354
+ /**
3355
+ * Wait for a matching notification and return it.
3356
+ *
3357
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3358
+ *
3359
+ * @param by text and textContains look at both title and text.
3360
+ * @param value The value to match. Leave it out when by is a query object.
3361
+ * @param timeout Seconds to wait. Default: 60.
3362
+ * @param pkg Only from this app.
3363
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3364
+ * @throws {DroidlineError} with code TIMEOUT.
3365
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3366
+ */
3367
+ wait_notification(by: Query, timeout?: number, opts?: WaitNotificationOptions): Promise<Notification>;
3368
+ /**
3369
+ * Wait for a matching notification and return it.
3370
+ *
3371
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3372
+ *
3373
+ * @param by text and textContains look at both title and text.
3374
+ * @param value The value to match. Leave it out when by is a query object.
3375
+ * @param timeout Seconds to wait. Default: 60.
3376
+ * @param pkg Only from this app.
3377
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3378
+ * @throws {DroidlineError} with code TIMEOUT.
3379
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3380
+ */
3381
+ wait_notification(by: Query, timeout?: number, pkg?: string, opts?: WaitNotificationOptions): Promise<Notification>;
3382
+ /**
3383
+ * Wait for a matching notification and return it.
3384
+ *
3385
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3386
+ *
3387
+ * @param by text and textContains look at both title and text.
3388
+ * @param value The value to match. Leave it out when by is a query object.
3389
+ * @param timeout Seconds to wait. Default: 60.
3390
+ * @param pkg Only from this app.
3391
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3392
+ * @throws {DroidlineError} with code TIMEOUT.
3393
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3394
+ * @alias wait_notification
3395
+ */
3396
+ waitNotification(by: By, value: string, opts?: WaitNotificationOptions): Promise<Notification>;
3397
+ /**
3398
+ * Wait for a matching notification and return it.
3399
+ *
3400
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3401
+ *
3402
+ * @param by text and textContains look at both title and text.
3403
+ * @param value The value to match. Leave it out when by is a query object.
3404
+ * @param timeout Seconds to wait. Default: 60.
3405
+ * @param pkg Only from this app.
3406
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3407
+ * @throws {DroidlineError} with code TIMEOUT.
3408
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3409
+ * @alias wait_notification
3410
+ */
3411
+ waitNotification(by: By, value: string, timeout?: number, opts?: WaitNotificationOptions): Promise<Notification>;
3412
+ /**
3413
+ * Wait for a matching notification and return it.
3414
+ *
3415
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3416
+ *
3417
+ * @param by text and textContains look at both title and text.
3418
+ * @param value The value to match. Leave it out when by is a query object.
3419
+ * @param timeout Seconds to wait. Default: 60.
3420
+ * @param pkg Only from this app.
3421
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3422
+ * @throws {DroidlineError} with code TIMEOUT.
3423
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3424
+ * @alias wait_notification
3425
+ */
3426
+ waitNotification(by: By, value: string, timeout?: number, pkg?: string, opts?: WaitNotificationOptions): Promise<Notification>;
3427
+ /**
3428
+ * Wait for a matching notification and return it.
3429
+ *
3430
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3431
+ *
3432
+ * @param by text and textContains look at both title and text.
3433
+ * @param value The value to match. Leave it out when by is a query object.
3434
+ * @param timeout Seconds to wait. Default: 60.
3435
+ * @param pkg Only from this app.
3436
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3437
+ * @throws {DroidlineError} with code TIMEOUT.
3438
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3439
+ * @alias wait_notification
3440
+ */
3441
+ waitNotification(by: Query, opts?: WaitNotificationOptions): Promise<Notification>;
3442
+ /**
3443
+ * Wait for a matching notification and return it.
3444
+ *
3445
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3446
+ *
3447
+ * @param by text and textContains look at both title and text.
3448
+ * @param value The value to match. Leave it out when by is a query object.
3449
+ * @param timeout Seconds to wait. Default: 60.
3450
+ * @param pkg Only from this app.
3451
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3452
+ * @throws {DroidlineError} with code TIMEOUT.
3453
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3454
+ * @alias wait_notification
3455
+ */
3456
+ waitNotification(by: Query, timeout?: number, opts?: WaitNotificationOptions): Promise<Notification>;
3457
+ /**
3458
+ * Wait for a matching notification and return it.
3459
+ *
3460
+ * Handled by the PC server, so it does not block other commands to the phone. It sees only apps you chose with notify_filter, and the default is none. On Android 15+ the OS hides one-time codes from apps: you get the notification but the code is masked.
3461
+ *
3462
+ * @param by text and textContains look at both title and text.
3463
+ * @param value The value to match. Leave it out when by is a query object.
3464
+ * @param timeout Seconds to wait. Default: 60.
3465
+ * @param pkg Only from this app.
3466
+ * @param opts Optional parameters by name, see WaitNotificationOptions.
3467
+ * @throws {DroidlineError} with code TIMEOUT.
3468
+ * @example await client.wait_notification("textContains", "인증번호", 60)
3469
+ * @alias wait_notification
3470
+ */
3471
+ waitNotification(by: Query, timeout?: number, pkg?: string, opts?: WaitNotificationOptions): Promise<Notification>;
3472
+ /**
3473
+ * Paired devices with online state and route.
3474
+ *
3475
+ * @example await client.devices()
3476
+ */
3477
+ devices(): Promise<Array<DeviceInfo>>;
3478
+ /**
3479
+ * Approve the phone that shows this 6-digit code.
3480
+ *
3481
+ * @param code Code shown on the phone.
3482
+ * @param name Name to give the device.
3483
+ * @param opts Optional parameters by name, see PairOptions.
3484
+ * @throws {DroidlineError} with code PAIRING_FAILED.
3485
+ * @example await client.pair("482913", { name: "shelf-01" })
3486
+ */
3487
+ pair(code: string, opts?: PairOptions): Promise<DeviceInfo>;
3488
+ /**
3489
+ * Approve the phone that shows this 6-digit code.
3490
+ *
3491
+ * @param code Code shown on the phone.
3492
+ * @param name Name to give the device.
3493
+ * @param opts Optional parameters by name, see PairOptions.
3494
+ * @throws {DroidlineError} with code PAIRING_FAILED.
3495
+ * @example await client.pair("482913", { name: "shelf-01" })
3496
+ */
3497
+ pair(code: string, name?: string, opts?: PairOptions): Promise<DeviceInfo>;
3498
+ /**
3499
+ * Create a one-time pairing QR code valid for 10 minutes.
3500
+ *
3501
+ * @param name Name to give the device.
3502
+ * @param opts Optional parameters by name, see PairQrOptions.
3503
+ * @example await client.pair_qr()
3504
+ */
3505
+ pair_qr(opts?: PairQrOptions): Promise<PairQrResult>;
3506
+ /**
3507
+ * Create a one-time pairing QR code valid for 10 minutes.
3508
+ *
3509
+ * @param name Name to give the device.
3510
+ * @param opts Optional parameters by name, see PairQrOptions.
3511
+ * @example await client.pair_qr()
3512
+ */
3513
+ pair_qr(name?: string, opts?: PairQrOptions): Promise<PairQrResult>;
3514
+ /**
3515
+ * Create a one-time pairing QR code valid for 10 minutes.
3516
+ *
3517
+ * @param name Name to give the device.
3518
+ * @param opts Optional parameters by name, see PairQrOptions.
3519
+ * @example await client.pair_qr()
3520
+ * @alias pair_qr
3521
+ */
3522
+ pairQr(opts?: PairQrOptions): Promise<PairQrResult>;
3523
+ /**
3524
+ * Create a one-time pairing QR code valid for 10 minutes.
3525
+ *
3526
+ * @param name Name to give the device.
3527
+ * @param opts Optional parameters by name, see PairQrOptions.
3528
+ * @example await client.pair_qr()
3529
+ * @alias pair_qr
3530
+ */
3531
+ pairQr(name?: string, opts?: PairQrOptions): Promise<PairQrResult>;
3532
+ /**
3533
+ * Give a device a name.
3534
+ *
3535
+ * @param device Device ID or name.
3536
+ * @param name New name.
3537
+ * @example await client.rename("a1b2c3d4", "shelf-01")
3538
+ */
3539
+ rename(device: string, name: string): Promise<DeviceInfo>;
3540
+ /**
3541
+ * Unpair a device. It must pair again to connect.
3542
+ *
3543
+ * @param device Device ID or name.
3544
+ * @example await client.revoke("shelf-01")
3545
+ */
3546
+ revoke(device: string): Promise<void>;
3547
+ /**
3548
+ * Receive events on this connection.
3549
+ *
3550
+ * @param events Any of notification, screen, toast, device, result, action.
3551
+ * @param device Only from this device. Omit for all.
3552
+ * @param opts Optional parameters by name, see SubscribeOptions.
3553
+ * @example await client.subscribe(["notification"])
3554
+ */
3555
+ subscribe(events: ReadonlyArray<string>, opts?: SubscribeOptions): Promise<void>;
3556
+ /**
3557
+ * Receive events on this connection.
3558
+ *
3559
+ * @param events Any of notification, screen, toast, device, result, action.
3560
+ * @param device Only from this device. Omit for all.
3561
+ * @param opts Optional parameters by name, see SubscribeOptions.
3562
+ * @example await client.subscribe(["notification"])
3563
+ */
3564
+ subscribe(events: ReadonlyArray<string>, device?: string, opts?: SubscribeOptions): Promise<void>;
3565
+ /**
3566
+ * Server version, ports and listening addresses.
3567
+ *
3568
+ * @example await client.server_info()
3569
+ */
3570
+ server_info(): Promise<ServerInfoResult>;
3571
+ /**
3572
+ * Server version, ports and listening addresses.
3573
+ *
3574
+ * @example await client.server_info()
3575
+ * @alias server_info
3576
+ */
3577
+ serverInfo(): Promise<ServerInfoResult>;
3578
+ /**
3579
+ * Authenticate this client connection with a token.
3580
+ *
3581
+ * @param token Client token from droidline token.
3582
+ * @example await client.auth("…")
3583
+ */
3584
+ auth(token: string): Promise<void>;
3585
+ }
3586
+ export {};