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,305 @@
1
+ """Custom types and enums for the Emulation 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
+ @register("Emulation.SafeAreaInsets")
12
+ @dataclass
13
+ class SafeAreaInsets(DataType):
14
+ top: Optional[int] = None
15
+ top_max: Optional[int] = None
16
+ left: Optional[int] = None
17
+ left_max: Optional[int] = None
18
+ bottom: Optional[int] = None
19
+ bottom_max: Optional[int] = None
20
+ right: Optional[int] = None
21
+ right_max: Optional[int] = None
22
+ __FIELDS__: ClassVar[tuple] = (
23
+ FieldMeta('top', 'top', True, 'primitive'),
24
+ FieldMeta('top_max', 'topMax', True, 'primitive'),
25
+ FieldMeta('left', 'left', True, 'primitive'),
26
+ FieldMeta('left_max', 'leftMax', True, 'primitive'),
27
+ FieldMeta('bottom', 'bottom', True, 'primitive'),
28
+ FieldMeta('bottom_max', 'bottomMax', True, 'primitive'),
29
+ FieldMeta('right', 'right', True, 'primitive'),
30
+ FieldMeta('right_max', 'rightMax', True, 'primitive'),
31
+ )
32
+
33
+
34
+ @register("Emulation.ScreenOrientation")
35
+ @dataclass
36
+ class ScreenOrientation(DataType):
37
+ """Screen orientation."""
38
+ type_: Literal['portraitPrimary', 'portraitSecondary', 'landscapePrimary', 'landscapeSecondary']
39
+ angle: int
40
+ __FIELDS__: ClassVar[tuple] = (
41
+ FieldMeta('type_', 'type', False, 'primitive'),
42
+ FieldMeta('angle', 'angle', False, 'primitive'),
43
+ )
44
+
45
+
46
+ @register("Emulation.DisplayFeature")
47
+ @dataclass
48
+ class DisplayFeature(DataType):
49
+ orientation: Literal['vertical', 'horizontal']
50
+ offset: int
51
+ mask_length: int
52
+ __FIELDS__: ClassVar[tuple] = (
53
+ FieldMeta('orientation', 'orientation', False, 'primitive'),
54
+ FieldMeta('offset', 'offset', False, 'primitive'),
55
+ FieldMeta('mask_length', 'maskLength', False, 'primitive'),
56
+ )
57
+
58
+
59
+ @register("Emulation.DevicePosture")
60
+ @dataclass
61
+ class DevicePosture(DataType):
62
+ type_: Literal['continuous', 'folded']
63
+ __FIELDS__: ClassVar[tuple] = (
64
+ FieldMeta('type_', 'type', False, 'primitive'),
65
+ )
66
+
67
+
68
+ @register("Emulation.MediaFeature")
69
+ @dataclass
70
+ class MediaFeature(DataType):
71
+ name: str
72
+ value: str
73
+ __FIELDS__: ClassVar[tuple] = (
74
+ FieldMeta('name', 'name', False, 'primitive'),
75
+ FieldMeta('value', 'value', False, 'primitive'),
76
+ )
77
+
78
+
79
+ @register("Emulation.VirtualTimePolicy")
80
+ class VirtualTimePolicy(str, Enum):
81
+ """
82
+ advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to
83
+ allow the next delayed task (if any) to run; pause: The virtual time base may not advance;
84
+ pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending
85
+ resource fetches.
86
+ """
87
+ ADVANCE = 'advance'
88
+ PAUSE = 'pause'
89
+ PAUSEIFNETWORKFETCHESPENDING = 'pauseIfNetworkFetchesPending'
90
+
91
+
92
+ @register("Emulation.UserAgentBrandVersion")
93
+ @dataclass
94
+ class UserAgentBrandVersion(DataType):
95
+ """Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints"""
96
+ brand: str
97
+ version: str
98
+ __FIELDS__: ClassVar[tuple] = (
99
+ FieldMeta('brand', 'brand', False, 'primitive'),
100
+ FieldMeta('version', 'version', False, 'primitive'),
101
+ )
102
+
103
+
104
+ @register("Emulation.UserAgentMetadata")
105
+ @dataclass
106
+ class UserAgentMetadata(DataType):
107
+ """
108
+ Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
109
+ Missing optional values will be filled in by the target with what it would normally use.
110
+ """
111
+ platform: str
112
+ platform_version: str
113
+ architecture: str
114
+ model: str
115
+ mobile: bool
116
+ brands: Optional[List[UserAgentBrandVersion]] = None
117
+ full_version_list: Optional[List[UserAgentBrandVersion]] = None
118
+ full_version: Optional[str] = None
119
+ bitness: Optional[str] = None
120
+ wow64: Optional[bool] = None
121
+ form_factors: Optional[List[str]] = None
122
+ __FIELDS__: ClassVar[tuple] = (
123
+ FieldMeta('platform', 'platform', False, 'primitive'),
124
+ FieldMeta('platform_version', 'platformVersion', False, 'primitive'),
125
+ FieldMeta('architecture', 'architecture', False, 'primitive'),
126
+ FieldMeta('model', 'model', False, 'primitive'),
127
+ FieldMeta('mobile', 'mobile', False, 'primitive'),
128
+ FieldMeta('brands', 'brands', True, 'array', inner=FieldMeta('', '', False, 'object', ref='Emulation.UserAgentBrandVersion')),
129
+ FieldMeta('full_version_list', 'fullVersionList', True, 'array', inner=FieldMeta('', '', False, 'object', ref='Emulation.UserAgentBrandVersion')),
130
+ FieldMeta('full_version', 'fullVersion', True, 'primitive'),
131
+ FieldMeta('bitness', 'bitness', True, 'primitive'),
132
+ FieldMeta('wow64', 'wow64', True, 'primitive'),
133
+ FieldMeta('form_factors', 'formFactors', True, 'array', inner=FieldMeta('', '', False, 'primitive')),
134
+ )
135
+
136
+
137
+ @register("Emulation.SensorType")
138
+ class SensorType(str, Enum):
139
+ """
140
+ Used to specify sensor types to emulate.
141
+ See https://w3c.github.io/sensors/#automation for more information.
142
+ """
143
+ ABSOLUTE_ORIENTATION = 'absolute-orientation'
144
+ ACCELEROMETER = 'accelerometer'
145
+ AMBIENT_LIGHT = 'ambient-light'
146
+ GRAVITY = 'gravity'
147
+ GYROSCOPE = 'gyroscope'
148
+ LINEAR_ACCELERATION = 'linear-acceleration'
149
+ MAGNETOMETER = 'magnetometer'
150
+ RELATIVE_ORIENTATION = 'relative-orientation'
151
+
152
+
153
+ @register("Emulation.SensorMetadata")
154
+ @dataclass
155
+ class SensorMetadata(DataType):
156
+ available: Optional[bool] = None
157
+ minimum_frequency: Optional[float] = None
158
+ maximum_frequency: Optional[float] = None
159
+ __FIELDS__: ClassVar[tuple] = (
160
+ FieldMeta('available', 'available', True, 'primitive'),
161
+ FieldMeta('minimum_frequency', 'minimumFrequency', True, 'primitive'),
162
+ FieldMeta('maximum_frequency', 'maximumFrequency', True, 'primitive'),
163
+ )
164
+
165
+
166
+ @register("Emulation.SensorReadingSingle")
167
+ @dataclass
168
+ class SensorReadingSingle(DataType):
169
+ value: float
170
+ __FIELDS__: ClassVar[tuple] = (
171
+ FieldMeta('value', 'value', False, 'primitive'),
172
+ )
173
+
174
+
175
+ @register("Emulation.SensorReadingXYZ")
176
+ @dataclass
177
+ class SensorReadingXYZ(DataType):
178
+ x: float
179
+ y: float
180
+ z: float
181
+ __FIELDS__: ClassVar[tuple] = (
182
+ FieldMeta('x', 'x', False, 'primitive'),
183
+ FieldMeta('y', 'y', False, 'primitive'),
184
+ FieldMeta('z', 'z', False, 'primitive'),
185
+ )
186
+
187
+
188
+ @register("Emulation.SensorReadingQuaternion")
189
+ @dataclass
190
+ class SensorReadingQuaternion(DataType):
191
+ x: float
192
+ y: float
193
+ z: float
194
+ w: float
195
+ __FIELDS__: ClassVar[tuple] = (
196
+ FieldMeta('x', 'x', False, 'primitive'),
197
+ FieldMeta('y', 'y', False, 'primitive'),
198
+ FieldMeta('z', 'z', False, 'primitive'),
199
+ FieldMeta('w', 'w', False, 'primitive'),
200
+ )
201
+
202
+
203
+ @register("Emulation.SensorReading")
204
+ @dataclass
205
+ class SensorReading(DataType):
206
+ single: Optional[SensorReadingSingle] = None
207
+ xyz: Optional[SensorReadingXYZ] = None
208
+ quaternion: Optional[SensorReadingQuaternion] = None
209
+ __FIELDS__: ClassVar[tuple] = (
210
+ FieldMeta('single', 'single', True, 'object', ref='Emulation.SensorReadingSingle'),
211
+ FieldMeta('xyz', 'xyz', True, 'object', ref='Emulation.SensorReadingXYZ'),
212
+ FieldMeta('quaternion', 'quaternion', True, 'object', ref='Emulation.SensorReadingQuaternion'),
213
+ )
214
+
215
+
216
+ @register("Emulation.PressureSource")
217
+ class PressureSource(str, Enum):
218
+ CPU = 'cpu'
219
+
220
+
221
+ @register("Emulation.PressureState")
222
+ class PressureState(str, Enum):
223
+ NOMINAL = 'nominal'
224
+ FAIR = 'fair'
225
+ SERIOUS = 'serious'
226
+ CRITICAL = 'critical'
227
+
228
+
229
+ @register("Emulation.PressureMetadata")
230
+ @dataclass
231
+ class PressureMetadata(DataType):
232
+ available: Optional[bool] = None
233
+ __FIELDS__: ClassVar[tuple] = (
234
+ FieldMeta('available', 'available', True, 'primitive'),
235
+ )
236
+
237
+
238
+ @register("Emulation.WorkAreaInsets")
239
+ @dataclass
240
+ class WorkAreaInsets(DataType):
241
+ top: Optional[int] = None
242
+ left: Optional[int] = None
243
+ bottom: Optional[int] = None
244
+ right: Optional[int] = None
245
+ __FIELDS__: ClassVar[tuple] = (
246
+ FieldMeta('top', 'top', True, 'primitive'),
247
+ FieldMeta('left', 'left', True, 'primitive'),
248
+ FieldMeta('bottom', 'bottom', True, 'primitive'),
249
+ FieldMeta('right', 'right', True, 'primitive'),
250
+ )
251
+
252
+
253
+ type ScreenId = str
254
+
255
+
256
+ @register("Emulation.ScreenInfo")
257
+ @dataclass
258
+ class ScreenInfo(DataType):
259
+ """
260
+ Screen information similar to the one returned by window.getScreenDetails() method,
261
+ see https://w3c.github.io/window-management/#screendetailed.
262
+ """
263
+ left: int
264
+ top: int
265
+ width: int
266
+ height: int
267
+ avail_left: int
268
+ avail_top: int
269
+ avail_width: int
270
+ avail_height: int
271
+ device_pixel_ratio: float
272
+ orientation: ScreenOrientation
273
+ color_depth: int
274
+ is_extended: bool
275
+ is_internal: bool
276
+ is_primary: bool
277
+ label: str
278
+ id: ScreenId
279
+ __FIELDS__: ClassVar[tuple] = (
280
+ FieldMeta('left', 'left', False, 'primitive'),
281
+ FieldMeta('top', 'top', False, 'primitive'),
282
+ FieldMeta('width', 'width', False, 'primitive'),
283
+ FieldMeta('height', 'height', False, 'primitive'),
284
+ FieldMeta('avail_left', 'availLeft', False, 'primitive'),
285
+ FieldMeta('avail_top', 'availTop', False, 'primitive'),
286
+ FieldMeta('avail_width', 'availWidth', False, 'primitive'),
287
+ FieldMeta('avail_height', 'availHeight', False, 'primitive'),
288
+ FieldMeta('device_pixel_ratio', 'devicePixelRatio', False, 'primitive'),
289
+ FieldMeta('orientation', 'orientation', False, 'object', ref='Emulation.ScreenOrientation'),
290
+ FieldMeta('color_depth', 'colorDepth', False, 'primitive'),
291
+ FieldMeta('is_extended', 'isExtended', False, 'primitive'),
292
+ FieldMeta('is_internal', 'isInternal', False, 'primitive'),
293
+ FieldMeta('is_primary', 'isPrimary', False, 'primitive'),
294
+ FieldMeta('label', 'label', False, 'primitive'),
295
+ FieldMeta('id', 'id', False, 'primitive'),
296
+ )
297
+
298
+
299
+ @register("Emulation.DisabledImageType")
300
+ class DisabledImageType(str, Enum):
301
+ """Enum of image types that can be disabled."""
302
+ AVIF = 'avif'
303
+ WEBP = 'webp'
304
+
305
+ __all__ = ["DevicePosture", "DisabledImageType", "DisplayFeature", "MediaFeature", "PressureMetadata", "PressureSource", "PressureState", "SafeAreaInsets", "ScreenId", "ScreenInfo", "ScreenOrientation", "SensorMetadata", "SensorReading", "SensorReadingQuaternion", "SensorReadingSingle", "SensorReadingXYZ", "SensorType", "UserAgentBrandVersion", "UserAgentMetadata", "VirtualTimePolicy", "WorkAreaInsets"]
@@ -0,0 +1,15 @@
1
+ """The EventBreakpoints CDP domain (generated).
2
+
3
+ Importing ``EventBreakpoints`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``EventBreakpoints.SomeEvent`` /
5
+ ``EventBreakpoints.SomeType``); commands run on a target via ``page.cdp.EventBreakpoints``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import EventBreakpoints
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=(EventBreakpoints,)``).
13
+ DOMAIN = "EventBreakpoints"
14
+
15
+ __all__ = ["events", "functions", "types", "EventBreakpoints", "DOMAIN"]
@@ -0,0 +1,13 @@
1
+ """Events for the EventBreakpoints 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,41 @@
1
+ """Commands for the EventBreakpoints 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 EventBreakpoints:
11
+ """Commands of the EventBreakpoints domain, bound to a target."""
12
+
13
+ def __init__(self, target: Any) -> None:
14
+ self._target = target
15
+
16
+
17
+ async def set_instrumentation_breakpoint(self, *, event_name: str) -> None:
18
+ """
19
+ Sets breakpoint on particular native event.
20
+ :param event_name: Instrumentation name to stop on.
21
+ """
22
+ _params: Dict[str, Any] = {}
23
+ _params['eventName'] = encode(FieldMeta('', '', False, 'primitive'), event_name)
24
+ _result = await self._target.send('EventBreakpoints.setInstrumentationBreakpoint', _params)
25
+ return None
26
+
27
+ async def remove_instrumentation_breakpoint(self, *, event_name: str) -> None:
28
+ """
29
+ Removes breakpoint on particular native event.
30
+ :param event_name: Instrumentation name to stop on.
31
+ """
32
+ _params: Dict[str, Any] = {}
33
+ _params['eventName'] = encode(FieldMeta('', '', False, 'primitive'), event_name)
34
+ _result = await self._target.send('EventBreakpoints.removeInstrumentationBreakpoint', _params)
35
+ return None
36
+
37
+ async def disable(self) -> None:
38
+ """Removes all breakpoints"""
39
+ _params: Dict[str, Any] = {}
40
+ _result = await self._target.send('EventBreakpoints.disable', _params)
41
+ return None
@@ -0,0 +1,10 @@
1
+ """Custom types and enums for the EventBreakpoints 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 Extensions CDP domain (generated).
2
+
3
+ Importing ``Extensions`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``Extensions.SomeEvent`` /
5
+ ``Extensions.SomeType``); commands run on a target via ``page.cdp.Extensions``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import Extensions
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=(Extensions,)``).
13
+ DOMAIN = "Extensions"
14
+
15
+ __all__ = ["events", "functions", "types", "Extensions", "DOMAIN"]
@@ -0,0 +1,13 @@
1
+ """Events for the Extensions 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,118 @@
1
+ """Commands for the Extensions 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 StorageArea
11
+
12
+ @dataclass
13
+ class LoadUnpackedReturn(DataType):
14
+ """Return value of :meth:`Extensions.load_unpacked`."""
15
+ id: str
16
+ __FIELDS__: ClassVar[tuple] = (
17
+ FieldMeta('id', 'id', False, 'primitive'),
18
+ )
19
+
20
+
21
+ @dataclass
22
+ class GetStorageItemsReturn(DataType):
23
+ """Return value of :meth:`Extensions.get_storage_items`."""
24
+ data: Dict[str, Any]
25
+ __FIELDS__: ClassVar[tuple] = (
26
+ FieldMeta('data', 'data', False, 'primitive'),
27
+ )
28
+
29
+
30
+ class Extensions:
31
+ """Commands of the Extensions domain, bound to a target."""
32
+
33
+ def __init__(self, target: Any) -> None:
34
+ self._target = target
35
+
36
+
37
+ async def load_unpacked(self, *, path: str) -> LoadUnpackedReturn:
38
+ """
39
+ Installs an unpacked extension from the filesystem similar to
40
+ --load-extension CLI flags. Returns extension ID once the extension
41
+ has been installed. Available if the client is connected using the
42
+ --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging
43
+ flag is set.
44
+ :param path: Absolute file path.
45
+ """
46
+ _params: Dict[str, Any] = {}
47
+ _params['path'] = encode(FieldMeta('', '', False, 'primitive'), path)
48
+ _result = await self._target.send('Extensions.loadUnpacked', _params)
49
+ return LoadUnpackedReturn.from_json(_result)
50
+
51
+ async def uninstall(self, *, id: str) -> None:
52
+ """
53
+ Uninstalls an unpacked extension (others not supported) from the profile.
54
+ Available if the client is connected using the --remote-debugging-pipe flag
55
+ and the --enable-unsafe-extension-debugging.
56
+ :param id: Extension id.
57
+ """
58
+ _params: Dict[str, Any] = {}
59
+ _params['id'] = encode(FieldMeta('', '', False, 'primitive'), id)
60
+ _result = await self._target.send('Extensions.uninstall', _params)
61
+ return None
62
+
63
+ async def get_storage_items(self, *, id: str, storage_area: StorageArea, keys: Optional[List[str]] = None) -> GetStorageItemsReturn:
64
+ """
65
+ Gets data from extension storage in the given `storageArea`. If `keys` is
66
+ specified, these are used to filter the result.
67
+ :param id: ID of extension.
68
+ :param storage_area: StorageArea to retrieve data from.
69
+ :param keys: Keys to retrieve.
70
+ """
71
+ _params: Dict[str, Any] = {}
72
+ _params['id'] = encode(FieldMeta('', '', False, 'primitive'), id)
73
+ _params['storageArea'] = encode(FieldMeta('', '', False, 'enum', ref='Extensions.StorageArea'), storage_area)
74
+ if keys is not None:
75
+ _params['keys'] = encode(FieldMeta('', '', False, 'array', inner=FieldMeta('', '', False, 'primitive')), keys)
76
+ _result = await self._target.send('Extensions.getStorageItems', _params)
77
+ return GetStorageItemsReturn.from_json(_result)
78
+
79
+ async def remove_storage_items(self, *, id: str, storage_area: StorageArea, keys: List[str]) -> None:
80
+ """
81
+ Removes `keys` from extension storage in the given `storageArea`.
82
+ :param id: ID of extension.
83
+ :param storage_area: StorageArea to remove data from.
84
+ :param keys: Keys to remove.
85
+ """
86
+ _params: Dict[str, Any] = {}
87
+ _params['id'] = encode(FieldMeta('', '', False, 'primitive'), id)
88
+ _params['storageArea'] = encode(FieldMeta('', '', False, 'enum', ref='Extensions.StorageArea'), storage_area)
89
+ _params['keys'] = encode(FieldMeta('', '', False, 'array', inner=FieldMeta('', '', False, 'primitive')), keys)
90
+ _result = await self._target.send('Extensions.removeStorageItems', _params)
91
+ return None
92
+
93
+ async def clear_storage_items(self, *, id: str, storage_area: StorageArea) -> None:
94
+ """
95
+ Clears extension storage in the given `storageArea`.
96
+ :param id: ID of extension.
97
+ :param storage_area: StorageArea to remove data from.
98
+ """
99
+ _params: Dict[str, Any] = {}
100
+ _params['id'] = encode(FieldMeta('', '', False, 'primitive'), id)
101
+ _params['storageArea'] = encode(FieldMeta('', '', False, 'enum', ref='Extensions.StorageArea'), storage_area)
102
+ _result = await self._target.send('Extensions.clearStorageItems', _params)
103
+ return None
104
+
105
+ async def set_storage_items(self, *, id: str, storage_area: StorageArea, values: Dict[str, Any]) -> None:
106
+ """
107
+ Sets `values` in extension storage in the given `storageArea`. The provided `values`
108
+ will be merged with existing values in the storage area.
109
+ :param id: ID of extension.
110
+ :param storage_area: StorageArea to set data in.
111
+ :param values: Values to set.
112
+ """
113
+ _params: Dict[str, Any] = {}
114
+ _params['id'] = encode(FieldMeta('', '', False, 'primitive'), id)
115
+ _params['storageArea'] = encode(FieldMeta('', '', False, 'enum', ref='Extensions.StorageArea'), storage_area)
116
+ _params['values'] = encode(FieldMeta('', '', False, 'primitive'), values)
117
+ _result = await self._target.send('Extensions.setStorageItems', _params)
118
+ return None
@@ -0,0 +1,19 @@
1
+ """Custom types and enums for the Extensions 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
+ @register("Extensions.StorageArea")
12
+ class StorageArea(str, Enum):
13
+ """Storage areas."""
14
+ SESSION = 'session'
15
+ LOCAL = 'local'
16
+ SYNC = 'sync'
17
+ MANAGED = 'managed'
18
+
19
+ __all__ = ["StorageArea"]
@@ -0,0 +1,15 @@
1
+ """The FedCm CDP domain (generated).
2
+
3
+ Importing ``FedCm`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``FedCm.SomeEvent`` /
5
+ ``FedCm.SomeType``); commands run on a target via ``page.cdp.FedCm``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import FedCm
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=(FedCm,)``).
13
+ DOMAIN = "FedCm"
14
+
15
+ __all__ = ["events", "functions", "types", "FedCm", "DOMAIN"]
@@ -0,0 +1,45 @@
1
+ """Events for the FedCm 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
+ Account,
13
+ DialogType,
14
+ )
15
+
16
+ @register_event("FedCm.dialogShown")
17
+ @dataclass
18
+ class DialogShown(Event):
19
+ dialog_id: str
20
+ dialog_type: DialogType
21
+ accounts: List[Account]
22
+ title: str
23
+ subtitle: Optional[str] = None
24
+ __FIELDS__: ClassVar[tuple] = (
25
+ FieldMeta('dialog_id', 'dialogId', False, 'primitive'),
26
+ FieldMeta('dialog_type', 'dialogType', False, 'enum', ref='FedCm.DialogType'),
27
+ FieldMeta('accounts', 'accounts', False, 'array', inner=FieldMeta('', '', False, 'object', ref='FedCm.Account')),
28
+ FieldMeta('title', 'title', False, 'primitive'),
29
+ FieldMeta('subtitle', 'subtitle', True, 'primitive'),
30
+ )
31
+
32
+
33
+ @register_event("FedCm.dialogClosed")
34
+ @dataclass
35
+ class DialogClosed(Event):
36
+ """
37
+ Triggered when a dialog is closed, either by user action, JS abort,
38
+ or a command below.
39
+ """
40
+ dialog_id: str
41
+ __FIELDS__: ClassVar[tuple] = (
42
+ FieldMeta('dialog_id', 'dialogId', False, 'primitive'),
43
+ )
44
+
45
+ __all__ = ["DialogClosed", "DialogShown"]