parsek-cdp 0.1.0__py3-none-any.whl

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.
Files changed (242) hide show
  1. parsek_cdp/__init__.py +55 -0
  2. parsek_cdp/_logging.py +49 -0
  3. parsek_cdp/cdp/__init__.py +247 -0
  4. parsek_cdp/cdp/accessibility/__init__.py +15 -0
  5. parsek_cdp/cdp/accessibility/events.py +35 -0
  6. parsek_cdp/cdp/accessibility/functions.py +202 -0
  7. parsek_cdp/cdp/accessibility/types.py +235 -0
  8. parsek_cdp/cdp/animation/__init__.py +15 -0
  9. parsek_cdp/cdp/animation/events.py +52 -0
  10. parsek_cdp/cdp/animation/functions.py +140 -0
  11. parsek_cdp/cdp/animation/types.py +113 -0
  12. parsek_cdp/cdp/audits/__init__.py +15 -0
  13. parsek_cdp/cdp/audits/events.py +21 -0
  14. parsek_cdp/cdp/audits/functions.py +95 -0
  15. parsek_cdp/cdp/audits/types.py +1051 -0
  16. parsek_cdp/cdp/autofill/__init__.py +15 -0
  17. parsek_cdp/cdp/autofill/events.py +27 -0
  18. parsek_cdp/cdp/autofill/functions.py +64 -0
  19. parsek_cdp/cdp/autofill/types.py +108 -0
  20. parsek_cdp/cdp/backgroundservice/__init__.py +15 -0
  21. parsek_cdp/cdp/backgroundservice/events.py +40 -0
  22. parsek_cdp/cdp/backgroundservice/functions.py +59 -0
  23. parsek_cdp/cdp/backgroundservice/types.py +63 -0
  24. parsek_cdp/cdp/bluetoothemulation/__init__.py +15 -0
  25. parsek_cdp/cdp/bluetoothemulation/events.py +70 -0
  26. parsek_cdp/cdp/bluetoothemulation/functions.py +247 -0
  27. parsek_cdp/cdp/bluetoothemulation/types.py +120 -0
  28. parsek_cdp/cdp/browser/__init__.py +15 -0
  29. parsek_cdp/cdp/browser/events.py +46 -0
  30. parsek_cdp/cdp/browser/functions.py +350 -0
  31. parsek_cdp/cdp/browser/types.py +158 -0
  32. parsek_cdp/cdp/cachestorage/__init__.py +15 -0
  33. parsek_cdp/cdp/cachestorage/events.py +13 -0
  34. parsek_cdp/cdp/cachestorage/functions.py +126 -0
  35. parsek_cdp/cdp/cachestorage/types.py +89 -0
  36. parsek_cdp/cdp/cast/__init__.py +15 -0
  37. parsek_cdp/cdp/cast/events.py +38 -0
  38. parsek_cdp/cdp/cast/functions.py +77 -0
  39. parsek_cdp/cdp/cast/types.py +23 -0
  40. parsek_cdp/cdp/console/__init__.py +15 -0
  41. parsek_cdp/cdp/console/events.py +22 -0
  42. parsek_cdp/cdp/console/functions.py +36 -0
  43. parsek_cdp/cdp/console/types.py +30 -0
  44. parsek_cdp/cdp/css/__init__.py +15 -0
  45. parsek_cdp/cdp/css/events.py +79 -0
  46. parsek_cdp/cdp/css/functions.py +788 -0
  47. parsek_cdp/cdp/css/types.py +742 -0
  48. parsek_cdp/cdp/debugger/__init__.py +15 -0
  49. parsek_cdp/cdp/debugger/events.py +164 -0
  50. parsek_cdp/cdp/debugger/functions.py +663 -0
  51. parsek_cdp/cdp/debugger/types.py +171 -0
  52. parsek_cdp/cdp/deviceaccess/__init__.py +15 -0
  53. parsek_cdp/cdp/deviceaccess/events.py +30 -0
  54. parsek_cdp/cdp/deviceaccess/functions.py +54 -0
  55. parsek_cdp/cdp/deviceaccess/types.py +28 -0
  56. parsek_cdp/cdp/deviceorientation/__init__.py +15 -0
  57. parsek_cdp/cdp/deviceorientation/events.py +13 -0
  58. parsek_cdp/cdp/deviceorientation/functions.py +35 -0
  59. parsek_cdp/cdp/deviceorientation/types.py +10 -0
  60. parsek_cdp/cdp/dom/__init__.py +15 -0
  61. parsek_cdp/cdp/dom/events.py +228 -0
  62. parsek_cdp/cdp/dom/functions.py +1033 -0
  63. parsek_cdp/cdp/dom/types.py +293 -0
  64. parsek_cdp/cdp/domdebugger/__init__.py +15 -0
  65. parsek_cdp/cdp/domdebugger/events.py +13 -0
  66. parsek_cdp/cdp/domdebugger/functions.py +155 -0
  67. parsek_cdp/cdp/domdebugger/types.py +57 -0
  68. parsek_cdp/cdp/domsnapshot/__init__.py +15 -0
  69. parsek_cdp/cdp/domsnapshot/events.py +13 -0
  70. parsek_cdp/cdp/domsnapshot/functions.py +111 -0
  71. parsek_cdp/cdp/domsnapshot/types.py +312 -0
  72. parsek_cdp/cdp/domstorage/__init__.py +15 -0
  73. parsek_cdp/cdp/domstorage/events.py +60 -0
  74. parsek_cdp/cdp/domstorage/functions.py +79 -0
  75. parsek_cdp/cdp/domstorage/types.py +30 -0
  76. parsek_cdp/cdp/emulation/__init__.py +15 -0
  77. parsek_cdp/cdp/emulation/events.py +17 -0
  78. parsek_cdp/cdp/emulation/functions.py +688 -0
  79. parsek_cdp/cdp/emulation/types.py +305 -0
  80. parsek_cdp/cdp/eventbreakpoints/__init__.py +15 -0
  81. parsek_cdp/cdp/eventbreakpoints/events.py +13 -0
  82. parsek_cdp/cdp/eventbreakpoints/functions.py +41 -0
  83. parsek_cdp/cdp/eventbreakpoints/types.py +10 -0
  84. parsek_cdp/cdp/extensions/__init__.py +15 -0
  85. parsek_cdp/cdp/extensions/events.py +13 -0
  86. parsek_cdp/cdp/extensions/functions.py +118 -0
  87. parsek_cdp/cdp/extensions/types.py +19 -0
  88. parsek_cdp/cdp/fedcm/__init__.py +15 -0
  89. parsek_cdp/cdp/fedcm/events.py +45 -0
  90. parsek_cdp/cdp/fedcm/functions.py +93 -0
  91. parsek_cdp/cdp/fedcm/types.py +72 -0
  92. parsek_cdp/cdp/fetch/__init__.py +15 -0
  93. parsek_cdp/cdp/fetch/events.py +82 -0
  94. parsek_cdp/cdp/fetch/functions.py +215 -0
  95. parsek_cdp/cdp/fetch/types.py +81 -0
  96. parsek_cdp/cdp/filesystem/__init__.py +15 -0
  97. parsek_cdp/cdp/filesystem/events.py +13 -0
  98. parsek_cdp/cdp/filesystem/functions.py +36 -0
  99. parsek_cdp/cdp/filesystem/types.py +54 -0
  100. parsek_cdp/cdp/headlessexperimental/__init__.py +15 -0
  101. parsek_cdp/cdp/headlessexperimental/events.py +13 -0
  102. parsek_cdp/cdp/headlessexperimental/functions.py +77 -0
  103. parsek_cdp/cdp/headlessexperimental/types.py +24 -0
  104. parsek_cdp/cdp/heapprofiler/__init__.py +15 -0
  105. parsek_cdp/cdp/heapprofiler/events.py +65 -0
  106. parsek_cdp/cdp/heapprofiler/functions.py +193 -0
  107. parsek_cdp/cdp/heapprofiler/types.py +57 -0
  108. parsek_cdp/cdp/indexeddb/__init__.py +15 -0
  109. parsek_cdp/cdp/indexeddb/events.py +13 -0
  110. parsek_cdp/cdp/indexeddb/functions.py +232 -0
  111. parsek_cdp/cdp/indexeddb/types.py +120 -0
  112. parsek_cdp/cdp/input/__init__.py +15 -0
  113. parsek_cdp/cdp/input/events.py +25 -0
  114. parsek_cdp/cdp/input/functions.py +361 -0
  115. parsek_cdp/cdp/input/types.py +87 -0
  116. parsek_cdp/cdp/inspector/__init__.py +15 -0
  117. parsek_cdp/cdp/inspector/events.py +41 -0
  118. parsek_cdp/cdp/inspector/functions.py +27 -0
  119. parsek_cdp/cdp/inspector/types.py +10 -0
  120. parsek_cdp/cdp/io/__init__.py +15 -0
  121. parsek_cdp/cdp/io/events.py +13 -0
  122. parsek_cdp/cdp/io/functions.py +77 -0
  123. parsek_cdp/cdp/io/types.py +13 -0
  124. parsek_cdp/cdp/layertree/__init__.py +15 -0
  125. parsek_cdp/cdp/layertree/events.py +36 -0
  126. parsek_cdp/cdp/layertree/functions.py +178 -0
  127. parsek_cdp/cdp/layertree/types.py +104 -0
  128. parsek_cdp/cdp/log/__init__.py +15 -0
  129. parsek_cdp/cdp/log/events.py +22 -0
  130. parsek_cdp/cdp/log/functions.py +54 -0
  131. parsek_cdp/cdp/log/types.py +57 -0
  132. parsek_cdp/cdp/media/__init__.py +15 -0
  133. parsek_cdp/cdp/media/events.py +87 -0
  134. parsek_cdp/cdp/media/functions.py +27 -0
  135. parsek_cdp/cdp/media/types.py +101 -0
  136. parsek_cdp/cdp/memory/__init__.py +15 -0
  137. parsek_cdp/cdp/memory/events.py +13 -0
  138. parsek_cdp/cdp/memory/functions.py +164 -0
  139. parsek_cdp/cdp/memory/types.py +71 -0
  140. parsek_cdp/cdp/mixins/__init__.py +21 -0
  141. parsek_cdp/cdp/mixins/datatype.py +123 -0
  142. parsek_cdp/cdp/mixins/event.py +78 -0
  143. parsek_cdp/cdp/mixins/namespace.py +31 -0
  144. parsek_cdp/cdp/network/__init__.py +15 -0
  145. parsek_cdp/cdp/network/events.py +726 -0
  146. parsek_cdp/cdp/network/functions.py +734 -0
  147. parsek_cdp/cdp/network/types.py +1247 -0
  148. parsek_cdp/cdp/overlay/__init__.py +15 -0
  149. parsek_cdp/cdp/overlay/events.py +54 -0
  150. parsek_cdp/cdp/overlay/functions.py +407 -0
  151. parsek_cdp/cdp/overlay/types.py +328 -0
  152. parsek_cdp/cdp/page/__init__.py +15 -0
  153. parsek_cdp/cdp/page/events.py +416 -0
  154. parsek_cdp/cdp/page/functions.py +1081 -0
  155. parsek_cdp/cdp/page/types.py +1088 -0
  156. parsek_cdp/cdp/performance/__init__.py +15 -0
  157. parsek_cdp/cdp/performance/events.py +24 -0
  158. parsek_cdp/cdp/performance/functions.py +63 -0
  159. parsek_cdp/cdp/performance/types.py +22 -0
  160. parsek_cdp/cdp/performancetimeline/__init__.py +15 -0
  161. parsek_cdp/cdp/performancetimeline/events.py +22 -0
  162. parsek_cdp/cdp/performancetimeline/functions.py +30 -0
  163. parsek_cdp/cdp/performancetimeline/types.py +85 -0
  164. parsek_cdp/cdp/preload/__init__.py +15 -0
  165. parsek_cdp/cdp/preload/events.py +116 -0
  166. parsek_cdp/cdp/preload/functions.py +25 -0
  167. parsek_cdp/cdp/preload/types.py +267 -0
  168. parsek_cdp/cdp/profiler/__init__.py +15 -0
  169. parsek_cdp/cdp/profiler/events.py +64 -0
  170. parsek_cdp/cdp/profiler/functions.py +134 -0
  171. parsek_cdp/cdp/profiler/types.py +105 -0
  172. parsek_cdp/cdp/pwa/__init__.py +15 -0
  173. parsek_cdp/cdp/pwa/events.py +13 -0
  174. parsek_cdp/cdp/pwa/functions.py +196 -0
  175. parsek_cdp/cdp/pwa/types.py +45 -0
  176. parsek_cdp/cdp/runtime/__init__.py +15 -0
  177. parsek_cdp/cdp/runtime/events.py +123 -0
  178. parsek_cdp/cdp/runtime/functions.py +552 -0
  179. parsek_cdp/cdp/runtime/types.py +319 -0
  180. parsek_cdp/cdp/schema/__init__.py +15 -0
  181. parsek_cdp/cdp/schema/events.py +13 -0
  182. parsek_cdp/cdp/schema/functions.py +32 -0
  183. parsek_cdp/cdp/schema/types.py +22 -0
  184. parsek_cdp/cdp/security/__init__.py +15 -0
  185. parsek_cdp/cdp/security/events.py +64 -0
  186. parsek_cdp/cdp/security/functions.py +66 -0
  187. parsek_cdp/cdp/security/types.py +168 -0
  188. parsek_cdp/cdp/serviceworker/__init__.py +15 -0
  189. parsek_cdp/cdp/serviceworker/events.py +43 -0
  190. parsek_cdp/cdp/serviceworker/functions.py +115 -0
  191. parsek_cdp/cdp/serviceworker/types.py +95 -0
  192. parsek_cdp/cdp/storage/__init__.py +15 -0
  193. parsek_cdp/cdp/storage/events.py +288 -0
  194. parsek_cdp/cdp/storage/functions.py +571 -0
  195. parsek_cdp/cdp/storage/types.py +656 -0
  196. parsek_cdp/cdp/systeminfo/__init__.py +15 -0
  197. parsek_cdp/cdp/systeminfo/events.py +13 -0
  198. parsek_cdp/cdp/systeminfo/functions.py +75 -0
  199. parsek_cdp/cdp/systeminfo/types.py +132 -0
  200. parsek_cdp/cdp/target/__init__.py +15 -0
  201. parsek_cdp/cdp/target/events.py +109 -0
  202. parsek_cdp/cdp/target/functions.py +424 -0
  203. parsek_cdp/cdp/target/types.py +83 -0
  204. parsek_cdp/cdp/tethering/__init__.py +15 -0
  205. parsek_cdp/cdp/tethering/events.py +22 -0
  206. parsek_cdp/cdp/tethering/functions.py +35 -0
  207. parsek_cdp/cdp/tethering/types.py +10 -0
  208. parsek_cdp/cdp/tracing/__init__.py +15 -0
  209. parsek_cdp/cdp/tracing/events.py +61 -0
  210. parsek_cdp/cdp/tracing/functions.py +119 -0
  211. parsek_cdp/cdp/tracing/types.py +81 -0
  212. parsek_cdp/cdp/webaudio/__init__.py +15 -0
  213. parsek_cdp/cdp/webaudio/events.py +184 -0
  214. parsek_cdp/cdp/webaudio/functions.py +51 -0
  215. parsek_cdp/cdp/webaudio/types.py +155 -0
  216. parsek_cdp/cdp/webauthn/__init__.py +15 -0
  217. parsek_cdp/cdp/webauthn/events.py +69 -0
  218. parsek_cdp/cdp/webauthn/functions.py +214 -0
  219. parsek_cdp/cdp/webauthn/types.py +96 -0
  220. parsek_cdp/core/__init__.py +18 -0
  221. parsek_cdp/core/browser.py +240 -0
  222. parsek_cdp/core/browser_context.py +58 -0
  223. parsek_cdp/core/element.py +405 -0
  224. parsek_cdp/core/feature.py +376 -0
  225. parsek_cdp/core/frame.py +351 -0
  226. parsek_cdp/core/pagable.py +175 -0
  227. parsek_cdp/core/page.py +163 -0
  228. parsek_cdp/core/target.py +490 -0
  229. parsek_cdp/features/__init__.py +14 -0
  230. parsek_cdp/features/request_listener/__init__.py +256 -0
  231. parsek_cdp/features/request_listener/events.py +48 -0
  232. parsek_cdp/features/request_listener/types.py +235 -0
  233. parsek_cdp/generate.py +642 -0
  234. parsek_cdp/parsek/__init__.py +18 -0
  235. parsek_cdp/parsek/events.py +38 -0
  236. parsek_cdp/parsek/types.py +36 -0
  237. parsek_cdp/py.typed +0 -0
  238. parsek_cdp-0.1.0.dist-info/METADATA +277 -0
  239. parsek_cdp-0.1.0.dist-info/RECORD +242 -0
  240. parsek_cdp-0.1.0.dist-info/WHEEL +5 -0
  241. parsek_cdp-0.1.0.dist-info/licenses/LICENSE +201 -0
  242. parsek_cdp-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,171 @@
