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,15 @@
1
+ """The Autofill CDP domain (generated).
2
+
3
+ Importing ``Autofill`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``Autofill.SomeEvent`` /
5
+ ``Autofill.SomeType``); commands run on a target via ``page.cdp.Autofill``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import Autofill
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=(Autofill,)``).
13
+ DOMAIN = "Autofill"
14
+
15
+ __all__ = ["events", "functions", "types", "Autofill", "DOMAIN"]
@@ -0,0 +1,27 @@
1
+ """Events for the Autofill 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
+ AddressUI,
13
+ FilledField,
14
+ )
15
+
16
+ @register_event("Autofill.addressFormFilled")
17
+ @dataclass
18
+ class AddressFormFilled(Event):
19
+ """Emitted when an address form is filled."""
20
+ filled_fields: List[FilledField]
21
+ address_ui: AddressUI
22
+ __FIELDS__: ClassVar[tuple] = (
23
+ FieldMeta('filled_fields', 'filledFields', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Autofill.FilledField')),
24
+ FieldMeta('address_ui', 'addressUi', False, 'object', ref='Autofill.AddressUI'),
25
+ )
26
+
27
+ __all__ = ["AddressFormFilled"]
@@ -0,0 +1,64 @@
1
+ """Commands for the Autofill 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
+ Address,
12
+ CreditCard,
13
+ )
14
+ from ..dom.types import BackendNodeId as DOM_BackendNodeId
15
+ from ..page.types import FrameId as Page_FrameId
16
+
17
+ class Autofill:
18
+ """Commands of the Autofill domain, bound to a target."""
19
+
20
+ def __init__(self, target: Any) -> None:
21
+ self._target = target
22
+
23
+
24
+ async def trigger(self, *, field_id: DOM_BackendNodeId, frame_id: Optional[Page_FrameId] = None, card: Optional[CreditCard] = None, address: Optional[Address] = None) -> None:
25
+ """
26
+ Trigger autofill on a form identified by the fieldId.
27
+ If the field and related form cannot be autofilled, returns an error.
28
+ :param field_id: Identifies a field that serves as an anchor for autofill.
29
+ :param frame_id: Identifies the frame that field belongs to.
30
+ :param card: Credit card information to fill out the form. Credit card data is not saved. Mutually exclusive with `address`.
31
+ :param address: Address to fill out the form. Address data is not saved. Mutually exclusive with `card`.
32
+ """
33
+ _params: Dict[str, Any] = {}
34
+ _params['fieldId'] = encode(FieldMeta('', '', False, 'primitive'), field_id)
35
+ if frame_id is not None:
36
+ _params['frameId'] = encode(FieldMeta('', '', False, 'primitive'), frame_id)
37
+ if card is not None:
38
+ _params['card'] = encode(FieldMeta('', '', False, 'object', ref='Autofill.CreditCard'), card)
39
+ if address is not None:
40
+ _params['address'] = encode(FieldMeta('', '', False, 'object', ref='Autofill.Address'), address)
41
+ _result = await self._target.send('Autofill.trigger', _params)
42
+ return None
43
+
44
+ async def set_addresses(self, *, addresses: List[Address]) -> None:
45
+ """
46
+ Set addresses so that developers can verify their forms implementation.
47
+ :param addresses:
48
+ """
49
+ _params: Dict[str, Any] = {}
50
+ _params['addresses'] = encode(FieldMeta('', '', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Autofill.Address')), addresses)
51
+ _result = await self._target.send('Autofill.setAddresses', _params)
52
+ return None
53
+
54
+ async def disable(self) -> None:
55
+ """Disables autofill domain notifications."""
56
+ _params: Dict[str, Any] = {}
57
+ _result = await self._target.send('Autofill.disable', _params)
58
+ return None
59
+
60
+ async def enable(self) -> None:
61
+ """Enables autofill domain notifications."""
62
+ _params: Dict[str, Any] = {}
63
+ _result = await self._target.send('Autofill.enable', _params)
64
+ return None
@@ -0,0 +1,108 @@
1
+ """Custom types and enums for the Autofill 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 ..dom.types import BackendNodeId as DOM_BackendNodeId
12
+ from ..page.types import FrameId as Page_FrameId
13
+
14
+ @register("Autofill.CreditCard")
15
+ @dataclass
16
+ class CreditCard(DataType):
17
+ number: str
18
+ name: str
19
+ expiry_month: str
20
+ expiry_year: str
21
+ cvc: str
22
+ __FIELDS__: ClassVar[tuple] = (
23
+ FieldMeta('number', 'number', False, 'primitive'),
24
+ FieldMeta('name', 'name', False, 'primitive'),
25
+ FieldMeta('expiry_month', 'expiryMonth', False, 'primitive'),
26
+ FieldMeta('expiry_year', 'expiryYear', False, 'primitive'),
27
+ FieldMeta('cvc', 'cvc', False, 'primitive'),
28
+ )
29
+
30
+
31
+ @register("Autofill.AddressField")
32
+ @dataclass
33
+ class AddressField(DataType):
34
+ name: str
35
+ value: str
36
+ __FIELDS__: ClassVar[tuple] = (
37
+ FieldMeta('name', 'name', False, 'primitive'),
38
+ FieldMeta('value', 'value', False, 'primitive'),
39
+ )
40
+
41
+
42
+ @register("Autofill.AddressFields")
43
+ @dataclass
44
+ class AddressFields(DataType):
45
+ """A list of address fields."""
46
+ fields: List[AddressField]
47
+ __FIELDS__: ClassVar[tuple] = (
48
+ FieldMeta('fields', 'fields', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Autofill.AddressField')),
49
+ )
50
+
51
+
52
+ @register("Autofill.Address")
53
+ @dataclass
54
+ class Address(DataType):
55
+ fields: List[AddressField]
56
+ __FIELDS__: ClassVar[tuple] = (
57
+ FieldMeta('fields', 'fields', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Autofill.AddressField')),
58
+ )
59
+
60
+
61
+ @register("Autofill.AddressUI")
62
+ @dataclass
63
+ class AddressUI(DataType):
64
+ """
65
+ Defines how an address can be displayed like in chrome://settings/addresses.
66
+ Address UI is a two dimensional array, each inner array is an "address information line", and when rendered in a UI surface should be displayed as such.
67
+ The following address UI for instance:
68
+ [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]]
69
+ should allow the receiver to render:
70
+ Jon Doe
71
+ Munich 81456
72
+ """
73
+ address_fields: List[AddressFields]
74
+ __FIELDS__: ClassVar[tuple] = (
75
+ FieldMeta('address_fields', 'addressFields', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Autofill.AddressFields')),
76
+ )
77
+
78
+
79
+ @register("Autofill.FillingStrategy")
80
+ class FillingStrategy(str, Enum):
81
+ """Specified whether a filled field was done so by using the html autocomplete attribute or autofill heuristics."""
82
+ AUTOCOMPLETEATTRIBUTE = 'autocompleteAttribute'
83
+ AUTOFILLINFERRED = 'autofillInferred'
84
+
85
+
86
+ @register("Autofill.FilledField")
87
+ @dataclass
88
+ class FilledField(DataType):
89
+ html_type: str
90
+ id: str
91
+ name: str
92
+ value: str
93
+ autofill_type: str
94
+ filling_strategy: FillingStrategy
95
+ frame_id: Page_FrameId
96
+ field_id: DOM_BackendNodeId
97
+ __FIELDS__: ClassVar[tuple] = (
98
+ FieldMeta('html_type', 'htmlType', False, 'primitive'),
99
+ FieldMeta('id', 'id', False, 'primitive'),
100
+ FieldMeta('name', 'name', False, 'primitive'),
101
+ FieldMeta('value', 'value', False, 'primitive'),
102
+ FieldMeta('autofill_type', 'autofillType', False, 'primitive'),
103
+ FieldMeta('filling_strategy', 'fillingStrategy', False, 'enum', ref='Autofill.FillingStrategy'),
104
+ FieldMeta('frame_id', 'frameId', False, 'primitive'),
105
+ FieldMeta('field_id', 'fieldId', False, 'primitive'),
106
+ )
107
+
108
+ __all__ = ["Address", "AddressField", "AddressFields", "AddressUI", "CreditCard", "FilledField", "FillingStrategy"]
@@ -0,0 +1,15 @@
1
+ """The BackgroundService CDP domain (generated).
2
+
3
+ Importing ``BackgroundService`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``BackgroundService.SomeEvent`` /
5
+ ``BackgroundService.SomeType``); commands run on a target via ``page.cdp.BackgroundService``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import BackgroundService
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=(BackgroundService,)``).
13
+ DOMAIN = "BackgroundService"
14
+
15
+ __all__ = ["events", "functions", "types", "BackgroundService", "DOMAIN"]
@@ -0,0 +1,40 @@
1
+ """Events for the BackgroundService 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
+ BackgroundServiceEvent,
13
+ ServiceName,
14
+ )
15
+
16
+ @register_event("BackgroundService.recordingStateChanged")
17
+ @dataclass
18
+ class RecordingStateChanged(Event):
19
+ """Called when the recording state for the service has been updated."""
20
+ is_recording: bool
21
+ service: ServiceName
22
+ __FIELDS__: ClassVar[tuple] = (
23
+ FieldMeta('is_recording', 'isRecording', False, 'primitive'),
24
+ FieldMeta('service', 'service', False, 'enum', ref='BackgroundService.ServiceName'),
25
+ )
26
+
27
+
28
+ @register_event("BackgroundService.backgroundServiceEventReceived")
29
+ @dataclass
30
+ class BackgroundServiceEventReceived(Event):
31
+ """
32
+ Called with all existing backgroundServiceEvents when enabled, and all new
33
+ events afterwards if enabled and recording.
34
+ """
35
+ background_service_event: BackgroundServiceEvent
36
+ __FIELDS__: ClassVar[tuple] = (
37
+ FieldMeta('background_service_event', 'backgroundServiceEvent', False, 'object', ref='BackgroundService.BackgroundServiceEvent'),
38
+ )
39
+
40
+ __all__ = ["BackgroundServiceEventReceived", "RecordingStateChanged"]
@@ -0,0 +1,59 @@
1
+ """Commands for the BackgroundService 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 ServiceName
11
+
12
+ class BackgroundService:
13
+ """Commands of the BackgroundService domain, bound to a target."""
14
+
15
+ def __init__(self, target: Any) -> None:
16
+ self._target = target
17
+
18
+
19
+ async def start_observing(self, *, service: ServiceName) -> None:
20
+ """
21
+ Enables event updates for the service.
22
+ :param service:
23
+ """
24
+ _params: Dict[str, Any] = {}
25
+ _params['service'] = encode(FieldMeta('', '', False, 'enum', ref='BackgroundService.ServiceName'), service)
26
+ _result = await self._target.send('BackgroundService.startObserving', _params)
27
+ return None
28
+
29
+ async def stop_observing(self, *, service: ServiceName) -> None:
30
+ """
31
+ Disables event updates for the service.
32
+ :param service:
33
+ """
34
+ _params: Dict[str, Any] = {}
35
+ _params['service'] = encode(FieldMeta('', '', False, 'enum', ref='BackgroundService.ServiceName'), service)
36
+ _result = await self._target.send('BackgroundService.stopObserving', _params)
37
+ return None
38
+
39
+ async def set_recording(self, *, should_record: bool, service: ServiceName) -> None:
40
+ """
41
+ Set the recording state for the service.
42
+ :param should_record:
43
+ :param service:
44
+ """
45
+ _params: Dict[str, Any] = {}
46
+ _params['shouldRecord'] = encode(FieldMeta('', '', False, 'primitive'), should_record)
47
+ _params['service'] = encode(FieldMeta('', '', False, 'enum', ref='BackgroundService.ServiceName'), service)
48
+ _result = await self._target.send('BackgroundService.setRecording', _params)
49
+ return None
50
+
51
+ async def clear_events(self, *, service: ServiceName) -> None:
52
+ """
53
+ Clears all stored data for the service.
54
+ :param service:
55
+ """
56
+ _params: Dict[str, Any] = {}
57
+ _params['service'] = encode(FieldMeta('', '', False, 'enum', ref='BackgroundService.ServiceName'), service)
58
+ _result = await self._target.send('BackgroundService.clearEvents', _params)
59
+ return None
@@ -0,0 +1,63 @@
1
+ """Custom types and enums for the BackgroundService 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 ..network.types import TimeSinceEpoch as Network_TimeSinceEpoch
12
+ from ..serviceworker.types import RegistrationID as ServiceWorker_RegistrationID
13
+
14
+ @register("BackgroundService.ServiceName")
15
+ class ServiceName(str, Enum):
16
+ """
17
+ The Background Service that will be associated with the commands/events.
18
+ Every Background Service operates independently, but they share the same
19
+ API.
20
+ """
21
+ BACKGROUNDFETCH = 'backgroundFetch'
22
+ BACKGROUNDSYNC = 'backgroundSync'
23
+ PUSHMESSAGING = 'pushMessaging'
24
+ NOTIFICATIONS = 'notifications'
25
+ PAYMENTHANDLER = 'paymentHandler'
26
+ PERIODICBACKGROUNDSYNC = 'periodicBackgroundSync'
27
+
28
+
29
+ @register("BackgroundService.EventMetadata")
30
+ @dataclass
31
+ class EventMetadata(DataType):
32
+ """A key-value pair for additional event information to pass along."""
33
+ key: str
34
+ value: str
35
+ __FIELDS__: ClassVar[tuple] = (
36
+ FieldMeta('key', 'key', False, 'primitive'),
37
+ FieldMeta('value', 'value', False, 'primitive'),
38
+ )
39
+
40
+
41
+ @register("BackgroundService.BackgroundServiceEvent")
42
+ @dataclass
43
+ class BackgroundServiceEvent(DataType):
44
+ timestamp: Network_TimeSinceEpoch
45
+ origin: str
46
+ service_worker_registration_id: ServiceWorker_RegistrationID
47
+ service: ServiceName
48
+ event_name: str
49
+ instance_id: str
50
+ event_metadata: List[EventMetadata]
51
+ storage_key: str
52
+ __FIELDS__: ClassVar[tuple] = (
53
+ FieldMeta('timestamp', 'timestamp', False, 'primitive'),
54
+ FieldMeta('origin', 'origin', False, 'primitive'),
55
+ FieldMeta('service_worker_registration_id', 'serviceWorkerRegistrationId', False, 'primitive'),
56
+ FieldMeta('service', 'service', False, 'enum', ref='BackgroundService.ServiceName'),
57
+ FieldMeta('event_name', 'eventName', False, 'primitive'),
58
+ FieldMeta('instance_id', 'instanceId', False, 'primitive'),
59
+ FieldMeta('event_metadata', 'eventMetadata', False, 'array', inner=FieldMeta('', '', False, 'object', ref='BackgroundService.EventMetadata')),
60
+ FieldMeta('storage_key', 'storageKey', False, 'primitive'),
61
+ )
62
+
63
+ __all__ = ["BackgroundServiceEvent", "EventMetadata", "ServiceName"]
@@ -0,0 +1,15 @@
1
+ """The BluetoothEmulation CDP domain (generated).
2
+
3
+ Importing ``BluetoothEmulation`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``BluetoothEmulation.SomeEvent`` /
5
+ ``BluetoothEmulation.SomeType``); commands run on a target via ``page.cdp.BluetoothEmulation``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import BluetoothEmulation
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=(BluetoothEmulation,)``).
13
+ DOMAIN = "BluetoothEmulation"
14
+
15
+ __all__ = ["events", "functions", "types", "BluetoothEmulation", "DOMAIN"]
@@ -0,0 +1,70 @@
1
+ """Events for the BluetoothEmulation 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
+ CharacteristicOperationType,
13
+ CharacteristicWriteType,
14
+ DescriptorOperationType,
15
+ GATTOperationType,
16
+ )
17
+
18
+ @register_event("BluetoothEmulation.gattOperationReceived")
19
+ @dataclass
20
+ class GattOperationReceived(Event):
21
+ """
22
+ Event for when a GATT operation of |type| to the peripheral with |address|
23
+ happened.
24
+ """
25
+ address: str
26
+ type_: GATTOperationType
27
+ __FIELDS__: ClassVar[tuple] = (
28
+ FieldMeta('address', 'address', False, 'primitive'),
29
+ FieldMeta('type_', 'type', False, 'enum', ref='BluetoothEmulation.GATTOperationType'),
30
+ )
31
+
32
+
33
+ @register_event("BluetoothEmulation.characteristicOperationReceived")
34
+ @dataclass
35
+ class CharacteristicOperationReceived(Event):
36
+ """
37
+ Event for when a characteristic operation of |type| to the characteristic
38
+ respresented by |characteristicId| happened. |data| and |writeType| is
39
+ expected to exist when |type| is write.
40
+ """
41
+ characteristic_id: str
42
+ type_: CharacteristicOperationType
43
+ data: Optional[str] = None
44
+ write_type: Optional[CharacteristicWriteType] = None
45
+ __FIELDS__: ClassVar[tuple] = (
46
+ FieldMeta('characteristic_id', 'characteristicId', False, 'primitive'),
47
+ FieldMeta('type_', 'type', False, 'enum', ref='BluetoothEmulation.CharacteristicOperationType'),
48
+ FieldMeta('data', 'data', True, 'primitive'),
49
+ FieldMeta('write_type', 'writeType', True, 'enum', ref='BluetoothEmulation.CharacteristicWriteType'),
50
+ )
51
+
52
+
53
+ @register_event("BluetoothEmulation.descriptorOperationReceived")
54
+ @dataclass
55
+ class DescriptorOperationReceived(Event):
56
+ """
57
+ Event for when a descriptor operation of |type| to the descriptor
58
+ respresented by |descriptorId| happened. |data| is expected to exist when
59
+ |type| is write.
60
+ """
61
+ descriptor_id: str
62
+ type_: DescriptorOperationType
63
+ data: Optional[str] = None
64
+ __FIELDS__: ClassVar[tuple] = (
65
+ FieldMeta('descriptor_id', 'descriptorId', False, 'primitive'),
66
+ FieldMeta('type_', 'type', False, 'enum', ref='BluetoothEmulation.DescriptorOperationType'),
67
+ FieldMeta('data', 'data', True, 'primitive'),
68
+ )
69
+
70
+ __all__ = ["CharacteristicOperationReceived", "DescriptorOperationReceived", "GattOperationReceived"]