UNPKG

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