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,168 @@
|
|
|
1
|
+
"""Custom types and enums for the Security 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
|
+
|
|
13
|
+
type CertificateId = int # An internal certificate ID value.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@register("Security.MixedContentType")
|
|
17
|
+
class MixedContentType(str, Enum):
|
|
18
|
+
"""
|
|
19
|
+
A description of mixed content (HTTP resources on HTTPS pages), as defined by
|
|
20
|
+
https://www.w3.org/TR/mixed-content/#categories
|
|
21
|
+
"""
|
|
22
|
+
BLOCKABLE = 'blockable'
|
|
23
|
+
OPTIONALLY_BLOCKABLE = 'optionally-blockable'
|
|
24
|
+
NONE = 'none'
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@register("Security.SecurityState")
|
|
28
|
+
class SecurityState(str, Enum):
|
|
29
|
+
"""The security level of a page or resource."""
|
|
30
|
+
UNKNOWN = 'unknown'
|
|
31
|
+
NEUTRAL = 'neutral'
|
|
32
|
+
INSECURE = 'insecure'
|
|
33
|
+
SECURE = 'secure'
|
|
34
|
+
INFO = 'info'
|
|
35
|
+
INSECURE_BROKEN = 'insecure-broken'
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@register("Security.CertificateSecurityState")
|
|
39
|
+
@dataclass
|
|
40
|
+
class CertificateSecurityState(DataType):
|
|
41
|
+
"""Details about the security state of the page certificate."""
|
|
42
|
+
protocol: str
|
|
43
|
+
key_exchange: str
|
|
44
|
+
cipher: str
|
|
45
|
+
certificate: List[str]
|
|
46
|
+
subject_name: str
|
|
47
|
+
issuer: str
|
|
48
|
+
valid_from: Network_TimeSinceEpoch
|
|
49
|
+
valid_to: Network_TimeSinceEpoch
|
|
50
|
+
certificate_has_weak_signature: bool
|
|
51
|
+
certificate_has_sha1_signature: bool
|
|
52
|
+
modern_ssl: bool
|
|
53
|
+
obsolete_ssl_protocol: bool
|
|
54
|
+
obsolete_ssl_key_exchange: bool
|
|
55
|
+
obsolete_ssl_cipher: bool
|
|
56
|
+
obsolete_ssl_signature: bool
|
|
57
|
+
key_exchange_group: Optional[str] = None
|
|
58
|
+
mac: Optional[str] = None
|
|
59
|
+
certificate_network_error: Optional[str] = None
|
|
60
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
61
|
+
FieldMeta('protocol', 'protocol', False, 'primitive'),
|
|
62
|
+
FieldMeta('key_exchange', 'keyExchange', False, 'primitive'),
|
|
63
|
+
FieldMeta('cipher', 'cipher', False, 'primitive'),
|
|
64
|
+
FieldMeta('certificate', 'certificate', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
|
|
65
|
+
FieldMeta('subject_name', 'subjectName', False, 'primitive'),
|
|
66
|
+
FieldMeta('issuer', 'issuer', False, 'primitive'),
|
|
67
|
+
FieldMeta('valid_from', 'validFrom', False, 'primitive'),
|
|
68
|
+
FieldMeta('valid_to', 'validTo', False, 'primitive'),
|
|
69
|
+
FieldMeta('certificate_has_weak_signature', 'certificateHasWeakSignature', False, 'primitive'),
|
|
70
|
+
FieldMeta('certificate_has_sha1_signature', 'certificateHasSha1Signature', False, 'primitive'),
|
|
71
|
+
FieldMeta('modern_ssl', 'modernSSL', False, 'primitive'),
|
|
72
|
+
FieldMeta('obsolete_ssl_protocol', 'obsoleteSslProtocol', False, 'primitive'),
|
|
73
|
+
FieldMeta('obsolete_ssl_key_exchange', 'obsoleteSslKeyExchange', False, 'primitive'),
|
|
74
|
+
FieldMeta('obsolete_ssl_cipher', 'obsoleteSslCipher', False, 'primitive'),
|
|
75
|
+
FieldMeta('obsolete_ssl_signature', 'obsoleteSslSignature', False, 'primitive'),
|
|
76
|
+
FieldMeta('key_exchange_group', 'keyExchangeGroup', True, 'primitive'),
|
|
77
|
+
FieldMeta('mac', 'mac', True, 'primitive'),
|
|
78
|
+
FieldMeta('certificate_network_error', 'certificateNetworkError', True, 'primitive'),
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
@register("Security.SafetyTipStatus")
|
|
83
|
+
class SafetyTipStatus(str, Enum):
|
|
84
|
+
BADREPUTATION = 'badReputation'
|
|
85
|
+
LOOKALIKE = 'lookalike'
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@register("Security.SafetyTipInfo")
|
|
89
|
+
@dataclass
|
|
90
|
+
class SafetyTipInfo(DataType):
|
|
91
|
+
safety_tip_status: SafetyTipStatus
|
|
92
|
+
safe_url: Optional[str] = None
|
|
93
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
94
|
+
FieldMeta('safety_tip_status', 'safetyTipStatus', False, 'enum', ref='Security.SafetyTipStatus'),
|
|
95
|
+
FieldMeta('safe_url', 'safeUrl', True, 'primitive'),
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@register("Security.VisibleSecurityState")
|
|
100
|
+
@dataclass
|
|
101
|
+
class VisibleSecurityState(DataType):
|
|
102
|
+
"""Security state information about the page."""
|
|
103
|
+
security_state: SecurityState
|
|
104
|
+
security_state_issue_ids: List[str]
|
|
105
|
+
certificate_security_state: Optional[CertificateSecurityState] = None
|
|
106
|
+
safety_tip_info: Optional[SafetyTipInfo] = None
|
|
107
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
108
|
+
FieldMeta('security_state', 'securityState', False, 'enum', ref='Security.SecurityState'),
|
|
109
|
+
FieldMeta('security_state_issue_ids', 'securityStateIssueIds', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
|
|
110
|
+
FieldMeta('certificate_security_state', 'certificateSecurityState', True, 'object', ref='Security.CertificateSecurityState'),
|
|
111
|
+
FieldMeta('safety_tip_info', 'safetyTipInfo', True, 'object', ref='Security.SafetyTipInfo'),
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@register("Security.SecurityStateExplanation")
|
|
116
|
+
@dataclass
|
|
117
|
+
class SecurityStateExplanation(DataType):
|
|
118
|
+
"""An explanation of an factor contributing to the security state."""
|
|
119
|
+
security_state: SecurityState
|
|
120
|
+
title: str
|
|
121
|
+
summary: str
|
|
122
|
+
description: str
|
|
123
|
+
mixed_content_type: MixedContentType
|
|
124
|
+
certificate: List[str]
|
|
125
|
+
recommendations: Optional[List[str]] = None
|
|
126
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
127
|
+
FieldMeta('security_state', 'securityState', False, 'enum', ref='Security.SecurityState'),
|
|
128
|
+
FieldMeta('title', 'title', False, 'primitive'),
|
|
129
|
+
FieldMeta('summary', 'summary', False, 'primitive'),
|
|
130
|
+
FieldMeta('description', 'description', False, 'primitive'),
|
|
131
|
+
FieldMeta('mixed_content_type', 'mixedContentType', False, 'enum', ref='Security.MixedContentType'),
|
|
132
|
+
FieldMeta('certificate', 'certificate', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
|
|
133
|
+
FieldMeta('recommendations', 'recommendations', True, 'array', inner=FieldMeta('', '', False, 'primitive')),
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
@register("Security.InsecureContentStatus")
|
|
138
|
+
@dataclass
|
|
139
|
+
class InsecureContentStatus(DataType):
|
|
140
|
+
"""Information about insecure content on the page."""
|
|
141
|
+
ran_mixed_content: bool
|
|
142
|
+
displayed_mixed_content: bool
|
|
143
|
+
contained_mixed_form: bool
|
|
144
|
+
ran_content_with_cert_errors: bool
|
|
145
|
+
displayed_content_with_cert_errors: bool
|
|
146
|
+
ran_insecure_content_style: SecurityState
|
|
147
|
+
displayed_insecure_content_style: SecurityState
|
|
148
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
149
|
+
FieldMeta('ran_mixed_content', 'ranMixedContent', False, 'primitive'),
|
|
150
|
+
FieldMeta('displayed_mixed_content', 'displayedMixedContent', False, 'primitive'),
|
|
151
|
+
FieldMeta('contained_mixed_form', 'containedMixedForm', False, 'primitive'),
|
|
152
|
+
FieldMeta('ran_content_with_cert_errors', 'ranContentWithCertErrors', False, 'primitive'),
|
|
153
|
+
FieldMeta('displayed_content_with_cert_errors', 'displayedContentWithCertErrors', False, 'primitive'),
|
|
154
|
+
FieldMeta('ran_insecure_content_style', 'ranInsecureContentStyle', False, 'enum', ref='Security.SecurityState'),
|
|
155
|
+
FieldMeta('displayed_insecure_content_style', 'displayedInsecureContentStyle', False, 'enum', ref='Security.SecurityState'),
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
@register("Security.CertificateErrorAction")
|
|
160
|
+
class CertificateErrorAction(str, Enum):
|
|
161
|
+
"""
|
|
162
|
+
The action to take when a certificate error occurs. continue will continue processing the
|
|
163
|
+
request and cancel will cancel the request.
|
|
164
|
+
"""
|
|
165
|
+
CONTINUE = 'continue'
|
|
166
|
+
CANCEL = 'cancel'
|
|
167
|
+
|
|
168
|
+
__all__ = ["CertificateErrorAction", "CertificateId", "CertificateSecurityState", "InsecureContentStatus", "MixedContentType", "SafetyTipInfo", "SafetyTipStatus", "SecurityState", "SecurityStateExplanation", "VisibleSecurityState"]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""The ServiceWorker CDP domain (generated).
|
|
2
|
+
|
|
3
|
+
Importing ``ServiceWorker`` from ``parsek_cdp.cdp`` gives a namespace with this
|
|
4
|
+
domain's events and types as attributes (``ServiceWorker.SomeEvent`` /
|
|
5
|
+
``ServiceWorker.SomeType``); commands run on a target via ``page.cdp.ServiceWorker``.
|
|
6
|
+
"""
|
|
7
|
+
from . import events, functions, types
|
|
8
|
+
from .functions import ServiceWorker
|
|
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=(ServiceWorker,)``).
|
|
13
|
+
DOMAIN = "ServiceWorker"
|
|
14
|
+
|
|
15
|
+
__all__ = ["events", "functions", "types", "ServiceWorker", "DOMAIN"]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Events for the ServiceWorker 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
|
+
ServiceWorkerErrorMessage,
|
|
13
|
+
ServiceWorkerRegistration,
|
|
14
|
+
ServiceWorkerVersion,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
@register_event("ServiceWorker.workerErrorReported")
|
|
18
|
+
@dataclass
|
|
19
|
+
class WorkerErrorReported(Event):
|
|
20
|
+
error_message: ServiceWorkerErrorMessage
|
|
21
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
22
|
+
FieldMeta('error_message', 'errorMessage', False, 'object', ref='ServiceWorker.ServiceWorkerErrorMessage'),
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@register_event("ServiceWorker.workerRegistrationUpdated")
|
|
27
|
+
@dataclass
|
|
28
|
+
class WorkerRegistrationUpdated(Event):
|
|
29
|
+
registrations: List[ServiceWorkerRegistration]
|
|
30
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
31
|
+
FieldMeta('registrations', 'registrations', False, 'array', inner=FieldMeta('', '', False, 'object', ref='ServiceWorker.ServiceWorkerRegistration')),
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@register_event("ServiceWorker.workerVersionUpdated")
|
|
36
|
+
@dataclass
|
|
37
|
+
class WorkerVersionUpdated(Event):
|
|
38
|
+
versions: List[ServiceWorkerVersion]
|
|
39
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
40
|
+
FieldMeta('versions', 'versions', False, 'array', inner=FieldMeta('', '', False, 'object', ref='ServiceWorker.ServiceWorkerVersion')),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
__all__ = ["WorkerErrorReported", "WorkerRegistrationUpdated", "WorkerVersionUpdated"]
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"""Commands for the ServiceWorker 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 RegistrationID
|
|
11
|
+
|
|
12
|
+
class ServiceWorker:
|
|
13
|
+
"""Commands of the ServiceWorker domain, bound to a target."""
|
|
14
|
+
|
|
15
|
+
def __init__(self, target: Any) -> None:
|
|
16
|
+
self._target = target
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
async def deliver_push_message(self, *, origin: str, registration_id: RegistrationID, data: str) -> None:
|
|
20
|
+
"""
|
|
21
|
+
:param origin:
|
|
22
|
+
:param registration_id:
|
|
23
|
+
:param data:
|
|
24
|
+
"""
|
|
25
|
+
_params: Dict[str, Any] = {}
|
|
26
|
+
_params['origin'] = encode(FieldMeta('', '', False, 'primitive'), origin)
|
|
27
|
+
_params['registrationId'] = encode(FieldMeta('', '', False, 'primitive'), registration_id)
|
|
28
|
+
_params['data'] = encode(FieldMeta('', '', False, 'primitive'), data)
|
|
29
|
+
_result = await self._target.send('ServiceWorker.deliverPushMessage', _params)
|
|
30
|
+
return None
|
|
31
|
+
|
|
32
|
+
async def disable(self) -> None:
|
|
33
|
+
_params: Dict[str, Any] = {}
|
|
34
|
+
_result = await self._target.send('ServiceWorker.disable', _params)
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
async def dispatch_sync_event(self, *, origin: str, registration_id: RegistrationID, tag: str, last_chance: bool) -> None:
|
|
38
|
+
"""
|
|
39
|
+
:param origin:
|
|
40
|
+
:param registration_id:
|
|
41
|
+
:param tag:
|
|
42
|
+
:param last_chance:
|
|
43
|
+
"""
|
|
44
|
+
_params: Dict[str, Any] = {}
|
|
45
|
+
_params['origin'] = encode(FieldMeta('', '', False, 'primitive'), origin)
|
|
46
|
+
_params['registrationId'] = encode(FieldMeta('', '', False, 'primitive'), registration_id)
|
|
47
|
+
_params['tag'] = encode(FieldMeta('', '', False, 'primitive'), tag)
|
|
48
|
+
_params['lastChance'] = encode(FieldMeta('', '', False, 'primitive'), last_chance)
|
|
49
|
+
_result = await self._target.send('ServiceWorker.dispatchSyncEvent', _params)
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
async def dispatch_periodic_sync_event(self, *, origin: str, registration_id: RegistrationID, tag: str) -> None:
|
|
53
|
+
"""
|
|
54
|
+
:param origin:
|
|
55
|
+
:param registration_id:
|
|
56
|
+
:param tag:
|
|
57
|
+
"""
|
|
58
|
+
_params: Dict[str, Any] = {}
|
|
59
|
+
_params['origin'] = encode(FieldMeta('', '', False, 'primitive'), origin)
|
|
60
|
+
_params['registrationId'] = encode(FieldMeta('', '', False, 'primitive'), registration_id)
|
|
61
|
+
_params['tag'] = encode(FieldMeta('', '', False, 'primitive'), tag)
|
|
62
|
+
_result = await self._target.send('ServiceWorker.dispatchPeriodicSyncEvent', _params)
|
|
63
|
+
return None
|
|
64
|
+
|
|
65
|
+
async def enable(self) -> None:
|
|
66
|
+
_params: Dict[str, Any] = {}
|
|
67
|
+
_result = await self._target.send('ServiceWorker.enable', _params)
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
async def set_force_update_on_page_load(self, *, force_update_on_page_load: bool) -> None:
|
|
71
|
+
""":param force_update_on_page_load:"""
|
|
72
|
+
_params: Dict[str, Any] = {}
|
|
73
|
+
_params['forceUpdateOnPageLoad'] = encode(FieldMeta('', '', False, 'primitive'), force_update_on_page_load)
|
|
74
|
+
_result = await self._target.send('ServiceWorker.setForceUpdateOnPageLoad', _params)
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
async def skip_waiting(self, *, scope_url: str) -> None:
|
|
78
|
+
""":param scope_url:"""
|
|
79
|
+
_params: Dict[str, Any] = {}
|
|
80
|
+
_params['scopeURL'] = encode(FieldMeta('', '', False, 'primitive'), scope_url)
|
|
81
|
+
_result = await self._target.send('ServiceWorker.skipWaiting', _params)
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
async def start_worker(self, *, scope_url: str) -> None:
|
|
85
|
+
""":param scope_url:"""
|
|
86
|
+
_params: Dict[str, Any] = {}
|
|
87
|
+
_params['scopeURL'] = encode(FieldMeta('', '', False, 'primitive'), scope_url)
|
|
88
|
+
_result = await self._target.send('ServiceWorker.startWorker', _params)
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
async def stop_all_workers(self) -> None:
|
|
92
|
+
_params: Dict[str, Any] = {}
|
|
93
|
+
_result = await self._target.send('ServiceWorker.stopAllWorkers', _params)
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
async def stop_worker(self, *, version_id: str) -> None:
|
|
97
|
+
""":param version_id:"""
|
|
98
|
+
_params: Dict[str, Any] = {}
|
|
99
|
+
_params['versionId'] = encode(FieldMeta('', '', False, 'primitive'), version_id)
|
|
100
|
+
_result = await self._target.send('ServiceWorker.stopWorker', _params)
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
async def unregister(self, *, scope_url: str) -> None:
|
|
104
|
+
""":param scope_url:"""
|
|
105
|
+
_params: Dict[str, Any] = {}
|
|
106
|
+
_params['scopeURL'] = encode(FieldMeta('', '', False, 'primitive'), scope_url)
|
|
107
|
+
_result = await self._target.send('ServiceWorker.unregister', _params)
|
|
108
|
+
return None
|
|
109
|
+
|
|
110
|
+
async def update_registration(self, *, scope_url: str) -> None:
|
|
111
|
+
""":param scope_url:"""
|
|
112
|
+
_params: Dict[str, Any] = {}
|
|
113
|
+
_params['scopeURL'] = encode(FieldMeta('', '', False, 'primitive'), scope_url)
|
|
114
|
+
_result = await self._target.send('ServiceWorker.updateRegistration', _params)
|
|
115
|
+
return None
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""Custom types and enums for the ServiceWorker 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 ..target.types import TargetID as Target_TargetID
|
|
12
|
+
|
|
13
|
+
type RegistrationID = str
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@register("ServiceWorker.ServiceWorkerRegistration")
|
|
17
|
+
@dataclass
|
|
18
|
+
class ServiceWorkerRegistration(DataType):
|
|
19
|
+
"""ServiceWorker registration."""
|
|
20
|
+
registration_id: RegistrationID
|
|
21
|
+
scope_url: str
|
|
22
|
+
is_deleted: bool
|
|
23
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
24
|
+
FieldMeta('registration_id', 'registrationId', False, 'primitive'),
|
|
25
|
+
FieldMeta('scope_url', 'scopeURL', False, 'primitive'),
|
|
26
|
+
FieldMeta('is_deleted', 'isDeleted', False, 'primitive'),
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@register("ServiceWorker.ServiceWorkerVersionRunningStatus")
|
|
31
|
+
class ServiceWorkerVersionRunningStatus(str, Enum):
|
|
32
|
+
STOPPED = 'stopped'
|
|
33
|
+
STARTING = 'starting'
|
|
34
|
+
RUNNING = 'running'
|
|
35
|
+
STOPPING = 'stopping'
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@register("ServiceWorker.ServiceWorkerVersionStatus")
|
|
39
|
+
class ServiceWorkerVersionStatus(str, Enum):
|
|
40
|
+
NEW = 'new'
|
|
41
|
+
INSTALLING = 'installing'
|
|
42
|
+
INSTALLED = 'installed'
|
|
43
|
+
ACTIVATING = 'activating'
|
|
44
|
+
ACTIVATED = 'activated'
|
|
45
|
+
REDUNDANT = 'redundant'
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@register("ServiceWorker.ServiceWorkerVersion")
|
|
49
|
+
@dataclass
|
|
50
|
+
class ServiceWorkerVersion(DataType):
|
|
51
|
+
"""ServiceWorker version."""
|
|
52
|
+
version_id: str
|
|
53
|
+
registration_id: RegistrationID
|
|
54
|
+
script_url: str
|
|
55
|
+
running_status: ServiceWorkerVersionRunningStatus
|
|
56
|
+
status: ServiceWorkerVersionStatus
|
|
57
|
+
script_last_modified: Optional[float] = None
|
|
58
|
+
script_response_time: Optional[float] = None
|
|
59
|
+
controlled_clients: Optional[List[Target_TargetID]] = None
|
|
60
|
+
target_id: Optional[Target_TargetID] = None
|
|
61
|
+
router_rules: Optional[str] = None
|
|
62
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
63
|
+
FieldMeta('version_id', 'versionId', False, 'primitive'),
|
|
64
|
+
FieldMeta('registration_id', 'registrationId', False, 'primitive'),
|
|
65
|
+
FieldMeta('script_url', 'scriptURL', False, 'primitive'),
|
|
66
|
+
FieldMeta('running_status', 'runningStatus', False, 'enum', ref='ServiceWorker.ServiceWorkerVersionRunningStatus'),
|
|
67
|
+
FieldMeta('status', 'status', False, 'enum', ref='ServiceWorker.ServiceWorkerVersionStatus'),
|
|
68
|
+
FieldMeta('script_last_modified', 'scriptLastModified', True, 'primitive'),
|
|
69
|
+
FieldMeta('script_response_time', 'scriptResponseTime', True, 'primitive'),
|
|
70
|
+
FieldMeta('controlled_clients', 'controlledClients', True, 'array', inner=FieldMeta('', '', False, 'primitive')),
|
|
71
|
+
FieldMeta('target_id', 'targetId', True, 'primitive'),
|
|
72
|
+
FieldMeta('router_rules', 'routerRules', True, 'primitive'),
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@register("ServiceWorker.ServiceWorkerErrorMessage")
|
|
77
|
+
@dataclass
|
|
78
|
+
class ServiceWorkerErrorMessage(DataType):
|
|
79
|
+
"""ServiceWorker error message."""
|
|
80
|
+
error_message: str
|
|
81
|
+
registration_id: RegistrationID
|
|
82
|
+
version_id: str
|
|
83
|
+
source_url: str
|
|
84
|
+
line_number: int
|
|
85
|
+
column_number: int
|
|
86
|
+
__FIELDS__: ClassVar[tuple] = (
|
|
87
|
+
FieldMeta('error_message', 'errorMessage', False, 'primitive'),
|
|
88
|
+
FieldMeta('registration_id', 'registrationId', False, 'primitive'),
|
|
89
|
+
FieldMeta('version_id', 'versionId', False, 'primitive'),
|
|
90
|
+
FieldMeta('source_url', 'sourceURL', False, 'primitive'),
|
|
91
|
+
FieldMeta('line_number', 'lineNumber', False, 'primitive'),
|
|
92
|
+
FieldMeta('column_number', 'columnNumber', False, 'primitive'),
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
__all__ = ["RegistrationID", "ServiceWorkerErrorMessage", "ServiceWorkerRegistration", "ServiceWorkerVersion", "ServiceWorkerVersionRunningStatus", "ServiceWorkerVersionStatus"]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""The Storage CDP domain (generated).
|
|
2
|
+
|
|
3
|
+
Importing ``Storage`` from ``parsek_cdp.cdp`` gives a namespace with this
|
|
4
|
+
domain's events and types as attributes (``Storage.SomeEvent`` /
|
|
5
|
+
``Storage.SomeType``); commands run on a target via ``page.cdp.Storage``.
|
|
6
|
+
"""
|
|
7
|
+
from . import events, functions, types
|
|
8
|
+
from .functions import Storage
|
|
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=(Storage,)``).
|
|
13
|
+
DOMAIN = "Storage"
|
|
14
|
+
|
|
15
|
+
__all__ = ["events", "functions", "types", "Storage", "DOMAIN"]
|