chromedeveloperprotocol-client 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.
- cdp/__init__.py +4 -0
- cdp/domains.py +582 -0
- cdp/generator/__init__.py +3 -0
- cdp/generator/client_generator.py +246 -0
- cdp/generator/constant.py +4 -0
- cdp/generator/domain_generator.py +149 -0
- cdp/generator/event_generator.py +202 -0
- cdp/generator/method_generator.py +215 -0
- cdp/generator/service.py +153 -0
- cdp/generator/type_generator.py +231 -0
- cdp/protocol/__init__.py +0 -0
- cdp/protocol/accessibility/__init__.py +0 -0
- cdp/protocol/accessibility/events/__init__.py +0 -0
- cdp/protocol/accessibility/events/service.py +37 -0
- cdp/protocol/accessibility/events/types.py +14 -0
- cdp/protocol/accessibility/methods/__init__.py +0 -0
- cdp/protocol/accessibility/methods/service.py +109 -0
- cdp/protocol/accessibility/methods/types.py +70 -0
- cdp/protocol/accessibility/service.py +21 -0
- cdp/protocol/accessibility/types.py +89 -0
- cdp/protocol/animation/__init__.py +0 -0
- cdp/protocol/animation/events/__init__.py +0 -0
- cdp/protocol/animation/events/service.py +53 -0
- cdp/protocol/animation/events/types.py +20 -0
- cdp/protocol/animation/methods/__init__.py +0 -0
- cdp/protocol/animation/methods/service.py +131 -0
- cdp/protocol/animation/methods/types.py +52 -0
- cdp/protocol/animation/service.py +21 -0
- cdp/protocol/animation/types.py +79 -0
- cdp/protocol/audits/__init__.py +0 -0
- cdp/protocol/audits/events/__init__.py +0 -0
- cdp/protocol/audits/events/service.py +29 -0
- cdp/protocol/audits/events/types.py +10 -0
- cdp/protocol/audits/methods/__init__.py +0 -0
- cdp/protocol/audits/methods/service.py +76 -0
- cdp/protocol/audits/methods/types.py +36 -0
- cdp/protocol/audits/service.py +21 -0
- cdp/protocol/audits/types.py +293 -0
- cdp/protocol/autofill/__init__.py +0 -0
- cdp/protocol/autofill/events/__init__.py +0 -0
- cdp/protocol/autofill/events/service.py +29 -0
- cdp/protocol/autofill/events/types.py +14 -0
- cdp/protocol/autofill/methods/__init__.py +0 -0
- cdp/protocol/autofill/methods/service.py +65 -0
- cdp/protocol/autofill/methods/types.py +22 -0
- cdp/protocol/autofill/service.py +21 -0
- cdp/protocol/autofill/types.py +54 -0
- cdp/protocol/background_service/__init__.py +0 -0
- cdp/protocol/background_service/events/__init__.py +0 -0
- cdp/protocol/background_service/events/service.py +37 -0
- cdp/protocol/background_service/events/types.py +14 -0
- cdp/protocol/background_service/methods/__init__.py +0 -0
- cdp/protocol/background_service/methods/service.py +65 -0
- cdp/protocol/background_service/methods/types.py +17 -0
- cdp/protocol/background_service/service.py +21 -0
- cdp/protocol/background_service/types.py +32 -0
- cdp/protocol/bluetooth_emulation/__init__.py +0 -0
- cdp/protocol/bluetooth_emulation/events/__init__.py +0 -0
- cdp/protocol/bluetooth_emulation/events/service.py +45 -0
- cdp/protocol/bluetooth_emulation/events/types.py +23 -0
- cdp/protocol/bluetooth_emulation/methods/__init__.py +0 -0
- cdp/protocol/bluetooth_emulation/methods/service.py +186 -0
- cdp/protocol/bluetooth_emulation/methods/types.py +81 -0
- cdp/protocol/bluetooth_emulation/service.py +21 -0
- cdp/protocol/bluetooth_emulation/types.py +45 -0
- cdp/protocol/browser/__init__.py +0 -0
- cdp/protocol/browser/events/__init__.py +0 -0
- cdp/protocol/browser/events/service.py +37 -0
- cdp/protocol/browser/events/types.py +28 -0
- cdp/protocol/browser/methods/__init__.py +0 -0
- cdp/protocol/browser/methods/service.py +230 -0
- cdp/protocol/browser/methods/types.py +126 -0
- cdp/protocol/browser/service.py +21 -0
- cdp/protocol/browser/types.py +57 -0
- cdp/protocol/cache_storage/__init__.py +0 -0
- cdp/protocol/cache_storage/events/__init__.py +0 -0
- cdp/protocol/cache_storage/events/service.py +20 -0
- cdp/protocol/cache_storage/events/types.py +3 -0
- cdp/protocol/cache_storage/methods/__init__.py +0 -0
- cdp/protocol/cache_storage/methods/service.py +76 -0
- cdp/protocol/cache_storage/methods/types.py +57 -0
- cdp/protocol/cache_storage/service.py +21 -0
- cdp/protocol/cache_storage/types.py +49 -0
- cdp/protocol/cast/__init__.py +0 -0
- cdp/protocol/cast/events/__init__.py +0 -0
- cdp/protocol/cast/events/service.py +37 -0
- cdp/protocol/cast/events/types.py +12 -0
- cdp/protocol/cast/methods/__init__.py +0 -0
- cdp/protocol/cast/methods/service.py +87 -0
- cdp/protocol/cast/methods/types.py +15 -0
- cdp/protocol/cast/service.py +21 -0
- cdp/protocol/cast/types.py +9 -0
- cdp/protocol/css/__init__.py +0 -0
- cdp/protocol/css/events/__init__.py +0 -0
- cdp/protocol/css/events/service.py +69 -0
- cdp/protocol/css/events/types.py +27 -0
- cdp/protocol/css/methods/__init__.py +0 -0
- cdp/protocol/css/methods/service.py +428 -0
- cdp/protocol/css/methods/types.py +278 -0
- cdp/protocol/css/service.py +21 -0
- cdp/protocol/css/types.py +451 -0
- cdp/protocol/debugger/__init__.py +0 -0
- cdp/protocol/debugger/events/__init__.py +0 -0
- cdp/protocol/debugger/events/service.py +53 -0
- cdp/protocol/debugger/events/types.py +112 -0
- cdp/protocol/debugger/methods/__init__.py +0 -0
- cdp/protocol/debugger/methods/service.py +362 -0
- cdp/protocol/debugger/methods/types.py +250 -0
- cdp/protocol/debugger/service.py +21 -0
- cdp/protocol/debugger/types.py +91 -0
- cdp/protocol/device_access/__init__.py +0 -0
- cdp/protocol/device_access/events/__init__.py +0 -0
- cdp/protocol/device_access/events/service.py +29 -0
- cdp/protocol/device_access/events/types.py +12 -0
- cdp/protocol/device_access/methods/__init__.py +0 -0
- cdp/protocol/device_access/methods/service.py +65 -0
- cdp/protocol/device_access/methods/types.py +16 -0
- cdp/protocol/device_access/service.py +21 -0
- cdp/protocol/device_access/types.py +13 -0
- cdp/protocol/device_orientation/__init__.py +0 -0
- cdp/protocol/device_orientation/events/__init__.py +0 -0
- cdp/protocol/device_orientation/events/service.py +20 -0
- cdp/protocol/device_orientation/events/types.py +3 -0
- cdp/protocol/device_orientation/methods/__init__.py +0 -0
- cdp/protocol/device_orientation/methods/service.py +43 -0
- cdp/protocol/device_orientation/methods/types.py +12 -0
- cdp/protocol/device_orientation/service.py +21 -0
- cdp/protocol/device_orientation/types.py +3 -0
- cdp/protocol/dom/__init__.py +0 -0
- cdp/protocol/dom/events/__init__.py +0 -0
- cdp/protocol/dom/events/service.py +165 -0
- cdp/protocol/dom/events/types.py +97 -0
- cdp/protocol/dom/methods/__init__.py +0 -0
- cdp/protocol/dom/methods/service.py +593 -0
- cdp/protocol/dom/methods/types.py +384 -0
- cdp/protocol/dom/service.py +21 -0
- cdp/protocol/dom/types.py +151 -0
- cdp/protocol/dom_debugger/__init__.py +0 -0
- cdp/protocol/dom_debugger/events/__init__.py +0 -0
- cdp/protocol/dom_debugger/events/service.py +20 -0
- cdp/protocol/dom_debugger/events/types.py +3 -0
- cdp/protocol/dom_debugger/methods/__init__.py +0 -0
- cdp/protocol/dom_debugger/methods/service.py +109 -0
- cdp/protocol/dom_debugger/methods/types.py +51 -0
- cdp/protocol/dom_debugger/service.py +21 -0
- cdp/protocol/dom_debugger/types.py +36 -0
- cdp/protocol/dom_snapshot/__init__.py +0 -0
- cdp/protocol/dom_snapshot/events/__init__.py +0 -0
- cdp/protocol/dom_snapshot/events/service.py +20 -0
- cdp/protocol/dom_snapshot/events/types.py +3 -0
- cdp/protocol/dom_snapshot/methods/__init__.py +0 -0
- cdp/protocol/dom_snapshot/methods/service.py +54 -0
- cdp/protocol/dom_snapshot/methods/types.py +28 -0
- cdp/protocol/dom_snapshot/service.py +21 -0
- cdp/protocol/dom_snapshot/types.py +220 -0
- cdp/protocol/dom_storage/__init__.py +0 -0
- cdp/protocol/dom_storage/events/__init__.py +0 -0
- cdp/protocol/dom_storage/events/service.py +53 -0
- cdp/protocol/dom_storage/events/types.py +22 -0
- cdp/protocol/dom_storage/methods/__init__.py +0 -0
- cdp/protocol/dom_storage/methods/service.py +87 -0
- cdp/protocol/dom_storage/methods/types.py +27 -0
- cdp/protocol/dom_storage/service.py +21 -0
- cdp/protocol/dom_storage/types.py +15 -0
- cdp/protocol/emulation/__init__.py +0 -0
- cdp/protocol/emulation/events/__init__.py +0 -0
- cdp/protocol/emulation/events/service.py +29 -0
- cdp/protocol/emulation/events/types.py +6 -0
- cdp/protocol/emulation/methods/__init__.py +0 -0
- cdp/protocol/emulation/methods/service.py +494 -0
- cdp/protocol/emulation/methods/types.py +261 -0
- cdp/protocol/emulation/service.py +21 -0
- cdp/protocol/emulation/types.py +132 -0
- cdp/protocol/event_breakpoints/__init__.py +0 -0
- cdp/protocol/event_breakpoints/events/__init__.py +0 -0
- cdp/protocol/event_breakpoints/events/service.py +20 -0
- cdp/protocol/event_breakpoints/events/types.py +3 -0
- cdp/protocol/event_breakpoints/methods/__init__.py +0 -0
- cdp/protocol/event_breakpoints/methods/service.py +54 -0
- cdp/protocol/event_breakpoints/methods/types.py +10 -0
- cdp/protocol/event_breakpoints/service.py +21 -0
- cdp/protocol/event_breakpoints/types.py +3 -0
- cdp/protocol/extensions/__init__.py +0 -0
- cdp/protocol/extensions/events/__init__.py +0 -0
- cdp/protocol/extensions/events/service.py +20 -0
- cdp/protocol/extensions/events/types.py +3 -0
- cdp/protocol/extensions/methods/__init__.py +0 -0
- cdp/protocol/extensions/methods/service.py +87 -0
- cdp/protocol/extensions/methods/types.py +46 -0
- cdp/protocol/extensions/service.py +21 -0
- cdp/protocol/extensions/types.py +6 -0
- cdp/protocol/fed_cm/__init__.py +0 -0
- cdp/protocol/fed_cm/events/__init__.py +0 -0
- cdp/protocol/fed_cm/events/service.py +37 -0
- cdp/protocol/fed_cm/events/types.py +18 -0
- cdp/protocol/fed_cm/methods/__init__.py +0 -0
- cdp/protocol/fed_cm/methods/service.py +98 -0
- cdp/protocol/fed_cm/methods/types.py +26 -0
- cdp/protocol/fed_cm/service.py +21 -0
- cdp/protocol/fed_cm/types.py +25 -0
- cdp/protocol/fetch/__init__.py +0 -0
- cdp/protocol/fetch/events/__init__.py +0 -0
- cdp/protocol/fetch/events/service.py +37 -0
- cdp/protocol/fetch/events/types.py +47 -0
- cdp/protocol/fetch/methods/__init__.py +0 -0
- cdp/protocol/fetch/methods/service.py +120 -0
- cdp/protocol/fetch/methods/types.py +85 -0
- cdp/protocol/fetch/service.py +21 -0
- cdp/protocol/fetch/types.py +41 -0
- cdp/protocol/file_system/__init__.py +0 -0
- cdp/protocol/file_system/events/__init__.py +0 -0
- cdp/protocol/file_system/events/service.py +20 -0
- cdp/protocol/file_system/events/types.py +3 -0
- cdp/protocol/file_system/methods/__init__.py +0 -0
- cdp/protocol/file_system/methods/service.py +32 -0
- cdp/protocol/file_system/methods/types.py +14 -0
- cdp/protocol/file_system/service.py +21 -0
- cdp/protocol/file_system/types.py +28 -0
- cdp/protocol/headless_experimental/__init__.py +0 -0
- cdp/protocol/headless_experimental/events/__init__.py +0 -0
- cdp/protocol/headless_experimental/events/service.py +20 -0
- cdp/protocol/headless_experimental/events/types.py +3 -0
- cdp/protocol/headless_experimental/methods/__init__.py +0 -0
- cdp/protocol/headless_experimental/methods/service.py +32 -0
- cdp/protocol/headless_experimental/methods/types.py +22 -0
- cdp/protocol/headless_experimental/service.py +21 -0
- cdp/protocol/headless_experimental/types.py +12 -0
- cdp/protocol/heap_profiler/__init__.py +0 -0
- cdp/protocol/heap_profiler/events/__init__.py +0 -0
- cdp/protocol/heap_profiler/events/service.py +61 -0
- cdp/protocol/heap_profiler/events/types.py +18 -0
- cdp/protocol/heap_profiler/methods/__init__.py +0 -0
- cdp/protocol/heap_profiler/methods/service.py +153 -0
- cdp/protocol/heap_profiler/methods/types.py +73 -0
- cdp/protocol/heap_profiler/service.py +21 -0
- cdp/protocol/heap_profiler/types.py +32 -0
- cdp/protocol/indexed_db/__init__.py +0 -0
- cdp/protocol/indexed_db/events/__init__.py +0 -0
- cdp/protocol/indexed_db/events/service.py +20 -0
- cdp/protocol/indexed_db/events/types.py +3 -0
- cdp/protocol/indexed_db/methods/__init__.py +0 -0
- cdp/protocol/indexed_db/methods/service.py +120 -0
- cdp/protocol/indexed_db/methods/types.py +111 -0
- cdp/protocol/indexed_db/service.py +21 -0
- cdp/protocol/indexed_db/types.py +74 -0
- cdp/protocol/input/__init__.py +0 -0
- cdp/protocol/input/events/__init__.py +0 -0
- cdp/protocol/input/events/service.py +29 -0
- cdp/protocol/input/events/types.py +10 -0
- cdp/protocol/input/methods/__init__.py +0 -0
- cdp/protocol/input/methods/service.py +164 -0
- cdp/protocol/input/methods/types.py +181 -0
- cdp/protocol/input/service.py +21 -0
- cdp/protocol/input/types.py +46 -0
- cdp/protocol/inspector/__init__.py +0 -0
- cdp/protocol/inspector/events/__init__.py +0 -0
- cdp/protocol/inspector/events/service.py +53 -0
- cdp/protocol/inspector/events/types.py +13 -0
- cdp/protocol/inspector/methods/__init__.py +0 -0
- cdp/protocol/inspector/methods/service.py +43 -0
- cdp/protocol/inspector/methods/types.py +3 -0
- cdp/protocol/inspector/service.py +21 -0
- cdp/protocol/inspector/types.py +3 -0
- cdp/protocol/io/__init__.py +0 -0
- cdp/protocol/io/events/__init__.py +0 -0
- cdp/protocol/io/events/service.py +20 -0
- cdp/protocol/io/events/types.py +3 -0
- cdp/protocol/io/methods/__init__.py +0 -0
- cdp/protocol/io/methods/service.py +54 -0
- cdp/protocol/io/methods/types.py +33 -0
- cdp/protocol/io/service.py +21 -0
- cdp/protocol/io/types.py +6 -0
- cdp/protocol/layer_tree/__init__.py +0 -0
- cdp/protocol/layer_tree/events/__init__.py +0 -0
- cdp/protocol/layer_tree/events/service.py +37 -0
- cdp/protocol/layer_tree/events/types.py +18 -0
- cdp/protocol/layer_tree/methods/__init__.py +0 -0
- cdp/protocol/layer_tree/methods/service.py +120 -0
- cdp/protocol/layer_tree/methods/types.py +70 -0
- cdp/protocol/layer_tree/service.py +21 -0
- cdp/protocol/layer_tree/types.py +73 -0
- cdp/protocol/log/__init__.py +0 -0
- cdp/protocol/log/events/__init__.py +0 -0
- cdp/protocol/log/events/service.py +29 -0
- cdp/protocol/log/events/types.py +11 -0
- cdp/protocol/log/methods/__init__.py +0 -0
- cdp/protocol/log/methods/service.py +76 -0
- cdp/protocol/log/methods/types.py +14 -0
- cdp/protocol/log/service.py +21 -0
- cdp/protocol/log/types.py +40 -0
- cdp/protocol/media/__init__.py +0 -0
- cdp/protocol/media/events/__init__.py +0 -0
- cdp/protocol/media/events/service.py +61 -0
- cdp/protocol/media/events/types.py +27 -0
- cdp/protocol/media/methods/__init__.py +0 -0
- cdp/protocol/media/methods/service.py +43 -0
- cdp/protocol/media/methods/types.py +3 -0
- cdp/protocol/media/service.py +21 -0
- cdp/protocol/media/types.py +42 -0
- cdp/protocol/memory/__init__.py +0 -0
- cdp/protocol/memory/events/__init__.py +0 -0
- cdp/protocol/memory/events/service.py +20 -0
- cdp/protocol/memory/events/types.py +3 -0
- cdp/protocol/memory/methods/__init__.py +0 -0
- cdp/protocol/memory/methods/service.py +142 -0
- cdp/protocol/memory/methods/types.py +48 -0
- cdp/protocol/memory/service.py +21 -0
- cdp/protocol/memory/types.py +34 -0
- cdp/protocol/network/__init__.py +0 -0
- cdp/protocol/network/events/__init__.py +0 -0
- cdp/protocol/network/events/service.py +365 -0
- cdp/protocol/network/events/types.py +360 -0
- cdp/protocol/network/methods/__init__.py +0 -0
- cdp/protocol/network/methods/service.py +384 -0
- cdp/protocol/network/methods/types.py +252 -0
- cdp/protocol/network/service.py +21 -0
- cdp/protocol/network/types.py +691 -0
- cdp/protocol/overlay/__init__.py +0 -0
- cdp/protocol/overlay/events/__init__.py +0 -0
- cdp/protocol/overlay/events/service.py +53 -0
- cdp/protocol/overlay/events/types.py +20 -0
- cdp/protocol/overlay/methods/__init__.py +0 -0
- cdp/protocol/overlay/methods/service.py +307 -0
- cdp/protocol/overlay/methods/types.py +144 -0
- cdp/protocol/overlay/service.py +21 -0
- cdp/protocol/overlay/types.py +198 -0
- cdp/protocol/page/__init__.py +0 -0
- cdp/protocol/page/events/__init__.py +0 -0
- cdp/protocol/page/events/service.py +213 -0
- cdp/protocol/page/events/types.py +147 -0
- cdp/protocol/page/methods/__init__.py +0 -0
- cdp/protocol/page/methods/service.py +560 -0
- cdp/protocol/page/methods/types.py +346 -0
- cdp/protocol/page/service.py +21 -0
- cdp/protocol/page/types.py +379 -0
- cdp/protocol/performance/__init__.py +0 -0
- cdp/protocol/performance/events/__init__.py +0 -0
- cdp/protocol/performance/events/service.py +29 -0
- cdp/protocol/performance/events/types.py +13 -0
- cdp/protocol/performance/methods/__init__.py +0 -0
- cdp/protocol/performance/methods/service.py +54 -0
- cdp/protocol/performance/methods/types.py +18 -0
- cdp/protocol/performance/service.py +21 -0
- cdp/protocol/performance/types.py +10 -0
- cdp/protocol/performance_timeline/__init__.py +0 -0
- cdp/protocol/performance_timeline/events/__init__.py +0 -0
- cdp/protocol/performance_timeline/events/service.py +29 -0
- cdp/protocol/performance_timeline/events/types.py +10 -0
- cdp/protocol/performance_timeline/methods/__init__.py +0 -0
- cdp/protocol/performance_timeline/methods/service.py +32 -0
- cdp/protocol/performance_timeline/methods/types.py +7 -0
- cdp/protocol/performance_timeline/service.py +21 -0
- cdp/protocol/performance_timeline/types.py +46 -0
- cdp/protocol/preload/__init__.py +0 -0
- cdp/protocol/preload/events/__init__.py +0 -0
- cdp/protocol/preload/events/service.py +69 -0
- cdp/protocol/preload/events/types.py +49 -0
- cdp/protocol/preload/methods/__init__.py +0 -0
- cdp/protocol/preload/methods/service.py +43 -0
- cdp/protocol/preload/methods/types.py +3 -0
- cdp/protocol/preload/service.py +21 -0
- cdp/protocol/preload/types.py +56 -0
- cdp/protocol/profiler/__init__.py +0 -0
- cdp/protocol/profiler/events/__init__.py +0 -0
- cdp/protocol/profiler/events/service.py +45 -0
- cdp/protocol/profiler/events/types.py +30 -0
- cdp/protocol/profiler/methods/__init__.py +0 -0
- cdp/protocol/profiler/methods/service.py +120 -0
- cdp/protocol/profiler/methods/types.py +45 -0
- cdp/protocol/profiler/service.py +21 -0
- cdp/protocol/profiler/types.py +65 -0
- cdp/protocol/pwa/__init__.py +0 -0
- cdp/protocol/pwa/events/__init__.py +0 -0
- cdp/protocol/pwa/events/service.py +20 -0
- cdp/protocol/pwa/events/types.py +3 -0
- cdp/protocol/pwa/methods/__init__.py +0 -0
- cdp/protocol/pwa/methods/service.py +98 -0
- cdp/protocol/pwa/methods/types.py +43 -0
- cdp/protocol/pwa/service.py +21 -0
- cdp/protocol/pwa/types.py +15 -0
- cdp/protocol/py.typed +0 -0
- cdp/protocol/runtime/__init__.py +0 -0
- cdp/protocol/runtime/events/__init__.py +0 -0
- cdp/protocol/runtime/events/service.py +85 -0
- cdp/protocol/runtime/events/types.py +55 -0
- cdp/protocol/runtime/methods/__init__.py +0 -0
- cdp/protocol/runtime/methods/service.py +274 -0
- cdp/protocol/runtime/methods/types.py +226 -0
- cdp/protocol/runtime/service.py +21 -0
- cdp/protocol/runtime/types.py +194 -0
- cdp/protocol/security/__init__.py +0 -0
- cdp/protocol/security/events/__init__.py +0 -0
- cdp/protocol/security/events/service.py +29 -0
- cdp/protocol/security/events/types.py +11 -0
- cdp/protocol/security/methods/__init__.py +0 -0
- cdp/protocol/security/methods/service.py +54 -0
- cdp/protocol/security/methods/types.py +9 -0
- cdp/protocol/security/service.py +21 -0
- cdp/protocol/security/types.py +102 -0
- cdp/protocol/service_worker/__init__.py +0 -0
- cdp/protocol/service_worker/events/__init__.py +0 -0
- cdp/protocol/service_worker/events/service.py +45 -0
- cdp/protocol/service_worker/events/types.py +16 -0
- cdp/protocol/service_worker/methods/__init__.py +0 -0
- cdp/protocol/service_worker/methods/service.py +153 -0
- cdp/protocol/service_worker/methods/types.py +36 -0
- cdp/protocol/service_worker/service.py +21 -0
- cdp/protocol/service_worker/types.py +38 -0
- cdp/protocol/storage/__init__.py +0 -0
- cdp/protocol/storage/events/__init__.py +0 -0
- cdp/protocol/storage/events/service.py +141 -0
- cdp/protocol/storage/events/types.py +139 -0
- cdp/protocol/storage/methods/__init__.py +0 -0
- cdp/protocol/storage/methods/service.py +428 -0
- cdp/protocol/storage/methods/types.py +184 -0
- cdp/protocol/storage/service.py +21 -0
- cdp/protocol/storage/types.py +236 -0
- cdp/protocol/system_info/__init__.py +0 -0
- cdp/protocol/system_info/events/__init__.py +0 -0
- cdp/protocol/system_info/events/service.py +20 -0
- cdp/protocol/system_info/events/types.py +3 -0
- cdp/protocol/system_info/methods/__init__.py +0 -0
- cdp/protocol/system_info/methods/service.py +54 -0
- cdp/protocol/system_info/methods/types.py +27 -0
- cdp/protocol/system_info/service.py +21 -0
- cdp/protocol/system_info/types.py +71 -0
- cdp/protocol/target/__init__.py +0 -0
- cdp/protocol/target/events/__init__.py +0 -0
- cdp/protocol/target/events/service.py +77 -0
- cdp/protocol/target/events/types.py +38 -0
- cdp/protocol/target/methods/__init__.py +0 -0
- cdp/protocol/target/methods/service.py +219 -0
- cdp/protocol/target/methods/types.py +148 -0
- cdp/protocol/target/service.py +21 -0
- cdp/protocol/target/types.py +44 -0
- cdp/protocol/tethering/__init__.py +0 -0
- cdp/protocol/tethering/events/__init__.py +0 -0
- cdp/protocol/tethering/events/service.py +29 -0
- cdp/protocol/tethering/events/types.py +9 -0
- cdp/protocol/tethering/methods/__init__.py +0 -0
- cdp/protocol/tethering/methods/service.py +43 -0
- cdp/protocol/tethering/methods/types.py +10 -0
- cdp/protocol/tethering/service.py +21 -0
- cdp/protocol/tethering/types.py +3 -0
- cdp/protocol/tracing/__init__.py +0 -0
- cdp/protocol/tracing/events/__init__.py +0 -0
- cdp/protocol/tracing/events/service.py +45 -0
- cdp/protocol/tracing/events/types.py +28 -0
- cdp/protocol/tracing/methods/__init__.py +0 -0
- cdp/protocol/tracing/methods/service.py +87 -0
- cdp/protocol/tracing/methods/types.py +54 -0
- cdp/protocol/tracing/service.py +21 -0
- cdp/protocol/tracing/types.py +34 -0
- cdp/protocol/web_audio/__init__.py +0 -0
- cdp/protocol/web_audio/events/__init__.py +0 -0
- cdp/protocol/web_audio/events/service.py +125 -0
- cdp/protocol/web_audio/events/types.py +56 -0
- cdp/protocol/web_audio/methods/__init__.py +0 -0
- cdp/protocol/web_audio/methods/service.py +54 -0
- cdp/protocol/web_audio/methods/types.py +17 -0
- cdp/protocol/web_audio/service.py +21 -0
- cdp/protocol/web_audio/types.py +66 -0
- cdp/protocol/web_authn/__init__.py +0 -0
- cdp/protocol/web_authn/events/__init__.py +0 -0
- cdp/protocol/web_authn/events/service.py +53 -0
- cdp/protocol/web_authn/events/types.py +21 -0
- cdp/protocol/web_authn/methods/__init__.py +0 -0
- cdp/protocol/web_authn/methods/service.py +164 -0
- cdp/protocol/web_authn/methods/types.py +61 -0
- cdp/protocol/web_authn/service.py +21 -0
- cdp/protocol/web_authn/types.py +54 -0
- cdp/py.typed +0 -0
- cdp/service.py +184 -0
- chromedeveloperprotocol_client-0.1.0.dist-info/METADATA +15 -0
- chromedeveloperprotocol_client-0.1.0.dist-info/RECORD +476 -0
- chromedeveloperprotocol_client-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"""CDP Runtime Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
ScriptId = str
|
|
6
|
+
"""Unique script identifier."""
|
|
7
|
+
class SerializationOptions(TypedDict, total=True):
|
|
8
|
+
"""Represents options for serialization. Overrides generatePreview and returnByValue."""
|
|
9
|
+
serialization: 'Literal["deep", "json", "idOnly"]'
|
|
10
|
+
maxDepth: NotRequired['int']
|
|
11
|
+
"""Deep serialization depth. Default is full depth. Respected only in deep serialization mode."""
|
|
12
|
+
additionalParameters: NotRequired['Dict[str, Any]']
|
|
13
|
+
"""Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM serialization via maxNodeDepth: integer and includeShadowTree: "none" | "open" | "all". Values can be only of type string or integer."""
|
|
14
|
+
class DeepSerializedValue(TypedDict, total=True):
|
|
15
|
+
"""Represents deep serialized value."""
|
|
16
|
+
type: 'Literal["undefined", "null", "string", "number", "boolean", "bigint", "regexp", "date", "symbol", "array", "object", "function", "map", "set", "weakmap", "weakset", "error", "proxy", "promise", "typedarray", "arraybuffer", "node", "window", "generator"]'
|
|
17
|
+
value: NotRequired['Any']
|
|
18
|
+
objectId: NotRequired['str']
|
|
19
|
+
weakLocalObjectReference: NotRequired['int']
|
|
20
|
+
"""Set if value reference met more then once during serialization. In such case, value is provided only to one of the serialized values. Unique per value in the scope of one CDP call."""
|
|
21
|
+
RemoteObjectId = str
|
|
22
|
+
"""Unique object identifier."""
|
|
23
|
+
UnserializableValue = str
|
|
24
|
+
"""Primitive value which cannot be JSON-stringified. Includes values -0, NaN, Infinity, -Infinity, and bigint literals."""
|
|
25
|
+
class RemoteObject(TypedDict, total=True):
|
|
26
|
+
"""Mirror object referencing original JavaScript object."""
|
|
27
|
+
type: 'Literal["object", "function", "undefined", "string", "number", "boolean", "symbol", "bigint"]'
|
|
28
|
+
"""Object type."""
|
|
29
|
+
subtype: NotRequired['Literal["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray", "arraybuffer", "dataview", "webassemblymemory", "wasmvalue", "trustedtype"]']
|
|
30
|
+
"""Object subtype hint. Specified for object type values only. NOTE: If you change anything here, make sure to also update subtype in ObjectPreview and PropertyPreview below."""
|
|
31
|
+
className: NotRequired['str']
|
|
32
|
+
"""Object class (constructor) name. Specified for object type values only."""
|
|
33
|
+
value: NotRequired['Any']
|
|
34
|
+
"""Remote object value in case of primitive values or JSON values (if it was requested)."""
|
|
35
|
+
unserializableValue: NotRequired['UnserializableValue']
|
|
36
|
+
"""Primitive value which can not be JSON-stringified does not have value, but gets this property."""
|
|
37
|
+
description: NotRequired['str']
|
|
38
|
+
"""String representation of the object."""
|
|
39
|
+
deepSerializedValue: NotRequired['DeepSerializedValue']
|
|
40
|
+
"""Deep serialized value."""
|
|
41
|
+
objectId: NotRequired['RemoteObjectId']
|
|
42
|
+
"""Unique object identifier (for non-primitive values)."""
|
|
43
|
+
preview: NotRequired['ObjectPreview']
|
|
44
|
+
"""Preview containing abbreviated property values. Specified for object type values only."""
|
|
45
|
+
customPreview: NotRequired['CustomPreview']
|
|
46
|
+
class CustomPreview(TypedDict, total=True):
|
|
47
|
+
header: 'str'
|
|
48
|
+
"""The JSON-stringified result of formatter.header(object, config) call. It contains json ML array that represents RemoteObject."""
|
|
49
|
+
bodyGetterId: NotRequired['RemoteObjectId']
|
|
50
|
+
"""If formatter returns true as a result of formatter.hasBody call then bodyGetterId will contain RemoteObjectId for the function that returns result of formatter.body(object, config) call. The result value is json ML array."""
|
|
51
|
+
class ObjectPreview(TypedDict, total=True):
|
|
52
|
+
"""Object containing abbreviated remote object value."""
|
|
53
|
+
type: 'Literal["object", "function", "undefined", "string", "number", "boolean", "symbol", "bigint"]'
|
|
54
|
+
"""Object type."""
|
|
55
|
+
overflow: 'bool'
|
|
56
|
+
"""True iff some of the properties or entries of the original object did not fit."""
|
|
57
|
+
properties: 'List[PropertyPreview]'
|
|
58
|
+
"""List of the properties."""
|
|
59
|
+
subtype: NotRequired['Literal["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray", "arraybuffer", "dataview", "webassemblymemory", "wasmvalue", "trustedtype"]']
|
|
60
|
+
"""Object subtype hint. Specified for object type values only."""
|
|
61
|
+
description: NotRequired['str']
|
|
62
|
+
"""String representation of the object."""
|
|
63
|
+
entries: NotRequired['List[EntryPreview]']
|
|
64
|
+
"""List of the entries. Specified for map and set subtype values only."""
|
|
65
|
+
class PropertyPreview(TypedDict, total=True):
|
|
66
|
+
name: 'str'
|
|
67
|
+
"""Property name."""
|
|
68
|
+
type: 'Literal["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor", "bigint"]'
|
|
69
|
+
"""Object type. Accessor means that the property itself is an accessor property."""
|
|
70
|
+
value: NotRequired['str']
|
|
71
|
+
"""User-friendly property value string."""
|
|
72
|
+
valuePreview: NotRequired['ObjectPreview']
|
|
73
|
+
"""Nested value preview."""
|
|
74
|
+
subtype: NotRequired['Literal["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray", "arraybuffer", "dataview", "webassemblymemory", "wasmvalue", "trustedtype"]']
|
|
75
|
+
"""Object subtype hint. Specified for object type values only."""
|
|
76
|
+
class EntryPreview(TypedDict, total=True):
|
|
77
|
+
value: 'ObjectPreview'
|
|
78
|
+
"""Preview of the value."""
|
|
79
|
+
key: NotRequired['ObjectPreview']
|
|
80
|
+
"""Preview of the key. Specified for map-like collection entries."""
|
|
81
|
+
class PropertyDescriptor(TypedDict, total=True):
|
|
82
|
+
"""Object property descriptor."""
|
|
83
|
+
name: 'str'
|
|
84
|
+
"""Property name or symbol description."""
|
|
85
|
+
configurable: 'bool'
|
|
86
|
+
"""True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object."""
|
|
87
|
+
enumerable: 'bool'
|
|
88
|
+
"""True if this property shows up during enumeration of the properties on the corresponding object."""
|
|
89
|
+
value: NotRequired['RemoteObject']
|
|
90
|
+
"""The value associated with the property."""
|
|
91
|
+
writable: NotRequired['bool']
|
|
92
|
+
"""True if the value associated with the property may be changed (data descriptors only)."""
|
|
93
|
+
get: NotRequired['RemoteObject']
|
|
94
|
+
"""A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only)."""
|
|
95
|
+
set: NotRequired['RemoteObject']
|
|
96
|
+
"""A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only)."""
|
|
97
|
+
wasThrown: NotRequired['bool']
|
|
98
|
+
"""True if the result was thrown during the evaluation."""
|
|
99
|
+
isOwn: NotRequired['bool']
|
|
100
|
+
"""True if the property is owned for the object."""
|
|
101
|
+
symbol: NotRequired['RemoteObject']
|
|
102
|
+
"""Property symbol object, if the property is of the symbol type."""
|
|
103
|
+
class InternalPropertyDescriptor(TypedDict, total=True):
|
|
104
|
+
"""Object internal property descriptor. This property isn't normally visible in JavaScript code."""
|
|
105
|
+
name: 'str'
|
|
106
|
+
"""Conventional property name."""
|
|
107
|
+
value: NotRequired['RemoteObject']
|
|
108
|
+
"""The value associated with the property."""
|
|
109
|
+
class PrivatePropertyDescriptor(TypedDict, total=True):
|
|
110
|
+
"""Object private field descriptor."""
|
|
111
|
+
name: 'str'
|
|
112
|
+
"""Private property name."""
|
|
113
|
+
value: NotRequired['RemoteObject']
|
|
114
|
+
"""The value associated with the private property."""
|
|
115
|
+
get: NotRequired['RemoteObject']
|
|
116
|
+
"""A function which serves as a getter for the private property, or undefined if there is no getter (accessor descriptors only)."""
|
|
117
|
+
set: NotRequired['RemoteObject']
|
|
118
|
+
"""A function which serves as a setter for the private property, or undefined if there is no setter (accessor descriptors only)."""
|
|
119
|
+
class CallArgument(TypedDict, total=False):
|
|
120
|
+
"""Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified."""
|
|
121
|
+
value: NotRequired['Any']
|
|
122
|
+
"""Primitive value or serializable javascript object."""
|
|
123
|
+
unserializableValue: NotRequired['UnserializableValue']
|
|
124
|
+
"""Primitive value which can not be JSON-stringified."""
|
|
125
|
+
objectId: NotRequired['RemoteObjectId']
|
|
126
|
+
"""Remote object handle."""
|
|
127
|
+
ExecutionContextId = int
|
|
128
|
+
"""Id of an execution context."""
|
|
129
|
+
class ExecutionContextDescription(TypedDict, total=True):
|
|
130
|
+
"""Description of an isolated world."""
|
|
131
|
+
id: 'ExecutionContextId'
|
|
132
|
+
"""Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed."""
|
|
133
|
+
origin: 'str'
|
|
134
|
+
"""Execution context origin."""
|
|
135
|
+
name: 'str'
|
|
136
|
+
"""Human readable name describing given context."""
|
|
137
|
+
uniqueId: 'str'
|
|
138
|
+
"""A system-unique execution context identifier. Unlike the id, this is unique across multiple processes, so can be reliably used to identify specific context while backend performs a cross-process navigation."""
|
|
139
|
+
auxData: NotRequired['Dict[str, Any]']
|
|
140
|
+
"""Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}"""
|
|
141
|
+
class ExceptionDetails(TypedDict, total=True):
|
|
142
|
+
"""Detailed information about exception (or error) that was thrown during script compilation or execution."""
|
|
143
|
+
exceptionId: 'int'
|
|
144
|
+
"""Exception id."""
|
|
145
|
+
text: 'str'
|
|
146
|
+
"""Exception text, which should be used together with exception object when available."""
|
|
147
|
+
lineNumber: 'int'
|
|
148
|
+
"""Line number of the exception location (0-based)."""
|
|
149
|
+
columnNumber: 'int'
|
|
150
|
+
"""Column number of the exception location (0-based)."""
|
|
151
|
+
scriptId: NotRequired['ScriptId']
|
|
152
|
+
"""Script ID of the exception location."""
|
|
153
|
+
url: NotRequired['str']
|
|
154
|
+
"""URL of the exception location, to be used when the script was not reported."""
|
|
155
|
+
stackTrace: NotRequired['StackTrace']
|
|
156
|
+
"""JavaScript stack trace if available."""
|
|
157
|
+
exception: NotRequired['RemoteObject']
|
|
158
|
+
"""Exception object if available."""
|
|
159
|
+
executionContextId: NotRequired['ExecutionContextId']
|
|
160
|
+
"""Identifier of the context where exception happened."""
|
|
161
|
+
exceptionMetaData: NotRequired['Dict[str, Any]']
|
|
162
|
+
"""Dictionary with entries of meta data that the client associated with this exception, such as information about associated network requests, etc."""
|
|
163
|
+
Timestamp = float
|
|
164
|
+
"""Number of milliseconds since epoch."""
|
|
165
|
+
TimeDelta = float
|
|
166
|
+
"""Number of milliseconds."""
|
|
167
|
+
class CallFrame(TypedDict, total=True):
|
|
168
|
+
"""Stack entry for runtime errors and assertions."""
|
|
169
|
+
functionName: 'str'
|
|
170
|
+
"""JavaScript function name."""
|
|
171
|
+
scriptId: 'ScriptId'
|
|
172
|
+
"""JavaScript script id."""
|
|
173
|
+
url: 'str'
|
|
174
|
+
"""JavaScript script name or url."""
|
|
175
|
+
lineNumber: 'int'
|
|
176
|
+
"""JavaScript script line number (0-based)."""
|
|
177
|
+
columnNumber: 'int'
|
|
178
|
+
"""JavaScript script column number (0-based)."""
|
|
179
|
+
class StackTrace(TypedDict, total=True):
|
|
180
|
+
"""Call frames for assertions or error messages."""
|
|
181
|
+
callFrames: 'List[CallFrame]'
|
|
182
|
+
"""JavaScript function name."""
|
|
183
|
+
description: NotRequired['str']
|
|
184
|
+
"""String label of this stack trace. For async traces this may be a name of the function that initiated the async call."""
|
|
185
|
+
parent: NotRequired['StackTrace']
|
|
186
|
+
"""Asynchronous JavaScript stack trace that preceded this stack, if available."""
|
|
187
|
+
parentId: NotRequired['StackTraceId']
|
|
188
|
+
"""Asynchronous JavaScript stack trace that preceded this stack, if available."""
|
|
189
|
+
UniqueDebuggerId = str
|
|
190
|
+
"""Unique identifier of current debugger."""
|
|
191
|
+
class StackTraceId(TypedDict, total=True):
|
|
192
|
+
"""If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages."""
|
|
193
|
+
id: 'str'
|
|
194
|
+
debuggerId: NotRequired['UniqueDebuggerId']
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""CDP Security Domain Events"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class SecurityEvents:
|
|
10
|
+
"""
|
|
11
|
+
Events for the Security domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Security events.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
def on_visible_security_state_changed(self, callback: Callable[[visibleSecurityStateChangedEvent,Optional[str]], None]=None) -> None:
|
|
23
|
+
"""
|
|
24
|
+
The security state of the page changed.
|
|
25
|
+
Args:
|
|
26
|
+
callback (callable, optional): Function called when the event is fired.
|
|
27
|
+
The callback receives (params: visibleSecurityStateChangedEvent, session_id: Optional[str]).
|
|
28
|
+
"""
|
|
29
|
+
self.client.on('Security.visibleSecurityStateChanged', callback)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""CDP Security Events"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.security.types import VisibleSecurityState
|
|
8
|
+
|
|
9
|
+
class visibleSecurityStateChangedEvent(TypedDict, total=True):
|
|
10
|
+
visibleSecurityState: 'VisibleSecurityState'
|
|
11
|
+
"""Security state information about the page."""
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""CDP Security Domain Methods"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class SecurityMethods:
|
|
10
|
+
"""
|
|
11
|
+
Methods for the Security domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Security methods.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
async def disable(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
23
|
+
"""
|
|
24
|
+
Disables tracking security state changes.
|
|
25
|
+
Args:
|
|
26
|
+
params (None, optional): Parameters for the disable method.
|
|
27
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
Dict[str, Any]: The result of the disable call.
|
|
31
|
+
"""
|
|
32
|
+
return await self.client.send(method="Security.disable", params=params,session_id=session_id)
|
|
33
|
+
async def enable(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
34
|
+
"""
|
|
35
|
+
Enables tracking security state changes.
|
|
36
|
+
Args:
|
|
37
|
+
params (None, optional): Parameters for the enable method.
|
|
38
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
Dict[str, Any]: The result of the enable call.
|
|
42
|
+
"""
|
|
43
|
+
return await self.client.send(method="Security.enable", params=params,session_id=session_id)
|
|
44
|
+
async def set_ignore_certificate_errors(self, params: Optional[setIgnoreCertificateErrorsParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
45
|
+
"""
|
|
46
|
+
Enable/disable whether all certificate errors should be ignored.
|
|
47
|
+
Args:
|
|
48
|
+
params (setIgnoreCertificateErrorsParameters, optional): Parameters for the setIgnoreCertificateErrors method.
|
|
49
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
Dict[str, Any]: The result of the setIgnoreCertificateErrors call.
|
|
53
|
+
"""
|
|
54
|
+
return await self.client.send(method="Security.setIgnoreCertificateErrors", params=params,session_id=session_id)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""CDP Security Methods Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class setIgnoreCertificateErrorsParameters(TypedDict, total=True):
|
|
8
|
+
ignore: 'bool'
|
|
9
|
+
"""If true, all certificate errors will be ignored."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""CDP Security Domain"""
|
|
2
|
+
from typing import TYPE_CHECKING
|
|
3
|
+
from .methods.service import SecurityMethods
|
|
4
|
+
from .events.service import SecurityEvents
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ...service import Client
|
|
8
|
+
|
|
9
|
+
class Security(SecurityMethods, SecurityEvents):
|
|
10
|
+
"""
|
|
11
|
+
Access the Security domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Security domain.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
SecurityMethods.__init__(self, client)
|
|
21
|
+
SecurityEvents.__init__(self, client)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"""CDP Security Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.network.types import TimeSinceEpoch
|
|
8
|
+
|
|
9
|
+
CertificateId = int
|
|
10
|
+
"""An internal certificate ID value."""
|
|
11
|
+
MixedContentType = Literal['blockable','optionally-blockable','none']
|
|
12
|
+
"""A description of mixed content (HTTP resources on HTTPS pages), as defined by https://www.w3.org/TR/mixed-content/#categories"""
|
|
13
|
+
SecurityState = Literal['unknown','neutral','insecure','secure','info','insecure-broken']
|
|
14
|
+
"""The security level of a page or resource."""
|
|
15
|
+
class CertificateSecurityState(TypedDict, total=True):
|
|
16
|
+
"""Details about the security state of the page certificate."""
|
|
17
|
+
protocol: 'str'
|
|
18
|
+
"""Protocol name (e.g. TLS 1.2 or QUIC)."""
|
|
19
|
+
keyExchange: 'str'
|
|
20
|
+
"""Key Exchange used by the connection, or the empty string if not applicable."""
|
|
21
|
+
cipher: 'str'
|
|
22
|
+
"""Cipher name."""
|
|
23
|
+
certificate: 'List[str]'
|
|
24
|
+
"""Page certificate."""
|
|
25
|
+
subjectName: 'str'
|
|
26
|
+
"""Certificate subject name."""
|
|
27
|
+
issuer: 'str'
|
|
28
|
+
"""Name of the issuing CA."""
|
|
29
|
+
validFrom: 'TimeSinceEpoch'
|
|
30
|
+
"""Certificate valid from date."""
|
|
31
|
+
validTo: 'TimeSinceEpoch'
|
|
32
|
+
"""Certificate valid to (expiration) date"""
|
|
33
|
+
certificateHasWeakSignature: 'bool'
|
|
34
|
+
"""True if the certificate uses a weak signature algorithm."""
|
|
35
|
+
certificateHasSha1Signature: 'bool'
|
|
36
|
+
"""True if the certificate has a SHA1 signature in the chain."""
|
|
37
|
+
modernSSL: 'bool'
|
|
38
|
+
"""True if modern SSL"""
|
|
39
|
+
obsoleteSslProtocol: 'bool'
|
|
40
|
+
"""True if the connection is using an obsolete SSL protocol."""
|
|
41
|
+
obsoleteSslKeyExchange: 'bool'
|
|
42
|
+
"""True if the connection is using an obsolete SSL key exchange."""
|
|
43
|
+
obsoleteSslCipher: 'bool'
|
|
44
|
+
"""True if the connection is using an obsolete SSL cipher."""
|
|
45
|
+
obsoleteSslSignature: 'bool'
|
|
46
|
+
"""True if the connection is using an obsolete SSL signature."""
|
|
47
|
+
keyExchangeGroup: NotRequired['str']
|
|
48
|
+
"""(EC)DH group used by the connection, if applicable."""
|
|
49
|
+
mac: NotRequired['str']
|
|
50
|
+
"""TLS MAC. Note that AEAD ciphers do not have separate MACs."""
|
|
51
|
+
certificateNetworkError: NotRequired['str']
|
|
52
|
+
"""The highest priority network error code, if the certificate has an error."""
|
|
53
|
+
SafetyTipStatus = Literal['badReputation','lookalike']
|
|
54
|
+
class SafetyTipInfo(TypedDict, total=True):
|
|
55
|
+
safetyTipStatus: 'SafetyTipStatus'
|
|
56
|
+
"""Describes whether the page triggers any safety tips or reputation warnings. Default is unknown."""
|
|
57
|
+
safeUrl: NotRequired['str']
|
|
58
|
+
"""The URL the safety tip suggested ("Did you mean?"). Only filled in for lookalike matches."""
|
|
59
|
+
class VisibleSecurityState(TypedDict, total=True):
|
|
60
|
+
"""Security state information about the page."""
|
|
61
|
+
securityState: 'SecurityState'
|
|
62
|
+
"""The security level of the page."""
|
|
63
|
+
securityStateIssueIds: 'List[str]'
|
|
64
|
+
"""Array of security state issues ids."""
|
|
65
|
+
certificateSecurityState: NotRequired['CertificateSecurityState']
|
|
66
|
+
"""Security state details about the page certificate."""
|
|
67
|
+
safetyTipInfo: NotRequired['SafetyTipInfo']
|
|
68
|
+
"""The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown."""
|
|
69
|
+
class SecurityStateExplanation(TypedDict, total=True):
|
|
70
|
+
"""An explanation of an factor contributing to the security state."""
|
|
71
|
+
securityState: 'SecurityState'
|
|
72
|
+
"""Security state representing the severity of the factor being explained."""
|
|
73
|
+
title: 'str'
|
|
74
|
+
"""Title describing the type of factor."""
|
|
75
|
+
summary: 'str'
|
|
76
|
+
"""Short phrase describing the type of factor."""
|
|
77
|
+
description: 'str'
|
|
78
|
+
"""Full text explanation of the factor."""
|
|
79
|
+
mixedContentType: 'MixedContentType'
|
|
80
|
+
"""The type of mixed content described by the explanation."""
|
|
81
|
+
certificate: 'List[str]'
|
|
82
|
+
"""Page certificate."""
|
|
83
|
+
recommendations: NotRequired['List[str]']
|
|
84
|
+
"""Recommendations to fix any issues."""
|
|
85
|
+
class InsecureContentStatus(TypedDict, total=True):
|
|
86
|
+
"""Information about insecure content on the page."""
|
|
87
|
+
ranMixedContent: 'bool'
|
|
88
|
+
"""Always false."""
|
|
89
|
+
displayedMixedContent: 'bool'
|
|
90
|
+
"""Always false."""
|
|
91
|
+
containedMixedForm: 'bool'
|
|
92
|
+
"""Always false."""
|
|
93
|
+
ranContentWithCertErrors: 'bool'
|
|
94
|
+
"""Always false."""
|
|
95
|
+
displayedContentWithCertErrors: 'bool'
|
|
96
|
+
"""Always false."""
|
|
97
|
+
ranInsecureContentStyle: 'SecurityState'
|
|
98
|
+
"""Always set to unknown."""
|
|
99
|
+
displayedInsecureContentStyle: 'SecurityState'
|
|
100
|
+
"""Always set to unknown."""
|
|
101
|
+
CertificateErrorAction = Literal['continue','cancel']
|
|
102
|
+
"""The action to take when a certificate error occurs. continue will continue processing the request and cancel will cancel the request."""
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""CDP ServiceWorker Domain Events"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class ServiceWorkerEvents:
|
|
10
|
+
"""
|
|
11
|
+
Events for the ServiceWorker domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the ServiceWorker events.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
def on_worker_error_reported(self, callback: Callable[[workerErrorReportedEvent,Optional[str]], None]=None) -> None:
|
|
23
|
+
"""
|
|
24
|
+
No description available for workerErrorReported.
|
|
25
|
+
Args:
|
|
26
|
+
callback (callable, optional): Function called when the event is fired.
|
|
27
|
+
The callback receives (params: workerErrorReportedEvent, session_id: Optional[str]).
|
|
28
|
+
"""
|
|
29
|
+
self.client.on('ServiceWorker.workerErrorReported', callback)
|
|
30
|
+
def on_worker_registration_updated(self, callback: Callable[[workerRegistrationUpdatedEvent,Optional[str]], None]=None) -> None:
|
|
31
|
+
"""
|
|
32
|
+
No description available for workerRegistrationUpdated.
|
|
33
|
+
Args:
|
|
34
|
+
callback (callable, optional): Function called when the event is fired.
|
|
35
|
+
The callback receives (params: workerRegistrationUpdatedEvent, session_id: Optional[str]).
|
|
36
|
+
"""
|
|
37
|
+
self.client.on('ServiceWorker.workerRegistrationUpdated', callback)
|
|
38
|
+
def on_worker_version_updated(self, callback: Callable[[workerVersionUpdatedEvent,Optional[str]], None]=None) -> None:
|
|
39
|
+
"""
|
|
40
|
+
No description available for workerVersionUpdated.
|
|
41
|
+
Args:
|
|
42
|
+
callback (callable, optional): Function called when the event is fired.
|
|
43
|
+
The callback receives (params: workerVersionUpdatedEvent, session_id: Optional[str]).
|
|
44
|
+
"""
|
|
45
|
+
self.client.on('ServiceWorker.workerVersionUpdated', callback)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""CDP ServiceWorker Events"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.service_worker.types import ServiceWorkerErrorMessage
|
|
8
|
+
from cdp.protocol.service_worker.types import ServiceWorkerRegistration
|
|
9
|
+
from cdp.protocol.service_worker.types import ServiceWorkerVersion
|
|
10
|
+
|
|
11
|
+
class workerErrorReportedEvent(TypedDict, total=True):
|
|
12
|
+
errorMessage: 'ServiceWorkerErrorMessage'
|
|
13
|
+
class workerRegistrationUpdatedEvent(TypedDict, total=True):
|
|
14
|
+
registrations: 'List[ServiceWorkerRegistration]'
|
|
15
|
+
class workerVersionUpdatedEvent(TypedDict, total=True):
|
|
16
|
+
versions: 'List[ServiceWorkerVersion]'
|
|
File without changes
|