droidline 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated.d.ts +236 -0
- package/dist/generated.js +9 -0
- package/package.json +1 -1
package/dist/generated.d.ts
CHANGED
|
@@ -129,6 +129,32 @@ export interface App {
|
|
|
129
129
|
system?: any;
|
|
130
130
|
[field: string]: any;
|
|
131
131
|
}
|
|
132
|
+
export interface Sms {
|
|
133
|
+
id?: any;
|
|
134
|
+
address?: any;
|
|
135
|
+
text?: any;
|
|
136
|
+
time?: any;
|
|
137
|
+
box?: any;
|
|
138
|
+
read?: any;
|
|
139
|
+
mms?: any;
|
|
140
|
+
[field: string]: any;
|
|
141
|
+
}
|
|
142
|
+
export interface Call {
|
|
143
|
+
id?: any;
|
|
144
|
+
number?: any;
|
|
145
|
+
name?: any;
|
|
146
|
+
type?: any;
|
|
147
|
+
time?: any;
|
|
148
|
+
duration?: any;
|
|
149
|
+
[field: string]: any;
|
|
150
|
+
}
|
|
151
|
+
export interface Contact {
|
|
152
|
+
id?: any;
|
|
153
|
+
name?: any;
|
|
154
|
+
numbers?: any;
|
|
155
|
+
emails?: any;
|
|
156
|
+
[field: string]: any;
|
|
157
|
+
}
|
|
132
158
|
/** Error codes the server can answer with, from spec/commands.json. */
|
|
133
159
|
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";
|
|
134
160
|
/** HTTP status and default retryable flag of each error code. */
|
|
@@ -526,6 +552,34 @@ export interface NotifyFilterOptions {
|
|
|
526
552
|
/** Allowed packages. Omit to read the current list. */
|
|
527
553
|
packages?: ReadonlyArray<string>;
|
|
528
554
|
}
|
|
555
|
+
export interface SmsOptions {
|
|
556
|
+
/** Received, sent, or both. @default "inbox" */
|
|
557
|
+
box?: "inbox" | "sent" | "all";
|
|
558
|
+
/** Only messages whose number or sender contains this. Spaces and dashes are ignored. */
|
|
559
|
+
address?: string;
|
|
560
|
+
/** Only messages whose text contains this, ignoring case. */
|
|
561
|
+
contains?: string;
|
|
562
|
+
/** Only messages from the last this many seconds. 0 means any time. @default 0 */
|
|
563
|
+
within?: number;
|
|
564
|
+
/** Most messages to return, up to 500. @default 20 */
|
|
565
|
+
max?: number;
|
|
566
|
+
}
|
|
567
|
+
export interface CallsOptions {
|
|
568
|
+
/** Which calls. @default "all" */
|
|
569
|
+
type?: "all" | "incoming" | "outgoing" | "missed" | "rejected" | "blocked";
|
|
570
|
+
/** Only calls whose number or saved name contains this. Spaces and dashes are ignored. */
|
|
571
|
+
number?: string;
|
|
572
|
+
/** Only calls from the last this many seconds. 0 means any time. @default 0 */
|
|
573
|
+
within?: number;
|
|
574
|
+
/** Most calls to return, up to 500. @default 20 */
|
|
575
|
+
max?: number;
|
|
576
|
+
}
|
|
577
|
+
export interface ContactsOptions {
|
|
578
|
+
/** Only contacts whose name, number or email contains this, ignoring case. Spaces and dashes in numbers are ignored. */
|
|
579
|
+
query?: string;
|
|
580
|
+
/** Most contacts to return, up to 500. @default 50 */
|
|
581
|
+
max?: number;
|
|
582
|
+
}
|
|
529
583
|
export interface ChromeGoOptions {
|
|
530
584
|
/** Open in a new tab. @default false */
|
|
531
585
|
new_tab?: boolean;
|
|
@@ -4183,6 +4237,188 @@ export declare abstract class DeviceCommands {
|
|
|
4183
4237
|
* @alias notify_filter
|
|
4184
4238
|
*/
|
|
4185
4239
|
notifyFilter(packages?: ReadonlyArray<string>, opts?: NotifyFilterOptions): Promise<Array<string>>;
|
|
4240
|
+
/**
|
|
4241
|
+
* Text messages stored on the phone, newest first.
|
|
4242
|
+
*
|
|
4243
|
+
* Optional. Allow SMS on the app's Setup tab first; until then the answer is NO_PERMISSION. Covers SMS and the text of MMS. Chat messages (RCS) are kept by the messaging app itself and are not included. The MCP server lists this tool only when --tools names it.
|
|
4244
|
+
*
|
|
4245
|
+
* @param box Received, sent, or both. Default: "inbox".
|
|
4246
|
+
* @param address Only messages whose number or sender contains this. Spaces and dashes are ignored.
|
|
4247
|
+
* @param contains Only messages whose text contains this, ignoring case.
|
|
4248
|
+
* @param within Only messages from the last this many seconds. 0 means any time. Default: 0.
|
|
4249
|
+
* @param max Most messages to return, up to 500. Default: 20.
|
|
4250
|
+
* @param opts Optional parameters by name, see SmsOptions.
|
|
4251
|
+
* @example await d.sms({ contains: "인증번호", within: 300, max: 1 })
|
|
4252
|
+
*/
|
|
4253
|
+
sms(opts?: SmsOptions): Promise<Array<Sms>>;
|
|
4254
|
+
/**
|
|
4255
|
+
* Text messages stored on the phone, newest first.
|
|
4256
|
+
*
|
|
4257
|
+
* Optional. Allow SMS on the app's Setup tab first; until then the answer is NO_PERMISSION. Covers SMS and the text of MMS. Chat messages (RCS) are kept by the messaging app itself and are not included. The MCP server lists this tool only when --tools names it.
|
|
4258
|
+
*
|
|
4259
|
+
* @param box Received, sent, or both. Default: "inbox".
|
|
4260
|
+
* @param address Only messages whose number or sender contains this. Spaces and dashes are ignored.
|
|
4261
|
+
* @param contains Only messages whose text contains this, ignoring case.
|
|
4262
|
+
* @param within Only messages from the last this many seconds. 0 means any time. Default: 0.
|
|
4263
|
+
* @param max Most messages to return, up to 500. Default: 20.
|
|
4264
|
+
* @param opts Optional parameters by name, see SmsOptions.
|
|
4265
|
+
* @example await d.sms({ contains: "인증번호", within: 300, max: 1 })
|
|
4266
|
+
*/
|
|
4267
|
+
sms(box?: "inbox" | "sent" | "all", opts?: SmsOptions): Promise<Array<Sms>>;
|
|
4268
|
+
/**
|
|
4269
|
+
* Text messages stored on the phone, newest first.
|
|
4270
|
+
*
|
|
4271
|
+
* Optional. Allow SMS on the app's Setup tab first; until then the answer is NO_PERMISSION. Covers SMS and the text of MMS. Chat messages (RCS) are kept by the messaging app itself and are not included. The MCP server lists this tool only when --tools names it.
|
|
4272
|
+
*
|
|
4273
|
+
* @param box Received, sent, or both. Default: "inbox".
|
|
4274
|
+
* @param address Only messages whose number or sender contains this. Spaces and dashes are ignored.
|
|
4275
|
+
* @param contains Only messages whose text contains this, ignoring case.
|
|
4276
|
+
* @param within Only messages from the last this many seconds. 0 means any time. Default: 0.
|
|
4277
|
+
* @param max Most messages to return, up to 500. Default: 20.
|
|
4278
|
+
* @param opts Optional parameters by name, see SmsOptions.
|
|
4279
|
+
* @example await d.sms({ contains: "인증번호", within: 300, max: 1 })
|
|
4280
|
+
*/
|
|
4281
|
+
sms(box?: "inbox" | "sent" | "all", address?: string, opts?: SmsOptions): Promise<Array<Sms>>;
|
|
4282
|
+
/**
|
|
4283
|
+
* Text messages stored on the phone, newest first.
|
|
4284
|
+
*
|
|
4285
|
+
* Optional. Allow SMS on the app's Setup tab first; until then the answer is NO_PERMISSION. Covers SMS and the text of MMS. Chat messages (RCS) are kept by the messaging app itself and are not included. The MCP server lists this tool only when --tools names it.
|
|
4286
|
+
*
|
|
4287
|
+
* @param box Received, sent, or both. Default: "inbox".
|
|
4288
|
+
* @param address Only messages whose number or sender contains this. Spaces and dashes are ignored.
|
|
4289
|
+
* @param contains Only messages whose text contains this, ignoring case.
|
|
4290
|
+
* @param within Only messages from the last this many seconds. 0 means any time. Default: 0.
|
|
4291
|
+
* @param max Most messages to return, up to 500. Default: 20.
|
|
4292
|
+
* @param opts Optional parameters by name, see SmsOptions.
|
|
4293
|
+
* @example await d.sms({ contains: "인증번호", within: 300, max: 1 })
|
|
4294
|
+
*/
|
|
4295
|
+
sms(box?: "inbox" | "sent" | "all", address?: string, contains?: string, opts?: SmsOptions): Promise<Array<Sms>>;
|
|
4296
|
+
/**
|
|
4297
|
+
* Text messages stored on the phone, newest first.
|
|
4298
|
+
*
|
|
4299
|
+
* Optional. Allow SMS on the app's Setup tab first; until then the answer is NO_PERMISSION. Covers SMS and the text of MMS. Chat messages (RCS) are kept by the messaging app itself and are not included. The MCP server lists this tool only when --tools names it.
|
|
4300
|
+
*
|
|
4301
|
+
* @param box Received, sent, or both. Default: "inbox".
|
|
4302
|
+
* @param address Only messages whose number or sender contains this. Spaces and dashes are ignored.
|
|
4303
|
+
* @param contains Only messages whose text contains this, ignoring case.
|
|
4304
|
+
* @param within Only messages from the last this many seconds. 0 means any time. Default: 0.
|
|
4305
|
+
* @param max Most messages to return, up to 500. Default: 20.
|
|
4306
|
+
* @param opts Optional parameters by name, see SmsOptions.
|
|
4307
|
+
* @example await d.sms({ contains: "인증번호", within: 300, max: 1 })
|
|
4308
|
+
*/
|
|
4309
|
+
sms(box?: "inbox" | "sent" | "all", address?: string, contains?: string, within?: number, opts?: SmsOptions): Promise<Array<Sms>>;
|
|
4310
|
+
/**
|
|
4311
|
+
* Text messages stored on the phone, newest first.
|
|
4312
|
+
*
|
|
4313
|
+
* Optional. Allow SMS on the app's Setup tab first; until then the answer is NO_PERMISSION. Covers SMS and the text of MMS. Chat messages (RCS) are kept by the messaging app itself and are not included. The MCP server lists this tool only when --tools names it.
|
|
4314
|
+
*
|
|
4315
|
+
* @param box Received, sent, or both. Default: "inbox".
|
|
4316
|
+
* @param address Only messages whose number or sender contains this. Spaces and dashes are ignored.
|
|
4317
|
+
* @param contains Only messages whose text contains this, ignoring case.
|
|
4318
|
+
* @param within Only messages from the last this many seconds. 0 means any time. Default: 0.
|
|
4319
|
+
* @param max Most messages to return, up to 500. Default: 20.
|
|
4320
|
+
* @param opts Optional parameters by name, see SmsOptions.
|
|
4321
|
+
* @example await d.sms({ contains: "인증번호", within: 300, max: 1 })
|
|
4322
|
+
*/
|
|
4323
|
+
sms(box?: "inbox" | "sent" | "all", address?: string, contains?: string, within?: number, max?: number, opts?: SmsOptions): Promise<Array<Sms>>;
|
|
4324
|
+
/**
|
|
4325
|
+
* Call history, newest first.
|
|
4326
|
+
*
|
|
4327
|
+
* Optional. Allow call history on the app's Setup tab first; until then the answer is NO_PERMISSION. Only calls made through the phone app are listed; calls inside apps such as messengers usually are not. The MCP server lists this tool only when --tools names it.
|
|
4328
|
+
*
|
|
4329
|
+
* @param type Which calls. Default: "all".
|
|
4330
|
+
* @param number Only calls whose number or saved name contains this. Spaces and dashes are ignored.
|
|
4331
|
+
* @param within Only calls from the last this many seconds. 0 means any time. Default: 0.
|
|
4332
|
+
* @param max Most calls to return, up to 500. Default: 20.
|
|
4333
|
+
* @param opts Optional parameters by name, see CallsOptions.
|
|
4334
|
+
* @example await d.calls({ type: "missed", within: 3600 })
|
|
4335
|
+
*/
|
|
4336
|
+
calls(opts?: CallsOptions): Promise<Array<Call>>;
|
|
4337
|
+
/**
|
|
4338
|
+
* Call history, newest first.
|
|
4339
|
+
*
|
|
4340
|
+
* Optional. Allow call history on the app's Setup tab first; until then the answer is NO_PERMISSION. Only calls made through the phone app are listed; calls inside apps such as messengers usually are not. The MCP server lists this tool only when --tools names it.
|
|
4341
|
+
*
|
|
4342
|
+
* @param type Which calls. Default: "all".
|
|
4343
|
+
* @param number Only calls whose number or saved name contains this. Spaces and dashes are ignored.
|
|
4344
|
+
* @param within Only calls from the last this many seconds. 0 means any time. Default: 0.
|
|
4345
|
+
* @param max Most calls to return, up to 500. Default: 20.
|
|
4346
|
+
* @param opts Optional parameters by name, see CallsOptions.
|
|
4347
|
+
* @example await d.calls({ type: "missed", within: 3600 })
|
|
4348
|
+
*/
|
|
4349
|
+
calls(type?: "all" | "incoming" | "outgoing" | "missed" | "rejected" | "blocked", opts?: CallsOptions): Promise<Array<Call>>;
|
|
4350
|
+
/**
|
|
4351
|
+
* Call history, newest first.
|
|
4352
|
+
*
|
|
4353
|
+
* Optional. Allow call history on the app's Setup tab first; until then the answer is NO_PERMISSION. Only calls made through the phone app are listed; calls inside apps such as messengers usually are not. The MCP server lists this tool only when --tools names it.
|
|
4354
|
+
*
|
|
4355
|
+
* @param type Which calls. Default: "all".
|
|
4356
|
+
* @param number Only calls whose number or saved name contains this. Spaces and dashes are ignored.
|
|
4357
|
+
* @param within Only calls from the last this many seconds. 0 means any time. Default: 0.
|
|
4358
|
+
* @param max Most calls to return, up to 500. Default: 20.
|
|
4359
|
+
* @param opts Optional parameters by name, see CallsOptions.
|
|
4360
|
+
* @example await d.calls({ type: "missed", within: 3600 })
|
|
4361
|
+
*/
|
|
4362
|
+
calls(type?: "all" | "incoming" | "outgoing" | "missed" | "rejected" | "blocked", number?: string, opts?: CallsOptions): Promise<Array<Call>>;
|
|
4363
|
+
/**
|
|
4364
|
+
* Call history, newest first.
|
|
4365
|
+
*
|
|
4366
|
+
* Optional. Allow call history on the app's Setup tab first; until then the answer is NO_PERMISSION. Only calls made through the phone app are listed; calls inside apps such as messengers usually are not. The MCP server lists this tool only when --tools names it.
|
|
4367
|
+
*
|
|
4368
|
+
* @param type Which calls. Default: "all".
|
|
4369
|
+
* @param number Only calls whose number or saved name contains this. Spaces and dashes are ignored.
|
|
4370
|
+
* @param within Only calls from the last this many seconds. 0 means any time. Default: 0.
|
|
4371
|
+
* @param max Most calls to return, up to 500. Default: 20.
|
|
4372
|
+
* @param opts Optional parameters by name, see CallsOptions.
|
|
4373
|
+
* @example await d.calls({ type: "missed", within: 3600 })
|
|
4374
|
+
*/
|
|
4375
|
+
calls(type?: "all" | "incoming" | "outgoing" | "missed" | "rejected" | "blocked", number?: string, within?: number, opts?: CallsOptions): Promise<Array<Call>>;
|
|
4376
|
+
/**
|
|
4377
|
+
* Call history, newest first.
|
|
4378
|
+
*
|
|
4379
|
+
* Optional. Allow call history on the app's Setup tab first; until then the answer is NO_PERMISSION. Only calls made through the phone app are listed; calls inside apps such as messengers usually are not. The MCP server lists this tool only when --tools names it.
|
|
4380
|
+
*
|
|
4381
|
+
* @param type Which calls. Default: "all".
|
|
4382
|
+
* @param number Only calls whose number or saved name contains this. Spaces and dashes are ignored.
|
|
4383
|
+
* @param within Only calls from the last this many seconds. 0 means any time. Default: 0.
|
|
4384
|
+
* @param max Most calls to return, up to 500. Default: 20.
|
|
4385
|
+
* @param opts Optional parameters by name, see CallsOptions.
|
|
4386
|
+
* @example await d.calls({ type: "missed", within: 3600 })
|
|
4387
|
+
*/
|
|
4388
|
+
calls(type?: "all" | "incoming" | "outgoing" | "missed" | "rejected" | "blocked", number?: string, within?: number, max?: number, opts?: CallsOptions): Promise<Array<Call>>;
|
|
4389
|
+
/**
|
|
4390
|
+
* Contacts saved on the phone, by name.
|
|
4391
|
+
*
|
|
4392
|
+
* Optional. Allow contacts on the app's Setup tab first; until then the answer is NO_PERMISSION. The MCP server lists this tool only when --tools names it.
|
|
4393
|
+
*
|
|
4394
|
+
* @param query Only contacts whose name, number or email contains this, ignoring case. Spaces and dashes in numbers are ignored.
|
|
4395
|
+
* @param max Most contacts to return, up to 500. Default: 50.
|
|
4396
|
+
* @param opts Optional parameters by name, see ContactsOptions.
|
|
4397
|
+
* @example await d.contacts("Kim")
|
|
4398
|
+
*/
|
|
4399
|
+
contacts(opts?: ContactsOptions): Promise<Array<Contact>>;
|
|
4400
|
+
/**
|
|
4401
|
+
* Contacts saved on the phone, by name.
|
|
4402
|
+
*
|
|
4403
|
+
* Optional. Allow contacts on the app's Setup tab first; until then the answer is NO_PERMISSION. The MCP server lists this tool only when --tools names it.
|
|
4404
|
+
*
|
|
4405
|
+
* @param query Only contacts whose name, number or email contains this, ignoring case. Spaces and dashes in numbers are ignored.
|
|
4406
|
+
* @param max Most contacts to return, up to 500. Default: 50.
|
|
4407
|
+
* @param opts Optional parameters by name, see ContactsOptions.
|
|
4408
|
+
* @example await d.contacts("Kim")
|
|
4409
|
+
*/
|
|
4410
|
+
contacts(query?: string, opts?: ContactsOptions): Promise<Array<Contact>>;
|
|
4411
|
+
/**
|
|
4412
|
+
* Contacts saved on the phone, by name.
|
|
4413
|
+
*
|
|
4414
|
+
* Optional. Allow contacts on the app's Setup tab first; until then the answer is NO_PERMISSION. The MCP server lists this tool only when --tools names it.
|
|
4415
|
+
*
|
|
4416
|
+
* @param query Only contacts whose name, number or email contains this, ignoring case. Spaces and dashes in numbers are ignored.
|
|
4417
|
+
* @param max Most contacts to return, up to 500. Default: 50.
|
|
4418
|
+
* @param opts Optional parameters by name, see ContactsOptions.
|
|
4419
|
+
* @example await d.contacts("Kim")
|
|
4420
|
+
*/
|
|
4421
|
+
contacts(query?: string, max?: number, opts?: ContactsOptions): Promise<Array<Contact>>;
|
|
4186
4422
|
}
|
|
4187
4423
|
/** Commands the PC server answers itself. Droidline extends this and implements _run. */
|
|
4188
4424
|
export declare abstract class ClientCommands extends EventEmitter {
|
package/dist/generated.js
CHANGED
|
@@ -385,6 +385,15 @@ export class DeviceCommands {
|
|
|
385
385
|
async notifyFilter(...args) {
|
|
386
386
|
return this._run("notify_filter", "value", collect("notify_filter", args, [], ["packages"]));
|
|
387
387
|
}
|
|
388
|
+
async sms(...args) {
|
|
389
|
+
return this._run("sms", "value", collect("sms", args, [], ["box", "address", "contains", "within", "max"]));
|
|
390
|
+
}
|
|
391
|
+
async calls(...args) {
|
|
392
|
+
return this._run("calls", "value", collect("calls", args, [], ["type", "number", "within", "max"]));
|
|
393
|
+
}
|
|
394
|
+
async contacts(...args) {
|
|
395
|
+
return this._run("contacts", "value", collect("contacts", args, [], ["query", "max"]));
|
|
396
|
+
}
|
|
388
397
|
}
|
|
389
398
|
/** Commands the PC server answers itself. Droidline extends this and implements _run. */
|
|
390
399
|
export class ClientCommands extends EventEmitter {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droidline",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Android automation from Node.js: test your apps on real phones, script the tasks you repeat and run many phones at once. No ADB, no USB cable, no root.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|