@mearl/client 2.1.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/actionTimeouts.js +22 -16
- package/dist/commands.d.ts +898 -4
- package/dist/commands.js +30 -9
- package/dist/generated-browser-action-protocol.d.ts +704 -0
- package/dist/generated-browser-action-protocol.js +150 -0
- package/dist/index.d.ts +41 -486
- package/dist/index.js +1 -16
- package/package.json +3 -3
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
export interface GetRequestsParams {
|
|
2
|
+
tabId?: number;
|
|
3
|
+
count?: number;
|
|
4
|
+
filter?: string;
|
|
5
|
+
since?: number;
|
|
6
|
+
includeBody?: boolean;
|
|
7
|
+
includeHeaders?: boolean;
|
|
8
|
+
maxBodySize?: number;
|
|
9
|
+
fields?: string[];
|
|
10
|
+
keysOnly?: boolean;
|
|
11
|
+
applyHiddenFilter?: boolean;
|
|
12
|
+
source?: 'mtop' | 'requests';
|
|
13
|
+
}
|
|
14
|
+
export interface GetLogsParams {
|
|
15
|
+
tabId?: number;
|
|
16
|
+
level?: 'log' | 'warn' | 'error' | 'info' | 'all';
|
|
17
|
+
since?: number;
|
|
18
|
+
limit?: number;
|
|
19
|
+
filter?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface GetEventsParams {
|
|
22
|
+
tabId?: number;
|
|
23
|
+
source?: 'rum' | 'aplus' | 'arms' | 'all';
|
|
24
|
+
event_type?: string;
|
|
25
|
+
filter?: string;
|
|
26
|
+
since?: number;
|
|
27
|
+
limit?: number;
|
|
28
|
+
includeRaw?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface SetMockParams {
|
|
31
|
+
tabId?: number;
|
|
32
|
+
apiName: string;
|
|
33
|
+
mockData?: unknown;
|
|
34
|
+
fields?: Array<{
|
|
35
|
+
path: string;
|
|
36
|
+
value: unknown;
|
|
37
|
+
}>;
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
duration?: number;
|
|
40
|
+
conditions?: Record<string, unknown>;
|
|
41
|
+
}
|
|
42
|
+
export interface GetMocksParams {
|
|
43
|
+
tabId?: number;
|
|
44
|
+
apiName?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface GetApiSchemaParams {
|
|
47
|
+
api: string;
|
|
48
|
+
version?: string;
|
|
49
|
+
fields?: Array<'schema' | 'hsf'>;
|
|
50
|
+
}
|
|
51
|
+
export declare const SEND_REQUEST_MAX_FILES = 20;
|
|
52
|
+
export declare const SEND_REQUEST_MAX_TOTAL_FILE_BYTES: number;
|
|
53
|
+
export declare const SEND_REQUEST_MAX_TOTAL_BASE64_FILE_BYTES: number;
|
|
54
|
+
export type SendRequestFormValue = string | number | boolean;
|
|
55
|
+
interface SendRequestFileMetadata {
|
|
56
|
+
/** multipart/form-data field name. */
|
|
57
|
+
fieldName: string;
|
|
58
|
+
/** Defaults to a MIME type inferred from filename, then application/octet-stream. */
|
|
59
|
+
contentType?: string;
|
|
60
|
+
}
|
|
61
|
+
export type SendRequestFile = SendRequestFileMetadata & ({
|
|
62
|
+
/** Absolute path on the machine running Mearl native-host. */
|
|
63
|
+
filePath: string;
|
|
64
|
+
base64?: never;
|
|
65
|
+
/** Defaults to the basename of filePath. */
|
|
66
|
+
filename?: string;
|
|
67
|
+
} | {
|
|
68
|
+
filePath?: never;
|
|
69
|
+
/** Base64 payload; decoded Base64-backed files are limited to 7 MiB total. */
|
|
70
|
+
base64: string;
|
|
71
|
+
/** Multipart filename for the Base64 payload. */
|
|
72
|
+
filename: string;
|
|
73
|
+
});
|
|
74
|
+
export interface SendRequestParams {
|
|
75
|
+
url: string;
|
|
76
|
+
method?: string;
|
|
77
|
+
headers?: Record<string, string>;
|
|
78
|
+
params?: Record<string, string>;
|
|
79
|
+
body?: unknown;
|
|
80
|
+
formData?: Record<string, SendRequestFormValue>;
|
|
81
|
+
files?: SendRequestFile[];
|
|
82
|
+
withCookies?: boolean;
|
|
83
|
+
responseType?: 'json' | 'text' | 'auto';
|
|
84
|
+
timeout?: number;
|
|
85
|
+
}
|
|
86
|
+
export interface SendMtopRequestParams {
|
|
87
|
+
api: string;
|
|
88
|
+
data?: unknown;
|
|
89
|
+
version?: string;
|
|
90
|
+
method?: string;
|
|
91
|
+
appKey?: string;
|
|
92
|
+
env?: string;
|
|
93
|
+
timeout?: number;
|
|
94
|
+
}
|
|
95
|
+
export interface TdbankAccountParams {
|
|
96
|
+
operation?: 'current' | 'list' | 'switch' | 'borrow';
|
|
97
|
+
pageIndex?: number;
|
|
98
|
+
refresh?: boolean;
|
|
99
|
+
query?: string;
|
|
100
|
+
accountId?: string | number;
|
|
101
|
+
havanaId?: string | number;
|
|
102
|
+
site?: string | number;
|
|
103
|
+
tabId?: number;
|
|
104
|
+
}
|
|
105
|
+
export type BrowserStatus = 'connected' | 'running_disconnected' | 'stopped';
|
|
106
|
+
export interface BrowserInfoBase {
|
|
107
|
+
browserId: string;
|
|
108
|
+
name: string;
|
|
109
|
+
status: BrowserStatus;
|
|
110
|
+
extensionVersion?: string;
|
|
111
|
+
nativeHostVersion?: string;
|
|
112
|
+
transport?: 'extension' | 'cdp';
|
|
113
|
+
}
|
|
114
|
+
export interface RegularBrowserInfo extends BrowserInfoBase {
|
|
115
|
+
type: 'regular';
|
|
116
|
+
status: 'connected';
|
|
117
|
+
}
|
|
118
|
+
export interface ManagedBrowserAccount {
|
|
119
|
+
accountId?: string;
|
|
120
|
+
loginId?: string;
|
|
121
|
+
nickname: string;
|
|
122
|
+
}
|
|
123
|
+
export interface ManagedBrowserInfo extends BrowserInfoBase {
|
|
124
|
+
type: 'managed';
|
|
125
|
+
headless: boolean;
|
|
126
|
+
persistent: boolean;
|
|
127
|
+
cdpPort: number;
|
|
128
|
+
createdAt: string;
|
|
129
|
+
account?: ManagedBrowserAccount;
|
|
130
|
+
copiedCookies?: {
|
|
131
|
+
domains: string[];
|
|
132
|
+
count: number;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export type BrowserInfo = RegularBrowserInfo | ManagedBrowserInfo;
|
|
136
|
+
export interface BrowserListResult {
|
|
137
|
+
count: number;
|
|
138
|
+
connectedCount: number;
|
|
139
|
+
defaultBrowserId: string | null;
|
|
140
|
+
browsers: BrowserInfo[];
|
|
141
|
+
}
|
|
142
|
+
export interface SelectBrowserParams {
|
|
143
|
+
browser?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface SelectBrowserResult {
|
|
146
|
+
selected: {
|
|
147
|
+
browserId: string;
|
|
148
|
+
name: string;
|
|
149
|
+
} | null;
|
|
150
|
+
note?: string;
|
|
151
|
+
}
|
|
152
|
+
export interface BrowserReleaseFailure {
|
|
153
|
+
tabId: number;
|
|
154
|
+
stage: string;
|
|
155
|
+
error: string;
|
|
156
|
+
}
|
|
157
|
+
export interface BrowserReleaseResult {
|
|
158
|
+
released: boolean;
|
|
159
|
+
hadActiveControl: boolean;
|
|
160
|
+
transports: Array<'extension' | 'cdp'>;
|
|
161
|
+
affectedTabIds: number[];
|
|
162
|
+
failures?: BrowserReleaseFailure[];
|
|
163
|
+
}
|
|
164
|
+
export interface BrowserLaunchParams {
|
|
165
|
+
name: string;
|
|
166
|
+
headless?: boolean;
|
|
167
|
+
userAgentMode?: 'default' | 'desktop';
|
|
168
|
+
persistent?: boolean;
|
|
169
|
+
executablePath?: string;
|
|
170
|
+
url?: string;
|
|
171
|
+
accountId?: string | number;
|
|
172
|
+
havanaId?: string | number;
|
|
173
|
+
site?: string | number;
|
|
174
|
+
query?: string;
|
|
175
|
+
tabId?: number;
|
|
176
|
+
copyCookieDomains?: string[];
|
|
177
|
+
}
|
|
178
|
+
export interface BrowserCloseParams {
|
|
179
|
+
browser: string;
|
|
180
|
+
deleteProfile?: boolean;
|
|
181
|
+
}
|
|
182
|
+
export interface SetRuleParams {
|
|
183
|
+
actionType: 'redirect' | 'block' | 'allow' | 'upgradeScheme' | 'modifyHeaders';
|
|
184
|
+
filter: string;
|
|
185
|
+
redirectUrl?: string;
|
|
186
|
+
requestHeaders?: Array<{
|
|
187
|
+
header: string;
|
|
188
|
+
operation: 'set' | 'append' | 'remove';
|
|
189
|
+
value?: string;
|
|
190
|
+
}>;
|
|
191
|
+
responseHeaders?: Array<{
|
|
192
|
+
header: string;
|
|
193
|
+
operation: 'set' | 'append' | 'remove';
|
|
194
|
+
value?: string;
|
|
195
|
+
}>;
|
|
196
|
+
initiatorDomains?: string;
|
|
197
|
+
resourceTypes?: string[];
|
|
198
|
+
priority?: number;
|
|
199
|
+
description?: string;
|
|
200
|
+
}
|
|
201
|
+
export interface RulesResult {
|
|
202
|
+
enabled: boolean;
|
|
203
|
+
rules: Array<Record<string, unknown>>;
|
|
204
|
+
}
|
|
205
|
+
export interface PageScreenshotParams {
|
|
206
|
+
tabId?: number;
|
|
207
|
+
selector?: string;
|
|
208
|
+
format?: 'png' | 'jpeg';
|
|
209
|
+
quality?: number;
|
|
210
|
+
}
|
|
211
|
+
export interface PageSelectedElementParams {
|
|
212
|
+
tabId?: number;
|
|
213
|
+
includeOuterHTML?: boolean;
|
|
214
|
+
includeScreenshot?: boolean;
|
|
215
|
+
}
|
|
216
|
+
export type BrowserDevicePresetName = 'iphone-15-pro' | 'iphone-se' | 'pixel-8' | 'ipad-mini' | 'galaxy-s23';
|
|
217
|
+
export interface BrowserEmulationOptions {
|
|
218
|
+
preset?: BrowserDevicePresetName;
|
|
219
|
+
width?: number;
|
|
220
|
+
height?: number;
|
|
221
|
+
deviceScaleFactor?: number;
|
|
222
|
+
mobile?: boolean;
|
|
223
|
+
userAgent?: string;
|
|
224
|
+
orientation?: 'portrait' | 'landscape';
|
|
225
|
+
touch?: boolean;
|
|
226
|
+
}
|
|
227
|
+
export interface TabOpenParams {
|
|
228
|
+
url: string;
|
|
229
|
+
active?: boolean;
|
|
230
|
+
/** Source tab whose Agent conversation should own the opened or reused tab. */
|
|
231
|
+
openerTabId?: number;
|
|
232
|
+
closeExisting?: boolean;
|
|
233
|
+
reuse?: 'never' | 'prefer' | 'require';
|
|
234
|
+
match?: {
|
|
235
|
+
urlPattern?: string;
|
|
236
|
+
ignoreSearch?: boolean;
|
|
237
|
+
ignoreHash?: boolean;
|
|
238
|
+
onMultiple?: 'error' | 'first';
|
|
239
|
+
};
|
|
240
|
+
restoreFocusOnClose?: boolean;
|
|
241
|
+
emulation?: BrowserEmulationOptions;
|
|
242
|
+
group?: string;
|
|
243
|
+
}
|
|
244
|
+
export interface TabCloseParams {
|
|
245
|
+
tabId: number;
|
|
246
|
+
}
|
|
247
|
+
export interface PageObservationWaitOptions {
|
|
248
|
+
quietMs?: number;
|
|
249
|
+
firstChangeTimeoutMs?: number;
|
|
250
|
+
timeoutMs?: number;
|
|
251
|
+
navigationGraceMs?: number;
|
|
252
|
+
navigationTimeoutMs?: number;
|
|
253
|
+
networkIdleMs?: number;
|
|
254
|
+
contentReadyAfterMs?: number;
|
|
255
|
+
}
|
|
256
|
+
export interface PageClickParams {
|
|
257
|
+
tabId?: number;
|
|
258
|
+
selector?: string;
|
|
259
|
+
text?: string;
|
|
260
|
+
point?: {
|
|
261
|
+
x: number;
|
|
262
|
+
y: number;
|
|
263
|
+
};
|
|
264
|
+
role?: string;
|
|
265
|
+
exact?: boolean;
|
|
266
|
+
scope?: string;
|
|
267
|
+
clickMode?: 'auto' | 'dom' | 'mouse' | 'touch';
|
|
268
|
+
observe?: PageObservationWaitOptions | false;
|
|
269
|
+
}
|
|
270
|
+
export interface PageTypeParams {
|
|
271
|
+
tabId?: number;
|
|
272
|
+
selector: string;
|
|
273
|
+
text: string;
|
|
274
|
+
clearFirst?: boolean;
|
|
275
|
+
observe?: PageObservationWaitOptions | false;
|
|
276
|
+
}
|
|
277
|
+
export interface PageScrollParams {
|
|
278
|
+
tabId?: number;
|
|
279
|
+
direction: 'up' | 'down' | 'top' | 'bottom';
|
|
280
|
+
distance?: number;
|
|
281
|
+
selector?: string;
|
|
282
|
+
containerPolicy?: 'self' | 'nearest';
|
|
283
|
+
observe?: PageObservationWaitOptions | false;
|
|
284
|
+
}
|
|
285
|
+
export interface PageHoverParams {
|
|
286
|
+
tabId?: number;
|
|
287
|
+
selector: string;
|
|
288
|
+
observe?: PageObservationWaitOptions | false;
|
|
289
|
+
}
|
|
290
|
+
export interface PageEvalParams {
|
|
291
|
+
tabId?: number;
|
|
292
|
+
expression: string;
|
|
293
|
+
frameId?: string;
|
|
294
|
+
awaitPromise?: boolean;
|
|
295
|
+
observe?: PageObservationWaitOptions;
|
|
296
|
+
}
|
|
297
|
+
export interface PageSnapshotQuery {
|
|
298
|
+
text?: string;
|
|
299
|
+
role?: string;
|
|
300
|
+
exact?: boolean;
|
|
301
|
+
}
|
|
302
|
+
export interface PageSnapshotParams {
|
|
303
|
+
tabId?: number;
|
|
304
|
+
depth?: number;
|
|
305
|
+
maxChars?: number;
|
|
306
|
+
maxNodes?: number;
|
|
307
|
+
rootSelector?: string;
|
|
308
|
+
rootRef?: string;
|
|
309
|
+
ancestorDepth?: number;
|
|
310
|
+
query?: PageSnapshotQuery;
|
|
311
|
+
mode?: 'full' | 'interactive' | 'viewport';
|
|
312
|
+
}
|
|
313
|
+
export interface PagePressParams {
|
|
314
|
+
tabId?: number;
|
|
315
|
+
key: string;
|
|
316
|
+
modifiers?: string[];
|
|
317
|
+
observe?: PageObservationWaitOptions | false;
|
|
318
|
+
}
|
|
319
|
+
export interface PageWaitParams {
|
|
320
|
+
tabId?: number;
|
|
321
|
+
time?: number;
|
|
322
|
+
selector?: string;
|
|
323
|
+
condition?: string;
|
|
324
|
+
timeout?: number;
|
|
325
|
+
interval?: number;
|
|
326
|
+
}
|
|
327
|
+
export interface PageNavigateParams {
|
|
328
|
+
tabId?: number;
|
|
329
|
+
url?: string;
|
|
330
|
+
refresh?: boolean;
|
|
331
|
+
history?: 'back' | 'forward';
|
|
332
|
+
}
|
|
333
|
+
export interface PageUploadParams {
|
|
334
|
+
tabId?: number;
|
|
335
|
+
selector: string;
|
|
336
|
+
filePaths: string[];
|
|
337
|
+
observe?: PageObservationWaitOptions | false;
|
|
338
|
+
}
|
|
339
|
+
export interface PageFramesParams {
|
|
340
|
+
tabId?: number;
|
|
341
|
+
}
|
|
342
|
+
export interface SetDeviceEmulationParams extends BrowserEmulationOptions {
|
|
343
|
+
tabId?: number;
|
|
344
|
+
enabled: boolean;
|
|
345
|
+
reload?: boolean;
|
|
346
|
+
}
|
|
347
|
+
export interface SetTimezoneParams {
|
|
348
|
+
tabId?: number;
|
|
349
|
+
timezone: string;
|
|
350
|
+
}
|
|
351
|
+
export interface SetTimezoneResult {
|
|
352
|
+
enabled: boolean;
|
|
353
|
+
timezone: string | null;
|
|
354
|
+
}
|
|
355
|
+
export interface GetCookieParams {
|
|
356
|
+
tabId?: number;
|
|
357
|
+
name: string;
|
|
358
|
+
domain?: string;
|
|
359
|
+
path?: string;
|
|
360
|
+
}
|
|
361
|
+
export interface GetCookieResult {
|
|
362
|
+
tabId?: number;
|
|
363
|
+
url: string;
|
|
364
|
+
name: string;
|
|
365
|
+
found: boolean;
|
|
366
|
+
value?: string;
|
|
367
|
+
domain?: string;
|
|
368
|
+
path?: string;
|
|
369
|
+
}
|
|
370
|
+
export interface SetCookieParams {
|
|
371
|
+
tabId?: number;
|
|
372
|
+
name: string;
|
|
373
|
+
value: string;
|
|
374
|
+
domain?: string;
|
|
375
|
+
path?: string;
|
|
376
|
+
reload?: boolean;
|
|
377
|
+
}
|
|
378
|
+
export interface SetCookieResult {
|
|
379
|
+
tabId?: number;
|
|
380
|
+
url: string;
|
|
381
|
+
name: string;
|
|
382
|
+
domain: string;
|
|
383
|
+
path: string;
|
|
384
|
+
reloaded: boolean;
|
|
385
|
+
}
|
|
386
|
+
export interface GetUserInfoParams {
|
|
387
|
+
detail?: boolean;
|
|
388
|
+
}
|
|
389
|
+
export interface RecordParams {
|
|
390
|
+
tabId?: number;
|
|
391
|
+
}
|
|
392
|
+
export interface RequestDomainPermissionParams {
|
|
393
|
+
domain: string;
|
|
394
|
+
}
|
|
395
|
+
export type RunActionName = Exclude<ExtensionBrowserAction, 'run_actions' | 'browser_release'>;
|
|
396
|
+
export interface ActionStep {
|
|
397
|
+
action: RunActionName;
|
|
398
|
+
data?: Record<string, unknown>;
|
|
399
|
+
}
|
|
400
|
+
export interface RunActionsParams {
|
|
401
|
+
actions: ActionStep[];
|
|
402
|
+
tabId: number;
|
|
403
|
+
}
|
|
404
|
+
export interface BrowserActionMap {
|
|
405
|
+
get_requests: {
|
|
406
|
+
request: GetRequestsParams;
|
|
407
|
+
response: unknown;
|
|
408
|
+
};
|
|
409
|
+
get_logs: {
|
|
410
|
+
request: GetLogsParams;
|
|
411
|
+
response: unknown;
|
|
412
|
+
};
|
|
413
|
+
get_events: {
|
|
414
|
+
request: GetEventsParams;
|
|
415
|
+
response: unknown;
|
|
416
|
+
};
|
|
417
|
+
get_api_schema: {
|
|
418
|
+
request: GetApiSchemaParams;
|
|
419
|
+
response: unknown;
|
|
420
|
+
};
|
|
421
|
+
set_mock: {
|
|
422
|
+
request: SetMockParams;
|
|
423
|
+
response: unknown;
|
|
424
|
+
};
|
|
425
|
+
get_mocks: {
|
|
426
|
+
request: GetMocksParams;
|
|
427
|
+
response: unknown;
|
|
428
|
+
};
|
|
429
|
+
set_rule: {
|
|
430
|
+
request: SetRuleParams;
|
|
431
|
+
response: unknown;
|
|
432
|
+
};
|
|
433
|
+
get_rules: {
|
|
434
|
+
request: undefined;
|
|
435
|
+
response: RulesResult;
|
|
436
|
+
};
|
|
437
|
+
send_request: {
|
|
438
|
+
request: SendRequestParams;
|
|
439
|
+
response: unknown;
|
|
440
|
+
};
|
|
441
|
+
send_mtop_request: {
|
|
442
|
+
request: SendMtopRequestParams;
|
|
443
|
+
response: unknown;
|
|
444
|
+
};
|
|
445
|
+
tdbank_account: {
|
|
446
|
+
request: TdbankAccountParams;
|
|
447
|
+
response: unknown;
|
|
448
|
+
};
|
|
449
|
+
browser_list: {
|
|
450
|
+
request: undefined;
|
|
451
|
+
response: BrowserListResult;
|
|
452
|
+
};
|
|
453
|
+
browser_select_browser: {
|
|
454
|
+
request: SelectBrowserParams;
|
|
455
|
+
response: SelectBrowserResult;
|
|
456
|
+
};
|
|
457
|
+
browser_release: {
|
|
458
|
+
request: undefined;
|
|
459
|
+
response: BrowserReleaseResult;
|
|
460
|
+
};
|
|
461
|
+
browser_launch: {
|
|
462
|
+
request: BrowserLaunchParams;
|
|
463
|
+
response: unknown;
|
|
464
|
+
};
|
|
465
|
+
browser_close: {
|
|
466
|
+
request: BrowserCloseParams;
|
|
467
|
+
response: unknown;
|
|
468
|
+
};
|
|
469
|
+
page_screenshot: {
|
|
470
|
+
request: PageScreenshotParams;
|
|
471
|
+
response: unknown;
|
|
472
|
+
};
|
|
473
|
+
page_selected_element: {
|
|
474
|
+
request: PageSelectedElementParams;
|
|
475
|
+
response: unknown;
|
|
476
|
+
};
|
|
477
|
+
tab_open: {
|
|
478
|
+
request: TabOpenParams;
|
|
479
|
+
response: unknown;
|
|
480
|
+
};
|
|
481
|
+
tab_close: {
|
|
482
|
+
request: TabCloseParams;
|
|
483
|
+
response: unknown;
|
|
484
|
+
};
|
|
485
|
+
tab_list: {
|
|
486
|
+
request: undefined;
|
|
487
|
+
response: unknown;
|
|
488
|
+
};
|
|
489
|
+
page_click: {
|
|
490
|
+
request: PageClickParams;
|
|
491
|
+
response: unknown;
|
|
492
|
+
};
|
|
493
|
+
page_type: {
|
|
494
|
+
request: PageTypeParams;
|
|
495
|
+
response: unknown;
|
|
496
|
+
};
|
|
497
|
+
page_scroll: {
|
|
498
|
+
request: PageScrollParams;
|
|
499
|
+
response: unknown;
|
|
500
|
+
};
|
|
501
|
+
page_hover: {
|
|
502
|
+
request: PageHoverParams;
|
|
503
|
+
response: unknown;
|
|
504
|
+
};
|
|
505
|
+
page_eval: {
|
|
506
|
+
request: PageEvalParams;
|
|
507
|
+
response: unknown;
|
|
508
|
+
};
|
|
509
|
+
page_snapshot: {
|
|
510
|
+
request: PageSnapshotParams;
|
|
511
|
+
response: unknown;
|
|
512
|
+
};
|
|
513
|
+
page_press: {
|
|
514
|
+
request: PagePressParams;
|
|
515
|
+
response: unknown;
|
|
516
|
+
};
|
|
517
|
+
page_wait: {
|
|
518
|
+
request: PageWaitParams;
|
|
519
|
+
response: unknown;
|
|
520
|
+
};
|
|
521
|
+
page_navigate: {
|
|
522
|
+
request: PageNavigateParams;
|
|
523
|
+
response: unknown;
|
|
524
|
+
};
|
|
525
|
+
page_upload: {
|
|
526
|
+
request: PageUploadParams;
|
|
527
|
+
response: unknown;
|
|
528
|
+
};
|
|
529
|
+
page_frames: {
|
|
530
|
+
request: PageFramesParams;
|
|
531
|
+
response: unknown;
|
|
532
|
+
};
|
|
533
|
+
set_device_emulation: {
|
|
534
|
+
request: SetDeviceEmulationParams;
|
|
535
|
+
response: unknown;
|
|
536
|
+
};
|
|
537
|
+
set_timezone: {
|
|
538
|
+
request: SetTimezoneParams;
|
|
539
|
+
response: SetTimezoneResult;
|
|
540
|
+
};
|
|
541
|
+
get_cookie: {
|
|
542
|
+
request: GetCookieParams;
|
|
543
|
+
response: GetCookieResult;
|
|
544
|
+
};
|
|
545
|
+
set_cookie: {
|
|
546
|
+
request: SetCookieParams;
|
|
547
|
+
response: SetCookieResult;
|
|
548
|
+
};
|
|
549
|
+
record_start: {
|
|
550
|
+
request: RecordParams;
|
|
551
|
+
response: unknown;
|
|
552
|
+
};
|
|
553
|
+
record_stop: {
|
|
554
|
+
request: RecordParams;
|
|
555
|
+
response: unknown;
|
|
556
|
+
};
|
|
557
|
+
request_domain_permission: {
|
|
558
|
+
request: RequestDomainPermissionParams;
|
|
559
|
+
response: unknown;
|
|
560
|
+
};
|
|
561
|
+
get_user_info: {
|
|
562
|
+
request: GetUserInfoParams;
|
|
563
|
+
response: unknown;
|
|
564
|
+
};
|
|
565
|
+
run_actions: {
|
|
566
|
+
request: RunActionsParams;
|
|
567
|
+
response: unknown;
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
export type BrowserAction = keyof BrowserActionMap;
|
|
571
|
+
export type BrowserActionRequest<A extends BrowserAction> = BrowserActionMap[A]['request'];
|
|
572
|
+
export type BrowserActionResponse<A extends BrowserAction> = BrowserActionMap[A]['response'];
|
|
573
|
+
export type BrowserCommandAction = Exclude<BrowserAction, 'browser_select_browser'>;
|
|
574
|
+
export type ExtensionBrowserAction = Exclude<BrowserCommandAction, 'browser_list' | 'browser_launch' | 'browser_close'>;
|
|
575
|
+
export declare const PAGE_ACT_ACTIONS: readonly ["page_click", "page_type", "page_hover", "page_scroll", "page_press", "page_upload", "page_eval"];
|
|
576
|
+
export type PageActAction = (typeof PAGE_ACT_ACTIONS)[number];
|
|
577
|
+
export declare const BROWSER_ACTIONS: {
|
|
578
|
+
readonly get_requests: true;
|
|
579
|
+
readonly get_logs: true;
|
|
580
|
+
readonly get_events: true;
|
|
581
|
+
readonly get_api_schema: true;
|
|
582
|
+
readonly set_mock: true;
|
|
583
|
+
readonly get_mocks: true;
|
|
584
|
+
readonly set_rule: true;
|
|
585
|
+
readonly get_rules: true;
|
|
586
|
+
readonly send_request: true;
|
|
587
|
+
readonly send_mtop_request: true;
|
|
588
|
+
readonly tdbank_account: true;
|
|
589
|
+
readonly browser_list: true;
|
|
590
|
+
readonly browser_select_browser: true;
|
|
591
|
+
readonly browser_release: true;
|
|
592
|
+
readonly browser_launch: true;
|
|
593
|
+
readonly browser_close: true;
|
|
594
|
+
readonly page_screenshot: true;
|
|
595
|
+
readonly page_selected_element: true;
|
|
596
|
+
readonly tab_open: true;
|
|
597
|
+
readonly tab_close: true;
|
|
598
|
+
readonly tab_list: true;
|
|
599
|
+
readonly page_click: true;
|
|
600
|
+
readonly page_type: true;
|
|
601
|
+
readonly page_scroll: true;
|
|
602
|
+
readonly page_hover: true;
|
|
603
|
+
readonly page_eval: true;
|
|
604
|
+
readonly page_snapshot: true;
|
|
605
|
+
readonly page_press: true;
|
|
606
|
+
readonly page_wait: true;
|
|
607
|
+
readonly page_navigate: true;
|
|
608
|
+
readonly page_upload: true;
|
|
609
|
+
readonly page_frames: true;
|
|
610
|
+
readonly set_device_emulation: true;
|
|
611
|
+
readonly set_timezone: true;
|
|
612
|
+
readonly get_cookie: true;
|
|
613
|
+
readonly set_cookie: true;
|
|
614
|
+
readonly record_start: true;
|
|
615
|
+
readonly record_stop: true;
|
|
616
|
+
readonly request_domain_permission: true;
|
|
617
|
+
readonly get_user_info: true;
|
|
618
|
+
readonly run_actions: true;
|
|
619
|
+
};
|
|
620
|
+
export declare const BROWSER_COMMAND_ACTIONS: {
|
|
621
|
+
readonly get_requests: true;
|
|
622
|
+
readonly get_logs: true;
|
|
623
|
+
readonly get_events: true;
|
|
624
|
+
readonly get_api_schema: true;
|
|
625
|
+
readonly set_mock: true;
|
|
626
|
+
readonly get_mocks: true;
|
|
627
|
+
readonly set_rule: true;
|
|
628
|
+
readonly get_rules: true;
|
|
629
|
+
readonly send_request: true;
|
|
630
|
+
readonly send_mtop_request: true;
|
|
631
|
+
readonly tdbank_account: true;
|
|
632
|
+
readonly browser_list: true;
|
|
633
|
+
readonly browser_release: true;
|
|
634
|
+
readonly browser_launch: true;
|
|
635
|
+
readonly browser_close: true;
|
|
636
|
+
readonly page_screenshot: true;
|
|
637
|
+
readonly page_selected_element: true;
|
|
638
|
+
readonly tab_open: true;
|
|
639
|
+
readonly tab_close: true;
|
|
640
|
+
readonly tab_list: true;
|
|
641
|
+
readonly page_click: true;
|
|
642
|
+
readonly page_type: true;
|
|
643
|
+
readonly page_scroll: true;
|
|
644
|
+
readonly page_hover: true;
|
|
645
|
+
readonly page_eval: true;
|
|
646
|
+
readonly page_snapshot: true;
|
|
647
|
+
readonly page_press: true;
|
|
648
|
+
readonly page_wait: true;
|
|
649
|
+
readonly page_navigate: true;
|
|
650
|
+
readonly page_upload: true;
|
|
651
|
+
readonly page_frames: true;
|
|
652
|
+
readonly set_device_emulation: true;
|
|
653
|
+
readonly set_timezone: true;
|
|
654
|
+
readonly get_cookie: true;
|
|
655
|
+
readonly set_cookie: true;
|
|
656
|
+
readonly record_start: true;
|
|
657
|
+
readonly record_stop: true;
|
|
658
|
+
readonly request_domain_permission: true;
|
|
659
|
+
readonly get_user_info: true;
|
|
660
|
+
readonly run_actions: true;
|
|
661
|
+
};
|
|
662
|
+
export declare const EXTENSION_BROWSER_ACTIONS: {
|
|
663
|
+
readonly get_requests: true;
|
|
664
|
+
readonly get_logs: true;
|
|
665
|
+
readonly get_events: true;
|
|
666
|
+
readonly get_api_schema: true;
|
|
667
|
+
readonly set_mock: true;
|
|
668
|
+
readonly get_mocks: true;
|
|
669
|
+
readonly set_rule: true;
|
|
670
|
+
readonly get_rules: true;
|
|
671
|
+
readonly send_request: true;
|
|
672
|
+
readonly send_mtop_request: true;
|
|
673
|
+
readonly tdbank_account: true;
|
|
674
|
+
readonly browser_release: true;
|
|
675
|
+
readonly page_screenshot: true;
|
|
676
|
+
readonly page_selected_element: true;
|
|
677
|
+
readonly tab_open: true;
|
|
678
|
+
readonly tab_close: true;
|
|
679
|
+
readonly tab_list: true;
|
|
680
|
+
readonly page_click: true;
|
|
681
|
+
readonly page_type: true;
|
|
682
|
+
readonly page_scroll: true;
|
|
683
|
+
readonly page_hover: true;
|
|
684
|
+
readonly page_eval: true;
|
|
685
|
+
readonly page_snapshot: true;
|
|
686
|
+
readonly page_press: true;
|
|
687
|
+
readonly page_wait: true;
|
|
688
|
+
readonly page_navigate: true;
|
|
689
|
+
readonly page_upload: true;
|
|
690
|
+
readonly page_frames: true;
|
|
691
|
+
readonly set_device_emulation: true;
|
|
692
|
+
readonly set_timezone: true;
|
|
693
|
+
readonly get_cookie: true;
|
|
694
|
+
readonly set_cookie: true;
|
|
695
|
+
readonly record_start: true;
|
|
696
|
+
readonly record_stop: true;
|
|
697
|
+
readonly request_domain_permission: true;
|
|
698
|
+
readonly get_user_info: true;
|
|
699
|
+
readonly run_actions: true;
|
|
700
|
+
};
|
|
701
|
+
export declare function isBrowserAction(value: unknown): value is BrowserAction;
|
|
702
|
+
export declare function isBrowserCommandAction(value: unknown): value is BrowserCommandAction;
|
|
703
|
+
export declare function isExtensionBrowserAction(value: unknown): value is ExtensionBrowserAction;
|
|
704
|
+
export {};
|