UNPKG

23.6 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 type Message = CommandResponse | ErrorResponse | Event;
16export interface CommandResponse extends Extensible {
17 type: 'success';
18 id: JsUint;
19 result: ResultData;
20}
21export interface ErrorResponse extends Extensible {
22 type: 'error';
23 id: JsUint | null;
24 error: ErrorCode;
25 message: string;
26 stacktrace?: string;
27}
28export type ResultData = BrowsingContextResult | EmptyResult | NetworkResult | ScriptResult | SessionResult | StorageResult;
29export interface EmptyResult extends Extensible {
30}
31export interface Event extends Extensible {
32 type: 'event';
33}
34export type EventData = BrowsingContextEvent | LogEvent | NetworkEvent | ScriptEvent;
35export type Extensible = Record<string, unknown>;
36export type JsInt = number;
37export type JsUint = number;
38export type ErrorCode = 'invalid argument' | 'invalid selector' | 'invalid session id' | 'move target out of bounds' | 'no such alert' | 'no such element' | 'no such frame' | 'no such handle' | 'no such history entry' | 'no such intercept' | 'no such node' | 'no such request' | 'no such script' | 'no such storage partition' | 'no such user context' | 'session not created' | 'unable to capture screen' | 'unable to close browser' | 'unable to set cookie' | 'unable to set file input' | 'underspecified storage partition' | 'unknown command' | 'unknown error' | 'unsupported operation';
39export type SessionResult = SessionNewResult | SessionStatusResult;
40export interface SessionCapabilitiesRequest {
41 alwaysMatch?: SessionCapabilityRequest;
42 firstMatch?: SessionCapabilityRequest[];
43}
44export interface SessionCapabilityRequest extends Extensible {
45 acceptInsecureCerts?: boolean;
46 browserName?: string;
47 browserVersion?: string;
48 platformName?: string;
49 proxy?: SessionProxyConfiguration;
50 webSocketUrl?: boolean;
51}
52export type SessionProxyConfiguration = SessionAutodetectProxyConfiguration | SessionDirectProxyConfiguration | SessionManualProxyConfiguration | SessionPacProxyConfiguration | SessionSystemProxyConfiguration;
53export interface SessionAutodetectProxyConfiguration extends Extensible {
54 proxyType: 'autodetect';
55}
56export interface SessionDirectProxyConfiguration extends Extensible {
57 proxyType: 'direct';
58}
59export interface SessionManualProxyConfiguration extends SessionSocksProxyConfiguration, Extensible {
60 proxyType: 'manual';
61 ftpProxy?: string;
62 httpProxy?: string;
63 sslProxy?: string;
64 noProxy?: string[];
65}
66export interface SessionSocksProxyConfiguration {
67 socksProxy: string;
68 socksVersion: number;
69}
70export interface SessionPacProxyConfiguration extends Extensible {
71 proxyType: 'pac';
72 proxyAutoconfigUrl: string;
73}
74export interface SessionSystemProxyConfiguration extends Extensible {
75 proxyType: 'system';
76}
77export interface SessionStatusResult {
78 ready: boolean;
79 message: string;
80}
81export interface SessionNewResult {
82 sessionId: string;
83 capabilities: {
84 acceptInsecureCerts: boolean;
85 browserName: string;
86 browserVersion: string;
87 platformName: string;
88 setWindowRect: boolean;
89 userAgent: string;
90 proxy?: SessionProxyConfiguration;
91 webSocketUrl?: string;
92 };
93}
94export type BrowserResult = BrowserCreateUserContextResult | BrowserGetUserContextsResult;
95export type BrowserUserContext = string;
96export interface BrowserUserContextInfo {
97 userContext: BrowserUserContext;
98}
99export type BrowserCreateUserContextResult = BrowserUserContextInfo;
100export interface BrowserGetUserContextsResult {
101 userContexts: BrowserUserContextInfo[];
102}
103export type BrowsingContextResult = BrowsingContextCaptureScreenshotResult | BrowsingContextCreateResult | BrowsingContextGetTreeResult | BrowsingContextLocateNodesResult | BrowsingContextNavigateResult | BrowsingContextPrintResult | BrowsingContextTraverseHistoryResult;
104export type BrowsingContextEvent = BrowsingContextContextCreated | BrowsingContextContextDestroyed | BrowsingContextDomContentLoaded | BrowsingContextDownloadWillBegin | BrowsingContextFragmentNavigated | BrowsingContextLoad | BrowsingContextNavigationAborted | BrowsingContextNavigationFailed | BrowsingContextNavigationStarted | BrowsingContextUserPromptClosed | BrowsingContextUserPromptOpened;
105export type BrowsingContextBrowsingContext = string;
106export type BrowsingContextInfoList = (BrowsingContextInfo)[];
107export interface BrowsingContextInfo {
108 children: BrowsingContextInfoList | null;
109 context: BrowsingContextBrowsingContext;
110 url: string;
111 userContext: BrowserUserContext;
112 parent?: BrowsingContextBrowsingContext | null;
113}
114export type BrowsingContextLocator = BrowsingContextAccessibilityLocator | BrowsingContextCssLocator | BrowsingContextInnerTextLocator | BrowsingContextXPathLocator;
115export interface BrowsingContextAccessibilityLocator {
116 type: 'accessibility';
117 value: {
118 name?: string;
119 role?: string;
120 };
121}
122export interface BrowsingContextCssLocator {
123 type: 'css';
124 value: string;
125}
126export interface BrowsingContextInnerTextLocator {
127 type: 'innerText';
128 value: string;
129 ignoreCase?: boolean;
130 matchType?: 'full' | 'partial';
131 maxDepth?: JsUint;
132}
133export interface BrowsingContextXPathLocator {
134 type: 'xpath';
135 value: string;
136}
137export type BrowsingContextNavigation = string;
138export interface BrowsingContextNavigationInfo {
139 context: BrowsingContextBrowsingContext;
140 navigation: BrowsingContextNavigation | null;
141 timestamp: JsUint;
142 url: string;
143}
144export interface BrowsingContextCaptureScreenshotResult {
145 data: string;
146}
147export interface BrowsingContextCreateResult {
148 context: BrowsingContextBrowsingContext;
149}
150export interface BrowsingContextGetTreeResult {
151 contexts: BrowsingContextInfoList;
152}
153export interface BrowsingContextLocateNodesResult {
154 nodes: ScriptNodeRemoteValue[];
155}
156export interface BrowsingContextNavigateResult {
157 navigation: BrowsingContextNavigation | null;
158 url: string;
159}
160export interface BrowsingContextPrintResult {
161 data: string;
162}
163export interface BrowsingContextTraverseHistoryResult {
164}
165export interface BrowsingContextContextCreated {
166 method: 'browsingContext.contextCreated';
167 params: BrowsingContextInfo;
168}
169export interface BrowsingContextContextDestroyed {
170 method: 'browsingContext.contextDestroyed';
171 params: BrowsingContextInfo;
172}
173export interface BrowsingContextNavigationStarted {
174 method: 'browsingContext.navigationStarted';
175 params: BrowsingContextNavigationInfo;
176}
177export interface BrowsingContextFragmentNavigated {
178 method: 'browsingContext.fragmentNavigated';
179 params: BrowsingContextNavigationInfo;
180}
181export interface BrowsingContextDomContentLoaded {
182 method: 'browsingContext.domContentLoaded';
183 params: BrowsingContextNavigationInfo;
184}
185export interface BrowsingContextLoad {
186 method: 'browsingContext.load';
187 params: BrowsingContextNavigationInfo;
188}
189export interface BrowsingContextDownloadWillBegin {
190 method: 'browsingContext.downloadWillBegin';
191 params: BrowsingContextNavigationInfo;
192}
193export interface BrowsingContextNavigationAborted {
194 method: 'browsingContext.navigationAborted';
195 params: BrowsingContextNavigationInfo;
196}
197export interface BrowsingContextNavigationFailed {
198 method: 'browsingContext.navigationFailed';
199 params: BrowsingContextNavigationInfo;
200}
201export interface BrowsingContextUserPromptClosed {
202 method: 'browsingContext.userPromptClosed';
203 params: BrowsingContextUserPromptClosedParameters;
204}
205export interface BrowsingContextUserPromptClosedParameters {
206 context: BrowsingContextBrowsingContext;
207 accepted: boolean;
208 userText?: string;
209}
210export interface BrowsingContextUserPromptOpened {
211 method: 'browsingContext.userPromptOpened';
212 params: BrowsingContextUserPromptOpenedParameters;
213}
214export interface BrowsingContextUserPromptOpenedParameters {
215 context: BrowsingContextBrowsingContext;
216 type: 'alert' | 'confirm' | 'prompt' | 'beforeunload';
217 message: string;
218 defaultValue?: string;
219}
220export interface NetworkResult extends NetworkAddInterceptResult {
221}
222export type NetworkEvent = NetworkAuthRequired | NetworkBeforeRequestSent | NetworkFetchError | NetworkResponseCompleted | NetworkResponseStarted;
223export interface NetworkAuthChallenge {
224 scheme: string;
225 realm: string;
226}
227export interface NetworkBaseParameters {
228 context: BrowsingContextBrowsingContext | null;
229 isBlocked: boolean;
230 navigation: BrowsingContextNavigation | null;
231 redirectCount: JsUint;
232 request: NetworkRequestData;
233 timestamp: JsUint;
234 intercepts?: NetworkIntercept[];
235}
236export type NetworkBytesValue = NetworkStringValue | NetworkBase64Value;
237export interface NetworkStringValue {
238 type: 'string';
239 value: string;
240}
241export interface NetworkBase64Value {
242 type: 'base64';
243 value: string;
244}
245export type NetworkSameSite = 'strict' | 'lax' | 'none';
246export interface NetworkCookie extends Extensible {
247 name: string;
248 value: NetworkBytesValue;
249 domain: string;
250 path: string;
251 size: JsUint;
252 httpOnly: boolean;
253 secure: boolean;
254 sameSite: NetworkSameSite;
255 expiry?: JsUint;
256}
257export interface NetworkFetchTimingInfo {
258 timeOrigin: number;
259 requestTime: number;
260 redirectStart: number;
261 redirectEnd: number;
262 fetchStart: number;
263 dnsStart: number;
264 dnsEnd: number;
265 connectStart: number;
266 connectEnd: number;
267 tlsStart: number;
268 requestStart: number;
269 responseStart: number;
270 responseEnd: number;
271}
272export interface NetworkHeader {
273 name: string;
274 value: NetworkBytesValue;
275}
276export interface NetworkInitiator {
277 type: 'parser' | 'script' | 'preflight' | 'other';
278 columnNumber?: JsUint;
279 lineNumber?: JsUint;
280 stackTrace?: ScriptStackTrace;
281 request?: NetworkRequest;
282}
283export type NetworkIntercept = string;
284export type NetworkRequest = string;
285export interface NetworkRequestData {
286 request: NetworkRequest;
287 url: string;
288 method: string;
289 headers: NetworkHeader[];
290 cookies: NetworkCookie[];
291 headersSize: JsUint;
292 bodySize: JsUint | null;
293 timings: NetworkFetchTimingInfo;
294}
295export interface NetworkResponseContent {
296 size: JsUint;
297}
298export interface NetworkResponseData {
299 url: string;
300 protocol: string;
301 status: JsUint;
302 statusText: string;
303 fromCache: boolean;
304 headers: NetworkHeader[];
305 mimeType: string;
306 bytesReceived: JsUint;
307 headersSize: JsUint | null;
308 bodySize: JsUint | null;
309 content: NetworkResponseContent;
310 authChallenges?: NetworkAuthChallenge[];
311}
312export interface NetworkAddInterceptResult {
313 intercept: NetworkIntercept;
314}
315export interface NetworkAuthRequired {
316 method: 'network.authRequired';
317 params: NetworkAuthRequiredParameters;
318}
319export interface NetworkAuthRequiredParameters extends NetworkBaseParameters {
320 response: NetworkResponseData;
321}
322export interface NetworkBeforeRequestSent {
323 method: 'network.beforeRequestSent';
324 params: NetworkBeforeRequestSentParameters;
325}
326export interface NetworkBeforeRequestSentParameters extends NetworkBaseParameters {
327 initiator: NetworkInitiator;
328}
329export interface NetworkFetchError {
330 method: 'network.fetchError';
331 params: NetworkFetchErrorParameters;
332}
333export interface NetworkFetchErrorParameters extends NetworkBaseParameters {
334 errorText: string;
335}
336export interface NetworkResponseCompleted {
337 method: 'network.responseCompleted';
338 params: NetworkResponseCompletedParameters;
339}
340export interface NetworkResponseCompletedParameters extends NetworkBaseParameters {
341 response: NetworkResponseData;
342}
343export interface NetworkResponseStarted {
344 method: 'network.responseStarted';
345 params: NetworkResponseStartedParameters;
346}
347export interface NetworkResponseStartedParameters extends NetworkBaseParameters {
348 response: NetworkResponseData;
349}
350export type ScriptResult = ScriptAddPreloadScriptResult | ScriptEvaluateResult | ScriptGetRealmsResult;
351export type ScriptEvent = ScriptMessage | ScriptRealmCreated | ScriptRealmDestroyed;
352export type ScriptChannel = string;
353export interface ScriptChannelValue {
354 type: 'channel';
355 value: ScriptChannelProperties;
356}
357export interface ScriptChannelProperties {
358 channel: ScriptChannel;
359 serializationOptions?: ScriptSerializationOptions;
360 ownership?: ScriptResultOwnership;
361}
362export type ScriptEvaluateResult = ScriptEvaluateResultSuccess | ScriptEvaluateResultException;
363export interface ScriptEvaluateResultSuccess {
364 type: 'success';
365 result: ScriptRemoteValue;
366 realm: ScriptRealm;
367}
368export interface ScriptEvaluateResultException {
369 type: 'exception';
370 exceptionDetails: ScriptExceptionDetails;
371 realm: ScriptRealm;
372}
373export interface ScriptExceptionDetails {
374 columnNumber: JsUint;
375 exception: ScriptRemoteValue;
376 lineNumber: JsUint;
377 stackTrace: ScriptStackTrace;
378 text: string;
379}
380export type ScriptHandle = string;
381export type ScriptInternalId = string;
382export type ScriptLocalValue = ScriptRemoteReference | ScriptPrimitiveProtocolValue | ScriptChannelValue | ScriptArrayLocalValue | ScriptDateLocalValue | ScriptMapLocalValue | ScriptObjectLocalValue | ScriptRegExpLocalValue | ScriptSetLocalValue;
383export type ScriptListLocalValue = (ScriptLocalValue)[];
384export interface ScriptArrayLocalValue {
385 type: 'array';
386 value: ScriptListLocalValue;
387}
388export interface ScriptDateLocalValue {
389 type: 'date';
390 value: string;
391}
392export type ScriptMappingLocalValue = (ScriptLocalValue | ScriptLocalValue)[];
393export interface ScriptMapLocalValue {
394 type: 'map';
395 value: ScriptMappingLocalValue;
396}
397export interface ScriptObjectLocalValue {
398 type: 'object';
399 value: ScriptMappingLocalValue;
400}
401export interface ScriptRegExpValue {
402 pattern: string;
403 flags?: string;
404}
405export interface ScriptRegExpLocalValue {
406 type: 'regexp';
407 value: ScriptRegExpValue;
408}
409export interface ScriptSetLocalValue {
410 type: 'set';
411 value: ScriptListLocalValue;
412}
413export type ScriptPreloadScript = string;
414export type ScriptRealm = string;
415export type ScriptPrimitiveProtocolValue = ScriptUndefinedValue | ScriptNullValue | ScriptStringValue | ScriptNumberValue | ScriptBooleanValue | ScriptBigIntValue;
416export interface ScriptUndefinedValue {
417 type: 'undefined';
418}
419export interface ScriptNullValue {
420 type: null;
421}
422export interface ScriptStringValue {
423 type: 'string';
424 value: string;
425}
426export type ScriptSpecialNumber = 'NaN' | '-0' | 'Infinity' | '-Infinity';
427export interface ScriptNumberValue {
428 type: 'number';
429 value: number | ScriptSpecialNumber;
430}
431export interface ScriptBooleanValue {
432 type: 'boolean';
433 value: boolean;
434}
435export interface ScriptBigIntValue {
436 type: 'bigint';
437 value: string;
438}
439export type ScriptRealmInfo = ScriptWindowRealmInfo | ScriptDedicatedWorkerRealmInfo | ScriptSharedWorkerRealmInfo | ScriptServiceWorkerRealmInfo | ScriptWorkerRealmInfo | ScriptPaintWorkletRealmInfo | ScriptAudioWorkletRealmInfo | ScriptWorkletRealmInfo;
440export interface ScriptBaseRealmInfo {
441 realm: ScriptRealm;
442 origin: string;
443}
444export interface ScriptWindowRealmInfo extends ScriptBaseRealmInfo {
445 type: 'window';
446 context: BrowsingContextBrowsingContext;
447 sandbox?: string;
448}
449export interface ScriptDedicatedWorkerRealmInfo extends ScriptBaseRealmInfo {
450 type: 'dedicated-worker';
451 owners: ScriptRealm[];
452}
453export interface ScriptSharedWorkerRealmInfo extends ScriptBaseRealmInfo {
454 type: 'shared-worker';
455}
456export interface ScriptServiceWorkerRealmInfo extends ScriptBaseRealmInfo {
457 type: 'service-worker';
458}
459export interface ScriptWorkerRealmInfo extends ScriptBaseRealmInfo {
460 type: 'worker';
461}
462export interface ScriptPaintWorkletRealmInfo extends ScriptBaseRealmInfo {
463 type: 'paint-worklet';
464}
465export interface ScriptAudioWorkletRealmInfo extends ScriptBaseRealmInfo {
466 type: 'audio-worklet';
467}
468export interface ScriptWorkletRealmInfo extends ScriptBaseRealmInfo {
469 type: 'worklet';
470}
471export type ScriptRealmType = 'window' | 'dedicated-worker' | 'shared-worker' | 'service-worker' | 'worker' | 'paint-worklet' | 'audio-worklet' | 'worklet';
472export type ScriptRemoteReference = ScriptSharedReference | ScriptRemoteObjectReference;
473export interface ScriptSharedReference extends Extensible {
474 sharedId: ScriptSharedId;
475 handle?: ScriptHandle;
476}
477export interface ScriptRemoteObjectReference extends Extensible {
478 handle: ScriptHandle;
479 sharedId?: ScriptSharedId;
480}
481export type ScriptRemoteValue = ScriptPrimitiveProtocolValue | ScriptSymbolRemoteValue | ScriptArrayRemoteValue | ScriptObjectRemoteValue | ScriptFunctionRemoteValue | ScriptRegExpRemoteValue | ScriptDateRemoteValue | ScriptMapRemoteValue | ScriptSetRemoteValue | ScriptWeakMapRemoteValue | ScriptWeakSetRemoteValue | ScriptGeneratorRemoteValue | ScriptErrorRemoteValue | ScriptProxyRemoteValue | ScriptPromiseRemoteValue | ScriptTypedArrayRemoteValue | ScriptArrayBufferRemoteValue | ScriptNodeListRemoteValue | ScriptHtmlCollectionRemoteValue | ScriptNodeRemoteValue | ScriptWindowProxyRemoteValue;
482export type ScriptListRemoteValue = (ScriptRemoteValue)[];
483export type ScriptMappingRemoteValue = (ScriptRemoteValue | ScriptRemoteValue)[];
484export interface ScriptSymbolRemoteValue {
485 type: 'symbol';
486 handle?: ScriptHandle;
487 internalId?: ScriptInternalId;
488}
489export interface ScriptArrayRemoteValue {
490 type: 'array';
491 handle?: ScriptHandle;
492 internalId?: ScriptInternalId;
493 value?: ScriptListRemoteValue;
494}
495export interface ScriptObjectRemoteValue {
496 type: 'object';
497 handle?: ScriptHandle;
498 internalId?: ScriptInternalId;
499 value?: ScriptMappingRemoteValue;
500}
501export interface ScriptFunctionRemoteValue {
502 type: 'function';
503 handle?: ScriptHandle;
504 internalId?: ScriptInternalId;
505}
506export interface ScriptRegExpRemoteValue extends ScriptRegExpLocalValue {
507 handle?: ScriptHandle;
508 internalId?: ScriptInternalId;
509}
510export interface ScriptDateRemoteValue extends ScriptDateLocalValue {
511 handle?: ScriptHandle;
512 internalId?: ScriptInternalId;
513}
514export interface ScriptMapRemoteValue {
515 type: 'map';
516 handle?: ScriptHandle;
517 internalId?: ScriptInternalId;
518 value?: ScriptMappingRemoteValue;
519}
520export interface ScriptSetRemoteValue {
521 type: 'set';
522 handle?: ScriptHandle;
523 internalId?: ScriptInternalId;
524 value?: ScriptListRemoteValue;
525}
526export interface ScriptWeakMapRemoteValue {
527 type: 'weakmap';
528 handle?: ScriptHandle;
529 internalId?: ScriptInternalId;
530}
531export interface ScriptWeakSetRemoteValue {
532 type: 'weakset';
533 handle?: ScriptHandle;
534 internalId?: ScriptInternalId;
535}
536export interface ScriptGeneratorRemoteValue {
537 type: 'generator';
538 handle?: ScriptHandle;
539 internalId?: ScriptInternalId;
540}
541export interface ScriptErrorRemoteValue {
542 type: 'error';
543 handle?: ScriptHandle;
544 internalId?: ScriptInternalId;
545}
546export interface ScriptProxyRemoteValue {
547 type: 'proxy';
548 handle?: ScriptHandle;
549 internalId?: ScriptInternalId;
550}
551export interface ScriptPromiseRemoteValue {
552 type: 'promise';
553 handle?: ScriptHandle;
554 internalId?: ScriptInternalId;
555}
556export interface ScriptTypedArrayRemoteValue {
557 type: 'typedarray';
558 handle?: ScriptHandle;
559 internalId?: ScriptInternalId;
560}
561export interface ScriptArrayBufferRemoteValue {
562 type: 'arraybuffer';
563 handle?: ScriptHandle;
564 internalId?: ScriptInternalId;
565}
566export interface ScriptNodeListRemoteValue {
567 type: 'nodelist';
568 handle?: ScriptHandle;
569 internalId?: ScriptInternalId;
570 value?: ScriptListRemoteValue;
571}
572export interface ScriptHtmlCollectionRemoteValue {
573 type: 'htmlcollection';
574 handle?: ScriptHandle;
575 internalId?: ScriptInternalId;
576 value?: ScriptListRemoteValue;
577}
578export interface ScriptNodeRemoteValue {
579 type: 'node';
580 sharedId?: ScriptSharedId;
581 handle?: ScriptHandle;
582 internalId?: ScriptInternalId;
583 value?: ScriptNodeProperties;
584}
585export interface ScriptNodeProperties {
586 nodeType: JsUint;
587 childNodeCount: JsUint;
588 attributes?: Record<string, string>;
589 children?: ScriptNodeRemoteValue[];
590 localName?: string;
591 mode?: 'open' | 'closed';
592 namespaceUri?: string;
593 nodeValue?: string;
594 shadowRoot?: ScriptNodeRemoteValue | null;
595}
596export interface ScriptWindowProxyRemoteValue {
597 type: 'window';
598 value: ScriptWindowProxyProperties;
599 handle?: ScriptHandle;
600 internalId?: ScriptInternalId;
601}
602export interface ScriptWindowProxyProperties {
603 context: BrowsingContextBrowsingContext;
604}
605export type ScriptResultOwnership = 'root' | 'none';
606export interface ScriptSerializationOptions {
607 maxDomDepth?: JsUint | null;
608 /**
609 * @default null
610 */
611 maxObjectDepth?: JsUint | null;
612 /**
613 * @default 'none'
614 */
615 includeShadowTree?: 'none' | 'open' | 'all';
616}
617export type ScriptSharedId = string;
618export interface ScriptStackFrame {
619 columnNumber: JsUint;
620 functionName: string;
621 lineNumber: JsUint;
622 url: string;
623}
624export interface ScriptStackTrace {
625 callFrames: ScriptStackFrame[];
626}
627export interface ScriptSource {
628 realm: ScriptRealm;
629 context?: BrowsingContextBrowsingContext;
630}
631export interface ScriptAddPreloadScriptResult {
632 script: ScriptPreloadScript;
633}
634export interface ScriptGetRealmsResult {
635 realms: ScriptRealmInfo[];
636}
637export interface ScriptMessage {
638 method: 'script.message';
639 params: ScriptMessageParameters;
640}
641export interface ScriptMessageParameters {
642 channel: ScriptChannel;
643 data: ScriptRemoteValue;
644 source: ScriptSource;
645}
646export interface ScriptRealmCreated {
647 method: 'script.realmCreated';
648 params: ScriptRealmInfo;
649}
650export interface ScriptRealmDestroyed {
651 method: 'script.realmDestroyed';
652 params: ScriptRealmDestroyedParameters;
653}
654export interface ScriptRealmDestroyedParameters {
655 realm: ScriptRealm;
656}
657export type StorageResult = StorageDeleteCookiesResult | StorageGetCookiesResult | StorageSetCookieResult;
658export interface StoragePartitionKey extends Extensible {
659 userContext?: string;
660 sourceOrigin?: string;
661}
662export interface StorageGetCookiesResult {
663 cookies: NetworkCookie[];
664 partitionKey: StoragePartitionKey;
665}
666export interface StorageSetCookieResult {
667 partitionKey: StoragePartitionKey;
668}
669export interface StorageDeleteCookiesResult {
670 partitionKey: StoragePartitionKey;
671}
672export interface LogEvent extends LogEntryAdded {
673}
674export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
675export type LogEntry = LogGenericLogEntry | LogConsoleLogEntry | LogJavascriptLogEntry;
676export interface LogBaseLogEntry {
677 level: LogLevel;
678 source: ScriptSource;
679 text: string | null;
680 timestamp: JsUint;
681 stackTrace?: ScriptStackTrace;
682}
683export interface LogGenericLogEntry extends LogBaseLogEntry {
684 type: string;
685}
686export interface LogConsoleLogEntry extends LogBaseLogEntry {
687 type: 'console';
688 method: string;
689 args: ScriptRemoteValue[];
690}
691export interface LogJavascriptLogEntry extends LogBaseLogEntry {
692 type: 'javascript';
693}
694export interface LogEntryAdded {
695 method: 'log.entryAdded';
696 params: LogEntry;
697}
698//# sourceMappingURL=localTypes.d.ts.map
\No newline at end of file