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.
- parsek_cdp/__init__.py +55 -0
- parsek_cdp/_logging.py +49 -0
- parsek_cdp/cdp/__init__.py +247 -0
- parsek_cdp/cdp/accessibility/__init__.py +15 -0
- parsek_cdp/cdp/accessibility/events.py +35 -0
- parsek_cdp/cdp/accessibility/functions.py +202 -0
- parsek_cdp/cdp/accessibility/types.py +235 -0
- parsek_cdp/cdp/animation/__init__.py +15 -0
- parsek_cdp/cdp/animation/events.py +52 -0
- parsek_cdp/cdp/animation/functions.py +140 -0
- parsek_cdp/cdp/animation/types.py +113 -0
- parsek_cdp/cdp/audits/__init__.py +15 -0
- parsek_cdp/cdp/audits/events.py +21 -0
- parsek_cdp/cdp/audits/functions.py +95 -0
- parsek_cdp/cdp/audits/types.py +1051 -0
- parsek_cdp/cdp/autofill/__init__.py +15 -0
- parsek_cdp/cdp/autofill/events.py +27 -0
- parsek_cdp/cdp/autofill/functions.py +64 -0
- parsek_cdp/cdp/autofill/types.py +108 -0
- parsek_cdp/cdp/backgroundservice/__init__.py +15 -0
- parsek_cdp/cdp/backgroundservice/events.py +40 -0
- parsek_cdp/cdp/backgroundservice/functions.py +59 -0
- parsek_cdp/cdp/backgroundservice/types.py +63 -0
- parsek_cdp/cdp/bluetoothemulation/__init__.py +15 -0
- parsek_cdp/cdp/bluetoothemulation/events.py +70 -0
- parsek_cdp/cdp/bluetoothemulation/functions.py +247 -0
- parsek_cdp/cdp/bluetoothemulation/types.py +120 -0
- parsek_cdp/cdp/browser/__init__.py +15 -0
- parsek_cdp/cdp/browser/events.py +46 -0
- parsek_cdp/cdp/browser/functions.py +350 -0
- parsek_cdp/cdp/browser/types.py +158 -0
- parsek_cdp/cdp/cachestorage/__init__.py +15 -0
- parsek_cdp/cdp/cachestorage/events.py +13 -0
- parsek_cdp/cdp/cachestorage/functions.py +126 -0
- parsek_cdp/cdp/cachestorage/types.py +89 -0
- parsek_cdp/cdp/cast/__init__.py +15 -0
- parsek_cdp/cdp/cast/events.py +38 -0
- parsek_cdp/cdp/cast/functions.py +77 -0
- parsek_cdp/cdp/cast/types.py +23 -0
- parsek_cdp/cdp/console/__init__.py +15 -0
- parsek_cdp/cdp/console/events.py +22 -0
- parsek_cdp/cdp/console/functions.py +36 -0
- parsek_cdp/cdp/console/types.py +30 -0
- parsek_cdp/cdp/css/__init__.py +15 -0
- parsek_cdp/cdp/css/events.py +79 -0
- parsek_cdp/cdp/css/functions.py +788 -0
- parsek_cdp/cdp/css/types.py +742 -0
- parsek_cdp/cdp/debugger/__init__.py +15 -0
- parsek_cdp/cdp/debugger/events.py +164 -0
- parsek_cdp/cdp/debugger/functions.py +663 -0
- parsek_cdp/cdp/debugger/types.py +171 -0
- parsek_cdp/cdp/deviceaccess/__init__.py +15 -0
- parsek_cdp/cdp/deviceaccess/events.py +30 -0
- parsek_cdp/cdp/deviceaccess/functions.py +54 -0
- parsek_cdp/cdp/deviceaccess/types.py +28 -0
- parsek_cdp/cdp/deviceorientation/__init__.py +15 -0
- parsek_cdp/cdp/deviceorientation/events.py +13 -0
- parsek_cdp/cdp/deviceorientation/functions.py +35 -0
- parsek_cdp/cdp/deviceorientation/types.py +10 -0
- parsek_cdp/cdp/dom/__init__.py +15 -0
- parsek_cdp/cdp/dom/events.py +228 -0
- parsek_cdp/cdp/dom/functions.py +1033 -0
- parsek_cdp/cdp/dom/types.py +293 -0
- parsek_cdp/cdp/domdebugger/__init__.py +15 -0
- parsek_cdp/cdp/domdebugger/events.py +13 -0
- parsek_cdp/cdp/domdebugger/functions.py +155 -0
- parsek_cdp/cdp/domdebugger/types.py +57 -0
- parsek_cdp/cdp/domsnapshot/__init__.py +15 -0
- parsek_cdp/cdp/domsnapshot/events.py +13 -0
- parsek_cdp/cdp/domsnapshot/functions.py +111 -0
- parsek_cdp/cdp/domsnapshot/types.py +312 -0
- parsek_cdp/cdp/domstorage/__init__.py +15 -0
- parsek_cdp/cdp/domstorage/events.py +60 -0
- parsek_cdp/cdp/domstorage/functions.py +79 -0
- parsek_cdp/cdp/domstorage/types.py +30 -0
- parsek_cdp/cdp/emulation/__init__.py +15 -0
- parsek_cdp/cdp/emulation/events.py +17 -0
- parsek_cdp/cdp/emulation/functions.py +688 -0
- parsek_cdp/cdp/emulation/types.py +305 -0
- parsek_cdp/cdp/eventbreakpoints/__init__.py +15 -0
- parsek_cdp/cdp/eventbreakpoints/events.py +13 -0
- parsek_cdp/cdp/eventbreakpoints/functions.py +41 -0
- parsek_cdp/cdp/eventbreakpoints/types.py +10 -0
- parsek_cdp/cdp/extensions/__init__.py +15 -0
- parsek_cdp/cdp/extensions/events.py +13 -0
- parsek_cdp/cdp/extensions/functions.py +118 -0
- parsek_cdp/cdp/extensions/types.py +19 -0
- parsek_cdp/cdp/fedcm/__init__.py +15 -0
- parsek_cdp/cdp/fedcm/events.py +45 -0
- parsek_cdp/cdp/fedcm/functions.py +93 -0
- parsek_cdp/cdp/fedcm/types.py +72 -0
- parsek_cdp/cdp/fetch/__init__.py +15 -0
- parsek_cdp/cdp/fetch/events.py +82 -0
- parsek_cdp/cdp/fetch/functions.py +215 -0
- parsek_cdp/cdp/fetch/types.py +81 -0
- parsek_cdp/cdp/filesystem/__init__.py +15 -0
- parsek_cdp/cdp/filesystem/events.py +13 -0
- parsek_cdp/cdp/filesystem/functions.py +36 -0
- parsek_cdp/cdp/filesystem/types.py +54 -0
- parsek_cdp/cdp/headlessexperimental/__init__.py +15 -0
- parsek_cdp/cdp/headlessexperimental/events.py +13 -0
- parsek_cdp/cdp/headlessexperimental/functions.py +77 -0
- parsek_cdp/cdp/headlessexperimental/types.py +24 -0
- parsek_cdp/cdp/heapprofiler/__init__.py +15 -0
- parsek_cdp/cdp/heapprofiler/events.py +65 -0
- parsek_cdp/cdp/heapprofiler/functions.py +193 -0
- parsek_cdp/cdp/heapprofiler/types.py +57 -0
- parsek_cdp/cdp/indexeddb/__init__.py +15 -0
- parsek_cdp/cdp/indexeddb/events.py +13 -0
- parsek_cdp/cdp/indexeddb/functions.py +232 -0
- parsek_cdp/cdp/indexeddb/types.py +120 -0
- parsek_cdp/cdp/input/__init__.py +15 -0
- parsek_cdp/cdp/input/events.py +25 -0
- parsek_cdp/cdp/input/functions.py +361 -0
- parsek_cdp/cdp/input/types.py +87 -0
- parsek_cdp/cdp/inspector/__init__.py +15 -0
- parsek_cdp/cdp/inspector/events.py +41 -0
- parsek_cdp/cdp/inspector/functions.py +27 -0
- parsek_cdp/cdp/inspector/types.py +10 -0
- parsek_cdp/cdp/io/__init__.py +15 -0
- parsek_cdp/cdp/io/events.py +13 -0
- parsek_cdp/cdp/io/functions.py +77 -0
- parsek_cdp/cdp/io/types.py +13 -0
- parsek_cdp/cdp/layertree/__init__.py +15 -0
- parsek_cdp/cdp/layertree/events.py +36 -0
- parsek_cdp/cdp/layertree/functions.py +178 -0
- parsek_cdp/cdp/layertree/types.py +104 -0
- parsek_cdp/cdp/log/__init__.py +15 -0
- parsek_cdp/cdp/log/events.py +22 -0
- parsek_cdp/cdp/log/functions.py +54 -0
- parsek_cdp/cdp/log/types.py +57 -0
- parsek_cdp/cdp/media/__init__.py +15 -0
- parsek_cdp/cdp/media/events.py +87 -0
- parsek_cdp/cdp/media/functions.py +27 -0
- parsek_cdp/cdp/media/types.py +101 -0
- parsek_cdp/cdp/memory/__init__.py +15 -0
- parsek_cdp/cdp/memory/events.py +13 -0
- parsek_cdp/cdp/memory/functions.py +164 -0
- parsek_cdp/cdp/memory/types.py +71 -0
- parsek_cdp/cdp/mixins/__init__.py +21 -0
- parsek_cdp/cdp/mixins/datatype.py +123 -0
- parsek_cdp/cdp/mixins/event.py +78 -0
- parsek_cdp/cdp/mixins/namespace.py +31 -0
- parsek_cdp/cdp/network/__init__.py +15 -0
- parsek_cdp/cdp/network/events.py +726 -0
- parsek_cdp/cdp/network/functions.py +734 -0
- parsek_cdp/cdp/network/types.py +1247 -0
- parsek_cdp/cdp/overlay/__init__.py +15 -0
- parsek_cdp/cdp/overlay/events.py +54 -0
- parsek_cdp/cdp/overlay/functions.py +407 -0
- parsek_cdp/cdp/overlay/types.py +328 -0
- parsek_cdp/cdp/page/__init__.py +15 -0
- parsek_cdp/cdp/page/events.py +416 -0
- parsek_cdp/cdp/page/functions.py +1081 -0
- parsek_cdp/cdp/page/types.py +1088 -0
- parsek_cdp/cdp/performance/__init__.py +15 -0
- parsek_cdp/cdp/performance/events.py +24 -0
- parsek_cdp/cdp/performance/functions.py +63 -0
- parsek_cdp/cdp/performance/types.py +22 -0
- parsek_cdp/cdp/performancetimeline/__init__.py +15 -0
- parsek_cdp/cdp/performancetimeline/events.py +22 -0
- parsek_cdp/cdp/performancetimeline/functions.py +30 -0
- parsek_cdp/cdp/performancetimeline/types.py +85 -0
- parsek_cdp/cdp/preload/__init__.py +15 -0
- parsek_cdp/cdp/preload/events.py +116 -0
- parsek_cdp/cdp/preload/functions.py +25 -0
- parsek_cdp/cdp/preload/types.py +267 -0
- parsek_cdp/cdp/profiler/__init__.py +15 -0
- parsek_cdp/cdp/profiler/events.py +64 -0
- parsek_cdp/cdp/profiler/functions.py +134 -0
- parsek_cdp/cdp/profiler/types.py +105 -0
- parsek_cdp/cdp/pwa/__init__.py +15 -0
- parsek_cdp/cdp/pwa/events.py +13 -0
- parsek_cdp/cdp/pwa/functions.py +196 -0
- parsek_cdp/cdp/pwa/types.py +45 -0
- parsek_cdp/cdp/runtime/__init__.py +15 -0
- parsek_cdp/cdp/runtime/events.py +123 -0
- parsek_cdp/cdp/runtime/functions.py +552 -0
- parsek_cdp/cdp/runtime/types.py +319 -0
- parsek_cdp/cdp/schema/__init__.py +15 -0
- parsek_cdp/cdp/schema/events.py +13 -0
- parsek_cdp/cdp/schema/functions.py +32 -0
- parsek_cdp/cdp/schema/types.py +22 -0
- parsek_cdp/cdp/security/__init__.py +15 -0
- parsek_cdp/cdp/security/events.py +64 -0
- parsek_cdp/cdp/security/functions.py +66 -0
- parsek_cdp/cdp/security/types.py +168 -0
- parsek_cdp/cdp/serviceworker/__init__.py +15 -0
- parsek_cdp/cdp/serviceworker/events.py +43 -0
- parsek_cdp/cdp/serviceworker/functions.py +115 -0
- parsek_cdp/cdp/serviceworker/types.py +95 -0
- parsek_cdp/cdp/storage/__init__.py +15 -0
- parsek_cdp/cdp/storage/events.py +288 -0
- parsek_cdp/cdp/storage/functions.py +571 -0
- parsek_cdp/cdp/storage/types.py +656 -0
- parsek_cdp/cdp/systeminfo/__init__.py +15 -0
- parsek_cdp/cdp/systeminfo/events.py +13 -0
- parsek_cdp/cdp/systeminfo/functions.py +75 -0
- parsek_cdp/cdp/systeminfo/types.py +132 -0
- parsek_cdp/cdp/target/__init__.py +15 -0
- parsek_cdp/cdp/target/events.py +109 -0
- parsek_cdp/cdp/target/functions.py +424 -0
- parsek_cdp/cdp/target/types.py +83 -0
- parsek_cdp/cdp/tethering/__init__.py +15 -0
- parsek_cdp/cdp/tethering/events.py +22 -0
- parsek_cdp/cdp/tethering/functions.py +35 -0
- parsek_cdp/cdp/tethering/types.py +10 -0
- parsek_cdp/cdp/tracing/__init__.py +15 -0
- parsek_cdp/cdp/tracing/events.py +61 -0
- parsek_cdp/cdp/tracing/functions.py +119 -0
- parsek_cdp/cdp/tracing/types.py +81 -0
- parsek_cdp/cdp/webaudio/__init__.py +15 -0
- parsek_cdp/cdp/webaudio/events.py +184 -0
- parsek_cdp/cdp/webaudio/functions.py +51 -0
- parsek_cdp/cdp/webaudio/types.py +155 -0
- parsek_cdp/cdp/webauthn/__init__.py +15 -0
- parsek_cdp/cdp/webauthn/events.py +69 -0
- parsek_cdp/cdp/webauthn/functions.py +214 -0
- parsek_cdp/cdp/webauthn/types.py +96 -0
- parsek_cdp/core/__init__.py +18 -0
- parsek_cdp/core/browser.py +240 -0
- parsek_cdp/core/browser_context.py +58 -0
- parsek_cdp/core/element.py +405 -0
- parsek_cdp/core/feature.py +376 -0
- parsek_cdp/core/frame.py +351 -0
- parsek_cdp/core/pagable.py +175 -0
- parsek_cdp/core/page.py +163 -0
- parsek_cdp/core/target.py +490 -0
- parsek_cdp/features/__init__.py +14 -0
- parsek_cdp/features/request_listener/__init__.py +256 -0
- parsek_cdp/features/request_listener/events.py +48 -0
- parsek_cdp/features/request_listener/types.py +235 -0
- parsek_cdp/generate.py +642 -0
- parsek_cdp/parsek/__init__.py +18 -0
- parsek_cdp/parsek/events.py +38 -0
- parsek_cdp/parsek/types.py +36 -0
- parsek_cdp/py.typed +0 -0
- parsek_cdp-0.1.0.dist-info/METADATA +277 -0
- parsek_cdp-0.1.0.dist-info/RECORD +242 -0
- parsek_cdp-0.1.0.dist-info/WHEEL +5 -0
- parsek_cdp-0.1.0.dist-info/licenses/LICENSE +201 -0
- parsek_cdp-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"""Commands for the IndexedDB 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
|
+
DataEntry,
|
|
12
|
+
DatabaseWithObjectStores,
|
|
13
|
+
KeyRange,
|
|
14
|
+
)
|
|
15
|
+
from ..storage.types import StorageBucket as Storage_StorageBucket
|
|
16
|
+
|
|
17
|
+
@dataclass
|
|
18
|
+
class RequestDataReturn(DataType):
|
|
19
|
+
"""Return value of :meth:`IndexedDB.request_data`."""
|
|
20
|
+
object_store_data_entries: List[DataEntry]
|
|
21
|
+
has_more: bool
|
|
22
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
23
|
+
FieldMeta('object_store_data_entries', 'objectStoreDataEntries', False, 'array', inner=FieldMeta('', '', False, 'object', ref='IndexedDB.DataEntry')),
|
|
24
|
+
FieldMeta('has_more', 'hasMore', False, 'primitive'),
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@dataclass
|
|
29
|
+
class GetMetadataReturn(DataType):
|
|
30
|
+
"""Return value of :meth:`IndexedDB.get_metadata`."""
|
|
31
|
+
entries_count: float
|
|
32
|
+
key_generator_value: float
|
|
33
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
34
|
+
FieldMeta('entries_count', 'entriesCount', False, 'primitive'),
|
|
35
|
+
FieldMeta('key_generator_value', 'keyGeneratorValue', False, 'primitive'),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@dataclass
|
|
40
|
+
class RequestDatabaseReturn(DataType):
|
|
41
|
+
"""Return value of :meth:`IndexedDB.request_database`."""
|
|
42
|
+
database_with_object_stores: DatabaseWithObjectStores
|
|
43
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
44
|
+
FieldMeta('database_with_object_stores', 'databaseWithObjectStores', False, 'object', ref='IndexedDB.DatabaseWithObjectStores'),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@dataclass
|
|
49
|
+
class RequestDatabaseNamesReturn(DataType):
|
|
50
|
+
"""Return value of :meth:`IndexedDB.request_database_names`."""
|
|
51
|
+
database_names: List[str]
|
|
52
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
53
|
+
FieldMeta('database_names', 'databaseNames', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class IndexedDB:
|
|
58
|
+
"""Commands of the IndexedDB domain, bound to a target."""
|
|
59
|
+
|
|
60
|
+
def __init__(self, target: Any) -> None:
|
|
61
|
+
self._target = target
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
async def clear_object_store(self, *, database_name: str, object_store_name: str, security_origin: Optional[str] = None, storage_key: Optional[str] = None, storage_bucket: Optional[Storage_StorageBucket] = None) -> None:
|
|
65
|
+
"""
|
|
66
|
+
Clears all entries from an object store.
|
|
67
|
+
:param security_origin: At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
|
|
68
|
+
Security origin.
|
|
69
|
+
:param storage_key: Storage key.
|
|
70
|
+
:param storage_bucket: Storage bucket. If not specified, it uses the default bucket.
|
|
71
|
+
:param database_name: Database name.
|
|
72
|
+
:param object_store_name: Object store name.
|
|
73
|
+
"""
|
|
74
|
+
_params: Dict[str, Any] = {}
|
|
75
|
+
_params['databaseName'] = encode(FieldMeta('', '', False, 'primitive'), database_name)
|
|
76
|
+
_params['objectStoreName'] = encode(FieldMeta('', '', False, 'primitive'), object_store_name)
|
|
77
|
+
if security_origin is not None:
|
|
78
|
+
_params['securityOrigin'] = encode(FieldMeta('', '', False, 'primitive'), security_origin)
|
|
79
|
+
if storage_key is not None:
|
|
80
|
+
_params['storageKey'] = encode(FieldMeta('', '', False, 'primitive'), storage_key)
|
|
81
|
+
if storage_bucket is not None:
|
|
82
|
+
_params['storageBucket'] = encode(FieldMeta('', '', False, 'object', ref='Storage.StorageBucket'), storage_bucket)
|
|
83
|
+
_result = await self._target.send('IndexedDB.clearObjectStore', _params)
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
async def delete_database(self, *, database_name: str, security_origin: Optional[str] = None, storage_key: Optional[str] = None, storage_bucket: Optional[Storage_StorageBucket] = None) -> None:
|
|
87
|
+
"""
|
|
88
|
+
Deletes a database.
|
|
89
|
+
:param security_origin: At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
|
|
90
|
+
Security origin.
|
|
91
|
+
:param storage_key: Storage key.
|
|
92
|
+
:param storage_bucket: Storage bucket. If not specified, it uses the default bucket.
|
|
93
|
+
:param database_name: Database name.
|
|
94
|
+
"""
|
|
95
|
+
_params: Dict[str, Any] = {}
|
|
96
|
+
_params['databaseName'] = encode(FieldMeta('', '', False, 'primitive'), database_name)
|
|
97
|
+
if security_origin is not None:
|
|
98
|
+
_params['securityOrigin'] = encode(FieldMeta('', '', False, 'primitive'), security_origin)
|
|
99
|
+
if storage_key is not None:
|
|
100
|
+
_params['storageKey'] = encode(FieldMeta('', '', False, 'primitive'), storage_key)
|
|
101
|
+
if storage_bucket is not None:
|
|
102
|
+
_params['storageBucket'] = encode(FieldMeta('', '', False, 'object', ref='Storage.StorageBucket'), storage_bucket)
|
|
103
|
+
_result = await self._target.send('IndexedDB.deleteDatabase', _params)
|
|
104
|
+
return None
|
|
105
|
+
|
|
106
|
+
async def delete_object_store_entries(self, *, database_name: str, object_store_name: str, key_range: KeyRange, security_origin: Optional[str] = None, storage_key: Optional[str] = None, storage_bucket: Optional[Storage_StorageBucket] = None) -> None:
|
|
107
|
+
"""
|
|
108
|
+
Delete a range of entries from an object store
|
|
109
|
+
:param security_origin: At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
|
|
110
|
+
Security origin.
|
|
111
|
+
:param storage_key: Storage key.
|
|
112
|
+
:param storage_bucket: Storage bucket. If not specified, it uses the default bucket.
|
|
113
|
+
:param database_name:
|
|
114
|
+
:param object_store_name:
|
|
115
|
+
:param key_range: Range of entry keys to delete
|
|
116
|
+
"""
|
|
117
|
+
_params: Dict[str, Any] = {}
|
|
118
|
+
_params['databaseName'] = encode(FieldMeta('', '', False, 'primitive'), database_name)
|
|
119
|
+
_params['objectStoreName'] = encode(FieldMeta('', '', False, 'primitive'), object_store_name)
|
|
120
|
+
_params['keyRange'] = encode(FieldMeta('', '', False, 'object', ref='IndexedDB.KeyRange'), key_range)
|
|
121
|
+
if security_origin is not None:
|
|
122
|
+
_params['securityOrigin'] = encode(FieldMeta('', '', False, 'primitive'), security_origin)
|
|
123
|
+
if storage_key is not None:
|
|
124
|
+
_params['storageKey'] = encode(FieldMeta('', '', False, 'primitive'), storage_key)
|
|
125
|
+
if storage_bucket is not None:
|
|
126
|
+
_params['storageBucket'] = encode(FieldMeta('', '', False, 'object', ref='Storage.StorageBucket'), storage_bucket)
|
|
127
|
+
_result = await self._target.send('IndexedDB.deleteObjectStoreEntries', _params)
|
|
128
|
+
return None
|
|
129
|
+
|
|
130
|
+
async def disable(self) -> None:
|
|
131
|
+
"""Disables events from backend."""
|
|
132
|
+
_params: Dict[str, Any] = {}
|
|
133
|
+
_result = await self._target.send('IndexedDB.disable', _params)
|
|
134
|
+
return None
|
|
135
|
+
|
|
136
|
+
async def enable(self) -> None:
|
|
137
|
+
"""Enables events from backend."""
|
|
138
|
+
_params: Dict[str, Any] = {}
|
|
139
|
+
_result = await self._target.send('IndexedDB.enable', _params)
|
|
140
|
+
return None
|
|
141
|
+
|
|
142
|
+
async def request_data(self, *, database_name: str, object_store_name: str, skip_count: int, page_size: int, security_origin: Optional[str] = None, storage_key: Optional[str] = None, storage_bucket: Optional[Storage_StorageBucket] = None, index_name: Optional[str] = None, key_range: Optional[KeyRange] = None) -> RequestDataReturn:
|
|
143
|
+
"""
|
|
144
|
+
Requests data from object store or index.
|
|
145
|
+
:param security_origin: At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
|
|
146
|
+
Security origin.
|
|
147
|
+
:param storage_key: Storage key.
|
|
148
|
+
:param storage_bucket: Storage bucket. If not specified, it uses the default bucket.
|
|
149
|
+
:param database_name: Database name.
|
|
150
|
+
:param object_store_name: Object store name.
|
|
151
|
+
:param index_name: Index name. If not specified, it performs an object store data request.
|
|
152
|
+
:param skip_count: Number of records to skip.
|
|
153
|
+
:param page_size: Number of records to fetch.
|
|
154
|
+
:param key_range: Key range.
|
|
155
|
+
"""
|
|
156
|
+
_params: Dict[str, Any] = {}
|
|
157
|
+
_params['databaseName'] = encode(FieldMeta('', '', False, 'primitive'), database_name)
|
|
158
|
+
_params['objectStoreName'] = encode(FieldMeta('', '', False, 'primitive'), object_store_name)
|
|
159
|
+
_params['skipCount'] = encode(FieldMeta('', '', False, 'primitive'), skip_count)
|
|
160
|
+
_params['pageSize'] = encode(FieldMeta('', '', False, 'primitive'), page_size)
|
|
161
|
+
if security_origin is not None:
|
|
162
|
+
_params['securityOrigin'] = encode(FieldMeta('', '', False, 'primitive'), security_origin)
|
|
163
|
+
if storage_key is not None:
|
|
164
|
+
_params['storageKey'] = encode(FieldMeta('', '', False, 'primitive'), storage_key)
|
|
165
|
+
if storage_bucket is not None:
|
|
166
|
+
_params['storageBucket'] = encode(FieldMeta('', '', False, 'object', ref='Storage.StorageBucket'), storage_bucket)
|
|
167
|
+
if index_name is not None:
|
|
168
|
+
_params['indexName'] = encode(FieldMeta('', '', False, 'primitive'), index_name)
|
|
169
|
+
if key_range is not None:
|
|
170
|
+
_params['keyRange'] = encode(FieldMeta('', '', False, 'object', ref='IndexedDB.KeyRange'), key_range)
|
|
171
|
+
_result = await self._target.send('IndexedDB.requestData', _params)
|
|
172
|
+
return RequestDataReturn.from_json(_result)
|
|
173
|
+
|
|
174
|
+
async def get_metadata(self, *, database_name: str, object_store_name: str, security_origin: Optional[str] = None, storage_key: Optional[str] = None, storage_bucket: Optional[Storage_StorageBucket] = None) -> GetMetadataReturn:
|
|
175
|
+
"""
|
|
176
|
+
Gets metadata of an object store.
|
|
177
|
+
:param security_origin: At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
|
|
178
|
+
Security origin.
|
|
179
|
+
:param storage_key: Storage key.
|
|
180
|
+
:param storage_bucket: Storage bucket. If not specified, it uses the default bucket.
|
|
181
|
+
:param database_name: Database name.
|
|
182
|
+
:param object_store_name: Object store name.
|
|
183
|
+
"""
|
|
184
|
+
_params: Dict[str, Any] = {}
|
|
185
|
+
_params['databaseName'] = encode(FieldMeta('', '', False, 'primitive'), database_name)
|
|
186
|
+
_params['objectStoreName'] = encode(FieldMeta('', '', False, 'primitive'), object_store_name)
|
|
187
|
+
if security_origin is not None:
|
|
188
|
+
_params['securityOrigin'] = encode(FieldMeta('', '', False, 'primitive'), security_origin)
|
|
189
|
+
if storage_key is not None:
|
|
190
|
+
_params['storageKey'] = encode(FieldMeta('', '', False, 'primitive'), storage_key)
|
|
191
|
+
if storage_bucket is not None:
|
|
192
|
+
_params['storageBucket'] = encode(FieldMeta('', '', False, 'object', ref='Storage.StorageBucket'), storage_bucket)
|
|
193
|
+
_result = await self._target.send('IndexedDB.getMetadata', _params)
|
|
194
|
+
return GetMetadataReturn.from_json(_result)
|
|
195
|
+
|
|
196
|
+
async def request_database(self, *, database_name: str, security_origin: Optional[str] = None, storage_key: Optional[str] = None, storage_bucket: Optional[Storage_StorageBucket] = None) -> RequestDatabaseReturn:
|
|
197
|
+
"""
|
|
198
|
+
Requests database with given name in given frame.
|
|
199
|
+
:param security_origin: At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
|
|
200
|
+
Security origin.
|
|
201
|
+
:param storage_key: Storage key.
|
|
202
|
+
:param storage_bucket: Storage bucket. If not specified, it uses the default bucket.
|
|
203
|
+
:param database_name: Database name.
|
|
204
|
+
"""
|
|
205
|
+
_params: Dict[str, Any] = {}
|
|
206
|
+
_params['databaseName'] = encode(FieldMeta('', '', False, 'primitive'), database_name)
|
|
207
|
+
if security_origin is not None:
|
|
208
|
+
_params['securityOrigin'] = encode(FieldMeta('', '', False, 'primitive'), security_origin)
|
|
209
|
+
if storage_key is not None:
|
|
210
|
+
_params['storageKey'] = encode(FieldMeta('', '', False, 'primitive'), storage_key)
|
|
211
|
+
if storage_bucket is not None:
|
|
212
|
+
_params['storageBucket'] = encode(FieldMeta('', '', False, 'object', ref='Storage.StorageBucket'), storage_bucket)
|
|
213
|
+
_result = await self._target.send('IndexedDB.requestDatabase', _params)
|
|
214
|
+
return RequestDatabaseReturn.from_json(_result)
|
|
215
|
+
|
|
216
|
+
async def request_database_names(self, *, security_origin: Optional[str] = None, storage_key: Optional[str] = None, storage_bucket: Optional[Storage_StorageBucket] = None) -> RequestDatabaseNamesReturn:
|
|
217
|
+
"""
|
|
218
|
+
Requests database names for given security origin.
|
|
219
|
+
:param security_origin: At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
|
|
220
|
+
Security origin.
|
|
221
|
+
:param storage_key: Storage key.
|
|
222
|
+
:param storage_bucket: Storage bucket. If not specified, it uses the default bucket.
|
|
223
|
+
"""
|
|
224
|
+
_params: Dict[str, Any] = {}
|
|
225
|
+
if security_origin is not None:
|
|
226
|
+
_params['securityOrigin'] = encode(FieldMeta('', '', False, 'primitive'), security_origin)
|
|
227
|
+
if storage_key is not None:
|
|
228
|
+
_params['storageKey'] = encode(FieldMeta('', '', False, 'primitive'), storage_key)
|
|
229
|
+
if storage_bucket is not None:
|
|
230
|
+
_params['storageBucket'] = encode(FieldMeta('', '', False, 'object', ref='Storage.StorageBucket'), storage_bucket)
|
|
231
|
+
_result = await self._target.send('IndexedDB.requestDatabaseNames', _params)
|
|
232
|
+
return RequestDatabaseNamesReturn.from_json(_result)
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"""Custom types and enums for the IndexedDB 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
|
+
|
|
13
|
+
@register("IndexedDB.DatabaseWithObjectStores")
|
|
14
|
+
@dataclass
|
|
15
|
+
class DatabaseWithObjectStores(DataType):
|
|
16
|
+
"""Database with an array of object stores."""
|
|
17
|
+
name: str
|
|
18
|
+
version: float
|
|
19
|
+
object_stores: List[ObjectStore]
|
|
20
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
21
|
+
FieldMeta('name', 'name', False, 'primitive'),
|
|
22
|
+
FieldMeta('version', 'version', False, 'primitive'),
|
|
23
|
+
FieldMeta('object_stores', 'objectStores', False, 'array', inner=FieldMeta('', '', False, 'object', ref='IndexedDB.ObjectStore')),
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@register("IndexedDB.ObjectStore")
|
|
28
|
+
@dataclass
|
|
29
|
+
class ObjectStore(DataType):
|
|
30
|
+
"""Object store."""
|
|
31
|
+
name: str
|
|
32
|
+
key_path: KeyPath
|
|
33
|
+
auto_increment: bool
|
|
34
|
+
indexes: List[ObjectStoreIndex]
|
|
35
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
36
|
+
FieldMeta('name', 'name', False, 'primitive'),
|
|
37
|
+
FieldMeta('key_path', 'keyPath', False, 'object', ref='IndexedDB.KeyPath'),
|
|
38
|
+
FieldMeta('auto_increment', 'autoIncrement', False, 'primitive'),
|
|
39
|
+
FieldMeta('indexes', 'indexes', False, 'array', inner=FieldMeta('', '', False, 'object', ref='IndexedDB.ObjectStoreIndex')),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@register("IndexedDB.ObjectStoreIndex")
|
|
44
|
+
@dataclass
|
|
45
|
+
class ObjectStoreIndex(DataType):
|
|
46
|
+
"""Object store index."""
|
|
47
|
+
name: str
|
|
48
|
+
key_path: KeyPath
|
|
49
|
+
unique: bool
|
|
50
|
+
multi_entry: bool
|
|
51
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
52
|
+
FieldMeta('name', 'name', False, 'primitive'),
|
|
53
|
+
FieldMeta('key_path', 'keyPath', False, 'object', ref='IndexedDB.KeyPath'),
|
|
54
|
+
FieldMeta('unique', 'unique', False, 'primitive'),
|
|
55
|
+
FieldMeta('multi_entry', 'multiEntry', False, 'primitive'),
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@register("IndexedDB.Key")
|
|
60
|
+
@dataclass
|
|
61
|
+
class Key(DataType):
|
|
62
|
+
"""Key."""
|
|
63
|
+
type_: Literal['number', 'string', 'date', 'array']
|
|
64
|
+
number: Optional[float] = None
|
|
65
|
+
string: Optional[str] = None
|
|
66
|
+
date: Optional[float] = None
|
|
67
|
+
array: Optional[List[Key]] = None
|
|
68
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
69
|
+
FieldMeta('type_', 'type', False, 'primitive'),
|
|
70
|
+
FieldMeta('number', 'number', True, 'primitive'),
|
|
71
|
+
FieldMeta('string', 'string', True, 'primitive'),
|
|
72
|
+
FieldMeta('date', 'date', True, 'primitive'),
|
|
73
|
+
FieldMeta('array', 'array', True, 'array', inner=FieldMeta('', '', False, 'object', ref='IndexedDB.Key')),
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
@register("IndexedDB.KeyRange")
|
|
78
|
+
@dataclass
|
|
79
|
+
class KeyRange(DataType):
|
|
80
|
+
"""Key range."""
|
|
81
|
+
lower_open: bool
|
|
82
|
+
upper_open: bool
|
|
83
|
+
lower: Optional[Key] = None
|
|
84
|
+
upper: Optional[Key] = None
|
|
85
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
86
|
+
FieldMeta('lower_open', 'lowerOpen', False, 'primitive'),
|
|
87
|
+
FieldMeta('upper_open', 'upperOpen', False, 'primitive'),
|
|
88
|
+
FieldMeta('lower', 'lower', True, 'object', ref='IndexedDB.Key'),
|
|
89
|
+
FieldMeta('upper', 'upper', True, 'object', ref='IndexedDB.Key'),
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
@register("IndexedDB.DataEntry")
|
|
94
|
+
@dataclass
|
|
95
|
+
class DataEntry(DataType):
|
|
96
|
+
"""Data entry."""
|
|
97
|
+
key: Runtime_RemoteObject
|
|
98
|
+
primary_key: Runtime_RemoteObject
|
|
99
|
+
value: Runtime_RemoteObject
|
|
100
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
101
|
+
FieldMeta('key', 'key', False, 'object', ref='Runtime.RemoteObject'),
|
|
102
|
+
FieldMeta('primary_key', 'primaryKey', False, 'object', ref='Runtime.RemoteObject'),
|
|
103
|
+
FieldMeta('value', 'value', False, 'object', ref='Runtime.RemoteObject'),
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@register("IndexedDB.KeyPath")
|
|
108
|
+
@dataclass
|
|
109
|
+
class KeyPath(DataType):
|
|
110
|
+
"""Key path."""
|
|
111
|
+
type_: Literal['null', 'string', 'array']
|
|
112
|
+
string: Optional[str] = None
|
|
113
|
+
array: Optional[List[str]] = None
|
|
114
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
115
|
+
FieldMeta('type_', 'type', False, 'primitive'),
|
|
116
|
+
FieldMeta('string', 'string', True, 'primitive'),
|
|
117
|
+
FieldMeta('array', 'array', True, 'array', inner=FieldMeta('', '', False, 'primitive')),
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
__all__ = ["DataEntry", "DatabaseWithObjectStores", "Key", "KeyPath", "KeyRange", "ObjectStore", "ObjectStoreIndex"]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""The Input CDP domain (generated).
|
|
2
|
+
|
|
3
|
+
Importing ``Input`` from ``parsek_cdp.cdp`` gives a namespace with this
|
|
4
|
+
domain's events and types as attributes (``Input.SomeEvent`` /
|
|
5
|
+
``Input.SomeType``); commands run on a target via ``page.cdp.Input``.
|
|
6
|
+
"""
|
|
7
|
+
from . import events, functions, types
|
|
8
|
+
from .functions import Input
|
|
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=(Input,)``).
|
|
13
|
+
DOMAIN = "Input"
|
|
14
|
+
|
|
15
|
+
__all__ = ["events", "functions", "types", "Input", "DOMAIN"]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Events for the Input 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 DragData
|
|
12
|
+
|
|
13
|
+
@register_event("Input.dragIntercepted")
|
|
14
|
+
@dataclass
|
|
15
|
+
class DragIntercepted(Event):
|
|
16
|
+
"""
|
|
17
|
+
Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to
|
|
18
|
+
restore normal drag and drop behavior.
|
|
19
|
+
"""
|
|
20
|
+
data: DragData
|
|
21
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
22
|
+
FieldMeta('data', 'data', False, 'object', ref='Input.DragData'),
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
__all__ = ["DragIntercepted"]
|