1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export interface Command {
|
16 | id: JsUint;
|
17 | }
|
18 | export type CommandData = BrowserCommand | BrowsingContextCommand | InputCommand | NetworkCommand | ScriptCommand | SessionCommand | StorageCommand;
|
19 | export interface EmptyParams extends Extensible {
|
20 | }
|
21 | export type Extensible = Record<string, unknown>;
|
22 | export type JsInt = number;
|
23 | export type JsUint = number;
|
24 | export type SessionCommand = SessionEnd | SessionNew | SessionStatus | SessionSubscribe | SessionUnsubscribe;
|
25 | export interface SessionCapabilitiesRequest {
|
26 | alwaysMatch?: SessionCapabilityRequest;
|
27 | firstMatch?: SessionCapabilityRequest[];
|
28 | }
|
29 | export interface SessionCapabilityRequest extends Extensible {
|
30 | acceptInsecureCerts?: boolean;
|
31 | browserName?: string;
|
32 | browserVersion?: string;
|
33 | platformName?: string;
|
34 | proxy?: SessionProxyConfiguration;
|
35 | webSocketUrl?: boolean;
|
36 | }
|
37 | export type SessionProxyConfiguration = SessionAutodetectProxyConfiguration | SessionDirectProxyConfiguration | SessionManualProxyConfiguration | SessionPacProxyConfiguration | SessionSystemProxyConfiguration;
|
38 | export interface SessionAutodetectProxyConfiguration extends Extensible {
|
39 | proxyType: 'autodetect';
|
40 | }
|
41 | export interface SessionDirectProxyConfiguration extends Extensible {
|
42 | proxyType: 'direct';
|
43 | }
|
44 | export interface SessionManualProxyConfiguration extends SessionSocksProxyConfiguration, Extensible {
|
45 | proxyType: 'manual';
|
46 | ftpProxy?: string;
|
47 | httpProxy?: string;
|
48 | sslProxy?: string;
|
49 | noProxy?: string[];
|
50 | }
|
51 | export interface SessionSocksProxyConfiguration {
|
52 | socksProxy: string;
|
53 | socksVersion: number;
|
54 | }
|
55 | export interface SessionPacProxyConfiguration extends Extensible {
|
56 | proxyType: 'pac';
|
57 | proxyAutoconfigUrl: string;
|
58 | }
|
59 | export interface SessionSystemProxyConfiguration extends Extensible {
|
60 | proxyType: 'system';
|
61 | }
|
62 | export interface SessionSubscriptionRequest {
|
63 | events: string[];
|
64 | contexts?: BrowsingContextBrowsingContext[];
|
65 | }
|
66 | export interface SessionStatus extends Command {
|
67 | method: 'session.status';
|
68 | params: EmptyParams;
|
69 | }
|
70 | export interface SessionNew extends Command {
|
71 | method: 'session.new';
|
72 | params: SessionNewParameters;
|
73 | }
|
74 | export interface SessionNewParameters {
|
75 | capabilities: SessionCapabilitiesRequest;
|
76 | }
|
77 | export interface SessionEnd extends Command {
|
78 | method: 'session.end';
|
79 | params: EmptyParams;
|
80 | }
|
81 | export interface SessionSubscribe extends Command {
|
82 | method: 'session.subscribe';
|
83 | params: SessionSubscriptionRequest;
|
84 | }
|
85 | export interface SessionUnsubscribe extends Command {
|
86 | method: 'session.unsubscribe';
|
87 | params: SessionSubscriptionRequest;
|
88 | }
|
89 | export type BrowserCommand = BrowserClose | BrowserCreateUserContext | BrowserGetUserContexts | BrowserRemoveUserContext;
|
90 | export type BrowserUserContext = string;
|
91 | export interface BrowserUserContextInfo {
|
92 | userContext: BrowserUserContext;
|
93 | }
|
94 | export interface BrowserClose extends Command {
|
95 | method: 'browser.close';
|
96 | params: EmptyParams;
|
97 | }
|
98 | export interface BrowserCreateUserContext extends Command {
|
99 | method: 'browser.createUserContext';
|
100 | params: EmptyParams;
|
101 | }
|
102 | export interface BrowserGetUserContexts extends Command {
|
103 | method: 'browser.getUserContexts';
|
104 | params: EmptyParams;
|
105 | }
|
106 | export interface BrowserRemoveUserContext extends Command {
|
107 | method: 'browser.removeUserContext';
|
108 | params: BrowserRemoveUserContextParameters;
|
109 | }
|
110 | export interface BrowserRemoveUserContextParameters {
|
111 | userContext: BrowserUserContext;
|
112 | }
|
113 | export type BrowsingContextCommand = BrowsingContextActivate | BrowsingContextCaptureScreenshot | BrowsingContextClose | BrowsingContextCreate | BrowsingContextGetTree | BrowsingContextHandleUserPrompt | BrowsingContextLocateNodes | BrowsingContextNavigate | BrowsingContextPrint | BrowsingContextReload | BrowsingContextSetViewport | BrowsingContextTraverseHistory;
|
114 | export type BrowsingContextBrowsingContext = string;
|
115 | export type BrowsingContextLocator = BrowsingContextAccessibilityLocator | BrowsingContextCssLocator | BrowsingContextInnerTextLocator | BrowsingContextXPathLocator;
|
116 | export interface BrowsingContextAccessibilityLocator {
|
117 | type: 'accessibility';
|
118 | value: {
|
119 | name?: string;
|
120 | role?: string;
|
121 | };
|
122 | }
|
123 | export interface BrowsingContextCssLocator {
|
124 | type: 'css';
|
125 | value: string;
|
126 | }
|
127 | export interface BrowsingContextInnerTextLocator {
|
128 | type: 'innerText';
|
129 | value: string;
|
130 | ignoreCase?: boolean;
|
131 | matchType?: 'full' | 'partial';
|
132 | maxDepth?: JsUint;
|
133 | }
|
134 | export interface BrowsingContextXPathLocator {
|
135 | type: 'xpath';
|
136 | value: string;
|
137 | }
|
138 | export type BrowsingContextNavigation = string;
|
139 | export type BrowsingContextReadinessState = 'none' | 'interactive' | 'complete';
|
140 | export interface BrowsingContextActivate extends Command {
|
141 | method: 'browsingContext.activate';
|
142 | params: BrowsingContextActivateParameters;
|
143 | }
|
144 | export interface BrowsingContextActivateParameters {
|
145 | context: BrowsingContextBrowsingContext;
|
146 | }
|
147 | export interface BrowsingContextCaptureScreenshot extends Command {
|
148 | method: 'browsingContext.captureScreenshot';
|
149 | params: BrowsingContextCaptureScreenshotParameters;
|
150 | }
|
151 | export interface BrowsingContextCaptureScreenshotParameters {
|
152 | context: BrowsingContextBrowsingContext;
|
153 | |
154 |
|
155 |
|
156 | origin?: 'viewport' | 'document';
|
157 | format?: BrowsingContextImageFormat;
|
158 | clip?: BrowsingContextClipRectangle;
|
159 | }
|
160 | export interface BrowsingContextImageFormat {
|
161 | type: string;
|
162 | quality?: number;
|
163 | }
|
164 | export type BrowsingContextClipRectangle = BrowsingContextBoxClipRectangle | BrowsingContextElementClipRectangle;
|
165 | export interface BrowsingContextElementClipRectangle {
|
166 | type: 'element';
|
167 | element: ScriptSharedReference;
|
168 | }
|
169 | export interface BrowsingContextBoxClipRectangle {
|
170 | type: 'box';
|
171 | x: number;
|
172 | y: number;
|
173 | width: number;
|
174 | height: number;
|
175 | }
|
176 | export interface BrowsingContextClose extends Command {
|
177 | method: 'browsingContext.close';
|
178 | params: BrowsingContextCloseParameters;
|
179 | }
|
180 | export interface BrowsingContextCloseParameters {
|
181 | context: BrowsingContextBrowsingContext;
|
182 | promptUnload?: boolean;
|
183 | }
|
184 | export interface BrowsingContextCreate extends Command {
|
185 | method: 'browsingContext.create';
|
186 | params: BrowsingContextCreateParameters;
|
187 | }
|
188 | export type BrowsingContextCreateType = 'tab' | 'window';
|
189 | export interface BrowsingContextCreateParameters {
|
190 | type: BrowsingContextCreateType;
|
191 | referenceContext?: BrowsingContextBrowsingContext;
|
192 | background?: boolean;
|
193 | userContext?: BrowserUserContext;
|
194 | }
|
195 | export interface BrowsingContextGetTree extends Command {
|
196 | method: 'browsingContext.getTree';
|
197 | params: BrowsingContextGetTreeParameters;
|
198 | }
|
199 | export interface BrowsingContextGetTreeParameters {
|
200 | maxDepth?: JsUint;
|
201 | root?: BrowsingContextBrowsingContext;
|
202 | }
|
203 | export interface BrowsingContextHandleUserPrompt extends Command {
|
204 | method: 'browsingContext.handleUserPrompt';
|
205 | params: BrowsingContextHandleUserPromptParameters;
|
206 | }
|
207 | export interface BrowsingContextHandleUserPromptParameters {
|
208 | context: BrowsingContextBrowsingContext;
|
209 | accept?: boolean;
|
210 | userText?: string;
|
211 | }
|
212 | export interface BrowsingContextLocateNodes extends Command {
|
213 | method: 'browsingContext.locateNodes';
|
214 | params: BrowsingContextLocateNodesParameters;
|
215 | }
|
216 | export interface BrowsingContextLocateNodesParameters {
|
217 | context: BrowsingContextBrowsingContext;
|
218 | locator: BrowsingContextLocator;
|
219 | maxNodeCount?: JsUint;
|
220 | serializationOptions?: ScriptSerializationOptions;
|
221 | startNodes?: ScriptSharedReference[];
|
222 | }
|
223 | export interface BrowsingContextNavigate extends Command {
|
224 | method: 'browsingContext.navigate';
|
225 | params: BrowsingContextNavigateParameters;
|
226 | }
|
227 | export interface BrowsingContextNavigateParameters {
|
228 | context: BrowsingContextBrowsingContext;
|
229 | url: string;
|
230 | wait?: BrowsingContextReadinessState;
|
231 | }
|
232 | export interface BrowsingContextPrint extends Command {
|
233 | method: 'browsingContext.print';
|
234 | params: BrowsingContextPrintParameters;
|
235 | }
|
236 | export interface BrowsingContextPrintParameters {
|
237 | context: BrowsingContextBrowsingContext;
|
238 | background?: boolean;
|
239 | margin?: BrowsingContextPrintMarginParameters;
|
240 | |
241 |
|
242 |
|
243 | orientation?: 'portrait' | 'landscape';
|
244 | page?: BrowsingContextPrintPageParameters;
|
245 | pageRanges?: (JsUint | string)[];
|
246 | |
247 |
|
248 |
|
249 | scale?: number;
|
250 | |
251 |
|
252 |
|
253 | shrinkToFit?: boolean;
|
254 | }
|
255 | export interface BrowsingContextPrintMarginParameters {
|
256 | |
257 |
|
258 |
|
259 | bottom?: number;
|
260 | |
261 |
|
262 |
|
263 | left?: number;
|
264 | |
265 |
|
266 |
|
267 | right?: number;
|
268 | |
269 |
|
270 |
|
271 | top?: number;
|
272 | }
|
273 | export interface BrowsingContextPrintPageParameters {
|
274 | |
275 |
|
276 |
|
277 | height?: number;
|
278 | |
279 |
|
280 |
|
281 | width?: number;
|
282 | }
|
283 | export interface BrowsingContextReload extends Command {
|
284 | method: 'browsingContext.reload';
|
285 | params: BrowsingContextReloadParameters;
|
286 | }
|
287 | export interface BrowsingContextReloadParameters {
|
288 | context: BrowsingContextBrowsingContext;
|
289 | ignoreCache?: boolean;
|
290 | wait?: BrowsingContextReadinessState;
|
291 | }
|
292 | export interface BrowsingContextSetViewport extends Command {
|
293 | method: 'browsingContext.setViewport';
|
294 | params: BrowsingContextSetViewportParameters;
|
295 | }
|
296 | export interface BrowsingContextSetViewportParameters {
|
297 | context: BrowsingContextBrowsingContext;
|
298 | viewport?: BrowsingContextViewport | null;
|
299 | devicePixelRatio?: number | null;
|
300 | }
|
301 | export interface BrowsingContextViewport {
|
302 | width: JsUint;
|
303 | height: JsUint;
|
304 | }
|
305 | export interface BrowsingContextTraverseHistory extends Command {
|
306 | method: 'browsingContext.traverseHistory';
|
307 | params: BrowsingContextTraverseHistoryParameters;
|
308 | }
|
309 | export interface BrowsingContextTraverseHistoryParameters {
|
310 | context: BrowsingContextBrowsingContext;
|
311 | delta: JsInt;
|
312 | }
|
313 | export type NetworkCommand = NetworkAddIntercept | NetworkContinueRequest | NetworkContinueResponse | NetworkContinueWithAuth | NetworkFailRequest | NetworkProvideResponse | NetworkRemoveIntercept;
|
314 | export interface NetworkAuthCredentials {
|
315 | type: 'password';
|
316 | username: string;
|
317 | password: string;
|
318 | }
|
319 | export type NetworkBytesValue = NetworkStringValue | NetworkBase64Value;
|
320 | export interface NetworkStringValue {
|
321 | type: 'string';
|
322 | value: string;
|
323 | }
|
324 | export interface NetworkBase64Value {
|
325 | type: 'base64';
|
326 | value: string;
|
327 | }
|
328 | export type NetworkSameSite = 'strict' | 'lax' | 'none';
|
329 | export interface NetworkCookie extends Extensible {
|
330 | name: string;
|
331 | value: NetworkBytesValue;
|
332 | domain: string;
|
333 | path: string;
|
334 | size: JsUint;
|
335 | httpOnly: boolean;
|
336 | secure: boolean;
|
337 | sameSite: NetworkSameSite;
|
338 | expiry?: JsUint;
|
339 | }
|
340 | export interface NetworkCookieHeader {
|
341 | name: string;
|
342 | value: NetworkBytesValue;
|
343 | }
|
344 | export interface NetworkHeader {
|
345 | name: string;
|
346 | value: NetworkBytesValue;
|
347 | }
|
348 | export type NetworkIntercept = string;
|
349 | export type NetworkRequest = string;
|
350 | export interface NetworkSetCookieHeader {
|
351 | name: string;
|
352 | value: NetworkBytesValue;
|
353 | domain?: string;
|
354 | httpOnly?: boolean;
|
355 | expiry?: string;
|
356 | maxAge?: JsInt;
|
357 | path?: string;
|
358 | sameSite?: NetworkSameSite;
|
359 | secure?: boolean;
|
360 | }
|
361 | export type NetworkUrlPattern = NetworkUrlPatternPattern | NetworkUrlPatternString;
|
362 | export interface NetworkUrlPatternPattern {
|
363 | type: 'pattern';
|
364 | protocol?: string;
|
365 | hostname?: string;
|
366 | port?: string;
|
367 | pathname?: string;
|
368 | search?: string;
|
369 | }
|
370 | export interface NetworkUrlPatternString {
|
371 | type: 'string';
|
372 | pattern: string;
|
373 | }
|
374 | export interface NetworkAddIntercept extends Command {
|
375 | method: 'network.addIntercept';
|
376 | params: NetworkAddInterceptParameters;
|
377 | }
|
378 | export interface NetworkAddInterceptParameters {
|
379 | phases: NetworkInterceptPhase[];
|
380 | contexts?: BrowsingContextBrowsingContext[];
|
381 | urlPatterns?: NetworkUrlPattern[];
|
382 | }
|
383 | export type NetworkInterceptPhase = 'beforeRequestSent' | 'responseStarted' | 'authRequired';
|
384 | export interface NetworkContinueRequest extends Command {
|
385 | method: 'network.continueRequest';
|
386 | params: NetworkContinueRequestParameters;
|
387 | }
|
388 | export interface NetworkContinueRequestParameters {
|
389 | request: NetworkRequest;
|
390 | cookies?: NetworkCookieHeader[];
|
391 | body?: NetworkBytesValue;
|
392 | headers?: NetworkHeader[];
|
393 | method?: string;
|
394 | url?: string;
|
395 | }
|
396 | export interface NetworkContinueResponse extends Command {
|
397 | method: 'network.continueResponse';
|
398 | params: NetworkContinueResponseParameters;
|
399 | }
|
400 | export interface NetworkContinueResponseParameters {
|
401 | request: NetworkRequest;
|
402 | cookies?: NetworkSetCookieHeader[];
|
403 | credentials?: NetworkAuthCredentials;
|
404 | headers?: NetworkHeader[];
|
405 | reasonPhrase?: string;
|
406 | statusCode?: JsUint;
|
407 | }
|
408 | export interface NetworkContinueWithAuth extends Command {
|
409 | method: 'network.continueWithAuth';
|
410 | params: NetworkContinueWithAuthParameters;
|
411 | }
|
412 | export interface NetworkContinueWithAuthParameters extends NetworkContinueWithAuthCredentials {
|
413 | request: NetworkRequest;
|
414 | }
|
415 | export interface NetworkContinueWithAuthCredentials {
|
416 | action: 'provideCredentials';
|
417 | credentials: NetworkAuthCredentials;
|
418 | }
|
419 | export interface NetworkContinueWithAuthNoCredentials {
|
420 | action: 'default' | 'cancel';
|
421 | }
|
422 | export interface NetworkFailRequest extends Command {
|
423 | method: 'network.failRequest';
|
424 | params: NetworkFailRequestParameters;
|
425 | }
|
426 | export interface NetworkFailRequestParameters {
|
427 | request: NetworkRequest;
|
428 | }
|
429 | export interface NetworkProvideResponse extends Command {
|
430 | method: 'network.provideResponse';
|
431 | params: NetworkProvideResponseParameters;
|
432 | }
|
433 | export interface NetworkProvideResponseParameters {
|
434 | request: NetworkRequest;
|
435 | body?: NetworkBytesValue;
|
436 | cookies?: NetworkSetCookieHeader[];
|
437 | headers?: NetworkHeader[];
|
438 | reasonPhrase?: string;
|
439 | statusCode?: JsUint;
|
440 | }
|
441 | export interface NetworkRemoveIntercept extends Command {
|
442 | method: 'network.removeIntercept';
|
443 | params: NetworkRemoveInterceptParameters;
|
444 | }
|
445 | export interface NetworkRemoveInterceptParameters {
|
446 | intercept: NetworkIntercept;
|
447 | }
|
448 | export type ScriptCommand = ScriptAddPreloadScript | ScriptCallFunction | ScriptDisown | ScriptEvaluate | ScriptGetRealms | ScriptRemovePreloadScript;
|
449 | export type ScriptChannel = string;
|
450 | export interface ScriptChannelValue {
|
451 | type: 'channel';
|
452 | value: ScriptChannelProperties;
|
453 | }
|
454 | export interface ScriptChannelProperties {
|
455 | channel: ScriptChannel;
|
456 | serializationOptions?: ScriptSerializationOptions;
|
457 | ownership?: ScriptResultOwnership;
|
458 | }
|
459 | export type ScriptEvaluateResult = ScriptEvaluateResultSuccess | ScriptEvaluateResultException;
|
460 | export interface ScriptEvaluateResultSuccess {
|
461 | type: 'success';
|
462 | result: ScriptRemoteValue;
|
463 | realm: ScriptRealm;
|
464 | }
|
465 | export interface ScriptEvaluateResultException {
|
466 | type: 'exception';
|
467 | exceptionDetails: ScriptExceptionDetails;
|
468 | realm: ScriptRealm;
|
469 | }
|
470 | export interface ScriptExceptionDetails {
|
471 | columnNumber: JsUint;
|
472 | exception: ScriptRemoteValue;
|
473 | lineNumber: JsUint;
|
474 | stackTrace: ScriptStackTrace;
|
475 | text: string;
|
476 | }
|
477 | export type ScriptHandle = string;
|
478 | export type ScriptInternalId = string;
|
479 | export type ScriptLocalValue = ScriptRemoteReference | ScriptPrimitiveProtocolValue | ScriptChannelValue | ScriptArrayLocalValue | ScriptDateLocalValue | ScriptMapLocalValue | ScriptObjectLocalValue | ScriptRegExpLocalValue | ScriptSetLocalValue;
|
480 | export type ScriptListLocalValue = (ScriptLocalValue)[];
|
481 | export interface ScriptArrayLocalValue {
|
482 | type: 'array';
|
483 | value: ScriptListLocalValue;
|
484 | }
|
485 | export interface ScriptDateLocalValue {
|
486 | type: 'date';
|
487 | value: string;
|
488 | }
|
489 | export type ScriptMappingLocalValue = (ScriptLocalValue | ScriptLocalValue)[];
|
490 | export interface ScriptMapLocalValue {
|
491 | type: 'map';
|
492 | value: ScriptMappingLocalValue;
|
493 | }
|
494 | export interface ScriptObjectLocalValue {
|
495 | type: 'object';
|
496 | value: ScriptMappingLocalValue;
|
497 | }
|
498 | export interface ScriptRegExpValue {
|
499 | pattern: string;
|
500 | flags?: string;
|
501 | }
|
502 | export interface ScriptRegExpLocalValue {
|
503 | type: 'regexp';
|
504 | value: ScriptRegExpValue;
|
505 | }
|
506 | export interface ScriptSetLocalValue {
|
507 | type: 'set';
|
508 | value: ScriptListLocalValue;
|
509 | }
|
510 | export type ScriptPreloadScript = string;
|
511 | export type ScriptRealm = string;
|
512 | export type ScriptPrimitiveProtocolValue = ScriptUndefinedValue | ScriptNullValue | ScriptStringValue | ScriptNumberValue | ScriptBooleanValue | ScriptBigIntValue;
|
513 | export interface ScriptUndefinedValue {
|
514 | type: 'undefined';
|
515 | }
|
516 | export interface ScriptNullValue {
|
517 | type: null;
|
518 | }
|
519 | export interface ScriptStringValue {
|
520 | type: 'string';
|
521 | value: string;
|
522 | }
|
523 | export type ScriptSpecialNumber = 'NaN' | '-0' | 'Infinity' | '-Infinity';
|
524 | export interface ScriptNumberValue {
|
525 | type: 'number';
|
526 | value: number | ScriptSpecialNumber;
|
527 | }
|
528 | export interface ScriptBooleanValue {
|
529 | type: 'boolean';
|
530 | value: boolean;
|
531 | }
|
532 | export interface ScriptBigIntValue {
|
533 | type: 'bigint';
|
534 | value: string;
|
535 | }
|
536 | export type ScriptRealmType = 'window' | 'dedicated-worker' | 'shared-worker' | 'service-worker' | 'worker' | 'paint-worklet' | 'audio-worklet' | 'worklet';
|
537 | export type ScriptRemoteReference = ScriptSharedReference | ScriptRemoteObjectReference;
|
538 | export interface ScriptSharedReference extends Extensible {
|
539 | sharedId: ScriptSharedId;
|
540 | handle?: ScriptHandle;
|
541 | }
|
542 | export interface ScriptRemoteObjectReference extends Extensible {
|
543 | handle: ScriptHandle;
|
544 | sharedId?: ScriptSharedId;
|
545 | }
|
546 | export type ScriptRemoteValue = ScriptPrimitiveProtocolValue | ScriptSymbolRemoteValue | ScriptArrayRemoteValue | ScriptObjectRemoteValue | ScriptFunctionRemoteValue | ScriptRegExpRemoteValue | ScriptDateRemoteValue | ScriptMapRemoteValue | ScriptSetRemoteValue | ScriptWeakMapRemoteValue | ScriptWeakSetRemoteValue | ScriptGeneratorRemoteValue | ScriptErrorRemoteValue | ScriptProxyRemoteValue | ScriptPromiseRemoteValue | ScriptTypedArrayRemoteValue | ScriptArrayBufferRemoteValue | ScriptNodeListRemoteValue | ScriptHtmlCollectionRemoteValue | ScriptNodeRemoteValue | ScriptWindowProxyRemoteValue;
|
547 | export type ScriptListRemoteValue = (ScriptRemoteValue)[];
|
548 | export type ScriptMappingRemoteValue = (ScriptRemoteValue | ScriptRemoteValue)[];
|
549 | export interface ScriptSymbolRemoteValue {
|
550 | type: 'symbol';
|
551 | handle?: ScriptHandle;
|
552 | internalId?: ScriptInternalId;
|
553 | }
|
554 | export interface ScriptArrayRemoteValue {
|
555 | type: 'array';
|
556 | handle?: ScriptHandle;
|
557 | internalId?: ScriptInternalId;
|
558 | value?: ScriptListRemoteValue;
|
559 | }
|
560 | export interface ScriptObjectRemoteValue {
|
561 | type: 'object';
|
562 | handle?: ScriptHandle;
|
563 | internalId?: ScriptInternalId;
|
564 | value?: ScriptMappingRemoteValue;
|
565 | }
|
566 | export interface ScriptFunctionRemoteValue {
|
567 | type: 'function';
|
568 | handle?: ScriptHandle;
|
569 | internalId?: ScriptInternalId;
|
570 | }
|
571 | export interface ScriptRegExpRemoteValue extends ScriptRegExpLocalValue {
|
572 | handle?: ScriptHandle;
|
573 | internalId?: ScriptInternalId;
|
574 | }
|
575 | export interface ScriptDateRemoteValue extends ScriptDateLocalValue {
|
576 | handle?: ScriptHandle;
|
577 | internalId?: ScriptInternalId;
|
578 | }
|
579 | export interface ScriptMapRemoteValue {
|
580 | type: 'map';
|
581 | handle?: ScriptHandle;
|
582 | internalId?: ScriptInternalId;
|
583 | value?: ScriptMappingRemoteValue;
|
584 | }
|
585 | export interface ScriptSetRemoteValue {
|
586 | type: 'set';
|
587 | handle?: ScriptHandle;
|
588 | internalId?: ScriptInternalId;
|
589 | value?: ScriptListRemoteValue;
|
590 | }
|
591 | export interface ScriptWeakMapRemoteValue {
|
592 | type: 'weakmap';
|
593 | handle?: ScriptHandle;
|
594 | internalId?: ScriptInternalId;
|
595 | }
|
596 | export interface ScriptWeakSetRemoteValue {
|
597 | type: 'weakset';
|
598 | handle?: ScriptHandle;
|
599 | internalId?: ScriptInternalId;
|
600 | }
|
601 | export interface ScriptGeneratorRemoteValue {
|
602 | type: 'generator';
|
603 | handle?: ScriptHandle;
|
604 | internalId?: ScriptInternalId;
|
605 | }
|
606 | export interface ScriptErrorRemoteValue {
|
607 | type: 'error';
|
608 | handle?: ScriptHandle;
|
609 | internalId?: ScriptInternalId;
|
610 | }
|
611 | export interface ScriptProxyRemoteValue {
|
612 | type: 'proxy';
|
613 | handle?: ScriptHandle;
|
614 | internalId?: ScriptInternalId;
|
615 | }
|
616 | export interface ScriptPromiseRemoteValue {
|
617 | type: 'promise';
|
618 | handle?: ScriptHandle;
|
619 | internalId?: ScriptInternalId;
|
620 | }
|
621 | export interface ScriptTypedArrayRemoteValue {
|
622 | type: 'typedarray';
|
623 | handle?: ScriptHandle;
|
624 | internalId?: ScriptInternalId;
|
625 | }
|
626 | export interface ScriptArrayBufferRemoteValue {
|
627 | type: 'arraybuffer';
|
628 | handle?: ScriptHandle;
|
629 | internalId?: ScriptInternalId;
|
630 | }
|
631 | export interface ScriptNodeListRemoteValue {
|
632 | type: 'nodelist';
|
633 | handle?: ScriptHandle;
|
634 | internalId?: ScriptInternalId;
|
635 | value?: ScriptListRemoteValue;
|
636 | }
|
637 | export interface ScriptHtmlCollectionRemoteValue {
|
638 | type: 'htmlcollection';
|
639 | handle?: ScriptHandle;
|
640 | internalId?: ScriptInternalId;
|
641 | value?: ScriptListRemoteValue;
|
642 | }
|
643 | export interface ScriptNodeRemoteValue {
|
644 | type: 'node';
|
645 | sharedId?: ScriptSharedId;
|
646 | handle?: ScriptHandle;
|
647 | internalId?: ScriptInternalId;
|
648 | value?: ScriptNodeProperties;
|
649 | }
|
650 | export interface ScriptNodeProperties {
|
651 | nodeType: JsUint;
|
652 | childNodeCount: JsUint;
|
653 | attributes?: Record<string, string>;
|
654 | children?: ScriptNodeRemoteValue[];
|
655 | localName?: string;
|
656 | mode?: 'open' | 'closed';
|
657 | namespaceUri?: string;
|
658 | nodeValue?: string;
|
659 | shadowRoot?: ScriptNodeRemoteValue | null;
|
660 | }
|
661 | export interface ScriptWindowProxyRemoteValue {
|
662 | type: 'window';
|
663 | value: ScriptWindowProxyProperties;
|
664 | handle?: ScriptHandle;
|
665 | internalId?: ScriptInternalId;
|
666 | }
|
667 | export interface ScriptWindowProxyProperties {
|
668 | context: BrowsingContextBrowsingContext;
|
669 | }
|
670 | export type ScriptResultOwnership = 'root' | 'none';
|
671 | export interface ScriptSerializationOptions {
|
672 | maxDomDepth?: JsUint | null;
|
673 | |
674 |
|
675 |
|
676 | maxObjectDepth?: JsUint | null;
|
677 | |
678 |
|
679 |
|
680 | includeShadowTree?: 'none' | 'open' | 'all';
|
681 | }
|
682 | export type ScriptSharedId = string;
|
683 | export interface ScriptStackFrame {
|
684 | columnNumber: JsUint;
|
685 | functionName: string;
|
686 | lineNumber: JsUint;
|
687 | url: string;
|
688 | }
|
689 | export interface ScriptStackTrace {
|
690 | callFrames: ScriptStackFrame[];
|
691 | }
|
692 | export interface ScriptRealmTarget {
|
693 | realm: ScriptRealm;
|
694 | }
|
695 | export interface ScriptContextTarget {
|
696 | context: BrowsingContextBrowsingContext;
|
697 | sandbox?: string;
|
698 | }
|
699 | export type ScriptTarget = ScriptContextTarget | ScriptRealmTarget;
|
700 | export interface ScriptAddPreloadScript extends Command {
|
701 | method: 'script.addPreloadScript';
|
702 | params: ScriptAddPreloadScriptParameters;
|
703 | }
|
704 | export interface ScriptAddPreloadScriptParameters {
|
705 | functionDeclaration: string;
|
706 | arguments?: ScriptChannelValue[];
|
707 | contexts?: BrowsingContextBrowsingContext[];
|
708 | sandbox?: string;
|
709 | }
|
710 | export interface ScriptDisown extends Command {
|
711 | method: 'script.disown';
|
712 | params: ScriptDisownParameters;
|
713 | }
|
714 | export interface ScriptDisownParameters {
|
715 | handles: ScriptHandle[];
|
716 | target: ScriptTarget;
|
717 | }
|
718 | export interface ScriptCallFunction extends Command {
|
719 | method: 'script.callFunction';
|
720 | params: ScriptCallFunctionParameters;
|
721 | }
|
722 | export interface ScriptCallFunctionParameters {
|
723 | functionDeclaration: string;
|
724 | awaitPromise: boolean;
|
725 | target: ScriptTarget;
|
726 | arguments?: ScriptLocalValue[];
|
727 | resultOwnership?: ScriptResultOwnership;
|
728 | serializationOptions?: ScriptSerializationOptions;
|
729 | this?: ScriptLocalValue;
|
730 | userActivation?: boolean;
|
731 | }
|
732 | export interface ScriptEvaluate extends Command {
|
733 | method: 'script.evaluate';
|
734 | params: ScriptEvaluateParameters;
|
735 | }
|
736 | export interface ScriptEvaluateParameters {
|
737 | expression: string;
|
738 | target: ScriptTarget;
|
739 | awaitPromise: boolean;
|
740 | resultOwnership?: ScriptResultOwnership;
|
741 | serializationOptions?: ScriptSerializationOptions;
|
742 | userActivation?: boolean;
|
743 | }
|
744 | export interface ScriptGetRealms extends Command {
|
745 | method: 'script.getRealms';
|
746 | params: ScriptGetRealmsParameters;
|
747 | }
|
748 | export interface ScriptGetRealmsParameters {
|
749 | context?: BrowsingContextBrowsingContext;
|
750 | type?: ScriptRealmType;
|
751 | }
|
752 | export interface ScriptRemovePreloadScript extends Command {
|
753 | method: 'script.removePreloadScript';
|
754 | params: ScriptRemovePreloadScriptParameters;
|
755 | }
|
756 | export interface ScriptRemovePreloadScriptParameters {
|
757 | script: ScriptPreloadScript;
|
758 | }
|
759 | export type StorageCommand = StorageDeleteCookies | StorageGetCookies | StorageSetCookie;
|
760 | export interface StoragePartitionKey extends Extensible {
|
761 | userContext?: string;
|
762 | sourceOrigin?: string;
|
763 | }
|
764 | export interface StorageGetCookies extends Command {
|
765 | method: 'storage.getCookies';
|
766 | params: StorageGetCookiesParameters;
|
767 | }
|
768 | export interface StorageCookieFilter extends Extensible {
|
769 | name?: string;
|
770 | value?: NetworkBytesValue;
|
771 | domain?: string;
|
772 | path?: string;
|
773 | size?: JsUint;
|
774 | httpOnly?: boolean;
|
775 | secure?: boolean;
|
776 | sameSite?: NetworkSameSite;
|
777 | expiry?: JsUint;
|
778 | }
|
779 | export interface StorageBrowsingContextPartitionDescriptor {
|
780 | type: 'context';
|
781 | context: BrowsingContextBrowsingContext;
|
782 | }
|
783 | export interface StorageStorageKeyPartitionDescriptor extends Extensible {
|
784 | type: 'storageKey';
|
785 | userContext?: string;
|
786 | sourceOrigin?: string;
|
787 | }
|
788 | export type StoragePartitionDescriptor = StorageBrowsingContextPartitionDescriptor | StorageStorageKeyPartitionDescriptor;
|
789 | export interface StorageGetCookiesParameters {
|
790 | filter?: StorageCookieFilter;
|
791 | partition?: StoragePartitionDescriptor;
|
792 | }
|
793 | export interface StorageSetCookie extends Command {
|
794 | method: 'storage.setCookie';
|
795 | params: StorageSetCookieParameters;
|
796 | }
|
797 | export interface StoragePartialCookie extends Extensible {
|
798 | name: string;
|
799 | value: NetworkBytesValue;
|
800 | domain: string;
|
801 | path?: string;
|
802 | httpOnly?: boolean;
|
803 | secure?: boolean;
|
804 | sameSite?: NetworkSameSite;
|
805 | expiry?: JsUint;
|
806 | }
|
807 | export interface StorageSetCookieParameters {
|
808 | cookie: StoragePartialCookie;
|
809 | partition?: StoragePartitionDescriptor;
|
810 | }
|
811 | export interface StorageDeleteCookies extends Command {
|
812 | method: 'storage.deleteCookies';
|
813 | params: StorageDeleteCookiesParameters;
|
814 | }
|
815 | export interface StorageDeleteCookiesParameters {
|
816 | filter?: StorageCookieFilter;
|
817 | partition?: StoragePartitionDescriptor;
|
818 | }
|
819 | export type InputCommand = InputPerformActions | InputReleaseActions | InputSetFiles;
|
820 | export interface InputElementOrigin {
|
821 | type: 'element';
|
822 | element: ScriptSharedReference;
|
823 | }
|
824 | export interface InputPerformActions extends Command {
|
825 | method: 'input.performActions';
|
826 | params: InputPerformActionsParameters;
|
827 | }
|
828 | export interface InputPerformActionsParameters {
|
829 | context: BrowsingContextBrowsingContext;
|
830 | actions: InputSourceActions[];
|
831 | }
|
832 | export type InputSourceActions = InputNoneSourceActions | InputKeySourceActions | InputPointerSourceActions | InputWheelSourceActions;
|
833 | export interface InputNoneSourceActions {
|
834 | type: 'none';
|
835 | id: string;
|
836 | actions: InputNoneSourceAction[];
|
837 | }
|
838 | export type InputNoneSourceAction = InputPauseAction;
|
839 | export interface InputKeySourceActions {
|
840 | type: 'key';
|
841 | id: string;
|
842 | actions: InputKeySourceAction[];
|
843 | }
|
844 | export type InputKeySourceAction = InputPauseAction | InputKeyDownAction | InputKeyUpAction;
|
845 | export interface InputPointerSourceActions {
|
846 | type: 'pointer';
|
847 | id: string;
|
848 | parameters?: InputPointerParameters;
|
849 | actions: InputPointerSourceAction[];
|
850 | }
|
851 | export type InputPointerType = 'mouse' | 'pen' | 'touch';
|
852 | export interface InputPointerParameters {
|
853 | |
854 |
|
855 |
|
856 | pointerType?: InputPointerType;
|
857 | }
|
858 | export type InputPointerSourceAction = InputPauseAction | InputPointerDownAction | InputPointerUpAction | InputPointerMoveAction;
|
859 | export interface InputWheelSourceActions {
|
860 | type: 'wheel';
|
861 | id: string;
|
862 | actions: InputWheelSourceAction[];
|
863 | }
|
864 | export type InputWheelSourceAction = InputPauseAction | InputWheelScrollAction;
|
865 | export interface InputPauseAction {
|
866 | type: 'pause';
|
867 | duration?: JsUint;
|
868 | }
|
869 | export interface InputKeyDownAction {
|
870 | type: 'keyDown';
|
871 | value: string;
|
872 | }
|
873 | export interface InputKeyUpAction {
|
874 | type: 'keyUp';
|
875 | value: string;
|
876 | }
|
877 | export interface InputPointerUpAction {
|
878 | type: 'pointerUp';
|
879 | button: JsUint;
|
880 | }
|
881 | export interface InputPointerDownAction extends InputPointerCommonProperties {
|
882 | type: 'pointerDown';
|
883 | button: JsUint;
|
884 | }
|
885 | export interface InputPointerMoveAction extends InputPointerCommonProperties {
|
886 | type: 'pointerMove';
|
887 | x: JsInt;
|
888 | y: JsInt;
|
889 | duration?: JsUint;
|
890 | origin?: InputOrigin;
|
891 | }
|
892 | export interface InputWheelScrollAction {
|
893 | type: 'scroll';
|
894 | x: JsInt;
|
895 | y: JsInt;
|
896 | deltaX: JsInt;
|
897 | deltaY: JsInt;
|
898 | duration?: JsUint;
|
899 | |
900 |
|
901 |
|
902 | origin?: InputOrigin;
|
903 | }
|
904 | export interface InputPointerCommonProperties {
|
905 | |
906 |
|
907 |
|
908 | width?: JsUint;
|
909 | |
910 |
|
911 |
|
912 | height?: JsUint;
|
913 | pressure?: number;
|
914 | tangentialPressure?: number;
|
915 | |
916 |
|
917 |
|
918 | twist?: number;
|
919 | |
920 |
|
921 |
|
922 | altitudeAngle?: number;
|
923 | azimuthAngle?: number;
|
924 | }
|
925 | export type InputOrigin = 'viewport' | 'pointer' | InputElementOrigin;
|
926 | export interface InputReleaseActions extends Command {
|
927 | method: 'input.releaseActions';
|
928 | params: InputReleaseActionsParameters;
|
929 | }
|
930 | export interface InputReleaseActionsParameters {
|
931 | context: BrowsingContextBrowsingContext;
|
932 | }
|
933 | export interface InputSetFiles extends Command {
|
934 | method: 'input.setFiles';
|
935 | params: InputSetFilesParameters;
|
936 | }
|
937 | export interface InputSetFilesParameters {
|
938 | context: BrowsingContextBrowsingContext;
|
939 | element: ScriptSharedReference;
|
940 | files: string[];
|
941 | }
|
942 |
|
\ | No newline at end of file |