1
+ """Custom types and enums for the Debugger domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from enum import Enum
6
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
7
+
8
+ from ..mixins.datatype import DataType, FieldMeta, register
9
+
10
+ if TYPE_CHECKING:
11
+ from ..runtime.types import RemoteObject as Runtime_RemoteObject
12
+ from ..runtime.types import ScriptId as Runtime_ScriptId
13
+
14
+ type BreakpointId = str # Breakpoint identifier.
15
+
16
+
17
+ type CallFrameId = str # Call frame identifier.
18
+
19
+
20
+ @register("Debugger.Location")
21
+ @dataclass
22
+ class Location(DataType):
23
+ """Location in the source code."""
24
+ script_id: Runtime_ScriptId
25
+ line_number: int
26
+ column_number: Optional[int] = None
27
+ __FIELDS__: ClassVar[tuple] = (
28
+ FieldMeta('script_id', 'scriptId', False, 'primitive'),
29
+ FieldMeta('line_number', 'lineNumber', False, 'primitive'),
30
+ FieldMeta('column_number', 'columnNumber', True, 'primitive'),
31
+ )
32
+
33
+
34
+ @register("Debugger.ScriptPosition")
35
+ @dataclass
36
+ class ScriptPosition(DataType):
37
+ """Location in the source code."""
38
+ line_number: int
39
+ column_number: int
40
+ __FIELDS__: ClassVar[tuple] = (
41
+ FieldMeta('line_number', 'lineNumber', False, 'primitive'),
42
+ FieldMeta('column_number', 'columnNumber', False, 'primitive'),
43
+ )
44
+
45
+
46
+ @register("Debugger.LocationRange")
47
+ @dataclass
48
+ class LocationRange(DataType):
49
+ """Location range within one script."""
50
+ script_id: Runtime_ScriptId
51
+ start: ScriptPosition
52
+ end: ScriptPosition
53
+ __FIELDS__: ClassVar[tuple] = (
54
+ FieldMeta('script_id', 'scriptId', False, 'primitive'),
55
+ FieldMeta('start', 'start', False, 'object', ref='Debugger.ScriptPosition'),
56
+ FieldMeta('end', 'end', False, 'object', ref='Debugger.ScriptPosition'),
57
+ )
58
+
59
+
60
+ @register("Debugger.CallFrame")
61
+ @dataclass
62
+ class CallFrame(DataType):
63
+ """JavaScript call frame. Array of call frames form the call stack."""
64
+ call_frame_id: CallFrameId
65
+ function_name: str
66
+ location: Location
67
+ url: str
68
+ scope_chain: List[Scope]
69
+ this: Runtime_RemoteObject
70
+ function_location: Optional[Location] = None
71
+ return_value: Optional[Runtime_RemoteObject] = None
72
+ can_be_restarted: Optional[bool] = None
73
+ __FIELDS__: ClassVar[tuple] = (
74
+ FieldMeta('call_frame_id', 'callFrameId', False, 'primitive'),
75
+ FieldMeta('function_name', 'functionName', False, 'primitive'),
76
+ FieldMeta('location', 'location', False, 'object', ref='Debugger.Location'),
77
+ FieldMeta('url', 'url', False, 'primitive'),
78
+ FieldMeta('scope_chain', 'scopeChain', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Debugger.Scope')),
79
+ FieldMeta('this', 'this', False, 'object', ref='Runtime.RemoteObject'),
80
+ FieldMeta('function_location', 'functionLocation', True, 'object', ref='Debugger.Location'),
81
+ FieldMeta('return_value', 'returnValue', True, 'object', ref='Runtime.RemoteObject'),
82
+ FieldMeta('can_be_restarted', 'canBeRestarted', True, 'primitive'),
83
+ )
84
+
85
+
86
+ @register("Debugger.Scope")
87
+ @dataclass
88
+ class Scope(DataType):
89
+ """Scope description."""
90
+ type_: Literal['global', 'local', 'with', 'closure', 'catch', 'block', 'script', 'eval', 'module', 'wasm-expression-stack']
91
+ object: Runtime_RemoteObject
92
+ name: Optional[str] = None
93
+ start_location: Optional[Location] = None
94
+ end_location: Optional[Location] = None
95
+ __FIELDS__: ClassVar[tuple] = (
96
+ FieldMeta('type_', 'type', False, 'primitive'),
97
+ FieldMeta('object', 'object', False, 'object', ref='Runtime.RemoteObject'),
98
+ FieldMeta('name', 'name', True, 'primitive'),
99
+ FieldMeta('start_location', 'startLocation', True, 'object', ref='Debugger.Location'),
100
+ FieldMeta('end_location', 'endLocation', True, 'object', ref='Debugger.Location'),
101
+ )
102
+
103
+
104
+ @register("Debugger.SearchMatch")
105
+ @dataclass
106
+ class SearchMatch(DataType):
107
+ """Search match for resource."""
108
+ line_number: float
109
+ line_content: str
110
+ __FIELDS__: ClassVar[tuple] = (
111
+ FieldMeta('line_number', 'lineNumber', False, 'primitive'),
112
+ FieldMeta('line_content', 'lineContent', False, 'primitive'),
113
+ )
114
+
115
+
116
+ @register("Debugger.BreakLocation")
117
+ @dataclass
118
+ class BreakLocation(DataType):
119
+ script_id: Runtime_ScriptId
120
+ line_number: int
121
+ column_number: Optional[int] = None
122
+ type_: Optional[Literal['debuggerStatement', 'call', 'return']] = None
123
+ __FIELDS__: ClassVar[tuple] = (
124
+ FieldMeta('script_id', 'scriptId', False, 'primitive'),
125
+ FieldMeta('line_number', 'lineNumber', False, 'primitive'),
126
+ FieldMeta('column_number', 'columnNumber', True, 'primitive'),
127
+ FieldMeta('type_', 'type', True, 'primitive'),
128
+ )
129
+
130
+
131
+ @register("Debugger.WasmDisassemblyChunk")
132
+ @dataclass
133
+ class WasmDisassemblyChunk(DataType):
134
+ lines: List[str]
135
+ bytecode_offsets: List[int]
136
+ __FIELDS__: ClassVar[tuple] = (
137
+ FieldMeta('lines', 'lines', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
138
+ FieldMeta('bytecode_offsets', 'bytecodeOffsets', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
139
+ )
140
+
141
+
142
+ @register("Debugger.ScriptLanguage")
143
+ class ScriptLanguage(str, Enum):
144
+ """Enum of possible script languages."""
145
+ JAVASCRIPT = 'JavaScript'
146
+ WEBASSEMBLY = 'WebAssembly'
147
+
148
+
149
+ @register("Debugger.DebugSymbols")
150
+ @dataclass
151
+ class DebugSymbols(DataType):
152
+ """Debug symbols available for a wasm script."""
153
+ type_: Literal['SourceMap', 'EmbeddedDWARF', 'ExternalDWARF']
154
+ external_url: Optional[str] = None
155
+ __FIELDS__: ClassVar[tuple] = (
156
+ FieldMeta('type_', 'type', False, 'primitive'),
157
+ FieldMeta('external_url', 'externalURL', True, 'primitive'),
158
+ )
159
+
160
+
161
+ @register("Debugger.ResolvedBreakpoint")
162
+ @dataclass
163
+ class ResolvedBreakpoint(DataType):
164
+ breakpoint_id: BreakpointId
165
+ location: Location
166
+ __FIELDS__: ClassVar[tuple] = (
167
+ FieldMeta('breakpoint_id', 'breakpointId', False, 'primitive'),
168
+ FieldMeta('location', 'location', False, 'object', ref='Debugger.Location'),
169
+ )
170
+
171
+ __all__ = ["BreakLocation", "BreakpointId", "CallFrame", "CallFrameId", "DebugSymbols", "Location", "LocationRange", "ResolvedBreakpoint", "Scope", "ScriptLanguage", "ScriptPosition", "SearchMatch", "WasmDisassemblyChunk"]
@@ -0,0 +1,15 @@
1
+ """The DeviceAccess CDP domain (generated).
2
+
3
+ Importing ``DeviceAccess`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``DeviceAccess.SomeEvent`` /
5
+ ``DeviceAccess.SomeType``); commands run on a target via ``page.cdp.DeviceAccess``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import DeviceAccess
9
+ from .events import * # noqa: F401,F403 -- expose events on the namespace
10
+ from .types import * # noqa: F401,F403 -- expose types on the namespace
11
+
12
+ #: Protocol domain name (used by features that declare ``domains=(DeviceAccess,)``).
13
+ DOMAIN = "DeviceAccess"
14
+
15
+ __all__ = ["events", "functions", "types", "DeviceAccess", "DOMAIN"]
@@ -0,0 +1,30 @@
1
+ """Events for the DeviceAccess domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import FieldMeta
8
+ from ..mixins.event import Event, register_event
9
+
10
+ if TYPE_CHECKING:
11
+ from .types import (
12
+ PromptDevice,
13
+ RequestId,
14
+ )
15
+
16
+ @register_event("DeviceAccess.deviceRequestPrompted")
17
+ @dataclass
18
+ class DeviceRequestPrompted(Event):
19
+ """
20
+ A device request opened a user prompt to select a device. Respond with the
21
+ selectPrompt or cancelPrompt command.
22
+ """
23
+ id: RequestId
24
+ devices: List[PromptDevice]
25
+ __FIELDS__: ClassVar[tuple] = (
26
+ FieldMeta('id', 'id', False, 'primitive'),
27
+ FieldMeta('devices', 'devices', False, 'array', inner=FieldMeta('', '', False, 'object', ref='DeviceAccess.PromptDevice')),
28
+ )
29
+
30
+ __all__ = ["DeviceRequestPrompted"]
@@ -0,0 +1,54 @@
1
+ """Commands for the DeviceAccess domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import DataType, FieldMeta, encode
8
+
9
+ if TYPE_CHECKING:
10
+ from .types import (
11
+ DeviceId,
12
+ RequestId,
13
+ )
14
+
15
+ class DeviceAccess:
16
+ """Commands of the DeviceAccess domain, bound to a target."""
17
+
18
+ def __init__(self, target: Any) -> None:
19
+ self._target = target
20
+
21
+
22
+ async def enable(self) -> None:
23
+ """Enable events in this domain."""
24
+ _params: Dict[str, Any] = {}
25
+ _result = await self._target.send('DeviceAccess.enable', _params)
26
+ return None
27
+
28
+ async def disable(self) -> None:
29
+ """Disable events in this domain."""
30
+ _params: Dict[str, Any] = {}
31
+ _result = await self._target.send('DeviceAccess.disable', _params)
32
+ return None
33
+
34
+ async def select_prompt(self, *, id: RequestId, device_id: DeviceId) -> None:
35
+ """
36
+ Select a device in response to a DeviceAccess.deviceRequestPrompted event.
37
+ :param id:
38
+ :param device_id:
39
+ """
40
+ _params: Dict[str, Any] = {}
41
+ _params['id'] = encode(FieldMeta('', '', False, 'primitive'), id)
42
+ _params['deviceId'] = encode(FieldMeta('', '', False, 'primitive'), device_id)
43
+ _result = await self._target.send('DeviceAccess.selectPrompt', _params)
44
+ return None
45
+
46
+ async def cancel_prompt(self, *, id: RequestId) -> None:
47
+ """
48
+ Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
49
+ :param id:
50
+ """
51
+ _params: Dict[str, Any] = {}
52
+ _params['id'] = encode(FieldMeta('', '', False, 'primitive'), id)
53
+ _result = await self._target.send('DeviceAccess.cancelPrompt', _params)
54
+ return None
@@ -0,0 +1,28 @@
1
+ """Custom types and enums for the DeviceAccess domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from enum import Enum
6
+ from typing import Any, ClassVar, Dict, List, Literal, Optional
7
+
8
+ from ..mixins.datatype import DataType, FieldMeta, register
9
+
10
+
11
+ type RequestId = str # Device request id.
12
+
13
+
14
+ type DeviceId = str # A device id.
15
+
16
+
17
+ @register("DeviceAccess.PromptDevice")
18
+ @dataclass
19
+ class PromptDevice(DataType):
20
+ """Device information displayed in a user prompt to select a device."""
21
+ id: DeviceId
22
+ name: str
23
+ __FIELDS__: ClassVar[tuple] = (
24
+ FieldMeta('id', 'id', False, 'primitive'),
25
+ FieldMeta('name', 'name', False, 'primitive'),
26
+ )
27
+
28
+ __all__ = ["DeviceId", "PromptDevice", "RequestId"]
@@ -0,0 +1,15 @@
1
+ """The DeviceOrientation CDP domain (generated).
2
+
3
+ Importing ``DeviceOrientation`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``DeviceOrientation.SomeEvent`` /
5
+ ``DeviceOrientation.SomeType``); commands run on a target via ``page.cdp.DeviceOrientation``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import DeviceOrientation
9
+ from .events import * # noqa: F401,F403 -- expose events on the namespace
10
+ from .types import * # noqa: F401,F403 -- expose types on the namespace
11
+
12
+ #: Protocol domain name (used by features that declare ``domains=(DeviceOrientation,)``).
13
+ DOMAIN = "DeviceOrientation"
14
+
15
+ __all__ = ["events", "functions", "types", "DeviceOrientation", "DOMAIN"]
@@ -0,0 +1,13 @@
1
+ """Events for the DeviceOrientation domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import FieldMeta
8
+ from ..mixins.event import Event, register_event
9
+
10
+
11
+ # This domain defines no events.
12
+
13
+ __all__ = []
@@ -0,0 +1,35 @@
1
+ """Commands for the DeviceOrientation domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import DataType, FieldMeta, encode
8
+
9
+
10
+ class DeviceOrientation:
11
+ """Commands of the DeviceOrientation domain, bound to a target."""
12
+
13
+ def __init__(self, target: Any) -> None:
14
+ self._target = target
15
+
16
+
17
+ async def clear_device_orientation_override(self) -> None:
18
+ """Clears the overridden Device Orientation."""
19
+ _params: Dict[str, Any] = {}
20
+ _result = await self._target.send('DeviceOrientation.clearDeviceOrientationOverride', _params)
21
+ return None
22
+
23
+ async def set_device_orientation_override(self, *, alpha: float, beta: float, gamma: float) -> None:
24
+ """
25
+ Overrides the Device Orientation.
26
+ :param alpha: Mock alpha
27
+ :param beta: Mock beta
28
+ :param gamma: Mock gamma
29
+ """
30
+ _params: Dict[str, Any] = {}
31
+ _params['alpha'] = encode(FieldMeta('', '', False, 'primitive'), alpha)
32
+ _params['beta'] = encode(FieldMeta('', '', False, 'primitive'), beta)
33
+ _params['gamma'] = encode(FieldMeta('', '', False, 'primitive'), gamma)
34
+ _result = await self._target.send('DeviceOrientation.setDeviceOrientationOverride', _params)
35
+ return None
@@ -0,0 +1,10 @@
1
+ """Custom types and enums for the DeviceOrientation domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from enum import Enum
6
+ from typing import Any, ClassVar, Dict, List, Literal, Optional
7
+
8
+ from ..mixins.datatype import DataType, FieldMeta, register
9
+
10
+ __all__ = []
@@ -0,0 +1,15 @@
1
+ """The DOM CDP domain (generated).
2
+
3
+ Importing ``DOM`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``DOM.SomeEvent`` /
5
+ ``DOM.SomeType``); commands run on a target via ``page.cdp.DOM``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import DOM
9
+ from .events import * # noqa: F401,F403 -- expose events on the namespace
10
+ from .types import * # noqa: F401,F403 -- expose types on the namespace
11
+
12
+ #: Protocol domain name (used by features that declare ``domains=(DOM,)``).
13
+ DOMAIN = "DOM"
14
+
15
+ __all__ = ["events", "functions", "types", "DOM", "DOMAIN"]
@@ -0,0 +1,228 @@
1
+ """Events for the DOM domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import FieldMeta
8
+ from ..mixins.event import Event, register_event
9
+
10
+ if TYPE_CHECKING:
11
+ from .types import (
12
+ BackendNode,
13
+ Node,
14
+ NodeId,
15
+ StyleSheetId,
16
+ )
17
+
18
+ @register_event("DOM.attributeModified")
19
+ @dataclass
20
+ class AttributeModified(Event):
21
+ """Fired when `Element`'s attribute is modified."""
22
+ node_id: NodeId
23
+ name: str
24
+ value: str
25
+ __FIELDS__: ClassVar[tuple] = (
26
+ FieldMeta('node_id', 'nodeId', False, 'primitive'),
27
+ FieldMeta('name', 'name', False, 'primitive'),
28
+ FieldMeta('value', 'value', False, 'primitive'),
29
+ )
30
+
31
+
32
+ @register_event("DOM.adoptedStyleSheetsModified")
33
+ @dataclass
34
+ class AdoptedStyleSheetsModified(Event):
35
+ """Fired when `Element`'s adoptedStyleSheets are modified."""
36
+ node_id: NodeId
37
+ adopted_style_sheets: List[StyleSheetId]
38
+ __FIELDS__: ClassVar[tuple] = (
39
+ FieldMeta('node_id', 'nodeId', False, 'primitive'),
40
+ FieldMeta('adopted_style_sheets', 'adoptedStyleSheets', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
41
+ )
42
+
43
+
44
+ @register_event("DOM.attributeRemoved")
45
+ @dataclass
46
+ class AttributeRemoved(Event):
47
+ """Fired when `Element`'s attribute is removed."""
48
+ node_id: NodeId
49
+ name: str
50
+ __FIELDS__: ClassVar[tuple] = (
51
+ FieldMeta('node_id', 'nodeId', False, 'primitive'),
52
+ FieldMeta('name', 'name', False, 'primitive'),
53
+ )
54
+
55
+
56
+ @register_event("DOM.characterDataModified")
57
+ @dataclass
58
+ class CharacterDataModified(Event):
59
+ """Mirrors `DOMCharacterDataModified` event."""
60
+ node_id: NodeId
61
+ character_data: str
62
+ __FIELDS__: ClassVar[tuple] = (
63
+ FieldMeta('node_id', 'nodeId', False, 'primitive'),
64
+ FieldMeta('character_data', 'characterData', False, 'primitive'),
65
+ )
66
+
67
+
68
+ @register_event("DOM.childNodeCountUpdated")
69
+ @dataclass
70
+ class ChildNodeCountUpdated(Event):
71
+ """Fired when `Container`'s child node count has changed."""
72
+ node_id: NodeId
73
+ child_node_count: int
74
+ __FIELDS__: ClassVar[tuple] = (
75
+ FieldMeta('node_id', 'nodeId', False, 'primitive'),
76
+ FieldMeta('child_node_count', 'childNodeCount', False, 'primitive'),
77
+ )
78
+
79
+
80
+ @register_event("DOM.childNodeInserted")
81
+ @dataclass
82
+ class ChildNodeInserted(Event):
83
+ """Mirrors `DOMNodeInserted` event."""
84
+ parent_node_id: NodeId
85
+ previous_node_id: NodeId
86
+ node: Node
87
+ __FIELDS__: ClassVar[tuple] = (
88
+ FieldMeta('parent_node_id', 'parentNodeId', False, 'primitive'),
89
+ FieldMeta('previous_node_id', 'previousNodeId', False, 'primitive'),
90
+ FieldMeta('node', 'node', False, 'object', ref='DOM.Node'),
91
+ )
92
+
93
+
94
+ @register_event("DOM.childNodeRemoved")
95
+ @dataclass
96
+ class ChildNodeRemoved(Event):
97
+ """Mirrors `DOMNodeRemoved` event."""
98
+ parent_node_id: NodeId
99
+ node_id: NodeId
100
+ __FIELDS__: ClassVar[tuple] = (
101
+ FieldMeta('parent_node_id', 'parentNodeId', False, 'primitive'),
102
+ FieldMeta('node_id', 'nodeId', False, 'primitive'),
103
+ )
104
+
105
+
106
+ @register_event("DOM.distributedNodesUpdated")
107
+ @dataclass
108
+ class DistributedNodesUpdated(Event):
109
+ """Called when distribution is changed."""
110
+ insertion_point_id: NodeId
111
+ distributed_nodes: List[BackendNode]
112
+ __FIELDS__: ClassVar[tuple] = (
113
+ FieldMeta('insertion_point_id', 'insertionPointId', False, 'primitive'),
114
+ FieldMeta('distributed_nodes', 'distributedNodes', False, 'array', inner=FieldMeta('', '', False, 'object', ref='DOM.BackendNode')),
115
+ )
116
+
117
+
118
+ @register_event("DOM.documentUpdated")
119
+ @dataclass
120
+ class DocumentUpdated(Event):
121
+ """Fired when `Document` has been totally updated. Node ids are no longer valid."""
122
+ __FIELDS__: ClassVar[tuple] = ()
123
+
124
+
125
+ @register_event("DOM.inlineStyleInvalidated")
126
+ @dataclass
127
+ class InlineStyleInvalidated(Event):
128
+ """Fired when `Element`'s inline style is modified via a CSS property modification."""
129
+ node_ids: List[NodeId]
130
+ __FIELDS__: ClassVar[tuple] = (
131
+ FieldMeta('node_ids', 'nodeIds', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
132
+ )
133
+
134
+
135
+ @register_event("DOM.pseudoElementAdded")
136
+ @dataclass
137
+ class PseudoElementAdded(Event):
138
+ """Called when a pseudo element is added to an element."""
139
+ parent_id: NodeId
140
+ pseudo_element: Node
141
+ __FIELDS__: ClassVar[tuple] = (
142
+ FieldMeta('parent_id', 'parentId', False, 'primitive'),
143
+ FieldMeta('pseudo_element', 'pseudoElement', False, 'object', ref='DOM.Node'),
144
+ )
145
+
146
+
147
+ @register_event("DOM.topLayerElementsUpdated")
148
+ @dataclass
149
+ class TopLayerElementsUpdated(Event):
150
+ """Called when top layer elements are changed."""
151
+ __FIELDS__: ClassVar[tuple] = ()
152
+
153
+
154
+ @register_event("DOM.scrollableFlagUpdated")
155
+ @dataclass
156
+ class ScrollableFlagUpdated(Event):
157
+ """Fired when a node's scrollability state changes."""
158
+ node_id: NodeId
159
+ is_scrollable: bool
160
+ __FIELDS__: ClassVar[tuple] = (
161
+ FieldMeta('node_id', 'nodeId', False, 'primitive'),
162
+ FieldMeta('is_scrollable', 'isScrollable', False, 'primitive'),
163
+ )
164
+
165
+
166
+ @register_event("DOM.affectedByStartingStylesFlagUpdated")
167
+ @dataclass
168
+ class AffectedByStartingStylesFlagUpdated(Event):
169
+ """Fired when a node's starting styles changes."""
170
+ node_id: NodeId
171
+ affected_by_starting_styles: bool
172
+ __FIELDS__: ClassVar[tuple] = (
173
+ FieldMeta('node_id', 'nodeId', False, 'primitive'),
174
+ FieldMeta('affected_by_starting_styles', 'affectedByStartingStyles', False, 'primitive'),
175
+ )
176
+
177
+
178
+ @register_event("DOM.pseudoElementRemoved")
179
+ @dataclass
180
+ class PseudoElementRemoved(Event):
181
+ """Called when a pseudo element is removed from an element."""
182
+ parent_id: NodeId
183
+ pseudo_element_id: NodeId
184
+ __FIELDS__: ClassVar[tuple] = (
185
+ FieldMeta('parent_id', 'parentId', False, 'primitive'),
186
+ FieldMeta('pseudo_element_id', 'pseudoElementId', False, 'primitive'),
187
+ )
188
+
189
+
190
+ @register_event("DOM.setChildNodes")
191
+ @dataclass
192
+ class SetChildNodes(Event):
193
+ """
194
+ Fired when backend wants to provide client with the missing DOM structure. This happens upon
195
+ most of the calls requesting node ids.
196
+ """
197
+ parent_id: NodeId
198
+ nodes: List[Node]
199
+ __FIELDS__: ClassVar[tuple] = (
200
+ FieldMeta('parent_id', 'parentId', False, 'primitive'),
201
+ FieldMeta('nodes', 'nodes', False, 'array', inner=FieldMeta('', '', False, 'object', ref='DOM.Node')),
202
+ )
203
+
204
+
205
+ @register_event("DOM.shadowRootPopped")
206
+ @dataclass
207
+ class ShadowRootPopped(Event):
208
+ """Called when shadow root is popped from the element."""
209
+ host_id: NodeId
210
+ root_id: NodeId
211
+ __FIELDS__: ClassVar[tuple] = (
212
+ FieldMeta('host_id', 'hostId', False, 'primitive'),
213
+ FieldMeta('root_id', 'rootId', False, 'primitive'),
214
+ )
215
+
216
+
217
+ @register_event("DOM.shadowRootPushed")
218
+ @dataclass
219
+ class ShadowRootPushed(Event):
220
+ """Called when shadow root is pushed into the element."""
221
+ host_id: NodeId
222
+ root: Node
223
+ __FIELDS__: ClassVar[tuple] = (
224
+ FieldMeta('host_id', 'hostId', False, 'primitive'),
225
+ FieldMeta('root', 'root', False, 'object', ref='DOM.Node'),
226
+ )
227
+
228
+ __all__ = ["AdoptedStyleSheetsModified", "AffectedByStartingStylesFlagUpdated", "AttributeModified", "AttributeRemoved", "CharacterDataModified", "ChildNodeCountUpdated", "ChildNodeInserted", "ChildNodeRemoved", "DistributedNodesUpdated", "DocumentUpdated", "InlineStyleInvalidated", "PseudoElementAdded", "PseudoElementRemoved", "ScrollableFlagUpdated", "SetChildNodes", "ShadowRootPopped", "ShadowRootPushed", "TopLayerElementsUpdated"]