cddl2py 0.0.1 → 0.1.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/LICENSE +21 -0
- package/README.md +136 -0
- package/bin/cddl2py.js +0 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +246 -30
- package/package.json +12 -8
- package/.release-it.ts +0 -11
- package/src/cli.ts +0 -42
- package/src/constants.ts +0 -32
- package/src/index.ts +0 -658
- package/src/utils.ts +0 -12
- package/tests/__snapshots__/complex_types.test.ts.snap +0 -81
- package/tests/__snapshots__/group_choice.test.ts.snap +0 -127
- package/tests/__snapshots__/literals.test.ts.snap +0 -15
- package/tests/__snapshots__/mixin_union.test.ts.snap +0 -65
- package/tests/__snapshots__/mod.test.ts.snap +0 -145
- package/tests/__snapshots__/named_group_choice.test.ts.snap +0 -37
- package/tests/__snapshots__/transform.test.ts.snap +0 -137
- package/tests/__snapshots__/webdriver_local.test.ts.snap +0 -921
- package/tests/__snapshots__/webdriver_remote.test.ts.snap +0 -1249
- package/tests/complex_types.test.ts +0 -92
- package/tests/group_choice.test.ts +0 -88
- package/tests/literals.test.ts +0 -63
- package/tests/mixin_union.test.ts +0 -80
- package/tests/mod.test.ts +0 -106
- package/tests/named_group_choice.test.ts +0 -82
- package/tests/transform.test.ts +0 -149
- package/tests/transform_edge_cases.test.ts +0 -265
- package/tests/unknown.test.ts +0 -72
- package/tests/webdriver_local.test.ts +0 -64
- package/tests/webdriver_remote.test.ts +0 -64
- package/tsconfig.json +0 -11
|
@@ -1,921 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`webdriver local spec > should generate Python types for webdriver local spec 1`] = `
|
|
4
|
-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
|
|
5
|
-
|
|
6
|
-
from __future__ import annotations
|
|
7
|
-
|
|
8
|
-
from typing import Any, Literal, Union
|
|
9
|
-
from typing_extensions import NotRequired, TypedDict
|
|
10
|
-
|
|
11
|
-
Message = Union[CommandResponse, ErrorResponse, Event]
|
|
12
|
-
|
|
13
|
-
class CommandResponse(Extensible):
|
|
14
|
-
type: Literal["success"]
|
|
15
|
-
id: JsUint
|
|
16
|
-
result: ResultData
|
|
17
|
-
|
|
18
|
-
class ErrorResponse(Extensible):
|
|
19
|
-
type: Literal["error"]
|
|
20
|
-
id: Union[JsUint, None]
|
|
21
|
-
error: ErrorCode
|
|
22
|
-
message: str
|
|
23
|
-
stacktrace: NotRequired[str]
|
|
24
|
-
|
|
25
|
-
ResultData = Union[BrowserResult, BrowsingContextResult, EmulationResult, InputResult, NetworkResult, ScriptResult, SessionResult, StorageResult, WebExtensionResult]
|
|
26
|
-
|
|
27
|
-
class EmptyResult(Extensible):
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
class Event(EventData, Extensible):
|
|
31
|
-
type: Literal["event"]
|
|
32
|
-
|
|
33
|
-
EventData = Union[BrowsingContextEvent, InputEvent, LogEvent, NetworkEvent, ScriptEvent]
|
|
34
|
-
|
|
35
|
-
Extensible = dict[str, Any]
|
|
36
|
-
|
|
37
|
-
JsInt = int
|
|
38
|
-
|
|
39
|
-
JsUint = int
|
|
40
|
-
|
|
41
|
-
ErrorCode = Union[Literal["invalid argument"], Literal["invalid selector"], Literal["invalid session id"], Literal["invalid web extension"], Literal["move target out of bounds"], Literal["no such alert"], Literal["no such network collector"], Literal["no such element"], Literal["no such frame"], Literal["no such handle"], Literal["no such history entry"], Literal["no such intercept"], Literal["no such network data"], Literal["no such node"], Literal["no such request"], Literal["no such script"], Literal["no such storage partition"], Literal["no such user context"], Literal["no such web extension"], Literal["session not created"], Literal["unable to capture screen"], Literal["unable to close browser"], Literal["unable to set cookie"], Literal["unable to set file input"], Literal["unavailable network data"], Literal["underspecified storage partition"], Literal["unknown command"], Literal["unknown error"], Literal["unsupported operation"]]
|
|
42
|
-
|
|
43
|
-
SessionResult = Union[SessionEndResult, SessionNewResult, SessionStatusResult, SessionSubscribeResult, SessionUnsubscribeResult]
|
|
44
|
-
|
|
45
|
-
class SessionCapabilitiesRequest(TypedDict):
|
|
46
|
-
always_match: NotRequired[SessionCapabilityRequest]
|
|
47
|
-
first_match: NotRequired[list[SessionCapabilityRequest]]
|
|
48
|
-
|
|
49
|
-
class SessionCapabilityRequest(Extensible):
|
|
50
|
-
accept_insecure_certs: NotRequired[bool]
|
|
51
|
-
browser_name: NotRequired[str]
|
|
52
|
-
browser_version: NotRequired[str]
|
|
53
|
-
platform_name: NotRequired[str]
|
|
54
|
-
proxy: NotRequired[SessionProxyConfiguration]
|
|
55
|
-
unhandled_prompt_behavior: NotRequired[SessionUserPromptHandler]
|
|
56
|
-
|
|
57
|
-
SessionProxyConfiguration = Union[SessionAutodetectProxyConfiguration, SessionDirectProxyConfiguration, SessionManualProxyConfiguration, SessionPacProxyConfiguration, SessionSystemProxyConfiguration]
|
|
58
|
-
|
|
59
|
-
class SessionAutodetectProxyConfiguration(Extensible):
|
|
60
|
-
proxy_type: Literal["autodetect"]
|
|
61
|
-
|
|
62
|
-
class SessionDirectProxyConfiguration(Extensible):
|
|
63
|
-
proxy_type: Literal["direct"]
|
|
64
|
-
|
|
65
|
-
class SessionManualProxyConfiguration(SessionSocksProxyConfiguration, Extensible):
|
|
66
|
-
proxy_type: Literal["manual"]
|
|
67
|
-
http_proxy: NotRequired[str]
|
|
68
|
-
ssl_proxy: NotRequired[str]
|
|
69
|
-
no_proxy: NotRequired[list[str]]
|
|
70
|
-
|
|
71
|
-
class SessionSocksProxyConfiguration(TypedDict):
|
|
72
|
-
socks_proxy: str
|
|
73
|
-
socks_version: int
|
|
74
|
-
|
|
75
|
-
class SessionPacProxyConfiguration(Extensible):
|
|
76
|
-
proxy_type: Literal["pac"]
|
|
77
|
-
proxy_autoconfig_url: str
|
|
78
|
-
|
|
79
|
-
class SessionSystemProxyConfiguration(Extensible):
|
|
80
|
-
proxy_type: Literal["system"]
|
|
81
|
-
|
|
82
|
-
class SessionUserPromptHandler(TypedDict):
|
|
83
|
-
alert: NotRequired[SessionUserPromptHandlerType]
|
|
84
|
-
before_unload: NotRequired[SessionUserPromptHandlerType]
|
|
85
|
-
confirm: NotRequired[SessionUserPromptHandlerType]
|
|
86
|
-
default: NotRequired[SessionUserPromptHandlerType]
|
|
87
|
-
file: NotRequired[SessionUserPromptHandlerType]
|
|
88
|
-
prompt: NotRequired[SessionUserPromptHandlerType]
|
|
89
|
-
|
|
90
|
-
SessionUserPromptHandlerType = Union[Literal["accept"], Literal["dismiss"], Literal["ignore"]]
|
|
91
|
-
|
|
92
|
-
SessionSubscription = str
|
|
93
|
-
|
|
94
|
-
class SessionStatusResult(TypedDict):
|
|
95
|
-
ready: bool
|
|
96
|
-
message: str
|
|
97
|
-
|
|
98
|
-
class SessionNewResult(TypedDict):
|
|
99
|
-
session_id: str
|
|
100
|
-
capabilities: dict[str, Any]
|
|
101
|
-
|
|
102
|
-
SessionEndResult = EmptyResult
|
|
103
|
-
|
|
104
|
-
class SessionSubscribeResult(TypedDict):
|
|
105
|
-
subscription: SessionSubscription
|
|
106
|
-
|
|
107
|
-
SessionUnsubscribeResult = EmptyResult
|
|
108
|
-
|
|
109
|
-
BrowserResult = Union[BrowserCloseResult, BrowserCreateUserContextResult, BrowserGetClientWindowsResult, BrowserGetUserContextsResult, BrowserRemoveUserContextResult, BrowserSetClientWindowStateResult, BrowserSetDownloadBehaviorResult]
|
|
110
|
-
|
|
111
|
-
BrowserClientWindow = str
|
|
112
|
-
|
|
113
|
-
class BrowserClientWindowInfo(TypedDict):
|
|
114
|
-
active: bool
|
|
115
|
-
client_window: BrowserClientWindow
|
|
116
|
-
height: JsUint
|
|
117
|
-
state: Union[Literal["fullscreen"], Literal["maximized"], Literal["minimized"], Literal["normal"]]
|
|
118
|
-
width: JsUint
|
|
119
|
-
x: JsInt
|
|
120
|
-
y: JsInt
|
|
121
|
-
|
|
122
|
-
BrowserUserContext = str
|
|
123
|
-
|
|
124
|
-
class BrowserUserContextInfo(TypedDict):
|
|
125
|
-
user_context: BrowserUserContext
|
|
126
|
-
|
|
127
|
-
BrowserCloseResult = EmptyResult
|
|
128
|
-
|
|
129
|
-
BrowserCreateUserContextResult = BrowserUserContextInfo
|
|
130
|
-
|
|
131
|
-
class BrowserGetClientWindowsResult(TypedDict):
|
|
132
|
-
client_windows: list[BrowserClientWindowInfo]
|
|
133
|
-
|
|
134
|
-
class BrowserGetUserContextsResult(TypedDict):
|
|
135
|
-
user_contexts: list[BrowserUserContextInfo]
|
|
136
|
-
|
|
137
|
-
BrowserRemoveUserContextResult = EmptyResult
|
|
138
|
-
|
|
139
|
-
BrowserSetClientWindowStateResult = BrowserClientWindowInfo
|
|
140
|
-
|
|
141
|
-
BrowserSetDownloadBehaviorResult = EmptyResult
|
|
142
|
-
|
|
143
|
-
BrowsingContextResult = Union[BrowsingContextActivateResult, BrowsingContextCaptureScreenshotResult, BrowsingContextCloseResult, BrowsingContextCreateResult, BrowsingContextGetTreeResult, BrowsingContextHandleUserPromptResult, BrowsingContextLocateNodesResult, BrowsingContextNavigateResult, BrowsingContextPrintResult, BrowsingContextReloadResult, BrowsingContextSetBypassCspResult, BrowsingContextSetViewportResult, BrowsingContextTraverseHistoryResult]
|
|
144
|
-
|
|
145
|
-
BrowsingContextEvent = Union[BrowsingContextContextCreated, BrowsingContextContextDestroyed, BrowsingContextDomContentLoaded, BrowsingContextDownloadEnd, BrowsingContextDownloadWillBegin, BrowsingContextFragmentNavigated, BrowsingContextHistoryUpdated, BrowsingContextLoad, BrowsingContextNavigationAborted, BrowsingContextNavigationCommitted, BrowsingContextNavigationFailed, BrowsingContextNavigationStarted, BrowsingContextUserPromptClosed, BrowsingContextUserPromptOpened]
|
|
146
|
-
|
|
147
|
-
BrowsingContextBrowsingContext = str
|
|
148
|
-
|
|
149
|
-
BrowsingContextInfoList = list[BrowsingContextInfo]
|
|
150
|
-
|
|
151
|
-
class BrowsingContextInfo(TypedDict):
|
|
152
|
-
children: Union[BrowsingContextInfoList, None]
|
|
153
|
-
client_window: BrowserClientWindow
|
|
154
|
-
context: BrowsingContextBrowsingContext
|
|
155
|
-
original_opener: Union[BrowsingContextBrowsingContext, None]
|
|
156
|
-
url: str
|
|
157
|
-
user_context: BrowserUserContext
|
|
158
|
-
parent: NotRequired[Union[BrowsingContextBrowsingContext, None]]
|
|
159
|
-
|
|
160
|
-
BrowsingContextLocator = Union[BrowsingContextAccessibilityLocator, BrowsingContextCssLocator, BrowsingContextContextLocator, BrowsingContextInnerTextLocator, BrowsingContextXPathLocator]
|
|
161
|
-
|
|
162
|
-
class BrowsingContextAccessibilityLocator(TypedDict):
|
|
163
|
-
type: Literal["accessibility"]
|
|
164
|
-
value: dict[str, Any]
|
|
165
|
-
|
|
166
|
-
class BrowsingContextCssLocator(TypedDict):
|
|
167
|
-
type: Literal["css"]
|
|
168
|
-
value: str
|
|
169
|
-
|
|
170
|
-
class BrowsingContextContextLocator(TypedDict):
|
|
171
|
-
type: Literal["context"]
|
|
172
|
-
value: dict[str, Any]
|
|
173
|
-
|
|
174
|
-
class BrowsingContextInnerTextLocator(TypedDict):
|
|
175
|
-
type: Literal["innerText"]
|
|
176
|
-
value: str
|
|
177
|
-
ignore_case: NotRequired[bool]
|
|
178
|
-
match_type: NotRequired[Union[Literal["full"], Literal["partial"]]]
|
|
179
|
-
max_depth: NotRequired[JsUint]
|
|
180
|
-
|
|
181
|
-
class BrowsingContextXPathLocator(TypedDict):
|
|
182
|
-
type: Literal["xpath"]
|
|
183
|
-
value: str
|
|
184
|
-
|
|
185
|
-
BrowsingContextNavigation = str
|
|
186
|
-
|
|
187
|
-
class BrowsingContextBaseNavigationInfo(TypedDict):
|
|
188
|
-
context: BrowsingContextBrowsingContext
|
|
189
|
-
navigation: Union[BrowsingContextNavigation, None]
|
|
190
|
-
timestamp: JsUint
|
|
191
|
-
url: str
|
|
192
|
-
user_context: NotRequired[BrowserUserContext]
|
|
193
|
-
|
|
194
|
-
class BrowsingContextNavigationInfo(BrowsingContextBaseNavigationInfo):
|
|
195
|
-
pass
|
|
196
|
-
|
|
197
|
-
BrowsingContextUserPromptType = Union[Literal["alert"], Literal["beforeunload"], Literal["confirm"], Literal["prompt"]]
|
|
198
|
-
|
|
199
|
-
BrowsingContextActivateResult = EmptyResult
|
|
200
|
-
|
|
201
|
-
class BrowsingContextCaptureScreenshotResult(TypedDict):
|
|
202
|
-
data: str
|
|
203
|
-
|
|
204
|
-
BrowsingContextCloseResult = EmptyResult
|
|
205
|
-
|
|
206
|
-
class BrowsingContextCreateResult(TypedDict):
|
|
207
|
-
context: BrowsingContextBrowsingContext
|
|
208
|
-
user_context: NotRequired[BrowserUserContext]
|
|
209
|
-
|
|
210
|
-
class BrowsingContextGetTreeResult(TypedDict):
|
|
211
|
-
contexts: BrowsingContextInfoList
|
|
212
|
-
|
|
213
|
-
BrowsingContextHandleUserPromptResult = EmptyResult
|
|
214
|
-
|
|
215
|
-
class BrowsingContextLocateNodesResult(TypedDict):
|
|
216
|
-
nodes: list[ScriptNodeRemoteValue]
|
|
217
|
-
|
|
218
|
-
class BrowsingContextNavigateResult(TypedDict):
|
|
219
|
-
navigation: Union[BrowsingContextNavigation, None]
|
|
220
|
-
url: str
|
|
221
|
-
|
|
222
|
-
class BrowsingContextPrintResult(TypedDict):
|
|
223
|
-
data: str
|
|
224
|
-
|
|
225
|
-
BrowsingContextReloadResult = BrowsingContextNavigateResult
|
|
226
|
-
|
|
227
|
-
BrowsingContextSetBypassCspResult = EmptyResult
|
|
228
|
-
|
|
229
|
-
BrowsingContextSetViewportResult = EmptyResult
|
|
230
|
-
|
|
231
|
-
BrowsingContextTraverseHistoryResult = EmptyResult
|
|
232
|
-
|
|
233
|
-
class BrowsingContextContextCreated(TypedDict):
|
|
234
|
-
method: Literal["browsingContext.contextCreated"]
|
|
235
|
-
params: BrowsingContextInfo
|
|
236
|
-
|
|
237
|
-
class BrowsingContextContextDestroyed(TypedDict):
|
|
238
|
-
method: Literal["browsingContext.contextDestroyed"]
|
|
239
|
-
params: BrowsingContextInfo
|
|
240
|
-
|
|
241
|
-
class BrowsingContextNavigationStarted(TypedDict):
|
|
242
|
-
method: Literal["browsingContext.navigationStarted"]
|
|
243
|
-
params: BrowsingContextNavigationInfo
|
|
244
|
-
|
|
245
|
-
class BrowsingContextFragmentNavigated(TypedDict):
|
|
246
|
-
method: Literal["browsingContext.fragmentNavigated"]
|
|
247
|
-
params: BrowsingContextNavigationInfo
|
|
248
|
-
|
|
249
|
-
class BrowsingContextHistoryUpdated(TypedDict):
|
|
250
|
-
method: Literal["browsingContext.historyUpdated"]
|
|
251
|
-
params: BrowsingContextHistoryUpdatedParameters
|
|
252
|
-
|
|
253
|
-
class BrowsingContextHistoryUpdatedParameters(TypedDict):
|
|
254
|
-
context: BrowsingContextBrowsingContext
|
|
255
|
-
timestamp: JsUint
|
|
256
|
-
url: str
|
|
257
|
-
user_context: NotRequired[BrowserUserContext]
|
|
258
|
-
|
|
259
|
-
class BrowsingContextDomContentLoaded(TypedDict):
|
|
260
|
-
method: Literal["browsingContext.domContentLoaded"]
|
|
261
|
-
params: BrowsingContextNavigationInfo
|
|
262
|
-
|
|
263
|
-
class BrowsingContextLoad(TypedDict):
|
|
264
|
-
method: Literal["browsingContext.load"]
|
|
265
|
-
params: BrowsingContextNavigationInfo
|
|
266
|
-
|
|
267
|
-
class BrowsingContextDownloadWillBegin(TypedDict):
|
|
268
|
-
method: Literal["browsingContext.downloadWillBegin"]
|
|
269
|
-
params: BrowsingContextDownloadWillBeginParams
|
|
270
|
-
|
|
271
|
-
class BrowsingContextDownloadWillBeginParams(BrowsingContextBaseNavigationInfo):
|
|
272
|
-
suggested_filename: str
|
|
273
|
-
|
|
274
|
-
class BrowsingContextDownloadEnd(TypedDict):
|
|
275
|
-
method: Literal["browsingContext.downloadEnd"]
|
|
276
|
-
params: BrowsingContextDownloadEndParams
|
|
277
|
-
|
|
278
|
-
class BrowsingContextDownloadEndParams(BrowsingContextDownloadCompleteParams):
|
|
279
|
-
pass
|
|
280
|
-
|
|
281
|
-
class BrowsingContextDownloadCanceledParams(BrowsingContextBaseNavigationInfo):
|
|
282
|
-
status: Literal["canceled"]
|
|
283
|
-
|
|
284
|
-
class BrowsingContextDownloadCompleteParams(BrowsingContextBaseNavigationInfo):
|
|
285
|
-
status: Literal["complete"]
|
|
286
|
-
filepath: Union[str, None]
|
|
287
|
-
|
|
288
|
-
class BrowsingContextNavigationAborted(TypedDict):
|
|
289
|
-
method: Literal["browsingContext.navigationAborted"]
|
|
290
|
-
params: BrowsingContextNavigationInfo
|
|
291
|
-
|
|
292
|
-
class BrowsingContextNavigationCommitted(TypedDict):
|
|
293
|
-
method: Literal["browsingContext.navigationCommitted"]
|
|
294
|
-
params: BrowsingContextNavigationInfo
|
|
295
|
-
|
|
296
|
-
class BrowsingContextNavigationFailed(TypedDict):
|
|
297
|
-
method: Literal["browsingContext.navigationFailed"]
|
|
298
|
-
params: BrowsingContextNavigationInfo
|
|
299
|
-
|
|
300
|
-
class BrowsingContextUserPromptClosed(TypedDict):
|
|
301
|
-
method: Literal["browsingContext.userPromptClosed"]
|
|
302
|
-
params: BrowsingContextUserPromptClosedParameters
|
|
303
|
-
|
|
304
|
-
class BrowsingContextUserPromptClosedParameters(TypedDict):
|
|
305
|
-
context: BrowsingContextBrowsingContext
|
|
306
|
-
accepted: bool
|
|
307
|
-
type: BrowsingContextUserPromptType
|
|
308
|
-
user_context: NotRequired[BrowserUserContext]
|
|
309
|
-
user_text: NotRequired[str]
|
|
310
|
-
|
|
311
|
-
class BrowsingContextUserPromptOpened(TypedDict):
|
|
312
|
-
method: Literal["browsingContext.userPromptOpened"]
|
|
313
|
-
params: BrowsingContextUserPromptOpenedParameters
|
|
314
|
-
|
|
315
|
-
class BrowsingContextUserPromptOpenedParameters(TypedDict):
|
|
316
|
-
context: BrowsingContextBrowsingContext
|
|
317
|
-
handler: SessionUserPromptHandlerType
|
|
318
|
-
message: str
|
|
319
|
-
type: BrowsingContextUserPromptType
|
|
320
|
-
user_context: NotRequired[BrowserUserContext]
|
|
321
|
-
default_value: NotRequired[str]
|
|
322
|
-
|
|
323
|
-
EmulationResult = Union[EmulationSetForcedColorsModeThemeOverrideResult, EmulationSetGeolocationOverrideResult, EmulationSetLocaleOverrideResult, EmulationSetScreenOrientationOverrideResult, EmulationSetScriptingEnabledResult, EmulationSetScrollbarTypeOverrideResult, EmulationSetTimezoneOverrideResult, EmulationSetTouchOverrideResult, EmulationSetUserAgentOverrideResult]
|
|
324
|
-
|
|
325
|
-
EmulationSetForcedColorsModeThemeOverrideResult = EmptyResult
|
|
326
|
-
|
|
327
|
-
EmulationSetGeolocationOverrideResult = EmptyResult
|
|
328
|
-
|
|
329
|
-
EmulationSetLocaleOverrideResult = EmptyResult
|
|
330
|
-
|
|
331
|
-
EmulationSetNetworkConditionsResult = EmptyResult
|
|
332
|
-
|
|
333
|
-
EmulationSetScreenSettingsOverrideResult = EmptyResult
|
|
334
|
-
|
|
335
|
-
EmulationSetScreenOrientationOverrideResult = EmptyResult
|
|
336
|
-
|
|
337
|
-
EmulationSetUserAgentOverrideResult = EmptyResult
|
|
338
|
-
|
|
339
|
-
EmulationSetScriptingEnabledResult = EmptyResult
|
|
340
|
-
|
|
341
|
-
EmulationSetScrollbarTypeOverrideResult = EmptyResult
|
|
342
|
-
|
|
343
|
-
EmulationSetTimezoneOverrideResult = EmptyResult
|
|
344
|
-
|
|
345
|
-
EmulationSetTouchOverrideResult = EmptyResult
|
|
346
|
-
|
|
347
|
-
NetworkResult = Union[NetworkAddDataCollectorResult, NetworkAddInterceptResult, NetworkContinueRequestResult, NetworkContinueResponseResult, NetworkContinueWithAuthResult, NetworkDisownDataResult, NetworkFailRequestResult, NetworkGetDataResult, NetworkProvideResponseResult, NetworkRemoveDataCollectorResult, NetworkRemoveInterceptResult, NetworkSetCacheBehaviorResult, NetworkSetExtraHeadersResult]
|
|
348
|
-
|
|
349
|
-
NetworkEvent = Union[NetworkAuthRequired, NetworkBeforeRequestSent, NetworkFetchError, NetworkResponseCompleted, NetworkResponseStarted]
|
|
350
|
-
|
|
351
|
-
class NetworkAuthChallenge(TypedDict):
|
|
352
|
-
scheme: str
|
|
353
|
-
realm: str
|
|
354
|
-
|
|
355
|
-
class NetworkBaseParameters(TypedDict):
|
|
356
|
-
context: Union[BrowsingContextBrowsingContext, None]
|
|
357
|
-
is_blocked: bool
|
|
358
|
-
navigation: Union[BrowsingContextNavigation, None]
|
|
359
|
-
redirect_count: JsUint
|
|
360
|
-
request: NetworkRequestData
|
|
361
|
-
timestamp: JsUint
|
|
362
|
-
user_context: NotRequired[Union[BrowserUserContext, None]]
|
|
363
|
-
intercepts: NotRequired[list[NetworkIntercept]]
|
|
364
|
-
|
|
365
|
-
NetworkBytesValue = Union[NetworkStringValue, NetworkBase64Value]
|
|
366
|
-
|
|
367
|
-
class NetworkStringValue(TypedDict):
|
|
368
|
-
type: Literal["string"]
|
|
369
|
-
value: str
|
|
370
|
-
|
|
371
|
-
class NetworkBase64Value(TypedDict):
|
|
372
|
-
type: Literal["base64"]
|
|
373
|
-
value: str
|
|
374
|
-
|
|
375
|
-
NetworkCollector = str
|
|
376
|
-
|
|
377
|
-
NetworkCollectorType = Literal["blob"]
|
|
378
|
-
|
|
379
|
-
NetworkSameSite = Union[Literal["strict"], Literal["lax"], Literal["none"], Literal["default"]]
|
|
380
|
-
|
|
381
|
-
class NetworkCookie(Extensible):
|
|
382
|
-
name: str
|
|
383
|
-
value: NetworkBytesValue
|
|
384
|
-
domain: str
|
|
385
|
-
path: str
|
|
386
|
-
size: JsUint
|
|
387
|
-
http_only: bool
|
|
388
|
-
secure: bool
|
|
389
|
-
same_site: NetworkSameSite
|
|
390
|
-
expiry: NotRequired[JsUint]
|
|
391
|
-
|
|
392
|
-
NetworkDataType = Union[Literal["request"], Literal["response"]]
|
|
393
|
-
|
|
394
|
-
class NetworkFetchTimingInfo(TypedDict):
|
|
395
|
-
time_origin: float
|
|
396
|
-
request_time: float
|
|
397
|
-
redirect_start: float
|
|
398
|
-
redirect_end: float
|
|
399
|
-
fetch_start: float
|
|
400
|
-
dns_start: float
|
|
401
|
-
dns_end: float
|
|
402
|
-
connect_start: float
|
|
403
|
-
connect_end: float
|
|
404
|
-
tls_start: float
|
|
405
|
-
request_start: float
|
|
406
|
-
response_start: float
|
|
407
|
-
response_end: float
|
|
408
|
-
|
|
409
|
-
class NetworkHeader(TypedDict):
|
|
410
|
-
name: str
|
|
411
|
-
value: NetworkBytesValue
|
|
412
|
-
|
|
413
|
-
class NetworkInitiator(TypedDict):
|
|
414
|
-
column_number: NotRequired[JsUint]
|
|
415
|
-
line_number: NotRequired[JsUint]
|
|
416
|
-
request: NotRequired[NetworkRequest]
|
|
417
|
-
stack_trace: NotRequired[ScriptStackTrace]
|
|
418
|
-
type: NotRequired[Union[Literal["parser"], Literal["script"], Literal["preflight"], Literal["other"]]]
|
|
419
|
-
|
|
420
|
-
NetworkIntercept = str
|
|
421
|
-
|
|
422
|
-
NetworkRequest = str
|
|
423
|
-
|
|
424
|
-
class NetworkRequestData(TypedDict):
|
|
425
|
-
request: NetworkRequest
|
|
426
|
-
url: str
|
|
427
|
-
method: str
|
|
428
|
-
headers: list[NetworkHeader]
|
|
429
|
-
cookies: list[NetworkCookie]
|
|
430
|
-
headers_size: JsUint
|
|
431
|
-
body_size: Union[JsUint, None]
|
|
432
|
-
destination: str
|
|
433
|
-
initiator_type: Union[str, None]
|
|
434
|
-
timings: NetworkFetchTimingInfo
|
|
435
|
-
|
|
436
|
-
class NetworkResponseContent(TypedDict):
|
|
437
|
-
size: JsUint
|
|
438
|
-
|
|
439
|
-
class NetworkResponseData(TypedDict):
|
|
440
|
-
url: str
|
|
441
|
-
protocol: str
|
|
442
|
-
status: JsUint
|
|
443
|
-
status_text: str
|
|
444
|
-
from_cache: bool
|
|
445
|
-
headers: list[NetworkHeader]
|
|
446
|
-
mime_type: str
|
|
447
|
-
bytes_received: JsUint
|
|
448
|
-
headers_size: Union[JsUint, None]
|
|
449
|
-
body_size: Union[JsUint, None]
|
|
450
|
-
content: NetworkResponseContent
|
|
451
|
-
auth_challenges: NotRequired[list[NetworkAuthChallenge]]
|
|
452
|
-
|
|
453
|
-
class NetworkAddDataCollectorResult(TypedDict):
|
|
454
|
-
collector: NetworkCollector
|
|
455
|
-
|
|
456
|
-
class NetworkAddInterceptResult(TypedDict):
|
|
457
|
-
intercept: NetworkIntercept
|
|
458
|
-
|
|
459
|
-
NetworkContinueRequestResult = EmptyResult
|
|
460
|
-
|
|
461
|
-
NetworkContinueResponseResult = EmptyResult
|
|
462
|
-
|
|
463
|
-
NetworkContinueWithAuthResult = EmptyResult
|
|
464
|
-
|
|
465
|
-
NetworkDisownDataResult = EmptyResult
|
|
466
|
-
|
|
467
|
-
NetworkFailRequestResult = EmptyResult
|
|
468
|
-
|
|
469
|
-
NetworkGetDataResult = dict[bytes, NetworkBytesValue]
|
|
470
|
-
|
|
471
|
-
NetworkProvideResponseResult = EmptyResult
|
|
472
|
-
|
|
473
|
-
NetworkRemoveDataCollectorResult = EmptyResult
|
|
474
|
-
|
|
475
|
-
NetworkRemoveInterceptResult = EmptyResult
|
|
476
|
-
|
|
477
|
-
NetworkSetCacheBehaviorResult = EmptyResult
|
|
478
|
-
|
|
479
|
-
NetworkSetExtraHeadersResult = EmptyResult
|
|
480
|
-
|
|
481
|
-
class NetworkAuthRequired(TypedDict):
|
|
482
|
-
method: Literal["network.authRequired"]
|
|
483
|
-
params: NetworkAuthRequiredParameters
|
|
484
|
-
|
|
485
|
-
class NetworkAuthRequiredParameters(NetworkBaseParameters):
|
|
486
|
-
response: NetworkResponseData
|
|
487
|
-
|
|
488
|
-
class NetworkBeforeRequestSent(TypedDict):
|
|
489
|
-
method: Literal["network.beforeRequestSent"]
|
|
490
|
-
params: NetworkBeforeRequestSentParameters
|
|
491
|
-
|
|
492
|
-
class NetworkBeforeRequestSentParameters(NetworkBaseParameters):
|
|
493
|
-
initiator: NotRequired[NetworkInitiator]
|
|
494
|
-
|
|
495
|
-
class NetworkFetchError(TypedDict):
|
|
496
|
-
method: Literal["network.fetchError"]
|
|
497
|
-
params: NetworkFetchErrorParameters
|
|
498
|
-
|
|
499
|
-
class NetworkFetchErrorParameters(NetworkBaseParameters):
|
|
500
|
-
error_text: str
|
|
501
|
-
|
|
502
|
-
class NetworkResponseCompleted(TypedDict):
|
|
503
|
-
method: Literal["network.responseCompleted"]
|
|
504
|
-
params: NetworkResponseCompletedParameters
|
|
505
|
-
|
|
506
|
-
class NetworkResponseCompletedParameters(NetworkBaseParameters):
|
|
507
|
-
response: NetworkResponseData
|
|
508
|
-
|
|
509
|
-
class NetworkResponseStarted(TypedDict):
|
|
510
|
-
method: Literal["network.responseStarted"]
|
|
511
|
-
params: NetworkResponseStartedParameters
|
|
512
|
-
|
|
513
|
-
class NetworkResponseStartedParameters(NetworkBaseParameters):
|
|
514
|
-
response: NetworkResponseData
|
|
515
|
-
|
|
516
|
-
ScriptResult = Union[ScriptAddPreloadScriptResult, ScriptCallFunctionResult, ScriptDisownResult, ScriptEvaluateResult, ScriptGetRealmsResult, ScriptRemovePreloadScriptResult]
|
|
517
|
-
|
|
518
|
-
ScriptEvent = Union[ScriptMessage, ScriptRealmCreated, ScriptRealmDestroyed]
|
|
519
|
-
|
|
520
|
-
ScriptChannel = str
|
|
521
|
-
|
|
522
|
-
class ScriptChannelValue(TypedDict):
|
|
523
|
-
type: Literal["channel"]
|
|
524
|
-
value: ScriptChannelProperties
|
|
525
|
-
|
|
526
|
-
class ScriptChannelProperties(TypedDict):
|
|
527
|
-
channel: ScriptChannel
|
|
528
|
-
serialization_options: NotRequired[ScriptSerializationOptions]
|
|
529
|
-
ownership: NotRequired[ScriptResultOwnership]
|
|
530
|
-
|
|
531
|
-
ScriptEvaluateResult = Union[ScriptEvaluateResultSuccess, ScriptEvaluateResultException]
|
|
532
|
-
|
|
533
|
-
class ScriptEvaluateResultSuccess(TypedDict):
|
|
534
|
-
type: Literal["success"]
|
|
535
|
-
result: ScriptRemoteValue
|
|
536
|
-
realm: ScriptRealm
|
|
537
|
-
|
|
538
|
-
class ScriptEvaluateResultException(TypedDict):
|
|
539
|
-
type: Literal["exception"]
|
|
540
|
-
exception_details: ScriptExceptionDetails
|
|
541
|
-
realm: ScriptRealm
|
|
542
|
-
|
|
543
|
-
class ScriptExceptionDetails(TypedDict):
|
|
544
|
-
column_number: JsUint
|
|
545
|
-
exception: ScriptRemoteValue
|
|
546
|
-
line_number: JsUint
|
|
547
|
-
stack_trace: ScriptStackTrace
|
|
548
|
-
text: str
|
|
549
|
-
|
|
550
|
-
ScriptHandle = str
|
|
551
|
-
|
|
552
|
-
ScriptInternalId = str
|
|
553
|
-
|
|
554
|
-
ScriptLocalValue = Union[ScriptRemoteReference, ScriptPrimitiveProtocolValue, ScriptChannelValue, ScriptArrayLocalValue, ScriptDateLocalValue, ScriptMapLocalValue, ScriptObjectLocalValue, ScriptRegExpLocalValue, ScriptSetLocalValue]
|
|
555
|
-
|
|
556
|
-
ScriptListLocalValue = list[ScriptLocalValue]
|
|
557
|
-
|
|
558
|
-
class ScriptArrayLocalValue(TypedDict):
|
|
559
|
-
type: Literal["array"]
|
|
560
|
-
value: ScriptListLocalValue
|
|
561
|
-
|
|
562
|
-
class ScriptDateLocalValue(TypedDict):
|
|
563
|
-
type: Literal["date"]
|
|
564
|
-
value: str
|
|
565
|
-
|
|
566
|
-
ScriptMappingLocalValue = list[Union[ScriptLocalValue, str]]
|
|
567
|
-
|
|
568
|
-
class ScriptMapLocalValue(TypedDict):
|
|
569
|
-
type: Literal["map"]
|
|
570
|
-
value: ScriptMappingLocalValue
|
|
571
|
-
|
|
572
|
-
class ScriptObjectLocalValue(TypedDict):
|
|
573
|
-
type: Literal["object"]
|
|
574
|
-
value: ScriptMappingLocalValue
|
|
575
|
-
|
|
576
|
-
class ScriptRegExpValue(TypedDict):
|
|
577
|
-
pattern: str
|
|
578
|
-
flags: NotRequired[str]
|
|
579
|
-
|
|
580
|
-
class ScriptRegExpLocalValue(TypedDict):
|
|
581
|
-
type: Literal["regexp"]
|
|
582
|
-
value: ScriptRegExpValue
|
|
583
|
-
|
|
584
|
-
class ScriptSetLocalValue(TypedDict):
|
|
585
|
-
type: Literal["set"]
|
|
586
|
-
value: ScriptListLocalValue
|
|
587
|
-
|
|
588
|
-
ScriptPreloadScript = str
|
|
589
|
-
|
|
590
|
-
ScriptRealm = str
|
|
591
|
-
|
|
592
|
-
ScriptPrimitiveProtocolValue = Union[ScriptUndefinedValue, ScriptNullValue, ScriptStringValue, ScriptNumberValue, ScriptBooleanValue, ScriptBigIntValue]
|
|
593
|
-
|
|
594
|
-
class ScriptUndefinedValue(TypedDict):
|
|
595
|
-
type: Literal["undefined"]
|
|
596
|
-
|
|
597
|
-
class ScriptNullValue(TypedDict):
|
|
598
|
-
type: None
|
|
599
|
-
|
|
600
|
-
class ScriptStringValue(TypedDict):
|
|
601
|
-
type: Literal["string"]
|
|
602
|
-
value: str
|
|
603
|
-
|
|
604
|
-
ScriptSpecialNumber = Union[Literal["NaN"], Literal["-0"], Literal["Infinity"], Literal["-Infinity"]]
|
|
605
|
-
|
|
606
|
-
class ScriptNumberValue(TypedDict):
|
|
607
|
-
type: Literal["number"]
|
|
608
|
-
value: Union[Number, ScriptSpecialNumber]
|
|
609
|
-
|
|
610
|
-
class ScriptBooleanValue(TypedDict):
|
|
611
|
-
type: Literal["boolean"]
|
|
612
|
-
value: bool
|
|
613
|
-
|
|
614
|
-
class ScriptBigIntValue(TypedDict):
|
|
615
|
-
type: Literal["bigint"]
|
|
616
|
-
value: str
|
|
617
|
-
|
|
618
|
-
ScriptRealmInfo = Union[ScriptWindowRealmInfo, ScriptDedicatedWorkerRealmInfo, ScriptSharedWorkerRealmInfo, ScriptServiceWorkerRealmInfo, ScriptWorkerRealmInfo, ScriptPaintWorkletRealmInfo, ScriptAudioWorkletRealmInfo, ScriptWorkletRealmInfo]
|
|
619
|
-
|
|
620
|
-
class ScriptBaseRealmInfo(TypedDict):
|
|
621
|
-
realm: ScriptRealm
|
|
622
|
-
origin: str
|
|
623
|
-
|
|
624
|
-
class ScriptWindowRealmInfo(ScriptBaseRealmInfo):
|
|
625
|
-
type: Literal["window"]
|
|
626
|
-
context: BrowsingContextBrowsingContext
|
|
627
|
-
user_context: NotRequired[BrowserUserContext]
|
|
628
|
-
sandbox: NotRequired[str]
|
|
629
|
-
|
|
630
|
-
class ScriptDedicatedWorkerRealmInfo(ScriptBaseRealmInfo):
|
|
631
|
-
type: Literal["dedicated-worker"]
|
|
632
|
-
owners: list[ScriptRealm]
|
|
633
|
-
|
|
634
|
-
class ScriptSharedWorkerRealmInfo(ScriptBaseRealmInfo):
|
|
635
|
-
type: Literal["shared-worker"]
|
|
636
|
-
|
|
637
|
-
class ScriptServiceWorkerRealmInfo(ScriptBaseRealmInfo):
|
|
638
|
-
type: Literal["service-worker"]
|
|
639
|
-
|
|
640
|
-
class ScriptWorkerRealmInfo(ScriptBaseRealmInfo):
|
|
641
|
-
type: Literal["worker"]
|
|
642
|
-
|
|
643
|
-
class ScriptPaintWorkletRealmInfo(ScriptBaseRealmInfo):
|
|
644
|
-
type: Literal["paint-worklet"]
|
|
645
|
-
|
|
646
|
-
class ScriptAudioWorkletRealmInfo(ScriptBaseRealmInfo):
|
|
647
|
-
type: Literal["audio-worklet"]
|
|
648
|
-
|
|
649
|
-
class ScriptWorkletRealmInfo(ScriptBaseRealmInfo):
|
|
650
|
-
type: Literal["worklet"]
|
|
651
|
-
|
|
652
|
-
ScriptRealmType = Union[Literal["window"], Literal["dedicated-worker"], Literal["shared-worker"], Literal["service-worker"], Literal["worker"], Literal["paint-worklet"], Literal["audio-worklet"], Literal["worklet"]]
|
|
653
|
-
|
|
654
|
-
ScriptRemoteReference = Union[ScriptSharedReference, ScriptRemoteObjectReference]
|
|
655
|
-
|
|
656
|
-
class ScriptSharedReference(Extensible):
|
|
657
|
-
shared_id: ScriptSharedId
|
|
658
|
-
handle: NotRequired[ScriptHandle]
|
|
659
|
-
|
|
660
|
-
class ScriptRemoteObjectReference(Extensible):
|
|
661
|
-
handle: ScriptHandle
|
|
662
|
-
shared_id: NotRequired[ScriptSharedId]
|
|
663
|
-
|
|
664
|
-
ScriptRemoteValue = Union[ScriptPrimitiveProtocolValue, ScriptSymbolRemoteValue, ScriptArrayRemoteValue, ScriptObjectRemoteValue, ScriptFunctionRemoteValue, ScriptRegExpRemoteValue, ScriptDateRemoteValue, ScriptMapRemoteValue, ScriptSetRemoteValue, ScriptWeakMapRemoteValue, ScriptWeakSetRemoteValue, ScriptGeneratorRemoteValue, ScriptErrorRemoteValue, ScriptProxyRemoteValue, ScriptPromiseRemoteValue, ScriptTypedArrayRemoteValue, ScriptArrayBufferRemoteValue, ScriptNodeListRemoteValue, ScriptHtmlCollectionRemoteValue, ScriptNodeRemoteValue, ScriptWindowProxyRemoteValue]
|
|
665
|
-
|
|
666
|
-
ScriptListRemoteValue = list[ScriptRemoteValue]
|
|
667
|
-
|
|
668
|
-
ScriptMappingRemoteValue = list[Union[ScriptRemoteValue, str]]
|
|
669
|
-
|
|
670
|
-
class ScriptSymbolRemoteValue(TypedDict):
|
|
671
|
-
type: Literal["symbol"]
|
|
672
|
-
handle: NotRequired[ScriptHandle]
|
|
673
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
674
|
-
|
|
675
|
-
class ScriptArrayRemoteValue(TypedDict):
|
|
676
|
-
type: Literal["array"]
|
|
677
|
-
handle: NotRequired[ScriptHandle]
|
|
678
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
679
|
-
value: NotRequired[ScriptListRemoteValue]
|
|
680
|
-
|
|
681
|
-
class ScriptObjectRemoteValue(TypedDict):
|
|
682
|
-
type: Literal["object"]
|
|
683
|
-
handle: NotRequired[ScriptHandle]
|
|
684
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
685
|
-
value: NotRequired[ScriptMappingRemoteValue]
|
|
686
|
-
|
|
687
|
-
class ScriptFunctionRemoteValue(TypedDict):
|
|
688
|
-
type: Literal["function"]
|
|
689
|
-
handle: NotRequired[ScriptHandle]
|
|
690
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
691
|
-
|
|
692
|
-
class ScriptRegExpRemoteValue(ScriptRegExpLocalValue):
|
|
693
|
-
handle: NotRequired[ScriptHandle]
|
|
694
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
695
|
-
|
|
696
|
-
class ScriptDateRemoteValue(ScriptDateLocalValue):
|
|
697
|
-
handle: NotRequired[ScriptHandle]
|
|
698
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
699
|
-
|
|
700
|
-
class ScriptMapRemoteValue(TypedDict):
|
|
701
|
-
type: Literal["map"]
|
|
702
|
-
handle: NotRequired[ScriptHandle]
|
|
703
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
704
|
-
value: NotRequired[ScriptMappingRemoteValue]
|
|
705
|
-
|
|
706
|
-
class ScriptSetRemoteValue(TypedDict):
|
|
707
|
-
type: Literal["set"]
|
|
708
|
-
handle: NotRequired[ScriptHandle]
|
|
709
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
710
|
-
value: NotRequired[ScriptListRemoteValue]
|
|
711
|
-
|
|
712
|
-
class ScriptWeakMapRemoteValue(TypedDict):
|
|
713
|
-
type: Literal["weakmap"]
|
|
714
|
-
handle: NotRequired[ScriptHandle]
|
|
715
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
716
|
-
|
|
717
|
-
class ScriptWeakSetRemoteValue(TypedDict):
|
|
718
|
-
type: Literal["weakset"]
|
|
719
|
-
handle: NotRequired[ScriptHandle]
|
|
720
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
721
|
-
|
|
722
|
-
class ScriptGeneratorRemoteValue(TypedDict):
|
|
723
|
-
type: Literal["generator"]
|
|
724
|
-
handle: NotRequired[ScriptHandle]
|
|
725
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
726
|
-
|
|
727
|
-
class ScriptErrorRemoteValue(TypedDict):
|
|
728
|
-
type: Literal["error"]
|
|
729
|
-
handle: NotRequired[ScriptHandle]
|
|
730
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
731
|
-
|
|
732
|
-
class ScriptProxyRemoteValue(TypedDict):
|
|
733
|
-
type: Literal["proxy"]
|
|
734
|
-
handle: NotRequired[ScriptHandle]
|
|
735
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
736
|
-
|
|
737
|
-
class ScriptPromiseRemoteValue(TypedDict):
|
|
738
|
-
type: Literal["promise"]
|
|
739
|
-
handle: NotRequired[ScriptHandle]
|
|
740
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
741
|
-
|
|
742
|
-
class ScriptTypedArrayRemoteValue(TypedDict):
|
|
743
|
-
type: Literal["typedarray"]
|
|
744
|
-
handle: NotRequired[ScriptHandle]
|
|
745
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
746
|
-
|
|
747
|
-
class ScriptArrayBufferRemoteValue(TypedDict):
|
|
748
|
-
type: Literal["arraybuffer"]
|
|
749
|
-
handle: NotRequired[ScriptHandle]
|
|
750
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
751
|
-
|
|
752
|
-
class ScriptNodeListRemoteValue(TypedDict):
|
|
753
|
-
type: Literal["nodelist"]
|
|
754
|
-
handle: NotRequired[ScriptHandle]
|
|
755
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
756
|
-
value: NotRequired[ScriptListRemoteValue]
|
|
757
|
-
|
|
758
|
-
class ScriptHtmlCollectionRemoteValue(TypedDict):
|
|
759
|
-
type: Literal["htmlcollection"]
|
|
760
|
-
handle: NotRequired[ScriptHandle]
|
|
761
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
762
|
-
value: NotRequired[ScriptListRemoteValue]
|
|
763
|
-
|
|
764
|
-
class ScriptNodeRemoteValue(TypedDict):
|
|
765
|
-
type: Literal["node"]
|
|
766
|
-
shared_id: NotRequired[ScriptSharedId]
|
|
767
|
-
handle: NotRequired[ScriptHandle]
|
|
768
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
769
|
-
value: NotRequired[ScriptNodeProperties]
|
|
770
|
-
|
|
771
|
-
class ScriptNodeProperties(TypedDict):
|
|
772
|
-
node_type: JsUint
|
|
773
|
-
child_node_count: JsUint
|
|
774
|
-
attributes: NotRequired[dict[str, str]]
|
|
775
|
-
children: NotRequired[list[ScriptNodeRemoteValue]]
|
|
776
|
-
local_name: NotRequired[str]
|
|
777
|
-
mode: NotRequired[Union[Literal["open"], Literal["closed"]]]
|
|
778
|
-
namespace_uri: NotRequired[str]
|
|
779
|
-
node_value: NotRequired[str]
|
|
780
|
-
shadow_root: NotRequired[Union[ScriptNodeRemoteValue, None]]
|
|
781
|
-
|
|
782
|
-
class ScriptWindowProxyRemoteValue(TypedDict):
|
|
783
|
-
type: Literal["window"]
|
|
784
|
-
value: ScriptWindowProxyProperties
|
|
785
|
-
handle: NotRequired[ScriptHandle]
|
|
786
|
-
internal_id: NotRequired[ScriptInternalId]
|
|
787
|
-
|
|
788
|
-
class ScriptWindowProxyProperties(TypedDict):
|
|
789
|
-
context: BrowsingContextBrowsingContext
|
|
790
|
-
|
|
791
|
-
ScriptResultOwnership = Union[Literal["root"], Literal["none"]]
|
|
792
|
-
|
|
793
|
-
class ScriptSerializationOptions(TypedDict):
|
|
794
|
-
max_dom_depth: NotRequired[Union[JsUint, None]]
|
|
795
|
-
max_object_depth: NotRequired[Union[JsUint, None]]
|
|
796
|
-
include_shadow_tree: NotRequired[Union[Literal["none"], Literal["open"], Literal["all"]]]
|
|
797
|
-
|
|
798
|
-
ScriptSharedId = str
|
|
799
|
-
|
|
800
|
-
class ScriptStackFrame(TypedDict):
|
|
801
|
-
column_number: JsUint
|
|
802
|
-
function_name: str
|
|
803
|
-
line_number: JsUint
|
|
804
|
-
url: str
|
|
805
|
-
|
|
806
|
-
class ScriptStackTrace(TypedDict):
|
|
807
|
-
call_frames: list[ScriptStackFrame]
|
|
808
|
-
|
|
809
|
-
class ScriptSource(TypedDict):
|
|
810
|
-
realm: ScriptRealm
|
|
811
|
-
context: NotRequired[BrowsingContextBrowsingContext]
|
|
812
|
-
user_context: NotRequired[BrowserUserContext]
|
|
813
|
-
|
|
814
|
-
class ScriptAddPreloadScriptResult(TypedDict):
|
|
815
|
-
script: ScriptPreloadScript
|
|
816
|
-
|
|
817
|
-
ScriptDisownResult = EmptyResult
|
|
818
|
-
|
|
819
|
-
ScriptCallFunctionResult = ScriptEvaluateResult
|
|
820
|
-
|
|
821
|
-
class ScriptGetRealmsResult(TypedDict):
|
|
822
|
-
realms: list[ScriptRealmInfo]
|
|
823
|
-
|
|
824
|
-
ScriptRemovePreloadScriptResult = EmptyResult
|
|
825
|
-
|
|
826
|
-
class ScriptMessage(TypedDict):
|
|
827
|
-
method: Literal["script.message"]
|
|
828
|
-
params: ScriptMessageParameters
|
|
829
|
-
|
|
830
|
-
class ScriptMessageParameters(TypedDict):
|
|
831
|
-
channel: ScriptChannel
|
|
832
|
-
data: ScriptRemoteValue
|
|
833
|
-
source: ScriptSource
|
|
834
|
-
|
|
835
|
-
class ScriptRealmCreated(TypedDict):
|
|
836
|
-
method: Literal["script.realmCreated"]
|
|
837
|
-
params: ScriptRealmInfo
|
|
838
|
-
|
|
839
|
-
class ScriptRealmDestroyed(TypedDict):
|
|
840
|
-
method: Literal["script.realmDestroyed"]
|
|
841
|
-
params: ScriptRealmDestroyedParameters
|
|
842
|
-
|
|
843
|
-
class ScriptRealmDestroyedParameters(TypedDict):
|
|
844
|
-
realm: ScriptRealm
|
|
845
|
-
|
|
846
|
-
StorageResult = Union[StorageDeleteCookiesResult, StorageGetCookiesResult, StorageSetCookieResult]
|
|
847
|
-
|
|
848
|
-
class StoragePartitionKey(Extensible):
|
|
849
|
-
user_context: NotRequired[str]
|
|
850
|
-
source_origin: NotRequired[str]
|
|
851
|
-
|
|
852
|
-
class StorageGetCookiesResult(TypedDict):
|
|
853
|
-
cookies: list[NetworkCookie]
|
|
854
|
-
partition_key: StoragePartitionKey
|
|
855
|
-
|
|
856
|
-
class StorageSetCookieResult(TypedDict):
|
|
857
|
-
partition_key: StoragePartitionKey
|
|
858
|
-
|
|
859
|
-
class StorageDeleteCookiesResult(TypedDict):
|
|
860
|
-
partition_key: StoragePartitionKey
|
|
861
|
-
|
|
862
|
-
class LogEvent(LogEntryAdded):
|
|
863
|
-
pass
|
|
864
|
-
|
|
865
|
-
LogLevel = Union[Literal["debug"], Literal["info"], Literal["warn"], Literal["error"]]
|
|
866
|
-
|
|
867
|
-
LogEntry = Union[LogGenericLogEntry, LogConsoleLogEntry, LogJavascriptLogEntry]
|
|
868
|
-
|
|
869
|
-
class LogBaseLogEntry(TypedDict):
|
|
870
|
-
level: LogLevel
|
|
871
|
-
source: ScriptSource
|
|
872
|
-
text: Union[str, None]
|
|
873
|
-
timestamp: JsUint
|
|
874
|
-
stack_trace: NotRequired[ScriptStackTrace]
|
|
875
|
-
|
|
876
|
-
class LogGenericLogEntry(LogBaseLogEntry):
|
|
877
|
-
type: str
|
|
878
|
-
|
|
879
|
-
class LogConsoleLogEntry(LogBaseLogEntry):
|
|
880
|
-
type: Literal["console"]
|
|
881
|
-
method: str
|
|
882
|
-
args: list[ScriptRemoteValue]
|
|
883
|
-
|
|
884
|
-
class LogJavascriptLogEntry(LogBaseLogEntry):
|
|
885
|
-
type: Literal["javascript"]
|
|
886
|
-
|
|
887
|
-
class LogEntryAdded(TypedDict):
|
|
888
|
-
method: Literal["log.entryAdded"]
|
|
889
|
-
params: LogEntry
|
|
890
|
-
|
|
891
|
-
InputResult = Union[InputPerformActionsResult, InputReleaseActionsResult, InputSetFilesResult]
|
|
892
|
-
|
|
893
|
-
class InputEvent(InputFileDialogOpened):
|
|
894
|
-
pass
|
|
895
|
-
|
|
896
|
-
InputPerformActionsResult = EmptyResult
|
|
897
|
-
|
|
898
|
-
InputReleaseActionsResult = EmptyResult
|
|
899
|
-
|
|
900
|
-
InputSetFilesResult = EmptyResult
|
|
901
|
-
|
|
902
|
-
class InputFileDialogOpened(TypedDict):
|
|
903
|
-
method: Literal["input.fileDialogOpened"]
|
|
904
|
-
params: InputFileDialogInfo
|
|
905
|
-
|
|
906
|
-
class InputFileDialogInfo(TypedDict):
|
|
907
|
-
context: BrowsingContextBrowsingContext
|
|
908
|
-
user_context: NotRequired[BrowserUserContext]
|
|
909
|
-
element: NotRequired[ScriptSharedReference]
|
|
910
|
-
multiple: bool
|
|
911
|
-
|
|
912
|
-
WebExtensionResult = Union[WebExtensionInstallResult, WebExtensionUninstallResult]
|
|
913
|
-
|
|
914
|
-
WebExtensionExtension = str
|
|
915
|
-
|
|
916
|
-
class WebExtensionInstallResult(TypedDict):
|
|
917
|
-
extension: WebExtensionExtension
|
|
918
|
-
|
|
919
|
-
WebExtensionUninstallResult = EmptyResult
|
|
920
|
-
"
|
|
921
|
-
`;
|