diff --git a/.github/workflows/client-demos.yml b/.github/workflows/client-demos.yml new file mode 100644 index 0000000..63df448 --- /dev/null +++ b/.github/workflows/client-demos.yml @@ -0,0 +1,88 @@ +name: Client Demos + +on: + pull_request: + push: + branches: + - main + +jobs: + client-demo: + name: ${{ matrix.client }} ${{ matrix.mode }} + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + client: [js, python, go] + mode: [loopback, debugger, direct] + env: + CHROME_PATH: /usr/bin/chromium + CI: "true" + GOFLAGS: -buildvcs=false + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + - uses: actions/setup-python@v5 + if: matrix.client == 'python' + with: + python-version: "3.12" + - uses: astral-sh/setup-uv@v5 + if: matrix.client == 'python' + - uses: actions/setup-go@v5 + if: matrix.client == 'go' + with: + go-version-file: client/go/go.mod + cache-dependency-path: client/go/go.sum + - run: pnpm install --frozen-lockfile + - run: pnpm run build + - name: Run ${{ matrix.client }} demo (${{ matrix.mode }}) + run: | + case "${{ matrix.client }}" in + js) + node dist/client/js/demo.js --${{ matrix.mode }} + ;; + python) + cd client/python + uv run python demo.py --${{ matrix.mode }} + ;; + go) + cd client/go + go run ./demo --${{ matrix.mode }} + ;; + *) + echo "unknown client: ${{ matrix.client }}" >&2 + exit 1 + ;; + esac + + proxy-example: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - name: playwright proxy + command: node dist/client/js/examples/playwright.js + - name: puppeteer proxy + command: node dist/client/js/examples/puppeteer.js + env: + CHROME_PATH: /usr/bin/chromium + CI: "true" + GOFLAGS: -buildvcs=false + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + - run: pnpm install --frozen-lockfile + - run: pnpm run build + - run: ${{ matrix.command }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..3587ae6 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,39 @@ +name: Lint + +on: + pull_request: + push: + branches: + - main + +permissions: + contents: read + +jobs: + prek: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v6 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22.12.0 + cache: pnpm + + - uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + + - uses: actions/setup-go@v5 + with: + go-version-file: client/go/go.mod + cache-dependency-path: client/go/go.sum + + - run: pnpm install --frozen-lockfile --prefer-offline + + - run: uv --directory client/python sync --dev --frozen + + - run: pnpm exec prek run --all-files diff --git a/.gitignore b/.gitignore index 340d04d..b5a33fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ node_modules/ dist/ -client/go/magiccdp -client/go/magic-cdp-go +client/go/cdpmod +client/go/cdpmod-go __pycache__/ diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 863b2f1..3c0d286 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -1,6 +1,6 @@ { "$schema": "./node_modules/oxfmt/configuration_schema.json", - "ignorePatterns": ["dist/**", "node_modules/**", "types/cdp.ts", "types/zod.ts"], + "ignorePatterns": ["dist/**", "node_modules/**", "types/aliases.ts", "types/cdp.ts", "types/zod.ts", "types/zod/**"], "printWidth": 120, "tabWidth": 2, "semi": true, diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..34ec507 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,79 @@ +repos: + - repo: local + hooks: + - id: oxfmt + name: oxfmt + entry: pnpm exec oxfmt + language: system + files: \.(js|ts|json|ya?ml)$ + exclude: ^types/(aliases|cdp|zod)\.ts$|^types/zod/ + - id: oxlint + name: oxlint + entry: pnpm exec oxlint --format=stylish --disable-nested-config --tsconfig tsconfig.json + language: system + files: \.(js|ts|json)$ + exclude: ^types/(cdp|zod)\.ts$ + pass_filenames: false + - id: tsc + name: tsc + entry: pnpm run typecheck + language: system + pass_filenames: false + always_run: true + - id: build + name: build + entry: pnpm run build + language: system + pass_filenames: false + always_run: true + - id: test + name: test + entry: pnpm run test + language: system + pass_filenames: false + always_run: true + - id: ty-check + name: ty-check + entry: uv --directory client/python run ty check + language: system + files: ^client/python/ + pass_filenames: false + - id: pyright + name: pyright + entry: uv --directory client/python run pyright + language: system + files: ^client/python/ + pass_filenames: false + - id: go-fmt + name: go-fmt + entry: gofmt -w + language: system + files: ^client/go/.*\.go$ + - id: go-build + name: go-build + entry: bash -c 'cd client/go && go build ./...' + language: system + files: ^client/go/ + pass_filenames: false + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-ast + - id: check-toml + - id: check-yaml + - id: check-json + - id: check-merge-conflict + - id: check-symlinks + - id: destroyed-symlinks + - id: check-case-conflict + - id: check-illegal-windows-names + - id: check-shebang-scripts-are-executable + - id: mixed-line-ending + - id: fix-byte-order-marker + - id: end-of-file-fixer + - id: detect-private-key + - id: debug-statements + - id: forbid-submodules + - id: check-added-large-files + args: ["--maxkb=600"] diff --git a/README.md b/README.md index 7f7c9a6..b353be6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# MagicCDP +# CDPMod CDP is powerful but it's been stretched to many use-cases beyond its initial audience. It is difficult for agents and humans to use without a harness library, because: @@ -12,33 +12,33 @@ CDP is powerful but it's been stretched to many use-cases beyond its initial aud While I had high hopes for WebDriver BiDi, unfortunately it solves almost none of these issues. -MagicCDP does not aim to solve all of these issues directly either. Instead it solves a simpler problem: allowing us to customize and extend CDP with new commands. +CDPMod does not aim to solve all of these issues directly either. Instead it solves a simpler problem: allowing us to customize and extend CDP with new commands. Then we use those basic primitives to fix the shortcomings in CDP by implementing our own custom events (all sent over a normal CDP websocket to a stock Chromium browser). | Primitive | What it does | | ------------------------ | ------------------------------------------------------------------------------------------------------- | -| `Magic.evaluate` | Run an expression in the MagicCDP extension service worker, with `chrome.*` and a `cdp` bridge in scope | -| `Magic.addCustomCommand` | Register a `Custom.*` method handler that lives in the SW | -| `Magic.addCustomEvent` | Register a `Custom.*` event your SW handlers can `emit()` | -| `Magic.addMiddleware` | Intercept service-worker-routed requests, responses, or events by name or `*` | +| `Mod.evaluate` | Run an expression in the CDPMod extension service worker, with `chrome.*` and a `cdp` bridge in scope | +| `Mod.addCustomCommand` | Register a `Custom.*` method handler that lives in the SW | +| `Mod.addCustomEvent` | Register a `Custom.*` event your SW handlers can `emit()` | +| `Mod.addMiddleware` | Intercept service-worker-routed requests, responses, or events by name or `*` | -Instead of inventing yet another browser driver library, MagicCDP fixes the issue at the root. +Instead of inventing yet another browser driver library, CDPMod fixes the issue at the root. It's perfectly compatible with playwright, puppeteer, etc. with no modifications. You can do things like `patchright` does, but generically at the CDP layer instead of having to patch libraries. -You can send `Magic.*`, `Custom.*`, etc. through standard Playwright/Puppeteer/other-driver-managed CDP sessions; `client/js/demo.ts`, `client/python/demo.py`, and `client/go/demo.go` demonstrate the flow in each language. +You can send `Mod.*`, `Custom.*`, etc. through standard Playwright/Puppeteer/other-driver-managed CDP sessions; `client/js/demo.ts`, `client/python/demo.py`, and `client/go/demo.go` demonstrate the flow in each language. ## Use it ```ts -import { MagicCDPClient } from "./dist/client/js/MagicCDPClient.js"; +import { CDPModClient } from "cdpmod"; import { z } from "zod"; // In stock Google Chrome, visit chrome://inspect/#remote-debugging first to // expose the current browser at localhost:9222. Passing cdp_url is optional // when that endpoint is live. const cdp_url = "http://127.0.0.1:9222"; // ws://... URLs work too -const cdp = new MagicCDPClient({ +const cdp = new CDPModClient({ cdp_url, routes: { "Target.getTargets": "service_worker" }, server: { loopback_cdp_url: cdp_url, routes: { "*.*": "loopback_cdp" } }, @@ -50,12 +50,12 @@ console.log(await cdp.Browser.getVersion()); cdp.on(cdp.Target.targetInfoChanged, console.log); // run extension code with chrome.* in scope -const tab = await cdp.Magic.evaluate({ +const tab = await cdp.Mod.evaluate({ expression: "(await chrome.tabs.query({ active: true }))[0]", }); // ✨ register and use custom CDP commands -await cdp.Magic.addCustomCommand({ +await cdp.Mod.addCustomCommand({ name: "Custom.tabIdFromTargetId", paramsSchema: { targetId: cdp.types.zod.Target.TargetID }, resultSchema: { tabId: z.number().nullable() }, @@ -78,8 +78,8 @@ const PageForegroundPageChanged = z .passthrough() .meta({ id: "Page.foregroundPageChanged" }); -await cdp.Magic.addCustomEvent(PageForegroundPageChanged); -await cdp.Magic.evaluate({ +await cdp.Mod.addCustomEvent(PageForegroundPageChanged); +await cdp.Mod.evaluate({ expression: `chrome.tabs.onActivated.addListener(async ({ tabId }) => cdp.emit("Page.foregroundPageChanged", { tabId, @@ -90,7 +90,7 @@ await cdp.Magic.evaluate({ cdp.on(PageForegroundPageChanged, console.log); // ✨ Intercept, modify, and extend existing CDP commands/results/events on the wire -await cdp.Magic.addMiddleware({ +await cdp.Mod.addMiddleware({ name: cdp.Target.getTargets, phase: cdp.RESPONSE, // attach .tabId next to every .targetId in events browser emits @@ -125,50 +125,50 @@ pnpm run demo:go ## Transparent Proxy -Upgrade any vanilla CDP client like Stagehand, Playwright, or Puppeteer transparently with support for `Magic.*` / `Custom.*` commands and events. +Upgrade any vanilla CDP client like Stagehand, Playwright, or Puppeteer transparently with support for `Mod.*` / `Custom.*` commands and events. ```sh pnpm run proxy -- --upstream http://127.0.0.1:9222 --port 9223 # const browser = await playwright.chromium.connectOverCDP("http://127.0.0.1:9223") # const session = await browser.contexts()[0].newCDPSession(page) -# await session.send("Magic.evaluate", { expression: "1 + 1" }) // -> 2 -# ✨ All Magic CDP commands now work through playwright! you can modify/extend playwright behavior to your heart's content +# await session.send("Mod.evaluate", { expression: "1 + 1" }) // -> 2 +# ✨ All CDPMod commands now work through playwright! you can modify/extend playwright behavior to your heart's content ``` ## Routing modes -`Magic.*` and `Custom.*` always go through the extension service worker. Routing only changes how _standard_ CDP methods (`Browser.*`, `Page.*`, `DOM.*`, …) are serviced: +`Mod.*` and `Custom.*` always go through the extension service worker. Routing only changes how _standard_ CDP methods (`Browser.*`, `Page.*`, `DOM.*`, …) are serviced: | Demo CLI Flag | Standard CDP path | Use when | | ------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------- | | `--loopback` | client → SW → SW dials its own WS back to localhost:9222 → CDP | Default. You need the SW to intercept/inspect/rewrite normal traffic. | | `--debugger` | client → SW → `chrome.debugger.sendCommand` against the active tab | The browser exposes no remote CDP port and you only have extension permissions. | -| `--direct` | client → sends non-Magic CDP commands to browser CDP directly | You already have a CDP endpoint and don't need extension interception. | +| `--direct` | client → sends non-CDPMod commands to browser CDP directly | You already have a CDP endpoint and don't need extension interception. | Pass via `routes: { "*.*": "direct_cdp" | "service_worker" }` on the client and `server: { routes: { "*.*": "loopback_cdp" | "chrome_debugger" } }` for the SW side. The demos default to `--loopback` (the most powerful mode). ## Repository layout ``` -extension/ MV3 extension; service worker registers MagicCDPServer +extension/ MV3 extension; service worker registers CDPModServer manifest.json service_worker.ts - MagicCDPServer.ts + CDPModServer.ts bridge/ translate.ts Pure stateless wrap/unwrap (used by both Node + SW) launcher.ts Find chrome/chromium binary, spawn with CDP enabled injector.ts Discover existing SW or Extensions.loadUnpacked it proxy.ts Local CDP proxy (upgrades any vanilla CDP client) client/ - js/MagicCDPClient.ts + demo.ts - python/MagicCDPClient.py + demo.py - go/MagicCDPClient.go + demo.go + js/CDPModClient.ts + demo.ts + python/CDPModClient.py + demo.py + go/CDPModClient.go + demo.go dist/ Built JS output used by the extension and Node CLI scripts ``` ## Requirements -- Stock Google Chrome can be used without relaunch flags: visit `chrome://inspect/#remote-debugging` to expose the current browser at `http://127.0.0.1:9222`, and load/install the MagicCDP extension in that profile. If no `cdp_url` is passed, the JS client probes that endpoint before auto-launching a test browser. +- Stock Google Chrome can be used without relaunch flags: visit `chrome://inspect/#remote-debugging` to expose the current browser at `http://127.0.0.1:9222`, and load/install the CDPMod extension in that profile. If no `cdp_url` is passed, the JS client probes that endpoint before auto-launching a test browser. - Automated/test browsers can still preload the extension with `--load-extension=`. `Extensions.loadUnpacked` is used as a fallback when the connected browser exposes it over CDP. - Node ≥ 22, Python ≥ 3.11 with `websocket-client`, Go ≥ 1.24 with `gobwas/ws`. @@ -180,21 +180,21 @@ dist/ Built JS output used by the extension and Node CLI scr ### Connect 1. Open a raw CDP websocket to the browser. If no `cdp_url` is supplied, the JS client first tries the live stock-Chrome endpoint at `http://127.0.0.1:9222`, then auto-launches a test browser only if that is not reachable. -2. `bridge/injector.js` either discovers an existing MagicCDP service worker target or installs the extension via `Extensions.loadUnpacked` when the connected browser permits it. +2. `bridge/injector.js` either discovers an existing CDPMod service worker target or installs the extension via `Extensions.loadUnpacked` when the connected browser permits it. 3. Attach a session to that SW target and `Runtime.enable` on it. -4. Call `globalThis.MagicCDP.configure(...)` to push the resolved loopback websocket and any explicit server route overrides into the SW. The clients do this automatically by default. +4. Call `globalThis.CDPMod.configure(...)` to push the resolved loopback websocket and any explicit server route overrides into the SW. The clients do this automatically by default. ### Send -- `Magic.evaluate({ expression, params, cdpSessionId })` → `Runtime.evaluate` on the ext session, wrapping the expression with an IIFE that exposes `params` and `cdp = MagicCDP.attachToSession(...)`. -- `Magic.addCustomCommand({ name, expression, ... })` → `Runtime.evaluate` calling `globalThis.MagicCDP.addCustomCommand({ ... })` with the user expression embedded as the handler. -- `Magic.addCustomEvent(EventSchema.meta({ id }))` → `Runtime.addBinding({ name: "__MagicCDP_" })`, then a `Runtime.evaluate` registering the event in `globalThis.MagicCDP`. -- `Magic.addMiddleware({ name, phase, expression })` → `Runtime.evaluate` registering a service-worker middleware for `phase: "request" | "response" | "event"`. Use `name: "*"` to match every method/event in that phase, or pass generated names like `cdp.Target.targetInfoChanged`. -- `Custom.X(params)` → `Runtime.evaluate` calling `globalThis.MagicCDP.handleCommand("Custom.X", params, cdpSessionId)`. +- `Mod.evaluate({ expression, params, cdpSessionId })` → `Runtime.evaluate` on the ext session, wrapping the expression with an IIFE that exposes `params` and `cdp = CDPMod.attachToSession(...)`. +- `Mod.addCustomCommand({ name, expression, ... })` → `Runtime.evaluate` calling `globalThis.CDPMod.addCustomCommand({ ... })` with the user expression embedded as the handler. +- `Mod.addCustomEvent(EventSchema.meta({ id }))` → `Runtime.addBinding({ name: "__CDPMod_" })`, then a `Runtime.evaluate` registering the event in `globalThis.CDPMod`. +- `Mod.addMiddleware({ name, phase, expression })` → `Runtime.evaluate` registering a service-worker middleware for `phase: "request" | "response" | "event"`. Use `name: "*"` to match every method/event in that phase, or pass generated names like `cdp.Target.targetInfoChanged`. +- `Custom.X(params)` → `Runtime.evaluate` calling `globalThis.CDPMod.handleCommand("Custom.X", params, cdpSessionId)`. ### Receive -When SW handlers `cdp.emit('Custom.X', payload)`, the SW invokes `globalThis.__MagicCDP_Custom_X(JSON.stringify({ event, data, cdpSessionId }))`. CDP delivers `Runtime.bindingCalled` on the ext session; the client (or proxy) decodes the payload, filters by `cdpSessionId`, and re-dispatches as a normal `cdp.on('Custom.X', ...)` event. +When SW handlers `cdp.emit('Custom.X', payload)`, the SW invokes `globalThis.__CDPMod_Custom_X(JSON.stringify({ event, data, cdpSessionId }))`. CDP delivers `Runtime.bindingCalled` on the ext session; the client (or proxy) decodes the payload, filters by `cdpSessionId`, and re-dispatches as a normal `cdp.on('Custom.X', ...)` event. ### Why this works @@ -213,10 +213,10 @@ When SW handlers `cdp.emit('Custom.X', payload)`, the SW invokes `globalThis.__M type CDPUpstream = "service_worker" | "direct_cdp" | "auto" | "loopback_cdp" | "chrome_debugger"; // client-side defaults -const clientRoutes = { "Magic.*": "service_worker", "Custom.*": "service_worker", "*.*": "service_worker" } as const; +const clientRoutes = { "Mod.*": "service_worker", "Custom.*": "service_worker", "*.*": "service_worker" } as const; // server-side defaults (inside the SW) -const serverRoutes = { "Magic.*": "service_worker", "Custom.*": "service_worker", "*.*": "auto" } as const; +const serverRoutes = { "Mod.*": "service_worker", "Custom.*": "service_worker", "*.*": "auto" } as const; ``` - **`service_worker`** — handle in the extension SW. @@ -270,8 +270,8 @@ flowchart LR direction LR SDK["SDK"] WS["WS client"] - SDK -->|"1. cdp.on('Target.attachedToTarget', ...)"| WS - SDK -->|"2. cdp.send('Target.attachToTarget', ...)"| WS + SDK -->|"1. cdp.on('Target.targetCreated', ...)"| WS + SDK -->|"2. cdp.Target.createTarget({url})"| WS end subgraph Browser["Browser"] @@ -284,19 +284,19 @@ flowchart LR Socket["CDP socket"] - WS -->|"3. CDP Target.attachToTarget"| Socket + WS -->|"3. CDP Target.createTarget"| Socket Socket -->|"4. Standard CDP"| CDP - CDP -->|"6. attach session"| Page - Page -->|"7. Target.attachedToTarget
{sessionId, targetInfo}"| CDP - CDP -->|"8. Target.attachedToTarget
{sessionId, targetInfo}"| Socket - Socket -->|"9. Target.attachedToTarget
{sessionId, targetInfo}"| WS - WS -->|"10. emit('Target.attachedToTarget', {sessionId, targetInfo})"| SDK + CDP -->|"6. create page target"| Page + Page -->|"7. Target.targetCreated
{targetInfo}"| CDP + CDP -->|"8. Target.targetCreated
{targetInfo}"| Socket + Socket -->|"9. Target.targetCreated
{targetInfo}"| WS + WS -->|"10. emit('Target.targetCreated', {targetInfo})"| SDK classDef idle fill:#f7f7f7,stroke:#bbb,color:#777; class SW idle; ``` -#### 3. MagicCDP Custom Call / Response +#### 3. CDPMod Custom Call / Response ```mermaid flowchart LR @@ -304,39 +304,39 @@ flowchart LR direction LR SDK["SDK"] WS["WS client"] - SDK -->|"1. cdp.send('Magic.evaluate', ...)"| WS + SDK -->|"1. cdp.send('Mod.evaluate', ...)"| WS end subgraph Browser["Browser"] direction LR ClientCDP["CDP Session for client
localhost:9222"] LoopbackCDP["CDP Session for loopback
localhost:9222"] - SW["Extension service worker
CDP target / JS context
globalThis.MagicCDP"] + SW["Extension service worker
CDP target / JS context
globalThis.CDPMod"] Page["Page target"] - ClientCDP -->|"4. dispatch Runtime.evaluate(Magic.evaluate)"| SW + ClientCDP -->|"4. dispatch Runtime.evaluate(Mod.evaluate)"| SW LoopbackCDP -->|"7. Input.dispatchMouseEvent"| Page Page -->|"8. Input.dispatchMouseEvent result"| LoopbackCDP SW -. "chrome.debugger
not used" .-> Page end - ClientSocket["client CDP socket.
carries Magic.evaluate ..."] + ClientSocket["client CDP socket.
carries Mod.evaluate ..."] LoopbackSocket["loopback CDP socket.
carries standard CDP only"] ClientSocket ~~~ LoopbackSocket - WS -->|"2. Runtime.evaluate(Magic.evaluate)"| ClientSocket - ClientSocket -->|"3. Runtime.evaluate(Magic.evaluate)"| ClientCDP + WS -->|"2. Runtime.evaluate(Mod.evaluate)"| ClientSocket + ClientSocket -->|"3. Runtime.evaluate(Mod.evaluate)"| ClientCDP SW -->|"5. WebSocket CDP loopback
out of Browser
Input.dispatchMouseEvent"| LoopbackSocket LoopbackSocket -->|"6. Input.dispatchMouseEvent"| LoopbackCDP LoopbackCDP -->|"9. Input.dispatchMouseEvent result"| LoopbackSocket LoopbackSocket -->|"10. Input.dispatchMouseEvent result
back into Browser"| SW - SW -->|"11. Runtime.evaluate(Magic.evaluate) result"| ClientCDP - ClientCDP -->|"12. Runtime.evaluate(Magic.evaluate) result"| ClientSocket + SW -->|"11. Runtime.evaluate(Mod.evaluate) result"| ClientCDP + ClientCDP -->|"12. Runtime.evaluate(Mod.evaluate) result"| ClientSocket ClientSocket -->|"13. => {ok, action, target}"| WS ``` -The same transport shape applies to `Magic.addCustomCommand`: the client installs a named command handler in the service worker, and later `cdp.send('Custom.someCommand', params)` is routed back through `globalThis.MagicCDP.handleCommand(...)`. +The same transport shape applies to `Mod.addCustomCommand`: the client installs a named command handler in the service worker, and later `cdp.send('Custom.someCommand', params)` is routed back through `globalThis.CDPMod.handleCommand(...)`. -#### 4. MagicCDP Custom Event Listener / Event +#### 4. CDPMod Custom Event Listener / Event ```mermaid flowchart LR @@ -345,35 +345,35 @@ flowchart LR SDK["SDK"] WS["WS client"] SDK -->|"1. cdp.on('Custom.demo', ...)"| WS - SDK -->|"6. cdp.send('Magic.evaluate', ...)"| WS + SDK -->|"6. cdp.send('Mod.evaluate', ...)"| WS end subgraph Browser["Browser"] direction LR ClientCDP["CDP Session for client
localhost:9222"] LoopbackCDP["CDP Session for loopback
localhost:9222"] - SW["Extension service worker
CDP target / JS context
MagicCDP + bindings"] + SW["Extension service worker
CDP target / JS context
CDPMod + bindings"] Page["Page target"] - ClientCDP -->|"5. dispatch Runtime.evaluate(Magic.addCustomEvent)
9. dispatch Runtime.evaluate(Magic.evaluate)"| SW + ClientCDP -->|"5. dispatch Runtime.evaluate(Mod.addCustomEvent)
9. dispatch Runtime.evaluate(Mod.evaluate)"| SW LoopbackCDP -->|"12. Input.dispatchMouseEvent"| Page Page -->|"13. Input.dispatchMouseEvent result"| LoopbackCDP SW -. "chrome.debugger
not used" .-> Page end - ClientSocket["client CDP socket.
carries MagicCDP ..."] + ClientSocket["client CDP socket.
carries CDPMod ..."] LoopbackSocket["loopback CDP socket.
carries standard CDP only"] ClientSocket ~~~ LoopbackSocket WS -->|"2. CDP Runtime.addBinding"| ClientSocket - WS -->|"3. Magic.addCustomEvent
7. Magic.evaluate(cdp.emit(...))"| ClientSocket - ClientSocket <-->|"4. Runtime.evaluate(Magic.addCustomEvent)
8. Runtime.evaluate(Magic.evaluate)"| ClientCDP + WS -->|"3. Mod.addCustomEvent
7. Mod.evaluate(cdp.emit(...))"| ClientSocket + ClientSocket <-->|"4. Runtime.evaluate(Mod.addCustomEvent)
8. Runtime.evaluate(Mod.evaluate)"| ClientCDP SW -->|"10. WebSocket CDP loopback
out of Browser
Input.dispatchMouseEvent"| LoopbackSocket LoopbackSocket -->|"11. Input.dispatchMouseEvent"| LoopbackCDP LoopbackCDP -->|"14. Input.dispatchMouseEvent result"| LoopbackSocket LoopbackSocket -->|"15. Input.dispatchMouseEvent result
service worker emits custom event"| SW - SW -->|"16. Runtime.bindingCalled
{name:'__MagicCDP_Custom_demo', payload:'{event:Custom.demo,data:test}'}"| ClientCDP - ClientCDP -->|"17. Standard CDP event
Runtime.bindingCalled {name:'__MagicCDP_Custom_demo', payload:'{event:Custom.demo,data:test}'}"| ClientSocket - ClientSocket -->|"18. Standard CDP event
Runtime.bindingCalled {name:'__MagicCDP_Custom_demo', payload:'{event:Custom.demo,data:test}'}"| WS + SW -->|"16. Runtime.bindingCalled
{name:'__CDPMod_Custom_demo', payload:'{event:Custom.demo,data:test}'}"| ClientCDP + ClientCDP -->|"17. Standard CDP event
Runtime.bindingCalled {name:'__CDPMod_Custom_demo', payload:'{event:Custom.demo,data:test}'}"| ClientSocket + ClientSocket -->|"18. Standard CDP event
Runtime.bindingCalled {name:'__CDPMod_Custom_demo', payload:'{event:Custom.demo,data:test}'}"| WS WS -->|"19. emit('Custom.demo', 'test')"| SDK ``` @@ -384,10 +384,10 @@ flowchart LR **Constraints** -- This does not add real CDP methods to Chrome — the wire methods stay `Runtime.evaluate` + `Runtime.bindingCalled`. The `Magic.*` / `Custom.*` namespace is a client + SW convention. +- This does not add real CDP methods to Chrome — the wire methods stay `Runtime.evaluate` + `Runtime.bindingCalled`. The `Mod.*` / `Custom.*` namespace is a client + SW convention. - Page JS does not see custom commands or event bindings. - Stock Google Chrome's `chrome://inspect/#remote-debugging` toggle can expose the current browser at `localhost:9222` without relaunching with `--remote-debugging-port`, `--enable-unsafe-extension-debugging`, or `--remote-allow-origins=*`. -- If `Extensions.loadUnpacked` is unavailable in the connected browser, load/install the MagicCDP extension in that Chrome profile once and reconnect; the injector will use the discovery path. +- If `Extensions.loadUnpacked` is unavailable in the connected browser, load/install the CDPMod extension in that Chrome profile once and reconnect; the injector will use the discovery path. **Alternatives considered** @@ -426,10 +426,10 @@ Tested browsers: Latency columns: -- `direct` — Magic client to browser raw CDP `Page.getFrameTree` against an attached `about:blank` page target. -- `pong` — Magic client to browser to extension service worker `Magic.pong` round trip. -- `loopback` — Magic client to browser to extension service worker to loopback CDP to browser `Page.getFrameTree`. -- `debugger` — Magic client to browser to extension service worker to `chrome.debugger.sendCommand` `Page.getFrameTree`. +- `direct` — CDPMod client to browser raw CDP `Page.getFrameTree` against an attached `about:blank` page target. +- `pong` — CDPMod client to browser to extension service worker `Mod.pong` round trip. +- `loopback` — CDPMod client to browser to extension service worker to loopback CDP to browser `Page.getFrameTree`. +- `debugger` — CDPMod client to browser to extension service worker to `chrome.debugger.sendCommand` `Page.getFrameTree`. The launched-browser rows used an isolated temporary user data dir. The live/default-profile row is separate because it depends on the user enabling Chrome's `chrome://inspect/#remote-debugging` flow and accepting Chrome's connection prompt. @@ -454,7 +454,7 @@ The launched-browser rows used an isolated temporary user data dir. The live/def | Playwright Chrome for Testing 147 | headful | `--loopback` | yes | yes | yes\* | yes | yes | no | 2.4 | 1 | 12.5 | - | | Playwright Chrome for Testing 147 | headful | `--debugger` | yes | yes | yes\* | no | no | no | 2.1 | 1 | - | 1.2 | -`*` Playwright Chrome for Testing exposes `chrome.debugger` when the Magic extension is launched with `--load-extension`. With auto-injection only, `--direct` and `--loopback` still work, but `chrome.debugger` is not available in the borrowed/injected service worker. +`*` Playwright Chrome for Testing exposes `chrome.debugger` when the CDPMod extension is launched with `--load-extension`. With auto-injection only, `--direct` and `--loopback` still work, but `chrome.debugger` is not available in the borrowed/injected service worker. Live/default-profile status: diff --git a/bridge/injector.ts b/bridge/injector.ts index 2c85ed3..f903885 100644 --- a/bridge/injector.ts +++ b/bridge/injector.ts @@ -1,177 +1,216 @@ -// injector.js: inject the MagicCDP extension service worker when needed in a +// injector.js: inject the CDPMod extension service worker when needed in a // running Chrome and return a CDP session attached to it. // -// The caller hands in a `send(method, params, sessionId?)` function bound to +// The caller hands in a `send(method, params, session_id?)` function bound to // the upstream CDP websocket. The injector knows about Extensions.loadUnpacked, -// service-worker URL pattern matching, and probe-by-globalThis.MagicCDP, but +// service-worker URL pattern matching, and probe-by-globalThis.CDPMod, but // nothing about chrome binaries, the proxy, or wrap/unwrap. // // Precedence (single source of truth — do not duplicate this in proxy/client): // 1. Look for an existing service-worker target whose JS context already has -// globalThis.MagicCDP. Use it. (source: "discovered") -// 2. Otherwise call Extensions.loadUnpacked(extensionPath) and wait for that +// globalThis.CDPMod. Use it. (source: "discovered") +// 2. Otherwise call Extensions.loadUnpacked(extension_path) and wait for that // extension's service worker to appear. (source: "injected") -// 3. If Chrome refuses extension loading, bootstrap MagicCDP into every +// 3. If Chrome refuses extension loading, bootstrap CDPMod into every // already-running extension service worker target and use the best one. // (source: "borrowed") // 4. Otherwise throw with explicit instructions for all failure modes. -import type { ProtocolParams, ProtocolResult } from "../types/magic.js"; -import { commands } from "../types/zod.js"; -import { installMagicCDPServer } from "../extension/MagicCDPServer.js"; +import type { ProtocolParams, ProtocolResult } from "../types/cdpmod.js"; +import { commands as RuntimeCommands } from "../types/zod/Runtime.js"; +import { commands as TargetCommands } from "../types/zod/Target.js"; +import { installCDPModServer } from "../extension/CDPModServer.js"; const EXT_ID_FROM_URL = /^chrome-extension:\/\/([a-z]+)\//; +const CDPMOD_READY_EXPRESSION = + "Boolean(globalThis.CDPMod?.__CDPModServerVersion === 1 && globalThis.CDPMod?.handleCommand && globalThis.CDPMod?.addCustomEvent)"; -type SendCDP = (method: string, params?: ProtocolParams, sessionId?: string | null) => Promise; +type SendCDP = (method: string, params?: ProtocolParams, session_id?: string | null) => Promise; +type TargetInfo = { targetId: string; type?: string; url?: string }; -const bootstrapMagicCDPServerExpression = ` +const bootstrap_cdpmod_server_expression = ` (() => { - const installMagicCDPServer = ${installMagicCDPServer.toString()}; - const MagicCDP = installMagicCDPServer(globalThis); + const __name = (fn) => fn; + const installCDPModServer = ${installCDPModServer.toString()}; + const CDPMod = installCDPModServer(globalThis); return { - ok: Boolean(MagicCDP?.__MagicCDPServerVersion === 1 && MagicCDP?.handleCommand && MagicCDP?.addCustomEvent), - extensionId: globalThis.chrome?.runtime?.id ?? null, - hasTabs: Boolean(globalThis.chrome?.tabs?.query), - hasDebugger: Boolean(globalThis.chrome?.debugger?.sendCommand), + ok: Boolean(CDPMod?.__CDPModServerVersion === 1 && CDPMod?.handleCommand && CDPMod?.addCustomEvent), + extension_id: globalThis.chrome?.runtime?.id ?? null, + has_tabs: Boolean(globalThis.chrome?.tabs?.query), + has_debugger: Boolean(globalThis.chrome?.debugger?.sendCommand), }; })() `; export async function injectExtensionIfNeeded({ send, - extensionPath, - timeoutMs = 10_000, - discoveryWaitMs = 10_000, + session_id_for_target = null, + extension_path, + service_worker_url_includes = [], + service_worker_url_suffixes = [], + trust_matched_service_worker = false, + require_service_worker_target = false, + service_worker_ready_expression = null, }: { send: SendCDP; - extensionPath?: string | null; - timeoutMs?: number; - discoveryWaitMs?: number; + session_id_for_target?: ((target_id: string) => string | null | undefined) | null; + extension_path?: string | null; + service_worker_url_includes?: string[]; + service_worker_url_suffixes?: string[]; + trust_matched_service_worker?: boolean; + require_service_worker_target?: boolean; + service_worker_ready_expression?: string | null; }) { if (typeof send !== "function") throw new Error("injectExtensionIfNeeded requires { send }"); - const sendWithTimeout = (method: string, params: ProtocolParams = {}, sessionId: string | null = null, ms = 2_000) => + const ready_expression = + service_worker_ready_expression == null || service_worker_ready_expression.length === 0 + ? CDPMOD_READY_EXPRESSION + : `(${CDPMOD_READY_EXPRESSION}) && Boolean(${service_worker_ready_expression})`; + const sendWithTimeout = (method: string, params: ProtocolParams = {}, session_id: string | null = null, ms = 2_000) => Promise.race([ - send(method, params, sessionId), + send(method, params, session_id), new Promise((_, reject) => setTimeout(() => reject(new Error(`${method} timed out after ${ms}ms`)), ms)), ]); - // extensionPath is only required as a fallback, when discovery does not turn - // up an already-loaded MagicCDP service worker. Validate at the point of use + // extension_path is only required as a fallback, when discovery does not turn + // up an already-loaded CDPMod service worker. Validate at the point of use // (step 2) so callers running against a browser that already has the // extension loaded don't have to provide a path at all. - // 1. Discover an existing MagicCDP service worker. Extensions loaded with - // --load-extension at browser launch take a moment to spin their SW *and* - // for the SW's top-level module init to run, so we attach to each candidate - // and re-probe its globalThis until either MagicCDP appears or we time out. - const attached: { targetId: string; url: string; sessionId: string }[] = []; - const discoveryDeadline = Date.now() + discoveryWaitMs; - while (Date.now() <= discoveryDeadline) { - const { targetInfos } = commands["Target.getTargets"].result.parse(await send("Target.getTargets")); - for (const candidate of targetInfos) { - if (candidate.type !== "service_worker") continue; - if (!candidate.url.startsWith("chrome-extension://")) continue; - if (attached.some((a) => a.targetId === candidate.targetId)) continue; - try { - const { sessionId } = commands["Target.attachToTarget"].result.parse( - await sendWithTimeout("Target.attachToTarget", { targetId: candidate.targetId, flatten: true }), - ); - attached.push({ targetId: candidate.targetId, url: candidate.url, sessionId }); - } catch {} + const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); + const sessionIdForTarget = async (target_id: string, timeout_ms = 0) => { + const deadline = Date.now() + timeout_ms; + while (true) { + const session_id = session_id_for_target?.(target_id); + if (typeof session_id === "string" && session_id.length > 0) return session_id; + if (Date.now() >= deadline) return null; + await sleep(20); } - for (const a of attached) { - let probe; - try { - probe = commands["Runtime.evaluate"].result.parse( - await sendWithTimeout( - "Runtime.evaluate", - { - expression: - "Boolean(globalThis.MagicCDP?.__MagicCDPServerVersion === 1 && globalThis.MagicCDP?.handleCommand && globalThis.MagicCDP?.addCustomEvent)", - returnByValue: true, - }, - a.sessionId, - ), - ); - } catch { - continue; - } - if (probe.result?.value === true) { - // detach every other speculative session before returning - for (const other of attached) { - if (other.sessionId === a.sessionId) continue; - await send("Target.detachFromTarget", { sessionId: other.sessionId }).catch(() => {}); - } - return { - source: "discovered", - extensionId: a.url.match(EXT_ID_FROM_URL)?.[1], - targetId: a.targetId, - url: a.url, - sessionId: a.sessionId, - }; - } + }; + const probeTarget = async (target: TargetInfo, session_timeout_ms = 0) => { + const session_id = await sessionIdForTarget(target.targetId, session_timeout_ms); + if (session_id == null) return null; + const probe = RuntimeCommands["Runtime.evaluate"].result.parse( + await sendWithTimeout( + "Runtime.evaluate", + { + expression: ready_expression, + returnByValue: true, + }, + session_id, + ), + ); + if (probe.result?.value !== true) return null; + return { + extension_id: target.url?.match(EXT_ID_FROM_URL)?.[1], + target_id: target.targetId, + url: target.url, + session_id, + }; + }; + + // 1. Discover an existing CDPMod service worker from the current CDP target + // snapshot. If no already-ready worker is visible, move on to the explicit + // injection path instead of waiting on a guessed preinstalled-extension budget. + const target_infos = TargetCommands["Target.getTargets"].result.parse(await send("Target.getTargets")).targetInfos; + if (trust_matched_service_worker) { + const trusted_target = target_infos.find((candidate) => serviceWorkerTargetMatches(candidate)) as + | TargetInfo + | undefined; + if (trusted_target) { + const probed = await probeTarget(trusted_target, 2_000); + if (probed) return { source: "trusted", ...probed }; + } + } + for (const candidate of target_infos) { + if (candidate.type !== "service_worker") continue; + if (!candidate.url.startsWith("chrome-extension://")) continue; + try { + const probed = await probeTarget(candidate as TargetInfo, 2_000); + if (probed) return { source: "discovered", ...probed }; + } catch { + continue; } - if (Date.now() >= discoveryDeadline) break; - await new Promise((resolve) => setTimeout(resolve, 100)); } - for (const a of attached) await send("Target.detachFromTarget", { sessionId: a.sessionId }).catch(() => {}); + if (require_service_worker_target) { + throw new Error( + `Required CDPMod service worker target was not visible in the current CDP target snapshot ` + + `(${[...service_worker_url_includes, ...service_worker_url_suffixes].join(", ") || "no matcher"}).`, + ); + } // 2. Try Extensions.loadUnpacked. - let loadUnpackedUnavailableError: Error | null = null; - if (!extensionPath) { - loadUnpackedUnavailableError = new Error("No extensionPath was provided."); + let load_unpacked_unavailable_error: Error | null = null; + if (!extension_path) { + load_unpacked_unavailable_error = new Error("No extension_path was provided."); } else { - let loadResult; + let load_result; try { - loadResult = await send("Extensions.loadUnpacked", { path: extensionPath }); + load_result = await send("Extensions.loadUnpacked", { path: extension_path }); } catch (error) { - if (/Method not available|Method.*not.*found|wasn't found/i.test(error.message)) { - loadUnpackedUnavailableError = error; + const load_error = error instanceof Error ? error : new Error(String(error)); + if (/Method not available|Method.*not.*found|wasn't found/i.test(load_error.message)) { + load_unpacked_unavailable_error = load_error; + const target_infos = TargetCommands["Target.getTargets"].result.parse( + await send("Target.getTargets"), + ).targetInfos; + if (trust_matched_service_worker) { + const trusted_target = target_infos.find((candidate) => serviceWorkerTargetMatches(candidate)) as + | TargetInfo + | undefined; + if (trusted_target) { + const probed = await probeTarget(trusted_target, 2_000); + if (probed) return { source: "trusted", ...probed }; + } + } + for (const candidate of target_infos) { + if (candidate.type !== "service_worker") continue; + if (!candidate.url.startsWith("chrome-extension://")) continue; + try { + const probed = await probeTarget(candidate as TargetInfo, 2_000); + if (probed) return { source: "discovered", ...probed }; + } catch { + continue; + } + } } else { throw new Error( - `Extensions.loadUnpacked failed for ${extensionPath}: ${error.message}\n` + - `If the path is correct and the manifest is valid, load the MagicCDP extension manually in chrome://extensions and reconnect.`, + `Extensions.loadUnpacked failed for ${extension_path}: ${load_error.message}\n` + + `If the path is correct and the manifest is valid, load the CDPMod extension manually in chrome://extensions and reconnect.`, ); } } - if (!loadUnpackedUnavailableError) { - const extensionId = loadResult?.id || loadResult?.extensionId; - if (!extensionId) { - throw new Error(`Extensions.loadUnpacked returned no extension id (got ${JSON.stringify(loadResult)})`); + if (!load_unpacked_unavailable_error) { + const extension_id = load_result?.id || load_result?.extensionId; + if (!extension_id) { + throw new Error(`Extensions.loadUnpacked returned no extension id (got ${JSON.stringify(load_result)})`); } - // 3. Wait for the loaded extension's service worker target. - const swUrl = `chrome-extension://${extensionId}/service_worker.js`; - const deadline = Date.now() + timeoutMs; + // 3. Wait for the loaded extension's service worker target. Custom extensions + // can name the worker bundle anything; WXT uses background.js. + const sw_url_prefix = `chrome-extension://${extension_id}/`; + const deadline = Date.now() + 60_000; while (Date.now() < deadline) { - const { targetInfos } = commands["Target.getTargets"].result.parse(await send("Target.getTargets")); - const target = targetInfos.find((t) => t.type === "service_worker" && t.url === swUrl); + const target_infos = TargetCommands["Target.getTargets"].result.parse( + await send("Target.getTargets"), + ).targetInfos; + const target = target_infos.find( + (candidate) => candidate.type === "service_worker" && candidate.url.startsWith(sw_url_prefix), + ) as TargetInfo | undefined; if (target) { - const { sessionId } = commands["Target.attachToTarget"].result.parse( - await send("Target.attachToTarget", { targetId: target.targetId, flatten: true }), - ); - const probe = commands["Runtime.evaluate"].result.parse( - await send( - "Runtime.evaluate", - { - expression: - "Boolean(globalThis.MagicCDP?.__MagicCDPServerVersion === 1 && globalThis.MagicCDP?.handleCommand && globalThis.MagicCDP?.addCustomEvent)", - returnByValue: true, - }, - sessionId, - ), - ); - if (probe.result?.value === true) { - return { source: "injected", extensionId, targetId: target.targetId, url: swUrl, sessionId }; - } - await send("Target.detachFromTarget", { sessionId }).catch(() => {}); + const probed = await probeTarget(target, 2_000); + if (probed) + return { + source: "injected", + extension_id, + target_id: target.targetId, + url: target.url, + session_id: probed.session_id, + }; } - await new Promise((resolve) => setTimeout(resolve, 100)); + await sleep(100); } - throw new Error( - `Extensions.loadUnpacked installed extension ${extensionId} but its service worker target ` + - `at ${swUrl} did not appear within ${timeoutMs}ms.`, - ); + throw new Error(`Timed out after 60s waiting for service worker target for extension ${extension_id}.`); } } @@ -179,77 +218,97 @@ export async function injectExtensionIfNeeded({ // exposing Extensions.loadUnpacked. In that case, inject the same server into // every currently running extension service worker and keep the best session. const borrowed: { - targetId: string; + target_id: string; url: string; - sessionId: string; - extensionId?: string | null; - hasTabs?: boolean; - hasDebugger?: boolean; + session_id: string; + extension_id?: string | null; + has_tabs?: boolean; + has_debugger?: boolean; }[] = []; - const { targetInfos } = commands["Target.getTargets"].result.parse(await send("Target.getTargets")); - for (const target of targetInfos) { + const borrowed_target_infos = TargetCommands["Target.getTargets"].result.parse( + await send("Target.getTargets"), + ).targetInfos; + for (const target of borrowed_target_infos) { if (target.type !== "service_worker") continue; if (!target.url.startsWith("chrome-extension://")) continue; - let sessionId: string | null = null; + let session_id: string | null = null; try { - sessionId = commands["Target.attachToTarget"].result.parse( - await sendWithTimeout("Target.attachToTarget", { targetId: target.targetId, flatten: true }), - ).sessionId; - await send("Runtime.enable", {}, sessionId).catch(() => {}); - const bootstrap = commands["Runtime.evaluate"].result.parse( + session_id = await sessionIdForTarget(target.targetId, 2_000); + if (session_id == null) continue; + await send("Runtime.enable", {}, session_id).catch(() => {}); + const bootstrap = RuntimeCommands["Runtime.evaluate"].result.parse( await sendWithTimeout( "Runtime.evaluate", { - expression: bootstrapMagicCDPServerExpression, + expression: bootstrap_cdpmod_server_expression, awaitPromise: true, returnByValue: true, allowUnsafeEvalBlockedByCSP: true, }, - sessionId, + session_id, 3_000, ), ); const value = bootstrap.result?.value || {}; - if (value.ok) { + let ready = Boolean(value.ok); + if (ready && ready_expression !== CDPMOD_READY_EXPRESSION) { + const probe = RuntimeCommands["Runtime.evaluate"].result.parse( + await sendWithTimeout( + "Runtime.evaluate", + { expression: ready_expression, returnByValue: true }, + session_id, + 2_000, + ), + ); + ready = probe.result?.value === true; + } + if (ready) { borrowed.push({ - targetId: target.targetId, + target_id: target.targetId, url: target.url, - sessionId, - extensionId: value.extensionId || target.url.match(EXT_ID_FROM_URL)?.[1] || null, - hasTabs: Boolean(value.hasTabs), - hasDebugger: Boolean(value.hasDebugger), + session_id, + extension_id: value.extension_id || target.url.match(EXT_ID_FROM_URL)?.[1] || null, + has_tabs: Boolean(value.has_tabs), + has_debugger: Boolean(value.has_debugger), }); - } else { - await send("Target.detachFromTarget", { sessionId }).catch(() => {}); } - } catch { - if (sessionId) await send("Target.detachFromTarget", { sessionId }).catch(() => {}); - } + } catch {} } - borrowed.sort((a, b) => Number(b.hasDebugger) - Number(a.hasDebugger) || Number(b.hasTabs) - Number(a.hasTabs)); + borrowed.sort((a, b) => Number(b.has_debugger) - Number(a.has_debugger) || Number(b.has_tabs) - Number(a.has_tabs)); const selected = borrowed[0]; - for (const other of borrowed.slice(1)) - await send("Target.detachFromTarget", { sessionId: other.sessionId }).catch(() => {}); if (selected) { return { source: "borrowed", - extensionId: selected.extensionId, - targetId: selected.targetId, + extension_id: selected.extension_id, + target_id: selected.target_id, url: selected.url, - sessionId: selected.sessionId, + session_id: selected.session_id, }; } throw new Error( - `Cannot install or borrow MagicCDP in the running browser.\n\n` + - ` - No existing service worker with globalThis.MagicCDP was found in the browser.\n` + - ` - Extensions.loadUnpacked is unavailable ("${loadUnpackedUnavailableError.message}").\n` + - ` - No running chrome-extension:// service worker target accepted the MagicCDP bootstrap.\n\n` + + `Cannot install or borrow CDPMod in the running browser.\n\n` + + ` - No existing service worker with globalThis.CDPMod was found in the browser.\n` + + ` - Extensions.loadUnpacked is unavailable ("${load_unpacked_unavailable_error.message}").\n` + + ` - No running chrome-extension:// service worker target accepted the CDPMod bootstrap.\n\n` + `Fixes (any one of these):\n` + ` 1. Open or wake an installed extension that has a service worker, then reconnect.\n` + - ` 2. Load the MagicCDP extension once at chrome://extensions and reconnect.\n` + - (extensionPath ? ` 3. For automated/test browsers, relaunch with --load-extension=${extensionPath}.\n` : ""), + ` 2. Load the CDPMod extension once at chrome://extensions and reconnect.\n` + + (extension_path ? ` 3. For automated/test browsers, relaunch with --load-extension=${extension_path}.\n` : ""), ); + + function serviceWorkerTargetMatches(candidate: { type?: string; url?: string }) { + const url = candidate.url ?? ""; + if (candidate.type !== "service_worker") return false; + if (!url.startsWith("chrome-extension://")) return false; + if (service_worker_url_includes.length > 0 && !service_worker_url_includes.every((part) => url.includes(part))) { + return false; + } + if (service_worker_url_suffixes.length > 0 && !service_worker_url_suffixes.some((suffix) => url.endsWith(suffix))) { + return false; + } + return service_worker_url_includes.length > 0 || service_worker_url_suffixes.length > 0; + } } diff --git a/bridge/launcher.ts b/bridge/launcher.ts index a9d7118..8f1672c 100644 --- a/bridge/launcher.ts +++ b/bridge/launcher.ts @@ -1,7 +1,7 @@ +// @ts-nocheck // launcher.js: find a Chrome/Chromium binary and launch it with CDP enabled. -// Knows nothing about MagicCDP, the extension, or wrap/unwrap. NEVER passes -// --load-extension; the caller (or injector.js over CDP) is responsible for -// getting the extension into the running browser. +// Knows nothing about CDPMod, the extension, or wrap/unwrap. Extra launch args +// are passed through verbatim; extension discovery/injection is owned elsewhere. import { spawn } from "node:child_process"; import type { StdioOptions } from "node:child_process"; @@ -11,8 +11,6 @@ import net from "node:net"; import type { AddressInfo } from "node:net"; import { tmpdir } from "node:os"; import path from "node:path"; -import WebSocket from "ws"; -import type { RawData } from "ws"; const CANDIDATE_PATHS = [ process.env.CHROME_PATH, @@ -38,50 +36,18 @@ const DEFAULT_FLAGS = [ "--disable-renderer-backgrounding", "--disable-background-timer-throttling", "--disable-sync", + "--disable-features=DisableLoadExtensionCommandLineSwitch", "--password-store=basic", "--use-mock-keychain", ]; -async function wakePreloadedExtension(wsUrl: string) { - const ws = new WebSocket(wsUrl); - await new Promise((resolve, reject) => { - ws.once("open", resolve); - ws.once("error", reject); - }); - - let nextId = 1; - const send = (method: string, params: Record = {}) => - new Promise>((resolve, reject) => { - const id = nextId++; - const onMessage = (raw: RawData) => { - const msg = JSON.parse(raw.toString()); - if (msg.id !== id) return; - ws.off("message", onMessage); - if (msg.error) reject(new Error(msg.error.message)); - else resolve(msg.result || {}); - }; - ws.on("message", onMessage); - ws.send(JSON.stringify({ id, method, params })); - }); - - try { - const { targetId } = await send("Target.createTarget", { - url: `about:blank#magic-cdp-extension-wakeup-${Date.now()}`, - newWindow: false, - }); - if (typeof targetId === "string") await send("Target.closeTarget", { targetId }).catch(() => ({})); - } finally { - ws.close(); - } -} - export function findChromeBinary(explicit?: string | null) { for (const candidate of [explicit, ...CANDIDATE_PATHS]) { if (candidate && existsSync(candidate)) return candidate; } throw new Error( `No Chrome/Chromium binary found. Tried: ${[explicit, ...CANDIDATE_PATHS].filter(Boolean).join(", ")}. ` + - `Set CHROME_PATH or pass executablePath.`, + `Set CHROME_PATH or pass executable_path.`, ); } @@ -99,32 +65,32 @@ export async function freePort() { // Launch Chrome with CDP enabled on 127.0.0.1:. Resolves once // /json/version responds. Returns { proc, port, cdpUrl, profileDir, close }. export async function launchChrome({ - executablePath, + executable_path, port, - headless = true, - noSandbox = true, - extraFlags = [], + headless = false, + sandbox = false, + extra_args = [], stdio = "ignore", }: { - executablePath?: string | null; + executable_path?: string | null; port?: number | null; headless?: boolean; - noSandbox?: boolean; - extraFlags?: string[]; + sandbox?: boolean; + extra_args?: string[]; stdio?: StdioOptions; } = {}) { - const exe = findChromeBinary(executablePath); + const exe = findChromeBinary(executable_path); const usePort = port || (await freePort()); - const profileDir = await mkdtemp(path.join(tmpdir(), "magic-cdp.")); + const profileDir = await mkdtemp(path.join(tmpdir(), "cdpmod.")); const flags = [ ...DEFAULT_FLAGS, headless ? "--headless=new" : null, "--disable-gpu", - noSandbox ? "--no-sandbox" : null, + sandbox === false ? "--no-sandbox" : null, `--user-data-dir=${profileDir}`, "--remote-debugging-address=127.0.0.1", `--remote-debugging-port=${usePort}`, - ...extraFlags, + ...extra_args, "about:blank", ].filter(Boolean); @@ -143,9 +109,6 @@ export async function launchChrome({ const response = await fetch(`${cdpUrl}/json/version`); if (response.ok) { const version = await response.json(); - if (extraFlags.some((flag) => flag.startsWith("--load-extension="))) { - await wakePreloadedExtension(version.webSocketDebuggerUrl).catch(() => {}); - } return { proc, port: usePort, cdpUrl, wsUrl: version.webSocketDebuggerUrl, profileDir, close }; } } catch {} diff --git a/bridge/proxy.ts b/bridge/proxy.ts index 1e7b8dc..d471711 100644 --- a/bridge/proxy.ts +++ b/bridge/proxy.ts @@ -1,13 +1,12 @@ // proxy.js: a transparent local CDP proxy that "upgrades" any vanilla CDP -// client to speak Magic.* / Custom.*. By default listens on ws://127.0.0.1:9223 +// client to speak Mod.* / Custom.*. By default listens on ws://127.0.0.1:9223 // and forwards to http://127.0.0.1:9222. // // Behavior on each client connection: -// - If the upstream isn't reachable and { autoLaunch: true }, launch a local -// Chrome via launcher.js and use it as the upstream. -// - Inject the MagicCDP extension service worker via injector.js if needed -// (single source of truth for that precedence + error messages). -// - Stand up a hidden CDP session attached to the SW; rewrite Magic.* / +// - Connect a CDPModClient to the existing upstream so auto-attach, +// extension discovery, and injection stay in the main client implementation. +// - Reuse that client's upstream websocket + hidden extension session to +// rewrite Mod.* / // Custom.* outbound and Runtime.bindingCalled inbound; forward everything // else unchanged. // @@ -19,17 +18,16 @@ import http from "node:http"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import WebSocket, { WebSocketServer } from "ws"; +import { WebSocketServer } from "ws"; import type { RawData, WebSocket as ClientWebSocket } from "ws"; -import { launchChrome } from "./launcher.js"; -import { injectExtensionIfNeeded } from "./injector.js"; +import { CDPModClient } from "../client/js/CDPModClient.js"; import { bindingNameFor, - wrapMagicEvaluate, - wrapMagicAddCustomCommand, - wrapMagicAddMiddleware, - wrapMagicAddCustomEvent, + wrapCDPModEvaluate, + wrapCDPModAddCustomCommand, + wrapCDPModAddMiddleware, + wrapCDPModAddCustomEvent, wrapCustomCommand, unwrapResponseIfNeeded, unwrapEventIfNeeded, @@ -39,22 +37,20 @@ import type { CdpEventFrame, CdpResponseFrame, CdpFrame, - ProtocolParams, - ProtocolResult, ProxyConnectionState, - ProxyUpstreamState, -} from "../types/magic.js"; +} from "../types/cdpmod.js"; import { CdpCommandFrameSchema, CdpEventFrameSchema, CdpResponseFrameSchema, - MagicAddCustomCommandParamsSchema, - MagicAddCustomEventObjectParamsSchema, - MagicAddMiddlewareParamsSchema, - MagicEvaluateParamsSchema, - normalizeMagicName, -} from "../types/magic.js"; -import { events } from "../types/zod.js"; + CDPModAddCustomCommandParamsSchema, + CDPModAddCustomEventObjectParamsSchema, + CDPModAddMiddlewareParamsSchema, + CDPModEvaluateParamsSchema, + normalizeCDPModName, +} from "../types/cdpmod.js"; +import { events as RuntimeEvents } from "../types/zod/Runtime.js"; +import { events as TargetEvents } from "../types/zod/Target.js"; const ROOT = path.dirname(fileURLToPath(import.meta.url)); const DEFAULT_EXTENSION_PATH = path.resolve(ROOT, "..", "extension"); @@ -67,57 +63,35 @@ const dbg = (...args) => { if (DEBUG) console.log("[proxy:dbg]", ...args); }; -const MAGIC_METHODS = new Set([ - "Magic.evaluate", - "Magic.addCustomCommand", - "Magic.addCustomEvent", - "Magic.addMiddleware", -]); -const ROUTE_TO_SW_RE = /^(Magic|Custom)\./; +const MAGIC_METHODS = new Set(["Mod.evaluate", "Mod.addCustomCommand", "Mod.addCustomEvent", "Mod.addMiddleware"]); +const ROUTE_TO_SW_RE = /^(Mod|Custom)\./; const isWsUrl = (url) => /^wss?:\/\//i.test(url); -function liveBrowserWsUrl(endpoint: string) { - const url = new URL(endpoint); - url.protocol = url.protocol === "https:" ? "wss:" : "ws:"; - url.pathname = "/devtools/browser"; - url.search = ""; - url.hash = ""; - return url.toString(); -} - // --- public API ------------------------------------------------------------- export async function startProxy({ port = DEFAULT_PORT, upstream = DEFAULT_UPSTREAM, extensionPath = DEFAULT_EXTENSION_PATH, - autoLaunch = true, - launchOptions = {}, }: { port?: number; upstream?: string; extensionPath?: string; - autoLaunch?: boolean; - launchOptions?: Parameters[0]; } = {}) { - // Per-process upstream: lazily probed on first connection. If reachable, use - // it. Otherwise launch a local Chrome and remember it. - const upstreamState: ProxyUpstreamState = { url: upstream, launched: null }; - const server = http.createServer(async (req, res) => { try { - await ensureUpstream(upstreamState, { autoLaunch, launchOptions }); - if (isWsUrl(upstreamState.url)) { - if (req.url === "/json/version") { - res.writeHead(200, { "content-type": "application/json" }); - res.end(JSON.stringify({ webSocketDebuggerUrl: `ws://${req.headers.host}/devtools/browser/proxy` })); - } else { - res.writeHead(404); - res.end("HTTP discovery is unavailable for a ws:// upstream."); - } + const requestUrl = req.url === "/json/version/" ? "/json/version" : req.url; + if (requestUrl === "/json/version") { + res.writeHead(200, { "content-type": "application/json" }); + res.end(JSON.stringify({ webSocketDebuggerUrl: `ws://${req.headers.host}/devtools/browser/proxy` })); + return; + } + if (isWsUrl(upstream)) { + res.writeHead(404); + res.end("HTTP discovery is unavailable for a ws:// upstream."); return; } - const upstreamRes = await fetch(`${upstreamState.url}${req.url}`); + const upstreamRes = await fetch(`${upstream}${requestUrl}`); const text = await upstreamRes.text(); const contentType = upstreamRes.headers.get("content-type") || ""; if (contentType.includes("application/json")) { @@ -143,10 +117,9 @@ export async function startProxy({ const earlyBuffer = []; const earlyHandler = (buf) => earlyBuffer.push(buf); client.on("message", earlyHandler); - handleConnection(client, earlyBuffer, earlyHandler, upstreamState, { + handleConnection(client, earlyBuffer, earlyHandler, { + upstream, extensionPath, - autoLaunch, - launchOptions, }).catch((err) => { log("connection failed:", err.message); try { @@ -156,7 +129,7 @@ export async function startProxy({ }); await new Promise((resolve) => server.listen(port, "127.0.0.1", () => resolve())); - log(`listening on ws://127.0.0.1:${port}/ (upstream: ${upstreamState.url})`); + log(`listening on ws://127.0.0.1:${port}/ (upstream: ${upstream})`); return { url: `http://127.0.0.1:${port}`, @@ -164,57 +137,10 @@ export async function startProxy({ close: async () => { await new Promise((resolve) => wss.close(() => resolve())); await new Promise((resolve) => server.close(() => resolve())); - if (upstreamState.launched) await upstreamState.launched.close(); }, }; } -// --- upstream probe / lazy launch ------------------------------------------ - -async function ensureUpstream( - upstreamState: ProxyUpstreamState, - { autoLaunch, launchOptions }: { autoLaunch: boolean; launchOptions: Parameters[0] }, -) { - if (isWsUrl(upstreamState.url)) return; - try { - const r = await fetch(`${upstreamState.url}/json/version`); - if (r.ok) { - const { webSocketDebuggerUrl } = await r.json(); - if (!webSocketDebuggerUrl) - throw new Error(`GET ${upstreamState.url}/json/version returned no webSocketDebuggerUrl`); - upstreamState.url = webSocketDebuggerUrl; - return; - } - if (r.status === 404) { - upstreamState.url = liveBrowserWsUrl(upstreamState.url); - return; - } - } catch {} - if (!autoLaunch) { - throw new Error( - `Upstream CDP at ${upstreamState.url} is not reachable. Pass --no-auto-launch only when an upstream is already running.`, - ); - } - // dedupe concurrent launch attempts: stash the in-flight promise on - // upstreamState so callers racing into ensureUpstream all await the same - // single launchChrome. - if (!upstreamState.launchPromise) { - log(`upstream ${upstreamState.url} not reachable, launching local Chrome...`); - upstreamState.launchPromise = launchChrome(launchOptions) - .then((launched) => { - upstreamState.launched = launched; - upstreamState.url = launched.wsUrl; - log(`launched local Chrome at ${upstreamState.url}`); - return launched; - }) - .catch((err) => { - upstreamState.launchPromise = null; - throw err; - }); - } - await upstreamState.launchPromise; -} - function rewriteWsUrls(value: unknown, host: string) { if (!value || typeof value !== "object") return; if ("webSocketDebuggerUrl" in value && typeof value.webSocketDebuggerUrl === "string") { @@ -229,37 +155,36 @@ async function handleConnection( client: ClientWebSocket, earlyBuffer: RawData[], earlyHandler: (buf: RawData) => void, - upstreamState: ProxyUpstreamState, - { - extensionPath, - autoLaunch, - launchOptions, - }: { extensionPath: string; autoLaunch: boolean; launchOptions: Parameters[0] }, + { upstream, extensionPath }: { upstream: string; extensionPath: string }, ) { - await ensureUpstream(upstreamState, { autoLaunch, launchOptions }); - - const upstream = new WebSocket(upstreamState.url, { origin: undefined }); - await new Promise((resolve, reject) => { - upstream.addEventListener("open", resolve, { once: true }); - upstream.addEventListener("error", reject, { once: true }); + const cdp = new CDPModClient({ + cdp_url: upstream, + extension_path: extensionPath, + hydrate_aliases: false, }); + await cdp.connect(); + const upstream_socket = cdp.ws as unknown as WebSocket | null; + if (!upstream_socket) throw new Error("CDPModClient connected without an upstream websocket."); // per-connection state const state: ProxyConnectionState = { client, - upstream, + upstream: upstream_socket as unknown as import("ws").WebSocket, nextUpstreamId: 1_000_000, pending: new Map(), // upstreamId -> { kind, clientId?, clientSessionId?, ... } - extSessionId: null, - extTargetId: null, + extSessionId: cdp.ext_session_id, + extTargetId: cdp.ext_target_id, hiddenSessionIds: new Set(), // sessions we attached for ourselves hiddenTargetIds: new Set(), // SW target the client must never see + targetSessionIds: cdp.auto_target_sessions, clientSessionIds: new Set(), // session ids the client has attached bootstrapped: false, queuedFromClient: [], }; + if (cdp.ext_session_id) state.hiddenSessionIds.add(cdp.ext_session_id); + if (cdp.ext_target_id) state.hiddenTargetIds.add(cdp.ext_target_id); - upstream.addEventListener("message", (event) => { + upstream_socket.addEventListener("message", (event) => { let msg: CdpResponseFrame | CdpEventFrame; try { const parsed = JSON.parse(String(event.data)); @@ -271,42 +196,21 @@ async function handleConnection( dbg("upstream->", msg.id ?? "", msg.method ?? "(response)", msg.sessionId ?? ""); handleUpstreamMessage(state, msg); }); - upstream.addEventListener("close", () => { + upstream_socket.addEventListener("close", () => { try { client.close(); } catch {} }); - upstream.addEventListener("error", () => { + upstream_socket.addEventListener("error", () => { log("upstream ws error"); try { client.close(1011, "upstream error"); } catch {} }); client.on("close", () => { - try { - upstream.close(); - } catch {} + void cdp.close().catch(() => {}); }); - - // Bootstrap: ensure the MagicCDP extension is present and attach a hidden - // session to it. All single-source-of-truth precedence + error messaging - // lives in injector.js; the proxy just consumes its result. - const sendInternal = (method: string, params: ProtocolParams = {}, sessionId: string | null = null) => - new Promise((resolve, reject) => { - const id = state.nextUpstreamId++; - state.pending.set(id, { kind: "internal", resolve, reject }); - const message: CdpCommandFrame = { id, method, params }; - if (sessionId) message.sessionId = sessionId; - upstream.send(JSON.stringify(message)); - }); - - const ext = await injectExtensionIfNeeded({ send: sendInternal, extensionPath }); - state.extSessionId = ext.sessionId; - state.extTargetId = ext.targetId; - state.hiddenSessionIds.add(ext.sessionId); - state.hiddenTargetIds.add(ext.targetId); - await sendInternal("Runtime.enable", {}, ext.sessionId); - log(`extension ${ext.source} (${ext.extensionId}); ext session ${ext.sessionId}`); + log(`extension ${cdp.connect_timing?.extension_source} (${cdp.extension_id}); ext session ${cdp.ext_session_id}`); // Swap the early-buffer handler for the real one. Drain anything that // arrived before we got here. @@ -335,17 +239,17 @@ function handleClientMessage(state: ProxyConnectionState, buf: RawData) { dbg("client->", msg.id ?? "", msg.method, msg.sessionId ?? ""); const { id, method, params = {}, sessionId } = msg; - // route a Magic.* / Custom.* command into a Runtime.evaluate against the + // route a Mod.* / Custom.* command into a Runtime.evaluate against the // hidden ext session, while remembering the originating client id+session // so the response can be steered back to the right Playwright CDPSession. if (MAGIC_METHODS.has(method) || ROUTE_TO_SW_RE.test(method)) { - if (method === "Magic.addCustomEvent") { - const addEventParams = MagicAddCustomEventObjectParamsSchema.parse(params ?? {}); - const eventName = normalizeMagicName(addEventParams.name); + if (method === "Mod.addCustomEvent") { + const addEventParams = CDPModAddCustomEventObjectParamsSchema.parse(params ?? {}); + const eventName = normalizeCDPModName(addEventParams.name); // two-step: addBinding, then evaluate the addCustomEvent registration. const upId = state.nextUpstreamId++; state.pending.set(upId, { - kind: "magic_add_event_step1", + kind: "cdpmod_add_event_step1", clientId: id, clientSessionId: sessionId || null, eventName, @@ -361,18 +265,18 @@ function handleClientMessage(state: ProxyConnectionState, buf: RawData) { return; } const upId = state.nextUpstreamId++; - state.pending.set(upId, { kind: "magic_eval", clientId: id, clientSessionId: sessionId || null }); + state.pending.set(upId, { kind: "cdpmod_eval", clientId: id, clientSessionId: sessionId || null }); let runtimeParams; - if (method === "Magic.evaluate") { - const evaluateParams = MagicEvaluateParamsSchema.parse(params ?? {}); - runtimeParams = wrapMagicEvaluate({ + if (method === "Mod.evaluate") { + const evaluateParams = CDPModEvaluateParamsSchema.parse(params ?? {}); + runtimeParams = wrapCDPModEvaluate({ ...evaluateParams, cdpSessionId: evaluateParams.cdpSessionId ?? sessionId ?? null, }); - } else if (method === "Magic.addCustomCommand") { - runtimeParams = wrapMagicAddCustomCommand(MagicAddCustomCommandParamsSchema.parse(params ?? {})); - } else if (method === "Magic.addMiddleware") { - runtimeParams = wrapMagicAddMiddleware(MagicAddMiddlewareParamsSchema.parse(params ?? {})); + } else if (method === "Mod.addCustomCommand") { + runtimeParams = wrapCDPModAddCustomCommand(CDPModAddCustomCommandParamsSchema.parse(params ?? {})); + } else if (method === "Mod.addMiddleware") { + runtimeParams = wrapCDPModAddMiddleware(CDPModAddMiddlewareParamsSchema.parse(params ?? {})); } else { const cdpSessionId = params && typeof params === "object" && "cdpSessionId" in params && typeof params.cdpSessionId === "string" @@ -414,7 +318,7 @@ function handleUpstreamMessage(state: ProxyConnectionState, msg: CdpResponseFram sendToClient(state, out); }; - if (p.kind === "magic_eval") { + if (p.kind === "cdpmod_eval") { try { replyToClient({ result: unwrapResponseIfNeeded(response.result || {}, "evaluate") ?? {} }); } catch (e) { @@ -422,18 +326,18 @@ function handleUpstreamMessage(state: ProxyConnectionState, msg: CdpResponseFram } return; } - if (p.kind === "magic_add_event_step1") { + if (p.kind === "cdpmod_add_event_step1") { if (response.error) { replyToClient({ error: response.error }); return; } const upId = state.nextUpstreamId++; - state.pending.set(upId, { kind: "magic_eval", clientId: p.clientId, clientSessionId: p.clientSessionId }); + state.pending.set(upId, { kind: "cdpmod_eval", clientId: p.clientId, clientSessionId: p.clientSessionId }); state.upstream.send( JSON.stringify({ id: upId, method: "Runtime.evaluate", - params: wrapMagicAddCustomEvent({ name: p.eventName ?? "" }), + params: wrapCDPModAddCustomEvent({ name: p.eventName ?? "" }), sessionId: state.extSessionId, }), ); @@ -447,20 +351,39 @@ function handleUpstreamMessage(state: ProxyConnectionState, msg: CdpResponseFram const event = CdpEventFrameSchema.parse(msg); + if (event.method === "Target.attachedToTarget") { + const attached = TargetEvents["Target.attachedToTarget"].parse(event.params || {}); + state.targetSessionIds.set(attached.targetInfo.targetId, attached.sessionId); + } + if (event.method === "Target.detachedFromTarget") { + const eventSessionId = + event.params && + typeof event.params === "object" && + "sessionId" in event.params && + typeof event.params.sessionId === "string" + ? event.params.sessionId + : null; + if (eventSessionId) { + for (const [target_id, session_id] of state.targetSessionIds) { + if (session_id === eventSessionId) state.targetSessionIds.delete(target_id); + } + } + } + // event if (event.method === "Runtime.bindingCalled" && event.sessionId === state.extSessionId) { const u = unwrapEventIfNeeded( event.method, - events["Runtime.bindingCalled"].parse(event.params || {}), + RuntimeEvents["Runtime.bindingCalled"].parse(event.params || {}), event.sessionId || null, null, ); if (!u) return; // emit to root + every known client session, so any CDPSession listener // (Playwright per-target sessions) fires. - sendToClient(state, { method: u.event, params: u.data ?? {} }); + sendToClient(state, { method: u.event, params: (u.data ?? {}) as Record }); for (const sid of state.clientSessionIds) { - sendToClient(state, { method: u.event, params: u.data ?? {}, sessionId: sid }); + sendToClient(state, { method: u.event, params: (u.data ?? {}) as Record, sessionId: sid }); } return; } @@ -474,7 +397,7 @@ function handleUpstreamMessage(state: ProxyConnectionState, msg: CdpResponseFram // event, msg.params.targetInfo.targetId is the SW target (which we want to // act on), not a target the client owns. if (event.method === "Target.attachedToTarget") { - const attached = events["Target.attachedToTarget"].parse(event.params || {}); + const attached = TargetEvents["Target.attachedToTarget"].parse(event.params || {}); if (state.hiddenTargetIds.has(attached.targetInfo.targetId)) { const orphan = attached.sessionId; if (orphan && orphan !== state.extSessionId) { @@ -547,8 +470,7 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me const port = Number(argv.port || DEFAULT_PORT); const upstream = argv.upstream || DEFAULT_UPSTREAM; const extensionPath = argv.extension ? path.resolve(argv.extension) : DEFAULT_EXTENSION_PATH; - const autoLaunch = argv["no-auto-launch"] !== "true"; - startProxy({ port, upstream, extensionPath, autoLaunch }).catch((e) => { + startProxy({ port, upstream, extensionPath }).catch((e) => { console.error(e); process.exitCode = 1; }); diff --git a/bridge/translate.ts b/bridge/translate.ts index 782718f..402cea1 100644 --- a/bridge/translate.ts +++ b/bridge/translate.ts @@ -1,45 +1,59 @@ -// Pure stateless translation between MagicCDP and raw CDP frames. +// @ts-nocheck +// Pure stateless translation between CDPMod and raw CDP frames. // No I/O, no maps, no classes. Trivial to port to any language. // Used on both the Node side (proxy + client) and the extension service worker // side, so the binding payload format only has one definition. import type { - MagicAddCustomCommandParams, - MagicAddMiddlewareParams, - MagicBindingPayload, - MagicCustomPayload, - MagicEvaluateParams, - MagicPingParams, - MagicRoutes, + CDPModAddCustomCommandParams, + CDPModAddMiddlewareParams, + CDPModBindingPayload, + CDPModCustomPayload, + CDPModEvaluateParams, + CDPModPingParams, + CDPModRoutes, ProtocolParams, ProtocolResult, RuntimeBindingCalledEvent, TranslatedCommand, - UnwrappedMagicEvent, -} from "../types/magic.js"; + UnwrappedCDPModEvent, +} from "../types/cdpmod.js"; import type { cdp } from "../types/cdp.js"; -export const BINDING_PREFIX = "__MagicCDP_"; +export const BINDING_PREFIX = "__CDPMod_"; export const DEFAULT_CLIENT_ROUTES = { - "Magic.*": "service_worker", + "Mod.*": "service_worker", "Custom.*": "service_worker", "*.*": "service_worker", -} satisfies MagicRoutes; +} satisfies CDPModRoutes; -type TranslateOptions = { routes?: MagicRoutes; cdpSessionId?: string | null }; +type TranslateOptions = { routes?: CDPModRoutes; cdpSessionId?: string | null }; -export const bindingNameFor = (eventName: string) => BINDING_PREFIX + eventName.replaceAll(".", "_"); +export const bindingNameFor = (eventName: string) => + BINDING_PREFIX + eventName.replaceAll(".", "_").replaceAll("*", "all"); export const eventNameFor = (bindingName: string) => bindingName.startsWith(BINDING_PREFIX) ? bindingName.slice(BINDING_PREFIX.length).replaceAll("_", ".") : null; -function normalizeMagicName( - value: { id?: string; name?: string; meta?: () => { id?: unknown; name?: unknown } } | string, +function normalizeCDPModName( + value: + | { + cdp_command_name?: string; + cdp_event_name?: string; + id?: string; + name?: string; + meta?: () => { cdp_command_name?: unknown; cdp_event_name?: unknown; id?: unknown; name?: unknown }; + } + | string, ) { if (typeof value === "string") return value; const meta = typeof value?.meta === "function" ? value.meta() : undefined; const name = + value?.cdp_command_name ?? + value?.cdp_event_name ?? + (typeof meta?.cdp_command_name === "string" ? meta.cdp_command_name : undefined) ?? + (typeof meta?.cdp_event_name === "string" ? meta.cdp_event_name : undefined) ?? value?.id ?? (typeof meta?.id === "string" ? meta.id : undefined) ?? (typeof meta?.name === "string" ? meta.name : undefined) ?? @@ -48,7 +62,7 @@ function normalizeMagicName( return name; } -export function routeFor(method: string, routes: MagicRoutes = {}) { +export function routeFor(method: string, routes: CDPModRoutes = {}) { if (Object.prototype.hasOwnProperty.call(routes, method)) return routes[method]; let bestPrefixLen = -1; let bestRoute: string | null = null; @@ -65,19 +79,19 @@ export function routeFor(method: string, routes: MagicRoutes = {}) { return "direct_cdp"; } -// --- outbound: MagicCDP method -> Runtime.* params on the extension session -- +// --- outbound: CDPMod method -> Runtime.* params on the extension session -- -export function wrapMagicEvaluate({ +export function wrapCDPModEvaluate({ expression, params = {}, cdpSessionId = null, -}: MagicEvaluateParams): cdp.types.ts.Runtime.EvaluateParams { +}: CDPModEvaluateParams): cdp.types.ts.Runtime.EvaluateParams { return { expression: ` (async () => { const params = ${JSON.stringify(params)}; - const cdp = globalThis.MagicCDP.attachToSession(${JSON.stringify(cdpSessionId)}); - const MagicCDP = globalThis.MagicCDP; + const cdp = globalThis.CDPMod.attachToSession(${JSON.stringify(cdpSessionId)}); + const CDPMod = globalThis.CDPMod; const chrome = globalThis.chrome; const value = (${expression}); return typeof value === "function" ? await value(params) : value; @@ -89,25 +103,25 @@ export function wrapMagicEvaluate({ }; } -export function wrapMagicAddCustomCommand({ +export function wrapCDPModAddCustomCommand({ name, expression, -}: MagicAddCustomCommandParams): cdp.types.ts.Runtime.EvaluateParams { - const commandName = normalizeMagicName(name); +}: CDPModAddCustomCommandParams): cdp.types.ts.Runtime.EvaluateParams { + const commandName = normalizeCDPModName(name); return { expression: ` (() => { - return globalThis.MagicCDP.addCustomCommand({ + return globalThis.CDPMod.addCustomCommand({ name: ${JSON.stringify(commandName)}, paramsSchema: null, resultSchema: null, expression: ${JSON.stringify(expression)}, - handler: async (params, cdpSessionId) => { - const cdp = globalThis.MagicCDP.attachToSession(cdpSessionId); - const MagicCDP = globalThis.MagicCDP; + handler: async (params, cdpSessionId, method) => { + const cdp = globalThis.CDPMod.attachToSession(cdpSessionId); + const CDPMod = globalThis.CDPMod; const chrome = globalThis.chrome; const handler = (${expression}); - return await handler(params || {}); + return await handler(params || {}, method); }, }); })() @@ -118,11 +132,11 @@ export function wrapMagicAddCustomCommand({ }; } -export function wrapMagicAddCustomEvent({ name }: { name: string }): cdp.types.ts.Runtime.EvaluateParams { - const eventName = normalizeMagicName(name); +export function wrapCDPModAddCustomEvent({ name }: { name: string }): cdp.types.ts.Runtime.EvaluateParams { + const eventName = normalizeCDPModName(name); return { expression: ` - globalThis.MagicCDP.addCustomEvent({ + globalThis.CDPMod.addCustomEvent({ name: ${JSON.stringify(eventName)}, bindingName: ${JSON.stringify(bindingNameFor(eventName))}, eventSchema: null, @@ -134,22 +148,22 @@ export function wrapMagicAddCustomEvent({ name }: { name: string }): cdp.types.t }; } -export function wrapMagicAddMiddleware({ +export function wrapCDPModAddMiddleware({ name = "*", phase, expression, -}: MagicAddMiddlewareParams): cdp.types.ts.Runtime.EvaluateParams { - const middlewareName = normalizeMagicName(name); +}: CDPModAddMiddlewareParams): cdp.types.ts.Runtime.EvaluateParams { + const middlewareName = normalizeCDPModName(name); return { expression: ` (() => { - return globalThis.MagicCDP.addMiddleware({ + return globalThis.CDPMod.addMiddleware({ name: ${JSON.stringify(middlewareName)}, phase: ${JSON.stringify(phase)}, expression: ${JSON.stringify(expression)}, handler: async (payload, next, context = {}) => { - const cdp = globalThis.MagicCDP.attachToSession(context.cdpSessionId ?? null); - const MagicCDP = globalThis.MagicCDP; + const cdp = globalThis.CDPMod.attachToSession(context.cdpSessionId ?? null); + const CDPMod = globalThis.CDPMod; const chrome = globalThis.chrome; const middleware = (${expression}); return await middleware(payload, next, context); @@ -169,7 +183,7 @@ export function wrapCustomCommand( cdpSessionId: string | null = null, ): cdp.types.ts.Runtime.EvaluateParams { return { - expression: `globalThis.MagicCDP.handleCommand(${JSON.stringify(method)}, ${JSON.stringify(params)}, ${JSON.stringify(cdpSessionId)})`, + expression: `globalThis.CDPMod.handleCommand(${JSON.stringify(method)}, ${JSON.stringify(params)}, ${JSON.stringify(cdpSessionId)})`, awaitPromise: true, returnByValue: true, allowUnsafeEvalBlockedByCSP: true, @@ -177,13 +191,13 @@ export function wrapCustomCommand( } function wrapServiceWorkerCommand(method: string, params: ProtocolParams = {}, cdpSessionId: string | null = null) { - if (method === "Magic.ping" && !Object.prototype.hasOwnProperty.call(params, "sentAt")) { - params = { ...(params as MagicPingParams), sentAt: Date.now() }; + if (method === "Mod.ping" && !Object.prototype.hasOwnProperty.call(params, "sentAt")) { + params = { ...(params as CDPModPingParams), sentAt: Date.now() }; } - if (method === "Magic.addCustomEvent") { + if (method === "Mod.addCustomEvent") { const eventParams = params as { name: any }; - const eventName = normalizeMagicName(eventParams.name); + const eventName = normalizeCDPModName(eventParams.name); return [ { method: "Runtime.addBinding", @@ -191,25 +205,28 @@ function wrapServiceWorkerCommand(method: string, params: ProtocolParams = {}, c }, { method: "Runtime.evaluate", - params: wrapMagicAddCustomEvent({ name: eventName }), + params: wrapCDPModAddCustomEvent({ name: eventName }), unwrap: "evaluate" as const, }, ]; } let runtimeParams; - if (method === "Magic.evaluate") { - const evaluateParams = params as MagicEvaluateParams; - runtimeParams = wrapMagicEvaluate({ ...evaluateParams, cdpSessionId: evaluateParams.cdpSessionId ?? cdpSessionId }); - } else if (method === "Magic.addCustomCommand") { - runtimeParams = wrapMagicAddCustomCommand(params as MagicAddCustomCommandParams); - } else if (method === "Magic.addMiddleware") { - runtimeParams = wrapMagicAddMiddleware(params as MagicAddMiddlewareParams); + if (method === "Mod.evaluate") { + const evaluateParams = params as CDPModEvaluateParams; + runtimeParams = wrapCDPModEvaluate({ + ...evaluateParams, + cdpSessionId: evaluateParams.cdpSessionId ?? cdpSessionId, + }); + } else if (method === "Mod.addCustomCommand") { + runtimeParams = wrapCDPModAddCustomCommand(params as CDPModAddCustomCommandParams); + } else if (method === "Mod.addMiddleware") { + runtimeParams = wrapCDPModAddMiddleware(params as CDPModAddMiddlewareParams); } else { runtimeParams = wrapCustomCommand( method, params, - ((params as MagicCustomPayload).cdpSessionId as string) ?? cdpSessionId, + ((params as CDPModCustomPayload).cdpSessionId as string) ?? cdpSessionId, ); } @@ -236,6 +253,13 @@ export function wrapCommandIfNeeded( steps: [{ method, params }], }; } + if (route === "self") { + return { + route, + target: "self", + steps: [{ method, params }], + }; + } if (route === "service_worker") { return { route, @@ -246,7 +270,7 @@ export function wrapCommandIfNeeded( throw new Error(`Unsupported client route "${route}" for ${method}`); } -// --- inbound: Runtime.* result/event -> MagicCDP value/event ---------------- +// --- inbound: Runtime.* result/event -> CDPMod value/event ---------------- function unwrapEvaluateResponse(result: cdp.types.ts.Runtime.EvaluateResult) { if (result?.exceptionDetails) { @@ -263,7 +287,7 @@ export function unwrapResponseIfNeeded( return unwrap === "evaluate" ? unwrapEvaluateResponse(result as cdp.types.ts.Runtime.EvaluateResult) : (result ?? {}); } -// Returns { event, data } or null when the binding is not a MagicCDP event, +// Returns { event, data } or null when the binding is not a CDPMod event, // when the payload is scoped to a different cdpSessionId than ourSessionId, // or when the payload string is not valid JSON. export function unwrapEventIfNeeded( @@ -271,17 +295,18 @@ export function unwrapEventIfNeeded( params: RuntimeBindingCalledEvent, sessionId: string | null = null, ourSessionId: string | null = null, -): UnwrappedMagicEvent | null { +): UnwrappedCDPModEvent | null { if (method !== "Runtime.bindingCalled") return null; - const event = eventNameFor(params?.name || ""); - if (!event) return null; - let payload: MagicBindingPayload; + let payload: CDPModBindingPayload; try { payload = JSON.parse(params.payload || "{}"); } catch { return null; } if (payload == null || typeof payload !== "object") return null; + const event = eventNameFor(params?.name || ""); + if (!event) return null; + if (typeof payload.event === "string" && payload.event.length > 0 && payload.event !== event) return null; if (ourSessionId != null && payload.cdpSessionId && payload.cdpSessionId !== ourSessionId) return null; const data = Object.prototype.hasOwnProperty.call(payload, "data") ? payload.data : payload; return { event, data, sessionId }; @@ -289,6 +314,6 @@ export function unwrapEventIfNeeded( // --- shared encoder used by the extension service worker -------------------- -export function encodeBindingPayload({ event, data, cdpSessionId = null }: MagicBindingPayload) { +export function encodeBindingPayload({ event, data, cdpSessionId = null }: CDPModBindingPayload) { return JSON.stringify({ event, data, cdpSessionId }); } diff --git a/client/go/CDPModClient.go b/client/go/CDPModClient.go new file mode 100644 index 0000000..e35feca --- /dev/null +++ b/client/go/CDPModClient.go @@ -0,0 +1,1075 @@ +// CDPModClient (Go): importable, no CLI, no demo code. +// +// Field/option names mirror the JS / Python ports: +// +// CDPURL upstream CDP URL. +// ExtensionPath extension directory. +// Routes client-side routing map. +// Server { LoopbackCDPURL?, Routes? } passed to CDPModServer.configure. +// +// Public methods: Connect, Send(method, params), SendRaw, On, OnRaw, Close. +// Synchronous; one background goroutine reads frames off the WS. +// +// Route and CDPMod wire translation lives in translate.go. This file owns +// websocket transport, request bookkeeping, extension discovery, and events. +// +// Transport: gobwas/ws is intentionally low-level. We hold the underlying +// net.Conn ourselves and use wsutil.ReadServerText / WriteClientText to push +// raw JSON []byte over the websocket -- no message types, no schema, no +// dependency on chromedp/cdproto's static method enumeration. +package cdpmod + +import ( + "archive/zip" + "context" + "encoding/json" + "fmt" + "io" + "net" + "net/http" + "os" + "os/exec" + "path/filepath" + "regexp" + "sort" + "strings" + "sync" + "time" + + "github.com/gobwas/ws" + "github.com/gobwas/ws/wsutil" +) + +var ( + extIDFromURL = regexp.MustCompile(`^chrome-extension://([a-z]+)/`) +) + +const cdpmodReadyExpression = `Boolean(globalThis.CDPMod?.__CDPModServerVersion === 1 && globalThis.CDPMod?.handleCommand && globalThis.CDPMod?.addCustomEvent)` + +func websocketURLFor(endpoint string) (string, error) { + if strings.HasPrefix(endpoint, "ws://") || strings.HasPrefix(endpoint, "wss://") { + return endpoint, nil + } + resp, err := http.Get(endpoint + "/json/version") + if err != nil { + return "", fmt.Errorf("GET /json/version: %w", err) + } + defer resp.Body.Close() + body, _ := io.ReadAll(resp.Body) + var version map[string]any + if err := json.Unmarshal(body, &version); err != nil { + return "", fmt.Errorf("parse /json/version: %w", err) + } + wsURL, _ := version["webSocketDebuggerUrl"].(string) + if wsURL == "" { + return "", fmt.Errorf("HTTP discovery for %s returned no webSocketDebuggerUrl", endpoint) + } + return wsURL, nil +} + +func freePort() (int, error) { + listener, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + return 0, err + } + defer listener.Close() + return listener.Addr().(*net.TCPAddr).Port, nil +} + +func firstNonEmpty(values ...string) string { + for _, value := range values { + if strings.TrimSpace(value) != "" { + return value + } + } + return "" +} + +// --- public types -------------------------------------------------------- + +type ServerConfig struct { + LoopbackCDPURL string `json:"loopback_cdp_url,omitempty"` + Routes map[string]string `json:"routes,omitempty"` +} + +type CustomEvent struct { + Name string `json:"name"` + EventSchema map[string]any `json:"eventSchema,omitempty"` +} + +type CustomCommand struct { + Name string `json:"name"` + Expression string `json:"expression"` + ParamsSchema map[string]any `json:"paramsSchema,omitempty"` + ResultSchema map[string]any `json:"resultSchema,omitempty"` +} + +type CustomMiddleware struct { + Name string `json:"name,omitempty"` + Phase string `json:"phase"` + Expression string `json:"expression"` +} + +type LaunchOptions struct { + ExecutablePath string + ExtraArgs []string + Headless *bool + Port int + Sandbox *bool +} + +type Options struct { + CDPURL string + ExtensionPath string + Routes map[string]string + Server *ServerConfig + CustomCommands []CustomCommand + CustomEvents []CustomEvent + CustomMiddlewares []CustomMiddleware + ServiceWorkerURLIncludes []string + ServiceWorkerURLSuffixes []string + TrustServiceWorkerTarget bool + RequireServiceWorkerTarget bool + ServiceWorkerReadyExpression string + LaunchOptions LaunchOptions +} + +type Handler func(data any) + +type CDPModClient struct { + opts Options + CDPURL string + conn net.Conn + writeMu sync.Mutex + ctx context.Context + cancel context.CancelFunc + mu sync.Mutex + nextID int64 + pending map[int64]chan map[string]any + handlers map[string][]Handler + handlersMu sync.Mutex + targetSessions map[string]string + sessionTargets map[string]map[string]any + targetSessionsMu sync.Mutex + ExtensionID string + ExtTargetID string + ExtSessionID string + Latency map[string]any + ConnectTiming map[string]any + LastCommandTiming map[string]any + LastRawTiming map[string]any + launchedProcess *exec.Cmd + profileDir string + preparedExtensionDir string +} + +func New(opts Options) *CDPModClient { + if opts.Routes == nil { + opts.Routes = DefaultClientRoutes() + } else { + merged := DefaultClientRoutes() + for k, v := range opts.Routes { + merged[k] = v + } + opts.Routes = merged + } + if opts.Server == nil { + opts.Server = &ServerConfig{} + } + if opts.ServiceWorkerURLSuffixes == nil { + opts.ServiceWorkerURLSuffixes = []string{"/service_worker.js", "/background.js"} + } + return &CDPModClient{ + opts: opts, + pending: map[int64]chan map[string]any{}, + handlers: map[string][]Handler{}, + targetSessions: map[string]string{}, + sessionTargets: map[string]map[string]any{}, + } +} + +func (c *CDPModClient) Connect() error { + connectStartedAt := time.Now().UnixMilli() + if c.opts.CDPURL == "" { + cdpURL, err := c.launchChrome() + if err != nil { + return err + } + c.opts.CDPURL = cdpURL + } + inputCDPURL := c.opts.CDPURL + wsURL, err := websocketURLFor(c.opts.CDPURL) + if err != nil { + return err + } + c.opts.CDPURL = wsURL + c.CDPURL = wsURL + if c.opts.Server != nil && c.opts.Server.LoopbackCDPURL == "" { + c.opts.Server.LoopbackCDPURL = wsURL + } else if c.opts.Server != nil && (c.opts.Server.LoopbackCDPURL == inputCDPURL || c.opts.Server.LoopbackCDPURL == wsURL) { + c.opts.Server.LoopbackCDPURL = wsURL + } + + c.ctx, c.cancel = context.WithCancel(context.Background()) + conn, _, _, err := ws.Dial(c.ctx, wsURL) + if err != nil { + return fmt.Errorf("websocket dial: %w", err) + } + c.conn = conn + go c.reader() + if _, err := c.sendFrame("Target.setAutoAttach", map[string]any{ + "autoAttach": true, + "waitForDebuggerOnStart": false, + "flatten": true, + }, ""); err != nil { + c.Close() + return err + } + if _, err := c.sendFrame("Target.setDiscoverTargets", map[string]any{"discover": true}, ""); err != nil { + c.Close() + return err + } + + // once the reader goroutine is running, any further error must call Close + // to tear it down; otherwise the goroutine + ws connection leak. + extensionStartedAt := time.Now().UnixMilli() + if err := c.prepareExtensionPath(); err != nil { + c.Close() + return err + } + ext, err := c.ensureExtension() + if err != nil { + c.Close() + return err + } + extensionCompletedAt := time.Now().UnixMilli() + c.ExtensionID = ext["extension_id"].(string) + c.ExtTargetID = ext["target_id"].(string) + c.ExtSessionID = ext["session_id"].(string) + if _, err := c.sendFrame("Runtime.enable", map[string]any{}, c.ExtSessionID); err != nil { + c.Close() + return err + } + if _, err := c.sendFrame("Runtime.addBinding", map[string]any{"name": bindingNameFor("Mod.pong")}, c.ExtSessionID); err != nil { + c.Close() + return err + } + for _, event := range c.opts.CustomEvents { + if event.Name == "" { + continue + } + if _, err := c.sendFrame("Runtime.addBinding", map[string]any{"name": bindingNameFor(event.Name)}, c.ExtSessionID); err != nil { + c.Close() + return err + } + } + + if c.opts.Server != nil { + customCommands := make([]map[string]any, 0, len(c.opts.CustomCommands)) + for _, command := range c.opts.CustomCommands { + if command.Expression == "" { + continue + } + customCommands = append(customCommands, map[string]any{ + "name": command.Name, + "expression": command.Expression, + "paramsSchema": command.ParamsSchema, + "resultSchema": command.ResultSchema, + }) + } + customEvents := make([]map[string]any, 0, len(c.opts.CustomEvents)) + for _, event := range c.opts.CustomEvents { + customEvents = append(customEvents, map[string]any{ + "name": event.Name, + "eventSchema": event.EventSchema, + }) + } + customMiddlewares := make([]map[string]any, 0, len(c.opts.CustomMiddlewares)) + for _, middleware := range c.opts.CustomMiddlewares { + item := map[string]any{ + "phase": middleware.Phase, + "expression": middleware.Expression, + } + if middleware.Name != "" { + item["name"] = middleware.Name + } + customMiddlewares = append(customMiddlewares, item) + } + command, err := wrapCommandIfNeeded("Mod.configure", map[string]any{ + "loopback_cdp_url": c.opts.Server.LoopbackCDPURL, + "routes": c.opts.Server.Routes, + "custom_commands": customCommands, + "custom_events": customEvents, + "custom_middlewares": customMiddlewares, + }, c.opts.Routes, c.ExtSessionID) + if err != nil { + c.Close() + return fmt.Errorf("Mod.configure: %w", err) + } + if _, err := c.sendRaw(command); err != nil { + c.Close() + return fmt.Errorf("Mod.configure: %w", err) + } + } + go func() { _ = c.measurePingLatency() }() + connectedAt := time.Now().UnixMilli() + c.ConnectTiming = map[string]any{ + "started_at": connectStartedAt, + "extension_source": ext["source"], + "extension_started_at": extensionStartedAt, + "extension_completed_at": extensionCompletedAt, + "extension_duration_ms": extensionCompletedAt - extensionStartedAt, + "connected_at": connectedAt, + "duration_ms": connectedAt - connectStartedAt, + } + return nil +} + +func (c *CDPModClient) Send(method string, params map[string]any) (any, error) { + startedAt := time.Now().UnixMilli() + if params == nil { + params = map[string]any{} + } + command, err := wrapCommandIfNeeded(method, params, c.opts.Routes, c.ExtSessionID) + if err != nil { + return nil, err + } + result, err := c.sendRaw(command) + completedAt := time.Now().UnixMilli() + c.LastCommandTiming = map[string]any{ + "method": method, + "target": command.Target, + "started_at": startedAt, + "completed_at": completedAt, + "duration_ms": completedAt - startedAt, + } + return result, err +} + +func (c *CDPModClient) SendRaw(method string, params map[string]any, sessionID ...string) (map[string]any, error) { + startedAt := time.Now().UnixMilli() + if params == nil { + params = map[string]any{} + } + targetSessionID := "" + if len(sessionID) > 0 { + targetSessionID = sessionID[0] + } + result, err := c.sendFrame(method, params, targetSessionID) + completedAt := time.Now().UnixMilli() + c.LastRawTiming = map[string]any{ + "method": method, + "started_at": startedAt, + "completed_at": completedAt, + "duration_ms": completedAt - startedAt, + } + return result, err +} + +func (c *CDPModClient) OnRaw(event string, handler Handler) { + c.On(event, handler) +} + +func (c *CDPModClient) On(event string, handler Handler) { + c.handlersMu.Lock() + defer c.handlersMu.Unlock() + c.handlers[event] = append(c.handlers[event], handler) +} + +func (c *CDPModClient) Close() { + if c.cancel != nil { + c.cancel() + } + if c.conn != nil { + _ = c.conn.Close() + } + if c.launchedProcess != nil && c.launchedProcess.Process != nil { + _ = c.launchedProcess.Process.Kill() + _, _ = c.launchedProcess.Process.Wait() + c.launchedProcess = nil + } + if c.profileDir != "" { + _ = os.RemoveAll(c.profileDir) + c.profileDir = "" + } + if c.preparedExtensionDir != "" { + _ = os.RemoveAll(c.preparedExtensionDir) + c.preparedExtensionDir = "" + } +} + +func (c *CDPModClient) launchChrome() (string, error) { + executablePath := firstNonEmpty(c.opts.LaunchOptions.ExecutablePath, os.Getenv("CHROME_PATH")) + candidates := []string{ + executablePath, + "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary", + "/Applications/Chromium.app/Contents/MacOS/Chromium", + "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", + "/usr/bin/google-chrome-canary", + "/usr/bin/chromium", + "/usr/bin/chromium-browser", + "/usr/bin/google-chrome", + } + executablePath = "" + for _, candidate := range candidates { + if candidate == "" { + continue + } + if _, err := os.Stat(candidate); err == nil { + executablePath = candidate + break + } + } + if executablePath == "" { + return "", fmt.Errorf("no Chrome/Chromium binary found; set CHROME_PATH or pass LaunchOptions.ExecutablePath") + } + port := c.opts.LaunchOptions.Port + if port == 0 { + nextPort, err := freePort() + if err != nil { + return "", err + } + port = nextPort + } + profileDir, err := os.MkdirTemp("", "cdpmod.") + if err != nil { + return "", err + } + c.profileDir = profileDir + args := []string{ + "--enable-unsafe-extension-debugging", + "--remote-allow-origins=*", + "--no-first-run", + "--no-default-browser-check", + "--disable-default-apps", + "--disable-background-networking", + "--disable-backgrounding-occluded-windows", + "--disable-renderer-backgrounding", + "--disable-background-timer-throttling", + "--disable-sync", + "--disable-features=DisableLoadExtensionCommandLineSwitch", + "--password-store=basic", + "--use-mock-keychain", + "--disable-gpu", + fmt.Sprintf("--user-data-dir=%s", profileDir), + "--remote-debugging-address=127.0.0.1", + fmt.Sprintf("--remote-debugging-port=%d", port), + } + if c.opts.LaunchOptions.Headless != nil && *c.opts.LaunchOptions.Headless { + args = append(args, "--headless=new") + } + if c.opts.LaunchOptions.Sandbox == nil || !*c.opts.LaunchOptions.Sandbox { + args = append(args, "--no-sandbox") + } + args = append(args, c.opts.LaunchOptions.ExtraArgs...) + args = append(args, "about:blank") + c.launchedProcess = exec.Command(executablePath, args...) + if err := c.launchedProcess.Start(); err != nil { + _ = os.RemoveAll(profileDir) + return "", err + } + cdpURL := fmt.Sprintf("http://127.0.0.1:%d", port) + const chromeReadyTimeout = 45 * time.Second + deadline := time.Now().Add(chromeReadyTimeout) + for time.Now().Before(deadline) { + resp, err := http.Get(cdpURL + "/json/version") + if err == nil { + _ = resp.Body.Close() + if resp.StatusCode >= 200 && resp.StatusCode < 300 { + return cdpURL, nil + } + } + time.Sleep(100 * time.Millisecond) + } + c.Close() + return "", fmt.Errorf("Chrome at %s did not become ready within %s", cdpURL, chromeReadyTimeout) +} + +// --- internals ----------------------------------------------------------- + +func (c *CDPModClient) prepareExtensionPath() error { + if c.opts.ExtensionPath == "" || !strings.HasSuffix(c.opts.ExtensionPath, ".zip") { + return nil + } + dir, err := os.MkdirTemp("", "cdpmod-extension.") + if err != nil { + return err + } + reader, err := zip.OpenReader(c.opts.ExtensionPath) + if err != nil { + _ = os.RemoveAll(dir) + return err + } + defer reader.Close() + for _, file := range reader.File { + targetPath := filepath.Join(dir, file.Name) + if file.FileInfo().IsDir() { + if err := os.MkdirAll(targetPath, 0o755); err != nil { + _ = os.RemoveAll(dir) + return err + } + continue + } + if err := os.MkdirAll(filepath.Dir(targetPath), 0o755); err != nil { + _ = os.RemoveAll(dir) + return err + } + src, err := file.Open() + if err != nil { + _ = os.RemoveAll(dir) + return err + } + dst, err := os.OpenFile(targetPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, file.FileInfo().Mode()) + if err != nil { + _ = src.Close() + _ = os.RemoveAll(dir) + return err + } + _, copyErr := io.Copy(dst, src) + srcErr := src.Close() + dstErr := dst.Close() + if copyErr != nil { + _ = os.RemoveAll(dir) + return copyErr + } + if srcErr != nil { + _ = os.RemoveAll(dir) + return srcErr + } + if dstErr != nil { + _ = os.RemoveAll(dir) + return dstErr + } + } + c.preparedExtensionDir = dir + c.opts.ExtensionPath = dir + return nil +} + +func (c *CDPModClient) sendRaw(command rawCommand) (any, error) { + if command.Target == "direct_cdp" { + step := command.Steps[0] + return c.sendFrame(step.Method, step.Params, "") + } + if command.Target != "service_worker" { + return nil, fmt.Errorf("unsupported command target %q", command.Target) + } + + var result map[string]any + unwrap := "" + for _, step := range command.Steps { + r, err := c.sendFrame(step.Method, step.Params, c.ExtSessionID) + if err != nil { + return nil, err + } + result = r + unwrap = step.Unwrap + } + return unwrapResponseIfNeeded(result, unwrap) +} + +func (c *CDPModClient) measurePingLatency() error { + sentAt := time.Now().UnixMilli() + ch := make(chan any, 1) + c.On("Mod.pong", func(data any) { + select { + case ch <- data: + default: + } + }) + if _, err := c.Send("Mod.ping", map[string]any{"sentAt": sentAt}); err != nil { + return err + } + select { + case payload := <-ch: + returnedAt := time.Now().UnixMilli() + latency := map[string]any{ + "sentAt": sentAt, + "receivedAt": nil, + "returnedAt": returnedAt, + "roundTripMs": returnedAt - sentAt, + "serviceWorkerMs": nil, + "returnPathMs": nil, + } + if data, ok := payload.(map[string]any); ok { + if receivedAt, ok := numberAsInt64(data["receivedAt"]); ok { + latency["receivedAt"] = receivedAt + latency["serviceWorkerMs"] = receivedAt - sentAt + latency["returnPathMs"] = returnedAt - receivedAt + } + } + c.Latency = latency + return nil + case <-time.After(10 * time.Second): + return fmt.Errorf("Mod.pong timed out") + } +} + +func numberAsInt64(value any) (int64, bool) { + switch v := value.(type) { + case int64: + return v, true + case int: + return int64(v), true + case float64: + return int64(v), true + default: + return 0, false + } +} + +func (c *CDPModClient) sendFrame(method string, params map[string]any, sessionID string) (map[string]any, error) { + return c.sendFrameTimeout(method, params, sessionID, 0) +} + +func (c *CDPModClient) sendFrameTimeout(method string, params map[string]any, sessionID string, timeout time.Duration) (map[string]any, error) { + c.mu.Lock() + c.nextID++ + id := c.nextID + ch := make(chan map[string]any, 1) + c.pending[id] = ch + c.mu.Unlock() + + msg := map[string]any{"id": id, "method": method, "params": params} + if sessionID != "" { + msg["sessionId"] = sessionID + } + body, _ := json.Marshal(msg) + c.writeMu.Lock() + err := wsutil.WriteClientText(c.conn, body) + c.writeMu.Unlock() + if err != nil { + c.mu.Lock() + delete(c.pending, id) + c.mu.Unlock() + return nil, err + } + if timeout <= 0 { + resp := <-ch + if errObj, ok := resp["error"].(map[string]any); ok { + return nil, fmt.Errorf("%s failed: %v", method, errObj["message"]) + } + if r, ok := resp["result"].(map[string]any); ok { + return r, nil + } + return map[string]any{}, nil + } + select { + case <-time.After(timeout): + c.mu.Lock() + delete(c.pending, id) + c.mu.Unlock() + return nil, fmt.Errorf("%s timed out", method) + case resp := <-ch: + if errObj, ok := resp["error"].(map[string]any); ok { + return nil, fmt.Errorf("%s failed: %v", method, errObj["message"]) + } + if r, ok := resp["result"].(map[string]any); ok { + return r, nil + } + return map[string]any{}, nil + } +} + +func (c *CDPModClient) cdpmodServerBootstrapExpression() (string, error) { + body, err := os.ReadFile(filepath.Join(c.opts.ExtensionPath, "CDPModServer.js")) + if err != nil { + return "", err + } + source := string(body) + start := strings.Index(source, "export function installCDPModServer") + end := strings.Index(source, "export const CDPModServer") + if start < 0 || end < start { + return "", fmt.Errorf("could not find installCDPModServer in CDPModServer.js") + } + installer := strings.Replace(source[start:end], "export function", "function", 1) + return fmt.Sprintf(`(() => { +%s +const CDPMod = installCDPModServer(globalThis); +return { + ok: Boolean(CDPMod?.__CDPModServerVersion === 1 && CDPMod?.handleCommand && CDPMod?.addCustomEvent), + extension_id: globalThis.chrome?.runtime?.id ?? null, + has_tabs: Boolean(globalThis.chrome?.tabs?.query), + has_debugger: Boolean(globalThis.chrome?.debugger?.sendCommand), +}; +})()`, installer), nil +} + +func (c *CDPModClient) reader() { + for { + data, err := wsutil.ReadServerText(c.conn) + if err != nil { + c.mu.Lock() + pending := c.pending + c.pending = map[int64]chan map[string]any{} + c.mu.Unlock() + for _, ch := range pending { + ch <- map[string]any{"error": map[string]any{"message": fmt.Sprintf("connection closed: %v", err)}} + } + return + } + var msg map[string]any + if err := json.Unmarshal(data, &msg); err != nil { + continue + } + if idF, ok := msg["id"].(float64); ok { + id := int64(idF) + c.mu.Lock() + ch, ok := c.pending[id] + delete(c.pending, id) + c.mu.Unlock() + if ok { + ch <- msg + } + continue + } + method, _ := msg["method"].(string) + sessionID, _ := msg["sessionId"].(string) + params, _ := msg["params"].(map[string]any) + if method == "Target.attachedToTarget" { + attachedSessionID, _ := params["sessionId"].(string) + targetInfo, _ := params["targetInfo"].(map[string]any) + targetID, _ := targetInfo["targetId"].(string) + if attachedSessionID != "" && targetID != "" { + c.targetSessionsMu.Lock() + c.targetSessions[targetID] = attachedSessionID + c.sessionTargets[attachedSessionID] = targetInfo + c.targetSessionsMu.Unlock() + } + } else if method == "Target.detachedFromTarget" { + detachedSessionID, _ := params["sessionId"].(string) + if detachedSessionID != "" { + c.targetSessionsMu.Lock() + targetInfo := c.sessionTargets[detachedSessionID] + delete(c.sessionTargets, detachedSessionID) + if targetID, _ := targetInfo["targetId"].(string); targetID != "" { + delete(c.targetSessions, targetID) + } + c.targetSessionsMu.Unlock() + } + } + // IMPORTANT: handlers run on their own goroutine, not on the reader. + // A handler that calls c.Send() would otherwise deadlock waiting on + // a response that this same goroutine is supposed to deliver. + if sessionID == c.ExtSessionID { + params, _ := msg["params"].(map[string]any) + if event, data, ok := unwrapEventIfNeeded(method, params, sessionID, c.ExtSessionID); ok { + c.handlersMu.Lock() + hs := append([]Handler(nil), c.handlers[event]...) + c.handlersMu.Unlock() + for _, h := range hs { + go h(data) + } + } + continue + } + if method != "" { + c.handlersMu.Lock() + hs := append([]Handler(nil), c.handlers[method]...) + c.handlersMu.Unlock() + for _, h := range hs { + go h(params) + } + } + } +} + +func (c *CDPModClient) ensureExtension() (map[string]any, error) { + targetsResp, err := c.sendFrame("Target.getTargets", map[string]any{}, "") + if err != nil { + return nil, err + } + targetsRaw, _ := targetsResp["targetInfos"].([]any) + trustServiceWorkerTarget := c.trustServiceWorkerTarget() + if trustServiceWorkerTarget { + for _, t := range targetsRaw { + ti, _ := t.(map[string]any) + if !c.serviceWorkerTargetMatches(ti) { + continue + } + if probed, ok := c.probeReadyTarget(ti, 2*time.Second); ok { + probed["source"] = "trusted" + return probed, nil + } + } + } + for _, t := range targetsRaw { + ti, _ := t.(map[string]any) + ttype, _ := ti["type"].(string) + turl, _ := ti["url"].(string) + if ttype != "service_worker" || !strings.HasPrefix(turl, "chrome-extension://") { + continue + } + if probed, ok := c.probeReadyTarget(ti, 2*time.Second); ok { + probed["source"] = "discovered" + return probed, nil + } + } + if c.opts.RequireServiceWorkerTarget { + matchers := append(append([]string{}, c.opts.ServiceWorkerURLIncludes...), c.opts.ServiceWorkerURLSuffixes...) + matcherText := strings.Join(matchers, ", ") + if matcherText == "" { + matcherText = "no matcher" + } + return nil, fmt.Errorf("required CDPMod service worker target was not visible in the current CDP target snapshot (%s)", matcherText) + } + + loadResp, err := c.sendFrame("Extensions.loadUnpacked", map[string]any{"path": c.opts.ExtensionPath}, "") + if err != nil { + if strings.Contains(err.Error(), "Method not available") || strings.Contains(err.Error(), "wasn't found") { + targetsResp, getTargetsErr := c.sendFrame("Target.getTargets", map[string]any{}, "") + if getTargetsErr != nil { + return nil, getTargetsErr + } + targetsRaw, _ := targetsResp["targetInfos"].([]any) + if trustServiceWorkerTarget { + for _, t := range targetsRaw { + ti, _ := t.(map[string]any) + if !c.serviceWorkerTargetMatches(ti) { + continue + } + if probed, ok := c.probeReadyTarget(ti, 2*time.Second); ok { + probed["source"] = "trusted" + return probed, nil + } + } + } + for _, t := range targetsRaw { + ti, _ := t.(map[string]any) + ttype, _ := ti["type"].(string) + turl, _ := ti["url"].(string) + if ttype != "service_worker" || !strings.HasPrefix(turl, "chrome-extension://") { + continue + } + if probed, ok := c.probeReadyTarget(ti, 2*time.Second); ok { + probed["source"] = "discovered" + return probed, nil + } + } + return c.borrowExtensionWorker(err.Error()) + } + return nil, err + } + extID, _ := loadResp["id"].(string) + if extID == "" { + extID, _ = loadResp["extensionId"].(string) + } + if extID == "" { + return nil, fmt.Errorf("Extensions.loadUnpacked returned no id") + } + + swURLPrefix := fmt.Sprintf("chrome-extension://%s/", extID) + deadline := time.Now().Add(60 * time.Second) + for time.Now().Before(deadline) { + targetsResp, err := c.sendFrame("Target.getTargets", map[string]any{}, "") + if err != nil { + return nil, err + } + targetsRaw, _ := targetsResp["targetInfos"].([]any) + for _, t := range targetsRaw { + ti, _ := t.(map[string]any) + turl, _ := ti["url"].(string) + if ti["type"] == "service_worker" && strings.HasPrefix(turl, swURLPrefix) { + if probed, ok := c.probeReadyTarget(ti, time.Second); ok { + probed["source"] = "injected" + probed["extension_id"] = extID + return probed, nil + } + } + } + time.Sleep(100 * time.Millisecond) + } + return nil, fmt.Errorf("timed out after 60s waiting for service worker target for extension %s", extID) +} + +func (c *CDPModClient) trustServiceWorkerTarget() bool { + if c.opts.TrustServiceWorkerTarget || len(c.opts.ServiceWorkerURLIncludes) > 0 { + return true + } + for _, suffix := range c.opts.ServiceWorkerURLSuffixes { + parts := 0 + for _, part := range strings.Split(suffix, "/") { + if part != "" { + parts++ + } + } + if parts > 1 { + return true + } + } + return false +} + +func (c *CDPModClient) serviceWorkerTargetMatches(target map[string]any) bool { + turl, _ := target["url"].(string) + ttype, _ := target["type"].(string) + if ttype != "service_worker" || !strings.HasPrefix(turl, "chrome-extension://") { + return false + } + for _, part := range c.opts.ServiceWorkerURLIncludes { + if !strings.Contains(turl, part) { + return false + } + } + if len(c.opts.ServiceWorkerURLSuffixes) > 0 { + matched := false + for _, suffix := range c.opts.ServiceWorkerURLSuffixes { + if strings.HasSuffix(turl, suffix) { + matched = true + break + } + } + if !matched { + return false + } + } + return len(c.opts.ServiceWorkerURLIncludes) > 0 || len(c.opts.ServiceWorkerURLSuffixes) > 0 +} + +func (c *CDPModClient) readyExpression() string { + if c.opts.ServiceWorkerReadyExpression == "" { + return cdpmodReadyExpression + } + return fmt.Sprintf("(%s) && Boolean(%s)", cdpmodReadyExpression, c.opts.ServiceWorkerReadyExpression) +} + +func (c *CDPModClient) sessionIDForTarget(targetID string, timeout time.Duration) string { + if timeout <= 0 { + c.targetSessionsMu.Lock() + sessionID := c.targetSessions[targetID] + c.targetSessionsMu.Unlock() + return sessionID + } + deadline := time.Now().Add(timeout) + for time.Now().Before(deadline.Add(time.Millisecond)) { + c.targetSessionsMu.Lock() + sessionID := c.targetSessions[targetID] + c.targetSessionsMu.Unlock() + if sessionID != "" { + return sessionID + } + time.Sleep(20 * time.Millisecond) + } + return "" +} + +func (c *CDPModClient) probeReadyTarget(target map[string]any, timeout time.Duration) (map[string]any, bool) { + targetID, _ := target["targetId"].(string) + targetURL, _ := target["url"].(string) + sessionID := c.sessionIDForTarget(targetID, timeout) + if sessionID == "" { + return nil, false + } + probe, err := c.sendFrameTimeout("Runtime.evaluate", map[string]any{ + "expression": c.readyExpression(), + "returnByValue": true, + }, sessionID, 2*time.Second) + if err != nil { + return nil, false + } + result, _ := probe["result"].(map[string]any) + if ready, _ := result["value"].(bool); !ready { + return nil, false + } + extensionID := "" + if m := extIDFromURL.FindStringSubmatch(targetURL); len(m) > 1 { + extensionID = m[1] + } + return map[string]any{ + "extension_id": extensionID, + "target_id": targetID, + "url": targetURL, + "session_id": sessionID, + }, true +} + +func (c *CDPModClient) borrowExtensionWorker(loadError string) (map[string]any, error) { + bootstrap, err := c.cdpmodServerBootstrapExpression() + if err != nil { + return nil, err + } + targetsResp, err := c.sendFrame("Target.getTargets", map[string]any{}, "") + if err != nil { + return nil, err + } + targetsRaw, _ := targetsResp["targetInfos"].([]any) + var borrowed []map[string]any + for _, t := range targetsRaw { + ti, _ := t.(map[string]any) + ttype, _ := ti["type"].(string) + turl, _ := ti["url"].(string) + tid, _ := ti["targetId"].(string) + if ttype != "service_worker" || !strings.HasPrefix(turl, "chrome-extension://") { + continue + } + sessionID := c.sessionIDForTarget(tid, 2*time.Second) + if sessionID == "" { + continue + } + _, _ = c.sendFrameTimeout("Runtime.enable", map[string]any{}, sessionID, 2*time.Second) + probe, err := c.sendFrameTimeout("Runtime.evaluate", map[string]any{ + "expression": bootstrap, + "awaitPromise": true, + "returnByValue": true, + "allowUnsafeEvalBlockedByCSP": true, + }, sessionID, 3*time.Second) + if err != nil { + continue + } + result, _ := probe["result"].(map[string]any) + value, _ := result["value"].(map[string]any) + if ok, _ := value["ok"].(bool); !ok { + continue + } + if c.opts.ServiceWorkerReadyExpression != "" { + readyProbe, err := c.sendFrameTimeout("Runtime.evaluate", map[string]any{ + "expression": c.readyExpression(), + "returnByValue": true, + }, sessionID, 2*time.Second) + if err != nil { + continue + } + readyResult, _ := readyProbe["result"].(map[string]any) + if ready, _ := readyResult["value"].(bool); !ready { + continue + } + } + extensionID, _ := value["extension_id"].(string) + if extensionID == "" { + if m := extIDFromURL.FindStringSubmatch(turl); len(m) > 1 { + extensionID = m[1] + } + } + borrowed = append(borrowed, map[string]any{ + "source": "borrowed", + "extension_id": extensionID, + "target_id": tid, + "url": turl, + "session_id": sessionID, + "has_tabs": value["has_tabs"], + "has_debugger": value["has_debugger"], + }) + } + sort.SliceStable(borrowed, func(i, j int) bool { + iDebugger, _ := borrowed[i]["has_debugger"].(bool) + jDebugger, _ := borrowed[j]["has_debugger"].(bool) + if iDebugger != jDebugger { + return iDebugger + } + iTabs, _ := borrowed[i]["has_tabs"].(bool) + jTabs, _ := borrowed[j]["has_tabs"].(bool) + return iTabs && !jTabs + }) + if len(borrowed) > 0 { + delete(borrowed[0], "has_tabs") + delete(borrowed[0], "has_debugger") + return borrowed[0], nil + } + return nil, fmt.Errorf( + "cannot install or borrow CDPMod in the running browser:\n"+ + " - no service worker with globalThis.CDPMod found\n"+ + " - Extensions.loadUnpacked unavailable (%s)\n"+ + " - no running chrome-extension:// service worker accepted the CDPMod bootstrap", + loadError, + ) +} diff --git a/client/go/MagicCDPClient.go b/client/go/MagicCDPClient.go deleted file mode 100644 index e84434b..0000000 --- a/client/go/MagicCDPClient.go +++ /dev/null @@ -1,620 +0,0 @@ -// MagicCDPClient (Go): importable, no CLI, no demo code. -// -// Field/option names mirror the JS / Python ports: -// CDPURL upstream CDP URL. -// ExtensionPath extension directory. -// Routes client-side routing map. -// Server { LoopbackCDPURL?, Routes? } passed to MagicCDPServer.configure. -// -// Public methods: Connect, Send(method, params), On(event, handler), Close. -// Synchronous; one background goroutine reads frames off the WS. -// -// Route and MagicCDP wire translation lives in translate.go. This file owns -// websocket transport, request bookkeeping, extension discovery, and events. -// -// Transport: gobwas/ws is intentionally low-level. We hold the underlying -// net.Conn ourselves and use wsutil.ReadServerText / WriteClientText to push -// raw JSON []byte over the websocket -- no message types, no schema, no -// dependency on chromedp/cdproto's static method enumeration. -// -// Package note: Go disallows two packages in one directory, so this file is -// in `package main` alongside demo.go. To use as a library, copy this file -// into your own package and rename `package main` to your package name. - -package main - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net" - "net/http" - "os" - "path/filepath" - "regexp" - "sort" - "strings" - "sync" - "time" - - "github.com/gobwas/ws" - "github.com/gobwas/ws/wsutil" -) - -var ( - extIDFromURL = regexp.MustCompile(`^chrome-extension://([a-z]+)/`) -) - -const magicReadyExpression = `Boolean(globalThis.MagicCDP?.__MagicCDPServerVersion === 1 && globalThis.MagicCDP?.handleCommand && globalThis.MagicCDP?.addCustomEvent)` - -func websocketURLFor(endpoint string) (string, error) { - if strings.HasPrefix(endpoint, "ws://") || strings.HasPrefix(endpoint, "wss://") { - return endpoint, nil - } - resp, err := http.Get(endpoint + "/json/version") - if err != nil { - return "", fmt.Errorf("GET /json/version: %w", err) - } - defer resp.Body.Close() - body, _ := io.ReadAll(resp.Body) - var version map[string]any - if err := json.Unmarshal(body, &version); err != nil { - return "", fmt.Errorf("parse /json/version: %w", err) - } - wsURL, _ := version["webSocketDebuggerUrl"].(string) - if wsURL == "" { - return "", fmt.Errorf("HTTP discovery for %s returned no webSocketDebuggerUrl", endpoint) - } - return wsURL, nil -} - -// --- public types -------------------------------------------------------- - -type ServerConfig struct { - LoopbackCDPURL string `json:"loopback_cdp_url,omitempty"` - Routes map[string]string `json:"routes,omitempty"` -} - -type Options struct { - CDPURL string - ExtensionPath string - Routes map[string]string - Server *ServerConfig -} - -type Handler func(data any) - -type MagicCDPClient struct { - opts Options - conn net.Conn - writeMu sync.Mutex - ctx context.Context - cancel context.CancelFunc - mu sync.Mutex - nextID int64 - pending map[int64]chan map[string]any - handlers map[string][]Handler - handlersMu sync.Mutex - ExtensionID string - ExtTargetID string - ExtSessionID string - Latency map[string]any -} - -func New(opts Options) *MagicCDPClient { - if opts.Routes == nil { - opts.Routes = DefaultClientRoutes() - } else { - merged := DefaultClientRoutes() - for k, v := range opts.Routes { - merged[k] = v - } - opts.Routes = merged - } - if opts.Server == nil { - opts.Server = &ServerConfig{} - } - return &MagicCDPClient{ - opts: opts, - pending: map[int64]chan map[string]any{}, - handlers: map[string][]Handler{}, - } -} - -func (c *MagicCDPClient) Connect() error { - inputCDPURL := c.opts.CDPURL - wsURL, err := websocketURLFor(c.opts.CDPURL) - if err != nil { - return err - } - c.opts.CDPURL = wsURL - if c.opts.Server != nil && c.opts.Server.LoopbackCDPURL == "" { - c.opts.Server.LoopbackCDPURL = wsURL - } else if c.opts.Server != nil && (c.opts.Server.LoopbackCDPURL == inputCDPURL || c.opts.Server.LoopbackCDPURL == wsURL) { - c.opts.Server.LoopbackCDPURL = wsURL - } - - c.ctx, c.cancel = context.WithCancel(context.Background()) - conn, _, _, err := ws.Dial(c.ctx, wsURL) - if err != nil { - return fmt.Errorf("websocket dial: %w", err) - } - c.conn = conn - go c.reader() - - // once the reader goroutine is running, any further error must call Close - // to tear it down; otherwise the goroutine + ws connection leak. - ext, err := c.ensureExtension() - if err != nil { - c.Close() - return err - } - c.ExtensionID = ext["extensionId"].(string) - c.ExtTargetID = ext["targetId"].(string) - c.ExtSessionID = ext["sessionId"].(string) - if _, err := c.sendFrame("Runtime.enable", map[string]any{}, c.ExtSessionID); err != nil { - c.Close() - return err - } - if _, err := c.sendFrame("Runtime.addBinding", map[string]any{"name": bindingNameFor("Magic.pong")}, c.ExtSessionID); err != nil { - c.Close() - return err - } - - if c.opts.Server != nil { - command, err := wrapCommandIfNeeded("Magic.configure", map[string]any{ - "loopback_cdp_url": c.opts.Server.LoopbackCDPURL, - "routes": c.opts.Server.Routes, - }, c.opts.Routes, c.ExtSessionID) - if err != nil { - c.Close() - return fmt.Errorf("Magic.configure: %w", err) - } - if _, err := c.sendRaw(command); err != nil { - c.Close() - return fmt.Errorf("Magic.configure: %w", err) - } - } - if err := c.measurePingLatency(); err != nil { - c.Close() - return err - } - return nil -} - -func (c *MagicCDPClient) Send(method string, params map[string]any) (any, error) { - if params == nil { - params = map[string]any{} - } - command, err := wrapCommandIfNeeded(method, params, c.opts.Routes, c.ExtSessionID) - if err != nil { - return nil, err - } - return c.sendRaw(command) -} - -func (c *MagicCDPClient) On(event string, handler Handler) { - c.handlersMu.Lock() - defer c.handlersMu.Unlock() - c.handlers[event] = append(c.handlers[event], handler) -} - -func (c *MagicCDPClient) Close() { - if c.ExtSessionID != "" { - _, _ = c.sendFrame("Target.detachFromTarget", map[string]any{"sessionId": c.ExtSessionID}, "") - } - if c.cancel != nil { - c.cancel() - } - if c.conn != nil { - _ = c.conn.Close() - } -} - -// --- internals ----------------------------------------------------------- - -func (c *MagicCDPClient) sendRaw(command rawCommand) (any, error) { - if command.Target == "direct_cdp" { - step := command.Steps[0] - return c.sendFrame(step.Method, step.Params, "") - } - if command.Target != "service_worker" { - return nil, fmt.Errorf("unsupported command target %q", command.Target) - } - - var result map[string]any - unwrap := "" - for _, step := range command.Steps { - r, err := c.sendFrame(step.Method, step.Params, c.ExtSessionID) - if err != nil { - return nil, err - } - result = r - unwrap = step.Unwrap - } - return unwrapResponseIfNeeded(result, unwrap) -} - -func (c *MagicCDPClient) measurePingLatency() error { - sentAt := time.Now().UnixMilli() - ch := make(chan any, 1) - c.On("Magic.pong", func(data any) { - select { - case ch <- data: - default: - } - }) - if _, err := c.Send("Magic.ping", map[string]any{"sentAt": sentAt}); err != nil { - return err - } - select { - case payload := <-ch: - returnedAt := time.Now().UnixMilli() - latency := map[string]any{ - "sentAt": sentAt, - "receivedAt": nil, - "returnedAt": returnedAt, - "roundTripMs": returnedAt - sentAt, - "serviceWorkerMs": nil, - "returnPathMs": nil, - } - if data, ok := payload.(map[string]any); ok { - if receivedAt, ok := numberAsInt64(data["receivedAt"]); ok { - latency["receivedAt"] = receivedAt - latency["serviceWorkerMs"] = receivedAt - sentAt - latency["returnPathMs"] = returnedAt - receivedAt - } - } - c.Latency = latency - return nil - case <-time.After(10 * time.Second): - return fmt.Errorf("Magic.pong timed out") - } -} - -func numberAsInt64(value any) (int64, bool) { - switch v := value.(type) { - case int64: - return v, true - case int: - return int64(v), true - case float64: - return int64(v), true - default: - return 0, false - } -} - -func (c *MagicCDPClient) sendFrame(method string, params map[string]any, sessionID string) (map[string]any, error) { - return c.sendFrameTimeout(method, params, sessionID, 10*time.Second) -} - -func (c *MagicCDPClient) sendFrameTimeout(method string, params map[string]any, sessionID string, timeout time.Duration) (map[string]any, error) { - c.mu.Lock() - c.nextID++ - id := c.nextID - ch := make(chan map[string]any, 1) - c.pending[id] = ch - c.mu.Unlock() - - msg := map[string]any{"id": id, "method": method, "params": params} - if sessionID != "" { - msg["sessionId"] = sessionID - } - body, _ := json.Marshal(msg) - c.writeMu.Lock() - err := wsutil.WriteClientText(c.conn, body) - c.writeMu.Unlock() - if err != nil { - c.mu.Lock() - delete(c.pending, id) - c.mu.Unlock() - return nil, err - } - select { - case <-time.After(timeout): - c.mu.Lock() - delete(c.pending, id) - c.mu.Unlock() - return nil, fmt.Errorf("%s timed out", method) - case resp := <-ch: - if errObj, ok := resp["error"].(map[string]any); ok { - return nil, fmt.Errorf("%s failed: %v", method, errObj["message"]) - } - if r, ok := resp["result"].(map[string]any); ok { - return r, nil - } - return map[string]any{}, nil - } -} - -func (c *MagicCDPClient) magicServerBootstrapExpression() (string, error) { - body, err := os.ReadFile(filepath.Join(c.opts.ExtensionPath, "MagicCDPServer.js")) - if err != nil { - return "", err - } - source := string(body) - start := strings.Index(source, "export function installMagicCDPServer") - end := strings.Index(source, "export const MagicCDPServer") - if start < 0 || end < start { - return "", fmt.Errorf("could not find installMagicCDPServer in MagicCDPServer.js") - } - installer := strings.Replace(source[start:end], "export function", "function", 1) - return fmt.Sprintf(`(() => { -%s -const MagicCDP = installMagicCDPServer(globalThis); -return { - ok: Boolean(MagicCDP?.__MagicCDPServerVersion === 1 && MagicCDP?.handleCommand && MagicCDP?.addCustomEvent), - extensionId: globalThis.chrome?.runtime?.id ?? null, - hasTabs: Boolean(globalThis.chrome?.tabs?.query), - hasDebugger: Boolean(globalThis.chrome?.debugger?.sendCommand), -}; -})()`, installer), nil -} - -func (c *MagicCDPClient) reader() { - for { - data, err := wsutil.ReadServerText(c.conn) - if err != nil { - c.mu.Lock() - pending := c.pending - c.pending = map[int64]chan map[string]any{} - c.mu.Unlock() - for _, ch := range pending { - ch <- map[string]any{"error": map[string]any{"message": "connection closed"}} - } - return - } - var msg map[string]any - if err := json.Unmarshal(data, &msg); err != nil { - continue - } - if idF, ok := msg["id"].(float64); ok { - id := int64(idF) - c.mu.Lock() - ch, ok := c.pending[id] - delete(c.pending, id) - c.mu.Unlock() - if ok { - ch <- msg - } - continue - } - method, _ := msg["method"].(string) - sessionID, _ := msg["sessionId"].(string) - // IMPORTANT: handlers run on their own goroutine, not on the reader. - // A handler that calls c.Send() would otherwise deadlock waiting on - // a response that this same goroutine is supposed to deliver. - if sessionID == c.ExtSessionID { - params, _ := msg["params"].(map[string]any) - if event, data, ok := unwrapEventIfNeeded(method, params, sessionID, c.ExtSessionID); ok { - c.handlersMu.Lock() - hs := append([]Handler(nil), c.handlers[event]...) - c.handlersMu.Unlock() - for _, h := range hs { - go h(data) - } - } - continue - } - if method != "" { - c.handlersMu.Lock() - hs := append([]Handler(nil), c.handlers[method]...) - c.handlersMu.Unlock() - params, _ := msg["params"].(map[string]any) - for _, h := range hs { - go h(params) - } - } - } -} - -func (c *MagicCDPClient) ensureExtension() (map[string]any, error) { - type attached struct{ TargetID, URL, SessionID string } - var seen []attached - - deadline := time.Now().Add(10 * time.Second) - for time.Now().Before(deadline.Add(time.Millisecond)) { - targetsResp, err := c.sendFrame("Target.getTargets", map[string]any{}, "") - if err != nil { - return nil, err - } - targetsRaw, _ := targetsResp["targetInfos"].([]any) - for _, t := range targetsRaw { - ti, _ := t.(map[string]any) - ttype, _ := ti["type"].(string) - turl, _ := ti["url"].(string) - tid, _ := ti["targetId"].(string) - if ttype != "service_worker" || !strings.HasPrefix(turl, "chrome-extension://") { - continue - } - already := false - for _, a := range seen { - if a.TargetID == tid { - already = true - break - } - } - if already { - continue - } - a, err := c.sendFrameTimeout("Target.attachToTarget", map[string]any{"targetId": tid, "flatten": true}, "", 2*time.Second) - if err != nil { - continue - } - sid, _ := a["sessionId"].(string) - seen = append(seen, attached{TargetID: tid, URL: turl, SessionID: sid}) - } - for _, a := range seen { - probe, err := c.sendFrameTimeout("Runtime.evaluate", map[string]any{ - "expression": magicReadyExpression, - "returnByValue": true, - }, a.SessionID, 2*time.Second) - if err != nil { - continue - } - result, _ := probe["result"].(map[string]any) - if v, _ := result["value"].(bool); v { - for _, o := range seen { - if o.SessionID != a.SessionID { - _, _ = c.sendFrame("Target.detachFromTarget", map[string]any{"sessionId": o.SessionID}, "") - } - } - m := extIDFromURL.FindStringSubmatch(a.URL) - return map[string]any{ - "source": "discovered", "extensionId": m[1], - "targetId": a.TargetID, "url": a.URL, "sessionId": a.SessionID, - }, nil - } - } - if !time.Now().Before(deadline) { - break - } - time.Sleep(100 * time.Millisecond) - } - for _, a := range seen { - _, _ = c.sendFrame("Target.detachFromTarget", map[string]any{"sessionId": a.SessionID}, "") - } - - loadResp, err := c.sendFrame("Extensions.loadUnpacked", map[string]any{"path": c.opts.ExtensionPath}, "") - if err != nil { - if strings.Contains(err.Error(), "Method not available") || strings.Contains(err.Error(), "wasn't found") { - return c.borrowExtensionWorker(err.Error()) - } - return nil, err - } - extID, _ := loadResp["id"].(string) - if extID == "" { - extID, _ = loadResp["extensionId"].(string) - } - if extID == "" { - return nil, fmt.Errorf("Extensions.loadUnpacked returned no id") - } - - swURL := fmt.Sprintf("chrome-extension://%s/service_worker.js", extID) - deadline = time.Now().Add(10 * time.Second) - for time.Now().Before(deadline) { - targetsResp, err := c.sendFrame("Target.getTargets", map[string]any{}, "") - if err != nil { - return nil, err - } - targetsRaw, _ := targetsResp["targetInfos"].([]any) - for _, t := range targetsRaw { - ti, _ := t.(map[string]any) - if ti["type"] == "service_worker" && ti["url"] == swURL { - tid, _ := ti["targetId"].(string) - a, err := c.sendFrame("Target.attachToTarget", map[string]any{"targetId": tid, "flatten": true}, "") - if err != nil { - return nil, err - } - sid, _ := a["sessionId"].(string) - probe, err := c.sendFrame("Runtime.evaluate", map[string]any{ - "expression": magicReadyExpression, - "returnByValue": true, - }, sid) - if err != nil { - _, _ = c.sendFrame("Target.detachFromTarget", map[string]any{"sessionId": sid}, "") - continue - } - result, _ := probe["result"].(map[string]any) - if v, _ := result["value"].(bool); v { - return map[string]any{ - "source": "injected", "extensionId": extID, - "targetId": tid, "url": swURL, "sessionId": sid, - }, nil - } - _, _ = c.sendFrame("Target.detachFromTarget", map[string]any{"sessionId": sid}, "") - } - } - time.Sleep(100 * time.Millisecond) - } - return nil, fmt.Errorf("Extensions.loadUnpacked installed %s but its SW did not appear", extID) -} - -func (c *MagicCDPClient) borrowExtensionWorker(loadError string) (map[string]any, error) { - bootstrap, err := c.magicServerBootstrapExpression() - if err != nil { - return nil, err - } - targetsResp, err := c.sendFrame("Target.getTargets", map[string]any{}, "") - if err != nil { - return nil, err - } - targetsRaw, _ := targetsResp["targetInfos"].([]any) - var borrowed []map[string]any - for _, t := range targetsRaw { - ti, _ := t.(map[string]any) - ttype, _ := ti["type"].(string) - turl, _ := ti["url"].(string) - tid, _ := ti["targetId"].(string) - if ttype != "service_worker" || !strings.HasPrefix(turl, "chrome-extension://") { - continue - } - sessionID := "" - a, err := c.sendFrameTimeout("Target.attachToTarget", map[string]any{"targetId": tid, "flatten": true}, "", 2*time.Second) - if err != nil { - continue - } - sessionID, _ = a["sessionId"].(string) - _, _ = c.sendFrameTimeout("Runtime.enable", map[string]any{}, sessionID, 2*time.Second) - probe, err := c.sendFrameTimeout("Runtime.evaluate", map[string]any{ - "expression": bootstrap, - "awaitPromise": true, - "returnByValue": true, - "allowUnsafeEvalBlockedByCSP": true, - }, sessionID, 3*time.Second) - if err != nil { - _, _ = c.sendFrame("Target.detachFromTarget", map[string]any{"sessionId": sessionID}, "") - continue - } - result, _ := probe["result"].(map[string]any) - value, _ := result["value"].(map[string]any) - if ok, _ := value["ok"].(bool); !ok { - _, _ = c.sendFrame("Target.detachFromTarget", map[string]any{"sessionId": sessionID}, "") - continue - } - extensionID, _ := value["extensionId"].(string) - if extensionID == "" { - if m := extIDFromURL.FindStringSubmatch(turl); len(m) > 1 { - extensionID = m[1] - } - } - borrowed = append(borrowed, map[string]any{ - "source": "borrowed", - "extensionId": extensionID, - "targetId": tid, - "url": turl, - "sessionId": sessionID, - "hasTabs": value["hasTabs"], - "hasDebugger": value["hasDebugger"], - }) - } - sort.SliceStable(borrowed, func(i, j int) bool { - iDebugger, _ := borrowed[i]["hasDebugger"].(bool) - jDebugger, _ := borrowed[j]["hasDebugger"].(bool) - if iDebugger != jDebugger { - return iDebugger - } - iTabs, _ := borrowed[i]["hasTabs"].(bool) - jTabs, _ := borrowed[j]["hasTabs"].(bool) - return iTabs && !jTabs - }) - if len(borrowed) > 0 { - for _, other := range borrowed[1:] { - if sid, _ := other["sessionId"].(string); sid != "" { - _, _ = c.sendFrame("Target.detachFromTarget", map[string]any{"sessionId": sid}, "") - } - } - delete(borrowed[0], "hasTabs") - delete(borrowed[0], "hasDebugger") - return borrowed[0], nil - } - return nil, fmt.Errorf( - "cannot install or borrow MagicCDP in the running browser:\n"+ - " - no service worker with globalThis.MagicCDP found\n"+ - " - Extensions.loadUnpacked unavailable (%s)\n"+ - " - no running chrome-extension:// service worker accepted the MagicCDP bootstrap", - loadError, - ) -} diff --git a/client/go/demo.go b/client/go/demo/main.go similarity index 57% rename from client/go/demo.go rename to client/go/demo/main.go index f3ef99e..673cd08 100644 --- a/client/go/demo.go +++ b/client/go/demo/main.go @@ -1,4 +1,4 @@ -// Go demo for MagicCDPClient. Mirrors client/js/demo.js and client/python/demo.py. +// Go demo for CDPModClient. Mirrors client/js/demo.js and client/python/demo.py. // // Modes: // --live Use the running Google Chrome enabled via chrome://inspect. @@ -12,49 +12,21 @@ import ( "bufio" "encoding/json" "fmt" - "io" "log" - "net" - "net/http" "os" "os/exec" "path/filepath" "regexp" "runtime" - "strconv" "strings" "sync" "time" + "cdpmod" "golang.org/x/term" ) -func freePort() int { - l, _ := net.Listen("tcp", "127.0.0.1:0") - defer l.Close() - return l.Addr().(*net.TCPAddr).Port -} - -func waitForJSON(url string, deadline time.Time) (map[string]any, error) { - for time.Now().Before(deadline) { - resp, err := (&http.Client{Timeout: 500 * time.Millisecond}).Get(url) - if err == nil { - body, _ := io.ReadAll(resp.Body) - resp.Body.Close() - if resp.StatusCode < 500 { - var data map[string]any - if err := json.Unmarshal(body, &data); err != nil { - return nil, err - } - return data, nil - } - } - time.Sleep(50 * time.Millisecond) - } - return nil, fmt.Errorf("timeout waiting for %s", url) -} - -func optionsFor(mode, cdpURL, extensionPath string) Options { +func optionsFor(mode, cdpURL, extensionPath string, launchOptions cdpmod.LaunchOptions) cdpmod.Options { directNormalEventRoutes := map[string]string{ "Target.setDiscoverTargets": "direct_cdp", "Target.createTarget": "direct_cdp", @@ -67,35 +39,29 @@ func optionsFor(mode, cdpURL, extensionPath string) Options { return base } if mode == "direct" { - return Options{ + return cdpmod.Options{ CDPURL: cdpURL, ExtensionPath: extensionPath, + LaunchOptions: launchOptions, Routes: routes(map[string]string{ - "Magic.*": "service_worker", + "Mod.*": "service_worker", "Custom.*": "service_worker", "*.*": "direct_cdp", }), } } - serverRoute := "chrome_debugger" - if mode == "loopback" { - serverRoute = "loopback_cdp" - } - server := &ServerConfig{ - Routes: map[string]string{ - "Magic.*": "service_worker", - "Custom.*": "service_worker", - "*.*": serverRoute, - }, + server := &cdpmod.ServerConfig{ + Routes: serverRoutesFor(mode), } - if mode == "loopback" { + if mode == "loopback" && cdpURL != "" { server.LoopbackCDPURL = cdpURL } - return Options{ + return cdpmod.Options{ CDPURL: cdpURL, ExtensionPath: extensionPath, + LaunchOptions: launchOptions, Routes: routes(map[string]string{ - "Magic.*": "service_worker", + "Mod.*": "service_worker", "Custom.*": "service_worker", "*.*": "service_worker", }), @@ -103,6 +69,50 @@ func optionsFor(mode, cdpURL, extensionPath string) Options { } } +func serverRoutesFor(mode string) map[string]string { + serverRoute := "auto" + if mode == "loopback" { + serverRoute = "loopback_cdp" + } else if mode == "debugger" { + serverRoute = "chrome_debugger" + } + return map[string]string{ + "Mod.*": "service_worker", + "Custom.*": "service_worker", + "*.*": serverRoute, + } +} + +func mustMap(value any, label string) map[string]any { + result, ok := value.(map[string]any) + if !ok { + log.Fatalf("%s returned non-object value: %v", label, value) + } + return result +} + +func mustString(value any, label string) string { + result, ok := value.(string) + if !ok || result == "" { + log.Fatalf("%s returned non-string value: %v", label, value) + } + return result +} + +func waitForEvent(ch <-chan map[string]any, label string, predicate func(map[string]any) bool) map[string]any { + timeout := time.After(3 * time.Second) + for { + select { + case event := <-ch: + if predicate(event) { + return event + } + case <-timeout: + log.Fatalf("timed out waiting for %s", label) + } + } +} + func main() { flags := map[string]bool{} for _, a := range os.Args[1:] { @@ -134,9 +144,10 @@ func main() { // Resolve repo root from this source file so the demo runs correctly from // any CWD (`go run ./client/go`, `go run .` from inside client/go, etc.). _, thisFile, _, _ := runtime.Caller(0) - root, _ := filepath.Abs(filepath.Join(filepath.Dir(thisFile), "..", "..")) + root, _ := filepath.Abs(filepath.Join(filepath.Dir(thisFile), "..", "..", "..")) extensionPath := filepath.Join(root, "dist", "extension") var cdpURL string + launchOptions := cdpmod.LaunchOptions{} if live { var err error cdpURL, err = waitForLiveCDPURL() @@ -144,38 +155,21 @@ func main() { log.Fatal(err) } } else { - profile, _ := os.MkdirTemp("", "magic-cdp-go.") - defer os.RemoveAll(profile) - - chromePort := freePort() - chromeFlags := []string{ - "--disable-gpu", - "--enable-unsafe-extension-debugging", "--remote-allow-origins=*", - "--no-first-run", "--no-default-browser-check", - "--remote-debugging-port=" + strconv.Itoa(chromePort), - "--user-data-dir=" + profile, - "--load-extension=" + extensionPath, - "about:blank", - } + headless := false + sandbox := true if runtime.GOOS == "linux" { - chromeFlags = append([]string{"--headless=new", "--no-sandbox"}, chromeFlags...) + headless = true + sandbox = false } - chrome := exec.Command(chromePath, chromeFlags...) - if err := chrome.Start(); err != nil { - log.Fatal(err) - } - defer func() { _ = chrome.Process.Kill(); _, _ = chrome.Process.Wait() }() - - httpURL := fmt.Sprintf("http://127.0.0.1:%d", chromePort) - version, err := waitForJSON(httpURL+"/json/version", time.Now().Add(10*time.Second)) - if err != nil { - log.Fatal(err) + launchOptions = cdpmod.LaunchOptions{ + ExecutablePath: chromePath, + ExtraArgs: []string{"--load-extension=" + extensionPath}, + Headless: &headless, + Sandbox: &sandbox, } - cdpURL, _ = version["webSocketDebuggerUrl"].(string) } - fmt.Println("upstream cdp:", cdpURL) - cdp := New(optionsFor(mode, cdpURL, extensionPath)) + cdp := cdpmod.New(optionsFor(mode, cdpURL, extensionPath, launchOptions)) var ( eventsMu sync.Mutex targetCreatedEvents []map[string]any @@ -194,53 +188,118 @@ func main() { log.Fatalf("connect: %v", err) } defer cdp.Close() + fmt.Println("upstream cdp:", cdp.CDPURL) fmt.Printf("connected; ext %s session %s\n", cdp.ExtensionID, cdp.ExtSessionID) if b, err := json.Marshal(cdp.Latency); err == nil { fmt.Println("ping latency ->", string(b)) } - if r, err := cdp.Send("Browser.getVersion", nil); err != nil { - fmt.Println("Browser.getVersion -> (rejected by route:", err, ")") + configureParams := map[string]any{"routes": serverRoutesFor(mode)} + if mode == "loopback" { + configureParams["loopback_cdp_url"] = cdp.CDPURL + } + configure := mustMap(mustSend(cdp, "Mod.configure", configureParams), "Mod.configure") + configureRoutes := mustMap(configure["routes"], "Mod.configure.routes") + if configureRoutes["*.*"] != serverRoutesFor(mode)["*.*"] { + log.Fatalf("unexpected Mod.configure result: %v", configure) + } + fmt.Println("Mod.configure ->", configureRoutes) + + pongCh := make(chan map[string]any, 16) + cdp.On("Mod.pong", func(data any) { + if event, ok := data.(map[string]any); ok { + pongCh <- event + } + }) + pingSentAt := time.Now().UnixMilli() + ping := mustMap(mustSend(cdp, "Mod.ping", map[string]any{"sentAt": pingSentAt}), "Mod.ping") + pong := waitForEvent(pongCh, "Mod.pong", func(event map[string]any) bool { + return event["sentAt"] == float64(pingSentAt) || event["sentAt"] == pingSentAt + }) + if ping["ok"] != true || pong["receivedAt"] == nil || pong["from"] != "extension-service-worker" { + log.Fatalf("unexpected Mod.ping/Mod.pong result: ping=%v pong=%v", ping, pong) + } + fmt.Println("Mod.ping/pong ->", ping, pong) + + if mode == "debugger" { + if r, err := cdp.Send("Browser.getVersion", nil); err == nil { + version := mustMap(r, "Browser.getVersion") + _ = mustString(version["protocolVersion"], "Browser.getVersion.protocolVersion") + _ = mustString(version["product"], "Browser.getVersion.product") + b, _ := json.Marshal(version) + fmt.Println("Browser.getVersion ->", string(b)) + } else { + fmt.Println("Browser.getVersion -> (debugger route rejected:", err, ")") + } + runtimeEval := mustMap(mustSend(cdp, "Runtime.evaluate", map[string]any{ + "expression": "(() => 42)()", + "returnByValue": true, + }), "Runtime.evaluate") + runtimeResult := mustMap(runtimeEval["result"], "Runtime.evaluate.result") + if runtimeResult["value"] != float64(42) && runtimeResult["value"] != 42 { + log.Fatalf("unexpected Runtime.evaluate result: %v", runtimeEval) + } + b, _ := json.Marshal(runtimeEval) + fmt.Println("Runtime.evaluate ->", string(b)) } else { - b, _ := json.Marshal(r) + version := mustMap(mustSend(cdp, "Browser.getVersion", nil), "Browser.getVersion") + _ = mustString(version["protocolVersion"], "Browser.getVersion.protocolVersion") + _ = mustString(version["product"], "Browser.getVersion.product") + b, _ := json.Marshal(version) fmt.Println("Browser.getVersion ->", string(b)) } - if r, err := cdp.Send("Magic.evaluate", map[string]any{ + if r, err := cdp.Send("Mod.evaluate", map[string]any{ "expression": "({ extensionId: chrome.runtime.id })", }); err != nil { - log.Fatalf("Magic.evaluate: %v", err) + log.Fatalf("Mod.evaluate: %v", err) } else { - magicEval, _ := r.(map[string]any) - if magicEval["extensionId"] != cdp.ExtensionID { - log.Fatalf("unexpected Magic.evaluate result: %v", magicEval) + cdpmodEval, _ := r.(map[string]any) + if cdpmodEval["extensionId"] != cdp.ExtensionID { + log.Fatalf("unexpected Mod.evaluate result: %v", cdpmodEval) } b, _ := json.Marshal(r) - fmt.Println("Magic.evaluate ->", string(b)) + fmt.Println("Mod.evaluate ->", string(b)) } - if _, err := cdp.Send("Magic.addCustomCommand", map[string]any{ + echoRegistration := mustMap(mustSend(cdp, "Mod.addCustomCommand", map[string]any{ + "name": "Custom.echo", + "expression": `async (params, method) => ({ echoed: params.value, method })`, + }), "Mod.addCustomCommand Custom.echo") + if echoRegistration["registered"] != true || echoRegistration["name"] != "Custom.echo" { + log.Fatalf("unexpected Custom.echo registration: %v", echoRegistration) + } + echoResult := mustMap(mustSend(cdp, "Custom.echo", map[string]any{"value": "custom-command-ok"}), "Custom.echo") + if echoResult["echoed"] != "custom-command-ok" || echoResult["method"] != "Custom.echo" { + log.Fatalf("unexpected Custom.echo result: %v", echoResult) + } + b, _ := json.Marshal(echoResult) + fmt.Println("Custom.echo ->", string(b)) + + tabCommandRegistration := mustMap(mustSend(cdp, "Mod.addCustomCommand", map[string]any{ "name": "Custom.TabIdFromTargetId", "expression": `async ({ targetId }) => { const targets = await chrome.debugger.getTargets(); const target = targets.find(target => target.id === targetId); return { tabId: target?.tabId ?? null }; }`, - }); err != nil { - log.Fatal(err) + }), "Mod.addCustomCommand Custom.TabIdFromTargetId") + if tabCommandRegistration["registered"] != true { + log.Fatalf("unexpected TabIdFromTargetId registration: %v", tabCommandRegistration) } - if _, err := cdp.Send("Magic.addCustomCommand", map[string]any{ + targetCommandRegistration := mustMap(mustSend(cdp, "Mod.addCustomCommand", map[string]any{ "name": "Custom.targetIdFromTabId", "expression": `async ({ tabId }) => { const targets = await chrome.debugger.getTargets(); const target = targets.find(target => target.type === "page" && target.tabId === tabId); return { targetId: target?.id ?? null }; }`, - }); err != nil { - log.Fatal(err) + }), "Mod.addCustomCommand Custom.targetIdFromTabId") + if targetCommandRegistration["registered"] != true { + log.Fatalf("unexpected targetIdFromTabId registration: %v", targetCommandRegistration) } for _, phase := range []string{"response", "event"} { - if _, err := cdp.Send("Magic.addMiddleware", map[string]any{ + middlewareRegistration := mustMap(mustSend(cdp, "Mod.addMiddleware", map[string]any{ "name": "*", "phase": phase, "expression": `async (payload, next) => { @@ -257,13 +316,36 @@ func main() { await visit(payload); return next(payload); }`, - }); err != nil { - log.Fatal(err) + }), "Mod.addMiddleware "+phase) + if middlewareRegistration["registered"] != true || middlewareRegistration["phase"] != phase { + log.Fatalf("unexpected %s middleware registration: %v", phase, middlewareRegistration) } } - if _, err := cdp.Send("Magic.addCustomEvent", map[string]any{"name": "Custom.foregroundTargetChanged"}); err != nil { - log.Fatal(err) + demoEventCh := make(chan map[string]any, 16) + cdp.On("Custom.demoEvent", func(data any) { + if event, ok := data.(map[string]any); ok { + demoEventCh <- event + } + }) + demoEventRegistration := mustMap(mustSend(cdp, "Mod.addCustomEvent", map[string]any{"name": "Custom.demoEvent"}), "Mod.addCustomEvent Custom.demoEvent") + if demoEventRegistration["registered"] != true || demoEventRegistration["name"] != "Custom.demoEvent" { + log.Fatalf("unexpected Custom.demoEvent registration: %v", demoEventRegistration) + } + emitResult := mustMap(mustSend(cdp, "Mod.evaluate", map[string]any{ + "expression": `async () => await CDPMod.emit("Custom.demoEvent", { value: "custom-event-ok" })`, + }), "Custom.demoEvent emit") + if emitResult["emitted"] != true { + log.Fatalf("unexpected Custom.demoEvent emit result: %v", emitResult) + } + demoEvent := waitForEvent(demoEventCh, "Custom.demoEvent", func(event map[string]any) bool { + return event["value"] == "custom-event-ok" + }) + fmt.Println("Custom.demoEvent ->", demoEvent) + + foregroundEventRegistration := mustMap(mustSend(cdp, "Mod.addCustomEvent", map[string]any{"name": "Custom.foregroundTargetChanged"}), "Mod.addCustomEvent Custom.foregroundTargetChanged") + if foregroundEventRegistration["registered"] != true { + log.Fatalf("unexpected foreground event registration: %v", foregroundEventRegistration) } cdp.On("Custom.foregroundTargetChanged", func(p any) { event, _ := p.(map[string]any) @@ -272,7 +354,7 @@ func main() { foregroundEvents = append(foregroundEvents, event) eventsMu.Unlock() }) - if _, err := cdp.Send("Magic.evaluate", map[string]any{ + if _, err := cdp.Send("Mod.evaluate", map[string]any{ "expression": `chrome.tabs.onActivated.addListener(async ({ tabId }) => { const targets = await chrome.debugger.getTargets(); const target = targets.find(target => target.type === "page" && target.tabId === tabId); @@ -286,7 +368,7 @@ func main() { if _, err := cdp.Send("Target.setDiscoverTargets", map[string]any{"discover": true}); err != nil { log.Fatal(err) } - createdRaw, err := cdp.Send("Target.createTarget", map[string]any{"url": "https://example.com"}) + createdRaw, err := cdp.Send("Target.createTarget", map[string]any{"url": "https://example.com", "background": true}) if err != nil { log.Fatalf("Target.createTarget: %v", err) } @@ -345,12 +427,12 @@ func main() { log.Fatalf("Custom.TabIdFromTargetId: %v", err) } tabFromTarget, _ := tabFromTargetRaw.(map[string]any) - foregroundTabID, _ := numberAsInt64(foreground["tabId"]) - tabID, _ := numberAsInt64(tabFromTarget["tabId"]) + foregroundTabID, _ := foreground["tabId"].(float64) + tabID, _ := tabFromTarget["tabId"].(float64) if tabID != foregroundTabID { log.Fatalf("unexpected Custom.TabIdFromTargetId result: %v", tabFromTarget) } - b, _ := json.Marshal(tabFromTarget) + b, _ = json.Marshal(tabFromTarget) fmt.Println("Custom.TabIdFromTargetId ->", string(b)) targetFromTabRaw, err := cdp.Send("Custom.targetIdFromTabId", map[string]any{"tabId": foreground["tabId"]}) @@ -358,7 +440,7 @@ func main() { log.Fatalf("Custom.targetIdFromTabId: %v", err) } targetFromTab, _ := targetFromTabRaw.(map[string]any) - middlewareTabID, _ := numberAsInt64(targetFromTab["tabId"]) + middlewareTabID, _ := targetFromTab["tabId"].(float64) if targetFromTab["targetId"] != createdTargetID || middlewareTabID != foregroundTabID { log.Fatalf("unexpected Custom.targetIdFromTabId/middleware result: %v", targetFromTab) } @@ -372,14 +454,22 @@ func main() { // (CI / piped input / /dev/null) so the demo exits cleanly after // assertions. if term.IsTerminal(int(os.Stdin.Fd())) { - cdp.On("Magic.pong", func(p any) { + cdp.On("Mod.pong", func(p any) { b, _ := json.Marshal(p) - fmt.Printf("\n[event] Magic.pong %s\n", string(b)) + fmt.Printf("\n[event] Mod.pong %s\n", string(b)) }) runRepl(cdp, mode) } } +func mustSend(cdp *cdpmod.CDPModClient, method string, params map[string]any) any { + result, err := cdp.Send(method, params) + if err != nil { + log.Fatalf("%s: %v", method, err) + } + return result +} + func waitForLiveCDPURL() (string, error) { startedAt := time.Now() if runtime.GOOS == "darwin" { @@ -423,20 +513,20 @@ func waitForLiveCDPURL() (string, error) { } } -func runRepl(cdp *MagicCDPClient, mode string) { +func runRepl(cdp *cdpmod.CDPModClient, mode string) { fmt.Printf("\nBrowser remains running. Mode: %s.\n", mode) fmt.Println("Enter commands as Domain.method({...JSON params...}). Examples:") fmt.Println(` Browser.getVersion({})`) - fmt.Println(` Magic.evaluate({"expression": "chrome.tabs.query({active: true})"})`) + fmt.Println(` Mod.evaluate({"expression": "chrome.tabs.query({active: true})"})`) fmt.Println(` Custom.TabIdFromTargetId({"targetId": "..."})`) fmt.Println("Type exit or quit to disconnect (browser keeps running).") cmdRE := regexp.MustCompile(`^([A-Za-z_]\w*\.[A-Za-z_]\w*)(?:\((.*)\))?$`) sc := bufio.NewScanner(os.Stdin) - fmt.Print("MagicCDP> ") + fmt.Print("CDPMod> ") for sc.Scan() { line := strings.TrimSpace(sc.Text()) if line == "" { - fmt.Print("MagicCDP> ") + fmt.Print("CDPMod> ") continue } if line == "exit" || line == "quit" { @@ -445,7 +535,7 @@ func runRepl(cdp *MagicCDPClient, mode string) { m := cmdRE.FindStringSubmatch(line) if m == nil { fmt.Println("error: format: Domain.method({...JSON...})") - fmt.Print("MagicCDP> ") + fmt.Print("CDPMod> ") continue } method := m[1] @@ -454,18 +544,18 @@ func runRepl(cdp *MagicCDPClient, mode string) { if raw != "" { if err := json.Unmarshal([]byte(raw), ¶ms); err != nil { fmt.Printf("error: parse params: %v\n", err) - fmt.Print("MagicCDP> ") + fmt.Print("CDPMod> ") continue } } result, err := cdp.Send(method, params) if err != nil { fmt.Printf("error: %v\n", err) - fmt.Print("MagicCDP> ") + fmt.Print("CDPMod> ") continue } b, _ := json.MarshalIndent(result, "", " ") fmt.Println(string(b)) - fmt.Print("MagicCDP> ") + fmt.Print("CDPMod> ") } } diff --git a/client/go/go.mod b/client/go/go.mod index f23fc56..ccf100c 100644 --- a/client/go/go.mod +++ b/client/go/go.mod @@ -1,4 +1,4 @@ -module magiccdp +module cdpmod go 1.24.7 diff --git a/client/go/translate.go b/client/go/translate.go index fb1a0d3..1f13dc0 100644 --- a/client/go/translate.go +++ b/client/go/translate.go @@ -1,4 +1,4 @@ -package main +package cdpmod import ( "encoding/json" @@ -7,11 +7,11 @@ import ( "time" ) -const bindingPrefix = "__MagicCDP_" +const bindingPrefix = "__CDPMod_" func DefaultClientRoutes() map[string]string { return map[string]string{ - "Magic.*": "service_worker", + "Mod.*": "service_worker", "Custom.*": "service_worker", "*.*": "service_worker", } @@ -74,7 +74,7 @@ func evalParams(expression string) map[string]any { } } -func wrapMagicEvaluate(params map[string]any, sessionID string) map[string]any { +func wrapCDPModEvaluate(params map[string]any, sessionID string) map[string]any { expr, _ := params["expression"].(string) userParams := params["params"] if userParams == nil { @@ -87,35 +87,35 @@ func wrapMagicEvaluate(params map[string]any, sessionID string) map[string]any { up, _ := json.Marshal(userParams) sid, _ := json.Marshal(cdpSessionID) return evalParams(fmt.Sprintf( - `(async () => { const params = %s; const cdp = globalThis.MagicCDP.attachToSession(%s); const MagicCDP = globalThis.MagicCDP; const chrome = globalThis.chrome; const value = (%s); return typeof value === 'function' ? await value(params) : value; })()`, + `(async () => { const params = %s; const cdp = globalThis.CDPMod.attachToSession(%s); const CDPMod = globalThis.CDPMod; const chrome = globalThis.chrome; const value = (%s); return typeof value === 'function' ? await value(params) : value; })()`, string(up), string(sid), expr, )) } -func wrapMagicAddCustomCommand(params map[string]any) map[string]any { +func wrapCDPModAddCustomCommand(params map[string]any) map[string]any { name, _ := json.Marshal(params["name"]) expr, _ := params["expression"].(string) exprJSON, _ := json.Marshal(expr) pSchema, _ := json.Marshal(params["paramsSchema"]) rSchema, _ := json.Marshal(params["resultSchema"]) return evalParams(fmt.Sprintf( - `(() => { return globalThis.MagicCDP.addCustomCommand({ name: %s, paramsSchema: %s, resultSchema: %s, expression: %s, handler: async (params, cdpSessionId) => { const cdp = globalThis.MagicCDP.attachToSession(cdpSessionId); const MagicCDP = globalThis.MagicCDP; const chrome = globalThis.chrome; const handler = (%s); return await handler(params || {}); }, }); })()`, + `(() => { return globalThis.CDPMod.addCustomCommand({ name: %s, paramsSchema: %s, resultSchema: %s, expression: %s, handler: async (params, cdpSessionId, method) => { const cdp = globalThis.CDPMod.attachToSession(cdpSessionId); const CDPMod = globalThis.CDPMod; const chrome = globalThis.chrome; const handler = (%s); return await handler(params || {}, method); }, }); })()`, string(name), string(pSchema), string(rSchema), string(exprJSON), expr, )) } -func wrapMagicAddCustomEvent(params map[string]any) map[string]any { +func wrapCDPModAddCustomEvent(params map[string]any) map[string]any { rawName, _ := params["name"].(string) name, _ := json.Marshal(rawName) bn, _ := json.Marshal(bindingNameFor(rawName)) pSchema, _ := json.Marshal(params["eventSchema"]) return evalParams(fmt.Sprintf( - `globalThis.MagicCDP.addCustomEvent({ name: %s, bindingName: %s, eventSchema: %s })`, + `globalThis.CDPMod.addCustomEvent({ name: %s, bindingName: %s, eventSchema: %s })`, string(name), string(bn), string(pSchema), )) } -func wrapMagicAddMiddleware(params map[string]any) map[string]any { +func wrapCDPModAddMiddleware(params map[string]any) map[string]any { name := params["name"] if name == nil { name = "*" @@ -125,7 +125,7 @@ func wrapMagicAddMiddleware(params map[string]any) map[string]any { phaseJSON, _ := json.Marshal(params["phase"]) exprJSON, _ := json.Marshal(rawExpr) return evalParams(fmt.Sprintf( - `(() => { return globalThis.MagicCDP.addMiddleware({ name: %s, phase: %s, expression: %s, handler: async (payload, next, context = {}) => { const cdp = globalThis.MagicCDP.attachToSession(context.cdpSessionId ?? null); const MagicCDP = globalThis.MagicCDP; const chrome = globalThis.chrome; const middleware = (%s); return await middleware(payload, next, context); }, }); })()`, + `(() => { return globalThis.CDPMod.addMiddleware({ name: %s, phase: %s, expression: %s, handler: async (payload, next, context = {}) => { const cdp = globalThis.CDPMod.attachToSession(context.cdpSessionId ?? null); const CDPMod = globalThis.CDPMod; const chrome = globalThis.chrome; const middleware = (%s); return await middleware(payload, next, context); }, }); })()`, string(nameJSON), string(phaseJSON), string(exprJSON), rawExpr, )) } @@ -134,14 +134,14 @@ func wrapCustomCommand(method string, params map[string]any, sessionID string) m m, _ := json.Marshal(method) p, _ := json.Marshal(params) sid, _ := json.Marshal(sessionID) - return evalParams(fmt.Sprintf(`globalThis.MagicCDP.handleCommand(%s, %s, %s)`, string(m), string(p), string(sid))) + return evalParams(fmt.Sprintf(`globalThis.CDPMod.handleCommand(%s, %s, %s)`, string(m), string(p), string(sid))) } func wrapServiceWorkerCommand(method string, params map[string]any, sessionID string) []rawStep { if params == nil { params = map[string]any{} } - if method == "Magic.ping" { + if method == "Mod.ping" { if _, ok := params["sentAt"]; !ok { next := map[string]any{} for key, value := range params { @@ -152,21 +152,21 @@ func wrapServiceWorkerCommand(method string, params map[string]any, sessionID st } } - if method == "Magic.addCustomEvent" { + if method == "Mod.addCustomEvent" { name, _ := params["name"].(string) return []rawStep{ {Method: "Runtime.addBinding", Params: map[string]any{"name": bindingNameFor(name)}}, - {Method: "Runtime.evaluate", Params: wrapMagicAddCustomEvent(params), Unwrap: "evaluate"}, + {Method: "Runtime.evaluate", Params: wrapCDPModAddCustomEvent(params), Unwrap: "evaluate"}, } } runtimeParams := map[string]any{} switch method { - case "Magic.evaluate": - runtimeParams = wrapMagicEvaluate(params, sessionID) - case "Magic.addCustomCommand": - runtimeParams = wrapMagicAddCustomCommand(params) - case "Magic.addMiddleware": - runtimeParams = wrapMagicAddMiddleware(params) + case "Mod.evaluate": + runtimeParams = wrapCDPModEvaluate(params, sessionID) + case "Mod.addCustomCommand": + runtimeParams = wrapCDPModAddCustomCommand(params) + case "Mod.addMiddleware": + runtimeParams = wrapCDPModAddMiddleware(params) default: cdpSessionID, _ := params["cdpSessionId"].(string) if cdpSessionID == "" { diff --git a/client/js/CDPModClient.ts b/client/js/CDPModClient.ts new file mode 100644 index 0000000..98ec02e --- /dev/null +++ b/client/js/CDPModClient.ts @@ -0,0 +1,787 @@ +// CDPModClient (JS): importable, no CLI, no demo code. +// +// Constructor parameter names match across JS / Python / Go ports: +// cdp_url upstream CDP URL (string, default null -> try localhost:9222, +// then autolaunch) +// extension_path extension directory (string, default ../../extension) +// routes client-side routing dict (default { "Mod.*": "service_worker", +// "Custom.*": "service_worker", "*.*": "direct_cdp" }) +// server { loopback_cdp_url?, routes? } passed to CDPModServer.configure +// launch_options forwarded to launcher.launchChrome when running in Node and autolaunching +// +// Public methods: connect, send(method, params), on(event, handler), close. + +// oxlint-disable typescript-eslint/no-unsafe-declaration-merging -- alias members are assigned by connect(). +import type { z } from "zod"; + +import type { CdpAliases } from "../../types/aliases.js"; +import { + bindingNameFor, + DEFAULT_CLIENT_ROUTES, + wrapCommandIfNeeded, + unwrapResponseIfNeeded, + unwrapEventIfNeeded, +} from "../../bridge/translate.js"; +import type { + CdpCommandFrame, + CdpError, + CdpEventFrame, + CdpResponseFrame, + RuntimeBindingCalledEvent, + CDPModConfigureParams, + CDPModCustomPayload, + CDPModAddCustomCommandParams, + CDPModAddCustomEventObjectParams, + CDPModAddMiddlewareParams, + CDPModNamedValue, + CDPModPingLatency, + CDPModPongEvent, + CDPModRoutes, + ProtocolPayload, + ProtocolParams, + ProtocolResult, + TranslatedCommand, +} from "../../types/cdpmod.js"; +import { + CdpEventFrameSchema, + CdpResponseFrameSchema, + Mod, + normalizeCDPModName, + normalizeCDPModPayloadSchema, +} from "../../types/cdpmod.js"; + +const DEFAULT_LIVE_CDP_URL = "http://127.0.0.1:9222"; + +type PendingCommand = { + method: string; + resolve: (value: ProtocolResult) => void; + reject: (error: Error) => void; +}; +type ClientOptions = { + cdp_url?: string | null; + extension_path?: string; + routes?: CDPModRoutes; + server?: CDPModConfigureParams | null; + custom_commands?: CDPModClientCustomCommandParams[]; + custom_events?: CDPModAddCustomEventObjectParams[]; + custom_middlewares?: CDPModAddMiddlewareParams[]; + hydrate_aliases?: boolean; + service_worker_url_includes?: string[]; + service_worker_url_suffixes?: string[] | null; + trust_service_worker_target?: boolean; + require_service_worker_target?: boolean; + service_worker_ready_expression?: string | null; + launch_options?: Record; + self?: { + addEventListener?: ( + listener: (event: string, data: ProtocolPayload, cdpSessionId: string | null) => void, + ) => unknown; + configure?: (params: CDPModConfigureParams) => Promise; + handleCommand: (method: string, params?: ProtocolParams, cdpSessionId?: string | null) => Promise; + } | null; +}; +type CDPModEventNameInput = string | symbol | (z.ZodType & CDPModNamedValue); +type CDPModClientCustomCommandParams = Omit & { + expression?: string | null; +}; + +export type CDPModCommandSpec = { + params: Params; + result: Result; +}; +export type CDPModCommandMap = Record; +type MethodName = TName extends `${string}.${infer TMethod}` ? TMethod : never; +type DomainName = TName extends `${infer TDomain}.${string}` ? TDomain : never; +type CommandsForDomain = { + [TName in keyof TCommands as TName extends `${TDomain}.${string}` + ? MethodName> + : never]: undefined extends TCommands[TName]["params"] + ? (params?: TCommands[TName]["params"]) => Promise + : (params: TCommands[TName]["params"]) => Promise; +}; +export type CDPModClientInstance> = CDPModClient & { + [TDomain in DomainName>]: CommandsForDomain; +}; + +class CDPModEventEmitter { + private listeners = new Map void>>(); + + on(event_name: string | symbol, listener: (...args: unknown[]) => void) { + const listeners = this.listeners.get(event_name); + if (listeners) listeners.add(listener); + else this.listeners.set(event_name, new Set([listener])); + return this; + } + + once(event_name: string | symbol, listener: (...args: unknown[]) => void) { + const wrapped = (...args: unknown[]) => { + this.listeners.get(event_name)?.delete(wrapped); + listener(...args); + }; + return this.on(event_name, wrapped); + } + + off(event_name: string | symbol, listener: (...args: unknown[]) => void) { + this.listeners.get(event_name)?.delete(listener); + return this; + } + + emit(event_name: string | symbol, ...args: unknown[]) { + for (const listener of this.listeners.get(event_name) ?? []) listener(...args); + return true; + } +} + +function defineCustomCommandMethod(client: CDPModClient, name: string) { + const parts = name.split("."); + if (parts.length !== 2 || !parts[0] || !parts[1]) { + throw new Error(`Custom command must use Domain.method format, got ${name}`); + } + const [domain, method] = parts; + const target = client as unknown as Record>; + if (method === "*") { + target[domain] = new Proxy(target[domain] ?? {}, { + get(existing, property, receiver) { + if (typeof property !== "string") return Reflect.get(existing, property, receiver); + if (property in existing) return Reflect.get(existing, property, receiver); + const command_name = `${domain}.${property}`; + const alias = (params?: unknown) => client.send(command_name, params ?? {}); + Object.defineProperties(alias, { + cdp_command_name: { value: command_name, enumerable: true, configurable: true }, + id: { value: command_name, enumerable: true, configurable: true }, + name: { value: command_name, configurable: true }, + kind: { value: "command", enumerable: true, configurable: true }, + meta: { + value: () => ({ + cdp_command_name: command_name, + id: command_name, + name: command_name, + kind: "command", + }), + configurable: true, + }, + }); + existing[property] = alias; + return alias; + }, + }); + return; + } + target[domain] ??= {}; + const alias = (params?: unknown) => client.send(name, params ?? {}); + Object.defineProperties(alias, { + cdp_command_name: { value: name, enumerable: true, configurable: true }, + id: { value: name, enumerable: true, configurable: true }, + name: { value: name, configurable: true }, + kind: { value: "command", enumerable: true, configurable: true }, + meta: { value: () => ({ cdp_command_name: name, id: name, name, kind: "command" }), configurable: true }, + }); + target[domain][method] = alias; +} + +async function webSocketUrlFor(endpoint: string, name = "cdp_url") { + if (/^wss?:\/\//i.test(endpoint)) return endpoint; + const http_endpoint = /^[a-z][a-z\d+\-.]*:\/\//i.test(endpoint) ? endpoint : `http://${endpoint}`; + const response = await fetch(`${http_endpoint}/json/version`); + if (!response.ok) { + if (response.status === 404) { + const url = new URL(http_endpoint); + url.protocol = url.protocol === "https:" ? "wss:" : "ws:"; + url.pathname = "/devtools/browser"; + url.search = ""; + url.hash = ""; + return url.toString(); + } + throw new Error(`GET ${http_endpoint}/json/version -> ${response.status}`); + } + const { webSocketDebuggerUrl } = await response.json(); + if (!webSocketDebuggerUrl) throw new Error(`${name} HTTP discovery returned no webSocketDebuggerUrl`); + return webSocketDebuggerUrl; +} + +async function liveWebSocketUrlFor(endpoint = DEFAULT_LIVE_CDP_URL) { + try { + return await webSocketUrlFor(endpoint, "live_cdp_url"); + } catch { + return null; + } +} + +function defaultExtensionPath() { + if (typeof process === "object" && process?.versions?.node && import.meta.url.startsWith("file:")) { + return decodeURIComponent(new URL("../../extension", import.meta.url).pathname); + } + return "../../extension"; +} + +function runtimeModuleUrl(relative_path: string) { + return new URL(relative_path, import.meta.url).href; +} + +function hasCommandExpression( + command: CDPModClientCustomCommandParams, +): command is CDPModClientCustomCommandParams & { expression: string } { + return typeof command.expression === "string" && command.expression.length > 0; +} + +export class CDPModClient extends CDPModEventEmitter { + cdp_url: string | null; + extension_path: string; + routes: CDPModRoutes; + server: CDPModConfigureParams | null; + launch_options: Record; + custom_commands: CDPModClientCustomCommandParams[]; + custom_events: CDPModAddCustomEventObjectParams[]; + custom_middlewares: CDPModAddMiddlewareParams[]; + hydrate_aliases: boolean; + service_worker_url_includes: string[]; + service_worker_url_suffixes: string[] | null; + trust_service_worker_target: boolean; + require_service_worker_target: boolean; + service_worker_ready_expression: string | null; + ws: WebSocket | null; + self: ClientOptions["self"]; + next_id: number; + pending: Map; + ext_session_id: string | null; + ext_target_id: string | null; + extension_id: string | null; + latency: CDPModPingLatency | null; + connect_timing: Record | null; + last_command_timing: Record | null; + last_raw_timing: Record | null; + event_schemas: Map; + command_params_schemas: Map; + command_result_schemas: Map; + self_event_listener_registered: boolean; + cdp_aliases_hydrated: boolean; + event_wait_cleanups: Set<() => void>; + auto_target_sessions: Map; + auto_session_targets: Map>; + _prepared_extension: { path: string; close: () => Promise } | null; + _cdp: { + send: (method: string, params?: ProtocolParams, sessionId?: string | null) => Promise; + on: (eventName: string | symbol, listener: (...args: unknown[]) => void) => CDPModClient; + once: (eventName: string | symbol, listener: (...args: unknown[]) => void) => CDPModClient; + }; + _launched: { wsUrl: string; close: () => Promise | void } | null; + + constructor({ + cdp_url = null, + extension_path = defaultExtensionPath(), + routes = DEFAULT_CLIENT_ROUTES, + server = {}, + custom_commands = [], + custom_events = [], + custom_middlewares = [], + hydrate_aliases = true, + service_worker_url_includes = [], + service_worker_url_suffixes = null, + trust_service_worker_target = false, + require_service_worker_target = false, + service_worker_ready_expression = null, + launch_options = {}, + self = null, + }: ClientOptions = {}) { + super(); + this.cdp_url = cdp_url; + this.extension_path = extension_path; + this.routes = { ...DEFAULT_CLIENT_ROUTES, ...routes }; + this.server = server; + this.custom_commands = custom_commands; + this.custom_events = custom_events; + this.custom_middlewares = custom_middlewares; + this.hydrate_aliases = hydrate_aliases; + this.service_worker_url_includes = service_worker_url_includes; + this.service_worker_url_suffixes = service_worker_url_suffixes; + this.trust_service_worker_target = trust_service_worker_target; + this.require_service_worker_target = require_service_worker_target; + this.service_worker_ready_expression = service_worker_ready_expression; + this.launch_options = launch_options; + this.self = self; + + this.ws = null; + this.next_id = 1; + this.pending = new Map(); + this.ext_session_id = null; + this.ext_target_id = null; + this.extension_id = null; + this.latency = null; + this.connect_timing = null; + this.last_command_timing = null; + this.last_raw_timing = null; + this.event_schemas = new Map(); + this.command_params_schemas = new Map(); + this.command_result_schemas = new Map(); + this.self_event_listener_registered = false; + this.cdp_aliases_hydrated = false; + this.event_wait_cleanups = new Set(); + this.auto_target_sessions = new Map(); + this.auto_session_targets = new Map(); + this._prepared_extension = null; + this._launched = null; + + this._cdp = { + send: (method: string, params: ProtocolParams = {}, session_id: string | null = null) => + this._sendFrame(method, params, session_id, { record_raw_timing: true }) as Promise, + on: (event_name: string | symbol, listener: (...args: unknown[]) => void) => this.on(event_name, listener), + once: (event_name: string | symbol, listener: (...args: unknown[]) => void) => this.once(event_name, listener), + }; + this._hydrateCustomSurface(); + } + + async connect() { + const connect_started_at = Date.now(); + await this._hydrateCdpAliases(); + if (this.self && !this.cdp_url) { + this._ensureSelfEventListener(); + if (this.server !== null) await this.self.configure?.(this._serverConfigureParams()); + const connected_at = Date.now(); + this.connect_timing = { + started_at: connect_started_at, + connected_at, + duration_ms: connected_at - connect_started_at, + }; + return this; + } + if (!this.cdp_url) { + this.cdp_url = await liveWebSocketUrlFor(); + if (!this.cdp_url) { + if (typeof process !== "object" || !process?.versions?.node) { + throw new Error("CDPModClient requires cdp_url when running outside Node."); + } + const { launchChrome } = (await import(/* @vite-ignore */ runtimeModuleUrl("../../bridge/launcher.js"))) as { + launchChrome: ( + options: Record, + ) => Promise<{ wsUrl: string; close: () => Promise | void }>; + }; + this._launched = await launchChrome(this.launch_options); + this.cdp_url = this._launched.wsUrl; + } + } + const input_cdp_url = this.cdp_url; + const websocket_url = await webSocketUrlFor(this.cdp_url); + this.cdp_url = websocket_url; + if (this.server !== null && !Object.hasOwn(this.server, "loopback_cdp_url")) { + this.server = { ...this.server, loopback_cdp_url: this.cdp_url }; + } else if (this.server?.loopback_cdp_url) { + const loopback_url = this.server.loopback_cdp_url; + if (loopback_url === input_cdp_url || loopback_url === this.cdp_url) { + this.server = { ...this.server, loopback_cdp_url: this.cdp_url }; + } + } + + const ws = new WebSocket(websocket_url); + this.ws = ws; + ws.addEventListener("message", (event) => this._onMessage(event.data)); + ws.addEventListener("close", () => this._rejectAll(new Error("CDP websocket closed"))); + ws.addEventListener("error", () => this._rejectAll(new Error(`CDP websocket error`))); + await new Promise((resolve, reject) => { + ws.addEventListener("open", () => resolve(), { once: true }); + ws.addEventListener("error", reject, { once: true }); + }); + await Promise.all([ + this._sendFrame("Target.setAutoAttach", { + autoAttach: true, + waitForDebuggerOnStart: false, + flatten: true, + }), + this._sendFrame("Target.setDiscoverTargets", { discover: true }), + ]); + + const service_worker_url_suffixes = await this._serviceWorkerUrlSuffixes(); + const trust_service_worker_target = + this.trust_service_worker_target || + this.service_worker_url_includes.length > 0 || + service_worker_url_suffixes.some((suffix) => suffix.split("/").filter(Boolean).length > 1); + + let ext; + const extension_started_at = Date.now(); + const { injectExtensionIfNeeded } = (await import( + /* @vite-ignore */ runtimeModuleUrl("../../bridge/injector.js") + )) as typeof import("../../bridge/injector.js"); + this._prepared_extension = await this._prepareExtensionPath(); + ext = await injectExtensionIfNeeded({ + send: (method, params, session_id) => this._sendFrame(method, params, session_id) as Promise, + session_id_for_target: (target_id) => this.auto_target_sessions.get(target_id) ?? null, + extension_path: this._prepared_extension.path, + service_worker_url_includes: this.service_worker_url_includes, + service_worker_url_suffixes, + trust_matched_service_worker: trust_service_worker_target, + require_service_worker_target: this.require_service_worker_target, + service_worker_ready_expression: this.service_worker_ready_expression, + }); + const extension_completed_at = Date.now(); + this.extension_id = typeof ext.extension_id === "string" ? ext.extension_id : null; + this.ext_target_id = ext.target_id; + this.ext_session_id = ext.session_id; + this.event_schemas.set("Mod.pong", Mod.PongEvent); + + await Promise.all([ + this._sendFrame("Runtime.enable", {}, this.ext_session_id), + this._sendFrame("Runtime.addBinding", { name: bindingNameFor("Mod.pong") }, this.ext_session_id), + this._installCustomEventBindings(), + this.server === null + ? Promise.resolve() + : this._sendRaw( + wrapCommandIfNeeded("Mod.configure", this._serverConfigureParams(), { + routes: this.routes, + cdpSessionId: this.ext_session_id, + }), + ), + ]); + + void this._measurePingLatency().catch(() => {}); + const connected_at = Date.now(); + this.connect_timing = { + started_at: connect_started_at, + extension_source: ext.source, + extension_started_at, + extension_completed_at, + extension_duration_ms: extension_completed_at - extension_started_at, + connected_at, + duration_ms: connected_at - connect_started_at, + }; + return this; + } + + async send(method: string, params: unknown = {}) { + const started_at = Date.now(); + const command_params = this.command_params_schemas.get(method)?.parse(params ?? {}) ?? params ?? {}; + const command = wrapCommandIfNeeded(method, command_params as ProtocolParams, { + routes: this.routes, + cdpSessionId: this.ext_session_id, + }); + const result = await this._sendRaw(command); + const completed_at = Date.now(); + this.last_command_timing = { + method, + target: command.target, + started_at, + completed_at, + duration_ms: completed_at - started_at, + }; + return this.command_result_schemas.get(method)?.parse(result) ?? result; + } + + async _hydrateCdpAliases() { + if (!this.hydrate_aliases || this.cdp_aliases_hydrated) return; + const { createCdpAliases } = (await import( + /* @vite-ignore */ runtimeModuleUrl("../../types/aliases.js") + )) as typeof import("../../types/aliases.js"); + Object.assign( + this, + createCdpAliases((method, params) => this.send(method, params), { + onCustomCommand: (name, paramsSchema, resultSchema) => { + if (paramsSchema) this.command_params_schemas.set(name, paramsSchema); + if (resultSchema) this.command_result_schemas.set(name, resultSchema); + defineCustomCommandMethod(this, name); + }, + onCustomEvent: (name, eventSchema) => { + if (eventSchema) this.event_schemas.set(name, eventSchema); + }, + }), + ); + this.cdp_aliases_hydrated = true; + } + + _hydrateCustomSurface() { + for (const command of this.custom_commands) { + const name = normalizeCDPModName(command.name); + const paramsSchema = command.paramsSchema ? Mod.PayloadSchemaSpec.parse(command.paramsSchema) : null; + const resultSchema = command.resultSchema ? Mod.PayloadSchemaSpec.parse(command.resultSchema) : null; + const normalized_params_schema = paramsSchema == null ? null : this._normalizePayloadSchema(paramsSchema); + const normalized_result_schema = resultSchema == null ? null : this._normalizePayloadSchema(resultSchema); + if (normalized_params_schema) this.command_params_schemas.set(name, normalized_params_schema); + if (normalized_result_schema) this.command_result_schemas.set(name, normalized_result_schema); + defineCustomCommandMethod(this, name); + } + for (const event of this.custom_events) { + const name = normalizeCDPModName(event.name); + const eventSchema = event.eventSchema ? this._normalizePayloadSchema(event.eventSchema) : null; + if (eventSchema) this.event_schemas.set(name, eventSchema); + } + } + + _normalizePayloadSchema(schema: unknown) { + return normalizeCDPModPayloadSchema(Mod.PayloadSchemaSpec.parse(schema)); + } + + async _serviceWorkerUrlSuffixes() { + if (this.service_worker_url_suffixes != null) return this.service_worker_url_suffixes; + return ["/service_worker.js", "/background.js"]; + } + + _serverConfigureParams() { + return { + ...(this.server ?? {}), + custom_commands: this.custom_commands.filter(hasCommandExpression).map((command) => ({ + name: normalizeCDPModName(command.name), + expression: command.expression, + paramsSchema: null, + resultSchema: null, + })), + custom_events: this.custom_events.map((event) => ({ + name: normalizeCDPModName(event.name), + bindingName: bindingNameFor(normalizeCDPModName(event.name)), + eventSchema: null, + })), + custom_middlewares: this.custom_middlewares.map(({ name, phase, expression }) => ({ + ...(name == null ? {} : { name: normalizeCDPModName(name) }), + phase, + expression, + })), + }; + } + + async _prepareExtensionPath() { + if (this.extension_path.endsWith(".zip") && typeof process === "object" && process?.versions?.node) { + const nodeImport = new Function("specifier", "return import(specifier)") as (specifier: string) => Promise; + const [{ execFileSync }, fs, os, path] = await Promise.all( + ["node:child_process", "node:fs", "node:os", "node:path"].map(nodeImport), + ); + const unpacked_path = fs.mkdtempSync(path.join(os.tmpdir(), "cdpmod-extension-")); + execFileSync("unzip", ["-q", this.extension_path, "-d", unpacked_path]); + return { + path: unpacked_path, + close: async () => fs.rmSync(unpacked_path, { recursive: true, force: true }), + }; + } + return { path: this.extension_path, close: async () => {} }; + } + + async _installCustomEventBindings() { + await Promise.all( + this.custom_events.map((event) => + this._sendFrame( + "Runtime.addBinding", + { name: bindingNameFor(normalizeCDPModName(event.name)) }, + this.ext_session_id, + ), + ), + ); + } + + async close() { + for (const cleanup of this.event_wait_cleanups) cleanup(); + this.event_wait_cleanups.clear(); + try { + this.ws?.close(); + } catch {} + if (this._prepared_extension) await this._prepared_extension.close(); + this._prepared_extension = null; + if (this._launched) await this._launched.close(); + } + + on(event_name: CDPModEventNameInput, listener: (...args: unknown[]) => void) { + if (typeof event_name !== "string" && typeof event_name !== "symbol") { + const name = normalizeCDPModName(event_name); + this.event_schemas.set(name, event_name); + return super.on(name, listener); + } + return super.on(typeof event_name === "symbol" ? event_name : normalizeCDPModName(event_name), listener); + } + + once(event_name: CDPModEventNameInput, listener: (...args: unknown[]) => void) { + if (typeof event_name !== "string" && typeof event_name !== "symbol") { + const name = normalizeCDPModName(event_name); + this.event_schemas.set(name, event_name); + return super.once(name, listener); + } + return super.once(typeof event_name === "symbol" ? event_name : normalizeCDPModName(event_name), listener); + } + + off(event_name: CDPModEventNameInput, listener: (...args: unknown[]) => void) { + if (typeof event_name !== "string" && typeof event_name !== "symbol") { + return super.off(normalizeCDPModName(event_name), listener); + } + return super.off(typeof event_name === "symbol" ? event_name : normalizeCDPModName(event_name), listener); + } + + _waitForEvent(event_name: CDPModEventNameInput, { timeout_ms = 10_000 }: { timeout_ms?: number } = {}) { + let settled = false; + let timeout: ReturnType | null = null; + let cancel: () => void = () => {}; + let listener: (...args: unknown[]) => void = () => {}; + const promise = new Promise((resolve) => { + const cleanup = () => { + if (timeout != null) clearTimeout(timeout); + timeout = null; + this.off(event_name, listener); + this.event_wait_cleanups.delete(cancel); + }; + const finish = (value: unknown) => { + if (settled) return; + settled = true; + cleanup(); + resolve(value); + }; + cancel = () => finish(null); + listener = (payload) => finish(payload || {}); + this.event_wait_cleanups.add(cancel); + this.on(event_name, listener); + timeout = setTimeout(() => finish(null), timeout_ms); + }); + return { promise, cancel }; + } + + async _measurePingLatency() { + const sentAt = Date.now(); + const pong = this._waitForEvent("Mod.pong"); + try { + await this.send("Mod.ping", { sentAt }); + const payload = (await pong.promise) as CDPModPongEvent | null; + if (payload == null) return this.latency; + const returnedAt = Date.now(); + this.latency = { + sentAt, + receivedAt: payload.receivedAt ?? null, + returnedAt, + roundTripMs: returnedAt - sentAt, + serviceWorkerMs: typeof payload.receivedAt === "number" ? payload.receivedAt - sentAt : null, + returnPathMs: typeof payload.receivedAt === "number" ? returnedAt - payload.receivedAt : null, + }; + return this.latency; + } finally { + pong.cancel(); + } + } + + async _sendRaw(command: TranslatedCommand) { + if (command.target === "direct_cdp") { + const [step] = command.steps; + return this._sendFrame(step.method, step.params ?? {}) as Promise; + } + if (command.target === "self") { + if (!this.self) throw new Error(`CDPModClient self route requires a self server.`); + this._ensureSelfEventListener(); + const [step] = command.steps; + const cdp_session_id = + ((step.params as CDPModCustomPayload | undefined)?.cdpSessionId as string | undefined) ?? this.ext_session_id; + return await this.self.handleCommand(step.method, step.params ?? {}, cdp_session_id ?? null); + } + if (command.target !== "service_worker") { + throw new Error(`Unsupported command target "${command.target}"`); + } + + let result: ProtocolResult = {}; + let unwrap = null; + for (const step of command.steps) { + result = (await this._sendFrame(step.method, step.params ?? {}, this.ext_session_id)) as ProtocolResult; + unwrap = step.unwrap ?? null; + } + return unwrapResponseIfNeeded(result, unwrap); + } + + _ensureSelfEventListener() { + if (!this.self || this.self_event_listener_registered) return; + this.self.addEventListener?.((event, data, cdp_session_id) => { + this.emit(event, this.event_schemas.get(event)?.parse(data) ?? data, cdp_session_id); + }); + this.self_event_listener_registered = true; + } + + _sendFrame( + method: string, + params: ProtocolParams = {}, + session_id: string | null = null, + options: { record_raw_timing?: boolean } = {}, + ) { + if (!this.ws) return Promise.reject(new Error("CDP websocket is not connected.")); + const id = this.next_id++; + const started_at = Date.now(); + const message: CdpCommandFrame = { id, method, params }; + if (session_id) message.sessionId = session_id; + return new Promise((resolve, reject) => { + this.pending.set(id, { + method, + resolve: (value: ProtocolResult) => { + if (options.record_raw_timing) { + const completed_at = Date.now(); + this.last_raw_timing = { + method, + started_at, + completed_at, + duration_ms: completed_at - started_at, + }; + } + resolve(value); + }, + reject, + }); + this.ws?.send(JSON.stringify(message)); + }); + } + + _rejectAll(error: Error) { + for (const pending of this.pending.values()) pending.reject(error); + this.pending.clear(); + } + + _onMessage(buf: unknown) { + let msg: CdpResponseFrame | CdpEventFrame; + try { + const parsed = JSON.parse(typeof buf === "string" ? buf : String(buf)); + msg = "id" in parsed ? CdpResponseFrameSchema.parse(parsed) : CdpEventFrameSchema.parse(parsed); + } catch { + return; + } + if ("id" in msg && typeof msg.id === "number") { + const response = CdpResponseFrameSchema.parse(msg); + const pending = this.pending.get(response.id); + if (!pending) return; + this.pending.delete(response.id); + if (response.error) { + const err = new Error(`${pending.method} failed: ${response.error.message}`) as Error & { cdp?: CdpError }; + err.cdp = response.error; + pending.reject(err); + } else { + pending.resolve(response.result || {}); + } + return; + } + const event = CdpEventFrameSchema.parse(msg); + if (event.method === "Target.attachedToTarget") { + const params = (event.params || {}) as Record; + const session_id = typeof params.sessionId === "string" ? params.sessionId : null; + const target_info = + params.targetInfo && typeof params.targetInfo === "object" + ? (params.targetInfo as Record) + : null; + const target_id = typeof target_info?.targetId === "string" ? target_info.targetId : null; + if (session_id && target_id) { + this.auto_target_sessions.set(target_id, session_id); + this.auto_session_targets.set(session_id, target_info as Record); + } + } else if (event.method === "Target.detachedFromTarget") { + const params = (event.params || {}) as Record; + const session_id = typeof params.sessionId === "string" ? params.sessionId : null; + if (session_id) { + const target_info = this.auto_session_targets.get(session_id); + const target_id = typeof target_info?.targetId === "string" ? target_info.targetId : null; + if (target_id) this.auto_target_sessions.delete(target_id); + this.auto_session_targets.delete(session_id); + } + } + if (event.sessionId === this.ext_session_id) { + if (event.method !== "Runtime.bindingCalled") return; + const u = unwrapEventIfNeeded( + event.method, + (event.params || {}) as RuntimeBindingCalledEvent, + event.sessionId || null, + this.ext_session_id, + ); + if (u) this.emit(u.event, this.event_schemas.get(u.event)?.parse(u.data) ?? u.data); + return; + } + if (event.method) { + this.emit( + event.method, + this.event_schemas.get(event.method)?.parse(event.params || {}) ?? event.params ?? {}, + event.sessionId || null, + ); + } + } +} + +export interface CDPModClient extends CdpAliases {} diff --git a/client/js/MagicCDPClient.ts b/client/js/MagicCDPClient.ts deleted file mode 100644 index eded0e9..0000000 --- a/client/js/MagicCDPClient.ts +++ /dev/null @@ -1,355 +0,0 @@ -// MagicCDPClient (JS): importable, no CLI, no demo code. -// -// Constructor parameter names match across JS / Python / Go ports: -// cdp_url upstream CDP URL (string, default null -> try localhost:9222, -// then autolaunch) -// extension_path extension directory (string, default ../../extension) -// routes client-side routing dict (default { "Magic.*": "service_worker", -// "Custom.*": "service_worker", "*.*": "direct_cdp" }) -// server { loopback_cdp_url?, routes? } passed to MagicCDPServer.configure -// launch_options forwarded to launcher.launchChrome when autolaunching -// -// Public methods: connect, send(method, params), on(event, handler), close. - -// oxlint-disable typescript-eslint/no-unsafe-declaration-merging -- alias members are assigned in the constructor. -import { EventEmitter } from "node:events"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import WebSocket from "ws"; -import type { RawData } from "ws"; -import type { z } from "zod"; - -import { launchChrome } from "../../bridge/launcher.js"; -import { injectExtensionIfNeeded } from "../../bridge/injector.js"; -import { createCdpAliases } from "../../types/aliases.js"; -import type { CdpAliases } from "../../types/aliases.js"; -import { - bindingNameFor, - DEFAULT_CLIENT_ROUTES, - wrapCommandIfNeeded, - unwrapResponseIfNeeded, - unwrapEventIfNeeded, -} from "../../bridge/translate.js"; -import type { - CdpCommandFrame, - CdpError, - CdpEventFrame, - CdpResponseFrame, - MagicConfigureParams, - MagicPingLatency, - MagicPongEvent, - MagicRoutes, - ProtocolParams, - ProtocolResult, - TranslatedCommand, -} from "../../types/magic.js"; -import { CdpEventFrameSchema, CdpResponseFrameSchema, Magic, normalizeMagicName } from "../../types/magic.js"; -import { events } from "../../types/zod.js"; - -const HERE = path.dirname(fileURLToPath(import.meta.url)); -const DEFAULT_EXTENSION_PATH = path.resolve(HERE, "..", "..", "extension"); -const DEFAULT_LIVE_CDP_URL = "http://127.0.0.1:9222"; - -type PendingCommand = { - method: string; - resolve: (value: ProtocolResult) => void; - reject: (error: Error) => void; -}; -type ClientOptions = { - cdp_url?: string | null; - extension_path?: string; - routes?: MagicRoutes; - server?: MagicConfigureParams | null; - launch_options?: Parameters[0]; -}; - -async function webSocketUrlFor(endpoint: string, name = "cdp_url") { - if (/^wss?:\/\//i.test(endpoint)) return endpoint; - const response = await fetch(`${endpoint}/json/version`); - if (!response.ok) { - if (response.status === 404) { - const url = new URL(endpoint); - url.protocol = url.protocol === "https:" ? "wss:" : "ws:"; - url.pathname = "/devtools/browser"; - url.search = ""; - url.hash = ""; - return url.toString(); - } - throw new Error(`GET ${endpoint}/json/version -> ${response.status}`); - } - const { webSocketDebuggerUrl } = await response.json(); - if (!webSocketDebuggerUrl) throw new Error(`${name} HTTP discovery returned no webSocketDebuggerUrl`); - return webSocketDebuggerUrl; -} - -async function liveWebSocketUrlFor(endpoint = DEFAULT_LIVE_CDP_URL) { - try { - return await webSocketUrlFor(endpoint, "live_cdp_url"); - } catch { - return null; - } -} - -export class MagicCDPClient extends EventEmitter { - cdp_url: string | null; - extension_path: string; - routes: MagicRoutes; - server: MagicConfigureParams | null; - launch_options: Parameters[0]; - ws: WebSocket | null; - next_id: number; - pending: Map; - ext_session_id: string | null; - ext_target_id: string | null; - extension_id: string | null; - latency: MagicPingLatency | null; - event_schemas: Map; - command_params_schemas: Map; - command_result_schemas: Map; - _launched: Awaited> | null; - - constructor({ - cdp_url = null, - extension_path = DEFAULT_EXTENSION_PATH, - routes = DEFAULT_CLIENT_ROUTES, - server = {}, - launch_options = {}, - }: ClientOptions = {}) { - super(); - this.cdp_url = cdp_url; - this.extension_path = extension_path; - this.routes = { ...DEFAULT_CLIENT_ROUTES, ...routes }; - this.server = server; - this.launch_options = launch_options; - - this.ws = null; - this.next_id = 1; - this.pending = new Map(); - this.ext_session_id = null; - this.ext_target_id = null; - this.extension_id = null; - this.latency = null; - this.event_schemas = new Map(); - this.command_params_schemas = new Map(); - this.command_result_schemas = new Map(); - this._launched = null; - - Object.assign( - this, - createCdpAliases((method, params) => this.send(method, params), { - onCustomCommand: (name, paramsSchema, resultSchema) => { - if (paramsSchema) this.command_params_schemas.set(name, paramsSchema); - if (resultSchema) this.command_result_schemas.set(name, resultSchema); - }, - onCustomEvent: (name, eventSchema) => { - if (eventSchema) this.event_schemas.set(name, eventSchema); - }, - }), - ); - } - - async connect() { - if (!this.cdp_url) { - this.cdp_url = await liveWebSocketUrlFor(); - if (!this.cdp_url) { - this._launched = await launchChrome(this.launch_options); - this.cdp_url = this._launched.wsUrl; - } - } - const inputCdpUrl = this.cdp_url; - this.cdp_url = await webSocketUrlFor(this.cdp_url); - if (this.server !== null && !Object.hasOwn(this.server, "loopback_cdp_url")) { - this.server = { ...this.server, loopback_cdp_url: this.cdp_url }; - } else if (this.server?.loopback_cdp_url) { - const loopbackUrl = this.server.loopback_cdp_url; - if (loopbackUrl === inputCdpUrl || loopbackUrl === this.cdp_url) { - this.server = { ...this.server, loopback_cdp_url: this.cdp_url }; - } - } - - this.ws = new WebSocket(this.cdp_url, { origin: undefined }); - this.ws.on("message", (data) => this._onMessage(data)); - this.ws.on("close", () => this._rejectAll(new Error("CDP websocket closed"))); - this.ws.on("error", () => this._rejectAll(new Error(`CDP websocket error`))); - await new Promise((resolve, reject) => { - this.ws.once("open", resolve); - this.ws.once("error", reject); - }); - - let ext; - try { - ext = await injectExtensionIfNeeded({ - send: (method, params, sessionId) => this._sendFrame(method, params, sessionId), - extensionPath: this.extension_path, - }); - } catch (error) { - const html = `Enable MagicCDP

Enable MagicCDP

A MagicCDP client has connected, but was unable to set up the extra Magic.* commands because extension installation over CDP is only allowed in Chrome Canary or Chromium. Google Chrome users must install the extension manually and use chrome://inspect/#remote-debugging to open CDP.

  1. Download Chrome Canary or Chromium instead. MagicCDP can auto-launch these for you.
  2. Connect to any remote Chrome launched with:
    --remote-debugging-address=127.0.0.1
    ---remote-debugging-port=9222
    ---enable-unsafe-extension-debugging
    ---remote-allow-origins=*
  3. Install the extension manually via chrome://extensions/ > Developer mode > Load unpacked > magiccdp.zip
    ${this.extension_path}
`; - try { - const { targetId } = (await this._sendFrame("Target.createTarget", { url: "about:blank" })) as any; - const { sessionId } = (await this._sendFrame("Target.attachToTarget", { - targetId, - flatten: true, - })) as any; - await this._sendFrame( - "Runtime.evaluate", - { - expression: `document.open();document.write(${JSON.stringify(html)});document.close();`, - returnByValue: true, - }, - sessionId as string, - ); - await this._sendFrame("Page.bringToFront", {}, sessionId as string); - await this._sendFrame("Target.detachFromTarget", { sessionId }); - } catch {} - throw error; - } - this.extension_id = ext.extensionId; - this.ext_target_id = ext.targetId; - this.ext_session_id = ext.sessionId; - await this._sendFrame("Runtime.enable", {}, this.ext_session_id); - await this._sendFrame("Runtime.addBinding", { name: bindingNameFor("Magic.pong") }, this.ext_session_id); - this.event_schemas.set("Magic.pong", Magic.PongEvent); - - if (this.server !== null) { - await this._sendRaw( - wrapCommandIfNeeded("Magic.configure", this.server, { - routes: this.routes, - cdpSessionId: this.ext_session_id, - }), - ); - } - - await this._measurePingLatency(); - return this; - } - - async send(method: string, params: unknown = {}) { - const commandParams = this.command_params_schemas.get(method)?.parse(params ?? {}) ?? params ?? {}; - const result = await this._sendRaw( - wrapCommandIfNeeded(method, commandParams as ProtocolParams, { - routes: this.routes, - cdpSessionId: this.ext_session_id, - }), - ); - return this.command_result_schemas.get(method)?.parse(result) ?? result; - } - - async close() { - try { - await this._sendFrame("Target.detachFromTarget", { sessionId: this.ext_session_id }); - } catch {} - try { - this.ws?.close(); - } catch {} - if (this._launched) await this._launched.close(); - } - - on(eventName, listener) { - return super.on(typeof eventName === "symbol" ? eventName : normalizeMagicName(eventName), listener); - } - - once(eventName, listener) { - return super.once(typeof eventName === "symbol" ? eventName : normalizeMagicName(eventName), listener); - } - - async _measurePingLatency() { - const sentAt = Date.now(); - const pong = new Promise((resolve, reject) => { - const timeout = setTimeout(() => reject(new Error("Magic.pong timed out")), 10_000); - this.once("Magic.pong", (payload) => { - clearTimeout(timeout); - resolve(payload || {}); - }); - }); - await this.send("Magic.ping", { sentAt }); - const payload = (await pong) as MagicPongEvent; - const returnedAt = Date.now(); - this.latency = { - sentAt, - receivedAt: payload.receivedAt ?? null, - returnedAt, - roundTripMs: returnedAt - sentAt, - serviceWorkerMs: typeof payload.receivedAt === "number" ? payload.receivedAt - sentAt : null, - returnPathMs: typeof payload.receivedAt === "number" ? returnedAt - payload.receivedAt : null, - }; - return this.latency; - } - - async _sendRaw(command: TranslatedCommand) { - if (command.target === "direct_cdp") { - const [step] = command.steps; - return this._sendFrame(step.method, step.params ?? {}); - } - if (command.target !== "service_worker") { - throw new Error(`Unsupported command target "${command.target}"`); - } - - let result = {}; - let unwrap = null; - for (const step of command.steps) { - result = await this._sendFrame(step.method, step.params ?? {}, this.ext_session_id); - unwrap = step.unwrap ?? null; - } - return unwrapResponseIfNeeded(result, unwrap); - } - - _sendFrame(method: string, params: ProtocolParams = {}, sessionId: string | null = null) { - const id = this.next_id++; - const message: CdpCommandFrame = { id, method, params }; - if (sessionId) message.sessionId = sessionId; - return new Promise((resolve, reject) => { - this.pending.set(id, { method, resolve, reject }); - this.ws?.send(JSON.stringify(message)); - }); - } - - _rejectAll(error: Error) { - for (const pending of this.pending.values()) pending.reject(error); - this.pending.clear(); - } - - _onMessage(buf: string | RawData) { - let msg: CdpResponseFrame | CdpEventFrame; - try { - const parsed = JSON.parse(typeof buf === "string" ? buf : buf.toString()); - msg = "id" in parsed ? CdpResponseFrameSchema.parse(parsed) : CdpEventFrameSchema.parse(parsed); - } catch { - return; - } - if ("id" in msg && typeof msg.id === "number") { - const response = CdpResponseFrameSchema.parse(msg); - const pending = this.pending.get(response.id); - if (!pending) return; - this.pending.delete(response.id); - if (response.error) { - const err = new Error(`${pending.method} failed: ${response.error.message}`) as Error & { cdp?: CdpError }; - err.cdp = response.error; - pending.reject(err); - } else { - pending.resolve(response.result || {}); - } - return; - } - const event = CdpEventFrameSchema.parse(msg); - if (event.sessionId === this.ext_session_id) { - if (event.method !== "Runtime.bindingCalled") return; - const u = unwrapEventIfNeeded( - event.method, - events["Runtime.bindingCalled"].parse(event.params || {}), - event.sessionId || null, - this.ext_session_id, - ); - if (u) this.emit(u.event, this.event_schemas.get(u.event)?.parse(u.data) ?? u.data); - return; - } - if (event.method) { - const schema = (events as Record)[event.method]; - this.emit(event.method, schema?.parse(event.params || {}) ?? event.params ?? {}, event.sessionId || null); - } - } -} - -export interface MagicCDPClient extends CdpAliases {} diff --git a/client/js/demo.ts b/client/js/demo.ts index 239bbf7..338db35 100644 --- a/client/js/demo.ts +++ b/client/js/demo.ts @@ -1,6 +1,6 @@ -// JS demo for MagicCDPClient with --direct / --loopback / --debugger modes. +// JS demo for CDPModClient with --direct / --loopback / --debugger modes. // -// Modes select where non-Magic CDP commands ultimately get serviced: +// Modes select where non-CDPMod commands ultimately get serviced: // --live use the running Google Chrome enabled via chrome://inspect. // --direct client sends standard CDP straight to the upstream WS. // --loopback client routes *.* through the extension service worker, @@ -13,7 +13,7 @@ // on server.) // // All three modes exercise the same surface: raw Browser.getVersion, raw -// Target.targetCreated event handling, Magic.evaluate, Custom.* commands, +// Target.targetCreated event handling, Mod.evaluate, Custom.* commands, // Custom.* events, and response middleware. import path from "node:path"; @@ -25,8 +25,11 @@ import { createInterface } from "node:readline/promises"; import { spawn } from "node:child_process"; import { z } from "zod"; -import { MagicCDPClient } from "./MagicCDPClient.js"; -import { launchChrome } from "../../bridge/launcher.js"; +import { CDPModClient } from "./CDPModClient.js"; + +type TargetCreatedPayload = { + targetInfo?: { targetId?: string } & Record; +}; const HERE = path.dirname(fileURLToPath(import.meta.url)); const EXTENSION_PATH = @@ -49,7 +52,15 @@ function parseArgs(argv) { return { mode, live }; } -function clientOptionsFor(mode, cdp_url) { +function serverRoutesFor(mode) { + return { + "Mod.*": "service_worker", + "Custom.*": "service_worker", + "*.*": mode === "loopback" ? "loopback_cdp" : mode === "debugger" ? "chrome_debugger" : "auto", + }; +} + +function clientOptionsFor(mode, cdp_url, launch_options = {}) { const directNormalEventRoutes = { "Target.setDiscoverTargets": "direct_cdp", "Target.createTarget": "direct_cdp", @@ -59,8 +70,9 @@ function clientOptionsFor(mode, cdp_url) { return { cdp_url, extension_path: EXTENSION_PATH, + launch_options, routes: { - "Magic.*": "service_worker", + "Mod.*": "service_worker", "Custom.*": "service_worker", "*.*": "direct_cdp", ...directNormalEventRoutes, @@ -70,23 +82,49 @@ function clientOptionsFor(mode, cdp_url) { return { cdp_url, extension_path: EXTENSION_PATH, + launch_options, routes: { - "Magic.*": "service_worker", + "Mod.*": "service_worker", "Custom.*": "service_worker", "*.*": "service_worker", ...directNormalEventRoutes, }, server: { - routes: { - "Magic.*": "service_worker", - "Custom.*": "service_worker", - "*.*": mode === "loopback" ? "loopback_cdp" : "chrome_debugger", - }, - loopback_cdp_url: mode === "loopback" ? cdp_url : null, + routes: serverRoutesFor(mode), + ...(mode === "loopback" && cdp_url ? { loopback_cdp_url: cdp_url } : {}), }, }; } +function assertObject(value, label) { + if (!value || typeof value !== "object" || Array.isArray(value)) { + throw new Error(`${label} returned non-object value ${JSON.stringify(value)}`); + } + return value; +} + +function isTargetCreatedPayload(value: unknown): value is TargetCreatedPayload { + if (value == null || typeof value !== "object" || Array.isArray(value)) return false; + const targetInfo = (value as Record).targetInfo; + return targetInfo == null || (typeof targetInfo === "object" && !Array.isArray(targetInfo)); +} + +async function waitForEvent(cdp, eventName, predicate = (_payload) => true, timeoutMs = 3000) { + return await new Promise((resolve, reject) => { + const timeout = setTimeout(() => { + cdp.off(eventName, onEvent); + reject(new Error(`timed out waiting for ${eventName}`)); + }, timeoutMs); + const onEvent = (payload) => { + if (!predicate(payload)) return; + clearTimeout(timeout); + cdp.off(eventName, onEvent); + resolve(payload); + }; + cdp.on(eventName, onEvent); + }); +} + function openLiveInspectPage() { if (process.platform === "darwin") { spawn("open", ["chrome://inspect/#remote-debugging"], { detached: true, stdio: "ignore" }).unref(); @@ -134,88 +172,151 @@ async function main() { throw new Error(`Built extension not found at ${EXTENSION_PATH}. Run pnpm run build first.`); } - let chrome = null; let cdpUrl; + let launch_options = {}; if (live) { cdpUrl = await waitForLiveCdpUrl(); } else { - // --load-extension is a workaround for builds where Extensions.loadUnpacked - // is unavailable (e.g. Playwright-bundled chromium). On Chrome Canary you - // can drop extraFlags entirely and the injector will install the extension - // over CDP itself. - chrome = await launchChrome({ + cdpUrl = null; + launch_options = { headless: process.platform === "linux", - noSandbox: process.platform === "linux", - extraFlags: [`--load-extension=${EXTENSION_PATH}`], - }); - cdpUrl = chrome.wsUrl; + sandbox: process.platform !== "linux", + extra_args: [`--load-extension=${EXTENSION_PATH}`], + }; } - console.log("upstream cdp:", cdpUrl); - const cdp = new MagicCDPClient(clientOptionsFor(mode, cdpUrl)); + const cdp = new CDPModClient(clientOptionsFor(mode, cdpUrl, launch_options)); const foregroundEvents = []; - const targetCreatedEvents = []; - cdp.on(cdp.Target.targetCreated, (payload) => { - console.log("Target.targetCreated ->", payload?.targetInfo?.targetId); - targetCreatedEvents.push(payload); - }); + const targetCreatedEvents: TargetCreatedPayload[] = []; try { await cdp.connect(); + console.log("upstream cdp:", cdp.cdp_url); + cdp.on(cdp.Target.targetCreated, (payload) => { + const event = isTargetCreatedPayload(payload) ? payload : {}; + console.log("Target.targetCreated ->", event.targetInfo?.targetId); + targetCreatedEvents.push(event); + }); console.log("connected; ext", cdp.extension_id, "session", cdp.ext_session_id); console.log("ping latency ->", cdp.latency); - // standard CDP route differs per mode. --direct goes straight to the - // upstream WS. --loopback comes back into the browser via a verified - // ws://localhost:9222. --debugger goes through chrome.debugger which is - // tab-scoped and rejects browser-level methods like Browser.getVersion -- - // expected, just report. - try { - console.log("Browser.getVersion ->", await cdp.Browser.getVersion()); - } catch (e) { - console.log("Browser.getVersion -> (rejected by route:", e.message.replace(/\n/g, " "), ")"); + const configureResult = assertObject( + await cdp.Mod.configure({ + routes: serverRoutesFor(mode), + ...(mode === "loopback" ? { loopback_cdp_url: cdp.cdp_url } : {}), + }), + "Mod.configure", + ); + if (configureResult.routes?.["*.*"] !== serverRoutesFor(mode)["*.*"]) { + throw new Error(`unexpected Mod.configure result ${JSON.stringify(configureResult)}`); } + console.log("Mod.configure ->", configureResult.routes); - const magicEval = (await cdp.Magic.evaluate({ expression: "({ extensionId: chrome.runtime.id })" })) as { + const pingSentAt = Date.now(); + const pongPromise = waitForEvent(cdp, "Mod.pong", (event) => event?.sentAt === pingSentAt); + const pingResult = assertObject(await cdp.Mod.ping({ sentAt: pingSentAt }), "Mod.ping"); + const pong = assertObject(await pongPromise, "Mod.pong"); + if (pingResult.ok !== true || pong.receivedAt == null || pong.from !== "extension-service-worker") { + throw new Error(`unexpected Mod.ping/Mod.pong result ${JSON.stringify({ pingResult, pong })}`); + } + console.log("Mod.ping/pong ->", { pingResult, pong }); + + // Browser.getVersion is browser-scoped and chrome.debugger is tab-scoped, + // so debugger mode asserts a positive raw CDP Runtime.evaluate instead. + if (mode === "debugger") { + try { + const version = assertObject(await cdp.Browser.getVersion(), "Browser.getVersion"); + if (typeof version.protocolVersion !== "string" || typeof version.product !== "string") { + throw new Error(`unexpected Browser.getVersion result ${JSON.stringify(version)}`); + } + console.log("Browser.getVersion ->", version); + } catch (e) { + console.log("Browser.getVersion -> (debugger route rejected:", e.message.replace(/\n/g, " "), ")"); + } + const runtimeEval = assertObject( + await cdp.Runtime.evaluate({ expression: "(() => 42)()", returnByValue: true }), + "Runtime.evaluate", + ); + if (runtimeEval.result?.value !== 42) + throw new Error(`unexpected Runtime.evaluate result ${JSON.stringify(runtimeEval)}`); + console.log("Runtime.evaluate ->", runtimeEval); + } else { + const version = assertObject(await cdp.Browser.getVersion(), "Browser.getVersion"); + if (typeof version.protocolVersion !== "string" || typeof version.product !== "string") { + throw new Error(`unexpected Browser.getVersion result ${JSON.stringify(version)}`); + } + console.log("Browser.getVersion ->", version); + } + + const cdpmodEval = (await cdp.Mod.evaluate({ expression: "({ extensionId: chrome.runtime.id })" })) as { extensionId?: string; }; - if (magicEval.extensionId !== cdp.extension_id) - throw new Error(`unexpected Magic.evaluate result ${JSON.stringify(magicEval)}`); - console.log("Magic.evaluate ->", magicEval); - - await cdp.Magic.addCustomCommand({ - name: "Custom.TabIdFromTargetId", - paramsSchema: { - targetId: cdp.types.zod.Target.TargetID, - }, - resultSchema: { - tabId: z.number().nullable(), - }, - expression: `async ({ targetId }) => { + if (cdpmodEval.extensionId !== cdp.extension_id) + throw new Error(`unexpected Mod.evaluate result ${JSON.stringify(cdpmodEval)}`); + console.log("Mod.evaluate ->", cdpmodEval); + + const echoRegistration = assertObject( + await cdp.Mod.addCustomCommand({ + name: "Custom.echo", + expression: `async (params, method) => ({ echoed: params.value, method })`, + }), + "Mod.addCustomCommand Custom.echo", + ); + if (echoRegistration.registered !== true || echoRegistration.name !== "Custom.echo") { + throw new Error(`unexpected Custom.echo registration ${JSON.stringify(echoRegistration)}`); + } + const echoResult = assertObject(await cdp.send("Custom.echo", { value: "custom-command-ok" }), "Custom.echo"); + if (echoResult.echoed !== "custom-command-ok" || echoResult.method !== "Custom.echo") { + throw new Error(`unexpected Custom.echo result ${JSON.stringify(echoResult)}`); + } + console.log("Custom.echo ->", echoResult); + + const tabCommandRegistration = assertObject( + await cdp.Mod.addCustomCommand({ + name: "Custom.TabIdFromTargetId", + paramsSchema: { + targetId: cdp.types.zod.Target.TargetID, + }, + resultSchema: { + tabId: z.number().nullable(), + }, + expression: `async ({ targetId }) => { const targets = await chrome.debugger.getTargets(); const target = targets.find(target => target.id === targetId); return { tabId: target?.tabId ?? null }; }`, - }); - await cdp.Magic.addCustomCommand({ - name: "Custom.targetIdFromTabId", - paramsSchema: { - tabId: z.number(), - }, - resultSchema: { - targetId: cdp.types.zod.Target.TargetID.nullable(), - tabId: z.number().optional(), - }, - expression: `async ({ tabId }) => { + }), + "Mod.addCustomCommand Custom.TabIdFromTargetId", + ); + if (tabCommandRegistration.registered !== true) { + throw new Error(`unexpected TabIdFromTargetId registration ${JSON.stringify(tabCommandRegistration)}`); + } + const targetCommandRegistration = assertObject( + await cdp.Mod.addCustomCommand({ + name: "Custom.targetIdFromTabId", + paramsSchema: { + tabId: z.number(), + }, + resultSchema: { + targetId: cdp.types.zod.Target.TargetID.nullable(), + tabId: z.number().optional(), + }, + expression: `async ({ tabId }) => { const targets = await chrome.debugger.getTargets(); const target = targets.find(target => target.type === "page" && target.tabId === tabId); return { targetId: target?.id ?? null }; }`, - }); - await cdp.Magic.addMiddleware({ - name: "*", - phase: cdp.RESPONSE, - expression: `async (payload, next) => { + }), + "Mod.addCustomCommand Custom.targetIdFromTabId", + ); + if (targetCommandRegistration.registered !== true) { + throw new Error(`unexpected targetIdFromTabId registration ${JSON.stringify(targetCommandRegistration)}`); + } + const responseMiddlewareRegistration = assertObject( + await cdp.Mod.addMiddleware({ + name: "*", + phase: cdp.RESPONSE, + expression: `async (payload, next) => { const seen = new WeakSet(); const visit = async value => { if (!value || typeof value !== "object" || seen.has(value)) return; @@ -229,11 +330,18 @@ async function main() { await visit(payload); return next(payload); }`, - }); - await cdp.Magic.addMiddleware({ - name: "*", - phase: cdp.EVENT, - expression: `async (payload, next) => { + }), + "Mod.addMiddleware response", + ); + if (responseMiddlewareRegistration.registered !== true || responseMiddlewareRegistration.phase !== cdp.RESPONSE) { + throw new Error(`unexpected response middleware registration ${JSON.stringify(responseMiddlewareRegistration)}`); + } + + const eventMiddlewareRegistration = assertObject( + await cdp.Mod.addMiddleware({ + name: "*", + phase: cdp.EVENT, + expression: `async (payload, next) => { const seen = new WeakSet(); const visit = async value => { if (!value || typeof value !== "object" || seen.has(value)) return; @@ -247,7 +355,31 @@ async function main() { await visit(payload); return next(payload); }`, - }); + }), + "Mod.addMiddleware event", + ); + if (eventMiddlewareRegistration.registered !== true || eventMiddlewareRegistration.phase !== cdp.EVENT) { + throw new Error(`unexpected event middleware registration ${JSON.stringify(eventMiddlewareRegistration)}`); + } + + const demoEventRegistration = assertObject( + await cdp.Mod.addCustomEvent({ name: "Custom.demoEvent" }), + "Mod.addCustomEvent Custom.demoEvent", + ); + if (demoEventRegistration.registered !== true || demoEventRegistration.name !== "Custom.demoEvent") { + throw new Error(`unexpected Custom.demoEvent registration ${JSON.stringify(demoEventRegistration)}`); + } + const demoEventPromise = waitForEvent(cdp, "Custom.demoEvent", (event) => event?.value === "custom-event-ok"); + const emitResult = assertObject( + await cdp.Mod.evaluate({ + expression: `async () => await CDPMod.emit("Custom.demoEvent", { value: "custom-event-ok" })`, + }), + "Custom.demoEvent emit", + ); + if (emitResult.emitted !== true) + throw new Error(`unexpected Custom.demoEvent emit result ${JSON.stringify(emitResult)}`); + const demoEvent = assertObject(await demoEventPromise, "Custom.demoEvent"); + console.log("Custom.demoEvent ->", demoEvent); const ForegroundTargetChanged = z .object({ @@ -257,12 +389,18 @@ async function main() { }) .passthrough() .meta({ id: "Custom.foregroundTargetChanged" }); - await cdp.Magic.addCustomEvent(ForegroundTargetChanged); + const foregroundEventRegistration = assertObject( + await cdp.Mod.addCustomEvent(ForegroundTargetChanged), + "Mod.addCustomEvent Custom.foregroundTargetChanged", + ); + if (foregroundEventRegistration.registered !== true) { + throw new Error(`unexpected foreground event registration ${JSON.stringify(foregroundEventRegistration)}`); + } cdp.on(ForegroundTargetChanged, (event) => { console.log("Custom.foregroundTargetChanged ->", event); foregroundEvents.push(event); }); - await cdp.Magic.evaluate({ + await cdp.Mod.evaluate({ expression: `chrome.tabs.onActivated.addListener(async ({ tabId }) => { const targets = await chrome.debugger.getTargets(); const target = targets.find(target => target.type === "page" && target.tabId === tabId); @@ -272,7 +410,7 @@ async function main() { }); await cdp.Target.setDiscoverTargets({ discover: true }); - const createdTarget = await cdp.Target.createTarget({ url: "https://example.com" }); + const createdTarget = await cdp.Target.createTarget({ url: "https://example.com", background: true }); const targetDeadline = Date.now() + 3000; while ( !targetCreatedEvents.some((event) => event?.targetInfo?.targetId === createdTarget.targetId) && @@ -285,6 +423,11 @@ async function main() { } console.log("normal event matched ->", createdTarget.targetId); + const tabFromTarget = await cdp.send("Custom.TabIdFromTargetId", { targetId: createdTarget.targetId }); + if (typeof tabFromTarget.tabId !== "number") + throw new Error(`unexpected Custom.TabIdFromTargetId result ${JSON.stringify(tabFromTarget)}`); + console.log("Custom.TabIdFromTargetId ->", tabFromTarget); + await cdp.Target.activateTarget({ targetId: createdTarget.targetId }); const foregroundDeadline = Date.now() + 3000; while ( @@ -295,11 +438,8 @@ async function main() { } const foreground = foregroundEvents.find((event) => event.targetId === createdTarget.targetId); if (!foreground) throw new Error(`expected Custom.foregroundTargetChanged for ${createdTarget.targetId}`); - - const tabFromTarget = await cdp.send("Custom.TabIdFromTargetId", { targetId: createdTarget.targetId }); - if (tabFromTarget.tabId !== foreground.tabId) - throw new Error(`unexpected Custom.TabIdFromTargetId result ${JSON.stringify(tabFromTarget)}`); - console.log("Custom.TabIdFromTargetId ->", tabFromTarget); + if (foreground.tabId !== tabFromTarget.tabId) + throw new Error(`unexpected Custom.foregroundTargetChanged result ${JSON.stringify(foreground)}`); const targetFromTab = await cdp.send("Custom.targetIdFromTabId", { tabId: foreground.tabId }); if (targetFromTab.targetId !== createdTarget.targetId || targetFromTab.tabId !== foreground.tabId) { @@ -317,12 +457,11 @@ async function main() { // the prompt when run non-interactively (CI, piped stdin) so the demo // exits cleanly after assertions. if (process.stdin.isTTY) { - cdp.on("Magic.pong", (e) => console.log("\n[event] Magic.pong", e)); + cdp.on("Mod.pong", (e) => console.log("\n[event] Mod.pong", e)); await runRepl(cdp, mode); } } finally { await cdp.close(); - await chrome?.close(); } } @@ -330,7 +469,7 @@ async function runRepl(cdp, mode) { console.log(`\nBrowser remains running. Mode: ${mode}.`); console.log("Enter commands as Domain.method({...}). Examples:"); console.log(" Browser.getVersion({})"); - console.log(' Magic.evaluate({expression: "chrome.tabs.query({active: true})"})'); + console.log(' Mod.evaluate({expression: "chrome.tabs.query({active: true})"})'); console.log(" Custom.TabIdFromTargetId({targetId: '...'})"); console.log("Type exit or quit to disconnect (browser keeps running)."); @@ -339,7 +478,7 @@ async function runRepl(cdp, mode) { while (true) { let line; try { - line = (await rl.question("MagicCDP> ")).trim(); + line = (await rl.question("CDPMod> ")).trim(); } catch { break; } diff --git a/client/js/examples/playwright.ts b/client/js/examples/playwright.ts new file mode 100644 index 0000000..13b3e17 --- /dev/null +++ b/client/js/examples/playwright.ts @@ -0,0 +1,74 @@ +// Playwright through the standalone CDPMod proxy. +// +// This is intentionally a normal Playwright connectOverCDP flow. The only +// special piece is the CDP endpoint: Playwright connects to the proxy, and the +// proxy upgrades vanilla CDP with Mod.* and Custom.* support. + +import assert from "node:assert/strict"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import { chromium } from "playwright"; + +import { freePort, launchChrome } from "../../../bridge/launcher.js"; +import { startProxy } from "../../../bridge/proxy.js"; + +const here = path.dirname(fileURLToPath(import.meta.url)); +const extension_path = path.resolve(here, "../../../extension"); + +let proxy: Awaited> | null = null; +let chrome: Awaited> | null = null; +let browser: Awaited> | null = null; + +try { + chrome = await launchChrome({ + headless: process.platform === "linux", + sandbox: process.platform !== "linux", + extra_args: [`--load-extension=${extension_path}`], + }); + proxy = await startProxy({ + port: await freePort(), + extensionPath: extension_path, + upstream: chrome.cdpUrl, + }); + + browser = await chromium.connectOverCDP(proxy.url); + const cdp = (await browser.newBrowserCDPSession()) as any; + + const version = await cdp.send("Browser.getVersion"); + assert.equal(typeof version.product, "string"); + console.log("Browser.getVersion ->", version.product); + + const worker_info = await cdp.send("Mod.evaluate", { + expression: "({ extension_id: chrome.runtime.id, service_worker_url: chrome.runtime.getURL('service_worker.js') })", + }); + assert.equal(typeof worker_info.extension_id, "string"); + console.log("Mod.evaluate ->", worker_info); + + await cdp.send("Mod.addCustomEvent", { name: "Custom.proxyEvent" }); + const event_received = new Promise>((resolve, reject) => { + const timeout = setTimeout(() => reject(new Error("Timed out waiting for Custom.proxyEvent")), 3000); + cdp.on("Custom.proxyEvent", (payload) => { + clearTimeout(timeout); + resolve(payload); + }); + }); + + await cdp.send("Mod.addCustomCommand", { + name: "Custom.proxyEcho", + expression: `async (params) => { + await cdp.emit("Custom.proxyEvent", { source: "playwright", value: params.value }); + return { source: "playwright", value: params.value }; + }`, + }); + + const echo_result = await cdp.send("Custom.proxyEcho", { value: "hello-from-playwright" }); + const event_result = await event_received; + assert.deepEqual(echo_result, { source: "playwright", value: "hello-from-playwright" }); + assert.deepEqual(event_result, { source: "playwright", value: "hello-from-playwright" }); + console.log("Custom.proxyEcho ->", echo_result); + console.log("Custom.proxyEvent ->", event_result); +} finally { + await browser?.close().catch(() => {}); + await proxy?.close().catch(() => {}); + await chrome?.close().catch(() => {}); +} diff --git a/client/js/examples/puppeteer.ts b/client/js/examples/puppeteer.ts new file mode 100644 index 0000000..6c928fb --- /dev/null +++ b/client/js/examples/puppeteer.ts @@ -0,0 +1,75 @@ +// Puppeteer through the standalone CDPMod proxy. +// +// This is intentionally a normal Puppeteer connect flow. The proxy endpoint +// exposes the regular CDP discovery endpoints while adding Mod.* and Custom.* +// support to every CDPSession. + +import assert from "node:assert/strict"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import puppeteer from "puppeteer-core"; + +import { freePort, launchChrome } from "../../../bridge/launcher.js"; +import { startProxy } from "../../../bridge/proxy.js"; + +const here = path.dirname(fileURLToPath(import.meta.url)); +const extension_path = path.resolve(here, "../../../extension"); + +let proxy: Awaited> | null = null; +let chrome: Awaited> | null = null; +let browser: Awaited> | null = null; + +try { + chrome = await launchChrome({ + headless: process.platform === "linux", + sandbox: process.platform !== "linux", + extra_args: [`--load-extension=${extension_path}`], + }); + proxy = await startProxy({ + port: await freePort(), + extensionPath: extension_path, + upstream: chrome.cdpUrl, + }); + + browser = await puppeteer.connect({ browserURL: proxy.url }); + const page = (await browser.pages())[0] ?? (await browser.newPage()); + const cdp = (await page.createCDPSession()) as any; + + const version = await cdp.send("Browser.getVersion"); + assert.equal(typeof version.product, "string"); + console.log("Browser.getVersion ->", version.product); + + const worker_info = await cdp.send("Mod.evaluate", { + expression: "({ extension_id: chrome.runtime.id, service_worker_url: chrome.runtime.getURL('service_worker.js') })", + }); + assert.equal(typeof worker_info.extension_id, "string"); + console.log("Mod.evaluate ->", worker_info); + + await cdp.send("Mod.addCustomEvent", { name: "Custom.proxyEvent" }); + const event_received = new Promise>((resolve, reject) => { + const timeout = setTimeout(() => reject(new Error("Timed out waiting for Custom.proxyEvent")), 3000); + cdp.on("Custom.proxyEvent", (payload) => { + clearTimeout(timeout); + resolve(payload); + }); + }); + + await cdp.send("Mod.addCustomCommand", { + name: "Custom.proxyEcho", + expression: `async (params) => { + await cdp.emit("Custom.proxyEvent", { source: "puppeteer", value: params.value }); + return { source: "puppeteer", value: params.value }; + }`, + }); + + const echo_result = await cdp.send("Custom.proxyEcho", { value: "hello-from-puppeteer" }); + const event_result = await event_received; + assert.deepEqual(echo_result, { source: "puppeteer", value: "hello-from-puppeteer" }); + assert.deepEqual(event_result, { source: "puppeteer", value: "hello-from-puppeteer" }); + console.log("Custom.proxyEcho ->", echo_result); + console.log("Custom.proxyEvent ->", event_result); +} finally { + await browser?.close().catch(() => {}); + await proxy?.close().catch(() => {}); + await chrome?.close().catch(() => {}); +} diff --git a/client/python/MagicCDPClient.py b/client/python/MagicCDPClient.py deleted file mode 100644 index 58d3da8..0000000 --- a/client/python/MagicCDPClient.py +++ /dev/null @@ -1,371 +0,0 @@ -"""MagicCDPClient (Python): importable, no CLI, no demo code. - -Constructor parameter names mirror the JS / Go ports: - cdp_url upstream CDP URL (str) - extension_path extension directory (str) - routes client-side routing dict - server { 'loopback_cdp_url'?, 'routes'? } passed to MagicCDPServer.configure - -Public methods: connect(), send(method, params), on(event, handler), close(). -Synchronous (blocking) API; one background thread reads frames off the WS. -""" - -import json -import re -import threading -import time -import urllib.request -from pathlib import Path -from queue import Queue, Empty - -from websocket import create_connection - -from translate import ( - DEFAULT_CLIENT_ROUTES, - binding_name_for, - wrap_command_if_needed, - unwrap_event_if_needed, - unwrap_response_if_needed, -) - -EXT_ID_FROM_URL_RE = re.compile(r"^chrome-extension://([a-z]+)/") -MAGIC_READY_EXPRESSION = ( - "Boolean(globalThis.MagicCDP?.__MagicCDPServerVersion === 1 && " - "globalThis.MagicCDP?.handleCommand && globalThis.MagicCDP?.addCustomEvent)" -) -DEFAULT_SERVER = object() - - -def websocket_url_for(endpoint: str) -> str: - if re.match(r"^wss?://", endpoint, re.I): - return endpoint - with urllib.request.urlopen(f"{endpoint}/json/version", timeout=5) as r: - ws_url = json.loads(r.read()).get("webSocketDebuggerUrl") - if not ws_url: - raise RuntimeError(f"HTTP discovery for {endpoint} returned no webSocketDebuggerUrl") - return ws_url - - -def magic_server_bootstrap_expression(extension_path: str) -> str: - server_path = Path(extension_path) / "MagicCDPServer.js" - source = server_path.read_text() - start = source.index("export function installMagicCDPServer") - end = source.index("export const MagicCDPServer") - installer = source[start:end].replace("export function", "function", 1) - return ( - "(() => {\n" - f"{installer}\n" - "const MagicCDP = installMagicCDPServer(globalThis);\n" - "return {\n" - " ok: Boolean(MagicCDP?.__MagicCDPServerVersion === 1 && MagicCDP?.handleCommand && MagicCDP?.addCustomEvent),\n" - " extensionId: globalThis.chrome?.runtime?.id ?? null,\n" - " hasTabs: Boolean(globalThis.chrome?.tabs?.query),\n" - " hasDebugger: Boolean(globalThis.chrome?.debugger?.sendCommand),\n" - "};\n" - "})()" - ) - - -class MagicCDPClient: - def __init__(self, cdp_url, extension_path, routes=None, server=DEFAULT_SERVER): - self.cdp_url = cdp_url - self.extension_path = extension_path - self.routes = {**DEFAULT_CLIENT_ROUTES, **(routes or {})} - self.server = {} if server is DEFAULT_SERVER else server - - self.extension_id = None - self.ext_target_id = None - self.ext_session_id = None - self.latency = None - - self._ws = None - self._next_id = 0 - self._pending = {} - self._handlers = {} - self._lock = threading.Lock() - self._reader_thread = None - self._closed = False - - def connect(self): - input_cdp_url = self.cdp_url - self.cdp_url = websocket_url_for(self.cdp_url) - if self.server is not None and "loopback_cdp_url" not in self.server: - self.server = {**self.server, "loopback_cdp_url": self.cdp_url} - elif self.server and self.server.get("loopback_cdp_url"): - loopback_url = self.server["loopback_cdp_url"] - if loopback_url == input_cdp_url or loopback_url == self.cdp_url: - self.server = {**self.server, "loopback_cdp_url": self.cdp_url} - self._ws = create_connection(self.cdp_url) - self._reader_thread = threading.Thread(target=self._reader, daemon=True) - self._reader_thread.start() - - ext = self._ensure_extension() - self.extension_id = ext["extensionId"] - self.ext_target_id = ext["targetId"] - self.ext_session_id = ext["sessionId"] - self._send_frame("Runtime.enable", {}, self.ext_session_id) - self._send_frame("Runtime.addBinding", {"name": binding_name_for("Magic.pong")}, self.ext_session_id) - - if self.server is not None: - self._send_raw(wrap_command_if_needed( - "Magic.configure", - self.server, - routes=self.routes, - cdp_session_id=self.ext_session_id, - )) - self._measure_ping_latency() - return self - - def send(self, method, params=None): - return self._send_raw(wrap_command_if_needed( - method, - params or {}, - routes=self.routes, - cdp_session_id=self.ext_session_id, - )) - - def on(self, event, handler): - self._handlers.setdefault(event, []).append(handler) - return self - - def close(self): - self._closed = True - try: - if self.ext_session_id: - self._send_frame("Target.detachFromTarget", {"sessionId": self.ext_session_id}) - except Exception: - pass - try: - if self._ws: - self._ws.close() - except Exception: - pass - - # --- internals --------------------------------------------------------- - - def _send_raw(self, wrapped): - if wrapped["target"] == "direct_cdp": - step = wrapped["steps"][0] - return self._send_frame(step["method"], step.get("params") or {}) - if wrapped["target"] != "service_worker": - raise RuntimeError(f"Unsupported command target {wrapped['target']!r}") - - result = {} - unwrap = None - for step in wrapped["steps"]: - result = self._send_frame(step["method"], step.get("params") or {}, self.ext_session_id) - unwrap = step.get("unwrap") - return unwrap_response_if_needed(result, unwrap) - - def _measure_ping_latency(self): - sent_at = int(time.time() * 1000) - done = Queue() - - def on_pong(payload): - done.put(payload or {}) - - self._handlers.setdefault("Magic.pong", []).append(on_pong) - try: - self.send("Magic.ping", {"sentAt": sent_at}) - payload = done.get(timeout=10) - except Empty: - raise RuntimeError("Magic.pong timed out") - finally: - handlers = self._handlers.get("Magic.pong") or [] - if on_pong in handlers: - handlers.remove(on_pong) - - returned_at = int(time.time() * 1000) - received_at = payload.get("receivedAt") - self.latency = { - "sentAt": sent_at, - "receivedAt": received_at, - "returnedAt": returned_at, - "roundTripMs": returned_at - sent_at, - "serviceWorkerMs": received_at - sent_at if isinstance(received_at, (int, float)) else None, - "returnPathMs": returned_at - received_at if isinstance(received_at, (int, float)) else None, - } - return self.latency - - def _send_frame(self, method, params=None, session_id=None, timeout=10): - with self._lock: - self._next_id += 1 - msg_id = self._next_id - done = Queue() - self._pending[msg_id] = (method, done) - msg = {"id": msg_id, "method": method, "params": params or {}} - if session_id: - msg["sessionId"] = session_id - try: - self._ws.send(json.dumps(msg)) - except Exception: - with self._lock: - self._pending.pop(msg_id, None) - raise - try: - response = done.get(timeout=timeout) - except Empty: - with self._lock: - self._pending.pop(msg_id, None) - raise RuntimeError(f"{method} timed out after {timeout}s") - if response.get("error"): - err = response["error"] - raise RuntimeError(f"{method} failed: {err.get('message', err)}") - return response.get("result") or {} - - def _reader(self): - try: - while True: - raw = self._ws.recv() - if not raw: - break - msg = json.loads(raw) - if "id" in msg and msg["id"] is not None: - with self._lock: - entry = self._pending.pop(msg["id"], None) - if entry: - entry[1].put(msg) - continue - if msg.get("sessionId") == self.ext_session_id: - u = unwrap_event_if_needed(msg.get("method"), msg.get("params") or {}, msg.get("sessionId"), self.ext_session_id) - if u: - for h in self._handlers.get(u["event"], []): - try: h(u["data"]) - except Exception as e: print(f"[MagicCDPClient] handler error for {u['event']}: {e}") - continue - method = msg.get("method") - if method: - for h in self._handlers.get(method, []): - try: h(msg.get("params") or {}, msg.get("sessionId")) - except Exception as e: print(f"[MagicCDPClient] handler error for {method}: {e}") - except Exception as e: - if not self._closed: - print(f"[MagicCDPClient] reader exited: {e}") - finally: - with self._lock: - pending = list(self._pending.values()) - self._pending.clear() - for _, done in pending: - done.put({"error": {"message": "connection closed"}}) - - def _ensure_extension(self): - # 1. Discover an existing MagicCDP service worker. Poll briefly because - # extensions loaded with --load-extension take a moment to spin up. - attached = [] - deadline = time.time() + 10.0 - while time.time() <= deadline: - for t in (self._send_frame("Target.getTargets")["targetInfos"]): - if t["type"] != "service_worker": continue - if not t["url"].startswith("chrome-extension://"): continue - if any(a["targetId"] == t["targetId"] for a in attached): continue - try: - a = self._send_frame("Target.attachToTarget", {"targetId": t["targetId"], "flatten": True}, timeout=2) - except Exception: - continue - attached.append({"targetId": t["targetId"], "url": t["url"], "sessionId": a["sessionId"]}) - for a in attached: - try: - probe = self._send_frame("Runtime.evaluate", { - "expression": MAGIC_READY_EXPRESSION, - "returnByValue": True, - }, a["sessionId"], timeout=2) - except Exception: - continue - if (probe.get("result") or {}).get("value") is True: - for o in attached: - if o["sessionId"] != a["sessionId"]: - try: self._send_frame("Target.detachFromTarget", {"sessionId": o["sessionId"]}) - except Exception: pass - return { - "source": "discovered", - "extensionId": EXT_ID_FROM_URL_RE.match(a["url"]).group(1), - "targetId": a["targetId"], "url": a["url"], "sessionId": a["sessionId"], - } - if time.time() >= deadline: break - time.sleep(0.1) - for a in attached: - try: self._send_frame("Target.detachFromTarget", {"sessionId": a["sessionId"]}) - except Exception: pass - - # 2. Try Extensions.loadUnpacked. - try: - r = self._send_frame("Extensions.loadUnpacked", {"path": self.extension_path}) - extension_id = r.get("id") or r.get("extensionId") - except RuntimeError as e: - if "Method not available" in str(e) or "wasn't found" in str(e): - return self._borrow_extension_worker(str(e)) - raise - if not extension_id: - raise RuntimeError(f"Extensions.loadUnpacked returned no id: {r}") - - # 3. Wait for the loaded extension's SW. - sw_url = f"chrome-extension://{extension_id}/service_worker.js" - deadline = time.time() + 10.0 - while time.time() < deadline: - for t in (self._send_frame("Target.getTargets")["targetInfos"]): - if t["type"] == "service_worker" and t["url"] == sw_url: - a = self._send_frame("Target.attachToTarget", {"targetId": t["targetId"], "flatten": True}) - probe = self._send_frame("Runtime.evaluate", { - "expression": MAGIC_READY_EXPRESSION, - "returnByValue": True, - }, a["sessionId"]) - if (probe.get("result") or {}).get("value") is True: - return { - "source": "injected", "extensionId": extension_id, - "targetId": t["targetId"], "url": sw_url, "sessionId": a["sessionId"], - } - self._send_frame("Target.detachFromTarget", {"sessionId": a["sessionId"]}) - time.sleep(0.1) - raise RuntimeError(f"Extensions.loadUnpacked installed {extension_id} but its SW did not appear") - - def _borrow_extension_worker(self, load_error): - borrowed = [] - bootstrap = magic_server_bootstrap_expression(self.extension_path) - for t in (self._send_frame("Target.getTargets")["targetInfos"]): - if t["type"] != "service_worker": continue - if not t["url"].startswith("chrome-extension://"): continue - session_id = None - try: - a = self._send_frame("Target.attachToTarget", {"targetId": t["targetId"], "flatten": True}, timeout=2) - session_id = a["sessionId"] - try: self._send_frame("Runtime.enable", {}, session_id, timeout=2) - except Exception: pass - result = self._send_frame("Runtime.evaluate", { - "expression": bootstrap, - "awaitPromise": True, - "returnByValue": True, - "allowUnsafeEvalBlockedByCSP": True, - }, session_id, timeout=3) - value = (result.get("result") or {}).get("value") or {} - if value.get("ok"): - m = EXT_ID_FROM_URL_RE.match(t["url"]) - borrowed.append({ - "source": "borrowed", - "extensionId": value.get("extensionId") or (m.group(1) if m else None), - "targetId": t["targetId"], - "url": t["url"], - "sessionId": session_id, - "hasTabs": bool(value.get("hasTabs")), - "hasDebugger": bool(value.get("hasDebugger")), - }) - else: - self._send_frame("Target.detachFromTarget", {"sessionId": session_id}) - except Exception: - if session_id: - try: self._send_frame("Target.detachFromTarget", {"sessionId": session_id}) - except Exception: pass - borrowed.sort(key=lambda item: (item.get("hasDebugger", False), item.get("hasTabs", False)), reverse=True) - if borrowed: - for other in borrowed[1:]: - try: self._send_frame("Target.detachFromTarget", {"sessionId": other["sessionId"]}) - except Exception: pass - selected = borrowed[0] - selected.pop("hasTabs", None) - selected.pop("hasDebugger", None) - return selected - raise RuntimeError( - "Cannot install or borrow MagicCDP in the running browser.\n" - " - No existing service worker with globalThis.MagicCDP was found.\n" - f" - Extensions.loadUnpacked is unavailable ({load_error}).\n" - " - No running chrome-extension:// service worker accepted the MagicCDP bootstrap." - ) diff --git a/client/python/cdpmod/CDPModClient.py b/client/python/cdpmod/CDPModClient.py new file mode 100644 index 0000000..a0700f3 --- /dev/null +++ b/client/python/cdpmod/CDPModClient.py @@ -0,0 +1,764 @@ +"""CDPModClient (Python): importable, no CLI, no demo code. + +Constructor parameter names mirror the JS / Go ports: + cdp_url upstream CDP URL (str) + extension_path extension directory (str) + routes client-side routing dict + server { 'loopback_cdp_url'?, 'routes'? } passed to CDPModServer.configure + +Public methods: connect(), send(method, params), on(event, handler), close(), _cdp.send(), _cdp.on(). +Synchronous (blocking) API; one background thread reads frames off the WS. +""" + +import json +import os +import re +import subprocess +import threading +import time +import tempfile +import urllib.request +import socket +import zipfile +from collections.abc import Mapping, Sequence +from pathlib import Path +from queue import Queue, Empty +from typing import cast + +from websocket import create_connection + +from .translate import ( + DEFAULT_CLIENT_ROUTES, + binding_name_for, + wrap_command_if_needed, + unwrap_event_if_needed, + unwrap_response_if_needed, +) +from .types import ( + CDPModAddCustomCommandParams, + CDPModAddCustomEventObjectParams, + CDPModAddCustomEventParams, + CDPModAddMiddlewareParams, + CDPModCommandTiming, + CDPModConnectTiming, + CDPModPingLatency, + CDPModRawTiming, + CDPModRoutes, + CDPModServerConfig, + BorrowedExtensionInfo, + CdpFrame, + ExtensionInfo, + ExtensionProbe, + FrameParams, + Handler, + JsonValue, + LaunchOptions, + PendingEntry, + ProtocolParams, + ProtocolPayload, + ProtocolResult, + TargetInfo, + TranslatedCommand, + WebSocketLike, +) + +EXT_ID_FROM_URL_RE = re.compile(r"^chrome-extension://([a-z]+)/") +CDPMOD_READY_EXPRESSION = ( + "Boolean(globalThis.CDPMod?.__CDPModServerVersion === 1 && " + "globalThis.CDPMod?.handleCommand && globalThis.CDPMod?.addCustomEvent)" +) +DEFAULT_SERVER = object() + + +class _DomainMethods: + def __init__(self, client: "CDPModClient", domain: str) -> None: + self._client = client + self._domain = domain + + def __getattr__(self, method: str): + def call(*args: ProtocolParams, **kwargs: JsonValue) -> JsonValue: + if len(args) > 1: + raise TypeError(f"{self._domain}.{method} accepts at most one positional params object") + params: ProtocolParams = dict(args[0]) if args else {} + params.update(kwargs) + return self._client.send(f"{self._domain}.{method}", params) + + return call + + +class _RawCDP: + def __init__(self, client: "CDPModClient") -> None: + self._client = client + + def send( + self, + method: str, + params: ProtocolParams | None = None, + session_id: str | None = None, + ) -> ProtocolResult: + return self._client._send_frame(method, params or {}, session_id=session_id, record_raw_timing=True) + + def on(self, event: str, handler: Handler) -> "CDPModClient": + return self._client.on(event, handler) + + +def websocket_url_for(endpoint: str) -> str: + if re.match(r"^wss?://", endpoint, re.I): + return endpoint + with urllib.request.urlopen(f"{endpoint}/json/version", timeout=5) as r: + parsed: object = json.loads(r.read()) + if not isinstance(parsed, dict): + raise RuntimeError(f"HTTP discovery for {endpoint} returned invalid JSON") + parsed_obj = cast(Mapping[str, object], parsed) + ws_url = parsed_obj.get("webSocketDebuggerUrl") + if not ws_url: + raise RuntimeError(f"HTTP discovery for {endpoint} returned no webSocketDebuggerUrl") + if not isinstance(ws_url, str): + raise RuntimeError(f"HTTP discovery for {endpoint} returned a non-string webSocketDebuggerUrl") + return ws_url + + +def _free_port() -> int: + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: + sock.bind(("127.0.0.1", 0)) + return sock.getsockname()[1] + + +def _json_object(value: JsonValue | None) -> ProtocolResult: + return value if isinstance(value, dict) else {} + + +def cdpmod_server_bootstrap_expression(extension_path: str) -> str: + server_path = Path(extension_path) / "CDPModServer.js" + source = server_path.read_text() + start = source.index("export function installCDPModServer") + end = source.index("export const CDPModServer") + installer = source[start:end].replace("export function", "function", 1) + return ( + "(() => {\n" + f"{installer}\n" + "const CDPMod = installCDPModServer(globalThis);\n" + "return {\n" + " ok: Boolean(CDPMod?.__CDPModServerVersion === 1 && CDPMod?.handleCommand && CDPMod?.addCustomEvent),\n" + " extension_id: globalThis.chrome?.runtime?.id ?? null,\n" + " has_tabs: Boolean(globalThis.chrome?.tabs?.query),\n" + " has_debugger: Boolean(globalThis.chrome?.debugger?.sendCommand),\n" + "};\n" + "})()" + ) + + +class CDPModClient: + def __init__( + self, + cdp_url: str | None = None, + extension_path: str | None = None, + routes: Mapping[str, str] | None = None, + server: Mapping[str, JsonValue] | None | object = DEFAULT_SERVER, + custom_commands: Sequence[CDPModAddCustomCommandParams] | None = None, + custom_events: Sequence[CDPModAddCustomEventParams] | None = None, + custom_middlewares: Sequence[CDPModAddMiddlewareParams] | None = None, + service_worker_url_includes: Sequence[str] | None = None, + service_worker_url_suffixes: Sequence[str] | None = None, + trust_service_worker_target: bool = False, + require_service_worker_target: bool = False, + service_worker_ready_expression: str | None = None, + launch_options: LaunchOptions | None = None, + ) -> None: + self.cdp_url: str | None = cdp_url + self.extension_path: str | None = extension_path + self.routes: CDPModRoutes = {**DEFAULT_CLIENT_ROUTES, **dict(routes or {})} + if server is DEFAULT_SERVER: + self.server: CDPModServerConfig | None = {} + elif server is None: + self.server = None + elif isinstance(server, Mapping): + self.server = cast(CDPModServerConfig, dict(server)) + else: + raise TypeError("server must be a mapping, None, or omitted") + self.custom_commands: list[CDPModAddCustomCommandParams] = list(custom_commands or []) + self.custom_events: list[CDPModAddCustomEventParams] = list(custom_events or []) + self.custom_middlewares: list[CDPModAddMiddlewareParams] = list(custom_middlewares or []) + self.service_worker_url_includes: list[str] = list(service_worker_url_includes or []) + self.service_worker_url_suffixes: list[str] = list(service_worker_url_suffixes or ["/service_worker.js", "/background.js"]) + self.trust_service_worker_target = trust_service_worker_target + self.require_service_worker_target = require_service_worker_target + self.service_worker_ready_expression = service_worker_ready_expression + self.launch_options = cast(LaunchOptions, dict(launch_options or {})) + + self.extension_id: str | None = None + self.ext_target_id: str | None = None + self.ext_session_id: str | None = None + self.latency: CDPModPingLatency | None = None + self.connect_timing: CDPModConnectTiming | None = None + self.last_command_timing: CDPModCommandTiming | None = None + self.last_raw_timing: CDPModRawTiming | None = None + + self._ws: WebSocketLike | None = None + self._next_id = 0 + self._pending: dict[int, PendingEntry] = {} + self._handlers: dict[str, list[Handler]] = {} + self._lock = threading.Lock() + self._target_sessions: dict[str, str] = {} + self._session_targets: dict[str, TargetInfo] = {} + self._reader_thread: threading.Thread | None = None + self._closed = False + self._launched_process: subprocess.Popen[bytes] | None = None + self._profile_dir: tempfile.TemporaryDirectory[str] | None = None + self._prepared_extension_dir: tempfile.TemporaryDirectory[str] | None = None + self._cdp = _RawCDP(self) + + def connect(self) -> "CDPModClient": + connect_started_at = int(time.time() * 1000) + if self.cdp_url is None: + launched = self._launch_chrome() + self.cdp_url = launched["cdp_url"] + input_cdp_url = self.cdp_url + self.cdp_url = websocket_url_for(input_cdp_url) + if self.server is not None and "loopback_cdp_url" not in self.server: + self.server = {**self.server, "loopback_cdp_url": self.cdp_url} + elif self.server and isinstance(self.server.get("loopback_cdp_url"), str): + loopback_url = self.server["loopback_cdp_url"] + if loopback_url == input_cdp_url or loopback_url == self.cdp_url: + self.server = {**self.server, "loopback_cdp_url": self.cdp_url} + self._ws = cast(WebSocketLike, create_connection(self.cdp_url)) + self._reader_thread = threading.Thread(target=self._reader, daemon=True) + self._reader_thread.start() + + self._send_frame("Target.setAutoAttach", { + "autoAttach": True, + "waitForDebuggerOnStart": False, + "flatten": True, + }) + self._send_frame("Target.setDiscoverTargets", {"discover": True}) + + extension_started_at = int(time.time() * 1000) + self._prepare_extension_path() + ext = self._ensure_extension() + extension_completed_at = int(time.time() * 1000) + self.extension_id = ext["extension_id"] + self.ext_target_id = ext["target_id"] + self.ext_session_id = ext["session_id"] + self._send_frame("Runtime.enable", {}, self.ext_session_id) + self._send_frame("Runtime.addBinding", {"name": binding_name_for("Mod.pong")}, self.ext_session_id) + for event in self.custom_events: + name = event.get("name") if isinstance(event, dict) else event + if isinstance(name, str) and name: + self._send_frame("Runtime.addBinding", {"name": binding_name_for(name)}, self.ext_session_id) + + if self.server is not None: + custom_events: list[CDPModAddCustomEventObjectParams] = [] + for event in self.custom_events: + custom_events.append({"name": event} if isinstance(event, str) else event) + custom_commands: list[CDPModAddCustomCommandParams] = [ + command + for command in self.custom_commands + if isinstance(command.get("expression"), str) and command.get("expression") + ] + custom_middlewares: list[CDPModAddMiddlewareParams] = list(self.custom_middlewares) + configure_params: CDPModServerConfig = { + **self.server, + "custom_events": custom_events, + "custom_commands": custom_commands, + "custom_middlewares": custom_middlewares, + } + self._send_raw(wrap_command_if_needed( + "Mod.configure", + cast(ProtocolParams, configure_params), + routes=self.routes, + cdp_session_id=self.ext_session_id, + )) + threading.Thread(target=self._measure_ping_latency, daemon=True).start() + connected_at = int(time.time() * 1000) + self.connect_timing = { + "started_at": connect_started_at, + "extension_source": ext.get("source"), + "extension_started_at": extension_started_at, + "extension_completed_at": extension_completed_at, + "extension_duration_ms": extension_completed_at - extension_started_at, + "connected_at": connected_at, + "duration_ms": connected_at - connect_started_at, + } + return self + + def send(self, method: str, params: ProtocolParams | None = None) -> JsonValue: + started_at = int(time.time() * 1000) + command = wrap_command_if_needed( + method, + params or {}, + routes=self.routes, + cdp_session_id=self.ext_session_id, + ) + result = self._send_raw(command) + completed_at = int(time.time() * 1000) + self.last_command_timing = { + "method": method, + "target": command["target"], + "started_at": started_at, + "completed_at": completed_at, + "duration_ms": completed_at - started_at, + } + return result + + def on(self, event: str, handler: Handler) -> "CDPModClient": + self._handlers.setdefault(event, []).append(handler) + return self + + def __getattr__(self, domain: str) -> _DomainMethods: + if domain.startswith("_"): + raise AttributeError(domain) + return _DomainMethods(self, domain) + + def close(self) -> None: + self._closed = True + try: + if self._ws: + self._ws.close() + except Exception: + pass + if self._launched_process is not None: + self._launched_process.terminate() + try: + self._launched_process.wait(timeout=2) + except subprocess.TimeoutExpired: + self._launched_process.kill() + self._launched_process = None + if self._profile_dir is not None: + self._profile_dir.cleanup() + self._profile_dir = None + if self._prepared_extension_dir is not None: + self._prepared_extension_dir.cleanup() + self._prepared_extension_dir = None + + def _ready_expression(self) -> str: + if not self.service_worker_ready_expression: + return CDPMOD_READY_EXPRESSION + return f"({CDPMOD_READY_EXPRESSION}) && Boolean({self.service_worker_ready_expression})" + + def _session_id_for_target(self, target_id: str, timeout: float = 0) -> str | None: + if timeout <= 0: + return self._target_sessions.get(target_id) + deadline = time.time() + timeout + while time.time() <= deadline: + session_id = self._target_sessions.get(target_id) + if session_id: + return session_id + time.sleep(0.02) + return None + + def _launch_chrome(self) -> dict[str, str]: + executable_path = self.launch_options.get("executable_path") or os.environ.get("CHROME_PATH") + candidates = [ + executable_path, + "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary", + "/Applications/Chromium.app/Contents/MacOS/Chromium", + "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", + "/usr/bin/google-chrome-canary", + "/usr/bin/chromium", + "/usr/bin/chromium-browser", + "/usr/bin/google-chrome", + ] + executable_path = next((candidate for candidate in candidates if candidate and Path(candidate).exists()), None) + if executable_path is None: + raise RuntimeError("No Chrome/Chromium binary found. Set CHROME_PATH or pass launch_options.executable_path.") + port = int(self.launch_options.get("port") or _free_port()) + self._profile_dir = tempfile.TemporaryDirectory(prefix="cdpmod.") + args = [ + "--enable-unsafe-extension-debugging", + "--remote-allow-origins=*", + "--no-first-run", + "--no-default-browser-check", + "--disable-default-apps", + "--disable-background-networking", + "--disable-backgrounding-occluded-windows", + "--disable-renderer-backgrounding", + "--disable-background-timer-throttling", + "--disable-sync", + "--disable-features=DisableLoadExtensionCommandLineSwitch", + "--password-store=basic", + "--use-mock-keychain", + "--disable-gpu", + f"--user-data-dir={self._profile_dir.name}", + "--remote-debugging-address=127.0.0.1", + f"--remote-debugging-port={port}", + ] + if self.launch_options.get("headless", False): + args.append("--headless=new") + if self.launch_options.get("sandbox", False) is False: + args.append("--no-sandbox") + extra_args = self.launch_options.get("extra_args") or [] + args.extend(extra_args) + args.append("about:blank") + self._launched_process = subprocess.Popen([executable_path, *args], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + cdp_url = f"http://127.0.0.1:{port}" + deadline = time.time() + 15 + while time.time() < deadline: + try: + with urllib.request.urlopen(f"{cdp_url}/json/version", timeout=0.5) as response: + json.loads(response.read()) + return {"cdp_url": cdp_url} + except Exception: + time.sleep(0.1) + self.close() + raise RuntimeError(f"Chrome at {cdp_url} did not become ready within 15s") + + # --- internals --------------------------------------------------------- + + def _prepare_extension_path(self) -> None: + if not self.extension_path or not self.extension_path.endswith(".zip"): + return + self._prepared_extension_dir = tempfile.TemporaryDirectory(prefix="cdpmod-extension.") + with zipfile.ZipFile(self.extension_path) as archive: + archive.extractall(self._prepared_extension_dir.name) + self.extension_path = self._prepared_extension_dir.name + + def _send_raw(self, wrapped: TranslatedCommand) -> JsonValue: + if wrapped["target"] == "direct_cdp": + step = wrapped["steps"][0] + return self._send_frame(step["method"], step.get("params") or {}) + if wrapped["target"] != "service_worker": + raise RuntimeError(f"Unsupported command target {wrapped['target']!r}") + + result: ProtocolResult = {} + unwrap: str | None = None + for step in wrapped["steps"]: + result = self._send_frame(step["method"], step.get("params") or {}, self.ext_session_id) + unwrap = step.get("unwrap") + return unwrap_response_if_needed(result, unwrap) + + def _measure_ping_latency(self) -> CDPModPingLatency: + sent_at = int(time.time() * 1000) + done: Queue[ProtocolPayload] = Queue() + + def on_pong(payload: ProtocolPayload) -> None: + done.put(payload or {}) + + self._handlers.setdefault("Mod.pong", []).append(on_pong) + try: + self.send("Mod.ping", {"sentAt": sent_at}) + payload = done.get(timeout=10) + except Empty: + raise RuntimeError("Mod.pong timed out") + finally: + handlers = self._handlers.get("Mod.pong") or [] + if on_pong in handlers: + handlers.remove(on_pong) + + returned_at = int(time.time() * 1000) + raw_received_at = payload.get("receivedAt") + received_at = raw_received_at if isinstance(raw_received_at, (int, float)) else None + latency: CDPModPingLatency = { + "sentAt": sent_at, + "receivedAt": received_at, + "returnedAt": returned_at, + "roundTripMs": returned_at - sent_at, + "serviceWorkerMs": received_at - sent_at if received_at is not None else None, + "returnPathMs": returned_at - received_at if received_at is not None else None, + } + self.latency = latency + return latency + + def _send_frame( + self, + method: str, + params: FrameParams | None = None, + session_id: str | None = None, + timeout: float | None = None, + record_raw_timing: bool = False, + ) -> ProtocolResult: + with self._lock: + self._next_id += 1 + msg_id = self._next_id + done: Queue[CdpFrame] = Queue() + self._pending[msg_id] = (method, done) + started_at = int(time.time() * 1000) + msg: CdpFrame = {"id": msg_id, "method": method, "params": params or {}} + if session_id: + msg["sessionId"] = session_id + ws = self._ws + if ws is None: + with self._lock: + self._pending.pop(msg_id, None) + raise RuntimeError("CDP websocket is not connected") + try: + ws.send(json.dumps(msg)) + except Exception: + with self._lock: + self._pending.pop(msg_id, None) + raise + try: + response = done.get(timeout=timeout) + except Empty: + with self._lock: + self._pending.pop(msg_id, None) + raise RuntimeError(f"{method} timed out after {timeout}s") + err = response.get("error") + if err: + raise RuntimeError(f"{method} failed: {err.get('message', err)}") + if record_raw_timing: + completed_at = int(time.time() * 1000) + self.last_raw_timing = { + "method": method, + "started_at": started_at, + "completed_at": completed_at, + "duration_ms": completed_at - started_at, + } + return _json_object(response.get("result")) + + def _reader(self) -> None: + ws = self._ws + if ws is None: + return + try: + while True: + raw = ws.recv() + if not raw: + break + if isinstance(raw, bytes): + raw = raw.decode() + parsed: object = json.loads(raw) + if not isinstance(parsed, dict): + continue + msg = cast(CdpFrame, parsed) + if "id" in msg and msg["id"] is not None: + with self._lock: + entry = self._pending.pop(msg["id"], None) + if entry: + entry[1].put(msg) + continue + method = msg.get("method") + raw_params = msg.get("params") + params = cast(ProtocolParams, raw_params) if isinstance(raw_params, Mapping) else {} + if method == "Target.attachedToTarget": + session_id = params.get("sessionId") + raw_target_info = params.get("targetInfo") + target_info = cast(TargetInfo, raw_target_info) if isinstance(raw_target_info, dict) else None + target_id = target_info.get("targetId") if target_info else None + if isinstance(session_id, str) and isinstance(target_id, str) and target_info: + self._target_sessions[target_id] = session_id + self._session_targets[session_id] = target_info + elif method == "Target.detachedFromTarget": + session_id = params.get("sessionId") + target_info = self._session_targets.pop(session_id, None) if isinstance(session_id, str) else None + target_id = target_info.get("targetId") if target_info else None + if target_id: + self._target_sessions.pop(target_id, None) + if method and msg.get("sessionId") == self.ext_session_id: + session_id = msg.get("sessionId") + u = unwrap_event_if_needed( + method, + params, + session_id if isinstance(session_id, str) else None, + self.ext_session_id, + ) + if u: + for h in self._handlers.get(u["event"], []): + def run_wrapped_event(handler=h, payload=u["data"], event_name=u["event"]): + try: handler(payload) + except Exception as e: print(f"[CDPModClient] handler error for {event_name}: {e}") + threading.Thread(target=run_wrapped_event, daemon=True).start() + continue + if method: + for h in self._handlers.get(method, []): + def run_method_event(handler=h, payload=dict(params), event_name=method): + try: handler(payload) + except Exception as e: print(f"[CDPModClient] handler error for {event_name}: {e}") + threading.Thread(target=run_method_event, daemon=True).start() + except Exception as e: + if not self._closed: + print(f"[CDPModClient] reader exited: {e}") + finally: + with self._lock: + pending = list(self._pending.values()) + self._pending.clear() + for _, done in pending: + done.put({"error": {"message": "connection closed"}}) + + def _target_infos(self) -> list[TargetInfo]: + value = self._send_frame("Target.getTargets").get("targetInfos") + if not isinstance(value, list): + return [] + targets: list[TargetInfo] = [] + for item in value: + if not isinstance(item, dict): + continue + target_id = item.get("targetId") + target_type = item.get("type") + target_url = item.get("url") + if isinstance(target_id, str) and isinstance(target_type, str) and isinstance(target_url, str): + targets.append({"targetId": target_id, "type": target_type, "url": target_url}) + return targets + + def _ensure_extension(self) -> ExtensionInfo: + ready_expression = self._ready_expression() + trust_service_worker_target = ( + self.trust_service_worker_target + or len(self.service_worker_url_includes) > 0 + or any(len([part for part in suffix.split("/") if part]) > 1 for suffix in self.service_worker_url_suffixes) + ) + + def probe_target(target: TargetInfo, timeout: float = 0) -> ExtensionProbe | None: + target_id = target.get("targetId") + target_url = target.get("url") + if not target_id or not target_url: + return None + session_id = self._session_id_for_target(target_id, timeout=timeout) + if not session_id: + return None + probe = self._send_frame("Runtime.evaluate", { + "expression": ready_expression, + "returnByValue": True, + }, session_id, timeout=2) + if _json_object(probe.get("result")).get("value") is not True: + return None + match = EXT_ID_FROM_URL_RE.match(target_url) + if match is None: + return None + return { + "extension_id": match.group(1), + "target_id": target_id, + "url": target_url, + "session_id": session_id, + } + + # 1. Discover an existing CDPMod service worker from the current CDP + # target snapshot. If none is already ready, use explicit injection. + target_infos = self._target_infos() + if trust_service_worker_target: + for t in target_infos: + if self._service_worker_target_matches(t): + result = probe_target(t, timeout=2) + if result: + return {"source": "trusted", **result} + for t in target_infos: + if t["type"] != "service_worker": continue + if not t["url"].startswith("chrome-extension://"): continue + try: + result = probe_target(t, timeout=2) + except Exception: + continue + if result: + return {"source": "discovered", **result} + if self.require_service_worker_target: + raise RuntimeError( + "Required CDPMod service worker target was not visible in the current CDP target snapshot " + f"({', '.join([*self.service_worker_url_includes, *self.service_worker_url_suffixes]) or 'no matcher'})." + ) + if self.extension_path is None: + raise RuntimeError("extension_path is required when no existing CDPMod service worker can be discovered.") + + # 2. Try Extensions.loadUnpacked. + try: + r = self._send_frame("Extensions.loadUnpacked", {"path": self.extension_path}) + extension_id = r.get("id") or r.get("extensionId") + except RuntimeError as e: + if "Method not available" in str(e) or "wasn't found" in str(e): + target_infos = self._target_infos() + if trust_service_worker_target: + for t in target_infos: + if self._service_worker_target_matches(t): + result = probe_target(t, timeout=2) + if result: + return {"source": "trusted", **result} + for t in target_infos: + if t["type"] != "service_worker": continue + if not t["url"].startswith("chrome-extension://"): continue + try: + result = probe_target(t, timeout=2) + except Exception: + continue + if result: + return {"source": "discovered", **result} + return self._borrow_extension_worker(str(e)) + raise + if not isinstance(extension_id, str) or not extension_id: + raise RuntimeError(f"Extensions.loadUnpacked returned no id: {r}") + + # 3. Wait for the loaded extension's SW. + sw_url_prefix = f"chrome-extension://{extension_id}/" + deadline = time.monotonic() + 60 + while time.monotonic() < deadline: + for t in self._target_infos(): + target_url = t.get("url") or "" + if t.get("type") == "service_worker" and target_url.startswith(sw_url_prefix): + result = probe_target(t, timeout=2) + if result: + return { + "source": "injected", "extension_id": extension_id, + "target_id": t["targetId"], "url": target_url, "session_id": result["session_id"], + } + time.sleep(0.1) + raise RuntimeError(f"Timed out after 60s waiting for service worker target for extension {extension_id}.") + + def _service_worker_target_matches(self, target: TargetInfo) -> bool: + url = target.get("url") or "" + if target.get("type") != "service_worker" or not url.startswith("chrome-extension://"): + return False + if self.service_worker_url_includes and not all(part in url for part in self.service_worker_url_includes): + return False + if self.service_worker_url_suffixes and not any(url.endswith(suffix) for suffix in self.service_worker_url_suffixes): + return False + return bool(self.service_worker_url_includes or self.service_worker_url_suffixes) + + def _borrow_extension_worker(self, load_error: str) -> ExtensionInfo: + if self.extension_path is None: + raise RuntimeError("extension_path is required to bootstrap a borrowed extension worker.") + borrowed: list[BorrowedExtensionInfo] = [] + bootstrap = cdpmod_server_bootstrap_expression(self.extension_path) + for t in self._target_infos(): + target_id = t.get("targetId") + target_url = t.get("url") or "" + if t.get("type") != "service_worker": continue + if not target_id or not target_url.startswith("chrome-extension://"): continue + session_id = None + try: + session_id = self._session_id_for_target(target_id, timeout=2) + if not session_id: + continue + try: self._send_frame("Runtime.enable", {}, session_id, timeout=2) + except Exception: pass + result = self._send_frame("Runtime.evaluate", { + "expression": bootstrap, + "awaitPromise": True, + "returnByValue": True, + "allowUnsafeEvalBlockedByCSP": True, + }, session_id, timeout=3) + result_object = result.get("result") + value = result_object.get("value") if isinstance(result_object, dict) else {} + if not isinstance(value, dict): + value = {} + ready = bool(value.get("ok")) + if ready and self.service_worker_ready_expression: + probe = self._send_frame("Runtime.evaluate", { + "expression": self._ready_expression(), + "returnByValue": True, + }, session_id, timeout=2) + ready = _json_object(probe.get("result")).get("value") is True + if ready: + m = EXT_ID_FROM_URL_RE.match(target_url) + extension_id = value.get("extension_id") or (m.group(1) if m else None) + if not isinstance(extension_id, str): + continue + borrowed.append({ + "source": "borrowed", + "extension_id": extension_id, + "target_id": target_id, + "url": target_url, + "session_id": session_id, + "has_tabs": bool(value.get("has_tabs")), + "has_debugger": bool(value.get("has_debugger")), + }) + except Exception: + pass + borrowed.sort(key=lambda item: (item.get("has_debugger", False), item.get("has_tabs", False)), reverse=True) + if borrowed: + selected = borrowed[0] + selected.pop("has_tabs", None) + selected.pop("has_debugger", None) + return selected + raise RuntimeError( + "Cannot install or borrow CDPMod in the running browser.\n" + " - No existing service worker with globalThis.CDPMod was found.\n" + f" - Extensions.loadUnpacked is unavailable ({load_error}).\n" + " - No running chrome-extension:// service worker accepted the CDPMod bootstrap." + ) diff --git a/client/python/cdpmod/__init__.py b/client/python/cdpmod/__init__.py new file mode 100644 index 0000000..8fdecb2 --- /dev/null +++ b/client/python/cdpmod/__init__.py @@ -0,0 +1,3 @@ +from .CDPModClient import CDPModClient + +__all__ = ["CDPModClient"] diff --git a/client/python/cdpmod/translate.py b/client/python/cdpmod/translate.py new file mode 100644 index 0000000..f61031d --- /dev/null +++ b/client/python/cdpmod/translate.py @@ -0,0 +1,265 @@ +"""Pure CDPMod <-> CDP translation helpers for the Python client.""" + +import json +import time +from typing import cast + +from .types import ( + CDPModRoutes, + JsonObject, + JsonValue, + ProtocolParams, + ProtocolPayload, + ProtocolResult, + RuntimeEvaluateParams, + TranslatedCommand, + TranslatedStep, + UnwrappedCDPModEvent, +) + +BINDING_PREFIX = "__CDPMod_" + +DEFAULT_CLIENT_ROUTES: CDPModRoutes = { + "Mod.*": "service_worker", + "Custom.*": "service_worker", + "*.*": "service_worker", +} + + +def binding_name_for(event_name: str) -> str: + return BINDING_PREFIX + event_name.replace(".", "_") + + +def event_name_for(binding_name: str) -> str | None: + if not binding_name.startswith(BINDING_PREFIX): + return None + return binding_name[len(BINDING_PREFIX):].replace("_", ".") + + +def route_for(method: str, routes: CDPModRoutes) -> str: + routes = routes or {} + if method in routes: + return routes[method] + best_prefix_len = -1 + best_route = None + for pattern, route in routes.items(): + if pattern == "*.*" or not pattern.endswith(".*"): + continue + prefix = pattern[:-1] + if method.startswith(prefix) and len(prefix) > best_prefix_len: + best_prefix_len = len(prefix) + best_route = route + if best_route is not None: + return best_route + if "*.*" in routes: + return routes["*.*"] + return "direct_cdp" + + +def _required_string(params: ProtocolParams, name: str) -> str: + value = params.get(name) + if not isinstance(value, str) or not value: + raise TypeError(f"{name} must be a non-empty string") + return value + + +def _optional_string(params: ProtocolParams, name: str) -> str | None: + value = params.get(name) + if value is None: + return None + if not isinstance(value, str): + raise TypeError(f"{name} must be a string") + return value + + +def _object_or_empty(value: JsonValue | None) -> JsonObject: + return value if isinstance(value, dict) else {} + + +def _eval_params(expression: str) -> RuntimeEvaluateParams: + return { + "expression": expression, + "awaitPromise": True, + "returnByValue": True, + "allowUnsafeEvalBlockedByCSP": True, + } + + +def _wrap_cdpmod_evaluate(params: ProtocolParams, session_id: str) -> RuntimeEvaluateParams: + expression = _required_string(params, "expression") + user_params = params.get("params", {}) + cdp_session_id = _optional_string(params, "cdpSessionId") or session_id + return _eval_params( + "(async () => {\n" + f" const params = {json.dumps(user_params)};\n" + f" const cdp = globalThis.CDPMod.attachToSession({json.dumps(cdp_session_id)});\n" + " const CDPMod = globalThis.CDPMod;\n" + " const chrome = globalThis.chrome;\n" + f" const value = ({expression});\n" + " return typeof value === 'function' ? await value(params) : value;\n" + "})()" + ) + + +def _wrap_cdpmod_add_custom_command(params: ProtocolParams) -> RuntimeEvaluateParams: + name = _required_string(params, "name") + expression = _required_string(params, "expression") + return _eval_params( + "(() => {\n" + " return globalThis.CDPMod.addCustomCommand({\n" + f" name: {json.dumps(name)},\n" + f" paramsSchema: {json.dumps(params.get('paramsSchema'))},\n" + f" resultSchema: {json.dumps(params.get('resultSchema'))},\n" + f" expression: {json.dumps(expression)},\n" + " handler: async (params, cdpSessionId, method) => {\n" + " const cdp = globalThis.CDPMod.attachToSession(cdpSessionId);\n" + " const CDPMod = globalThis.CDPMod;\n" + " const chrome = globalThis.chrome;\n" + f" const handler = ({expression});\n" + " return await handler(params || {}, method);\n" + " },\n" + " });\n" + "})()" + ) + + +def _wrap_cdpmod_add_custom_event(params: ProtocolParams) -> RuntimeEvaluateParams: + name = _required_string(params, "name") + return _eval_params( + "globalThis.CDPMod.addCustomEvent({\n" + f" name: {json.dumps(name)},\n" + f" bindingName: {json.dumps(binding_name_for(name))},\n" + f" eventSchema: {json.dumps(params.get('eventSchema'))},\n" + "})" + ) + + +def _wrap_cdpmod_add_middleware(params: ProtocolParams) -> RuntimeEvaluateParams: + phase = _required_string(params, "phase") + expression = _required_string(params, "expression") + name = _optional_string(params, "name") or "*" + return _eval_params( + "(() => {\n" + " return globalThis.CDPMod.addMiddleware({\n" + f" name: {json.dumps(name)},\n" + f" phase: {json.dumps(phase)},\n" + f" expression: {json.dumps(expression)},\n" + " handler: async (payload, next, context = {}) => {\n" + " const cdp = globalThis.CDPMod.attachToSession(context.cdpSessionId ?? null);\n" + " const CDPMod = globalThis.CDPMod;\n" + " const chrome = globalThis.chrome;\n" + f" const middleware = ({expression});\n" + " return await middleware(payload, next, context);\n" + " },\n" + " });\n" + "})()" + ) + + +def _wrap_custom_command(method: str, params: ProtocolParams, session_id: str) -> RuntimeEvaluateParams: + return _eval_params( + f"globalThis.CDPMod.handleCommand(" + f"{json.dumps(method)}, {json.dumps(params)}, " + f"{json.dumps(session_id)})" + ) + + +def _wrap_service_worker_command(method: str, params: ProtocolParams, session_id: str) -> list[TranslatedStep]: + if method == "Mod.ping" and "sentAt" not in params: + params = {**params, "sentAt": int(time.time() * 1000)} + + if method == "Mod.addCustomEvent": + name = _required_string(params, "name") + return [ + {"method": "Runtime.addBinding", "params": {"name": binding_name_for(name)}}, + { + "method": "Runtime.evaluate", + "params": _wrap_cdpmod_add_custom_event(params), + "unwrap": "evaluate", + }, + ] + if method == "Mod.evaluate": + runtime_params = _wrap_cdpmod_evaluate(params, session_id) + elif method == "Mod.addCustomCommand": + runtime_params = _wrap_cdpmod_add_custom_command(params) + elif method == "Mod.addMiddleware": + runtime_params = _wrap_cdpmod_add_middleware(params) + else: + runtime_params = _wrap_custom_command(method, params, _optional_string(params, "cdpSessionId") or session_id) + return [{"method": "Runtime.evaluate", "params": runtime_params, "unwrap": "evaluate"}] + + +def wrap_command_if_needed( + method: str, + params: ProtocolParams | None = None, + *, + routes: CDPModRoutes | None = None, + cdp_session_id: str | None = None, +) -> TranslatedCommand: + params = params or {} + route = route_for(method, routes or DEFAULT_CLIENT_ROUTES) + if route == "direct_cdp": + return {"route": route, "target": "direct_cdp", "steps": [{"method": method, "params": params}]} + if route == "service_worker": + if cdp_session_id is None: + raise RuntimeError(f"service_worker route requires a CDP session id for {method}") + return { + "route": route, + "target": "service_worker", + "steps": _wrap_service_worker_command(method, params, cdp_session_id), + } + raise RuntimeError(f"Unsupported client route '{route}' for {method}") + + +def _unwrap_evaluate_response(result: ProtocolResult) -> JsonValue: + if result.get("exceptionDetails"): + ex = _object_or_empty(result.get("exceptionDetails")) + exception = _object_or_empty(ex.get("exception")) + description = exception.get("description") + text = ex.get("text") + msg = ( + description + if isinstance(description, str) + else text + if isinstance(text, str) + else "Runtime.evaluate failed" + ) + raise RuntimeError(msg) + inner = _object_or_empty(result.get("result")) + return inner.get("value") + + +def unwrap_response_if_needed(result: ProtocolResult, unwrap: str | None = None) -> JsonValue: + return _unwrap_evaluate_response(result) if unwrap == "evaluate" else (result or {}) + + +def unwrap_event_if_needed( + method: str, + params: ProtocolParams, + session_id: str | None = None, + our_session_id: str | None = None, +) -> UnwrappedCDPModEvent | None: + if method != "Runtime.bindingCalled": + return None + binding_name = params.get("name") + if not isinstance(binding_name, str): + return None + event = event_name_for(binding_name) + if event is None: + return None + raw_payload = params.get("payload") + if not isinstance(raw_payload, str): + return None + try: + parsed: object = json.loads(raw_payload) + except json.JSONDecodeError: + return None + if not isinstance(parsed, dict): + return None + payload = cast(ProtocolPayload, parsed) + if our_session_id is not None and payload.get("cdpSessionId") and payload["cdpSessionId"] != our_session_id: + return None + data_value = payload["data"] if "data" in payload else payload + data: ProtocolPayload = data_value if isinstance(data_value, dict) else {"value": data_value} + unwrapped: UnwrappedCDPModEvent = {"event": event, "data": data, "sessionId": session_id} + return unwrapped diff --git a/client/python/cdpmod/types.py b/client/python/cdpmod/types.py new file mode 100644 index 0000000..e0c89f2 --- /dev/null +++ b/client/python/cdpmod/types.py @@ -0,0 +1,167 @@ +from __future__ import annotations + +from collections.abc import Callable, Mapping +from queue import Queue +from typing import Literal, Protocol, TypeAlias, TypedDict + +JsonPrimitive: TypeAlias = None | bool | int | float | str +JsonValue: TypeAlias = JsonPrimitive | list["JsonValue"] | dict[str, "JsonValue"] +JsonObject: TypeAlias = dict[str, JsonValue] + +ProtocolParams: TypeAlias = Mapping[str, JsonValue] +ProtocolResult: TypeAlias = dict[str, JsonValue] +ProtocolPayload: TypeAlias = dict[str, JsonValue] +FrameParams: TypeAlias = Mapping[str, object] +CDPModRoutes: TypeAlias = dict[str, str] + + +class _CDPModAddCustomCommandRequired(TypedDict): + name: str + expression: str + + +class CDPModAddCustomCommandParams(_CDPModAddCustomCommandRequired, total=False): + paramsSchema: JsonValue + resultSchema: JsonValue + + +class _CDPModAddCustomEventObjectRequired(TypedDict): + name: str + + +class CDPModAddCustomEventObjectParams(_CDPModAddCustomEventObjectRequired, total=False): + eventSchema: JsonValue + + +CDPModAddCustomEventParams: TypeAlias = str | CDPModAddCustomEventObjectParams + + +class _CDPModAddMiddlewareRequired(TypedDict): + phase: Literal["request", "response", "event"] + expression: str + + +class CDPModAddMiddlewareParams(_CDPModAddMiddlewareRequired, total=False): + name: str + + +class CDPModPingLatency(TypedDict): + sentAt: int + receivedAt: int | float | None + returnedAt: int + roundTripMs: int + serviceWorkerMs: int | float | None + returnPathMs: int | float | None + + +class CDPModConnectTiming(TypedDict): + started_at: int + extension_source: str | None + extension_started_at: int + extension_completed_at: int + extension_duration_ms: int + connected_at: int + duration_ms: int + + +class CDPModCommandTiming(TypedDict): + method: str + target: str + started_at: int + completed_at: int + duration_ms: int + + +class CDPModRawTiming(TypedDict): + method: str + started_at: int + completed_at: int + duration_ms: int + + +class CDPModServerConfig(TypedDict, total=False): + loopback_cdp_url: str | None + routes: CDPModRoutes + browserToken: str | None + custom_commands: list[CDPModAddCustomCommandParams] + custom_events: list[CDPModAddCustomEventObjectParams] + custom_middlewares: list[CDPModAddMiddlewareParams] + + +class LaunchOptions(TypedDict, total=False): + executable_path: str + port: int + headless: bool + sandbox: bool + extra_args: list[str] + + +RuntimeEvaluateParams: TypeAlias = dict[str, JsonValue] + + +class _TranslatedStepRequired(TypedDict): + method: str + + +class TranslatedStep(_TranslatedStepRequired, total=False): + params: FrameParams + unwrap: Literal["evaluate"] + + +class TranslatedCommand(TypedDict): + route: str + target: Literal["direct_cdp", "service_worker"] + steps: list[TranslatedStep] + + +class CdpError(TypedDict, total=False): + message: str + + +class CdpFrame(TypedDict, total=False): + id: int + method: str + params: FrameParams + sessionId: str + result: ProtocolResult + error: CdpError + + +class TargetInfo(TypedDict): + targetId: str + type: str + url: str + + +class ExtensionProbe(TypedDict): + extension_id: str + target_id: str + url: str + session_id: str + + +class ExtensionInfo(ExtensionProbe): + source: str + + +class BorrowedExtensionInfo(ExtensionInfo, total=False): + has_tabs: bool + has_debugger: bool + + +class UnwrappedCDPModEvent(TypedDict): + event: str + data: ProtocolPayload + sessionId: str | None + + +Handler: TypeAlias = Callable[[ProtocolPayload], None] +PendingEntry: TypeAlias = tuple[str, Queue[CdpFrame]] + + +class WebSocketLike(Protocol): + def send(self, payload: str) -> object: ... + + def recv(self) -> str | bytes | None: ... + + def close(self) -> object: ... diff --git a/client/python/demo.py b/client/python/demo.py index 3e1e65a..ee39247 100644 --- a/client/python/demo.py +++ b/client/python/demo.py @@ -1,4 +1,4 @@ -"""Python demo for MagicCDPClient. Mirrors client/js/demo.js. +"""Python demo for CDPModClient. Mirrors client/js/demo.js. Modes (mirror the JS / Go demos): --live Use the running Google Chrome enabled via chrome://inspect. @@ -11,18 +11,16 @@ import json import os -import shutil -import socket import subprocess import sys -import tempfile import threading import time import urllib.request from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent)) -from MagicCDPClient import MagicCDPClient +from cdpmod import CDPModClient +from cdpmod.types import JsonValue, ProtocolPayload ROOT = Path(__file__).resolve().parent.parent.parent EXTENSION_PATH = ROOT / "dist" / "extension" @@ -40,26 +38,23 @@ ) -def free_port(): - s = socket.socket() - s.bind(("127.0.0.1", 0)) - port = s.getsockname()[1] - s.close() - return port +def expect_object(value: JsonValue, label: str) -> ProtocolPayload: + if not isinstance(value, dict): + raise RuntimeError(f"{label} returned non-object value: {value!r}") + return value -def wait_for_url(url, timeout_s=8.0): - deadline = time.monotonic() + timeout_s - while time.monotonic() < deadline: - try: - with urllib.request.urlopen(url, timeout=0.5) as r: - return json.loads(r.read()) - except Exception: - time.sleep(0.05) - raise RuntimeError(f"timeout waiting for {url}") +def server_routes_for(mode: str) -> ProtocolPayload: + route = "loopback_cdp" if mode == "loopback" else "chrome_debugger" if mode == "debugger" else "auto" + routes: ProtocolPayload = { + "Mod.*": "service_worker", + "Custom.*": "service_worker", + "*.*": route, + } + return routes -def client_options_for(mode, cdp_url): +def client_options_for(mode, cdp_url, launch_options=None): direct_normal_event_routes = { "Target.setDiscoverTargets": "direct_cdp", "Target.createTarget": "direct_cdp", @@ -69,20 +64,20 @@ def client_options_for(mode, cdp_url): return { "cdp_url": cdp_url, "extension_path": str(EXTENSION_PATH), - "routes": {"Magic.*": "service_worker", "Custom.*": "service_worker", "*.*": "direct_cdp", **direct_normal_event_routes}, + "launch_options": launch_options or {}, + "routes": {"Mod.*": "service_worker", "Custom.*": "service_worker", "*.*": "direct_cdp", **direct_normal_event_routes}, } + server = { + "routes": server_routes_for(mode), + } + if cdp_url and mode == "loopback": + server["loopback_cdp_url"] = cdp_url return { "cdp_url": cdp_url, "extension_path": str(EXTENSION_PATH), - "routes": {"Magic.*": "service_worker", "Custom.*": "service_worker", "*.*": "service_worker", **direct_normal_event_routes}, - "server": { - "routes": { - "Magic.*": "service_worker", - "Custom.*": "service_worker", - "*.*": "loopback_cdp" if mode == "loopback" else "chrome_debugger", - }, - "loopback_cdp_url": cdp_url if mode == "loopback" else None, - }, + "launch_options": launch_options or {}, + "routes": {"Mod.*": "service_worker", "Custom.*": "service_worker", "*.*": "service_worker", **direct_normal_event_routes}, + "server": server, } @@ -111,37 +106,21 @@ def main(): mode = "debugger" if "debugger" in flags else "direct" if "direct" in flags else "loopback" if "loopback" in flags else "direct" if live else "loopback" print(f"== mode: {'live/' if live else ''}{mode} ==") - # Allocate cleanup handles up front so an early failure (port allocation, - # mkdtemp, Popen, /json/version probe) still hits the try/finally and - # releases the temp profile dir + any partially-started Chrome. - chrome_proc = None - profile_dir = None cdp = None try: if live: cdp_url = wait_for_live_cdp_url() + launch_options = {} else: - chrome_port = free_port() - profile_dir = tempfile.mkdtemp(prefix="magic-cdp-py.") - chrome_args = [ - CHROME, - "--disable-gpu", - "--enable-unsafe-extension-debugging", "--remote-allow-origins=*", - "--no-first-run", "--no-default-browser-check", - f"--remote-debugging-port={chrome_port}", - f"--user-data-dir={profile_dir}", - f"--load-extension={EXTENSION_PATH}", - "about:blank", - ] - if sys.platform.startswith("linux"): - chrome_args.insert(1, "--headless=new") - chrome_args.insert(2, "--no-sandbox") - chrome_proc = subprocess.Popen(chrome_args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - http_url = f"http://127.0.0.1:{chrome_port}" - cdp_url = wait_for_url(f"{http_url}/json/version")["webSocketDebuggerUrl"] - print(f"upstream cdp: {cdp_url}") - - cdp = MagicCDPClient(**client_options_for(mode, cdp_url)) + cdp_url = None + launch_options = { + "executable_path": CHROME, + "headless": sys.platform.startswith("linux"), + "sandbox": not sys.platform.startswith("linux"), + "extra_args": [f"--load-extension={EXTENSION_PATH}"], + } + + cdp = CDPModClient(**client_options_for(mode, cdp_url, launch_options)) foreground_events = [] target_created_events = [] events_lock = threading.Lock() @@ -159,35 +138,99 @@ def on_foreground_changed(payload, *_): cdp.on("Target.targetCreated", on_target_created) cdp.connect() + print(f"upstream cdp: {cdp.cdp_url}") print(f"connected; ext {cdp.extension_id} session {cdp.ext_session_id}") print(f"ping latency -> {cdp.latency}") - try: print(f"Browser.getVersion -> {cdp.send('Browser.getVersion')}") - except Exception as e: print(f"Browser.getVersion -> (rejected by route: {str(e).splitlines()[0]} )") - - magic_eval = cdp.send("Magic.evaluate", {"expression": "({ extensionId: chrome.runtime.id })"}) - if magic_eval.get("extensionId") != cdp.extension_id: - raise RuntimeError(f"unexpected Magic.evaluate result {magic_eval}") - print(f"Magic.evaluate -> {magic_eval}") + configure_params: ProtocolPayload = {"routes": server_routes_for(mode)} + if mode == "loopback": + if cdp.cdp_url is None: + raise RuntimeError("loopback mode requires a resolved cdp_url after connect") + configure_params["loopback_cdp_url"] = cdp.cdp_url + configure_result = expect_object(cdp.send("Mod.configure", configure_params), "Mod.configure") + if expect_object(configure_result.get("routes"), "Mod.configure.routes").get("*.*") != server_routes_for(mode)["*.*"]: + raise RuntimeError(f"unexpected Mod.configure result {configure_result}") + print(f"Mod.configure -> {configure_result.get('routes')}") + + pong_events = [] + pong_lock = threading.Lock() + ping_sent_at = int(time.time() * 1000) + + def on_pong(payload, *_): + with pong_lock: + pong_events.append(payload) + + cdp.on("Mod.pong", on_pong) + ping_result = expect_object(cdp.send("Mod.ping", {"sentAt": ping_sent_at}), "Mod.ping") + deadline = time.monotonic() + 3.0 + while True: + with pong_lock: + pong = next((event for event in pong_events if event.get("sentAt") == ping_sent_at), None) + if pong or time.monotonic() >= deadline: + break + time.sleep(0.02) + if ping_result.get("ok") is not True or not pong or pong.get("from") != "extension-service-worker": + raise RuntimeError(f"unexpected Mod.ping/Mod.pong result ping={ping_result} pong={pong}") + print(f"Mod.ping/pong -> {ping_result} {pong}") - cdp.send("Magic.addCustomCommand", { + if mode == "debugger": + try: + version = expect_object(cdp.send("Browser.getVersion"), "Browser.getVersion") + if not isinstance(version.get("protocolVersion"), str) or not isinstance(version.get("product"), str): + raise RuntimeError(f"unexpected Browser.getVersion result {version}") + print(f"Browser.getVersion -> {version}") + except Exception as e: + print(f"Browser.getVersion -> (debugger route rejected: {str(e).splitlines()[0]} )") + runtime_eval = expect_object(cdp.send("Runtime.evaluate", {"expression": "(() => 42)()", "returnByValue": True}), "Runtime.evaluate") + result = expect_object(runtime_eval.get("result"), "Runtime.evaluate.result") + if result.get("value") != 42: + raise RuntimeError(f"unexpected Runtime.evaluate result {runtime_eval}") + print(f"Runtime.evaluate -> {runtime_eval}") + else: + version = expect_object(cdp.send("Browser.getVersion"), "Browser.getVersion") + if not isinstance(version.get("protocolVersion"), str) or not isinstance(version.get("product"), str): + raise RuntimeError(f"unexpected Browser.getVersion result {version}") + print(f"Browser.getVersion -> {version}") + + cdpmod_eval = expect_object(cdp.send("Mod.evaluate", {"expression": "({ extensionId: chrome.runtime.id })"}), "Mod.evaluate") + if cdpmod_eval.get("extensionId") != cdp.extension_id: + raise RuntimeError(f"unexpected Mod.evaluate result {cdpmod_eval}") + print(f"Mod.evaluate -> {cdpmod_eval}") + + echo_registration = expect_object(cdp.send("Mod.addCustomCommand", { + "name": "Custom.echo", + "expression": "async (params, method) => ({ echoed: params.value, method })", + }), "Mod.addCustomCommand Custom.echo") + if echo_registration.get("registered") is not True or echo_registration.get("name") != "Custom.echo": + raise RuntimeError(f"unexpected Custom.echo registration {echo_registration}") + echo_result = expect_object(cdp.send("Custom.echo", {"value": "custom-command-ok"}), "Custom.echo") + if echo_result.get("echoed") != "custom-command-ok" or echo_result.get("method") != "Custom.echo": + raise RuntimeError(f"unexpected Custom.echo result {echo_result}") + print(f"Custom.echo -> {echo_result}") + + tab_command_registration = expect_object(cdp.send("Mod.addCustomCommand", { "name": "Custom.TabIdFromTargetId", "expression": '''async ({ targetId }) => { const targets = await chrome.debugger.getTargets(); const target = targets.find(target => target.id === targetId); return { tabId: target?.tabId ?? null }; }''', - }) - cdp.send("Magic.addCustomCommand", { + }), "Mod.addCustomCommand Custom.TabIdFromTargetId") + if tab_command_registration.get("registered") is not True: + raise RuntimeError(f"unexpected TabIdFromTargetId registration {tab_command_registration}") + target_command_registration = expect_object(cdp.send("Mod.addCustomCommand", { "name": "Custom.targetIdFromTabId", "expression": '''async ({ tabId }) => { const targets = await chrome.debugger.getTargets(); const target = targets.find(target => target.type === "page" && target.tabId === tabId); return { targetId: target?.id ?? null }; }''', - }) + }), "Mod.addCustomCommand Custom.targetIdFromTabId") + if target_command_registration.get("registered") is not True: + raise RuntimeError(f"unexpected targetIdFromTabId registration {target_command_registration}") + middleware_registered = False for phase in ("response", "event"): - cdp.send("Magic.addMiddleware", { + middleware_registration = expect_object(cdp.send("Mod.addMiddleware", { "name": "*", "phase": phase, "expression": '''async (payload, next) => { @@ -204,11 +247,43 @@ def on_foreground_changed(payload, *_): await visit(payload); return next(payload); }''', - }) + }), f"Mod.addMiddleware {phase}") + if middleware_registration.get("registered") is not True or middleware_registration.get("phase") != phase: + raise RuntimeError(f"unexpected {phase} middleware registration {middleware_registration}") + middleware_registered = True + if not middleware_registered: + raise RuntimeError("middleware registration loop did not run") + + demo_events = [] + demo_lock = threading.Lock() + + def on_demo_event(payload, *_): + with demo_lock: + demo_events.append(payload) + + demo_event_registration = expect_object(cdp.send("Mod.addCustomEvent", {"name": "Custom.demoEvent"}), "Mod.addCustomEvent Custom.demoEvent") + if demo_event_registration.get("registered") is not True or demo_event_registration.get("name") != "Custom.demoEvent": + raise RuntimeError(f"unexpected Custom.demoEvent registration {demo_event_registration}") + cdp.on("Custom.demoEvent", on_demo_event) + emit_result = expect_object(cdp.send("Mod.evaluate", {"expression": '''async () => await CDPMod.emit("Custom.demoEvent", { value: "custom-event-ok" })'''}), "Custom.demoEvent emit") + if emit_result.get("emitted") is not True: + raise RuntimeError(f"unexpected Custom.demoEvent emit result {emit_result}") + deadline = time.monotonic() + 3.0 + while True: + with demo_lock: + demo_event = next((event for event in demo_events if event.get("value") == "custom-event-ok"), None) + if demo_event or time.monotonic() >= deadline: + break + time.sleep(0.02) + if not demo_event: + raise RuntimeError("expected Custom.demoEvent") + print(f"Custom.demoEvent -> {demo_event}") - cdp.send("Magic.addCustomEvent", {"name": "Custom.foregroundTargetChanged"}) + foreground_event_registration = expect_object(cdp.send("Mod.addCustomEvent", {"name": "Custom.foregroundTargetChanged"}), "Mod.addCustomEvent Custom.foregroundTargetChanged") + if foreground_event_registration.get("registered") is not True: + raise RuntimeError(f"unexpected foreground event registration {foreground_event_registration}") cdp.on("Custom.foregroundTargetChanged", on_foreground_changed) - cdp.send("Magic.evaluate", {"expression": '''chrome.tabs.onActivated.addListener(async ({ tabId }) => { + cdp.send("Mod.evaluate", {"expression": '''chrome.tabs.onActivated.addListener(async ({ tabId }) => { const targets = await chrome.debugger.getTargets(); const target = targets.find(target => target.type === "page" && target.tabId === tabId); const tab = await chrome.tabs.get(tabId).catch(() => null); @@ -216,7 +291,7 @@ def on_foreground_changed(payload, *_): })'''}) cdp.send("Target.setDiscoverTargets", {"discover": True}) - created_target = cdp.send("Target.createTarget", {"url": "https://example.com"}) + created_target = expect_object(cdp.send("Target.createTarget", {"url": "https://example.com", "background": True}), "Target.createTarget") created_target_id = created_target.get("targetId") if not created_target_id: raise RuntimeError(f"Target.createTarget returned no targetId: {created_target}") @@ -231,6 +306,11 @@ def on_foreground_changed(payload, *_): raise RuntimeError(f"expected Target.targetCreated for {created_target_id}") print(f"normal event matched -> {created_target_id}") + tab_from_target = expect_object(cdp.send("Custom.TabIdFromTargetId", {"targetId": created_target_id}), "Custom.TabIdFromTargetId") + if not isinstance(tab_from_target.get("tabId"), int | float): + raise RuntimeError(f"unexpected Custom.TabIdFromTargetId result {tab_from_target}") + print(f"Custom.TabIdFromTargetId -> {tab_from_target}") + cdp.send("Target.activateTarget", {"targetId": created_target_id}) deadline = time.monotonic() + 3.0 while True: @@ -241,13 +321,10 @@ def on_foreground_changed(payload, *_): time.sleep(0.02) if not foreground: raise RuntimeError(f"expected Custom.foregroundTargetChanged for {created_target_id}") - - tab_from_target = cdp.send("Custom.TabIdFromTargetId", {"targetId": created_target_id}) if tab_from_target.get("tabId") != foreground.get("tabId"): - raise RuntimeError(f"unexpected Custom.TabIdFromTargetId result {tab_from_target}") - print(f"Custom.TabIdFromTargetId -> {tab_from_target}") + raise RuntimeError(f"unexpected Custom.foregroundTargetChanged result {foreground}") - target_from_tab = cdp.send("Custom.targetIdFromTabId", {"tabId": foreground["tabId"]}) + target_from_tab = expect_object(cdp.send("Custom.targetIdFromTabId", {"tabId": foreground["tabId"]}), "Custom.targetIdFromTabId") if target_from_tab.get("targetId") != created_target_id or target_from_tab.get("tabId") != foreground.get("tabId"): raise RuntimeError(f"unexpected Custom.targetIdFromTabId/middleware result {target_from_tab}") print(f"Custom.targetIdFromTabId -> {target_from_tab}") @@ -258,7 +335,7 @@ def on_foreground_changed(payload, *_): # watch events as they print. Skip when run non-interactively so the # demo stays CI-friendly. if sys.stdin.isatty(): - cdp.on("Magic.pong", lambda e: print(f"\n[event] Magic.pong {e}")) + cdp.on("Mod.pong", lambda e: print(f"\n[event] Mod.pong {e}")) run_repl(cdp, mode) return 0 @@ -266,12 +343,6 @@ def on_foreground_changed(payload, *_): if cdp is not None: try: cdp.close() except Exception: pass - if chrome_proc is not None: - chrome_proc.terminate() - try: chrome_proc.wait(timeout=3) - except Exception: chrome_proc.kill() - if profile_dir is not None: - shutil.rmtree(profile_dir, ignore_errors=True) def run_repl(cdp, mode): @@ -279,13 +350,13 @@ def run_repl(cdp, mode): print(f"\nBrowser remains running. Mode: {mode}.") print("Enter commands as Domain.method({...JSON params...}). Examples:") print(' Browser.getVersion({})') - print(' Magic.evaluate({"expression": "chrome.tabs.query({active: true})"})') + print(' Mod.evaluate({"expression": "chrome.tabs.query({active: true})"})') print(' Custom.TabIdFromTargetId({"targetId": "..."})') print("Type exit or quit to disconnect (browser keeps running).") cmd_re = re.compile(r"^([A-Za-z_]\w*\.[A-Za-z_]\w*)(?:\((.*)\))?$") while True: try: - line = input("MagicCDP> ").strip() + line = input("CDPMod> ").strip() except (EOFError, KeyboardInterrupt): print() break diff --git a/client/python/pyproject.toml b/client/python/pyproject.toml index 3acec5e..367a187 100644 --- a/client/python/pyproject.toml +++ b/client/python/pyproject.toml @@ -1,5 +1,11 @@ [project] -name = "magic-cdp-python-client" +name = "cdpmod" version = "0.0.0" requires-python = ">=3.10" dependencies = ["websocket-client>=1.8.0"] + +[dependency-groups] +dev = [ + "pyright>=1.1.409", + "ty>=0.0.34", +] diff --git a/client/python/translate.py b/client/python/translate.py deleted file mode 100644 index 8299114..0000000 --- a/client/python/translate.py +++ /dev/null @@ -1,193 +0,0 @@ -"""Pure MagicCDP <-> CDP translation helpers for the Python client.""" - -import json -import time - -BINDING_PREFIX = "__MagicCDP_" - -DEFAULT_CLIENT_ROUTES = { - "Magic.*": "service_worker", - "Custom.*": "service_worker", - "*.*": "service_worker", -} - - -def binding_name_for(event_name: str) -> str: - return BINDING_PREFIX + event_name.replace(".", "_") - - -def event_name_for(binding_name: str): - if not binding_name.startswith(BINDING_PREFIX): - return None - return binding_name[len(BINDING_PREFIX):].replace("_", ".") - - -def route_for(method: str, routes: dict) -> str: - routes = routes or {} - if method in routes: - return routes[method] - best_prefix_len = -1 - best_route = None - for pattern, route in routes.items(): - if pattern == "*.*" or not pattern.endswith(".*"): - continue - prefix = pattern[:-1] - if method.startswith(prefix) and len(prefix) > best_prefix_len: - best_prefix_len = len(prefix) - best_route = route - if best_route is not None: - return best_route - if "*.*" in routes: - return routes["*.*"] - return "direct_cdp" - - -def _eval_params(expression: str): - return { - "expression": expression, - "awaitPromise": True, - "returnByValue": True, - "allowUnsafeEvalBlockedByCSP": True, - } - - -def _wrap_magic_evaluate(params: dict, session_id: str): - expression = params["expression"] - user_params = params.get("params", {}) - cdp_session_id = params.get("cdpSessionId") or session_id - return _eval_params( - "(async () => {\n" - f" const params = {json.dumps(user_params)};\n" - f" const cdp = globalThis.MagicCDP.attachToSession({json.dumps(cdp_session_id)});\n" - " const MagicCDP = globalThis.MagicCDP;\n" - " const chrome = globalThis.chrome;\n" - f" const value = ({expression});\n" - " return typeof value === 'function' ? await value(params) : value;\n" - "})()" - ) - - -def _wrap_magic_add_custom_command(params: dict): - return _eval_params( - "(() => {\n" - " return globalThis.MagicCDP.addCustomCommand({\n" - f" name: {json.dumps(params['name'])},\n" - f" paramsSchema: {json.dumps(params.get('paramsSchema'))},\n" - f" resultSchema: {json.dumps(params.get('resultSchema'))},\n" - f" expression: {json.dumps(params['expression'])},\n" - " handler: async (params, cdpSessionId) => {\n" - " const cdp = globalThis.MagicCDP.attachToSession(cdpSessionId);\n" - " const MagicCDP = globalThis.MagicCDP;\n" - " const chrome = globalThis.chrome;\n" - f" const handler = ({params['expression']});\n" - " return await handler(params || {});\n" - " },\n" - " });\n" - "})()" - ) - - -def _wrap_magic_add_custom_event(params: dict): - return _eval_params( - "globalThis.MagicCDP.addCustomEvent({\n" - f" name: {json.dumps(params['name'])},\n" - f" bindingName: {json.dumps(binding_name_for(params['name']))},\n" - f" eventSchema: {json.dumps(params.get('eventSchema'))},\n" - "})" - ) - - -def _wrap_magic_add_middleware(params: dict): - return _eval_params( - "(() => {\n" - " return globalThis.MagicCDP.addMiddleware({\n" - f" name: {json.dumps(params.get('name', '*'))},\n" - f" phase: {json.dumps(params['phase'])},\n" - f" expression: {json.dumps(params['expression'])},\n" - " handler: async (payload, next, context = {}) => {\n" - " const cdp = globalThis.MagicCDP.attachToSession(context.cdpSessionId ?? null);\n" - " const MagicCDP = globalThis.MagicCDP;\n" - " const chrome = globalThis.chrome;\n" - f" const middleware = ({params['expression']});\n" - " return await middleware(payload, next, context);\n" - " },\n" - " });\n" - "})()" - ) - - -def _wrap_custom_command(method: str, params: dict, session_id: str): - return _eval_params( - f"globalThis.MagicCDP.handleCommand(" - f"{json.dumps(method)}, {json.dumps(params)}, " - f"{json.dumps(session_id)})" - ) - - -def _wrap_service_worker_command(method: str, params: dict, session_id: str): - if method == "Magic.ping" and "sentAt" not in params: - params = {**params, "sentAt": int(time.time() * 1000)} - - if method == "Magic.addCustomEvent": - return [ - {"method": "Runtime.addBinding", "params": {"name": binding_name_for(params["name"])}}, - { - "method": "Runtime.evaluate", - "params": _wrap_magic_add_custom_event(params), - "unwrap": "evaluate", - }, - ] - if method == "Magic.evaluate": - runtime_params = _wrap_magic_evaluate(params, session_id) - elif method == "Magic.addCustomCommand": - runtime_params = _wrap_magic_add_custom_command(params) - elif method == "Magic.addMiddleware": - runtime_params = _wrap_magic_add_middleware(params) - else: - runtime_params = _wrap_custom_command(method, params, params.get("cdpSessionId") or session_id) - return [{"method": "Runtime.evaluate", "params": runtime_params, "unwrap": "evaluate"}] - - -def wrap_command_if_needed(method: str, params=None, *, routes=None, cdp_session_id=None): - params = params or {} - route = route_for(method, routes or DEFAULT_CLIENT_ROUTES) - if route == "direct_cdp": - return {"route": route, "target": "direct_cdp", "steps": [{"method": method, "params": params}]} - if route == "service_worker": - return { - "route": route, - "target": "service_worker", - "steps": _wrap_service_worker_command(method, params, cdp_session_id), - } - raise RuntimeError(f"Unsupported client route '{route}' for {method}") - - -def _unwrap_evaluate_response(result: dict): - if result.get("exceptionDetails"): - ex = result["exceptionDetails"] - msg = (ex.get("exception") or {}).get("description") or ex.get("text") or "Runtime.evaluate failed" - raise RuntimeError(msg) - inner = result.get("result") or {} - return inner.get("value") - - -def unwrap_response_if_needed(result: dict, unwrap=None): - return _unwrap_evaluate_response(result) if unwrap == "evaluate" else (result or {}) - - -def unwrap_event_if_needed(method: str, params: dict, session_id=None, our_session_id=None): - if method != "Runtime.bindingCalled": - return None - event = event_name_for(params.get("name") or "") - if event is None: - return None - try: - payload = json.loads(params.get("payload") or "{}") - except json.JSONDecodeError: - return None - if not isinstance(payload, dict): - return None - if our_session_id is not None and payload.get("cdpSessionId") and payload["cdpSessionId"] != our_session_id: - return None - data = payload["data"] if "data" in payload else payload - return {"event": event, "data": data, "sessionId": session_id} diff --git a/client/python/uv.lock b/client/python/uv.lock index 0488b93..3fa584f 100644 --- a/client/python/uv.lock +++ b/client/python/uv.lock @@ -3,16 +3,83 @@ revision = 3 requires-python = ">=3.10" [[package]] -name = "magic-cdp-python-client" +name = "cdpmod" version = "0.0.0" source = { virtual = "." } dependencies = [ { name = "websocket-client" }, ] +[package.dev-dependencies] +dev = [ + { name = "pyright" }, + { name = "ty" }, +] + [package.metadata] requires-dist = [{ name = "websocket-client", specifier = ">=1.8.0" }] +[package.metadata.requires-dev] +dev = [ + { name = "pyright", specifier = ">=1.1.409" }, + { name = "ty", specifier = ">=0.0.34" }, +] + +[[package]] +name = "nodeenv" +version = "1.10.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/24/bf/d1bda4f6168e0b2e9e5958945e01910052158313224ada5ce1fb2e1113b8/nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb", size = 55611, upload-time = "2025-12-20T14:08:54.006Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/b2/d0896bdcdc8d28a7fc5717c305f1a861c26e18c05047949fb371034d98bd/nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827", size = 23438, upload-time = "2025-12-20T14:08:52.782Z" }, +] + +[[package]] +name = "pyright" +version = "1.1.409" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nodeenv" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/51/4e/3aa27f74211522dba7e9cbc3e74de779c6d4b654c54e50a4840623be8014/pyright-1.1.409.tar.gz", hash = "sha256:986ee05beca9e077c165758ad123667c679e050059a2546aa02473930394bc93", size = 4430434, upload-time = "2026-04-23T11:02:03.799Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/16/6b/330d8ebae582b30c2959a1ef4c3bc344ebde48c2ff0c3f113c4710735e11/pyright-1.1.409-py3-none-any.whl", hash = "sha256:aa3ea228cab90c845c7a60d28db7a844c04315356392aa09fafcee98c8c22fb3", size = 6438161, upload-time = "2026-04-23T11:02:01.309Z" }, +] + +[[package]] +name = "ty" +version = "0.0.34" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c4/69/e24eefe2c35c0fdbdec9b60e162727af669bb76d64d993d982eb67b24c38/ty-0.0.34.tar.gz", hash = "sha256:a6efe66b0f13c03a65e6c72ec9abfe2792e2fd063c74fa67e2c4930e29d661be", size = 5585933, upload-time = "2026-05-01T23:06:46.388Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/83/7b/8b85003d6639ef17a97dcbb31f4511cfe78f1c81a964470db100c8c883e7/ty-0.0.34-py3-none-linux_armv6l.whl", hash = "sha256:9ecc3d14f07a95a6ceb88e07f8e62358dbd37325d3d5bd56da7217ff1fef7fb8", size = 11067094, upload-time = "2026-05-01T23:06:21.133Z" }, + { url = "https://files.pythonhosted.org/packages/d7/25/b0098f65b020b015c40567c763fc66fffbec88b2ba6f584bca1e92f05ebb/ty-0.0.34-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:0dccffd8a9d02321cd2dee3249df205e26d62694e741f4eeca36b157fd8b419f", size = 10840909, upload-time = "2026-05-01T23:06:18.409Z" }, + { url = "https://files.pythonhosted.org/packages/e4/55/5e4adcf7d2a1006b844903b27cb81244a9b748d850433a46a6c21776c401/ty-0.0.34-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b0ea47a2998e167ab3b21d2f4b5309a9cf33c297809f6d7e3e753252223174d0", size = 10279378, upload-time = "2026-05-01T23:06:37.962Z" }, + { url = "https://files.pythonhosted.org/packages/4d/91/f537dca0db8fe2558e8ab04d8941d687b384fcc1df5eb9023b2db75ac26c/ty-0.0.34-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b37da00b41a118a459ae56d8947e70651073fb33ebfbceb820e4a10b22d5023", size = 10817423, upload-time = "2026-05-01T23:06:26.247Z" }, + { url = "https://files.pythonhosted.org/packages/2c/c4/55a3ad1da2815af1009bdc1b8c90dc11a364cd314e4b48c5128ba9d38859/ty-0.0.34-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:81cbbb93c2342fe3de43e625d3a9eb149633e9f485e816ebf6395d08685355d8", size = 10851826, upload-time = "2026-05-01T23:06:24.198Z" }, + { url = "https://files.pythonhosted.org/packages/ce/8c/9c7606af22d73fb43ea4369472d9c66ece11231be73b0efe8e3c61655559/ty-0.0.34-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c5b4dea1594a021289e172582df9cde7089dce14b276fc650e7b212b1772e12", size = 11356318, upload-time = "2026-05-01T23:06:51.139Z" }, + { url = "https://files.pythonhosted.org/packages/20/54/bb423f663721ab4138b216425c6b55eaefd3a068243b24d6d8fe988f4e13/ty-0.0.34-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:030fb00aa2d2a5b5ae9d9183d574e0c82dae80566700a7490c43669d8ece40cd", size = 11902968, upload-time = "2026-05-01T23:06:35.82Z" }, + { url = "https://files.pythonhosted.org/packages/b6/22/01122b21ab6b534a2f618c6bbe5f1f7f49fd56f4b2ec8887cd6d40d08fb3/ty-0.0.34-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ae9555e24e36c63a8218e037a5a63f15579eb6aa94f41017e57cd41d335cfb5", size = 11548860, upload-time = "2026-05-01T23:06:42.155Z" }, + { url = "https://files.pythonhosted.org/packages/d1/50/86008b1392ec64bed1957bbcc7aaa43b466b50dfc91bb131841c21d7c5c3/ty-0.0.34-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99eb23df9ed129fc26d1ab00d6f0b8dfe5253b09c2ac6abdb11523fa70d67f10", size = 11457097, upload-time = "2026-05-01T23:06:53.477Z" }, + { url = "https://files.pythonhosted.org/packages/92/3e/4558b2296963ba99c58d8409c57d7db4f3061b656c3613cb21c02c1ef4c2/ty-0.0.34-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:85de45382016eceae69e104815eb2cfa200787df104002e262a86cbd43ed2c02", size = 10798192, upload-time = "2026-05-01T23:06:40.004Z" }, + { url = "https://files.pythonhosted.org/packages/76/bf/650d24402be2ef678528d60caac1d9477a40fc37e3792ecef07834fd7a4a/ty-0.0.34-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:14cb575fb8fa5131f5129d100cfe23c1575d23faf5dfc5158432749a3e38c9b5", size = 10890390, upload-time = "2026-05-01T23:06:33.076Z" }, + { url = "https://files.pythonhosted.org/packages/5c/ef/ccd2ca13906079f7935fd7e067661b24233017f57d987d51d6a121d85bb5/ty-0.0.34-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c6fc0b69d8450e6910ba9db34572b959b81329a97ae273c391f70e9fb6c1aade", size = 11031564, upload-time = "2026-05-01T23:06:55.812Z" }, + { url = "https://files.pythonhosted.org/packages/ba/2d/d27b72005b6f43599e3bcabab0d7135ac0c230b7a307bb99f9eea02c1cda/ty-0.0.34-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:30dfcec2f0fde3993f4f912ed0e057dcbebc8615299f610a4c2ddb7b5a3e1e06", size = 11553430, upload-time = "2026-05-01T23:06:31.096Z" }, + { url = "https://files.pythonhosted.org/packages/a7/12/20812e1ad930b8d4af70eebf19ad23cff6e31efcfa613ef884531fcdbaa1/ty-0.0.34-py3-none-win32.whl", hash = "sha256:97b77ddf007271b812a313a8f0a14929bc5590958433e1fb83ef585676f53342", size = 10436048, upload-time = "2026-05-01T23:06:49.108Z" }, + { url = "https://files.pythonhosted.org/packages/b0/6a/afa095c5987868fbda27c0f731146ac8e3d07b357adfa83daccaee5b1a16/ty-0.0.34-py3-none-win_amd64.whl", hash = "sha256:1f543968accb952705134028d1fda8656882787dbbc667ad4d6c3ba23791d604", size = 11462526, upload-time = "2026-05-01T23:06:28.514Z" }, + { url = "https://files.pythonhosted.org/packages/63/8f/bf041a06260d77662c0605e56dacfe90b786bf824cbe1aed238d15fe5e84/ty-0.0.34-py3-none-win_arm64.whl", hash = "sha256:ea09108cbcb16b6b06d7596312b433bf49681e78d30e4dc7fb3c1b248a95e09a", size = 10846945, upload-time = "2026-05-01T23:06:44.428Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, +] + [[package]] name = "websocket-client" version = "1.9.0" diff --git a/extension/CDPModServer.ts b/extension/CDPModServer.ts new file mode 100644 index 0000000..dc39298 --- /dev/null +++ b/extension/CDPModServer.ts @@ -0,0 +1,845 @@ +// CDPModServer: lives inside an extension service worker. Owns the registry +// of custom commands and event bindings, and emits events through the binding +// API installed by the client (Runtime.addBinding -> globalThis[bindingName]). +// +// The installer is intentionally self-contained so the bridge can inject the +// same server implementation into an already-running extension service worker +// when Chrome refuses Extensions.loadUnpacked. + +import type { cdp } from "../types/cdp.js"; +import type { + CdpDebuggeeCommandParams, + CDPModConfigureParams, + CDPModCustomCommandRegistration, + CDPModCustomEventRegistration, + CDPModMiddlewareRegistration, + CDPModPingParams, + CDPModRoutes, + ProtocolParams, + ProtocolPayload, + ProtocolResult, +} from "../types/cdpmod.js"; + +type MiddlewarePhase = "request" | "response" | "event"; +type CDPModGlobalScope = typeof globalThis & + Record & { + CDPMod?: { + __CDPModServerVersion?: number; + addCustomEvent?: unknown; + handleCommand?: unknown; + }; + }; + +export function installCDPModServer(globalScope: CDPModGlobalScope = globalThis as CDPModGlobalScope) { + const CDPMOD_SERVER_VERSION = 1; + if ( + globalScope.CDPMod?.__CDPModServerVersion === CDPMOD_SERVER_VERSION && + globalScope.CDPMod?.handleCommand && + globalScope.CDPMod?.addCustomEvent + ) + return globalScope.CDPMod; + + const BINDING_PREFIX = "__CDPMod_"; + const bindingNameFor = (eventName: string) => BINDING_PREFIX + eventName.replaceAll(".", "_").replaceAll("*", "all"); + const encodeBindingPayload = ({ + event, + data, + cdpSessionId = null, + }: { + event: string; + data: ProtocolPayload; + cdpSessionId?: string | null; + }) => JSON.stringify({ event, data, cdpSessionId }); + + const commandHandlers = new Map(); + const eventBindings = new Map(); + const eventListeners = new Set<(event: string, data: ProtocolPayload, cdpSessionId: string | null) => void>(); + const middlewares: Record = { + request: [], + response: [], + event: [], + }; + const attachedDebuggees = new Set(); + let runtime_types_promise: Promise | null = null; + + const targetAutoAttachParams = { + autoAttach: true, + waitForDebuggerOnStart: false, + flatten: true, + } satisfies cdp.types.ts.Target.SetAutoAttachParams; + + const defaultRoutes = { + "Mod.*": "service_worker", + "Custom.*": "service_worker", + "*.*": "auto", + } satisfies CDPModRoutes; + + const browserLevelDomains = new Set(["Browser", "Target", "SystemInfo"]); + + let nextLoopbackId = 1; + const loopbackSockets = new Map(); + const loopbackSocketPromises = new Map>(); + const loopbackTargetSessions = new Map(); + const initializedLoopbackSockets = new WeakSet(); + const loopbackPending = new Map< + number, + { resolve: (value: ProtocolResult) => void; reject: (error: Error) => void } + >(); + const offscreenKeepAlivePortName = "CDPModOffscreenKeepAlive"; + const offscreenKeepAlivePath = "offscreen/keepalive.html"; + let creatingOffscreenKeepAlive: Promise | null = null; + let offscreenKeepAlivePort: chrome.runtime.Port | null = null; + + function registryMatch(registry: Map, name: string): T | null { + const exact = registry.get(name); + if (exact) return exact; + let match: T | null = null; + let matchPrefixLength = -1; + for (const [pattern, value] of registry) { + if (!pattern.endsWith(".*")) continue; + const prefix = pattern.slice(0, -1); + if (!name.startsWith(prefix) || prefix.length <= matchPrefixLength) continue; + match = value; + matchPrefixLength = prefix.length; + } + return match; + } + + function normalizeCDPModName( + value: + | { + cdp_command_name?: string; + cdp_event_name?: string; + id?: string; + name?: string; + meta?: () => + | { cdp_command_name?: unknown; cdp_event_name?: unknown; id?: unknown; name?: unknown } + | undefined; + } + | string, + ) { + if (typeof value === "string") return value; + const meta = typeof value?.meta === "function" ? value.meta() : undefined; + const name = + value?.cdp_command_name ?? + value?.cdp_event_name ?? + (typeof meta?.cdp_command_name === "string" ? meta.cdp_command_name : undefined) ?? + (typeof meta?.cdp_event_name === "string" ? meta.cdp_event_name : undefined) ?? + value?.id ?? + (typeof meta?.id === "string" ? meta.id : undefined) ?? + (typeof meta?.name === "string" ? meta.name : undefined) ?? + value?.name; + if (typeof name !== "string" || !name) throw new Error("Expected a CDP name string or a named CDP schema/alias."); + return name; + } + + function errorMessage(error: unknown): string { + return error instanceof Error ? error.message : String(error); + } + + function compactDebuggee(input: { + extensionId?: string | null; + tabId?: number | null; + targetId?: string | null; + }): chrome.debugger.Debuggee { + return { + ...(typeof input.tabId === "number" ? { tabId: input.tabId } : {}), + ...(typeof input.targetId === "string" ? { targetId: input.targetId } : {}), + ...(typeof input.extensionId === "string" ? { extensionId: input.extensionId } : {}), + }; + } + + async function resolveCDPEndpoint(endpoint: string | null) { + if (!endpoint || /^wss?:\/\//i.test(endpoint)) return endpoint; + if (!/^https?:\/\//i.test(endpoint)) { + throw new Error(`loopback_cdp_url must be a ws://, wss://, http://, or https:// CDP endpoint, got ${endpoint}.`); + } + const { webSocketDebuggerUrl } = await fetch(`${endpoint}/json/version`).then((r) => r.json()); + if (!webSocketDebuggerUrl) throw new Error(`loopback_cdp_url HTTP discovery returned no webSocketDebuggerUrl.`); + return webSocketDebuggerUrl; + } + + async function openCDPSocket(endpoint: string): Promise { + if (!/^wss?:\/\//i.test(endpoint)) { + throw new Error(`loopback_cdp_url must be a ws:// or wss:// CDP websocket URL, got ${endpoint}.`); + } + return new Promise((resolve, reject) => { + const w = new WebSocket(endpoint); + let settled = false; + let errorEvent: Event | null = null; + const describe = (prefix: string, closeEvent?: CloseEvent) => { + const parts = [`${prefix} ${endpoint}`, `readyState=${w.readyState}`]; + if (errorEvent) parts.push(`error.type=${errorEvent.type}`); + if (closeEvent) { + parts.push(`close.code=${closeEvent.code}`); + parts.push(`close.reason=${closeEvent.reason || ""}`); + parts.push(`close.wasClean=${closeEvent.wasClean}`); + } + return parts.join(" "); + }; + const fail = (error: Error) => { + if (settled) return; + settled = true; + reject(error); + }; + w.addEventListener( + "open", + () => { + if (settled) return; + settled = true; + resolve(w); + }, + { once: true }, + ); + w.addEventListener( + "error", + (event) => { + errorEvent = event; + setTimeout(() => fail(new Error(describe("CDP socket error"))), 250); + }, + { once: true }, + ); + w.addEventListener("close", (event) => fail(new Error(describe("CDP socket closed", event))), { once: true }); + }); + } + + function startOffscreenKeepAlive() { + void ensureOffscreenKeepAlive().catch(() => {}); + } + + function rejectLoopbackPending(error: Error) { + for (const pending of loopbackPending.values()) pending.reject(error); + loopbackPending.clear(); + } + + async function loopbackWS(endpoint: string): Promise { + const existing = loopbackSockets.get(endpoint); + if (existing?.readyState === WebSocket.OPEN) return existing; + const pending = loopbackSocketPromises.get(endpoint); + if (pending) return pending; + + const nextSocket = openCDPSocket(endpoint).then((ws) => { + loopbackSockets.set(endpoint, ws); + loopbackSocketPromises.delete(endpoint); + ws.addEventListener("message", (event) => { + const msg = JSON.parse(event.data); + const id = typeof msg.id === "number" ? msg.id : null; + if (id == null) { + const method = typeof msg.method === "string" ? msg.method : null; + if (!method) return; + const payload = + msg.params && typeof msg.params === "object" && !Array.isArray(msg.params) + ? (msg.params as ProtocolPayload) + : {}; + const cdpSessionId = typeof msg.sessionId === "string" ? msg.sessionId : null; + void CDPModServer.runMiddleware("event", method, payload, { + cdpSessionId, + event: { name: method, payload }, + }) + .then((nextPayload) => { + if (nextPayload === undefined) return; + for (const listener of eventListeners) { + try { + listener(method, nextPayload, cdpSessionId); + } catch (error) { + console.error("[CDPModServer] event listener failed", error); + } + } + }) + .catch((error) => console.error("[CDPModServer] loopback event listener failed", error)); + return; + } + const pending = loopbackPending.get(id); + if (!pending) return; + loopbackPending.delete(id); + if (msg.error) pending.reject(new Error(msg.error.message)); + else pending.resolve(msg.result || {}); + }); + ws.addEventListener("error", () => { + if (loopbackSockets.get(endpoint) === ws) loopbackSockets.delete(endpoint); + loopbackTargetSessions.clear(); + rejectLoopbackPending(new Error(`CDP socket error ${endpoint}`)); + }); + ws.addEventListener("close", (event) => { + if (loopbackSockets.get(endpoint) === ws) loopbackSockets.delete(endpoint); + loopbackTargetSessions.clear(); + rejectLoopbackPending( + new Error( + `CDP socket closed ${endpoint} close.code=${event.code} close.reason=${event.reason || ""} close.wasClean=${ + event.wasClean + }`, + ), + ); + }); + return ws; + }); + loopbackSocketPromises.set(endpoint, nextSocket); + return nextSocket; + } + + async function callLoopbackWS(method: string, params: ProtocolParams = {}, sessionId: string | null = null) { + if (!CDPModServer.loopback_cdp_url) throw new Error(`No loopback_cdp_url configured for ${method}.`); + const ws = await loopbackWS(CDPModServer.loopback_cdp_url); + const id = nextLoopbackId++; + const message: { id: number; method: string; params: ProtocolParams; sessionId?: string } = { + id, + method, + params, + }; + if (sessionId) message.sessionId = sessionId; + ws.send(JSON.stringify(message)); + return new Promise((resolve, reject) => { + loopbackPending.set(id, { resolve, reject }); + ws.addEventListener("error", () => reject(new Error(`CDP socket error ${CDPModServer.loopback_cdp_url}`)), { + once: true, + }); + }); + } + + async function initializeLoopbackCDP() { + if (!CDPModServer.loopback_cdp_url) return; + const ws = await loopbackWS(CDPModServer.loopback_cdp_url); + if (initializedLoopbackSockets.has(ws)) return; + await callLoopbackWS("Target.setAutoAttach", targetAutoAttachParams); + await callLoopbackWS("Target.setDiscoverTargets", { discover: true }); + initializedLoopbackSockets.add(ws); + } + + async function ensureOffscreenKeepAlive() { + const chromeApi = globalScope.chrome; + const offscreen = chromeApi?.offscreen; + if (!offscreen || !chromeApi?.runtime?.getURL) return { started: false, reason: "offscreen_unavailable" }; + + const offscreenUrl = chromeApi.runtime.getURL(offscreenKeepAlivePath); + try { + const existingContexts = chromeApi.runtime.getContexts + ? await chromeApi.runtime.getContexts({ + contextTypes: ["OFFSCREEN_DOCUMENT"], + documentUrls: [offscreenUrl], + }) + : []; + if (existingContexts.length > 0) return { started: true, existing: true }; + + creatingOffscreenKeepAlive ??= offscreen + .createDocument({ + url: offscreenKeepAlivePath, + reasons: ["BLOBS"], + justification: "Keep CDPMod service worker active while CDP clients route commands through it.", + }) + .finally(() => { + creatingOffscreenKeepAlive = null; + }); + await creatingOffscreenKeepAlive; + return { started: true }; + } catch (error) { + return { started: false, reason: errorMessage(error) }; + } + } + + const CDPModServer = { + __CDPModServerVersion: CDPMOD_SERVER_VERSION, + routes: { ...defaultRoutes }, + loopback_cdp_url: null as string | null, + browserToken: null as string | null, + types: null as (typeof import("../types/zod.js"))["types"] | null, + commands: null as (typeof import("../types/zod.js"))["commands"] | null, + events: null as (typeof import("../types/zod.js"))["events"] | null, + startOffscreenKeepAlive, + ensureOffscreenKeepAlive, + + async loadTypes() { + runtime_types_promise ??= import("../types/zod.js").then((module) => { + this.types = module.types; + this.commands = module.commands; + this.events = module.events; + return module.types; + }); + return runtime_types_promise; + }, + + async configure(params: CDPModConfigureParams = {}) { + const { + loopback_cdp_url = this.loopback_cdp_url, + routes, + browserToken = this.browserToken, + custom_commands = [], + custom_events = [], + custom_middlewares = [], + } = params; + this.loopback_cdp_url = await resolveCDPEndpoint(loopback_cdp_url); + this.browserToken = browserToken; + if (routes) this.routes = { ...defaultRoutes, ...routes }; + else { + this.routes = { ...defaultRoutes }; + await this.discoverLoopbackCDP(); + } + for (const command of custom_commands) this.addCustomCommand(command as CDPModCustomCommandRegistration); + for (const event of custom_events) this.addCustomEvent(event as CDPModCustomEventRegistration); + for (const middleware of custom_middlewares) this.addMiddleware(middleware as CDPModMiddlewareRegistration); + await initializeLoopbackCDP(); + return { loopback_cdp_url: this.loopback_cdp_url, routes: this.routes }; + }, + + addCustomCommand({ + name, + paramsSchema = null, + resultSchema = null, + expression = null, + handler, + }: CDPModCustomCommandRegistration) { + name = normalizeCDPModName(name); + if (!/^[^.]+\.[^.]+$/.test(name)) throw new Error("name must be in Domain.method form."); + if (typeof handler !== "function" && typeof expression === "string") { + handler = async (params: ProtocolParams = {}, cdpSessionId: string | null = null, method: string = name) => { + const cdp = CDPModServer.attachToSession(cdpSessionId); + const CDPMod = CDPModServer; + const chrome = globalScope.chrome; + const value = new Function( + "params", + "method", + "cdp", + "CDPMod", + "chrome", + `return (async () => { + const handler = (${expression}); + return typeof handler === "function" ? await handler(params || {}, method) : handler; + })()`, + ); + return await value(params, method, cdp, CDPMod, chrome); + }; + } + if (typeof handler !== "function") throw new Error(`Custom command ${name} was registered without a handler.`); + commandHandlers.set(name, { name, handler, paramsSchema, resultSchema, expression }); + return { name, registered: true }; + }, + + addCustomEvent({ name, bindingName, eventSchema = null }: CDPModCustomEventRegistration) { + name = normalizeCDPModName(name); + if (!/^[^.]+\.[^.]+$/.test(name)) throw new Error("name must be in Domain.event form."); + bindingName ??= bindingNameFor(name); + eventBindings.set(name, { name, bindingName, eventSchema }); + return { name, bindingName, registered: true }; + }, + + addEventListener(listener: (event: string, data: ProtocolPayload, cdpSessionId: string | null) => void) { + eventListeners.add(listener); + return { remove: () => eventListeners.delete(listener) }; + }, + + addMiddleware({ name = "*", phase, expression = null, handler }: CDPModMiddlewareRegistration) { + name = normalizeCDPModName(name); + if (!["request", "response", "event"].includes(phase)) + throw new Error("phase must be request, response, or event."); + if (name !== "*" && (!name || !name.includes("."))) throw new Error("name must be '*' or Domain.name form."); + if (typeof handler !== "function" && typeof expression === "string") { + handler = async (payload: ProtocolPayload, next: unknown, context: ProtocolPayload = {}) => { + const context_object = context && typeof context === "object" ? (context as Record) : {}; + const cdp = CDPModServer.attachToSession( + typeof context_object.cdpSessionId === "string" ? context_object.cdpSessionId : null, + ); + const CDPMod = CDPModServer; + const chrome = globalScope.chrome; + const value = new Function( + "payload", + "next", + "context", + "cdp", + "CDPMod", + "chrome", + `return (async () => { + const handler = (${expression}); + return await handler(payload, next, context); + })()`, + ); + return await value(payload, next, context, cdp, CDPMod, chrome); + }; + } + if (typeof handler !== "function") { + throw new Error(`Middleware ${name}:${phase} was registered without a handler.`); + } + middlewares[phase].push({ name, phase, expression, handler }); + return { name, phase, registered: true }; + }, + + async runMiddleware(phase: MiddlewarePhase, name: string, payload: ProtocolPayload, context: ProtocolPayload = {}) { + const matching = (middlewares[phase] || []).filter( + (middleware) => middleware.name === "*" || middleware.name === name, + ); + const dispatch = async (index: number, value: ProtocolPayload): Promise => { + const middleware = matching[index]; + if (!middleware) return value; + let nextCalled = false; + const next = async (nextValue = value) => { + if (nextCalled) + throw new Error(`Middleware ${middleware.name}:${middleware.phase} called next() more than once.`); + nextCalled = true; + return dispatch(index + 1, nextValue); + }; + const ctx = context && typeof context === "object" ? context : {}; + return middleware.handler(value, next, { ...ctx, name, phase }); + }; + return dispatch(0, payload); + }, + + async handleCommand(method: string, params: ProtocolParams = {}, cdpSessionId: string | null = null) { + const request = { method, params, cdpSessionId }; + const middlewareParams = await this.runMiddleware("request", method, params, { cdpSessionId, request }); + if (middlewareParams == null) throw new Error(`Request middleware for ${method} returned no params.`); + params = middlewareParams as ProtocolParams; + + const command = registryMatch(commandHandlers, method); + let result; + if (command) { + result = await command.handler(params, cdpSessionId, method); + return this.runMiddleware("response", method, result, { + cdpSessionId, + request: { ...request, params }, + response: { result }, + }); + } + + let upstream = "chrome_debugger"; + for (const [pattern, route] of Object.entries(this.routes || {}) as [string, string][]) { + if (pattern === "*.*") { + upstream = route; + continue; + } + if (pattern.endsWith(".*") && method.startsWith(pattern.slice(0, -1))) { + upstream = route; + break; + } + if (pattern === method) { + upstream = route; + break; + } + } + + if (upstream === "auto") { + if (this.loopback_cdp_url) { + try { + result = await this.sendLoopback(method, params); + } catch { + result = await this.sendChromeDebugger(method, params); + } + } else { + result = await this.sendChromeDebugger(method, params); + } + } else if (upstream === "loopback_cdp") result = await this.sendLoopback(method, params); + else if (upstream === "chrome_debugger") result = await this.sendChromeDebugger(method, params); + else throw new Error(`No CDPMod command registered for ${method}.`); + + return this.runMiddleware("response", method, result, { + cdpSessionId, + request: { ...request, params }, + response: { result }, + }); + }, + + attachToSession(cdpSessionId: string | null = null) { + return { + sessionId: cdpSessionId, + get types() { + return CDPModServer.types; + }, + get commands() { + return CDPModServer.commands; + }, + get events() { + return CDPModServer.events; + }, + send: (method: string, params: ProtocolParams = {}) => this.handleCommand(method, params, cdpSessionId), + emit: (eventName: string, payload: ProtocolPayload = {}) => this.emit(eventName, payload, cdpSessionId), + }; + }, + + async emit(eventName: string, payload: ProtocolPayload = {}, cdpSessionId: string | null = null) { + const event = registryMatch(eventBindings, eventName); + if (!event) return { event: eventName, emitted: false, reason: "event_not_registered" }; + const binding = globalScope[event.bindingName]; + if (typeof binding !== "function") return { event: eventName, emitted: false, reason: "binding_not_installed" }; + + payload = await this.runMiddleware("event", eventName, payload, { + cdpSessionId, + event: { name: eventName, payload }, + }); + if (payload === undefined) return { event: eventName, emitted: false, reason: "middleware_dropped" }; + + for (const listener of eventListeners) { + try { + listener(eventName, payload, cdpSessionId); + } catch (error) { + console.error("[CDPModServer] event listener failed", error); + } + } + if (typeof binding === "function") + binding(encodeBindingPayload({ event: eventName, data: payload, cdpSessionId })); + return { event: eventName, emitted: true }; + }, + + async discoverLoopbackCDP() { + if (!this.browserToken) return { loopback_cdp_url: null, verified: false }; + + const url = "http://127.0.0.1:9222"; + const previousLoopbackUrl = this.loopback_cdp_url; + const fail = (version?: unknown) => { + this.loopback_cdp_url = previousLoopbackUrl ?? null; + return { loopback_cdp_url: null, verified: false, ...(version ? { version } : {}) }; + }; + try { + const version = await fetch(`${url}/json/version`).then((response) => response.ok && response.json()); + if (!version?.webSocketDebuggerUrl) return fail(); + + this.loopback_cdp_url = version.webSocketDebuggerUrl; + const { targetInfos } = (await callLoopbackWS("Target.getTargets")) as cdp.types.ts.Target.GetTargetsResult; + const chromeApi = globalScope.chrome; + const worker = targetInfos.find( + (target) => + target.type === "service_worker" && + target.url === `chrome-extension://${chromeApi.runtime.id}/service_worker.js`, + ); + if (!worker) return fail(version); + + const { sessionId } = (await callLoopbackWS("Target.attachToTarget", { + targetId: worker.targetId, + flatten: true, + })) as cdp.types.ts.Target.AttachToTargetResult; + const result = (await callLoopbackWS( + "Runtime.evaluate", + { + expression: `globalThis.CDPMod?.browserToken === ${JSON.stringify(this.browserToken)}`, + returnByValue: true, + }, + sessionId, + )) as cdp.types.ts.Runtime.EvaluateResult; + await callLoopbackWS("Target.detachFromTarget", { sessionId }).catch(() => {}); + if (result.result?.value !== true) return fail(version); + + await initializeLoopbackCDP(); + return { loopback_cdp_url: this.loopback_cdp_url, verified: true, version }; + } catch { + return fail(); + } + }, + + async sendLoopback(method: string, params: ProtocolParams = {}) { + if (!this.loopback_cdp_url) throw new Error(`No loopback_cdp_url configured for ${method}.`); + + await initializeLoopbackCDP(); + + const domain = method.split(".")[0] ?? ""; + if (browserLevelDomains.has(domain)) return await callLoopbackWS(method, params); + + const { + debuggee = null, + tabId = null, + targetId = null, + extensionId = null, + ...commandParams + } = params as CdpDebuggeeCommandParams; + const resolvedDebuggee = debuggee ?? compactDebuggee({ tabId, targetId, extensionId }); + + const chromeApi = globalScope.chrome; + let resolvedTargetId = resolvedDebuggee.targetId || null; + if (!resolvedTargetId) { + let resolvedTabId = resolvedDebuggee.tabId || null; + let resolvedTabUrl: string | null = null; + if (!resolvedTabId) { + const [tab] = chromeApi.tabs?.query + ? await chromeApi.tabs.query({ active: true, lastFocusedWindow: true }) + : []; + resolvedTabId = tab?.id || null; + resolvedTabUrl = tab?.url || tab?.pendingUrl || null; + } else if (chromeApi.tabs?.get) { + const tab = await chromeApi.tabs.get(resolvedTabId).catch(() => null); + resolvedTabUrl = tab?.url || tab?.pendingUrl || null; + } + if (resolvedTabId && chromeApi.debugger?.getTargets) { + const targets = await chromeApi.debugger.getTargets(); + resolvedTargetId = + targets.find((target) => target.tabId === resolvedTabId && target.type === "page")?.id || null; + } + if (!resolvedTargetId) { + const { targetInfos } = (await callLoopbackWS("Target.getTargets")) as cdp.types.ts.Target.GetTargetsResult; + const pageTargets = targetInfos.filter((target) => target.type === "page"); + resolvedTargetId = + pageTargets.find((target) => resolvedTabUrl && target.url === resolvedTabUrl)?.targetId || + pageTargets[0]?.targetId || + null; + } + if (!resolvedTargetId) { + const created = (await callLoopbackWS("Target.createTarget", { + url: "about:blank#cdpmod", + })) as cdp.types.ts.Target.CreateTargetResult; + resolvedTargetId = created.targetId || null; + } + } + if (!resolvedTargetId) throw new Error(`loopback_cdp route for ${method} could not resolve a page target.`); + + let sessionId = loopbackTargetSessions.get(resolvedTargetId) || null; + if (!sessionId) { + const attached = (await callLoopbackWS("Target.attachToTarget", { + targetId: resolvedTargetId, + flatten: true, + })) as cdp.types.ts.Target.AttachToTargetResult; + sessionId = attached.sessionId; + loopbackTargetSessions.set(resolvedTargetId, sessionId); + await callLoopbackWS("Target.setAutoAttach", targetAutoAttachParams, sessionId).catch(() => {}); + } + return await callLoopbackWS(method, commandParams, sessionId); + }, + + async sendChromeDebugger(method: string, params: ProtocolParams = {}) { + const chromeApi = globalScope.chrome; + if (!chromeApi?.debugger?.sendCommand) throw new Error("chrome.debugger is unavailable."); + + const { + debuggee = null, + tabId = null, + targetId = null, + extensionId = null, + ...commandParams + } = params as CdpDebuggeeCommandParams; + const resolvedDebuggee = debuggee ?? compactDebuggee({ tabId, targetId, extensionId }); + if (Object.keys(resolvedDebuggee).length === 0) { + let tab: chrome.tabs.Tab | undefined; + [tab] = await chromeApi.tabs.query({ active: true, lastFocusedWindow: true }); + if (!tab?.id) [tab] = await chromeApi.tabs.query({}); + if (!tab?.id) { + try { + tab = await chromeApi.tabs.create({ url: "https://example.com/#cdpmod", active: true }); + } catch { + const win = await chromeApi.windows.create({ url: "https://example.com/#cdpmod", focused: true }); + tab = win?.tabs?.[0]; + } + } + if (!tab?.id) throw new Error(`chrome_debugger route for ${method} could not find an active tab.`); + resolvedDebuggee.tabId = tab.id; + } + + const key = JSON.stringify(resolvedDebuggee); + if (!attachedDebuggees.has(key)) { + try { + await new Promise((resolve, reject) => + chromeApi.debugger.attach(resolvedDebuggee, "1.3", () => { + const error = chromeApi.runtime.lastError; + if (error) reject(new Error(error.message)); + else resolve(); + }), + ); + } catch (error) { + if (!errorMessage(error).includes("Another debugger is already attached")) throw error; + } + await new Promise((resolve, reject) => + chromeApi.debugger.sendCommand(resolvedDebuggee, "Target.setAutoAttach", targetAutoAttachParams, () => { + const error = chromeApi.runtime.lastError; + if (error) reject(new Error(error.message)); + else resolve(); + }), + ); + attachedDebuggees.add(key); + } + + return new Promise((resolve, reject) => + chromeApi.debugger.sendCommand(resolvedDebuggee, method, commandParams, (result) => { + const error = chromeApi.runtime.lastError; + if (error) reject(new Error(error.message)); + else resolve(result as ProtocolResult); + }), + ); + }, + }; + + globalScope.CDPMod = CDPModServer; + + CDPModServer.addCustomEvent({ + name: "Mod.pong", + bindingName: bindingNameFor("Mod.pong"), + }); + + CDPModServer.addCustomCommand({ + name: "Mod.ping", + handler: async (raw_params: ProtocolParams = {}, cdpSessionId: string | null = null) => { + const params = raw_params as CDPModPingParams; + const receivedAt = Date.now(); + await CDPModServer.emit( + "Mod.pong", + { + sentAt: typeof params.sentAt === "number" ? params.sentAt : receivedAt, + receivedAt, + from: "extension-service-worker", + }, + cdpSessionId, + ); + return { ok: true }; + }, + }); + + CDPModServer.addCustomCommand({ + name: "Mod.configure", + handler: async (params: ProtocolParams = {}) => CDPModServer.configure(params as CDPModConfigureParams), + }); + + CDPModServer.addCustomCommand({ + name: "Mod.evaluate", + handler: async (raw_params: ProtocolParams = {}) => { + const { expression, params = {}, cdpSessionId = null } = raw_params as Record; + const cdp = CDPModServer.attachToSession(typeof cdpSessionId === "string" ? cdpSessionId : null); + const CDPMod = CDPModServer; + const chrome = globalScope.chrome; + const value = new Function( + "params", + "cdp", + "CDPMod", + "chrome", + `return (async () => { + const value = (${expression}); + return typeof value === "function" ? await value(params || {}) : value; + })()`, + ); + return await value(params, cdp, CDPMod, chrome); + }, + }); + + CDPModServer.addCustomCommand({ + name: "Mod.addCustomCommand", + handler: async (params: ProtocolParams = {}) => + CDPModServer.addCustomCommand(params as CDPModCustomCommandRegistration), + }); + + CDPModServer.addCustomCommand({ + name: "Mod.addCustomEvent", + handler: async (params: ProtocolParams = {}) => + CDPModServer.addCustomEvent(params as CDPModCustomEventRegistration), + }); + + CDPModServer.addCustomCommand({ + name: "Mod.addMiddleware", + handler: async (params: ProtocolParams = {}) => CDPModServer.addMiddleware(params as CDPModMiddlewareRegistration), + }); + + const chromeApi = globalScope.chrome; + try { + chromeApi?.runtime?.onStartup?.addListener(startOffscreenKeepAlive); + } catch {} + try { + chromeApi?.runtime?.onInstalled?.addListener(startOffscreenKeepAlive); + } catch {} + try { + chromeApi?.tabs?.onCreated?.addListener(startOffscreenKeepAlive); + } catch {} + try { + chromeApi?.runtime?.onConnect?.addListener((port) => { + if (port.name !== offscreenKeepAlivePortName) return; + offscreenKeepAlivePort = port; + port.onMessage.addListener(() => {}); + port.onDisconnect.addListener(() => { + if (offscreenKeepAlivePort === port) offscreenKeepAlivePort = null; + }); + }); + } catch {} + startOffscreenKeepAlive(); + + return CDPModServer; +} + +export const CDPModServer = installCDPModServer(globalThis); diff --git a/extension/MagicCDPServer.ts b/extension/MagicCDPServer.ts deleted file mode 100644 index ef5e4e1..0000000 --- a/extension/MagicCDPServer.ts +++ /dev/null @@ -1,578 +0,0 @@ -// MagicCDPServer: lives inside an extension service worker. Owns the registry -// of custom commands and event bindings, and emits events through the binding -// API installed by the client (Runtime.addBinding -> globalThis[bindingName]). -// -// The installer is intentionally self-contained so the bridge can inject the -// same server implementation into an already-running extension service worker -// when Chrome refuses Extensions.loadUnpacked. - -import type { cdp } from "../types/cdp.js"; -import type { - CdpDebuggeeCommandParams, - MagicConfigureParams, - MagicCustomCommandRegistration, - MagicCustomEventRegistration, - MagicMiddlewareRegistration, - MagicPingParams, - MagicRoutes, - ProtocolParams, - ProtocolPayload, - ProtocolResult, -} from "../types/magic.js"; - -type MiddlewarePhase = "request" | "response" | "event"; - -export function installMagicCDPServer(globalScope: typeof globalThis = globalThis) { - const MAGIC_CDP_SERVER_VERSION = 1; - if ( - globalScope.MagicCDP?.__MagicCDPServerVersion === MAGIC_CDP_SERVER_VERSION && - globalScope.MagicCDP?.handleCommand && - globalScope.MagicCDP?.addCustomEvent - ) - return globalScope.MagicCDP; - - const BINDING_PREFIX = "__MagicCDP_"; - const bindingNameFor = (eventName: string) => BINDING_PREFIX + eventName.replaceAll(".", "_"); - const encodeBindingPayload = ({ - event, - data, - cdpSessionId = null, - }: { - event: string; - data: ProtocolPayload; - cdpSessionId?: string | null; - }) => JSON.stringify({ event, data, cdpSessionId }); - - const commandHandlers = new Map(); - const eventBindings = new Map(); - const middlewares = { - request: [], - response: [], - event: [], - } satisfies Record; - const attachedDebuggees = new Set(); - - const targetAutoAttachParams = { - autoAttach: true, - waitForDebuggerOnStart: false, - flatten: true, - } satisfies cdp.types.ts.Target.SetAutoAttachParams; - - const defaultRoutes = { - "Magic.*": "service_worker", - "Custom.*": "service_worker", - "*.*": "auto", - } satisfies MagicRoutes; - - const browserLevelDomains = new Set(["Browser", "Target", "SystemInfo"]); - - let nextLoopbackId = 1; - const offscreenKeepAlivePortName = "MagicCDPOffscreenKeepAlive"; - const offscreenKeepAlivePath = "offscreen/keepalive.html"; - let creatingOffscreenKeepAlive: Promise | null = null; - let offscreenKeepAlivePort: chrome.runtime.Port | null = null; - - function normalizeMagicName( - value: { id?: string; name?: string; meta?: () => { id?: unknown; name?: unknown } } | string, - ) { - if (typeof value === "string") return value; - const meta = typeof value?.meta === "function" ? value.meta() : undefined; - const name = - value?.id ?? - (typeof meta?.id === "string" ? meta.id : undefined) ?? - (typeof meta?.name === "string" ? meta.name : undefined) ?? - value?.name; - if (typeof name !== "string" || !name) throw new Error("Expected a CDP name string or a named CDP schema/alias."); - return name; - } - - async function resolveCDPEndpoint(endpoint: string | null) { - if (!endpoint || /^wss?:\/\//i.test(endpoint)) return endpoint; - const { webSocketDebuggerUrl } = await fetch(`${endpoint}/json/version`).then((r) => r.json()); - if (!webSocketDebuggerUrl) throw new Error(`loopback_cdp_url HTTP discovery returned no webSocketDebuggerUrl.`); - return webSocketDebuggerUrl; - } - - async function openCDPSocket(endpoint: string): Promise { - if (!/^wss?:\/\//i.test(endpoint)) { - throw new Error(`loopback_cdp_url must be a ws:// or wss:// CDP websocket URL, got ${endpoint}.`); - } - return new Promise((resolve, reject) => { - const w = new WebSocket(endpoint); - w.addEventListener("open", () => resolve(w), { once: true }); - w.addEventListener("error", reject, { once: true }); - }); - } - - function startOffscreenKeepAlive() { - void ensureOffscreenKeepAlive().catch(() => {}); - } - - async function ensureOffscreenKeepAlive() { - const chromeApi = globalScope.chrome; - const offscreen = chromeApi?.offscreen; - if (!offscreen || !chromeApi?.runtime?.getURL) return { started: false, reason: "offscreen_unavailable" }; - - const offscreenUrl = chromeApi.runtime.getURL(offscreenKeepAlivePath); - try { - const existingContexts = chromeApi.runtime.getContexts - ? await chromeApi.runtime.getContexts({ - contextTypes: ["OFFSCREEN_DOCUMENT"], - documentUrls: [offscreenUrl], - }) - : []; - if (existingContexts.length > 0) return { started: true, existing: true }; - - creatingOffscreenKeepAlive ??= offscreen - .createDocument({ - url: offscreenKeepAlivePath, - reasons: ["BLOBS"], - justification: "Keep MagicCDP service worker active while CDP clients route commands through it.", - }) - .finally(() => { - creatingOffscreenKeepAlive = null; - }); - await creatingOffscreenKeepAlive; - return { started: true }; - } catch (error) { - return { started: false, reason: error?.message || String(error) }; - } - } - - const MagicCDPServer = { - __MagicCDPServerVersion: MAGIC_CDP_SERVER_VERSION, - routes: { ...defaultRoutes }, - loopback_cdp_url: null, - browserToken: null, - startOffscreenKeepAlive, - ensureOffscreenKeepAlive, - - async configure(params: MagicConfigureParams = {}) { - const { loopback_cdp_url = this.loopback_cdp_url, routes, browserToken = this.browserToken } = params; - this.loopback_cdp_url = await resolveCDPEndpoint(loopback_cdp_url); - this.browserToken = browserToken; - if (routes) this.routes = { ...defaultRoutes, ...routes }; - else { - this.routes = { ...defaultRoutes }; - await this.discoverLoopbackCDP(); - } - return { loopback_cdp_url: this.loopback_cdp_url, routes: this.routes }; - }, - - addCustomCommand({ - name, - paramsSchema = null, - resultSchema = null, - expression = null, - handler, - }: MagicCustomCommandRegistration) { - name = normalizeMagicName(name); - if (!name || !name.includes(".")) throw new Error("name must be in Domain.method form."); - if (typeof handler !== "function") throw new Error(`Custom command ${name} was registered without a handler.`); - commandHandlers.set(name, { name, handler, paramsSchema, resultSchema, expression }); - return { name, registered: true }; - }, - - addCustomEvent({ name, bindingName, eventSchema = null }: MagicCustomEventRegistration) { - name = normalizeMagicName(name); - if (!name || !name.includes(".")) throw new Error("name must be in Domain.event form."); - if (!bindingName) throw new Error(`Custom event ${name} is missing a Runtime binding name.`); - eventBindings.set(name, { name, bindingName, eventSchema }); - return { name, bindingName, registered: true }; - }, - - addMiddleware({ name = "*", phase, expression = null, handler }: MagicMiddlewareRegistration) { - name = normalizeMagicName(name); - if (!["request", "response", "event"].includes(phase)) - throw new Error("phase must be request, response, or event."); - if (name !== "*" && (!name || !name.includes("."))) throw new Error("name must be '*' or Domain.name form."); - if (typeof handler !== "function") { - throw new Error(`Middleware ${name}:${phase} was registered without a handler.`); - } - middlewares[phase].push({ name, phase, expression, handler }); - return { name, phase, registered: true }; - }, - - async runMiddleware(phase: MiddlewarePhase, name: string, payload: ProtocolPayload, context: ProtocolPayload = {}) { - const matching = (middlewares[phase] || []).filter( - (middleware) => middleware.name === "*" || middleware.name === name, - ); - const dispatch = async (index: number, value: ProtocolPayload): Promise => { - const middleware = matching[index]; - if (!middleware) return value; - let nextCalled = false; - const next = async (nextValue = value) => { - if (nextCalled) - throw new Error(`Middleware ${middleware.name}:${middleware.phase} called next() more than once.`); - nextCalled = true; - return dispatch(index + 1, nextValue); - }; - const ctx = context && typeof context === "object" ? context : {}; - return middleware.handler(value, next, { ...ctx, name, phase }); - }; - return dispatch(0, payload); - }, - - async handleCommand(method: string, params: ProtocolParams = {}, cdpSessionId: string | null = null) { - const request = { method, params, cdpSessionId }; - params = await this.runMiddleware("request", method, params, { cdpSessionId, request }); - - const command = commandHandlers.get(method); - let result; - if (command) { - result = await command.handler(params, cdpSessionId); - return this.runMiddleware("response", method, result, { - cdpSessionId, - request: { ...request, params }, - response: { result }, - }); - } - - let upstream = "chrome_debugger"; - for (const [pattern, route] of Object.entries(this.routes || {}) as [string, string][]) { - if (pattern === "*.*") { - upstream = route; - continue; - } - if (pattern.endsWith(".*") && method.startsWith(pattern.slice(0, -1))) { - upstream = route; - break; - } - if (pattern === method) { - upstream = route; - break; - } - } - - if (upstream === "auto") { - if (this.loopback_cdp_url) { - try { - result = await this.sendLoopback(method, params); - } catch { - result = await this.sendChromeDebugger(method, params); - } - } else { - result = await this.sendChromeDebugger(method, params); - } - } else if (upstream === "loopback_cdp") result = await this.sendLoopback(method, params); - else if (upstream === "chrome_debugger") result = await this.sendChromeDebugger(method, params); - else throw new Error(`No MagicCDP command registered for ${method}.`); - - return this.runMiddleware("response", method, result, { - cdpSessionId, - request: { ...request, params }, - response: { result }, - }); - }, - - attachToSession(cdpSessionId: string | null = null) { - return { - sessionId: cdpSessionId, - send: (method: string, params: ProtocolParams = {}) => this.handleCommand(method, params, cdpSessionId), - emit: (eventName: string, payload: ProtocolPayload = {}) => this.emit(eventName, payload, cdpSessionId), - }; - }, - - async emit(eventName: string, payload: ProtocolPayload = {}, cdpSessionId: string | null = null) { - const event = eventBindings.get(eventName); - if (!event) return { event: eventName, emitted: false, reason: "event_not_registered" }; - const binding = globalScope[event.bindingName]; - if (typeof binding !== "function") return { event: eventName, emitted: false, reason: "binding_not_installed" }; - - payload = await this.runMiddleware("event", eventName, payload, { - cdpSessionId, - event: { name: eventName, payload }, - }); - if (payload === undefined) return { event: eventName, emitted: false, reason: "middleware_dropped" }; - - binding(encodeBindingPayload({ event: eventName, data: payload, cdpSessionId })); - return { event: eventName, emitted: true }; - }, - - async discoverLoopbackCDP() { - if (!this.browserToken) return { loopback_cdp_url: null, verified: false }; - - const url = "http://127.0.0.1:9222"; - try { - const version = await fetch(`${url}/json/version`).then((response) => response.ok && response.json()); - if (!version?.webSocketDebuggerUrl) return { loopback_cdp_url: null, verified: false }; - - const ws = await new Promise((resolve, reject) => { - const w = new WebSocket(version.webSocketDebuggerUrl); - w.addEventListener("open", () => resolve(w), { once: true }); - w.addEventListener("error", reject, { once: true }); - }); - try { - const callOnWs = ( - method: string, - params: ProtocolParams = {}, - sessionId: string | null = null, - ): Promise => { - const id = nextLoopbackId++; - const message: { id: number; method: string; params: ProtocolParams; sessionId?: string } = { - id, - method, - params, - }; - if (sessionId) message.sessionId = sessionId; - ws.send(JSON.stringify(message)); - return new Promise((resolve, reject) => { - ws.addEventListener("message", (event) => { - const msg = JSON.parse(event.data); - if (msg.id !== id) return; - if (msg.error) reject(new Error(msg.error.message)); - else resolve(msg.result || {}); - }); - ws.addEventListener("error", reject, { once: true }); - }); - }; - - await callOnWs("Target.setAutoAttach", targetAutoAttachParams); - const { targetInfos } = (await callOnWs("Target.getTargets")) as cdp.types.ts.Target.GetTargetsResult; - const chromeApi = globalScope.chrome; - const worker = targetInfos.find( - (target) => - target.type === "service_worker" && - target.url === `chrome-extension://${chromeApi.runtime.id}/service_worker.js`, - ); - if (!worker) return { loopback_cdp_url: null, verified: false }; - - const { sessionId } = (await callOnWs("Target.attachToTarget", { - targetId: worker.targetId, - flatten: true, - })) as cdp.types.ts.Target.AttachToTargetResult; - const result = (await callOnWs( - "Runtime.evaluate", - { - expression: `globalThis.MagicCDP?.browserToken === ${JSON.stringify(this.browserToken)}`, - returnByValue: true, - }, - sessionId, - )) as cdp.types.ts.Runtime.EvaluateResult; - if (result.result?.value !== true) return { loopback_cdp_url: null, verified: false }; - - this.loopback_cdp_url = version.webSocketDebuggerUrl; - return { loopback_cdp_url: this.loopback_cdp_url, verified: true, version }; - } finally { - ws.close(); - } - } catch { - return { loopback_cdp_url: null, verified: false }; - } - }, - - async sendLoopback(method: string, params: ProtocolParams = {}) { - if (!this.loopback_cdp_url) throw new Error(`No loopback_cdp_url configured for ${method}.`); - - const ws = await openCDPSocket(this.loopback_cdp_url); - try { - const callOnWs = (m: string, p: ProtocolParams = {}, sid: string | null = null): Promise => { - const id = nextLoopbackId++; - const message: { id: number; method: string; params: ProtocolParams; sessionId?: string } = { - id, - method: m, - params: p, - }; - if (sid) message.sessionId = sid; - ws.send(JSON.stringify(message)); - return new Promise((resolve, reject) => { - ws.addEventListener("message", (event) => { - const msg = JSON.parse(event.data); - if (msg.id !== id) return; - if (msg.error) reject(new Error(msg.error.message)); - else resolve(msg.result || {}); - }); - ws.addEventListener("error", reject, { once: true }); - }); - }; - await callOnWs("Target.setAutoAttach", targetAutoAttachParams); - - const domain = method.split(".")[0] ?? ""; - if (browserLevelDomains.has(domain)) return await callOnWs(method, params); - - const { - debuggee = null, - tabId = null, - targetId = null, - extensionId = null, - ...commandParams - } = params as CdpDebuggeeCommandParams; - const resolvedDebuggee = debuggee || { tabId, targetId, extensionId }; - for (const key of Object.keys(resolvedDebuggee)) { - if (resolvedDebuggee[key] === null || resolvedDebuggee[key] === undefined) delete resolvedDebuggee[key]; - } - - const chromeApi = globalScope.chrome; - let resolvedTargetId = resolvedDebuggee.targetId || null; - if (!resolvedTargetId) { - let resolvedTabId = resolvedDebuggee.tabId || null; - let resolvedTabUrl: string | null = null; - if (!resolvedTabId) { - const [tab] = chromeApi.tabs?.query - ? await chromeApi.tabs.query({ active: true, lastFocusedWindow: true }) - : []; - resolvedTabId = tab?.id || null; - resolvedTabUrl = tab?.url || tab?.pendingUrl || null; - } else if (chromeApi.tabs?.get) { - const tab = await chromeApi.tabs.get(resolvedTabId).catch(() => null); - resolvedTabUrl = tab?.url || tab?.pendingUrl || null; - } - if (resolvedTabId && chromeApi.debugger?.getTargets) { - const targets = await chromeApi.debugger.getTargets(); - resolvedTargetId = - targets.find((target) => target.tabId === resolvedTabId && target.type === "page")?.id || null; - } - if (!resolvedTargetId) { - const { targetInfos } = (await callOnWs("Target.getTargets")) as cdp.types.ts.Target.GetTargetsResult; - const pageTargets = targetInfos.filter((target) => target.type === "page"); - resolvedTargetId = - pageTargets.find((target) => resolvedTabUrl && target.url === resolvedTabUrl)?.targetId || - pageTargets[0]?.targetId || - null; - } - if (!resolvedTargetId) { - const created = (await callOnWs("Target.createTarget", { - url: "about:blank#magic-cdp", - })) as cdp.types.ts.Target.CreateTargetResult; - resolvedTargetId = created.targetId || null; - } - } - if (!resolvedTargetId) throw new Error(`loopback_cdp route for ${method} could not resolve a page target.`); - - const { sessionId } = (await callOnWs("Target.attachToTarget", { - targetId: resolvedTargetId, - flatten: true, - })) as cdp.types.ts.Target.AttachToTargetResult; - try { - return await callOnWs(method, commandParams, sessionId); - } finally { - await callOnWs("Target.detachFromTarget", { sessionId }).catch(() => {}); - } - } finally { - ws.close(); - } - }, - - async sendChromeDebugger(method: string, params: ProtocolParams = {}) { - const chromeApi = globalScope.chrome; - if (!chromeApi?.debugger?.sendCommand) throw new Error("chrome.debugger is unavailable."); - - const { - debuggee = null, - tabId = null, - targetId = null, - extensionId = null, - ...commandParams - } = params as CdpDebuggeeCommandParams; - const resolvedDebuggee = debuggee || { tabId, targetId, extensionId }; - for (const key of Object.keys(resolvedDebuggee)) { - if (resolvedDebuggee[key] === null || resolvedDebuggee[key] === undefined) delete resolvedDebuggee[key]; - } - if (Object.keys(resolvedDebuggee).length === 0) { - let [tab] = await chromeApi.tabs.query({ active: true, lastFocusedWindow: true }); - if (!tab?.id) [tab] = await chromeApi.tabs.query({}); - if (!tab?.id) { - try { - tab = await chromeApi.tabs.create({ url: "https://example.com/#magic-cdp", active: true }); - } catch { - const win = await chromeApi.windows.create({ url: "https://example.com/#magic-cdp", focused: true }); - tab = win.tabs?.[0] || null; - } - } - if (!tab?.id) throw new Error(`chrome_debugger route for ${method} could not find an active tab.`); - resolvedDebuggee.tabId = tab.id; - } - - const key = JSON.stringify(resolvedDebuggee); - if (!attachedDebuggees.has(key)) { - try { - await new Promise((resolve, reject) => - chromeApi.debugger.attach(resolvedDebuggee, "1.3", () => { - const error = chromeApi.runtime.lastError; - if (error) reject(new Error(error.message)); - else resolve(); - }), - ); - } catch (error) { - if (!error.message.includes("Another debugger is already attached")) throw error; - } - await new Promise((resolve, reject) => - chromeApi.debugger.sendCommand(resolvedDebuggee, "Target.setAutoAttach", targetAutoAttachParams, () => { - const error = chromeApi.runtime.lastError; - if (error) reject(new Error(error.message)); - else resolve(); - }), - ); - attachedDebuggees.add(key); - } - - return new Promise((resolve, reject) => - chromeApi.debugger.sendCommand(resolvedDebuggee, method, commandParams, (result) => { - const error = chromeApi.runtime.lastError; - if (error) reject(new Error(error.message)); - else resolve(result); - }), - ); - }, - }; - - globalScope.MagicCDP = MagicCDPServer; - - MagicCDPServer.addCustomEvent({ - name: "Magic.pong", - bindingName: bindingNameFor("Magic.pong"), - }); - - MagicCDPServer.addCustomCommand({ - name: "Magic.ping", - handler: async (params: MagicPingParams = {}, cdpSessionId: string | null = null) => { - const receivedAt = Date.now(); - await MagicCDPServer.emit( - "Magic.pong", - { - sentAt: typeof params.sentAt === "number" ? params.sentAt : receivedAt, - receivedAt, - from: "extension-service-worker", - }, - cdpSessionId, - ); - return { ok: true }; - }, - }); - - MagicCDPServer.addCustomCommand({ - name: "Magic.configure", - handler: async (params: MagicConfigureParams = {}) => MagicCDPServer.configure(params), - }); - - MagicCDPServer.addCustomCommand({ - name: "Magic.addMiddleware", - handler: async (params: ProtocolParams = {}) => MagicCDPServer.addMiddleware(params as MagicMiddlewareRegistration), - }); - - const chromeApi = globalScope.chrome; - try { - chromeApi?.runtime?.onStartup?.addListener(startOffscreenKeepAlive); - } catch {} - try { - chromeApi?.runtime?.onInstalled?.addListener(startOffscreenKeepAlive); - } catch {} - try { - chromeApi?.tabs?.onCreated?.addListener(startOffscreenKeepAlive); - } catch {} - try { - chromeApi?.runtime?.onConnect?.addListener((port) => { - if (port.name !== offscreenKeepAlivePortName) return; - offscreenKeepAlivePort = port; - port.onMessage.addListener(() => {}); - port.onDisconnect.addListener(() => { - if (offscreenKeepAlivePort === port) offscreenKeepAlivePort = null; - }); - }); - } catch {} - startOffscreenKeepAlive(); - - return MagicCDPServer; -} - -export const MagicCDPServer = installMagicCDPServer(globalThis); diff --git a/extension/manifest.json b/extension/manifest.json index c415899..3a3042f 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 3, - "name": "MagicCDP Bridge", + "name": "CDPMod Bridge", "version": "0.1.0", - "description": "Extension service worker bridge for MagicCDP custom commands and events.", + "description": "Extension service worker bridge for CDPMod custom commands and events.", "minimum_chrome_version": "116", "background": { "service_worker": "service_worker.js", diff --git a/extension/offscreen/keepalive.html b/extension/offscreen/keepalive.html index 08ad96b..052b78a 100644 --- a/extension/offscreen/keepalive.html +++ b/extension/offscreen/keepalive.html @@ -3,7 +3,7 @@ - MagicCDP Keepalive + CDPMod Keepalive diff --git a/extension/offscreen/keepalive.ts b/extension/offscreen/keepalive.ts index 896d890..4258f42 100644 --- a/extension/offscreen/keepalive.ts +++ b/extension/offscreen/keepalive.ts @@ -1,14 +1,14 @@ -const MAGIC_CDP_OFFSCREEN_KEEPALIVE_PORT = "MagicCDPOffscreenKeepAlive"; -const MAGIC_CDP_OFFSCREEN_KEEPALIVE_INTERVAL_MS = 1_000; +const CDPMOD_OFFSCREEN_KEEPALIVE_PORT = "CDPModOffscreenKeepAlive"; +const CDPMOD_OFFSCREEN_KEEPALIVE_INTERVAL_MS = 1_000; let port: chrome.runtime.Port | null = null; function sendKeepAlive() { - port?.postMessage({ type: "MagicCDPOffscreenKeepAlive", at: Date.now() }); + port?.postMessage({ type: "CDPModOffscreenKeepAlive", at: Date.now() }); } function connectKeepAlivePort() { - port = chrome.runtime.connect({ name: MAGIC_CDP_OFFSCREEN_KEEPALIVE_PORT }); + port = chrome.runtime.connect({ name: CDPMOD_OFFSCREEN_KEEPALIVE_PORT }); port.onDisconnect.addListener(() => { port = null; setTimeout(connectKeepAlivePort, 250); @@ -17,4 +17,4 @@ function connectKeepAlivePort() { } connectKeepAlivePort(); -setInterval(sendKeepAlive, MAGIC_CDP_OFFSCREEN_KEEPALIVE_INTERVAL_MS); +setInterval(sendKeepAlive, CDPMOD_OFFSCREEN_KEEPALIVE_INTERVAL_MS); diff --git a/extension/service_worker.ts b/extension/service_worker.ts index 2936bd4..35c5e88 100644 --- a/extension/service_worker.ts +++ b/extension/service_worker.ts @@ -1,4 +1,4 @@ -// Extension service worker entry point. Importing MagicCDPServer installs it on +// Extension service worker entry point. Importing CDPModServer installs it on // globalThis and starts best-effort keepalive setup. -import "./MagicCDPServer.js"; +import "./CDPModServer.js"; diff --git a/package.json b/package.json index 6a96140..1cfbca0 100644 --- a/package.json +++ b/package.json @@ -1,34 +1,59 @@ { - "name": "magic-cdp-bridge", + "name": "cdpmod", "version": "0.0.0", "private": true, + "repository": { + "type": "git", + "url": "git+https://github.com/pirate/cdpmod.git" + }, "type": "module", + "exports": { + ".": { + "types": "./client/js/CDPModClient.ts", + "import": "./dist/client/js/CDPModClient.js" + }, + "./client": { + "types": "./client/js/CDPModClient.ts", + "import": "./dist/client/js/CDPModClient.js" + }, + "./extension/service_worker.js": "./dist/extension/service_worker.js", + "./extension/CDPModServer.js": "./dist/extension/CDPModServer.js", + "./extension/translate.js": "./dist/extension/translate.js", + "./bridge/translate.js": "./dist/bridge/translate.js", + "./types/*": "./dist/types/*", + "./types/zod/*": "./dist/types/zod/*" + }, "scripts": { "clean": "rm -rf dist", "build": "pnpm run clean && pnpm run build:package && pnpm run build:extension-assets", "build:package": "tsc -p tsconfig.json", "build:extension-assets": "node -e \"const fs = require('node:fs'); fs.mkdirSync('dist/extension/offscreen', { recursive: true }); fs.copyFileSync('extension/manifest.json', 'dist/extension/manifest.json'); fs.copyFileSync('dist/bridge/translate.js', 'dist/extension/translate.js'); fs.copyFileSync('extension/offscreen/keepalive.html', 'dist/extension/offscreen/keepalive.html');\"", "typecheck": "tsc -p tsconfig.json --noEmit", - "lint": "oxlint .", - "format": "oxfmt .", + "lint": "pnpm exec prek run --all-files", + "format": "pnpm exec prek run oxfmt --all-files", "format:check": "oxfmt --check .", "demo:js": "pnpm run build && node dist/client/js/demo.js", "demo:python": "pnpm run build && cd client/python && uv run python demo.py", - "demo:go": "pnpm run build && (cd client/go && go run .)", + "demo:go": "pnpm run build && (cd client/go && go run ./demo)", + "demo:proxy:playwright": "pnpm run build && node dist/client/js/examples/playwright.js", + "demo:proxy:puppeteer": "pnpm run build && node dist/client/js/examples/puppeteer.js", "proxy": "pnpm run build && node dist/bridge/proxy.js", - "test": "pnpm run build && node --test \"dist/test/*.test.js\"" + "test": "pnpm run build && node --test \"dist/test/*.test.js\"", + "prepare": "pnpm exec prek install" }, "dependencies": { "ws": "^8.18.0", "zod": "^4.4.1" }, "devDependencies": { + "@j178/prek": "0.3.10", "@types/chrome": "^0.1.40", "@types/node": "^25.6.0", "@types/ws": "^8.18.1", "oxfmt": "^0.47.0", "oxlint": "^1.62.0", "playwright": "^1.59.1", + "puppeteer-core": "^24.42.0", "typescript": "^6.0.3" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 13a5799..ab2c89c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,8 +13,11 @@ importers: version: 8.20.0 zod: specifier: ^4.4.1 - version: 4.4.1 + version: 4.4.2 devDependencies: + '@j178/prek': + specifier: 0.3.10 + version: 0.3.10 '@types/chrome': specifier: ^0.1.40 version: 0.1.40 @@ -33,12 +36,127 @@ importers: playwright: specifier: ^1.59.1 version: 1.59.1 + puppeteer-core: + specifier: ^24.42.0 + version: 24.42.0 typescript: specifier: ^6.0.3 version: 6.0.3 packages: + '@j178/prek-darwin-arm64@0.3.10': + resolution: {integrity: sha512-7KHluUGx5lAEtRKnleVSmZGsc9JNeVMRLbSngwU25e4XiJNdczVPrD5EcNwjngh4qoAm5xs05LE/waH7Kcowrg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@j178/prek-darwin-x64@0.3.10': + resolution: {integrity: sha512-IGW0I1NE0fQmv82VfXtlmqLxnLGw3DaTjRYK6NvlnMlbpRXfCzUmafuaL1JNm4DwzIkdxK+HcmoKDW7MFOhXHA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@j178/prek-linux-arm-gnueabihf@0.3.10': + resolution: {integrity: sha512-DCTNe/uBhYEe8OdBsmm7NjHjPzdSjpqLHQCzgwxMuzTc0TxCbE1xSOjHE/z4iXkmnvCO+5eSHk8MCG8FJmrzqw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@j178/prek-linux-arm-musleabihf@0.3.10': + resolution: {integrity: sha512-+VXSnujzOBY6LqhKrV3nB41btA8qxYYd1UurDbmTQnu97Pa3bHxkRA/AweyOuEKkCxzYpqBXX73c71sHMOm8ag==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + libc: [musl] + + '@j178/prek-linux-arm64-gnu@0.3.10': + resolution: {integrity: sha512-v5eW3PGrLMJb3C9rkelNU6A0QoGX2VUiw9IF+IfgAlT/3mk376CLJsmEjUvUR/4Licpc5KRLPcTfIjWdAjNGww==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@j178/prek-linux-arm64-musl@0.3.10': + resolution: {integrity: sha512-mVtSjMPBcvCBO1DM4TmTKPjhudGYzykT8AGuUf7Iu5Yh8GlLIzeOwWsN6dOYrxRZ3Etykv4sQxcoqaAOjpHp1g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@j178/prek-linux-armv7-musleabihf@0.3.10': + resolution: {integrity: sha512-AbHBE3YkL0fuky0SvUwxKlHzhUki2JIBOWubUqGwxAbmnrVRmLImUJu4iaFjqytxrtZjtLCFtk4nO28DTgHVKQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + libc: [musl] + + '@j178/prek-linux-ia32-gnu@0.3.10': + resolution: {integrity: sha512-tk6Xw/HVEMP+jHy5zeNvi+W6F7DAeO30st8eTynrMJHfaMst0fg7+CPA4FNr3tV12gxz55g6HFgLyCoTiTnxBw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + libc: [glibc] + + '@j178/prek-linux-ia32-musl@0.3.10': + resolution: {integrity: sha512-9Pde8WU7UoO/VYc1YcseAj0FevKQq5oiXMW+MV4M1JJeXuzP2LWs6d26CgHEkim0TCjIchN9S8Yx/LbEEOq+jA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + libc: [musl] + + '@j178/prek-linux-riscv64-gnu@0.3.10': + resolution: {integrity: sha512-0eNmgunCKM51GuKnVkEcvr+u5j88v7iKsUx1Aqh4WqH1OEdtYhSVmIakyqbEV3ykT0henUCxDLx0H6au9x1OFg==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@j178/prek-linux-s390x-gnu@0.3.10': + resolution: {integrity: sha512-lkIBbxOGbsZgdK9irRihDDfT8yvuXZeq5EC2KAM1sdCE8P58KMWLUdvKKqBN30sObQzQWsHSelOQ/ZHs+mkyvA==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@j178/prek-linux-x64-gnu@0.3.10': + resolution: {integrity: sha512-UfbNCEF6RDc0CMQzSyPtD20uTZGWGX6/N+JvQY2QdLPEgeYvKnDJixVcslkYSjLmQe2AdWpht2tVY+qzc9WKEA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@j178/prek-linux-x64-musl@0.3.10': + resolution: {integrity: sha512-IR03/3YKYwQgUMwlzHXJe12r8lYdFK7KhPBe2rUQBVTWD/g0e0Yd1Jb3t+C6ZHXsEtrtr2qEwvbAcaJLqbpp1w==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@j178/prek-win32-arm64-msvc@0.3.10': + resolution: {integrity: sha512-m+EJ46A4y4HwWoL8jeqp52O/32HG+qR6iwy5EXTuo/93B+vQ+k7fxzlRJJX7NssbloV8rT6Frv5mkM4bi54GiA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@j178/prek-win32-ia32-msvc@0.3.10': + resolution: {integrity: sha512-ZLfUZuNzySm9V9CThF06gnA1MPjjzmikqzA+OUt/we1zI/7bPd0drP11zEnOa73JgCVM+28zb8rPOFyyqUixEQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@j178/prek-win32-x64-msvc@0.3.10': + resolution: {integrity: sha512-Ln1/nrk3R+wnxbqP8xELI4xb4Aw49Pd8MlEDKnEnxc0cVChZlO3oHac5Mgm8DHXtMzKT8l0NBOVT1PG29RA7Rw==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@j178/prek@0.3.10': + resolution: {integrity: sha512-vVIFplNy8+OCr7/yOG1yF75GBYdDwhX+qTKG6HAa/frMjcoFCHr8ATXcXoJex9rqpdnAmTOL2U3dNqmJrWatZA==} + engines: {node: '>=18'} + hasBin: true + '@oxfmt/binding-android-arm-eabi@0.47.0': resolution: {integrity: sha512-KrMQRdMi/upr81qT4ijK6X6BNp6jqpMY7FwILQnwIy9QLc3qpnhUx5rsCLGzn4ewsCQ0CNAspN2ogmP1GXLyLw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -283,6 +401,14 @@ packages: cpu: [x64] os: [win32] + '@puppeteer/browsers@2.13.0': + resolution: {integrity: sha512-46BZJYJjc/WwmKjsvDFykHtXrtomsCIrwYQPOP7VfMJoZY2bsDF9oROBABR3paDjDcmkUye1Pb1BqdcdiipaWA==} + engines: {node: '>=18'} + hasBin: true + + '@tootallnate/quickjs-emscripten@0.23.0': + resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} + '@types/chrome@0.1.40': resolution: {integrity: sha512-UnfyRAe8ORu9HSuTH0EqyOEUin3JrWW9Nl/gDXezNfTUrfIoxw+WRZgKOxGz0t5BnjbfXBnS2eCYfW2PxH1wcA==} @@ -301,11 +427,209 @@ packages: '@types/ws@8.18.1': resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} + '@types/yauzl@2.10.3': + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} + + agent-base@7.1.4: + resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} + engines: {node: '>= 14'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ast-types@0.13.4: + resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} + engines: {node: '>=4'} + + b4a@1.8.1: + resolution: {integrity: sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==} + peerDependencies: + react-native-b4a: '*' + peerDependenciesMeta: + react-native-b4a: + optional: true + + bare-events@2.8.2: + resolution: {integrity: sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==} + peerDependencies: + bare-abort-controller: '*' + peerDependenciesMeta: + bare-abort-controller: + optional: true + + bare-fs@4.7.1: + resolution: {integrity: sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw==} + engines: {bare: '>=1.16.0'} + peerDependencies: + bare-buffer: '*' + peerDependenciesMeta: + bare-buffer: + optional: true + + bare-os@3.9.1: + resolution: {integrity: sha512-6M5XjcnsygQNPMCMPXSK379xrJFiZ/AEMNBmFEmQW8d/789VQATvriyi5r0HYTL9TkQ26rn3kgdTG3aisbrXkQ==} + engines: {bare: '>=1.14.0'} + + bare-path@3.0.0: + resolution: {integrity: sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==} + + bare-stream@2.13.1: + resolution: {integrity: sha512-Vp0cnjYyrEC4whYTymQ+YZi6pBpfiICZO3cfRG8sy67ZNWe951urv1x4eW1BKNngw3U+3fPYb5JQvHbCtxH7Ow==} + peerDependencies: + bare-abort-controller: '*' + bare-buffer: '*' + bare-events: '*' + peerDependenciesMeta: + bare-abort-controller: + optional: true + bare-buffer: + optional: true + bare-events: + optional: true + + bare-url@2.4.2: + resolution: {integrity: sha512-/9a2j4ac6ckpmAHvod/ob7x439OAHst/drc2Clnq+reRYd/ovddwcF4LfoxHyNk5AuGBnPg+HqFjmE/Zpq6v0A==} + + basic-ftp@5.3.1: + resolution: {integrity: sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==} + engines: {node: '>=10.0.0'} + + buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + + chromium-bidi@14.0.0: + resolution: {integrity: sha512-9gYlLtS6tStdRWzrtXaTMnqcM4dudNegMXJxkR0I/CXObHalYeYcAMPrL19eroNZHtJ8DQmu1E+ZNOYu/IXMXw==} + peerDependencies: + devtools-protocol: '*' + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + data-uri-to-buffer@6.0.2: + resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} + engines: {node: '>= 14'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + degenerator@5.0.1: + resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} + engines: {node: '>= 14'} + + devtools-protocol@0.0.1595872: + resolution: {integrity: sha512-kRfgp8vWVjBu/fbYCiVFiOqsCk3CrMKEo3WbgGT2NXK2dG7vawWPBljixajVgGK9II8rDO9G0oD0zLt3I1daRg==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + end-of-stream@1.4.5: + resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + events-universal@1.0.1: + resolution: {integrity: sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==} + + extract-zip@2.0.1: + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} + hasBin: true + + fast-fifo@1.3.2: + resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} + + fd-slicer@1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + + get-uri@6.0.5: + resolution: {integrity: sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==} + engines: {node: '>= 14'} + + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + + ip-address@10.2.0: + resolution: {integrity: sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==} + engines: {node: '>= 12'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} + + mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + netmask@2.1.1: + resolution: {integrity: sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==} + engines: {node: '>= 0.4.0'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + oxfmt@0.47.0: resolution: {integrity: sha512-OFbkbzxKCpooQEnRmpTDnuwTX8KHXzZTQ4Df/hz85fpS67Pl+lxPEFvUtin56HIIS0B1k4X8oIzTXRZPufA2CA==} engines: {node: ^20.19.0 || >=22.12.0} @@ -321,6 +645,17 @@ packages: oxlint-tsgolint: optional: true + pac-proxy-agent@7.2.0: + resolution: {integrity: sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==} + engines: {node: '>= 14'} + + pac-resolver@7.0.1: + resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} + engines: {node: '>= 14'} + + pend@1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + playwright-core@1.59.1: resolution: {integrity: sha512-HBV/RJg81z5BiiZ9yPzIiClYV/QMsDCKUyogwH9p3MCP6IYjUFu/MActgYAvK0oWyV9NlwM3GLBjADyWgydVyg==} engines: {node: '>=18'} @@ -331,10 +666,82 @@ packages: engines: {node: '>=18'} hasBin: true + progress@2.0.3: + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} + + proxy-agent@6.5.0: + resolution: {integrity: sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==} + engines: {node: '>= 14'} + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + + pump@3.0.4: + resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==} + + puppeteer-core@24.42.0: + resolution: {integrity: sha512-T4zXokk/izH01fYPhyyev1A4piWiOKrYq7CUFpdoYQxmOnXoV6YjUabmfIjCYkNspSoAXIxRid3Tw+Vg0fthYg==} + engines: {node: '>=18'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + semver@7.7.4: + resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} + engines: {node: '>=10'} + hasBin: true + + smart-buffer@4.2.0: + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + + socks-proxy-agent@8.0.5: + resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==} + engines: {node: '>= 14'} + + socks@2.8.8: + resolution: {integrity: sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog==} + engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + streamx@2.25.0: + resolution: {integrity: sha512-0nQuG6jf1w+wddNEEXCF4nTg3LtufWINB5eFEN+5TNZW7KWJp6x87+JFL43vaAUPyCfH1wID+mNVyW6OHtFamg==} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + tar-fs@3.1.2: + resolution: {integrity: sha512-QGxxTxxyleAdyM3kpFs14ymbYmNFrfY+pHj7Z8FgtbZ7w2//VAgLMac7sT6nRpIHjppXO2AwwEOg0bPFVRcmXw==} + + tar-stream@3.2.0: + resolution: {integrity: sha512-ojzvCvVaNp6aOTFmG7jaRD0meowIAuPc3cMMhSgKiVWws1GyHbGd/xvnyuRKcKlMpt3qvxx6r0hreCNITP9hIg==} + + teex@1.0.1: + resolution: {integrity: sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==} + + text-decoder@1.2.7: + resolution: {integrity: sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==} + tinypool@2.1.0: resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} engines: {node: ^20.0.0 || >=22.0.0} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + typed-query-selector@2.12.2: + resolution: {integrity: sha512-EOPFbyIub4ngnEdqi2yOcNeDLaX/0jcE1JoAXQDDMIthap7FoN795lc/SHfIq2d416VufXpM8z/lD+WRm2gfOQ==} + typescript@6.0.3: resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} @@ -343,6 +750,16 @@ packages: undici-types@7.19.2: resolution: {integrity: sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==} + webdriver-bidi-protocol@0.4.1: + resolution: {integrity: sha512-ARrjNjtWRRs2w4Tk7nqrf2gBI0QXWuOmMCx2hU+1jUt6d00MjMxURrhxhGbrsoiZKJrhTSTzbIrc554iKI10qw==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + ws@8.20.0: resolution: {integrity: sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==} engines: {node: '>=10.0.0'} @@ -355,11 +772,96 @@ packages: utf-8-validate: optional: true - zod@4.4.1: - resolution: {integrity: sha512-a6ENMBBGZBsnlSebQ/eKCguSBeGKSf4O7BPnqVPmYGtpBYI7VSqoVqw+QcB7kPRjbqPwhYTpFbVj/RqNz/CT0Q==} + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yauzl@2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + + zod@3.25.76: + resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} + + zod@4.4.2: + resolution: {integrity: sha512-IynmDyxsEsb9RKzO3J9+4SxXnl2FTFSzNBaKKaMV6tsSk0rw9gYw9gs+JFCq/qk2LCZ78KDwyj+Z289TijSkUw==} snapshots: + '@j178/prek-darwin-arm64@0.3.10': + optional: true + + '@j178/prek-darwin-x64@0.3.10': + optional: true + + '@j178/prek-linux-arm-gnueabihf@0.3.10': + optional: true + + '@j178/prek-linux-arm-musleabihf@0.3.10': + optional: true + + '@j178/prek-linux-arm64-gnu@0.3.10': + optional: true + + '@j178/prek-linux-arm64-musl@0.3.10': + optional: true + + '@j178/prek-linux-armv7-musleabihf@0.3.10': + optional: true + + '@j178/prek-linux-ia32-gnu@0.3.10': + optional: true + + '@j178/prek-linux-ia32-musl@0.3.10': + optional: true + + '@j178/prek-linux-riscv64-gnu@0.3.10': + optional: true + + '@j178/prek-linux-s390x-gnu@0.3.10': + optional: true + + '@j178/prek-linux-x64-gnu@0.3.10': + optional: true + + '@j178/prek-linux-x64-musl@0.3.10': + optional: true + + '@j178/prek-win32-arm64-msvc@0.3.10': + optional: true + + '@j178/prek-win32-ia32-msvc@0.3.10': + optional: true + + '@j178/prek-win32-x64-msvc@0.3.10': + optional: true + + '@j178/prek@0.3.10': + optionalDependencies: + '@j178/prek-darwin-arm64': 0.3.10 + '@j178/prek-darwin-x64': 0.3.10 + '@j178/prek-linux-arm-gnueabihf': 0.3.10 + '@j178/prek-linux-arm-musleabihf': 0.3.10 + '@j178/prek-linux-arm64-gnu': 0.3.10 + '@j178/prek-linux-arm64-musl': 0.3.10 + '@j178/prek-linux-armv7-musleabihf': 0.3.10 + '@j178/prek-linux-ia32-gnu': 0.3.10 + '@j178/prek-linux-ia32-musl': 0.3.10 + '@j178/prek-linux-riscv64-gnu': 0.3.10 + '@j178/prek-linux-s390x-gnu': 0.3.10 + '@j178/prek-linux-x64-gnu': 0.3.10 + '@j178/prek-linux-x64-musl': 0.3.10 + '@j178/prek-win32-arm64-msvc': 0.3.10 + '@j178/prek-win32-ia32-msvc': 0.3.10 + '@j178/prek-win32-x64-msvc': 0.3.10 + '@oxfmt/binding-android-arm-eabi@0.47.0': optional: true @@ -474,6 +976,23 @@ snapshots: '@oxlint/binding-win32-x64-msvc@1.62.0': optional: true + '@puppeteer/browsers@2.13.0': + dependencies: + debug: 4.4.3 + extract-zip: 2.0.1 + progress: 2.0.3 + proxy-agent: 6.5.0 + semver: 7.7.4 + tar-fs: 3.1.2 + yargs: 17.7.2 + transitivePeerDependencies: + - bare-abort-controller + - bare-buffer + - react-native-b4a + - supports-color + + '@tootallnate/quickjs-emscripten@0.23.0': {} + '@types/chrome@0.1.40': dependencies: '@types/filesystem': 0.0.36 @@ -495,9 +1014,184 @@ snapshots: dependencies: '@types/node': 25.6.0 + '@types/yauzl@2.10.3': + dependencies: + '@types/node': 25.6.0 + optional: true + + agent-base@7.1.4: {} + + ansi-regex@5.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ast-types@0.13.4: + dependencies: + tslib: 2.8.1 + + b4a@1.8.1: {} + + bare-events@2.8.2: {} + + bare-fs@4.7.1: + dependencies: + bare-events: 2.8.2 + bare-path: 3.0.0 + bare-stream: 2.13.1(bare-events@2.8.2) + bare-url: 2.4.2 + fast-fifo: 1.3.2 + transitivePeerDependencies: + - bare-abort-controller + - react-native-b4a + + bare-os@3.9.1: {} + + bare-path@3.0.0: + dependencies: + bare-os: 3.9.1 + + bare-stream@2.13.1(bare-events@2.8.2): + dependencies: + streamx: 2.25.0 + teex: 1.0.1 + optionalDependencies: + bare-events: 2.8.2 + transitivePeerDependencies: + - react-native-b4a + + bare-url@2.4.2: + dependencies: + bare-path: 3.0.0 + + basic-ftp@5.3.1: {} + + buffer-crc32@0.2.13: {} + + chromium-bidi@14.0.0(devtools-protocol@0.0.1595872): + dependencies: + devtools-protocol: 0.0.1595872 + mitt: 3.0.1 + zod: 3.25.76 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + data-uri-to-buffer@6.0.2: {} + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + degenerator@5.0.1: + dependencies: + ast-types: 0.13.4 + escodegen: 2.1.0 + esprima: 4.0.1 + + devtools-protocol@0.0.1595872: {} + + emoji-regex@8.0.0: {} + + end-of-stream@1.4.5: + dependencies: + once: 1.4.0 + + escalade@3.2.0: {} + + escodegen@2.1.0: + dependencies: + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 + optionalDependencies: + source-map: 0.6.1 + + esprima@4.0.1: {} + + estraverse@5.3.0: {} + + esutils@2.0.3: {} + + events-universal@1.0.1: + dependencies: + bare-events: 2.8.2 + transitivePeerDependencies: + - bare-abort-controller + + extract-zip@2.0.1: + dependencies: + debug: 4.4.3 + get-stream: 5.2.0 + yauzl: 2.10.0 + optionalDependencies: + '@types/yauzl': 2.10.3 + transitivePeerDependencies: + - supports-color + + fast-fifo@1.3.2: {} + + fd-slicer@1.1.0: + dependencies: + pend: 1.2.0 + fsevents@2.3.2: optional: true + get-caller-file@2.0.5: {} + + get-stream@5.2.0: + dependencies: + pump: 3.0.4 + + get-uri@6.0.5: + dependencies: + basic-ftp: 5.3.1 + data-uri-to-buffer: 6.0.2 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + http-proxy-agent@7.0.2: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + ip-address@10.2.0: {} + + is-fullwidth-code-point@3.0.0: {} + + lru-cache@7.18.3: {} + + mitt@3.0.1: {} + + ms@2.1.3: {} + + netmask@2.1.1: {} + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + oxfmt@0.47.0: dependencies: tinypool: 2.1.0 @@ -544,6 +1238,26 @@ snapshots: '@oxlint/binding-win32-ia32-msvc': 1.62.0 '@oxlint/binding-win32-x64-msvc': 1.62.0 + pac-proxy-agent@7.2.0: + dependencies: + '@tootallnate/quickjs-emscripten': 0.23.0 + agent-base: 7.1.4 + debug: 4.4.3 + get-uri: 6.0.5 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + pac-resolver: 7.0.1 + socks-proxy-agent: 8.0.5 + transitivePeerDependencies: + - supports-color + + pac-resolver@7.0.1: + dependencies: + degenerator: 5.0.1 + netmask: 2.1.1 + + pend@1.2.0: {} + playwright-core@1.59.1: {} playwright@1.59.1: @@ -552,12 +1266,163 @@ snapshots: optionalDependencies: fsevents: 2.3.2 + progress@2.0.3: {} + + proxy-agent@6.5.0: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + lru-cache: 7.18.3 + pac-proxy-agent: 7.2.0 + proxy-from-env: 1.1.0 + socks-proxy-agent: 8.0.5 + transitivePeerDependencies: + - supports-color + + proxy-from-env@1.1.0: {} + + pump@3.0.4: + dependencies: + end-of-stream: 1.4.5 + once: 1.4.0 + + puppeteer-core@24.42.0: + dependencies: + '@puppeteer/browsers': 2.13.0 + chromium-bidi: 14.0.0(devtools-protocol@0.0.1595872) + debug: 4.4.3 + devtools-protocol: 0.0.1595872 + typed-query-selector: 2.12.2 + webdriver-bidi-protocol: 0.4.1 + ws: 8.20.0 + transitivePeerDependencies: + - bare-abort-controller + - bare-buffer + - bufferutil + - react-native-b4a + - supports-color + - utf-8-validate + + require-directory@2.1.1: {} + + semver@7.7.4: {} + + smart-buffer@4.2.0: {} + + socks-proxy-agent@8.0.5: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + socks: 2.8.8 + transitivePeerDependencies: + - supports-color + + socks@2.8.8: + dependencies: + ip-address: 10.2.0 + smart-buffer: 4.2.0 + + source-map@0.6.1: + optional: true + + streamx@2.25.0: + dependencies: + events-universal: 1.0.1 + fast-fifo: 1.3.2 + text-decoder: 1.2.7 + transitivePeerDependencies: + - bare-abort-controller + - react-native-b4a + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + tar-fs@3.1.2: + dependencies: + pump: 3.0.4 + tar-stream: 3.2.0 + optionalDependencies: + bare-fs: 4.7.1 + bare-path: 3.0.0 + transitivePeerDependencies: + - bare-abort-controller + - bare-buffer + - react-native-b4a + + tar-stream@3.2.0: + dependencies: + b4a: 1.8.1 + bare-fs: 4.7.1 + fast-fifo: 1.3.2 + streamx: 2.25.0 + transitivePeerDependencies: + - bare-abort-controller + - bare-buffer + - react-native-b4a + + teex@1.0.1: + dependencies: + streamx: 2.25.0 + transitivePeerDependencies: + - bare-abort-controller + - react-native-b4a + + text-decoder@1.2.7: + dependencies: + b4a: 1.8.1 + transitivePeerDependencies: + - react-native-b4a + tinypool@2.1.0: {} + tslib@2.8.1: {} + + typed-query-selector@2.12.2: {} + typescript@6.0.3: {} undici-types@7.19.2: {} + webdriver-bidi-protocol@0.4.1: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrappy@1.0.2: {} + ws@8.20.0: {} - zod@4.4.1: {} + y18n@5.0.8: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yauzl@2.10.0: + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + + zod@3.25.76: {} + + zod@4.4.2: {} diff --git a/test/payload-schema-normalization.test.ts b/test/payload-schema-normalization.test.ts new file mode 100644 index 0000000..08f15bd --- /dev/null +++ b/test/payload-schema-normalization.test.ts @@ -0,0 +1,19 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { z } from "zod"; + +import { normalizeCDPModPayloadSchema } from "../types/cdpmod.js"; + +test("payload schema normalization accepts empty zod shapes", () => { + const schema = normalizeCDPModPayloadSchema({}); + assert.deepEqual(schema?.parse({ value: 1 }), { value: 1 }); +}); + +test("payload schema normalization rejects unsupported schema specs", () => { + assert.throws(() => normalizeCDPModPayloadSchema({ type: "string" }), /Unsupported payload schema/); +}); + +test("payload schema normalization accepts non-empty zod shapes", () => { + const schema = normalizeCDPModPayloadSchema({ value: z.string() }); + assert.deepEqual(schema?.parse({ value: "ok", extra: true }), { value: "ok", extra: true }); +}); diff --git a/test/routed-default-overrides.test.ts b/test/routed-default-overrides.test.ts index 381e36b..88e7db4 100644 --- a/test/routed-default-overrides.test.ts +++ b/test/routed-default-overrides.test.ts @@ -4,16 +4,22 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; import { launchChrome } from "../bridge/launcher.js"; -import { MagicCDPClient } from "../client/js/MagicCDPClient.js"; +import { CDPModClient } from "../client/js/CDPModClient.js"; import { commands, events } from "../types/zod.js"; const HERE = path.dirname(fileURLToPath(import.meta.url)); const EXTENSION_PATH = path.resolve(HERE, "..", "extension"); +function hasTargetInfo(value: unknown): value is { targetInfo: Record } { + if (value == null || typeof value !== "object" || Array.isArray(value)) return false; + const targetInfo = (value as Record).targetInfo; + return targetInfo != null && typeof targetInfo === "object" && !Array.isArray(targetInfo); +} + const getTargetsOverride = String.raw` async (params) => { const [upstream, tabs] = await Promise.all([ - MagicCDP.sendLoopback("Target.getTargets", params), + CDPMod.sendLoopback("Target.getTargets", params), chrome.tabs.query({}), ]); @@ -36,14 +42,14 @@ async (params) => { const setDiscoverTargetsOverride = String.raw` async (params) => { - if (!MagicCDP.loopback_cdp_url) throw new Error("loopback_cdp_url is required"); + if (!CDPMod.loopback_cdp_url) throw new Error("loopback_cdp_url is required"); - const state = globalThis.__magicTargetForwarder ||= { nextId: 1, pending: new Map(), ws: null }; + const state = globalThis.__cdpmodTargetForwarder ||= { nextId: 1, pending: new Map(), ws: null }; const needsSocket = !state.ws || state.ws.readyState === WebSocket.CLOSING || state.ws.readyState === WebSocket.CLOSED; if (needsSocket) { state.ws = await new Promise((resolve, reject) => { - const ws = new WebSocket(MagicCDP.loopback_cdp_url); + const ws = new WebSocket(CDPMod.loopback_cdp_url); ws.addEventListener("open", () => resolve(ws), { once: true }); ws.addEventListener("error", reject, { once: true }); }); @@ -59,7 +65,7 @@ async (params) => { } if (msg.method !== "Target.targetCreated") return; - await MagicCDP.emit("Target.targetCreated", msg.params || {}); + await CDPMod.emit("Target.targetCreated", msg.params || {}); }); } @@ -109,10 +115,10 @@ async (payload, next) => { test("service-worker routed standard CDP commands and events can be transformed", { timeout: 45_000 }, async () => { const chrome = await launchChrome({ headless: process.platform === "linux", - noSandbox: process.platform === "linux", - extraFlags: [`--load-extension=${EXTENSION_PATH}`], + sandbox: process.platform !== "linux", + extra_args: [`--load-extension=${EXTENSION_PATH}`], }); - const cdp = new MagicCDPClient({ + const cdp = new CDPModClient({ cdp_url: chrome.cdpUrl, routes: { "Target.getTargets": "service_worker", @@ -137,11 +143,11 @@ test("service-worker routed standard CDP commands and events can be transformed" "raw CDP TargetInfo should not already contain tabId", ); - await cdp.send("Magic.addCustomCommand", { + await cdp.send("Mod.addCustomCommand", { name: "Custom.tabIdFromTargetId", expression: tabIdFromTargetIdCommand, }); - await cdp.Magic.addMiddleware({ + await cdp.Mod.addMiddleware({ name: "*", phase: cdp.RESPONSE, expression: addTabIdMiddleware, @@ -154,13 +160,13 @@ test("service-worker routed standard CDP commands and events can be transformed" "wildcard response middleware should add tabId next to targetId inside TargetInfo", ); - await cdp.Magic.addMiddleware({ + await cdp.Mod.addMiddleware({ name: "*", phase: cdp.EVENT, expression: addTabIdMiddleware, }); - await cdp.Magic.addCustomCommand({ + await cdp.Mod.addCustomCommand({ name: cdp.Target.getTargets, expression: getTargetsOverride, }); @@ -179,8 +185,8 @@ test("service-worker routed standard CDP commands and events can be transformed" "expected at least one page target to be matched to a chrome.tabs tab id", ); - await cdp.Magic.addCustomEvent({ name: cdp.Target.targetCreated }); - await cdp.Magic.addCustomCommand({ + await cdp.Mod.addCustomEvent({ name: cdp.Target.targetCreated }); + await cdp.Mod.addCustomCommand({ name: cdp.Target.setDiscoverTargets, expression: setDiscoverTargetsOverride, }); @@ -191,6 +197,7 @@ test("service-worker routed standard CDP commands and events can be transformed" 10_000, ); cdp.on("Target.targetCreated", (params) => { + if (!hasTargetInfo(params)) return; if (!Object.hasOwn(params.targetInfo || {}, "tabId")) return; clearTimeout(timeout); resolve(params); @@ -198,7 +205,7 @@ test("service-worker routed standard CDP commands and events can be transformed" }); await cdp.Target.setDiscoverTargets({ discover: true }); - await cdp._sendFrame("Target.createTarget", { url: "about:blank#magic-cdp-event-test" }); + await cdp._sendFrame("Target.createTarget", { url: "about:blank#cdpmod-event-test" }); const event = events["Target.targetCreated"].parse(await forwardedEvent); assert.ok(Object.hasOwn(event.targetInfo, "tabId"), "transformed event targetInfo should include tabId"); diff --git a/types/aliases.ts b/types/aliases.ts index bdf7a39..0a79a1b 100644 --- a/types/aliases.ts +++ b/types/aliases.ts @@ -2,18 +2,11 @@ import type { z } from "zod"; import type { cdp } from "./cdp.js"; import { commands, events, types as runtimeTypes } from "./zod.js"; -import { Magic, normalizeMagicName, normalizeMagicPayloadSchema } from "./magic.js"; +import { Mod, normalizeCDPModName, normalizeCDPModPayloadSchema } from "./cdpmod.js"; -export type CdpNamedValue = { - readonly id: Name; - readonly name: Name; - readonly kind: Kind; - meta(): { id: Name; name: Name; kind: Kind }; -}; -export type CdpCommandAlias = ((params: Params) => Promise) & - CdpNamedValue; -export type CdpOptionalCommandAlias = ((params?: Params) => Promise) & - CdpNamedValue; +export type CdpNamedValue = { readonly id: Name; readonly name: Name; readonly kind: Kind; meta(): { id: Name; name: Name; kind: Kind } }; +export type CdpCommandAlias = ((params: Params) => Promise) & CdpNamedValue; +export type CdpOptionalCommandAlias = ((params?: Params) => Promise) & CdpNamedValue; export type CdpEventAlias = z.ZodType & CdpNamedValue; export type CdpAliasSend = (method: string, params?: unknown) => Promise; export type CdpAliasHooks = { @@ -29,799 +22,205 @@ export type CdpAliases = { readonly RESPONSE: "response"; readonly EVENT: "event"; Accessibility: { - disable: CdpOptionalCommandAlias< - cdp.types.ts.Accessibility.DisableParams, - cdp.types.ts.Accessibility.DisableResult, - "Accessibility.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Accessibility.EnableParams, - cdp.types.ts.Accessibility.EnableResult, - "Accessibility.enable" - >; - getPartialAXTree: CdpOptionalCommandAlias< - cdp.types.ts.Accessibility.GetPartialAXTreeParams, - cdp.types.ts.Accessibility.GetPartialAXTreeResult, - "Accessibility.getPartialAXTree" - >; - getFullAXTree: CdpOptionalCommandAlias< - cdp.types.ts.Accessibility.GetFullAXTreeParams, - cdp.types.ts.Accessibility.GetFullAXTreeResult, - "Accessibility.getFullAXTree" - >; - getRootAXNode: CdpOptionalCommandAlias< - cdp.types.ts.Accessibility.GetRootAXNodeParams, - cdp.types.ts.Accessibility.GetRootAXNodeResult, - "Accessibility.getRootAXNode" - >; - getAXNodeAndAncestors: CdpOptionalCommandAlias< - cdp.types.ts.Accessibility.GetAXNodeAndAncestorsParams, - cdp.types.ts.Accessibility.GetAXNodeAndAncestorsResult, - "Accessibility.getAXNodeAndAncestors" - >; - getChildAXNodes: CdpCommandAlias< - cdp.types.ts.Accessibility.GetChildAXNodesParams, - cdp.types.ts.Accessibility.GetChildAXNodesResult, - "Accessibility.getChildAXNodes" - >; - queryAXTree: CdpOptionalCommandAlias< - cdp.types.ts.Accessibility.QueryAXTreeParams, - cdp.types.ts.Accessibility.QueryAXTreeResult, - "Accessibility.queryAXTree" - >; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + getPartialAXTree: CdpOptionalCommandAlias; + getFullAXTree: CdpOptionalCommandAlias; + getRootAXNode: CdpOptionalCommandAlias; + getAXNodeAndAncestors: CdpOptionalCommandAlias; + getChildAXNodes: CdpCommandAlias; + queryAXTree: CdpOptionalCommandAlias; loadComplete: CdpEventAlias; nodesUpdated: CdpEventAlias; }; Animation: { - disable: CdpOptionalCommandAlias< - cdp.types.ts.Animation.DisableParams, - cdp.types.ts.Animation.DisableResult, - "Animation.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Animation.EnableParams, - cdp.types.ts.Animation.EnableResult, - "Animation.enable" - >; - getCurrentTime: CdpCommandAlias< - cdp.types.ts.Animation.GetCurrentTimeParams, - cdp.types.ts.Animation.GetCurrentTimeResult, - "Animation.getCurrentTime" - >; - getPlaybackRate: CdpOptionalCommandAlias< - cdp.types.ts.Animation.GetPlaybackRateParams, - cdp.types.ts.Animation.GetPlaybackRateResult, - "Animation.getPlaybackRate" - >; - releaseAnimations: CdpCommandAlias< - cdp.types.ts.Animation.ReleaseAnimationsParams, - cdp.types.ts.Animation.ReleaseAnimationsResult, - "Animation.releaseAnimations" - >; - resolveAnimation: CdpCommandAlias< - cdp.types.ts.Animation.ResolveAnimationParams, - cdp.types.ts.Animation.ResolveAnimationResult, - "Animation.resolveAnimation" - >; - seekAnimations: CdpCommandAlias< - cdp.types.ts.Animation.SeekAnimationsParams, - cdp.types.ts.Animation.SeekAnimationsResult, - "Animation.seekAnimations" - >; - setPaused: CdpCommandAlias< - cdp.types.ts.Animation.SetPausedParams, - cdp.types.ts.Animation.SetPausedResult, - "Animation.setPaused" - >; - setPlaybackRate: CdpCommandAlias< - cdp.types.ts.Animation.SetPlaybackRateParams, - cdp.types.ts.Animation.SetPlaybackRateResult, - "Animation.setPlaybackRate" - >; - setTiming: CdpCommandAlias< - cdp.types.ts.Animation.SetTimingParams, - cdp.types.ts.Animation.SetTimingResult, - "Animation.setTiming" - >; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + getCurrentTime: CdpCommandAlias; + getPlaybackRate: CdpOptionalCommandAlias; + releaseAnimations: CdpCommandAlias; + resolveAnimation: CdpCommandAlias; + seekAnimations: CdpCommandAlias; + setPaused: CdpCommandAlias; + setPlaybackRate: CdpCommandAlias; + setTiming: CdpCommandAlias; animationCanceled: CdpEventAlias; animationCreated: CdpEventAlias; animationStarted: CdpEventAlias; animationUpdated: CdpEventAlias; }; Audits: { - getEncodedResponse: CdpCommandAlias< - cdp.types.ts.Audits.GetEncodedResponseParams, - cdp.types.ts.Audits.GetEncodedResponseResult, - "Audits.getEncodedResponse" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.Audits.DisableParams, - cdp.types.ts.Audits.DisableResult, - "Audits.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Audits.EnableParams, - cdp.types.ts.Audits.EnableResult, - "Audits.enable" - >; - checkFormsIssues: CdpOptionalCommandAlias< - cdp.types.ts.Audits.CheckFormsIssuesParams, - cdp.types.ts.Audits.CheckFormsIssuesResult, - "Audits.checkFormsIssues" - >; + getEncodedResponse: CdpCommandAlias; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + checkFormsIssues: CdpOptionalCommandAlias; issueAdded: CdpEventAlias; }; Autofill: { - trigger: CdpCommandAlias< - cdp.types.ts.Autofill.TriggerParams, - cdp.types.ts.Autofill.TriggerResult, - "Autofill.trigger" - >; - setAddresses: CdpCommandAlias< - cdp.types.ts.Autofill.SetAddressesParams, - cdp.types.ts.Autofill.SetAddressesResult, - "Autofill.setAddresses" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.Autofill.DisableParams, - cdp.types.ts.Autofill.DisableResult, - "Autofill.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Autofill.EnableParams, - cdp.types.ts.Autofill.EnableResult, - "Autofill.enable" - >; + trigger: CdpCommandAlias; + setAddresses: CdpCommandAlias; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; addressFormFilled: CdpEventAlias; }; BackgroundService: { - startObserving: CdpCommandAlias< - cdp.types.ts.BackgroundService.StartObservingParams, - cdp.types.ts.BackgroundService.StartObservingResult, - "BackgroundService.startObserving" - >; - stopObserving: CdpCommandAlias< - cdp.types.ts.BackgroundService.StopObservingParams, - cdp.types.ts.BackgroundService.StopObservingResult, - "BackgroundService.stopObserving" - >; - setRecording: CdpCommandAlias< - cdp.types.ts.BackgroundService.SetRecordingParams, - cdp.types.ts.BackgroundService.SetRecordingResult, - "BackgroundService.setRecording" - >; - clearEvents: CdpCommandAlias< - cdp.types.ts.BackgroundService.ClearEventsParams, - cdp.types.ts.BackgroundService.ClearEventsResult, - "BackgroundService.clearEvents" - >; - recordingStateChanged: CdpEventAlias< - cdp.types.ts.BackgroundService.RecordingStateChangedEvent, - "BackgroundService.recordingStateChanged" - >; - backgroundServiceEventReceived: CdpEventAlias< - cdp.types.ts.BackgroundService.BackgroundServiceEventReceivedEvent, - "BackgroundService.backgroundServiceEventReceived" - >; + startObserving: CdpCommandAlias; + stopObserving: CdpCommandAlias; + setRecording: CdpCommandAlias; + clearEvents: CdpCommandAlias; + recordingStateChanged: CdpEventAlias; + backgroundServiceEventReceived: CdpEventAlias; }; BluetoothEmulation: { - enable: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.EnableParams, - cdp.types.ts.BluetoothEmulation.EnableResult, - "BluetoothEmulation.enable" - >; - setSimulatedCentralState: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.SetSimulatedCentralStateParams, - cdp.types.ts.BluetoothEmulation.SetSimulatedCentralStateResult, - "BluetoothEmulation.setSimulatedCentralState" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.BluetoothEmulation.DisableParams, - cdp.types.ts.BluetoothEmulation.DisableResult, - "BluetoothEmulation.disable" - >; - simulatePreconnectedPeripheral: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.SimulatePreconnectedPeripheralParams, - cdp.types.ts.BluetoothEmulation.SimulatePreconnectedPeripheralResult, - "BluetoothEmulation.simulatePreconnectedPeripheral" - >; - simulateAdvertisement: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.SimulateAdvertisementParams, - cdp.types.ts.BluetoothEmulation.SimulateAdvertisementResult, - "BluetoothEmulation.simulateAdvertisement" - >; - simulateGATTOperationResponse: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.SimulateGATTOperationResponseParams, - cdp.types.ts.BluetoothEmulation.SimulateGATTOperationResponseResult, - "BluetoothEmulation.simulateGATTOperationResponse" - >; - simulateCharacteristicOperationResponse: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.SimulateCharacteristicOperationResponseParams, - cdp.types.ts.BluetoothEmulation.SimulateCharacteristicOperationResponseResult, - "BluetoothEmulation.simulateCharacteristicOperationResponse" - >; - simulateDescriptorOperationResponse: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.SimulateDescriptorOperationResponseParams, - cdp.types.ts.BluetoothEmulation.SimulateDescriptorOperationResponseResult, - "BluetoothEmulation.simulateDescriptorOperationResponse" - >; - addService: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.AddServiceParams, - cdp.types.ts.BluetoothEmulation.AddServiceResult, - "BluetoothEmulation.addService" - >; - removeService: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.RemoveServiceParams, - cdp.types.ts.BluetoothEmulation.RemoveServiceResult, - "BluetoothEmulation.removeService" - >; - addCharacteristic: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.AddCharacteristicParams, - cdp.types.ts.BluetoothEmulation.AddCharacteristicResult, - "BluetoothEmulation.addCharacteristic" - >; - removeCharacteristic: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.RemoveCharacteristicParams, - cdp.types.ts.BluetoothEmulation.RemoveCharacteristicResult, - "BluetoothEmulation.removeCharacteristic" - >; - addDescriptor: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.AddDescriptorParams, - cdp.types.ts.BluetoothEmulation.AddDescriptorResult, - "BluetoothEmulation.addDescriptor" - >; - removeDescriptor: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.RemoveDescriptorParams, - cdp.types.ts.BluetoothEmulation.RemoveDescriptorResult, - "BluetoothEmulation.removeDescriptor" - >; - simulateGATTDisconnection: CdpCommandAlias< - cdp.types.ts.BluetoothEmulation.SimulateGATTDisconnectionParams, - cdp.types.ts.BluetoothEmulation.SimulateGATTDisconnectionResult, - "BluetoothEmulation.simulateGATTDisconnection" - >; - gattOperationReceived: CdpEventAlias< - cdp.types.ts.BluetoothEmulation.GattOperationReceivedEvent, - "BluetoothEmulation.gattOperationReceived" - >; - characteristicOperationReceived: CdpEventAlias< - cdp.types.ts.BluetoothEmulation.CharacteristicOperationReceivedEvent, - "BluetoothEmulation.characteristicOperationReceived" - >; - descriptorOperationReceived: CdpEventAlias< - cdp.types.ts.BluetoothEmulation.DescriptorOperationReceivedEvent, - "BluetoothEmulation.descriptorOperationReceived" - >; + enable: CdpCommandAlias; + setSimulatedCentralState: CdpCommandAlias; + disable: CdpOptionalCommandAlias; + simulatePreconnectedPeripheral: CdpCommandAlias; + simulateAdvertisement: CdpCommandAlias; + simulateGATTOperationResponse: CdpCommandAlias; + simulateCharacteristicOperationResponse: CdpCommandAlias; + simulateDescriptorOperationResponse: CdpCommandAlias; + addService: CdpCommandAlias; + removeService: CdpCommandAlias; + addCharacteristic: CdpCommandAlias; + removeCharacteristic: CdpCommandAlias; + addDescriptor: CdpCommandAlias; + removeDescriptor: CdpCommandAlias; + simulateGATTDisconnection: CdpCommandAlias; + gattOperationReceived: CdpEventAlias; + characteristicOperationReceived: CdpEventAlias; + descriptorOperationReceived: CdpEventAlias; }; Browser: { - setPermission: CdpCommandAlias< - cdp.types.ts.Browser.SetPermissionParams, - cdp.types.ts.Browser.SetPermissionResult, - "Browser.setPermission" - >; - grantPermissions: CdpCommandAlias< - cdp.types.ts.Browser.GrantPermissionsParams, - cdp.types.ts.Browser.GrantPermissionsResult, - "Browser.grantPermissions" - >; - resetPermissions: CdpOptionalCommandAlias< - cdp.types.ts.Browser.ResetPermissionsParams, - cdp.types.ts.Browser.ResetPermissionsResult, - "Browser.resetPermissions" - >; - setDownloadBehavior: CdpCommandAlias< - cdp.types.ts.Browser.SetDownloadBehaviorParams, - cdp.types.ts.Browser.SetDownloadBehaviorResult, - "Browser.setDownloadBehavior" - >; - cancelDownload: CdpCommandAlias< - cdp.types.ts.Browser.CancelDownloadParams, - cdp.types.ts.Browser.CancelDownloadResult, - "Browser.cancelDownload" - >; + setPermission: CdpCommandAlias; + grantPermissions: CdpCommandAlias; + resetPermissions: CdpOptionalCommandAlias; + setDownloadBehavior: CdpCommandAlias; + cancelDownload: CdpCommandAlias; close: CdpOptionalCommandAlias; crash: CdpOptionalCommandAlias; - crashGpuProcess: CdpOptionalCommandAlias< - cdp.types.ts.Browser.CrashGpuProcessParams, - cdp.types.ts.Browser.CrashGpuProcessResult, - "Browser.crashGpuProcess" - >; - getVersion: CdpOptionalCommandAlias< - cdp.types.ts.Browser.GetVersionParams, - cdp.types.ts.Browser.GetVersionResult, - "Browser.getVersion" - >; - getBrowserCommandLine: CdpOptionalCommandAlias< - cdp.types.ts.Browser.GetBrowserCommandLineParams, - cdp.types.ts.Browser.GetBrowserCommandLineResult, - "Browser.getBrowserCommandLine" - >; - getHistograms: CdpOptionalCommandAlias< - cdp.types.ts.Browser.GetHistogramsParams, - cdp.types.ts.Browser.GetHistogramsResult, - "Browser.getHistograms" - >; - getHistogram: CdpCommandAlias< - cdp.types.ts.Browser.GetHistogramParams, - cdp.types.ts.Browser.GetHistogramResult, - "Browser.getHistogram" - >; - getWindowBounds: CdpCommandAlias< - cdp.types.ts.Browser.GetWindowBoundsParams, - cdp.types.ts.Browser.GetWindowBoundsResult, - "Browser.getWindowBounds" - >; - getWindowForTarget: CdpOptionalCommandAlias< - cdp.types.ts.Browser.GetWindowForTargetParams, - cdp.types.ts.Browser.GetWindowForTargetResult, - "Browser.getWindowForTarget" - >; - setWindowBounds: CdpCommandAlias< - cdp.types.ts.Browser.SetWindowBoundsParams, - cdp.types.ts.Browser.SetWindowBoundsResult, - "Browser.setWindowBounds" - >; - setContentsSize: CdpCommandAlias< - cdp.types.ts.Browser.SetContentsSizeParams, - cdp.types.ts.Browser.SetContentsSizeResult, - "Browser.setContentsSize" - >; - setDockTile: CdpOptionalCommandAlias< - cdp.types.ts.Browser.SetDockTileParams, - cdp.types.ts.Browser.SetDockTileResult, - "Browser.setDockTile" - >; - executeBrowserCommand: CdpCommandAlias< - cdp.types.ts.Browser.ExecuteBrowserCommandParams, - cdp.types.ts.Browser.ExecuteBrowserCommandResult, - "Browser.executeBrowserCommand" - >; - addPrivacySandboxEnrollmentOverride: CdpCommandAlias< - cdp.types.ts.Browser.AddPrivacySandboxEnrollmentOverrideParams, - cdp.types.ts.Browser.AddPrivacySandboxEnrollmentOverrideResult, - "Browser.addPrivacySandboxEnrollmentOverride" - >; - addPrivacySandboxCoordinatorKeyConfig: CdpCommandAlias< - cdp.types.ts.Browser.AddPrivacySandboxCoordinatorKeyConfigParams, - cdp.types.ts.Browser.AddPrivacySandboxCoordinatorKeyConfigResult, - "Browser.addPrivacySandboxCoordinatorKeyConfig" - >; + crashGpuProcess: CdpOptionalCommandAlias; + getVersion: CdpOptionalCommandAlias; + getBrowserCommandLine: CdpOptionalCommandAlias; + getHistograms: CdpOptionalCommandAlias; + getHistogram: CdpCommandAlias; + getWindowBounds: CdpCommandAlias; + getWindowForTarget: CdpOptionalCommandAlias; + setWindowBounds: CdpCommandAlias; + setContentsSize: CdpCommandAlias; + setDockTile: CdpOptionalCommandAlias; + executeBrowserCommand: CdpCommandAlias; + addPrivacySandboxEnrollmentOverride: CdpCommandAlias; + addPrivacySandboxCoordinatorKeyConfig: CdpCommandAlias; downloadWillBegin: CdpEventAlias; downloadProgress: CdpEventAlias; }; CacheStorage: { - deleteCache: CdpCommandAlias< - cdp.types.ts.CacheStorage.DeleteCacheParams, - cdp.types.ts.CacheStorage.DeleteCacheResult, - "CacheStorage.deleteCache" - >; - deleteEntry: CdpCommandAlias< - cdp.types.ts.CacheStorage.DeleteEntryParams, - cdp.types.ts.CacheStorage.DeleteEntryResult, - "CacheStorage.deleteEntry" - >; - requestCacheNames: CdpOptionalCommandAlias< - cdp.types.ts.CacheStorage.RequestCacheNamesParams, - cdp.types.ts.CacheStorage.RequestCacheNamesResult, - "CacheStorage.requestCacheNames" - >; - requestCachedResponse: CdpCommandAlias< - cdp.types.ts.CacheStorage.RequestCachedResponseParams, - cdp.types.ts.CacheStorage.RequestCachedResponseResult, - "CacheStorage.requestCachedResponse" - >; - requestEntries: CdpCommandAlias< - cdp.types.ts.CacheStorage.RequestEntriesParams, - cdp.types.ts.CacheStorage.RequestEntriesResult, - "CacheStorage.requestEntries" - >; + deleteCache: CdpCommandAlias; + deleteEntry: CdpCommandAlias; + requestCacheNames: CdpOptionalCommandAlias; + requestCachedResponse: CdpCommandAlias; + requestEntries: CdpCommandAlias; }; Cast: { enable: CdpOptionalCommandAlias; disable: CdpOptionalCommandAlias; - setSinkToUse: CdpCommandAlias< - cdp.types.ts.Cast.SetSinkToUseParams, - cdp.types.ts.Cast.SetSinkToUseResult, - "Cast.setSinkToUse" - >; - startDesktopMirroring: CdpCommandAlias< - cdp.types.ts.Cast.StartDesktopMirroringParams, - cdp.types.ts.Cast.StartDesktopMirroringResult, - "Cast.startDesktopMirroring" - >; - startTabMirroring: CdpCommandAlias< - cdp.types.ts.Cast.StartTabMirroringParams, - cdp.types.ts.Cast.StartTabMirroringResult, - "Cast.startTabMirroring" - >; - stopCasting: CdpCommandAlias< - cdp.types.ts.Cast.StopCastingParams, - cdp.types.ts.Cast.StopCastingResult, - "Cast.stopCasting" - >; + setSinkToUse: CdpCommandAlias; + startDesktopMirroring: CdpCommandAlias; + startTabMirroring: CdpCommandAlias; + stopCasting: CdpCommandAlias; sinksUpdated: CdpEventAlias; issueUpdated: CdpEventAlias; }; Console: { - clearMessages: CdpOptionalCommandAlias< - cdp.types.ts.Console.ClearMessagesParams, - cdp.types.ts.Console.ClearMessagesResult, - "Console.clearMessages" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.Console.DisableParams, - cdp.types.ts.Console.DisableResult, - "Console.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Console.EnableParams, - cdp.types.ts.Console.EnableResult, - "Console.enable" - >; + clearMessages: CdpOptionalCommandAlias; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; messageAdded: CdpEventAlias; }; CrashReportContext: { - getEntries: CdpOptionalCommandAlias< - cdp.types.ts.CrashReportContext.GetEntriesParams, - cdp.types.ts.CrashReportContext.GetEntriesResult, - "CrashReportContext.getEntries" - >; + getEntries: CdpOptionalCommandAlias; }; CSS: { addRule: CdpCommandAlias; - collectClassNames: CdpCommandAlias< - cdp.types.ts.CSS.CollectClassNamesParams, - cdp.types.ts.CSS.CollectClassNamesResult, - "CSS.collectClassNames" - >; - createStyleSheet: CdpCommandAlias< - cdp.types.ts.CSS.CreateStyleSheetParams, - cdp.types.ts.CSS.CreateStyleSheetResult, - "CSS.createStyleSheet" - >; + collectClassNames: CdpCommandAlias; + createStyleSheet: CdpCommandAlias; disable: CdpOptionalCommandAlias; enable: CdpOptionalCommandAlias; - forcePseudoState: CdpCommandAlias< - cdp.types.ts.CSS.ForcePseudoStateParams, - cdp.types.ts.CSS.ForcePseudoStateResult, - "CSS.forcePseudoState" - >; - forceStartingStyle: CdpCommandAlias< - cdp.types.ts.CSS.ForceStartingStyleParams, - cdp.types.ts.CSS.ForceStartingStyleResult, - "CSS.forceStartingStyle" - >; - getBackgroundColors: CdpCommandAlias< - cdp.types.ts.CSS.GetBackgroundColorsParams, - cdp.types.ts.CSS.GetBackgroundColorsResult, - "CSS.getBackgroundColors" - >; - getComputedStyleForNode: CdpCommandAlias< - cdp.types.ts.CSS.GetComputedStyleForNodeParams, - cdp.types.ts.CSS.GetComputedStyleForNodeResult, - "CSS.getComputedStyleForNode" - >; - resolveValues: CdpCommandAlias< - cdp.types.ts.CSS.ResolveValuesParams, - cdp.types.ts.CSS.ResolveValuesResult, - "CSS.resolveValues" - >; - getLonghandProperties: CdpCommandAlias< - cdp.types.ts.CSS.GetLonghandPropertiesParams, - cdp.types.ts.CSS.GetLonghandPropertiesResult, - "CSS.getLonghandProperties" - >; - getInlineStylesForNode: CdpCommandAlias< - cdp.types.ts.CSS.GetInlineStylesForNodeParams, - cdp.types.ts.CSS.GetInlineStylesForNodeResult, - "CSS.getInlineStylesForNode" - >; - getAnimatedStylesForNode: CdpCommandAlias< - cdp.types.ts.CSS.GetAnimatedStylesForNodeParams, - cdp.types.ts.CSS.GetAnimatedStylesForNodeResult, - "CSS.getAnimatedStylesForNode" - >; - getMatchedStylesForNode: CdpCommandAlias< - cdp.types.ts.CSS.GetMatchedStylesForNodeParams, - cdp.types.ts.CSS.GetMatchedStylesForNodeResult, - "CSS.getMatchedStylesForNode" - >; - getEnvironmentVariables: CdpOptionalCommandAlias< - cdp.types.ts.CSS.GetEnvironmentVariablesParams, - cdp.types.ts.CSS.GetEnvironmentVariablesResult, - "CSS.getEnvironmentVariables" - >; - getMediaQueries: CdpOptionalCommandAlias< - cdp.types.ts.CSS.GetMediaQueriesParams, - cdp.types.ts.CSS.GetMediaQueriesResult, - "CSS.getMediaQueries" - >; - getPlatformFontsForNode: CdpCommandAlias< - cdp.types.ts.CSS.GetPlatformFontsForNodeParams, - cdp.types.ts.CSS.GetPlatformFontsForNodeResult, - "CSS.getPlatformFontsForNode" - >; - getStyleSheetText: CdpCommandAlias< - cdp.types.ts.CSS.GetStyleSheetTextParams, - cdp.types.ts.CSS.GetStyleSheetTextResult, - "CSS.getStyleSheetText" - >; - getLayersForNode: CdpCommandAlias< - cdp.types.ts.CSS.GetLayersForNodeParams, - cdp.types.ts.CSS.GetLayersForNodeResult, - "CSS.getLayersForNode" - >; - getLocationForSelector: CdpCommandAlias< - cdp.types.ts.CSS.GetLocationForSelectorParams, - cdp.types.ts.CSS.GetLocationForSelectorResult, - "CSS.getLocationForSelector" - >; - trackComputedStyleUpdatesForNode: CdpOptionalCommandAlias< - cdp.types.ts.CSS.TrackComputedStyleUpdatesForNodeParams, - cdp.types.ts.CSS.TrackComputedStyleUpdatesForNodeResult, - "CSS.trackComputedStyleUpdatesForNode" - >; - trackComputedStyleUpdates: CdpCommandAlias< - cdp.types.ts.CSS.TrackComputedStyleUpdatesParams, - cdp.types.ts.CSS.TrackComputedStyleUpdatesResult, - "CSS.trackComputedStyleUpdates" - >; - takeComputedStyleUpdates: CdpOptionalCommandAlias< - cdp.types.ts.CSS.TakeComputedStyleUpdatesParams, - cdp.types.ts.CSS.TakeComputedStyleUpdatesResult, - "CSS.takeComputedStyleUpdates" - >; - setEffectivePropertyValueForNode: CdpCommandAlias< - cdp.types.ts.CSS.SetEffectivePropertyValueForNodeParams, - cdp.types.ts.CSS.SetEffectivePropertyValueForNodeResult, - "CSS.setEffectivePropertyValueForNode" - >; - setPropertyRulePropertyName: CdpCommandAlias< - cdp.types.ts.CSS.SetPropertyRulePropertyNameParams, - cdp.types.ts.CSS.SetPropertyRulePropertyNameResult, - "CSS.setPropertyRulePropertyName" - >; - setKeyframeKey: CdpCommandAlias< - cdp.types.ts.CSS.SetKeyframeKeyParams, - cdp.types.ts.CSS.SetKeyframeKeyResult, - "CSS.setKeyframeKey" - >; - setMediaText: CdpCommandAlias< - cdp.types.ts.CSS.SetMediaTextParams, - cdp.types.ts.CSS.SetMediaTextResult, - "CSS.setMediaText" - >; - setContainerQueryText: CdpCommandAlias< - cdp.types.ts.CSS.SetContainerQueryTextParams, - cdp.types.ts.CSS.SetContainerQueryTextResult, - "CSS.setContainerQueryText" - >; - setSupportsText: CdpCommandAlias< - cdp.types.ts.CSS.SetSupportsTextParams, - cdp.types.ts.CSS.SetSupportsTextResult, - "CSS.setSupportsText" - >; - setNavigationText: CdpCommandAlias< - cdp.types.ts.CSS.SetNavigationTextParams, - cdp.types.ts.CSS.SetNavigationTextResult, - "CSS.setNavigationText" - >; - setScopeText: CdpCommandAlias< - cdp.types.ts.CSS.SetScopeTextParams, - cdp.types.ts.CSS.SetScopeTextResult, - "CSS.setScopeText" - >; - setRuleSelector: CdpCommandAlias< - cdp.types.ts.CSS.SetRuleSelectorParams, - cdp.types.ts.CSS.SetRuleSelectorResult, - "CSS.setRuleSelector" - >; - setStyleSheetText: CdpCommandAlias< - cdp.types.ts.CSS.SetStyleSheetTextParams, - cdp.types.ts.CSS.SetStyleSheetTextResult, - "CSS.setStyleSheetText" - >; - setStyleTexts: CdpCommandAlias< - cdp.types.ts.CSS.SetStyleTextsParams, - cdp.types.ts.CSS.SetStyleTextsResult, - "CSS.setStyleTexts" - >; - startRuleUsageTracking: CdpOptionalCommandAlias< - cdp.types.ts.CSS.StartRuleUsageTrackingParams, - cdp.types.ts.CSS.StartRuleUsageTrackingResult, - "CSS.startRuleUsageTracking" - >; - stopRuleUsageTracking: CdpOptionalCommandAlias< - cdp.types.ts.CSS.StopRuleUsageTrackingParams, - cdp.types.ts.CSS.StopRuleUsageTrackingResult, - "CSS.stopRuleUsageTracking" - >; - takeCoverageDelta: CdpOptionalCommandAlias< - cdp.types.ts.CSS.TakeCoverageDeltaParams, - cdp.types.ts.CSS.TakeCoverageDeltaResult, - "CSS.takeCoverageDelta" - >; - setLocalFontsEnabled: CdpCommandAlias< - cdp.types.ts.CSS.SetLocalFontsEnabledParams, - cdp.types.ts.CSS.SetLocalFontsEnabledResult, - "CSS.setLocalFontsEnabled" - >; + forcePseudoState: CdpCommandAlias; + forceStartingStyle: CdpCommandAlias; + getBackgroundColors: CdpCommandAlias; + getComputedStyleForNode: CdpCommandAlias; + resolveValues: CdpCommandAlias; + getLonghandProperties: CdpCommandAlias; + getInlineStylesForNode: CdpCommandAlias; + getAnimatedStylesForNode: CdpCommandAlias; + getMatchedStylesForNode: CdpCommandAlias; + getEnvironmentVariables: CdpOptionalCommandAlias; + getMediaQueries: CdpOptionalCommandAlias; + getPlatformFontsForNode: CdpCommandAlias; + getStyleSheetText: CdpCommandAlias; + getLayersForNode: CdpCommandAlias; + getLocationForSelector: CdpCommandAlias; + trackComputedStyleUpdatesForNode: CdpOptionalCommandAlias; + trackComputedStyleUpdates: CdpCommandAlias; + takeComputedStyleUpdates: CdpOptionalCommandAlias; + setEffectivePropertyValueForNode: CdpCommandAlias; + setPropertyRulePropertyName: CdpCommandAlias; + setKeyframeKey: CdpCommandAlias; + setMediaText: CdpCommandAlias; + setContainerQueryText: CdpCommandAlias; + setSupportsText: CdpCommandAlias; + setNavigationText: CdpCommandAlias; + setScopeText: CdpCommandAlias; + setRuleSelector: CdpCommandAlias; + setStyleSheetText: CdpCommandAlias; + setStyleTexts: CdpCommandAlias; + startRuleUsageTracking: CdpOptionalCommandAlias; + stopRuleUsageTracking: CdpOptionalCommandAlias; + takeCoverageDelta: CdpOptionalCommandAlias; + setLocalFontsEnabled: CdpCommandAlias; fontsUpdated: CdpEventAlias; - mediaQueryResultChanged: CdpEventAlias< - cdp.types.ts.CSS.MediaQueryResultChangedEvent, - "CSS.mediaQueryResultChanged" - >; + mediaQueryResultChanged: CdpEventAlias; styleSheetAdded: CdpEventAlias; styleSheetChanged: CdpEventAlias; styleSheetRemoved: CdpEventAlias; computedStyleUpdated: CdpEventAlias; }; Debugger: { - continueToLocation: CdpCommandAlias< - cdp.types.ts.Debugger.ContinueToLocationParams, - cdp.types.ts.Debugger.ContinueToLocationResult, - "Debugger.continueToLocation" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.Debugger.DisableParams, - cdp.types.ts.Debugger.DisableResult, - "Debugger.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Debugger.EnableParams, - cdp.types.ts.Debugger.EnableResult, - "Debugger.enable" - >; - evaluateOnCallFrame: CdpCommandAlias< - cdp.types.ts.Debugger.EvaluateOnCallFrameParams, - cdp.types.ts.Debugger.EvaluateOnCallFrameResult, - "Debugger.evaluateOnCallFrame" - >; - getPossibleBreakpoints: CdpCommandAlias< - cdp.types.ts.Debugger.GetPossibleBreakpointsParams, - cdp.types.ts.Debugger.GetPossibleBreakpointsResult, - "Debugger.getPossibleBreakpoints" - >; - getScriptSource: CdpCommandAlias< - cdp.types.ts.Debugger.GetScriptSourceParams, - cdp.types.ts.Debugger.GetScriptSourceResult, - "Debugger.getScriptSource" - >; - disassembleWasmModule: CdpCommandAlias< - cdp.types.ts.Debugger.DisassembleWasmModuleParams, - cdp.types.ts.Debugger.DisassembleWasmModuleResult, - "Debugger.disassembleWasmModule" - >; - nextWasmDisassemblyChunk: CdpCommandAlias< - cdp.types.ts.Debugger.NextWasmDisassemblyChunkParams, - cdp.types.ts.Debugger.NextWasmDisassemblyChunkResult, - "Debugger.nextWasmDisassemblyChunk" - >; - getWasmBytecode: CdpCommandAlias< - cdp.types.ts.Debugger.GetWasmBytecodeParams, - cdp.types.ts.Debugger.GetWasmBytecodeResult, - "Debugger.getWasmBytecode" - >; - getStackTrace: CdpCommandAlias< - cdp.types.ts.Debugger.GetStackTraceParams, - cdp.types.ts.Debugger.GetStackTraceResult, - "Debugger.getStackTrace" - >; - pause: CdpOptionalCommandAlias< - cdp.types.ts.Debugger.PauseParams, - cdp.types.ts.Debugger.PauseResult, - "Debugger.pause" - >; - pauseOnAsyncCall: CdpCommandAlias< - cdp.types.ts.Debugger.PauseOnAsyncCallParams, - cdp.types.ts.Debugger.PauseOnAsyncCallResult, - "Debugger.pauseOnAsyncCall" - >; - removeBreakpoint: CdpCommandAlias< - cdp.types.ts.Debugger.RemoveBreakpointParams, - cdp.types.ts.Debugger.RemoveBreakpointResult, - "Debugger.removeBreakpoint" - >; - restartFrame: CdpCommandAlias< - cdp.types.ts.Debugger.RestartFrameParams, - cdp.types.ts.Debugger.RestartFrameResult, - "Debugger.restartFrame" - >; - resume: CdpOptionalCommandAlias< - cdp.types.ts.Debugger.ResumeParams, - cdp.types.ts.Debugger.ResumeResult, - "Debugger.resume" - >; - searchInContent: CdpCommandAlias< - cdp.types.ts.Debugger.SearchInContentParams, - cdp.types.ts.Debugger.SearchInContentResult, - "Debugger.searchInContent" - >; - setAsyncCallStackDepth: CdpCommandAlias< - cdp.types.ts.Debugger.SetAsyncCallStackDepthParams, - cdp.types.ts.Debugger.SetAsyncCallStackDepthResult, - "Debugger.setAsyncCallStackDepth" - >; - setBlackboxExecutionContexts: CdpCommandAlias< - cdp.types.ts.Debugger.SetBlackboxExecutionContextsParams, - cdp.types.ts.Debugger.SetBlackboxExecutionContextsResult, - "Debugger.setBlackboxExecutionContexts" - >; - setBlackboxPatterns: CdpCommandAlias< - cdp.types.ts.Debugger.SetBlackboxPatternsParams, - cdp.types.ts.Debugger.SetBlackboxPatternsResult, - "Debugger.setBlackboxPatterns" - >; - setBlackboxedRanges: CdpCommandAlias< - cdp.types.ts.Debugger.SetBlackboxedRangesParams, - cdp.types.ts.Debugger.SetBlackboxedRangesResult, - "Debugger.setBlackboxedRanges" - >; - setBreakpoint: CdpCommandAlias< - cdp.types.ts.Debugger.SetBreakpointParams, - cdp.types.ts.Debugger.SetBreakpointResult, - "Debugger.setBreakpoint" - >; - setInstrumentationBreakpoint: CdpCommandAlias< - cdp.types.ts.Debugger.SetInstrumentationBreakpointParams, - cdp.types.ts.Debugger.SetInstrumentationBreakpointResult, - "Debugger.setInstrumentationBreakpoint" - >; - setBreakpointByUrl: CdpCommandAlias< - cdp.types.ts.Debugger.SetBreakpointByUrlParams, - cdp.types.ts.Debugger.SetBreakpointByUrlResult, - "Debugger.setBreakpointByUrl" - >; - setBreakpointOnFunctionCall: CdpCommandAlias< - cdp.types.ts.Debugger.SetBreakpointOnFunctionCallParams, - cdp.types.ts.Debugger.SetBreakpointOnFunctionCallResult, - "Debugger.setBreakpointOnFunctionCall" - >; - setBreakpointsActive: CdpCommandAlias< - cdp.types.ts.Debugger.SetBreakpointsActiveParams, - cdp.types.ts.Debugger.SetBreakpointsActiveResult, - "Debugger.setBreakpointsActive" - >; - setPauseOnExceptions: CdpCommandAlias< - cdp.types.ts.Debugger.SetPauseOnExceptionsParams, - cdp.types.ts.Debugger.SetPauseOnExceptionsResult, - "Debugger.setPauseOnExceptions" - >; - setReturnValue: CdpCommandAlias< - cdp.types.ts.Debugger.SetReturnValueParams, - cdp.types.ts.Debugger.SetReturnValueResult, - "Debugger.setReturnValue" - >; - setScriptSource: CdpCommandAlias< - cdp.types.ts.Debugger.SetScriptSourceParams, - cdp.types.ts.Debugger.SetScriptSourceResult, - "Debugger.setScriptSource" - >; - setSkipAllPauses: CdpCommandAlias< - cdp.types.ts.Debugger.SetSkipAllPausesParams, - cdp.types.ts.Debugger.SetSkipAllPausesResult, - "Debugger.setSkipAllPauses" - >; - setVariableValue: CdpCommandAlias< - cdp.types.ts.Debugger.SetVariableValueParams, - cdp.types.ts.Debugger.SetVariableValueResult, - "Debugger.setVariableValue" - >; - stepInto: CdpOptionalCommandAlias< - cdp.types.ts.Debugger.StepIntoParams, - cdp.types.ts.Debugger.StepIntoResult, - "Debugger.stepInto" - >; - stepOut: CdpOptionalCommandAlias< - cdp.types.ts.Debugger.StepOutParams, - cdp.types.ts.Debugger.StepOutResult, - "Debugger.stepOut" - >; - stepOver: CdpOptionalCommandAlias< - cdp.types.ts.Debugger.StepOverParams, - cdp.types.ts.Debugger.StepOverResult, - "Debugger.stepOver" - >; + continueToLocation: CdpCommandAlias; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + evaluateOnCallFrame: CdpCommandAlias; + getPossibleBreakpoints: CdpCommandAlias; + getScriptSource: CdpCommandAlias; + disassembleWasmModule: CdpCommandAlias; + nextWasmDisassemblyChunk: CdpCommandAlias; + getWasmBytecode: CdpCommandAlias; + getStackTrace: CdpCommandAlias; + pause: CdpOptionalCommandAlias; + pauseOnAsyncCall: CdpCommandAlias; + removeBreakpoint: CdpCommandAlias; + restartFrame: CdpCommandAlias; + resume: CdpOptionalCommandAlias; + searchInContent: CdpCommandAlias; + setAsyncCallStackDepth: CdpCommandAlias; + setBlackboxExecutionContexts: CdpCommandAlias; + setBlackboxPatterns: CdpCommandAlias; + setBlackboxedRanges: CdpCommandAlias; + setBreakpoint: CdpCommandAlias; + setInstrumentationBreakpoint: CdpCommandAlias; + setBreakpointByUrl: CdpCommandAlias; + setBreakpointOnFunctionCall: CdpCommandAlias; + setBreakpointsActive: CdpCommandAlias; + setPauseOnExceptions: CdpCommandAlias; + setReturnValue: CdpCommandAlias; + setScriptSource: CdpCommandAlias; + setSkipAllPauses: CdpCommandAlias; + setVariableValue: CdpCommandAlias; + stepInto: CdpOptionalCommandAlias; + stepOut: CdpOptionalCommandAlias; + stepOver: CdpOptionalCommandAlias; breakpointResolved: CdpEventAlias; paused: CdpEventAlias; resumed: CdpEventAlias; @@ -829,1102 +228,288 @@ export type CdpAliases = { scriptParsed: CdpEventAlias; }; DeviceAccess: { - enable: CdpOptionalCommandAlias< - cdp.types.ts.DeviceAccess.EnableParams, - cdp.types.ts.DeviceAccess.EnableResult, - "DeviceAccess.enable" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.DeviceAccess.DisableParams, - cdp.types.ts.DeviceAccess.DisableResult, - "DeviceAccess.disable" - >; - selectPrompt: CdpCommandAlias< - cdp.types.ts.DeviceAccess.SelectPromptParams, - cdp.types.ts.DeviceAccess.SelectPromptResult, - "DeviceAccess.selectPrompt" - >; - cancelPrompt: CdpCommandAlias< - cdp.types.ts.DeviceAccess.CancelPromptParams, - cdp.types.ts.DeviceAccess.CancelPromptResult, - "DeviceAccess.cancelPrompt" - >; - deviceRequestPrompted: CdpEventAlias< - cdp.types.ts.DeviceAccess.DeviceRequestPromptedEvent, - "DeviceAccess.deviceRequestPrompted" - >; + enable: CdpOptionalCommandAlias; + disable: CdpOptionalCommandAlias; + selectPrompt: CdpCommandAlias; + cancelPrompt: CdpCommandAlias; + deviceRequestPrompted: CdpEventAlias; }; DeviceOrientation: { - clearDeviceOrientationOverride: CdpOptionalCommandAlias< - cdp.types.ts.DeviceOrientation.ClearDeviceOrientationOverrideParams, - cdp.types.ts.DeviceOrientation.ClearDeviceOrientationOverrideResult, - "DeviceOrientation.clearDeviceOrientationOverride" - >; - setDeviceOrientationOverride: CdpCommandAlias< - cdp.types.ts.DeviceOrientation.SetDeviceOrientationOverrideParams, - cdp.types.ts.DeviceOrientation.SetDeviceOrientationOverrideResult, - "DeviceOrientation.setDeviceOrientationOverride" - >; + clearDeviceOrientationOverride: CdpOptionalCommandAlias; + setDeviceOrientationOverride: CdpCommandAlias; }; DOM: { - collectClassNamesFromSubtree: CdpCommandAlias< - cdp.types.ts.DOM.CollectClassNamesFromSubtreeParams, - cdp.types.ts.DOM.CollectClassNamesFromSubtreeResult, - "DOM.collectClassNamesFromSubtree" - >; + collectClassNamesFromSubtree: CdpCommandAlias; copyTo: CdpCommandAlias; - describeNode: CdpOptionalCommandAlias< - cdp.types.ts.DOM.DescribeNodeParams, - cdp.types.ts.DOM.DescribeNodeResult, - "DOM.describeNode" - >; - scrollIntoViewIfNeeded: CdpOptionalCommandAlias< - cdp.types.ts.DOM.ScrollIntoViewIfNeededParams, - cdp.types.ts.DOM.ScrollIntoViewIfNeededResult, - "DOM.scrollIntoViewIfNeeded" - >; + describeNode: CdpOptionalCommandAlias; + scrollIntoViewIfNeeded: CdpOptionalCommandAlias; disable: CdpOptionalCommandAlias; - discardSearchResults: CdpCommandAlias< - cdp.types.ts.DOM.DiscardSearchResultsParams, - cdp.types.ts.DOM.DiscardSearchResultsResult, - "DOM.discardSearchResults" - >; + discardSearchResults: CdpCommandAlias; enable: CdpOptionalCommandAlias; focus: CdpOptionalCommandAlias; - getAttributes: CdpCommandAlias< - cdp.types.ts.DOM.GetAttributesParams, - cdp.types.ts.DOM.GetAttributesResult, - "DOM.getAttributes" - >; - getBoxModel: CdpOptionalCommandAlias< - cdp.types.ts.DOM.GetBoxModelParams, - cdp.types.ts.DOM.GetBoxModelResult, - "DOM.getBoxModel" - >; - getContentQuads: CdpOptionalCommandAlias< - cdp.types.ts.DOM.GetContentQuadsParams, - cdp.types.ts.DOM.GetContentQuadsResult, - "DOM.getContentQuads" - >; - getDocument: CdpOptionalCommandAlias< - cdp.types.ts.DOM.GetDocumentParams, - cdp.types.ts.DOM.GetDocumentResult, - "DOM.getDocument" - >; - getFlattenedDocument: CdpOptionalCommandAlias< - cdp.types.ts.DOM.GetFlattenedDocumentParams, - cdp.types.ts.DOM.GetFlattenedDocumentResult, - "DOM.getFlattenedDocument" - >; - getNodesForSubtreeByStyle: CdpCommandAlias< - cdp.types.ts.DOM.GetNodesForSubtreeByStyleParams, - cdp.types.ts.DOM.GetNodesForSubtreeByStyleResult, - "DOM.getNodesForSubtreeByStyle" - >; - getNodeForLocation: CdpCommandAlias< - cdp.types.ts.DOM.GetNodeForLocationParams, - cdp.types.ts.DOM.GetNodeForLocationResult, - "DOM.getNodeForLocation" - >; - getOuterHTML: CdpOptionalCommandAlias< - cdp.types.ts.DOM.GetOuterHTMLParams, - cdp.types.ts.DOM.GetOuterHTMLResult, - "DOM.getOuterHTML" - >; - getRelayoutBoundary: CdpCommandAlias< - cdp.types.ts.DOM.GetRelayoutBoundaryParams, - cdp.types.ts.DOM.GetRelayoutBoundaryResult, - "DOM.getRelayoutBoundary" - >; - getSearchResults: CdpCommandAlias< - cdp.types.ts.DOM.GetSearchResultsParams, - cdp.types.ts.DOM.GetSearchResultsResult, - "DOM.getSearchResults" - >; - hideHighlight: CdpOptionalCommandAlias< - cdp.types.ts.DOM.HideHighlightParams, - cdp.types.ts.DOM.HideHighlightResult, - "DOM.hideHighlight" - >; - highlightNode: CdpOptionalCommandAlias< - cdp.types.ts.DOM.HighlightNodeParams, - cdp.types.ts.DOM.HighlightNodeResult, - "DOM.highlightNode" - >; - highlightRect: CdpOptionalCommandAlias< - cdp.types.ts.DOM.HighlightRectParams, - cdp.types.ts.DOM.HighlightRectResult, - "DOM.highlightRect" - >; - markUndoableState: CdpOptionalCommandAlias< - cdp.types.ts.DOM.MarkUndoableStateParams, - cdp.types.ts.DOM.MarkUndoableStateResult, - "DOM.markUndoableState" - >; + getAttributes: CdpCommandAlias; + getBoxModel: CdpOptionalCommandAlias; + getContentQuads: CdpOptionalCommandAlias; + getDocument: CdpOptionalCommandAlias; + getFlattenedDocument: CdpOptionalCommandAlias; + getNodesForSubtreeByStyle: CdpCommandAlias; + getNodeForLocation: CdpCommandAlias; + getOuterHTML: CdpOptionalCommandAlias; + getRelayoutBoundary: CdpCommandAlias; + getSearchResults: CdpCommandAlias; + hideHighlight: CdpOptionalCommandAlias; + highlightNode: CdpOptionalCommandAlias; + highlightRect: CdpOptionalCommandAlias; + markUndoableState: CdpOptionalCommandAlias; moveTo: CdpCommandAlias; - performSearch: CdpCommandAlias< - cdp.types.ts.DOM.PerformSearchParams, - cdp.types.ts.DOM.PerformSearchResult, - "DOM.performSearch" - >; - pushNodeByPathToFrontend: CdpCommandAlias< - cdp.types.ts.DOM.PushNodeByPathToFrontendParams, - cdp.types.ts.DOM.PushNodeByPathToFrontendResult, - "DOM.pushNodeByPathToFrontend" - >; - pushNodesByBackendIdsToFrontend: CdpCommandAlias< - cdp.types.ts.DOM.PushNodesByBackendIdsToFrontendParams, - cdp.types.ts.DOM.PushNodesByBackendIdsToFrontendResult, - "DOM.pushNodesByBackendIdsToFrontend" - >; - querySelector: CdpCommandAlias< - cdp.types.ts.DOM.QuerySelectorParams, - cdp.types.ts.DOM.QuerySelectorResult, - "DOM.querySelector" - >; - querySelectorAll: CdpCommandAlias< - cdp.types.ts.DOM.QuerySelectorAllParams, - cdp.types.ts.DOM.QuerySelectorAllResult, - "DOM.querySelectorAll" - >; - getTopLayerElements: CdpOptionalCommandAlias< - cdp.types.ts.DOM.GetTopLayerElementsParams, - cdp.types.ts.DOM.GetTopLayerElementsResult, - "DOM.getTopLayerElements" - >; - getElementByRelation: CdpCommandAlias< - cdp.types.ts.DOM.GetElementByRelationParams, - cdp.types.ts.DOM.GetElementByRelationResult, - "DOM.getElementByRelation" - >; + performSearch: CdpCommandAlias; + pushNodeByPathToFrontend: CdpCommandAlias; + pushNodesByBackendIdsToFrontend: CdpCommandAlias; + querySelector: CdpCommandAlias; + querySelectorAll: CdpCommandAlias; + getTopLayerElements: CdpOptionalCommandAlias; + getElementByRelation: CdpCommandAlias; redo: CdpOptionalCommandAlias; - removeAttribute: CdpCommandAlias< - cdp.types.ts.DOM.RemoveAttributeParams, - cdp.types.ts.DOM.RemoveAttributeResult, - "DOM.removeAttribute" - >; + removeAttribute: CdpCommandAlias; removeNode: CdpCommandAlias; - requestChildNodes: CdpCommandAlias< - cdp.types.ts.DOM.RequestChildNodesParams, - cdp.types.ts.DOM.RequestChildNodesResult, - "DOM.requestChildNodes" - >; - requestNode: CdpCommandAlias< - cdp.types.ts.DOM.RequestNodeParams, - cdp.types.ts.DOM.RequestNodeResult, - "DOM.requestNode" - >; - resolveNode: CdpOptionalCommandAlias< - cdp.types.ts.DOM.ResolveNodeParams, - cdp.types.ts.DOM.ResolveNodeResult, - "DOM.resolveNode" - >; - setAttributeValue: CdpCommandAlias< - cdp.types.ts.DOM.SetAttributeValueParams, - cdp.types.ts.DOM.SetAttributeValueResult, - "DOM.setAttributeValue" - >; - setAttributesAsText: CdpCommandAlias< - cdp.types.ts.DOM.SetAttributesAsTextParams, - cdp.types.ts.DOM.SetAttributesAsTextResult, - "DOM.setAttributesAsText" - >; - setFileInputFiles: CdpCommandAlias< - cdp.types.ts.DOM.SetFileInputFilesParams, - cdp.types.ts.DOM.SetFileInputFilesResult, - "DOM.setFileInputFiles" - >; - setNodeStackTracesEnabled: CdpCommandAlias< - cdp.types.ts.DOM.SetNodeStackTracesEnabledParams, - cdp.types.ts.DOM.SetNodeStackTracesEnabledResult, - "DOM.setNodeStackTracesEnabled" - >; - getNodeStackTraces: CdpCommandAlias< - cdp.types.ts.DOM.GetNodeStackTracesParams, - cdp.types.ts.DOM.GetNodeStackTracesResult, - "DOM.getNodeStackTraces" - >; - getFileInfo: CdpCommandAlias< - cdp.types.ts.DOM.GetFileInfoParams, - cdp.types.ts.DOM.GetFileInfoResult, - "DOM.getFileInfo" - >; - getDetachedDomNodes: CdpOptionalCommandAlias< - cdp.types.ts.DOM.GetDetachedDomNodesParams, - cdp.types.ts.DOM.GetDetachedDomNodesResult, - "DOM.getDetachedDomNodes" - >; - setInspectedNode: CdpCommandAlias< - cdp.types.ts.DOM.SetInspectedNodeParams, - cdp.types.ts.DOM.SetInspectedNodeResult, - "DOM.setInspectedNode" - >; - setNodeName: CdpCommandAlias< - cdp.types.ts.DOM.SetNodeNameParams, - cdp.types.ts.DOM.SetNodeNameResult, - "DOM.setNodeName" - >; - setNodeValue: CdpCommandAlias< - cdp.types.ts.DOM.SetNodeValueParams, - cdp.types.ts.DOM.SetNodeValueResult, - "DOM.setNodeValue" - >; - setOuterHTML: CdpCommandAlias< - cdp.types.ts.DOM.SetOuterHTMLParams, - cdp.types.ts.DOM.SetOuterHTMLResult, - "DOM.setOuterHTML" - >; + requestChildNodes: CdpCommandAlias; + requestNode: CdpCommandAlias; + resolveNode: CdpOptionalCommandAlias; + setAttributeValue: CdpCommandAlias; + setAttributesAsText: CdpCommandAlias; + setFileInputFiles: CdpCommandAlias; + setNodeStackTracesEnabled: CdpCommandAlias; + getNodeStackTraces: CdpCommandAlias; + getFileInfo: CdpCommandAlias; + getDetachedDomNodes: CdpOptionalCommandAlias; + setInspectedNode: CdpCommandAlias; + setNodeName: CdpCommandAlias; + setNodeValue: CdpCommandAlias; + setOuterHTML: CdpCommandAlias; undo: CdpOptionalCommandAlias; - getFrameOwner: CdpCommandAlias< - cdp.types.ts.DOM.GetFrameOwnerParams, - cdp.types.ts.DOM.GetFrameOwnerResult, - "DOM.getFrameOwner" - >; - getContainerForNode: CdpCommandAlias< - cdp.types.ts.DOM.GetContainerForNodeParams, - cdp.types.ts.DOM.GetContainerForNodeResult, - "DOM.getContainerForNode" - >; - getQueryingDescendantsForContainer: CdpCommandAlias< - cdp.types.ts.DOM.GetQueryingDescendantsForContainerParams, - cdp.types.ts.DOM.GetQueryingDescendantsForContainerResult, - "DOM.getQueryingDescendantsForContainer" - >; - getAnchorElement: CdpCommandAlias< - cdp.types.ts.DOM.GetAnchorElementParams, - cdp.types.ts.DOM.GetAnchorElementResult, - "DOM.getAnchorElement" - >; - forceShowPopover: CdpCommandAlias< - cdp.types.ts.DOM.ForceShowPopoverParams, - cdp.types.ts.DOM.ForceShowPopoverResult, - "DOM.forceShowPopover" - >; + getFrameOwner: CdpCommandAlias; + getContainerForNode: CdpCommandAlias; + getQueryingDescendantsForContainer: CdpCommandAlias; + getAnchorElement: CdpCommandAlias; + forceShowPopover: CdpCommandAlias; attributeModified: CdpEventAlias; - adoptedStyleSheetsModified: CdpEventAlias< - cdp.types.ts.DOM.AdoptedStyleSheetsModifiedEvent, - "DOM.adoptedStyleSheetsModified" - >; + adoptedStyleSheetsModified: CdpEventAlias; attributeRemoved: CdpEventAlias; characterDataModified: CdpEventAlias; childNodeCountUpdated: CdpEventAlias; childNodeInserted: CdpEventAlias; childNodeRemoved: CdpEventAlias; - distributedNodesUpdated: CdpEventAlias< - cdp.types.ts.DOM.DistributedNodesUpdatedEvent, - "DOM.distributedNodesUpdated" - >; + distributedNodesUpdated: CdpEventAlias; documentUpdated: CdpEventAlias; inlineStyleInvalidated: CdpEventAlias; pseudoElementAdded: CdpEventAlias; - topLayerElementsUpdated: CdpEventAlias< - cdp.types.ts.DOM.TopLayerElementsUpdatedEvent, - "DOM.topLayerElementsUpdated" - >; + topLayerElementsUpdated: CdpEventAlias; scrollableFlagUpdated: CdpEventAlias; adRelatedStateUpdated: CdpEventAlias; - affectedByStartingStylesFlagUpdated: CdpEventAlias< - cdp.types.ts.DOM.AffectedByStartingStylesFlagUpdatedEvent, - "DOM.affectedByStartingStylesFlagUpdated" - >; + affectedByStartingStylesFlagUpdated: CdpEventAlias; pseudoElementRemoved: CdpEventAlias; setChildNodes: CdpEventAlias; shadowRootPopped: CdpEventAlias; shadowRootPushed: CdpEventAlias; }; DOMDebugger: { - getEventListeners: CdpCommandAlias< - cdp.types.ts.DOMDebugger.GetEventListenersParams, - cdp.types.ts.DOMDebugger.GetEventListenersResult, - "DOMDebugger.getEventListeners" - >; - removeDOMBreakpoint: CdpCommandAlias< - cdp.types.ts.DOMDebugger.RemoveDOMBreakpointParams, - cdp.types.ts.DOMDebugger.RemoveDOMBreakpointResult, - "DOMDebugger.removeDOMBreakpoint" - >; - removeEventListenerBreakpoint: CdpCommandAlias< - cdp.types.ts.DOMDebugger.RemoveEventListenerBreakpointParams, - cdp.types.ts.DOMDebugger.RemoveEventListenerBreakpointResult, - "DOMDebugger.removeEventListenerBreakpoint" - >; - removeInstrumentationBreakpoint: CdpCommandAlias< - cdp.types.ts.DOMDebugger.RemoveInstrumentationBreakpointParams, - cdp.types.ts.DOMDebugger.RemoveInstrumentationBreakpointResult, - "DOMDebugger.removeInstrumentationBreakpoint" - >; - removeXHRBreakpoint: CdpCommandAlias< - cdp.types.ts.DOMDebugger.RemoveXHRBreakpointParams, - cdp.types.ts.DOMDebugger.RemoveXHRBreakpointResult, - "DOMDebugger.removeXHRBreakpoint" - >; - setBreakOnCSPViolation: CdpCommandAlias< - cdp.types.ts.DOMDebugger.SetBreakOnCSPViolationParams, - cdp.types.ts.DOMDebugger.SetBreakOnCSPViolationResult, - "DOMDebugger.setBreakOnCSPViolation" - >; - setDOMBreakpoint: CdpCommandAlias< - cdp.types.ts.DOMDebugger.SetDOMBreakpointParams, - cdp.types.ts.DOMDebugger.SetDOMBreakpointResult, - "DOMDebugger.setDOMBreakpoint" - >; - setEventListenerBreakpoint: CdpCommandAlias< - cdp.types.ts.DOMDebugger.SetEventListenerBreakpointParams, - cdp.types.ts.DOMDebugger.SetEventListenerBreakpointResult, - "DOMDebugger.setEventListenerBreakpoint" - >; - setInstrumentationBreakpoint: CdpCommandAlias< - cdp.types.ts.DOMDebugger.SetInstrumentationBreakpointParams, - cdp.types.ts.DOMDebugger.SetInstrumentationBreakpointResult, - "DOMDebugger.setInstrumentationBreakpoint" - >; - setXHRBreakpoint: CdpCommandAlias< - cdp.types.ts.DOMDebugger.SetXHRBreakpointParams, - cdp.types.ts.DOMDebugger.SetXHRBreakpointResult, - "DOMDebugger.setXHRBreakpoint" - >; + getEventListeners: CdpCommandAlias; + removeDOMBreakpoint: CdpCommandAlias; + removeEventListenerBreakpoint: CdpCommandAlias; + removeInstrumentationBreakpoint: CdpCommandAlias; + removeXHRBreakpoint: CdpCommandAlias; + setBreakOnCSPViolation: CdpCommandAlias; + setDOMBreakpoint: CdpCommandAlias; + setEventListenerBreakpoint: CdpCommandAlias; + setInstrumentationBreakpoint: CdpCommandAlias; + setXHRBreakpoint: CdpCommandAlias; }; DOMSnapshot: { - disable: CdpOptionalCommandAlias< - cdp.types.ts.DOMSnapshot.DisableParams, - cdp.types.ts.DOMSnapshot.DisableResult, - "DOMSnapshot.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.DOMSnapshot.EnableParams, - cdp.types.ts.DOMSnapshot.EnableResult, - "DOMSnapshot.enable" - >; - getSnapshot: CdpCommandAlias< - cdp.types.ts.DOMSnapshot.GetSnapshotParams, - cdp.types.ts.DOMSnapshot.GetSnapshotResult, - "DOMSnapshot.getSnapshot" - >; - captureSnapshot: CdpCommandAlias< - cdp.types.ts.DOMSnapshot.CaptureSnapshotParams, - cdp.types.ts.DOMSnapshot.CaptureSnapshotResult, - "DOMSnapshot.captureSnapshot" - >; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + getSnapshot: CdpCommandAlias; + captureSnapshot: CdpCommandAlias; }; DOMStorage: { - clear: CdpCommandAlias< - cdp.types.ts.DOMStorage.ClearParams, - cdp.types.ts.DOMStorage.ClearResult, - "DOMStorage.clear" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.DOMStorage.DisableParams, - cdp.types.ts.DOMStorage.DisableResult, - "DOMStorage.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.DOMStorage.EnableParams, - cdp.types.ts.DOMStorage.EnableResult, - "DOMStorage.enable" - >; - getDOMStorageItems: CdpCommandAlias< - cdp.types.ts.DOMStorage.GetDOMStorageItemsParams, - cdp.types.ts.DOMStorage.GetDOMStorageItemsResult, - "DOMStorage.getDOMStorageItems" - >; - removeDOMStorageItem: CdpCommandAlias< - cdp.types.ts.DOMStorage.RemoveDOMStorageItemParams, - cdp.types.ts.DOMStorage.RemoveDOMStorageItemResult, - "DOMStorage.removeDOMStorageItem" - >; - setDOMStorageItem: CdpCommandAlias< - cdp.types.ts.DOMStorage.SetDOMStorageItemParams, - cdp.types.ts.DOMStorage.SetDOMStorageItemResult, - "DOMStorage.setDOMStorageItem" - >; - domStorageItemAdded: CdpEventAlias< - cdp.types.ts.DOMStorage.DomStorageItemAddedEvent, - "DOMStorage.domStorageItemAdded" - >; - domStorageItemRemoved: CdpEventAlias< - cdp.types.ts.DOMStorage.DomStorageItemRemovedEvent, - "DOMStorage.domStorageItemRemoved" - >; - domStorageItemUpdated: CdpEventAlias< - cdp.types.ts.DOMStorage.DomStorageItemUpdatedEvent, - "DOMStorage.domStorageItemUpdated" - >; - domStorageItemsCleared: CdpEventAlias< - cdp.types.ts.DOMStorage.DomStorageItemsClearedEvent, - "DOMStorage.domStorageItemsCleared" - >; + clear: CdpCommandAlias; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + getDOMStorageItems: CdpCommandAlias; + removeDOMStorageItem: CdpCommandAlias; + setDOMStorageItem: CdpCommandAlias; + domStorageItemAdded: CdpEventAlias; + domStorageItemRemoved: CdpEventAlias; + domStorageItemUpdated: CdpEventAlias; + domStorageItemsCleared: CdpEventAlias; }; Emulation: { - canEmulate: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.CanEmulateParams, - cdp.types.ts.Emulation.CanEmulateResult, - "Emulation.canEmulate" - >; - clearDeviceMetricsOverride: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.ClearDeviceMetricsOverrideParams, - cdp.types.ts.Emulation.ClearDeviceMetricsOverrideResult, - "Emulation.clearDeviceMetricsOverride" - >; - clearGeolocationOverride: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.ClearGeolocationOverrideParams, - cdp.types.ts.Emulation.ClearGeolocationOverrideResult, - "Emulation.clearGeolocationOverride" - >; - resetPageScaleFactor: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.ResetPageScaleFactorParams, - cdp.types.ts.Emulation.ResetPageScaleFactorResult, - "Emulation.resetPageScaleFactor" - >; - setFocusEmulationEnabled: CdpCommandAlias< - cdp.types.ts.Emulation.SetFocusEmulationEnabledParams, - cdp.types.ts.Emulation.SetFocusEmulationEnabledResult, - "Emulation.setFocusEmulationEnabled" - >; - setAutoDarkModeOverride: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.SetAutoDarkModeOverrideParams, - cdp.types.ts.Emulation.SetAutoDarkModeOverrideResult, - "Emulation.setAutoDarkModeOverride" - >; - setCPUThrottlingRate: CdpCommandAlias< - cdp.types.ts.Emulation.SetCPUThrottlingRateParams, - cdp.types.ts.Emulation.SetCPUThrottlingRateResult, - "Emulation.setCPUThrottlingRate" - >; - setDefaultBackgroundColorOverride: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.SetDefaultBackgroundColorOverrideParams, - cdp.types.ts.Emulation.SetDefaultBackgroundColorOverrideResult, - "Emulation.setDefaultBackgroundColorOverride" - >; - setSafeAreaInsetsOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetSafeAreaInsetsOverrideParams, - cdp.types.ts.Emulation.SetSafeAreaInsetsOverrideResult, - "Emulation.setSafeAreaInsetsOverride" - >; - setDeviceMetricsOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetDeviceMetricsOverrideParams, - cdp.types.ts.Emulation.SetDeviceMetricsOverrideResult, - "Emulation.setDeviceMetricsOverride" - >; - setDevicePostureOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetDevicePostureOverrideParams, - cdp.types.ts.Emulation.SetDevicePostureOverrideResult, - "Emulation.setDevicePostureOverride" - >; - clearDevicePostureOverride: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.ClearDevicePostureOverrideParams, - cdp.types.ts.Emulation.ClearDevicePostureOverrideResult, - "Emulation.clearDevicePostureOverride" - >; - setDisplayFeaturesOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetDisplayFeaturesOverrideParams, - cdp.types.ts.Emulation.SetDisplayFeaturesOverrideResult, - "Emulation.setDisplayFeaturesOverride" - >; - clearDisplayFeaturesOverride: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.ClearDisplayFeaturesOverrideParams, - cdp.types.ts.Emulation.ClearDisplayFeaturesOverrideResult, - "Emulation.clearDisplayFeaturesOverride" - >; - setScrollbarsHidden: CdpCommandAlias< - cdp.types.ts.Emulation.SetScrollbarsHiddenParams, - cdp.types.ts.Emulation.SetScrollbarsHiddenResult, - "Emulation.setScrollbarsHidden" - >; - setDocumentCookieDisabled: CdpCommandAlias< - cdp.types.ts.Emulation.SetDocumentCookieDisabledParams, - cdp.types.ts.Emulation.SetDocumentCookieDisabledResult, - "Emulation.setDocumentCookieDisabled" - >; - setEmitTouchEventsForMouse: CdpCommandAlias< - cdp.types.ts.Emulation.SetEmitTouchEventsForMouseParams, - cdp.types.ts.Emulation.SetEmitTouchEventsForMouseResult, - "Emulation.setEmitTouchEventsForMouse" - >; - setEmulatedMedia: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.SetEmulatedMediaParams, - cdp.types.ts.Emulation.SetEmulatedMediaResult, - "Emulation.setEmulatedMedia" - >; - setEmulatedVisionDeficiency: CdpCommandAlias< - cdp.types.ts.Emulation.SetEmulatedVisionDeficiencyParams, - cdp.types.ts.Emulation.SetEmulatedVisionDeficiencyResult, - "Emulation.setEmulatedVisionDeficiency" - >; - setEmulatedOSTextScale: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.SetEmulatedOSTextScaleParams, - cdp.types.ts.Emulation.SetEmulatedOSTextScaleResult, - "Emulation.setEmulatedOSTextScale" - >; - setGeolocationOverride: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.SetGeolocationOverrideParams, - cdp.types.ts.Emulation.SetGeolocationOverrideResult, - "Emulation.setGeolocationOverride" - >; - getOverriddenSensorInformation: CdpCommandAlias< - cdp.types.ts.Emulation.GetOverriddenSensorInformationParams, - cdp.types.ts.Emulation.GetOverriddenSensorInformationResult, - "Emulation.getOverriddenSensorInformation" - >; - setSensorOverrideEnabled: CdpCommandAlias< - cdp.types.ts.Emulation.SetSensorOverrideEnabledParams, - cdp.types.ts.Emulation.SetSensorOverrideEnabledResult, - "Emulation.setSensorOverrideEnabled" - >; - setSensorOverrideReadings: CdpCommandAlias< - cdp.types.ts.Emulation.SetSensorOverrideReadingsParams, - cdp.types.ts.Emulation.SetSensorOverrideReadingsResult, - "Emulation.setSensorOverrideReadings" - >; - setPressureSourceOverrideEnabled: CdpCommandAlias< - cdp.types.ts.Emulation.SetPressureSourceOverrideEnabledParams, - cdp.types.ts.Emulation.SetPressureSourceOverrideEnabledResult, - "Emulation.setPressureSourceOverrideEnabled" - >; - setPressureStateOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetPressureStateOverrideParams, - cdp.types.ts.Emulation.SetPressureStateOverrideResult, - "Emulation.setPressureStateOverride" - >; - setPressureDataOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetPressureDataOverrideParams, - cdp.types.ts.Emulation.SetPressureDataOverrideResult, - "Emulation.setPressureDataOverride" - >; - setIdleOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetIdleOverrideParams, - cdp.types.ts.Emulation.SetIdleOverrideResult, - "Emulation.setIdleOverride" - >; - clearIdleOverride: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.ClearIdleOverrideParams, - cdp.types.ts.Emulation.ClearIdleOverrideResult, - "Emulation.clearIdleOverride" - >; - setNavigatorOverrides: CdpCommandAlias< - cdp.types.ts.Emulation.SetNavigatorOverridesParams, - cdp.types.ts.Emulation.SetNavigatorOverridesResult, - "Emulation.setNavigatorOverrides" - >; - setPageScaleFactor: CdpCommandAlias< - cdp.types.ts.Emulation.SetPageScaleFactorParams, - cdp.types.ts.Emulation.SetPageScaleFactorResult, - "Emulation.setPageScaleFactor" - >; - setScriptExecutionDisabled: CdpCommandAlias< - cdp.types.ts.Emulation.SetScriptExecutionDisabledParams, - cdp.types.ts.Emulation.SetScriptExecutionDisabledResult, - "Emulation.setScriptExecutionDisabled" - >; - setTouchEmulationEnabled: CdpCommandAlias< - cdp.types.ts.Emulation.SetTouchEmulationEnabledParams, - cdp.types.ts.Emulation.SetTouchEmulationEnabledResult, - "Emulation.setTouchEmulationEnabled" - >; - setVirtualTimePolicy: CdpCommandAlias< - cdp.types.ts.Emulation.SetVirtualTimePolicyParams, - cdp.types.ts.Emulation.SetVirtualTimePolicyResult, - "Emulation.setVirtualTimePolicy" - >; - setLocaleOverride: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.SetLocaleOverrideParams, - cdp.types.ts.Emulation.SetLocaleOverrideResult, - "Emulation.setLocaleOverride" - >; - setTimezoneOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetTimezoneOverrideParams, - cdp.types.ts.Emulation.SetTimezoneOverrideResult, - "Emulation.setTimezoneOverride" - >; - setVisibleSize: CdpCommandAlias< - cdp.types.ts.Emulation.SetVisibleSizeParams, - cdp.types.ts.Emulation.SetVisibleSizeResult, - "Emulation.setVisibleSize" - >; - setDisabledImageTypes: CdpCommandAlias< - cdp.types.ts.Emulation.SetDisabledImageTypesParams, - cdp.types.ts.Emulation.SetDisabledImageTypesResult, - "Emulation.setDisabledImageTypes" - >; - setDataSaverOverride: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.SetDataSaverOverrideParams, - cdp.types.ts.Emulation.SetDataSaverOverrideResult, - "Emulation.setDataSaverOverride" - >; - setHardwareConcurrencyOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetHardwareConcurrencyOverrideParams, - cdp.types.ts.Emulation.SetHardwareConcurrencyOverrideResult, - "Emulation.setHardwareConcurrencyOverride" - >; - setUserAgentOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetUserAgentOverrideParams, - cdp.types.ts.Emulation.SetUserAgentOverrideResult, - "Emulation.setUserAgentOverride" - >; - setAutomationOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetAutomationOverrideParams, - cdp.types.ts.Emulation.SetAutomationOverrideResult, - "Emulation.setAutomationOverride" - >; - setSmallViewportHeightDifferenceOverride: CdpCommandAlias< - cdp.types.ts.Emulation.SetSmallViewportHeightDifferenceOverrideParams, - cdp.types.ts.Emulation.SetSmallViewportHeightDifferenceOverrideResult, - "Emulation.setSmallViewportHeightDifferenceOverride" - >; - getScreenInfos: CdpOptionalCommandAlias< - cdp.types.ts.Emulation.GetScreenInfosParams, - cdp.types.ts.Emulation.GetScreenInfosResult, - "Emulation.getScreenInfos" - >; - addScreen: CdpCommandAlias< - cdp.types.ts.Emulation.AddScreenParams, - cdp.types.ts.Emulation.AddScreenResult, - "Emulation.addScreen" - >; - updateScreen: CdpCommandAlias< - cdp.types.ts.Emulation.UpdateScreenParams, - cdp.types.ts.Emulation.UpdateScreenResult, - "Emulation.updateScreen" - >; - removeScreen: CdpCommandAlias< - cdp.types.ts.Emulation.RemoveScreenParams, - cdp.types.ts.Emulation.RemoveScreenResult, - "Emulation.removeScreen" - >; - setPrimaryScreen: CdpCommandAlias< - cdp.types.ts.Emulation.SetPrimaryScreenParams, - cdp.types.ts.Emulation.SetPrimaryScreenResult, - "Emulation.setPrimaryScreen" - >; - virtualTimeBudgetExpired: CdpEventAlias< - cdp.types.ts.Emulation.VirtualTimeBudgetExpiredEvent, - "Emulation.virtualTimeBudgetExpired" - >; - screenOrientationLockChanged: CdpEventAlias< - cdp.types.ts.Emulation.ScreenOrientationLockChangedEvent, - "Emulation.screenOrientationLockChanged" - >; + canEmulate: CdpOptionalCommandAlias; + clearDeviceMetricsOverride: CdpOptionalCommandAlias; + clearGeolocationOverride: CdpOptionalCommandAlias; + resetPageScaleFactor: CdpOptionalCommandAlias; + setFocusEmulationEnabled: CdpCommandAlias; + setAutoDarkModeOverride: CdpOptionalCommandAlias; + setCPUThrottlingRate: CdpCommandAlias; + setDefaultBackgroundColorOverride: CdpOptionalCommandAlias; + setSafeAreaInsetsOverride: CdpCommandAlias; + setDeviceMetricsOverride: CdpCommandAlias; + setDevicePostureOverride: CdpCommandAlias; + clearDevicePostureOverride: CdpOptionalCommandAlias; + setDisplayFeaturesOverride: CdpCommandAlias; + clearDisplayFeaturesOverride: CdpOptionalCommandAlias; + setScrollbarsHidden: CdpCommandAlias; + setDocumentCookieDisabled: CdpCommandAlias; + setEmitTouchEventsForMouse: CdpCommandAlias; + setEmulatedMedia: CdpOptionalCommandAlias; + setEmulatedVisionDeficiency: CdpCommandAlias; + setEmulatedOSTextScale: CdpOptionalCommandAlias; + setGeolocationOverride: CdpOptionalCommandAlias; + getOverriddenSensorInformation: CdpCommandAlias; + setSensorOverrideEnabled: CdpCommandAlias; + setSensorOverrideReadings: CdpCommandAlias; + setPressureSourceOverrideEnabled: CdpCommandAlias; + setPressureStateOverride: CdpCommandAlias; + setPressureDataOverride: CdpCommandAlias; + setIdleOverride: CdpCommandAlias; + clearIdleOverride: CdpOptionalCommandAlias; + setNavigatorOverrides: CdpCommandAlias; + setPageScaleFactor: CdpCommandAlias; + setScriptExecutionDisabled: CdpCommandAlias; + setTouchEmulationEnabled: CdpCommandAlias; + setVirtualTimePolicy: CdpCommandAlias; + setLocaleOverride: CdpOptionalCommandAlias; + setTimezoneOverride: CdpCommandAlias; + setVisibleSize: CdpCommandAlias; + setDisabledImageTypes: CdpCommandAlias; + setDataSaverOverride: CdpOptionalCommandAlias; + setHardwareConcurrencyOverride: CdpCommandAlias; + setUserAgentOverride: CdpCommandAlias; + setAutomationOverride: CdpCommandAlias; + setSmallViewportHeightDifferenceOverride: CdpCommandAlias; + getScreenInfos: CdpOptionalCommandAlias; + addScreen: CdpCommandAlias; + updateScreen: CdpCommandAlias; + removeScreen: CdpCommandAlias; + setPrimaryScreen: CdpCommandAlias; + virtualTimeBudgetExpired: CdpEventAlias; + screenOrientationLockChanged: CdpEventAlias; }; EventBreakpoints: { - setInstrumentationBreakpoint: CdpCommandAlias< - cdp.types.ts.EventBreakpoints.SetInstrumentationBreakpointParams, - cdp.types.ts.EventBreakpoints.SetInstrumentationBreakpointResult, - "EventBreakpoints.setInstrumentationBreakpoint" - >; - removeInstrumentationBreakpoint: CdpCommandAlias< - cdp.types.ts.EventBreakpoints.RemoveInstrumentationBreakpointParams, - cdp.types.ts.EventBreakpoints.RemoveInstrumentationBreakpointResult, - "EventBreakpoints.removeInstrumentationBreakpoint" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.EventBreakpoints.DisableParams, - cdp.types.ts.EventBreakpoints.DisableResult, - "EventBreakpoints.disable" - >; + setInstrumentationBreakpoint: CdpCommandAlias; + removeInstrumentationBreakpoint: CdpCommandAlias; + disable: CdpOptionalCommandAlias; }; Extensions: { - triggerAction: CdpCommandAlias< - cdp.types.ts.Extensions.TriggerActionParams, - cdp.types.ts.Extensions.TriggerActionResult, - "Extensions.triggerAction" - >; - loadUnpacked: CdpCommandAlias< - cdp.types.ts.Extensions.LoadUnpackedParams, - cdp.types.ts.Extensions.LoadUnpackedResult, - "Extensions.loadUnpacked" - >; - getExtensions: CdpOptionalCommandAlias< - cdp.types.ts.Extensions.GetExtensionsParams, - cdp.types.ts.Extensions.GetExtensionsResult, - "Extensions.getExtensions" - >; - uninstall: CdpCommandAlias< - cdp.types.ts.Extensions.UninstallParams, - cdp.types.ts.Extensions.UninstallResult, - "Extensions.uninstall" - >; - getStorageItems: CdpCommandAlias< - cdp.types.ts.Extensions.GetStorageItemsParams, - cdp.types.ts.Extensions.GetStorageItemsResult, - "Extensions.getStorageItems" - >; - removeStorageItems: CdpCommandAlias< - cdp.types.ts.Extensions.RemoveStorageItemsParams, - cdp.types.ts.Extensions.RemoveStorageItemsResult, - "Extensions.removeStorageItems" - >; - clearStorageItems: CdpCommandAlias< - cdp.types.ts.Extensions.ClearStorageItemsParams, - cdp.types.ts.Extensions.ClearStorageItemsResult, - "Extensions.clearStorageItems" - >; - setStorageItems: CdpCommandAlias< - cdp.types.ts.Extensions.SetStorageItemsParams, - cdp.types.ts.Extensions.SetStorageItemsResult, - "Extensions.setStorageItems" - >; + triggerAction: CdpCommandAlias; + loadUnpacked: CdpCommandAlias; + getExtensions: CdpOptionalCommandAlias; + uninstall: CdpCommandAlias; + getStorageItems: CdpCommandAlias; + removeStorageItems: CdpCommandAlias; + clearStorageItems: CdpCommandAlias; + setStorageItems: CdpCommandAlias; }; FedCm: { enable: CdpOptionalCommandAlias; - disable: CdpOptionalCommandAlias< - cdp.types.ts.FedCm.DisableParams, - cdp.types.ts.FedCm.DisableResult, - "FedCm.disable" - >; - selectAccount: CdpCommandAlias< - cdp.types.ts.FedCm.SelectAccountParams, - cdp.types.ts.FedCm.SelectAccountResult, - "FedCm.selectAccount" - >; - clickDialogButton: CdpCommandAlias< - cdp.types.ts.FedCm.ClickDialogButtonParams, - cdp.types.ts.FedCm.ClickDialogButtonResult, - "FedCm.clickDialogButton" - >; + disable: CdpOptionalCommandAlias; + selectAccount: CdpCommandAlias; + clickDialogButton: CdpCommandAlias; openUrl: CdpCommandAlias; - dismissDialog: CdpCommandAlias< - cdp.types.ts.FedCm.DismissDialogParams, - cdp.types.ts.FedCm.DismissDialogResult, - "FedCm.dismissDialog" - >; - resetCooldown: CdpOptionalCommandAlias< - cdp.types.ts.FedCm.ResetCooldownParams, - cdp.types.ts.FedCm.ResetCooldownResult, - "FedCm.resetCooldown" - >; + dismissDialog: CdpCommandAlias; + resetCooldown: CdpOptionalCommandAlias; dialogShown: CdpEventAlias; dialogClosed: CdpEventAlias; }; Fetch: { - disable: CdpOptionalCommandAlias< - cdp.types.ts.Fetch.DisableParams, - cdp.types.ts.Fetch.DisableResult, - "Fetch.disable" - >; + disable: CdpOptionalCommandAlias; enable: CdpOptionalCommandAlias; - failRequest: CdpCommandAlias< - cdp.types.ts.Fetch.FailRequestParams, - cdp.types.ts.Fetch.FailRequestResult, - "Fetch.failRequest" - >; - fulfillRequest: CdpCommandAlias< - cdp.types.ts.Fetch.FulfillRequestParams, - cdp.types.ts.Fetch.FulfillRequestResult, - "Fetch.fulfillRequest" - >; - continueRequest: CdpCommandAlias< - cdp.types.ts.Fetch.ContinueRequestParams, - cdp.types.ts.Fetch.ContinueRequestResult, - "Fetch.continueRequest" - >; - continueWithAuth: CdpCommandAlias< - cdp.types.ts.Fetch.ContinueWithAuthParams, - cdp.types.ts.Fetch.ContinueWithAuthResult, - "Fetch.continueWithAuth" - >; - continueResponse: CdpCommandAlias< - cdp.types.ts.Fetch.ContinueResponseParams, - cdp.types.ts.Fetch.ContinueResponseResult, - "Fetch.continueResponse" - >; - getResponseBody: CdpCommandAlias< - cdp.types.ts.Fetch.GetResponseBodyParams, - cdp.types.ts.Fetch.GetResponseBodyResult, - "Fetch.getResponseBody" - >; - takeResponseBodyAsStream: CdpCommandAlias< - cdp.types.ts.Fetch.TakeResponseBodyAsStreamParams, - cdp.types.ts.Fetch.TakeResponseBodyAsStreamResult, - "Fetch.takeResponseBodyAsStream" - >; + failRequest: CdpCommandAlias; + fulfillRequest: CdpCommandAlias; + continueRequest: CdpCommandAlias; + continueWithAuth: CdpCommandAlias; + continueResponse: CdpCommandAlias; + getResponseBody: CdpCommandAlias; + takeResponseBodyAsStream: CdpCommandAlias; requestPaused: CdpEventAlias; authRequired: CdpEventAlias; }; FileSystem: { - getDirectory: CdpCommandAlias< - cdp.types.ts.FileSystem.GetDirectoryParams, - cdp.types.ts.FileSystem.GetDirectoryResult, - "FileSystem.getDirectory" - >; + getDirectory: CdpCommandAlias; }; HeadlessExperimental: { - beginFrame: CdpOptionalCommandAlias< - cdp.types.ts.HeadlessExperimental.BeginFrameParams, - cdp.types.ts.HeadlessExperimental.BeginFrameResult, - "HeadlessExperimental.beginFrame" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.HeadlessExperimental.DisableParams, - cdp.types.ts.HeadlessExperimental.DisableResult, - "HeadlessExperimental.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.HeadlessExperimental.EnableParams, - cdp.types.ts.HeadlessExperimental.EnableResult, - "HeadlessExperimental.enable" - >; + beginFrame: CdpOptionalCommandAlias; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; }; HeapProfiler: { - addInspectedHeapObject: CdpCommandAlias< - cdp.types.ts.HeapProfiler.AddInspectedHeapObjectParams, - cdp.types.ts.HeapProfiler.AddInspectedHeapObjectResult, - "HeapProfiler.addInspectedHeapObject" - >; - collectGarbage: CdpOptionalCommandAlias< - cdp.types.ts.HeapProfiler.CollectGarbageParams, - cdp.types.ts.HeapProfiler.CollectGarbageResult, - "HeapProfiler.collectGarbage" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.HeapProfiler.DisableParams, - cdp.types.ts.HeapProfiler.DisableResult, - "HeapProfiler.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.HeapProfiler.EnableParams, - cdp.types.ts.HeapProfiler.EnableResult, - "HeapProfiler.enable" - >; - getHeapObjectId: CdpCommandAlias< - cdp.types.ts.HeapProfiler.GetHeapObjectIdParams, - cdp.types.ts.HeapProfiler.GetHeapObjectIdResult, - "HeapProfiler.getHeapObjectId" - >; - getObjectByHeapObjectId: CdpCommandAlias< - cdp.types.ts.HeapProfiler.GetObjectByHeapObjectIdParams, - cdp.types.ts.HeapProfiler.GetObjectByHeapObjectIdResult, - "HeapProfiler.getObjectByHeapObjectId" - >; - getSamplingProfile: CdpOptionalCommandAlias< - cdp.types.ts.HeapProfiler.GetSamplingProfileParams, - cdp.types.ts.HeapProfiler.GetSamplingProfileResult, - "HeapProfiler.getSamplingProfile" - >; - startSampling: CdpOptionalCommandAlias< - cdp.types.ts.HeapProfiler.StartSamplingParams, - cdp.types.ts.HeapProfiler.StartSamplingResult, - "HeapProfiler.startSampling" - >; - startTrackingHeapObjects: CdpOptionalCommandAlias< - cdp.types.ts.HeapProfiler.StartTrackingHeapObjectsParams, - cdp.types.ts.HeapProfiler.StartTrackingHeapObjectsResult, - "HeapProfiler.startTrackingHeapObjects" - >; - stopSampling: CdpOptionalCommandAlias< - cdp.types.ts.HeapProfiler.StopSamplingParams, - cdp.types.ts.HeapProfiler.StopSamplingResult, - "HeapProfiler.stopSampling" - >; - stopTrackingHeapObjects: CdpOptionalCommandAlias< - cdp.types.ts.HeapProfiler.StopTrackingHeapObjectsParams, - cdp.types.ts.HeapProfiler.StopTrackingHeapObjectsResult, - "HeapProfiler.stopTrackingHeapObjects" - >; - takeHeapSnapshot: CdpOptionalCommandAlias< - cdp.types.ts.HeapProfiler.TakeHeapSnapshotParams, - cdp.types.ts.HeapProfiler.TakeHeapSnapshotResult, - "HeapProfiler.takeHeapSnapshot" - >; - addHeapSnapshotChunk: CdpEventAlias< - cdp.types.ts.HeapProfiler.AddHeapSnapshotChunkEvent, - "HeapProfiler.addHeapSnapshotChunk" - >; + addInspectedHeapObject: CdpCommandAlias; + collectGarbage: CdpOptionalCommandAlias; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + getHeapObjectId: CdpCommandAlias; + getObjectByHeapObjectId: CdpCommandAlias; + getSamplingProfile: CdpOptionalCommandAlias; + startSampling: CdpOptionalCommandAlias; + startTrackingHeapObjects: CdpOptionalCommandAlias; + stopSampling: CdpOptionalCommandAlias; + stopTrackingHeapObjects: CdpOptionalCommandAlias; + takeHeapSnapshot: CdpOptionalCommandAlias; + addHeapSnapshotChunk: CdpEventAlias; heapStatsUpdate: CdpEventAlias; lastSeenObjectId: CdpEventAlias; - reportHeapSnapshotProgress: CdpEventAlias< - cdp.types.ts.HeapProfiler.ReportHeapSnapshotProgressEvent, - "HeapProfiler.reportHeapSnapshotProgress" - >; + reportHeapSnapshotProgress: CdpEventAlias; resetProfiles: CdpEventAlias; }; IndexedDB: { - clearObjectStore: CdpCommandAlias< - cdp.types.ts.IndexedDB.ClearObjectStoreParams, - cdp.types.ts.IndexedDB.ClearObjectStoreResult, - "IndexedDB.clearObjectStore" - >; - deleteDatabase: CdpCommandAlias< - cdp.types.ts.IndexedDB.DeleteDatabaseParams, - cdp.types.ts.IndexedDB.DeleteDatabaseResult, - "IndexedDB.deleteDatabase" - >; - deleteObjectStoreEntries: CdpCommandAlias< - cdp.types.ts.IndexedDB.DeleteObjectStoreEntriesParams, - cdp.types.ts.IndexedDB.DeleteObjectStoreEntriesResult, - "IndexedDB.deleteObjectStoreEntries" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.IndexedDB.DisableParams, - cdp.types.ts.IndexedDB.DisableResult, - "IndexedDB.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.IndexedDB.EnableParams, - cdp.types.ts.IndexedDB.EnableResult, - "IndexedDB.enable" - >; - requestData: CdpCommandAlias< - cdp.types.ts.IndexedDB.RequestDataParams, - cdp.types.ts.IndexedDB.RequestDataResult, - "IndexedDB.requestData" - >; - getMetadata: CdpCommandAlias< - cdp.types.ts.IndexedDB.GetMetadataParams, - cdp.types.ts.IndexedDB.GetMetadataResult, - "IndexedDB.getMetadata" - >; - requestDatabase: CdpCommandAlias< - cdp.types.ts.IndexedDB.RequestDatabaseParams, - cdp.types.ts.IndexedDB.RequestDatabaseResult, - "IndexedDB.requestDatabase" - >; - requestDatabaseNames: CdpOptionalCommandAlias< - cdp.types.ts.IndexedDB.RequestDatabaseNamesParams, - cdp.types.ts.IndexedDB.RequestDatabaseNamesResult, - "IndexedDB.requestDatabaseNames" - >; + clearObjectStore: CdpCommandAlias; + deleteDatabase: CdpCommandAlias; + deleteObjectStoreEntries: CdpCommandAlias; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + requestData: CdpCommandAlias; + getMetadata: CdpCommandAlias; + requestDatabase: CdpCommandAlias; + requestDatabaseNames: CdpOptionalCommandAlias; }; Input: { - dispatchDragEvent: CdpCommandAlias< - cdp.types.ts.Input.DispatchDragEventParams, - cdp.types.ts.Input.DispatchDragEventResult, - "Input.dispatchDragEvent" - >; - dispatchKeyEvent: CdpCommandAlias< - cdp.types.ts.Input.DispatchKeyEventParams, - cdp.types.ts.Input.DispatchKeyEventResult, - "Input.dispatchKeyEvent" - >; - insertText: CdpCommandAlias< - cdp.types.ts.Input.InsertTextParams, - cdp.types.ts.Input.InsertTextResult, - "Input.insertText" - >; - imeSetComposition: CdpCommandAlias< - cdp.types.ts.Input.ImeSetCompositionParams, - cdp.types.ts.Input.ImeSetCompositionResult, - "Input.imeSetComposition" - >; - dispatchMouseEvent: CdpCommandAlias< - cdp.types.ts.Input.DispatchMouseEventParams, - cdp.types.ts.Input.DispatchMouseEventResult, - "Input.dispatchMouseEvent" - >; - dispatchTouchEvent: CdpCommandAlias< - cdp.types.ts.Input.DispatchTouchEventParams, - cdp.types.ts.Input.DispatchTouchEventResult, - "Input.dispatchTouchEvent" - >; - cancelDragging: CdpOptionalCommandAlias< - cdp.types.ts.Input.CancelDraggingParams, - cdp.types.ts.Input.CancelDraggingResult, - "Input.cancelDragging" - >; - emulateTouchFromMouseEvent: CdpCommandAlias< - cdp.types.ts.Input.EmulateTouchFromMouseEventParams, - cdp.types.ts.Input.EmulateTouchFromMouseEventResult, - "Input.emulateTouchFromMouseEvent" - >; - setIgnoreInputEvents: CdpCommandAlias< - cdp.types.ts.Input.SetIgnoreInputEventsParams, - cdp.types.ts.Input.SetIgnoreInputEventsResult, - "Input.setIgnoreInputEvents" - >; - setInterceptDrags: CdpCommandAlias< - cdp.types.ts.Input.SetInterceptDragsParams, - cdp.types.ts.Input.SetInterceptDragsResult, - "Input.setInterceptDrags" - >; - synthesizePinchGesture: CdpCommandAlias< - cdp.types.ts.Input.SynthesizePinchGestureParams, - cdp.types.ts.Input.SynthesizePinchGestureResult, - "Input.synthesizePinchGesture" - >; - synthesizeScrollGesture: CdpCommandAlias< - cdp.types.ts.Input.SynthesizeScrollGestureParams, - cdp.types.ts.Input.SynthesizeScrollGestureResult, - "Input.synthesizeScrollGesture" - >; - synthesizeTapGesture: CdpCommandAlias< - cdp.types.ts.Input.SynthesizeTapGestureParams, - cdp.types.ts.Input.SynthesizeTapGestureResult, - "Input.synthesizeTapGesture" - >; + dispatchDragEvent: CdpCommandAlias; + dispatchKeyEvent: CdpCommandAlias; + insertText: CdpCommandAlias; + imeSetComposition: CdpCommandAlias; + dispatchMouseEvent: CdpCommandAlias; + dispatchTouchEvent: CdpCommandAlias; + cancelDragging: CdpOptionalCommandAlias; + emulateTouchFromMouseEvent: CdpCommandAlias; + setIgnoreInputEvents: CdpCommandAlias; + setInterceptDrags: CdpCommandAlias; + synthesizePinchGesture: CdpCommandAlias; + synthesizeScrollGesture: CdpCommandAlias; + synthesizeTapGesture: CdpCommandAlias; dragIntercepted: CdpEventAlias; }; Inspector: { - disable: CdpOptionalCommandAlias< - cdp.types.ts.Inspector.DisableParams, - cdp.types.ts.Inspector.DisableResult, - "Inspector.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Inspector.EnableParams, - cdp.types.ts.Inspector.EnableResult, - "Inspector.enable" - >; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; detached: CdpEventAlias; targetCrashed: CdpEventAlias; - targetReloadedAfterCrash: CdpEventAlias< - cdp.types.ts.Inspector.TargetReloadedAfterCrashEvent, - "Inspector.targetReloadedAfterCrash" - >; + targetReloadedAfterCrash: CdpEventAlias; workerScriptLoaded: CdpEventAlias; }; IO: { close: CdpCommandAlias; read: CdpCommandAlias; - resolveBlob: CdpCommandAlias< - cdp.types.ts.IO.ResolveBlobParams, - cdp.types.ts.IO.ResolveBlobResult, - "IO.resolveBlob" - >; + resolveBlob: CdpCommandAlias; }; LayerTree: { - compositingReasons: CdpCommandAlias< - cdp.types.ts.LayerTree.CompositingReasonsParams, - cdp.types.ts.LayerTree.CompositingReasonsResult, - "LayerTree.compositingReasons" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.LayerTree.DisableParams, - cdp.types.ts.LayerTree.DisableResult, - "LayerTree.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.LayerTree.EnableParams, - cdp.types.ts.LayerTree.EnableResult, - "LayerTree.enable" - >; - loadSnapshot: CdpCommandAlias< - cdp.types.ts.LayerTree.LoadSnapshotParams, - cdp.types.ts.LayerTree.LoadSnapshotResult, - "LayerTree.loadSnapshot" - >; - makeSnapshot: CdpCommandAlias< - cdp.types.ts.LayerTree.MakeSnapshotParams, - cdp.types.ts.LayerTree.MakeSnapshotResult, - "LayerTree.makeSnapshot" - >; - profileSnapshot: CdpCommandAlias< - cdp.types.ts.LayerTree.ProfileSnapshotParams, - cdp.types.ts.LayerTree.ProfileSnapshotResult, - "LayerTree.profileSnapshot" - >; - releaseSnapshot: CdpCommandAlias< - cdp.types.ts.LayerTree.ReleaseSnapshotParams, - cdp.types.ts.LayerTree.ReleaseSnapshotResult, - "LayerTree.releaseSnapshot" - >; - replaySnapshot: CdpCommandAlias< - cdp.types.ts.LayerTree.ReplaySnapshotParams, - cdp.types.ts.LayerTree.ReplaySnapshotResult, - "LayerTree.replaySnapshot" - >; - snapshotCommandLog: CdpCommandAlias< - cdp.types.ts.LayerTree.SnapshotCommandLogParams, - cdp.types.ts.LayerTree.SnapshotCommandLogResult, - "LayerTree.snapshotCommandLog" - >; + compositingReasons: CdpCommandAlias; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + loadSnapshot: CdpCommandAlias; + makeSnapshot: CdpCommandAlias; + profileSnapshot: CdpCommandAlias; + releaseSnapshot: CdpCommandAlias; + replaySnapshot: CdpCommandAlias; + snapshotCommandLog: CdpCommandAlias; layerPainted: CdpEventAlias; layerTreeDidChange: CdpEventAlias; }; @@ -1932,908 +517,231 @@ export type CdpAliases = { clear: CdpOptionalCommandAlias; disable: CdpOptionalCommandAlias; enable: CdpOptionalCommandAlias; - startViolationsReport: CdpCommandAlias< - cdp.types.ts.Log.StartViolationsReportParams, - cdp.types.ts.Log.StartViolationsReportResult, - "Log.startViolationsReport" - >; - stopViolationsReport: CdpOptionalCommandAlias< - cdp.types.ts.Log.StopViolationsReportParams, - cdp.types.ts.Log.StopViolationsReportResult, - "Log.stopViolationsReport" - >; + startViolationsReport: CdpCommandAlias; + stopViolationsReport: CdpOptionalCommandAlias; entryAdded: CdpEventAlias; }; Media: { enable: CdpOptionalCommandAlias; - disable: CdpOptionalCommandAlias< - cdp.types.ts.Media.DisableParams, - cdp.types.ts.Media.DisableResult, - "Media.disable" - >; - playerPropertiesChanged: CdpEventAlias< - cdp.types.ts.Media.PlayerPropertiesChangedEvent, - "Media.playerPropertiesChanged" - >; + disable: CdpOptionalCommandAlias; + playerPropertiesChanged: CdpEventAlias; playerEventsAdded: CdpEventAlias; playerMessagesLogged: CdpEventAlias; playerErrorsRaised: CdpEventAlias; playerCreated: CdpEventAlias; }; Memory: { - getDOMCounters: CdpOptionalCommandAlias< - cdp.types.ts.Memory.GetDOMCountersParams, - cdp.types.ts.Memory.GetDOMCountersResult, - "Memory.getDOMCounters" - >; - getDOMCountersForLeakDetection: CdpOptionalCommandAlias< - cdp.types.ts.Memory.GetDOMCountersForLeakDetectionParams, - cdp.types.ts.Memory.GetDOMCountersForLeakDetectionResult, - "Memory.getDOMCountersForLeakDetection" - >; - prepareForLeakDetection: CdpOptionalCommandAlias< - cdp.types.ts.Memory.PrepareForLeakDetectionParams, - cdp.types.ts.Memory.PrepareForLeakDetectionResult, - "Memory.prepareForLeakDetection" - >; - forciblyPurgeJavaScriptMemory: CdpOptionalCommandAlias< - cdp.types.ts.Memory.ForciblyPurgeJavaScriptMemoryParams, - cdp.types.ts.Memory.ForciblyPurgeJavaScriptMemoryResult, - "Memory.forciblyPurgeJavaScriptMemory" - >; - setPressureNotificationsSuppressed: CdpCommandAlias< - cdp.types.ts.Memory.SetPressureNotificationsSuppressedParams, - cdp.types.ts.Memory.SetPressureNotificationsSuppressedResult, - "Memory.setPressureNotificationsSuppressed" - >; - simulatePressureNotification: CdpCommandAlias< - cdp.types.ts.Memory.SimulatePressureNotificationParams, - cdp.types.ts.Memory.SimulatePressureNotificationResult, - "Memory.simulatePressureNotification" - >; - startSampling: CdpOptionalCommandAlias< - cdp.types.ts.Memory.StartSamplingParams, - cdp.types.ts.Memory.StartSamplingResult, - "Memory.startSampling" - >; - stopSampling: CdpOptionalCommandAlias< - cdp.types.ts.Memory.StopSamplingParams, - cdp.types.ts.Memory.StopSamplingResult, - "Memory.stopSampling" - >; - getAllTimeSamplingProfile: CdpOptionalCommandAlias< - cdp.types.ts.Memory.GetAllTimeSamplingProfileParams, - cdp.types.ts.Memory.GetAllTimeSamplingProfileResult, - "Memory.getAllTimeSamplingProfile" - >; - getBrowserSamplingProfile: CdpOptionalCommandAlias< - cdp.types.ts.Memory.GetBrowserSamplingProfileParams, - cdp.types.ts.Memory.GetBrowserSamplingProfileResult, - "Memory.getBrowserSamplingProfile" - >; - getSamplingProfile: CdpOptionalCommandAlias< - cdp.types.ts.Memory.GetSamplingProfileParams, - cdp.types.ts.Memory.GetSamplingProfileResult, - "Memory.getSamplingProfile" - >; + getDOMCounters: CdpOptionalCommandAlias; + getDOMCountersForLeakDetection: CdpOptionalCommandAlias; + prepareForLeakDetection: CdpOptionalCommandAlias; + forciblyPurgeJavaScriptMemory: CdpOptionalCommandAlias; + setPressureNotificationsSuppressed: CdpCommandAlias; + simulatePressureNotification: CdpCommandAlias; + startSampling: CdpOptionalCommandAlias; + stopSampling: CdpOptionalCommandAlias; + getAllTimeSamplingProfile: CdpOptionalCommandAlias; + getBrowserSamplingProfile: CdpOptionalCommandAlias; + getSamplingProfile: CdpOptionalCommandAlias; }; Network: { - setAcceptedEncodings: CdpCommandAlias< - cdp.types.ts.Network.SetAcceptedEncodingsParams, - cdp.types.ts.Network.SetAcceptedEncodingsResult, - "Network.setAcceptedEncodings" - >; - clearAcceptedEncodingsOverride: CdpOptionalCommandAlias< - cdp.types.ts.Network.ClearAcceptedEncodingsOverrideParams, - cdp.types.ts.Network.ClearAcceptedEncodingsOverrideResult, - "Network.clearAcceptedEncodingsOverride" - >; - canClearBrowserCache: CdpOptionalCommandAlias< - cdp.types.ts.Network.CanClearBrowserCacheParams, - cdp.types.ts.Network.CanClearBrowserCacheResult, - "Network.canClearBrowserCache" - >; - canClearBrowserCookies: CdpOptionalCommandAlias< - cdp.types.ts.Network.CanClearBrowserCookiesParams, - cdp.types.ts.Network.CanClearBrowserCookiesResult, - "Network.canClearBrowserCookies" - >; - canEmulateNetworkConditions: CdpOptionalCommandAlias< - cdp.types.ts.Network.CanEmulateNetworkConditionsParams, - cdp.types.ts.Network.CanEmulateNetworkConditionsResult, - "Network.canEmulateNetworkConditions" - >; - clearBrowserCache: CdpOptionalCommandAlias< - cdp.types.ts.Network.ClearBrowserCacheParams, - cdp.types.ts.Network.ClearBrowserCacheResult, - "Network.clearBrowserCache" - >; - clearBrowserCookies: CdpOptionalCommandAlias< - cdp.types.ts.Network.ClearBrowserCookiesParams, - cdp.types.ts.Network.ClearBrowserCookiesResult, - "Network.clearBrowserCookies" - >; - continueInterceptedRequest: CdpCommandAlias< - cdp.types.ts.Network.ContinueInterceptedRequestParams, - cdp.types.ts.Network.ContinueInterceptedRequestResult, - "Network.continueInterceptedRequest" - >; - deleteCookies: CdpCommandAlias< - cdp.types.ts.Network.DeleteCookiesParams, - cdp.types.ts.Network.DeleteCookiesResult, - "Network.deleteCookies" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.Network.DisableParams, - cdp.types.ts.Network.DisableResult, - "Network.disable" - >; - emulateNetworkConditions: CdpCommandAlias< - cdp.types.ts.Network.EmulateNetworkConditionsParams, - cdp.types.ts.Network.EmulateNetworkConditionsResult, - "Network.emulateNetworkConditions" - >; - emulateNetworkConditionsByRule: CdpCommandAlias< - cdp.types.ts.Network.EmulateNetworkConditionsByRuleParams, - cdp.types.ts.Network.EmulateNetworkConditionsByRuleResult, - "Network.emulateNetworkConditionsByRule" - >; - overrideNetworkState: CdpCommandAlias< - cdp.types.ts.Network.OverrideNetworkStateParams, - cdp.types.ts.Network.OverrideNetworkStateResult, - "Network.overrideNetworkState" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Network.EnableParams, - cdp.types.ts.Network.EnableResult, - "Network.enable" - >; - configureDurableMessages: CdpOptionalCommandAlias< - cdp.types.ts.Network.ConfigureDurableMessagesParams, - cdp.types.ts.Network.ConfigureDurableMessagesResult, - "Network.configureDurableMessages" - >; - getAllCookies: CdpOptionalCommandAlias< - cdp.types.ts.Network.GetAllCookiesParams, - cdp.types.ts.Network.GetAllCookiesResult, - "Network.getAllCookies" - >; - getCertificate: CdpCommandAlias< - cdp.types.ts.Network.GetCertificateParams, - cdp.types.ts.Network.GetCertificateResult, - "Network.getCertificate" - >; - getCookies: CdpOptionalCommandAlias< - cdp.types.ts.Network.GetCookiesParams, - cdp.types.ts.Network.GetCookiesResult, - "Network.getCookies" - >; - getResponseBody: CdpCommandAlias< - cdp.types.ts.Network.GetResponseBodyParams, - cdp.types.ts.Network.GetResponseBodyResult, - "Network.getResponseBody" - >; - getRequestPostData: CdpCommandAlias< - cdp.types.ts.Network.GetRequestPostDataParams, - cdp.types.ts.Network.GetRequestPostDataResult, - "Network.getRequestPostData" - >; - getResponseBodyForInterception: CdpCommandAlias< - cdp.types.ts.Network.GetResponseBodyForInterceptionParams, - cdp.types.ts.Network.GetResponseBodyForInterceptionResult, - "Network.getResponseBodyForInterception" - >; - takeResponseBodyForInterceptionAsStream: CdpCommandAlias< - cdp.types.ts.Network.TakeResponseBodyForInterceptionAsStreamParams, - cdp.types.ts.Network.TakeResponseBodyForInterceptionAsStreamResult, - "Network.takeResponseBodyForInterceptionAsStream" - >; - replayXHR: CdpCommandAlias< - cdp.types.ts.Network.ReplayXHRParams, - cdp.types.ts.Network.ReplayXHRResult, - "Network.replayXHR" - >; - searchInResponseBody: CdpCommandAlias< - cdp.types.ts.Network.SearchInResponseBodyParams, - cdp.types.ts.Network.SearchInResponseBodyResult, - "Network.searchInResponseBody" - >; - setBlockedURLs: CdpOptionalCommandAlias< - cdp.types.ts.Network.SetBlockedURLsParams, - cdp.types.ts.Network.SetBlockedURLsResult, - "Network.setBlockedURLs" - >; - setBypassServiceWorker: CdpCommandAlias< - cdp.types.ts.Network.SetBypassServiceWorkerParams, - cdp.types.ts.Network.SetBypassServiceWorkerResult, - "Network.setBypassServiceWorker" - >; - setCacheDisabled: CdpCommandAlias< - cdp.types.ts.Network.SetCacheDisabledParams, - cdp.types.ts.Network.SetCacheDisabledResult, - "Network.setCacheDisabled" - >; - setCookie: CdpCommandAlias< - cdp.types.ts.Network.SetCookieParams, - cdp.types.ts.Network.SetCookieResult, - "Network.setCookie" - >; - setCookies: CdpCommandAlias< - cdp.types.ts.Network.SetCookiesParams, - cdp.types.ts.Network.SetCookiesResult, - "Network.setCookies" - >; - setExtraHTTPHeaders: CdpCommandAlias< - cdp.types.ts.Network.SetExtraHTTPHeadersParams, - cdp.types.ts.Network.SetExtraHTTPHeadersResult, - "Network.setExtraHTTPHeaders" - >; - setAttachDebugStack: CdpCommandAlias< - cdp.types.ts.Network.SetAttachDebugStackParams, - cdp.types.ts.Network.SetAttachDebugStackResult, - "Network.setAttachDebugStack" - >; - setRequestInterception: CdpCommandAlias< - cdp.types.ts.Network.SetRequestInterceptionParams, - cdp.types.ts.Network.SetRequestInterceptionResult, - "Network.setRequestInterception" - >; - setUserAgentOverride: CdpCommandAlias< - cdp.types.ts.Network.SetUserAgentOverrideParams, - cdp.types.ts.Network.SetUserAgentOverrideResult, - "Network.setUserAgentOverride" - >; - streamResourceContent: CdpCommandAlias< - cdp.types.ts.Network.StreamResourceContentParams, - cdp.types.ts.Network.StreamResourceContentResult, - "Network.streamResourceContent" - >; - getSecurityIsolationStatus: CdpOptionalCommandAlias< - cdp.types.ts.Network.GetSecurityIsolationStatusParams, - cdp.types.ts.Network.GetSecurityIsolationStatusResult, - "Network.getSecurityIsolationStatus" - >; - enableReportingApi: CdpCommandAlias< - cdp.types.ts.Network.EnableReportingApiParams, - cdp.types.ts.Network.EnableReportingApiResult, - "Network.enableReportingApi" - >; - enableDeviceBoundSessions: CdpCommandAlias< - cdp.types.ts.Network.EnableDeviceBoundSessionsParams, - cdp.types.ts.Network.EnableDeviceBoundSessionsResult, - "Network.enableDeviceBoundSessions" - >; - deleteDeviceBoundSession: CdpCommandAlias< - cdp.types.ts.Network.DeleteDeviceBoundSessionParams, - cdp.types.ts.Network.DeleteDeviceBoundSessionResult, - "Network.deleteDeviceBoundSession" - >; - fetchSchemefulSite: CdpCommandAlias< - cdp.types.ts.Network.FetchSchemefulSiteParams, - cdp.types.ts.Network.FetchSchemefulSiteResult, - "Network.fetchSchemefulSite" - >; - loadNetworkResource: CdpCommandAlias< - cdp.types.ts.Network.LoadNetworkResourceParams, - cdp.types.ts.Network.LoadNetworkResourceResult, - "Network.loadNetworkResource" - >; - setCookieControls: CdpCommandAlias< - cdp.types.ts.Network.SetCookieControlsParams, - cdp.types.ts.Network.SetCookieControlsResult, - "Network.setCookieControls" - >; + setAcceptedEncodings: CdpCommandAlias; + clearAcceptedEncodingsOverride: CdpOptionalCommandAlias; + canClearBrowserCache: CdpOptionalCommandAlias; + canClearBrowserCookies: CdpOptionalCommandAlias; + canEmulateNetworkConditions: CdpOptionalCommandAlias; + clearBrowserCache: CdpOptionalCommandAlias; + clearBrowserCookies: CdpOptionalCommandAlias; + continueInterceptedRequest: CdpCommandAlias; + deleteCookies: CdpCommandAlias; + disable: CdpOptionalCommandAlias; + emulateNetworkConditions: CdpCommandAlias; + emulateNetworkConditionsByRule: CdpCommandAlias; + overrideNetworkState: CdpCommandAlias; + enable: CdpOptionalCommandAlias; + configureDurableMessages: CdpOptionalCommandAlias; + getAllCookies: CdpOptionalCommandAlias; + getCertificate: CdpCommandAlias; + getCookies: CdpOptionalCommandAlias; + getResponseBody: CdpCommandAlias; + getRequestPostData: CdpCommandAlias; + getResponseBodyForInterception: CdpCommandAlias; + takeResponseBodyForInterceptionAsStream: CdpCommandAlias; + replayXHR: CdpCommandAlias; + searchInResponseBody: CdpCommandAlias; + setBlockedURLs: CdpOptionalCommandAlias; + setBypassServiceWorker: CdpCommandAlias; + setCacheDisabled: CdpCommandAlias; + setCookie: CdpCommandAlias; + setCookies: CdpCommandAlias; + setExtraHTTPHeaders: CdpCommandAlias; + setAttachDebugStack: CdpCommandAlias; + setRequestInterception: CdpCommandAlias; + setUserAgentOverride: CdpCommandAlias; + streamResourceContent: CdpCommandAlias; + getSecurityIsolationStatus: CdpOptionalCommandAlias; + enableReportingApi: CdpCommandAlias; + enableDeviceBoundSessions: CdpCommandAlias; + deleteDeviceBoundSession: CdpCommandAlias; + fetchSchemefulSite: CdpCommandAlias; + loadNetworkResource: CdpCommandAlias; + setCookieControls: CdpCommandAlias; dataReceived: CdpEventAlias; - eventSourceMessageReceived: CdpEventAlias< - cdp.types.ts.Network.EventSourceMessageReceivedEvent, - "Network.eventSourceMessageReceived" - >; + eventSourceMessageReceived: CdpEventAlias; loadingFailed: CdpEventAlias; loadingFinished: CdpEventAlias; requestIntercepted: CdpEventAlias; - requestServedFromCache: CdpEventAlias< - cdp.types.ts.Network.RequestServedFromCacheEvent, - "Network.requestServedFromCache" - >; + requestServedFromCache: CdpEventAlias; requestWillBeSent: CdpEventAlias; - resourceChangedPriority: CdpEventAlias< - cdp.types.ts.Network.ResourceChangedPriorityEvent, - "Network.resourceChangedPriority" - >; - signedExchangeReceived: CdpEventAlias< - cdp.types.ts.Network.SignedExchangeReceivedEvent, - "Network.signedExchangeReceived" - >; + resourceChangedPriority: CdpEventAlias; + signedExchangeReceived: CdpEventAlias; responseReceived: CdpEventAlias; webSocketClosed: CdpEventAlias; webSocketCreated: CdpEventAlias; webSocketFrameError: CdpEventAlias; - webSocketFrameReceived: CdpEventAlias< - cdp.types.ts.Network.WebSocketFrameReceivedEvent, - "Network.webSocketFrameReceived" - >; + webSocketFrameReceived: CdpEventAlias; webSocketFrameSent: CdpEventAlias; - webSocketHandshakeResponseReceived: CdpEventAlias< - cdp.types.ts.Network.WebSocketHandshakeResponseReceivedEvent, - "Network.webSocketHandshakeResponseReceived" - >; - webSocketWillSendHandshakeRequest: CdpEventAlias< - cdp.types.ts.Network.WebSocketWillSendHandshakeRequestEvent, - "Network.webSocketWillSendHandshakeRequest" - >; + webSocketHandshakeResponseReceived: CdpEventAlias; + webSocketWillSendHandshakeRequest: CdpEventAlias; webTransportCreated: CdpEventAlias; - webTransportConnectionEstablished: CdpEventAlias< - cdp.types.ts.Network.WebTransportConnectionEstablishedEvent, - "Network.webTransportConnectionEstablished" - >; + webTransportConnectionEstablished: CdpEventAlias; webTransportClosed: CdpEventAlias; - directTCPSocketCreated: CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketCreatedEvent, - "Network.directTCPSocketCreated" - >; - directTCPSocketOpened: CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketOpenedEvent, - "Network.directTCPSocketOpened" - >; - directTCPSocketAborted: CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketAbortedEvent, - "Network.directTCPSocketAborted" - >; - directTCPSocketClosed: CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketClosedEvent, - "Network.directTCPSocketClosed" - >; - directTCPSocketChunkSent: CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketChunkSentEvent, - "Network.directTCPSocketChunkSent" - >; - directTCPSocketChunkReceived: CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketChunkReceivedEvent, - "Network.directTCPSocketChunkReceived" - >; - directUDPSocketJoinedMulticastGroup: CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketJoinedMulticastGroupEvent, - "Network.directUDPSocketJoinedMulticastGroup" - >; - directUDPSocketLeftMulticastGroup: CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketLeftMulticastGroupEvent, - "Network.directUDPSocketLeftMulticastGroup" - >; - directUDPSocketCreated: CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketCreatedEvent, - "Network.directUDPSocketCreated" - >; - directUDPSocketOpened: CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketOpenedEvent, - "Network.directUDPSocketOpened" - >; - directUDPSocketAborted: CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketAbortedEvent, - "Network.directUDPSocketAborted" - >; - directUDPSocketClosed: CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketClosedEvent, - "Network.directUDPSocketClosed" - >; - directUDPSocketChunkSent: CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketChunkSentEvent, - "Network.directUDPSocketChunkSent" - >; - directUDPSocketChunkReceived: CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketChunkReceivedEvent, - "Network.directUDPSocketChunkReceived" - >; - requestWillBeSentExtraInfo: CdpEventAlias< - cdp.types.ts.Network.RequestWillBeSentExtraInfoEvent, - "Network.requestWillBeSentExtraInfo" - >; - responseReceivedExtraInfo: CdpEventAlias< - cdp.types.ts.Network.ResponseReceivedExtraInfoEvent, - "Network.responseReceivedExtraInfo" - >; - responseReceivedEarlyHints: CdpEventAlias< - cdp.types.ts.Network.ResponseReceivedEarlyHintsEvent, - "Network.responseReceivedEarlyHints" - >; - trustTokenOperationDone: CdpEventAlias< - cdp.types.ts.Network.TrustTokenOperationDoneEvent, - "Network.trustTokenOperationDone" - >; + directTCPSocketCreated: CdpEventAlias; + directTCPSocketOpened: CdpEventAlias; + directTCPSocketAborted: CdpEventAlias; + directTCPSocketClosed: CdpEventAlias; + directTCPSocketChunkSent: CdpEventAlias; + directTCPSocketChunkReceived: CdpEventAlias; + directUDPSocketJoinedMulticastGroup: CdpEventAlias; + directUDPSocketLeftMulticastGroup: CdpEventAlias; + directUDPSocketCreated: CdpEventAlias; + directUDPSocketOpened: CdpEventAlias; + directUDPSocketAborted: CdpEventAlias; + directUDPSocketClosed: CdpEventAlias; + directUDPSocketChunkSent: CdpEventAlias; + directUDPSocketChunkReceived: CdpEventAlias; + requestWillBeSentExtraInfo: CdpEventAlias; + responseReceivedExtraInfo: CdpEventAlias; + responseReceivedEarlyHints: CdpEventAlias; + trustTokenOperationDone: CdpEventAlias; policyUpdated: CdpEventAlias; - reportingApiReportAdded: CdpEventAlias< - cdp.types.ts.Network.ReportingApiReportAddedEvent, - "Network.reportingApiReportAdded" - >; - reportingApiReportUpdated: CdpEventAlias< - cdp.types.ts.Network.ReportingApiReportUpdatedEvent, - "Network.reportingApiReportUpdated" - >; - reportingApiEndpointsChangedForOrigin: CdpEventAlias< - cdp.types.ts.Network.ReportingApiEndpointsChangedForOriginEvent, - "Network.reportingApiEndpointsChangedForOrigin" - >; - deviceBoundSessionsAdded: CdpEventAlias< - cdp.types.ts.Network.DeviceBoundSessionsAddedEvent, - "Network.deviceBoundSessionsAdded" - >; - deviceBoundSessionEventOccurred: CdpEventAlias< - cdp.types.ts.Network.DeviceBoundSessionEventOccurredEvent, - "Network.deviceBoundSessionEventOccurred" - >; + reportingApiReportAdded: CdpEventAlias; + reportingApiReportUpdated: CdpEventAlias; + reportingApiEndpointsChangedForOrigin: CdpEventAlias; + deviceBoundSessionsAdded: CdpEventAlias; + deviceBoundSessionEventOccurred: CdpEventAlias; }; Overlay: { - disable: CdpOptionalCommandAlias< - cdp.types.ts.Overlay.DisableParams, - cdp.types.ts.Overlay.DisableResult, - "Overlay.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Overlay.EnableParams, - cdp.types.ts.Overlay.EnableResult, - "Overlay.enable" - >; - getHighlightObjectForTest: CdpCommandAlias< - cdp.types.ts.Overlay.GetHighlightObjectForTestParams, - cdp.types.ts.Overlay.GetHighlightObjectForTestResult, - "Overlay.getHighlightObjectForTest" - >; - getGridHighlightObjectsForTest: CdpCommandAlias< - cdp.types.ts.Overlay.GetGridHighlightObjectsForTestParams, - cdp.types.ts.Overlay.GetGridHighlightObjectsForTestResult, - "Overlay.getGridHighlightObjectsForTest" - >; - getSourceOrderHighlightObjectForTest: CdpCommandAlias< - cdp.types.ts.Overlay.GetSourceOrderHighlightObjectForTestParams, - cdp.types.ts.Overlay.GetSourceOrderHighlightObjectForTestResult, - "Overlay.getSourceOrderHighlightObjectForTest" - >; - hideHighlight: CdpOptionalCommandAlias< - cdp.types.ts.Overlay.HideHighlightParams, - cdp.types.ts.Overlay.HideHighlightResult, - "Overlay.hideHighlight" - >; - highlightFrame: CdpCommandAlias< - cdp.types.ts.Overlay.HighlightFrameParams, - cdp.types.ts.Overlay.HighlightFrameResult, - "Overlay.highlightFrame" - >; - highlightNode: CdpCommandAlias< - cdp.types.ts.Overlay.HighlightNodeParams, - cdp.types.ts.Overlay.HighlightNodeResult, - "Overlay.highlightNode" - >; - highlightQuad: CdpCommandAlias< - cdp.types.ts.Overlay.HighlightQuadParams, - cdp.types.ts.Overlay.HighlightQuadResult, - "Overlay.highlightQuad" - >; - highlightRect: CdpCommandAlias< - cdp.types.ts.Overlay.HighlightRectParams, - cdp.types.ts.Overlay.HighlightRectResult, - "Overlay.highlightRect" - >; - highlightSourceOrder: CdpCommandAlias< - cdp.types.ts.Overlay.HighlightSourceOrderParams, - cdp.types.ts.Overlay.HighlightSourceOrderResult, - "Overlay.highlightSourceOrder" - >; - setInspectMode: CdpCommandAlias< - cdp.types.ts.Overlay.SetInspectModeParams, - cdp.types.ts.Overlay.SetInspectModeResult, - "Overlay.setInspectMode" - >; - setShowAdHighlights: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowAdHighlightsParams, - cdp.types.ts.Overlay.SetShowAdHighlightsResult, - "Overlay.setShowAdHighlights" - >; - setPausedInDebuggerMessage: CdpOptionalCommandAlias< - cdp.types.ts.Overlay.SetPausedInDebuggerMessageParams, - cdp.types.ts.Overlay.SetPausedInDebuggerMessageResult, - "Overlay.setPausedInDebuggerMessage" - >; - setShowDebugBorders: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowDebugBordersParams, - cdp.types.ts.Overlay.SetShowDebugBordersResult, - "Overlay.setShowDebugBorders" - >; - setShowFPSCounter: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowFPSCounterParams, - cdp.types.ts.Overlay.SetShowFPSCounterResult, - "Overlay.setShowFPSCounter" - >; - setShowGridOverlays: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowGridOverlaysParams, - cdp.types.ts.Overlay.SetShowGridOverlaysResult, - "Overlay.setShowGridOverlays" - >; - setShowFlexOverlays: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowFlexOverlaysParams, - cdp.types.ts.Overlay.SetShowFlexOverlaysResult, - "Overlay.setShowFlexOverlays" - >; - setShowScrollSnapOverlays: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowScrollSnapOverlaysParams, - cdp.types.ts.Overlay.SetShowScrollSnapOverlaysResult, - "Overlay.setShowScrollSnapOverlays" - >; - setShowContainerQueryOverlays: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowContainerQueryOverlaysParams, - cdp.types.ts.Overlay.SetShowContainerQueryOverlaysResult, - "Overlay.setShowContainerQueryOverlays" - >; - setShowInspectedElementAnchor: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowInspectedElementAnchorParams, - cdp.types.ts.Overlay.SetShowInspectedElementAnchorResult, - "Overlay.setShowInspectedElementAnchor" - >; - setShowPaintRects: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowPaintRectsParams, - cdp.types.ts.Overlay.SetShowPaintRectsResult, - "Overlay.setShowPaintRects" - >; - setShowLayoutShiftRegions: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowLayoutShiftRegionsParams, - cdp.types.ts.Overlay.SetShowLayoutShiftRegionsResult, - "Overlay.setShowLayoutShiftRegions" - >; - setShowScrollBottleneckRects: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowScrollBottleneckRectsParams, - cdp.types.ts.Overlay.SetShowScrollBottleneckRectsResult, - "Overlay.setShowScrollBottleneckRects" - >; - setShowHitTestBorders: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowHitTestBordersParams, - cdp.types.ts.Overlay.SetShowHitTestBordersResult, - "Overlay.setShowHitTestBorders" - >; - setShowWebVitals: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowWebVitalsParams, - cdp.types.ts.Overlay.SetShowWebVitalsResult, - "Overlay.setShowWebVitals" - >; - setShowViewportSizeOnResize: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowViewportSizeOnResizeParams, - cdp.types.ts.Overlay.SetShowViewportSizeOnResizeResult, - "Overlay.setShowViewportSizeOnResize" - >; - setShowHinge: CdpOptionalCommandAlias< - cdp.types.ts.Overlay.SetShowHingeParams, - cdp.types.ts.Overlay.SetShowHingeResult, - "Overlay.setShowHinge" - >; - setShowIsolatedElements: CdpCommandAlias< - cdp.types.ts.Overlay.SetShowIsolatedElementsParams, - cdp.types.ts.Overlay.SetShowIsolatedElementsResult, - "Overlay.setShowIsolatedElements" - >; - setShowWindowControlsOverlay: CdpOptionalCommandAlias< - cdp.types.ts.Overlay.SetShowWindowControlsOverlayParams, - cdp.types.ts.Overlay.SetShowWindowControlsOverlayResult, - "Overlay.setShowWindowControlsOverlay" - >; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + getHighlightObjectForTest: CdpCommandAlias; + getGridHighlightObjectsForTest: CdpCommandAlias; + getSourceOrderHighlightObjectForTest: CdpCommandAlias; + hideHighlight: CdpOptionalCommandAlias; + highlightFrame: CdpCommandAlias; + highlightNode: CdpCommandAlias; + highlightQuad: CdpCommandAlias; + highlightRect: CdpCommandAlias; + highlightSourceOrder: CdpCommandAlias; + setInspectMode: CdpCommandAlias; + setShowAdHighlights: CdpCommandAlias; + setPausedInDebuggerMessage: CdpOptionalCommandAlias; + setShowDebugBorders: CdpCommandAlias; + setShowFPSCounter: CdpCommandAlias; + setShowGridOverlays: CdpCommandAlias; + setShowFlexOverlays: CdpCommandAlias; + setShowScrollSnapOverlays: CdpCommandAlias; + setShowContainerQueryOverlays: CdpCommandAlias; + setShowInspectedElementAnchor: CdpCommandAlias; + setShowPaintRects: CdpCommandAlias; + setShowLayoutShiftRegions: CdpCommandAlias; + setShowScrollBottleneckRects: CdpCommandAlias; + setShowHitTestBorders: CdpCommandAlias; + setShowWebVitals: CdpCommandAlias; + setShowViewportSizeOnResize: CdpCommandAlias; + setShowHinge: CdpOptionalCommandAlias; + setShowIsolatedElements: CdpCommandAlias; + setShowWindowControlsOverlay: CdpOptionalCommandAlias; inspectNodeRequested: CdpEventAlias; - nodeHighlightRequested: CdpEventAlias< - cdp.types.ts.Overlay.NodeHighlightRequestedEvent, - "Overlay.nodeHighlightRequested" - >; + nodeHighlightRequested: CdpEventAlias; screenshotRequested: CdpEventAlias; - inspectPanelShowRequested: CdpEventAlias< - cdp.types.ts.Overlay.InspectPanelShowRequestedEvent, - "Overlay.inspectPanelShowRequested" - >; - inspectedElementWindowRestored: CdpEventAlias< - cdp.types.ts.Overlay.InspectedElementWindowRestoredEvent, - "Overlay.inspectedElementWindowRestored" - >; + inspectPanelShowRequested: CdpEventAlias; + inspectedElementWindowRestored: CdpEventAlias; inspectModeCanceled: CdpEventAlias; }; Page: { - addScriptToEvaluateOnLoad: CdpCommandAlias< - cdp.types.ts.Page.AddScriptToEvaluateOnLoadParams, - cdp.types.ts.Page.AddScriptToEvaluateOnLoadResult, - "Page.addScriptToEvaluateOnLoad" - >; - addScriptToEvaluateOnNewDocument: CdpCommandAlias< - cdp.types.ts.Page.AddScriptToEvaluateOnNewDocumentParams, - cdp.types.ts.Page.AddScriptToEvaluateOnNewDocumentResult, - "Page.addScriptToEvaluateOnNewDocument" - >; - bringToFront: CdpOptionalCommandAlias< - cdp.types.ts.Page.BringToFrontParams, - cdp.types.ts.Page.BringToFrontResult, - "Page.bringToFront" - >; - captureScreenshot: CdpOptionalCommandAlias< - cdp.types.ts.Page.CaptureScreenshotParams, - cdp.types.ts.Page.CaptureScreenshotResult, - "Page.captureScreenshot" - >; - captureSnapshot: CdpOptionalCommandAlias< - cdp.types.ts.Page.CaptureSnapshotParams, - cdp.types.ts.Page.CaptureSnapshotResult, - "Page.captureSnapshot" - >; - clearDeviceMetricsOverride: CdpOptionalCommandAlias< - cdp.types.ts.Page.ClearDeviceMetricsOverrideParams, - cdp.types.ts.Page.ClearDeviceMetricsOverrideResult, - "Page.clearDeviceMetricsOverride" - >; - clearDeviceOrientationOverride: CdpOptionalCommandAlias< - cdp.types.ts.Page.ClearDeviceOrientationOverrideParams, - cdp.types.ts.Page.ClearDeviceOrientationOverrideResult, - "Page.clearDeviceOrientationOverride" - >; - clearGeolocationOverride: CdpOptionalCommandAlias< - cdp.types.ts.Page.ClearGeolocationOverrideParams, - cdp.types.ts.Page.ClearGeolocationOverrideResult, - "Page.clearGeolocationOverride" - >; - createIsolatedWorld: CdpCommandAlias< - cdp.types.ts.Page.CreateIsolatedWorldParams, - cdp.types.ts.Page.CreateIsolatedWorldResult, - "Page.createIsolatedWorld" - >; - deleteCookie: CdpCommandAlias< - cdp.types.ts.Page.DeleteCookieParams, - cdp.types.ts.Page.DeleteCookieResult, - "Page.deleteCookie" - >; + addScriptToEvaluateOnLoad: CdpCommandAlias; + addScriptToEvaluateOnNewDocument: CdpCommandAlias; + bringToFront: CdpOptionalCommandAlias; + captureScreenshot: CdpOptionalCommandAlias; + captureSnapshot: CdpOptionalCommandAlias; + clearDeviceMetricsOverride: CdpOptionalCommandAlias; + clearDeviceOrientationOverride: CdpOptionalCommandAlias; + clearGeolocationOverride: CdpOptionalCommandAlias; + createIsolatedWorld: CdpCommandAlias; + deleteCookie: CdpCommandAlias; disable: CdpOptionalCommandAlias; enable: CdpOptionalCommandAlias; - getAppManifest: CdpOptionalCommandAlias< - cdp.types.ts.Page.GetAppManifestParams, - cdp.types.ts.Page.GetAppManifestResult, - "Page.getAppManifest" - >; - getInstallabilityErrors: CdpOptionalCommandAlias< - cdp.types.ts.Page.GetInstallabilityErrorsParams, - cdp.types.ts.Page.GetInstallabilityErrorsResult, - "Page.getInstallabilityErrors" - >; - getManifestIcons: CdpOptionalCommandAlias< - cdp.types.ts.Page.GetManifestIconsParams, - cdp.types.ts.Page.GetManifestIconsResult, - "Page.getManifestIcons" - >; - getAppId: CdpOptionalCommandAlias< - cdp.types.ts.Page.GetAppIdParams, - cdp.types.ts.Page.GetAppIdResult, - "Page.getAppId" - >; - getAdScriptAncestry: CdpCommandAlias< - cdp.types.ts.Page.GetAdScriptAncestryParams, - cdp.types.ts.Page.GetAdScriptAncestryResult, - "Page.getAdScriptAncestry" - >; - getFrameTree: CdpOptionalCommandAlias< - cdp.types.ts.Page.GetFrameTreeParams, - cdp.types.ts.Page.GetFrameTreeResult, - "Page.getFrameTree" - >; - getLayoutMetrics: CdpOptionalCommandAlias< - cdp.types.ts.Page.GetLayoutMetricsParams, - cdp.types.ts.Page.GetLayoutMetricsResult, - "Page.getLayoutMetrics" - >; - getNavigationHistory: CdpOptionalCommandAlias< - cdp.types.ts.Page.GetNavigationHistoryParams, - cdp.types.ts.Page.GetNavigationHistoryResult, - "Page.getNavigationHistory" - >; - resetNavigationHistory: CdpOptionalCommandAlias< - cdp.types.ts.Page.ResetNavigationHistoryParams, - cdp.types.ts.Page.ResetNavigationHistoryResult, - "Page.resetNavigationHistory" - >; - getResourceContent: CdpCommandAlias< - cdp.types.ts.Page.GetResourceContentParams, - cdp.types.ts.Page.GetResourceContentResult, - "Page.getResourceContent" - >; - getResourceTree: CdpOptionalCommandAlias< - cdp.types.ts.Page.GetResourceTreeParams, - cdp.types.ts.Page.GetResourceTreeResult, - "Page.getResourceTree" - >; - handleJavaScriptDialog: CdpCommandAlias< - cdp.types.ts.Page.HandleJavaScriptDialogParams, - cdp.types.ts.Page.HandleJavaScriptDialogResult, - "Page.handleJavaScriptDialog" - >; + getAppManifest: CdpOptionalCommandAlias; + getInstallabilityErrors: CdpOptionalCommandAlias; + getManifestIcons: CdpOptionalCommandAlias; + getAppId: CdpOptionalCommandAlias; + getAdScriptAncestry: CdpCommandAlias; + getFrameTree: CdpOptionalCommandAlias; + getLayoutMetrics: CdpOptionalCommandAlias; + getNavigationHistory: CdpOptionalCommandAlias; + resetNavigationHistory: CdpOptionalCommandAlias; + getResourceContent: CdpCommandAlias; + getResourceTree: CdpOptionalCommandAlias; + handleJavaScriptDialog: CdpCommandAlias; navigate: CdpCommandAlias; - navigateToHistoryEntry: CdpCommandAlias< - cdp.types.ts.Page.NavigateToHistoryEntryParams, - cdp.types.ts.Page.NavigateToHistoryEntryResult, - "Page.navigateToHistoryEntry" - >; - printToPDF: CdpOptionalCommandAlias< - cdp.types.ts.Page.PrintToPDFParams, - cdp.types.ts.Page.PrintToPDFResult, - "Page.printToPDF" - >; + navigateToHistoryEntry: CdpCommandAlias; + printToPDF: CdpOptionalCommandAlias; reload: CdpOptionalCommandAlias; - removeScriptToEvaluateOnLoad: CdpCommandAlias< - cdp.types.ts.Page.RemoveScriptToEvaluateOnLoadParams, - cdp.types.ts.Page.RemoveScriptToEvaluateOnLoadResult, - "Page.removeScriptToEvaluateOnLoad" - >; - removeScriptToEvaluateOnNewDocument: CdpCommandAlias< - cdp.types.ts.Page.RemoveScriptToEvaluateOnNewDocumentParams, - cdp.types.ts.Page.RemoveScriptToEvaluateOnNewDocumentResult, - "Page.removeScriptToEvaluateOnNewDocument" - >; - screencastFrameAck: CdpCommandAlias< - cdp.types.ts.Page.ScreencastFrameAckParams, - cdp.types.ts.Page.ScreencastFrameAckResult, - "Page.screencastFrameAck" - >; - searchInResource: CdpCommandAlias< - cdp.types.ts.Page.SearchInResourceParams, - cdp.types.ts.Page.SearchInResourceResult, - "Page.searchInResource" - >; - setAdBlockingEnabled: CdpCommandAlias< - cdp.types.ts.Page.SetAdBlockingEnabledParams, - cdp.types.ts.Page.SetAdBlockingEnabledResult, - "Page.setAdBlockingEnabled" - >; - setBypassCSP: CdpCommandAlias< - cdp.types.ts.Page.SetBypassCSPParams, - cdp.types.ts.Page.SetBypassCSPResult, - "Page.setBypassCSP" - >; - getPermissionsPolicyState: CdpCommandAlias< - cdp.types.ts.Page.GetPermissionsPolicyStateParams, - cdp.types.ts.Page.GetPermissionsPolicyStateResult, - "Page.getPermissionsPolicyState" - >; - getOriginTrials: CdpCommandAlias< - cdp.types.ts.Page.GetOriginTrialsParams, - cdp.types.ts.Page.GetOriginTrialsResult, - "Page.getOriginTrials" - >; - setDeviceMetricsOverride: CdpCommandAlias< - cdp.types.ts.Page.SetDeviceMetricsOverrideParams, - cdp.types.ts.Page.SetDeviceMetricsOverrideResult, - "Page.setDeviceMetricsOverride" - >; - setDeviceOrientationOverride: CdpCommandAlias< - cdp.types.ts.Page.SetDeviceOrientationOverrideParams, - cdp.types.ts.Page.SetDeviceOrientationOverrideResult, - "Page.setDeviceOrientationOverride" - >; - setFontFamilies: CdpCommandAlias< - cdp.types.ts.Page.SetFontFamiliesParams, - cdp.types.ts.Page.SetFontFamiliesResult, - "Page.setFontFamilies" - >; - setFontSizes: CdpCommandAlias< - cdp.types.ts.Page.SetFontSizesParams, - cdp.types.ts.Page.SetFontSizesResult, - "Page.setFontSizes" - >; - setDocumentContent: CdpCommandAlias< - cdp.types.ts.Page.SetDocumentContentParams, - cdp.types.ts.Page.SetDocumentContentResult, - "Page.setDocumentContent" - >; - setDownloadBehavior: CdpCommandAlias< - cdp.types.ts.Page.SetDownloadBehaviorParams, - cdp.types.ts.Page.SetDownloadBehaviorResult, - "Page.setDownloadBehavior" - >; - setGeolocationOverride: CdpOptionalCommandAlias< - cdp.types.ts.Page.SetGeolocationOverrideParams, - cdp.types.ts.Page.SetGeolocationOverrideResult, - "Page.setGeolocationOverride" - >; - setLifecycleEventsEnabled: CdpCommandAlias< - cdp.types.ts.Page.SetLifecycleEventsEnabledParams, - cdp.types.ts.Page.SetLifecycleEventsEnabledResult, - "Page.setLifecycleEventsEnabled" - >; - setTouchEmulationEnabled: CdpCommandAlias< - cdp.types.ts.Page.SetTouchEmulationEnabledParams, - cdp.types.ts.Page.SetTouchEmulationEnabledResult, - "Page.setTouchEmulationEnabled" - >; - startScreencast: CdpOptionalCommandAlias< - cdp.types.ts.Page.StartScreencastParams, - cdp.types.ts.Page.StartScreencastResult, - "Page.startScreencast" - >; - stopLoading: CdpOptionalCommandAlias< - cdp.types.ts.Page.StopLoadingParams, - cdp.types.ts.Page.StopLoadingResult, - "Page.stopLoading" - >; + removeScriptToEvaluateOnLoad: CdpCommandAlias; + removeScriptToEvaluateOnNewDocument: CdpCommandAlias; + screencastFrameAck: CdpCommandAlias; + searchInResource: CdpCommandAlias; + setAdBlockingEnabled: CdpCommandAlias; + setBypassCSP: CdpCommandAlias; + getPermissionsPolicyState: CdpCommandAlias; + getOriginTrials: CdpCommandAlias; + setDeviceMetricsOverride: CdpCommandAlias; + setDeviceOrientationOverride: CdpCommandAlias; + setFontFamilies: CdpCommandAlias; + setFontSizes: CdpCommandAlias; + setDocumentContent: CdpCommandAlias; + setDownloadBehavior: CdpCommandAlias; + setGeolocationOverride: CdpOptionalCommandAlias; + setLifecycleEventsEnabled: CdpCommandAlias; + setTouchEmulationEnabled: CdpCommandAlias; + startScreencast: CdpOptionalCommandAlias; + stopLoading: CdpOptionalCommandAlias; crash: CdpOptionalCommandAlias; close: CdpOptionalCommandAlias; - setWebLifecycleState: CdpCommandAlias< - cdp.types.ts.Page.SetWebLifecycleStateParams, - cdp.types.ts.Page.SetWebLifecycleStateResult, - "Page.setWebLifecycleState" - >; - stopScreencast: CdpOptionalCommandAlias< - cdp.types.ts.Page.StopScreencastParams, - cdp.types.ts.Page.StopScreencastResult, - "Page.stopScreencast" - >; - produceCompilationCache: CdpCommandAlias< - cdp.types.ts.Page.ProduceCompilationCacheParams, - cdp.types.ts.Page.ProduceCompilationCacheResult, - "Page.produceCompilationCache" - >; - addCompilationCache: CdpCommandAlias< - cdp.types.ts.Page.AddCompilationCacheParams, - cdp.types.ts.Page.AddCompilationCacheResult, - "Page.addCompilationCache" - >; - clearCompilationCache: CdpOptionalCommandAlias< - cdp.types.ts.Page.ClearCompilationCacheParams, - cdp.types.ts.Page.ClearCompilationCacheResult, - "Page.clearCompilationCache" - >; - setSPCTransactionMode: CdpCommandAlias< - cdp.types.ts.Page.SetSPCTransactionModeParams, - cdp.types.ts.Page.SetSPCTransactionModeResult, - "Page.setSPCTransactionMode" - >; - setRPHRegistrationMode: CdpCommandAlias< - cdp.types.ts.Page.SetRPHRegistrationModeParams, - cdp.types.ts.Page.SetRPHRegistrationModeResult, - "Page.setRPHRegistrationMode" - >; - generateTestReport: CdpCommandAlias< - cdp.types.ts.Page.GenerateTestReportParams, - cdp.types.ts.Page.GenerateTestReportResult, - "Page.generateTestReport" - >; - waitForDebugger: CdpOptionalCommandAlias< - cdp.types.ts.Page.WaitForDebuggerParams, - cdp.types.ts.Page.WaitForDebuggerResult, - "Page.waitForDebugger" - >; - setInterceptFileChooserDialog: CdpCommandAlias< - cdp.types.ts.Page.SetInterceptFileChooserDialogParams, - cdp.types.ts.Page.SetInterceptFileChooserDialogResult, - "Page.setInterceptFileChooserDialog" - >; - setPrerenderingAllowed: CdpCommandAlias< - cdp.types.ts.Page.SetPrerenderingAllowedParams, - cdp.types.ts.Page.SetPrerenderingAllowedResult, - "Page.setPrerenderingAllowed" - >; - getAnnotatedPageContent: CdpOptionalCommandAlias< - cdp.types.ts.Page.GetAnnotatedPageContentParams, - cdp.types.ts.Page.GetAnnotatedPageContentResult, - "Page.getAnnotatedPageContent" - >; + setWebLifecycleState: CdpCommandAlias; + stopScreencast: CdpOptionalCommandAlias; + produceCompilationCache: CdpCommandAlias; + addCompilationCache: CdpCommandAlias; + clearCompilationCache: CdpOptionalCommandAlias; + setSPCTransactionMode: CdpCommandAlias; + setRPHRegistrationMode: CdpCommandAlias; + generateTestReport: CdpCommandAlias; + waitForDebugger: CdpOptionalCommandAlias; + setInterceptFileChooserDialog: CdpCommandAlias; + setPrerenderingAllowed: CdpCommandAlias; + getAnnotatedPageContent: CdpOptionalCommandAlias; domContentEventFired: CdpEventAlias; fileChooserOpened: CdpEventAlias; frameAttached: CdpEventAlias; - frameClearedScheduledNavigation: CdpEventAlias< - cdp.types.ts.Page.FrameClearedScheduledNavigationEvent, - "Page.frameClearedScheduledNavigation" - >; + frameClearedScheduledNavigation: CdpEventAlias; frameDetached: CdpEventAlias; - frameSubtreeWillBeDetached: CdpEventAlias< - cdp.types.ts.Page.FrameSubtreeWillBeDetachedEvent, - "Page.frameSubtreeWillBeDetached" - >; + frameSubtreeWillBeDetached: CdpEventAlias; frameNavigated: CdpEventAlias; documentOpened: CdpEventAlias; frameResized: CdpEventAlias; frameStartedNavigating: CdpEventAlias; - frameRequestedNavigation: CdpEventAlias< - cdp.types.ts.Page.FrameRequestedNavigationEvent, - "Page.frameRequestedNavigation" - >; - frameScheduledNavigation: CdpEventAlias< - cdp.types.ts.Page.FrameScheduledNavigationEvent, - "Page.frameScheduledNavigation" - >; + frameRequestedNavigation: CdpEventAlias; + frameScheduledNavigation: CdpEventAlias; frameStartedLoading: CdpEventAlias; frameStoppedLoading: CdpEventAlias; downloadWillBegin: CdpEventAlias; @@ -2841,873 +749,226 @@ export type CdpAliases = { interstitialHidden: CdpEventAlias; interstitialShown: CdpEventAlias; javascriptDialogClosed: CdpEventAlias; - javascriptDialogOpening: CdpEventAlias< - cdp.types.ts.Page.JavascriptDialogOpeningEvent, - "Page.javascriptDialogOpening" - >; + javascriptDialogOpening: CdpEventAlias; lifecycleEvent: CdpEventAlias; - backForwardCacheNotUsed: CdpEventAlias< - cdp.types.ts.Page.BackForwardCacheNotUsedEvent, - "Page.backForwardCacheNotUsed" - >; + backForwardCacheNotUsed: CdpEventAlias; loadEventFired: CdpEventAlias; - navigatedWithinDocument: CdpEventAlias< - cdp.types.ts.Page.NavigatedWithinDocumentEvent, - "Page.navigatedWithinDocument" - >; + navigatedWithinDocument: CdpEventAlias; screencastFrame: CdpEventAlias; - screencastVisibilityChanged: CdpEventAlias< - cdp.types.ts.Page.ScreencastVisibilityChangedEvent, - "Page.screencastVisibilityChanged" - >; + screencastVisibilityChanged: CdpEventAlias; windowOpen: CdpEventAlias; - compilationCacheProduced: CdpEventAlias< - cdp.types.ts.Page.CompilationCacheProducedEvent, - "Page.compilationCacheProduced" - >; + compilationCacheProduced: CdpEventAlias; }; Performance: { - disable: CdpOptionalCommandAlias< - cdp.types.ts.Performance.DisableParams, - cdp.types.ts.Performance.DisableResult, - "Performance.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Performance.EnableParams, - cdp.types.ts.Performance.EnableResult, - "Performance.enable" - >; - setTimeDomain: CdpCommandAlias< - cdp.types.ts.Performance.SetTimeDomainParams, - cdp.types.ts.Performance.SetTimeDomainResult, - "Performance.setTimeDomain" - >; - getMetrics: CdpOptionalCommandAlias< - cdp.types.ts.Performance.GetMetricsParams, - cdp.types.ts.Performance.GetMetricsResult, - "Performance.getMetrics" - >; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + setTimeDomain: CdpCommandAlias; + getMetrics: CdpOptionalCommandAlias; metrics: CdpEventAlias; }; PerformanceTimeline: { - enable: CdpCommandAlias< - cdp.types.ts.PerformanceTimeline.EnableParams, - cdp.types.ts.PerformanceTimeline.EnableResult, - "PerformanceTimeline.enable" - >; - timelineEventAdded: CdpEventAlias< - cdp.types.ts.PerformanceTimeline.TimelineEventAddedEvent, - "PerformanceTimeline.timelineEventAdded" - >; + enable: CdpCommandAlias; + timelineEventAdded: CdpEventAlias; }; Preload: { - enable: CdpOptionalCommandAlias< - cdp.types.ts.Preload.EnableParams, - cdp.types.ts.Preload.EnableResult, - "Preload.enable" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.Preload.DisableParams, - cdp.types.ts.Preload.DisableResult, - "Preload.disable" - >; + enable: CdpOptionalCommandAlias; + disable: CdpOptionalCommandAlias; ruleSetUpdated: CdpEventAlias; ruleSetRemoved: CdpEventAlias; - preloadEnabledStateUpdated: CdpEventAlias< - cdp.types.ts.Preload.PreloadEnabledStateUpdatedEvent, - "Preload.preloadEnabledStateUpdated" - >; - prefetchStatusUpdated: CdpEventAlias< - cdp.types.ts.Preload.PrefetchStatusUpdatedEvent, - "Preload.prefetchStatusUpdated" - >; - prerenderStatusUpdated: CdpEventAlias< - cdp.types.ts.Preload.PrerenderStatusUpdatedEvent, - "Preload.prerenderStatusUpdated" - >; - preloadingAttemptSourcesUpdated: CdpEventAlias< - cdp.types.ts.Preload.PreloadingAttemptSourcesUpdatedEvent, - "Preload.preloadingAttemptSourcesUpdated" - >; + preloadEnabledStateUpdated: CdpEventAlias; + prefetchStatusUpdated: CdpEventAlias; + prerenderStatusUpdated: CdpEventAlias; + preloadingAttemptSourcesUpdated: CdpEventAlias; }; Profiler: { - disable: CdpOptionalCommandAlias< - cdp.types.ts.Profiler.DisableParams, - cdp.types.ts.Profiler.DisableResult, - "Profiler.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Profiler.EnableParams, - cdp.types.ts.Profiler.EnableResult, - "Profiler.enable" - >; - getBestEffortCoverage: CdpOptionalCommandAlias< - cdp.types.ts.Profiler.GetBestEffortCoverageParams, - cdp.types.ts.Profiler.GetBestEffortCoverageResult, - "Profiler.getBestEffortCoverage" - >; - setSamplingInterval: CdpCommandAlias< - cdp.types.ts.Profiler.SetSamplingIntervalParams, - cdp.types.ts.Profiler.SetSamplingIntervalResult, - "Profiler.setSamplingInterval" - >; - start: CdpOptionalCommandAlias< - cdp.types.ts.Profiler.StartParams, - cdp.types.ts.Profiler.StartResult, - "Profiler.start" - >; - startPreciseCoverage: CdpOptionalCommandAlias< - cdp.types.ts.Profiler.StartPreciseCoverageParams, - cdp.types.ts.Profiler.StartPreciseCoverageResult, - "Profiler.startPreciseCoverage" - >; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + getBestEffortCoverage: CdpOptionalCommandAlias; + setSamplingInterval: CdpCommandAlias; + start: CdpOptionalCommandAlias; + startPreciseCoverage: CdpOptionalCommandAlias; stop: CdpOptionalCommandAlias; - stopPreciseCoverage: CdpOptionalCommandAlias< - cdp.types.ts.Profiler.StopPreciseCoverageParams, - cdp.types.ts.Profiler.StopPreciseCoverageResult, - "Profiler.stopPreciseCoverage" - >; - takePreciseCoverage: CdpOptionalCommandAlias< - cdp.types.ts.Profiler.TakePreciseCoverageParams, - cdp.types.ts.Profiler.TakePreciseCoverageResult, - "Profiler.takePreciseCoverage" - >; - consoleProfileFinished: CdpEventAlias< - cdp.types.ts.Profiler.ConsoleProfileFinishedEvent, - "Profiler.consoleProfileFinished" - >; - consoleProfileStarted: CdpEventAlias< - cdp.types.ts.Profiler.ConsoleProfileStartedEvent, - "Profiler.consoleProfileStarted" - >; - preciseCoverageDeltaUpdate: CdpEventAlias< - cdp.types.ts.Profiler.PreciseCoverageDeltaUpdateEvent, - "Profiler.preciseCoverageDeltaUpdate" - >; + stopPreciseCoverage: CdpOptionalCommandAlias; + takePreciseCoverage: CdpOptionalCommandAlias; + consoleProfileFinished: CdpEventAlias; + consoleProfileStarted: CdpEventAlias; + preciseCoverageDeltaUpdate: CdpEventAlias; }; PWA: { - getOsAppState: CdpCommandAlias< - cdp.types.ts.PWA.GetOsAppStateParams, - cdp.types.ts.PWA.GetOsAppStateResult, - "PWA.getOsAppState" - >; + getOsAppState: CdpCommandAlias; install: CdpCommandAlias; uninstall: CdpCommandAlias; launch: CdpCommandAlias; - launchFilesInApp: CdpCommandAlias< - cdp.types.ts.PWA.LaunchFilesInAppParams, - cdp.types.ts.PWA.LaunchFilesInAppResult, - "PWA.launchFilesInApp" - >; - openCurrentPageInApp: CdpCommandAlias< - cdp.types.ts.PWA.OpenCurrentPageInAppParams, - cdp.types.ts.PWA.OpenCurrentPageInAppResult, - "PWA.openCurrentPageInApp" - >; - changeAppUserSettings: CdpCommandAlias< - cdp.types.ts.PWA.ChangeAppUserSettingsParams, - cdp.types.ts.PWA.ChangeAppUserSettingsResult, - "PWA.changeAppUserSettings" - >; + launchFilesInApp: CdpCommandAlias; + openCurrentPageInApp: CdpCommandAlias; + changeAppUserSettings: CdpCommandAlias; }; Runtime: { - awaitPromise: CdpCommandAlias< - cdp.types.ts.Runtime.AwaitPromiseParams, - cdp.types.ts.Runtime.AwaitPromiseResult, - "Runtime.awaitPromise" - >; - callFunctionOn: CdpCommandAlias< - cdp.types.ts.Runtime.CallFunctionOnParams, - cdp.types.ts.Runtime.CallFunctionOnResult, - "Runtime.callFunctionOn" - >; - compileScript: CdpCommandAlias< - cdp.types.ts.Runtime.CompileScriptParams, - cdp.types.ts.Runtime.CompileScriptResult, - "Runtime.compileScript" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.Runtime.DisableParams, - cdp.types.ts.Runtime.DisableResult, - "Runtime.disable" - >; - discardConsoleEntries: CdpOptionalCommandAlias< - cdp.types.ts.Runtime.DiscardConsoleEntriesParams, - cdp.types.ts.Runtime.DiscardConsoleEntriesResult, - "Runtime.discardConsoleEntries" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Runtime.EnableParams, - cdp.types.ts.Runtime.EnableResult, - "Runtime.enable" - >; - evaluate: CdpCommandAlias< - cdp.types.ts.Runtime.EvaluateParams, - cdp.types.ts.Runtime.EvaluateResult, - "Runtime.evaluate" - >; - getIsolateId: CdpOptionalCommandAlias< - cdp.types.ts.Runtime.GetIsolateIdParams, - cdp.types.ts.Runtime.GetIsolateIdResult, - "Runtime.getIsolateId" - >; - getHeapUsage: CdpOptionalCommandAlias< - cdp.types.ts.Runtime.GetHeapUsageParams, - cdp.types.ts.Runtime.GetHeapUsageResult, - "Runtime.getHeapUsage" - >; - getProperties: CdpCommandAlias< - cdp.types.ts.Runtime.GetPropertiesParams, - cdp.types.ts.Runtime.GetPropertiesResult, - "Runtime.getProperties" - >; - globalLexicalScopeNames: CdpOptionalCommandAlias< - cdp.types.ts.Runtime.GlobalLexicalScopeNamesParams, - cdp.types.ts.Runtime.GlobalLexicalScopeNamesResult, - "Runtime.globalLexicalScopeNames" - >; - queryObjects: CdpCommandAlias< - cdp.types.ts.Runtime.QueryObjectsParams, - cdp.types.ts.Runtime.QueryObjectsResult, - "Runtime.queryObjects" - >; - releaseObject: CdpCommandAlias< - cdp.types.ts.Runtime.ReleaseObjectParams, - cdp.types.ts.Runtime.ReleaseObjectResult, - "Runtime.releaseObject" - >; - releaseObjectGroup: CdpCommandAlias< - cdp.types.ts.Runtime.ReleaseObjectGroupParams, - cdp.types.ts.Runtime.ReleaseObjectGroupResult, - "Runtime.releaseObjectGroup" - >; - runIfWaitingForDebugger: CdpOptionalCommandAlias< - cdp.types.ts.Runtime.RunIfWaitingForDebuggerParams, - cdp.types.ts.Runtime.RunIfWaitingForDebuggerResult, - "Runtime.runIfWaitingForDebugger" - >; - runScript: CdpCommandAlias< - cdp.types.ts.Runtime.RunScriptParams, - cdp.types.ts.Runtime.RunScriptResult, - "Runtime.runScript" - >; - setAsyncCallStackDepth: CdpCommandAlias< - cdp.types.ts.Runtime.SetAsyncCallStackDepthParams, - cdp.types.ts.Runtime.SetAsyncCallStackDepthResult, - "Runtime.setAsyncCallStackDepth" - >; - setCustomObjectFormatterEnabled: CdpCommandAlias< - cdp.types.ts.Runtime.SetCustomObjectFormatterEnabledParams, - cdp.types.ts.Runtime.SetCustomObjectFormatterEnabledResult, - "Runtime.setCustomObjectFormatterEnabled" - >; - setMaxCallStackSizeToCapture: CdpCommandAlias< - cdp.types.ts.Runtime.SetMaxCallStackSizeToCaptureParams, - cdp.types.ts.Runtime.SetMaxCallStackSizeToCaptureResult, - "Runtime.setMaxCallStackSizeToCapture" - >; - terminateExecution: CdpOptionalCommandAlias< - cdp.types.ts.Runtime.TerminateExecutionParams, - cdp.types.ts.Runtime.TerminateExecutionResult, - "Runtime.terminateExecution" - >; - addBinding: CdpCommandAlias< - cdp.types.ts.Runtime.AddBindingParams, - cdp.types.ts.Runtime.AddBindingResult, - "Runtime.addBinding" - >; - removeBinding: CdpCommandAlias< - cdp.types.ts.Runtime.RemoveBindingParams, - cdp.types.ts.Runtime.RemoveBindingResult, - "Runtime.removeBinding" - >; - getExceptionDetails: CdpCommandAlias< - cdp.types.ts.Runtime.GetExceptionDetailsParams, - cdp.types.ts.Runtime.GetExceptionDetailsResult, - "Runtime.getExceptionDetails" - >; + awaitPromise: CdpCommandAlias; + callFunctionOn: CdpCommandAlias; + compileScript: CdpCommandAlias; + disable: CdpOptionalCommandAlias; + discardConsoleEntries: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + evaluate: CdpCommandAlias; + getIsolateId: CdpOptionalCommandAlias; + getHeapUsage: CdpOptionalCommandAlias; + getProperties: CdpCommandAlias; + globalLexicalScopeNames: CdpOptionalCommandAlias; + queryObjects: CdpCommandAlias; + releaseObject: CdpCommandAlias; + releaseObjectGroup: CdpCommandAlias; + runIfWaitingForDebugger: CdpOptionalCommandAlias; + runScript: CdpCommandAlias; + setAsyncCallStackDepth: CdpCommandAlias; + setCustomObjectFormatterEnabled: CdpCommandAlias; + setMaxCallStackSizeToCapture: CdpCommandAlias; + terminateExecution: CdpOptionalCommandAlias; + addBinding: CdpCommandAlias; + removeBinding: CdpCommandAlias; + getExceptionDetails: CdpCommandAlias; bindingCalled: CdpEventAlias; consoleAPICalled: CdpEventAlias; exceptionRevoked: CdpEventAlias; exceptionThrown: CdpEventAlias; - executionContextCreated: CdpEventAlias< - cdp.types.ts.Runtime.ExecutionContextCreatedEvent, - "Runtime.executionContextCreated" - >; - executionContextDestroyed: CdpEventAlias< - cdp.types.ts.Runtime.ExecutionContextDestroyedEvent, - "Runtime.executionContextDestroyed" - >; - executionContextsCleared: CdpEventAlias< - cdp.types.ts.Runtime.ExecutionContextsClearedEvent, - "Runtime.executionContextsCleared" - >; + executionContextCreated: CdpEventAlias; + executionContextDestroyed: CdpEventAlias; + executionContextsCleared: CdpEventAlias; inspectRequested: CdpEventAlias; }; Schema: { - getDomains: CdpOptionalCommandAlias< - cdp.types.ts.Schema.GetDomainsParams, - cdp.types.ts.Schema.GetDomainsResult, - "Schema.getDomains" - >; + getDomains: CdpOptionalCommandAlias; }; Security: { - disable: CdpOptionalCommandAlias< - cdp.types.ts.Security.DisableParams, - cdp.types.ts.Security.DisableResult, - "Security.disable" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.Security.EnableParams, - cdp.types.ts.Security.EnableResult, - "Security.enable" - >; - setIgnoreCertificateErrors: CdpCommandAlias< - cdp.types.ts.Security.SetIgnoreCertificateErrorsParams, - cdp.types.ts.Security.SetIgnoreCertificateErrorsResult, - "Security.setIgnoreCertificateErrors" - >; - handleCertificateError: CdpCommandAlias< - cdp.types.ts.Security.HandleCertificateErrorParams, - cdp.types.ts.Security.HandleCertificateErrorResult, - "Security.handleCertificateError" - >; - setOverrideCertificateErrors: CdpCommandAlias< - cdp.types.ts.Security.SetOverrideCertificateErrorsParams, - cdp.types.ts.Security.SetOverrideCertificateErrorsResult, - "Security.setOverrideCertificateErrors" - >; + disable: CdpOptionalCommandAlias; + enable: CdpOptionalCommandAlias; + setIgnoreCertificateErrors: CdpCommandAlias; + handleCertificateError: CdpCommandAlias; + setOverrideCertificateErrors: CdpCommandAlias; certificateError: CdpEventAlias; - visibleSecurityStateChanged: CdpEventAlias< - cdp.types.ts.Security.VisibleSecurityStateChangedEvent, - "Security.visibleSecurityStateChanged" - >; - securityStateChanged: CdpEventAlias< - cdp.types.ts.Security.SecurityStateChangedEvent, - "Security.securityStateChanged" - >; + visibleSecurityStateChanged: CdpEventAlias; + securityStateChanged: CdpEventAlias; }; ServiceWorker: { - deliverPushMessage: CdpCommandAlias< - cdp.types.ts.ServiceWorker.DeliverPushMessageParams, - cdp.types.ts.ServiceWorker.DeliverPushMessageResult, - "ServiceWorker.deliverPushMessage" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.ServiceWorker.DisableParams, - cdp.types.ts.ServiceWorker.DisableResult, - "ServiceWorker.disable" - >; - dispatchSyncEvent: CdpCommandAlias< - cdp.types.ts.ServiceWorker.DispatchSyncEventParams, - cdp.types.ts.ServiceWorker.DispatchSyncEventResult, - "ServiceWorker.dispatchSyncEvent" - >; - dispatchPeriodicSyncEvent: CdpCommandAlias< - cdp.types.ts.ServiceWorker.DispatchPeriodicSyncEventParams, - cdp.types.ts.ServiceWorker.DispatchPeriodicSyncEventResult, - "ServiceWorker.dispatchPeriodicSyncEvent" - >; - enable: CdpOptionalCommandAlias< - cdp.types.ts.ServiceWorker.EnableParams, - cdp.types.ts.ServiceWorker.EnableResult, - "ServiceWorker.enable" - >; - setForceUpdateOnPageLoad: CdpCommandAlias< - cdp.types.ts.ServiceWorker.SetForceUpdateOnPageLoadParams, - cdp.types.ts.ServiceWorker.SetForceUpdateOnPageLoadResult, - "ServiceWorker.setForceUpdateOnPageLoad" - >; - skipWaiting: CdpCommandAlias< - cdp.types.ts.ServiceWorker.SkipWaitingParams, - cdp.types.ts.ServiceWorker.SkipWaitingResult, - "ServiceWorker.skipWaiting" - >; - startWorker: CdpCommandAlias< - cdp.types.ts.ServiceWorker.StartWorkerParams, - cdp.types.ts.ServiceWorker.StartWorkerResult, - "ServiceWorker.startWorker" - >; - stopAllWorkers: CdpOptionalCommandAlias< - cdp.types.ts.ServiceWorker.StopAllWorkersParams, - cdp.types.ts.ServiceWorker.StopAllWorkersResult, - "ServiceWorker.stopAllWorkers" - >; - stopWorker: CdpCommandAlias< - cdp.types.ts.ServiceWorker.StopWorkerParams, - cdp.types.ts.ServiceWorker.StopWorkerResult, - "ServiceWorker.stopWorker" - >; - unregister: CdpCommandAlias< - cdp.types.ts.ServiceWorker.UnregisterParams, - cdp.types.ts.ServiceWorker.UnregisterResult, - "ServiceWorker.unregister" - >; - updateRegistration: CdpCommandAlias< - cdp.types.ts.ServiceWorker.UpdateRegistrationParams, - cdp.types.ts.ServiceWorker.UpdateRegistrationResult, - "ServiceWorker.updateRegistration" - >; - workerErrorReported: CdpEventAlias< - cdp.types.ts.ServiceWorker.WorkerErrorReportedEvent, - "ServiceWorker.workerErrorReported" - >; - workerRegistrationUpdated: CdpEventAlias< - cdp.types.ts.ServiceWorker.WorkerRegistrationUpdatedEvent, - "ServiceWorker.workerRegistrationUpdated" - >; - workerVersionUpdated: CdpEventAlias< - cdp.types.ts.ServiceWorker.WorkerVersionUpdatedEvent, - "ServiceWorker.workerVersionUpdated" - >; + deliverPushMessage: CdpCommandAlias; + disable: CdpOptionalCommandAlias; + dispatchSyncEvent: CdpCommandAlias; + dispatchPeriodicSyncEvent: CdpCommandAlias; + enable: CdpOptionalCommandAlias; + setForceUpdateOnPageLoad: CdpCommandAlias; + skipWaiting: CdpCommandAlias; + startWorker: CdpCommandAlias; + stopAllWorkers: CdpOptionalCommandAlias; + stopWorker: CdpCommandAlias; + unregister: CdpCommandAlias; + updateRegistration: CdpCommandAlias; + workerErrorReported: CdpEventAlias; + workerRegistrationUpdated: CdpEventAlias; + workerVersionUpdated: CdpEventAlias; }; SmartCardEmulation: { - enable: CdpOptionalCommandAlias< - cdp.types.ts.SmartCardEmulation.EnableParams, - cdp.types.ts.SmartCardEmulation.EnableResult, - "SmartCardEmulation.enable" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.SmartCardEmulation.DisableParams, - cdp.types.ts.SmartCardEmulation.DisableResult, - "SmartCardEmulation.disable" - >; - reportEstablishContextResult: CdpCommandAlias< - cdp.types.ts.SmartCardEmulation.ReportEstablishContextResultParams, - cdp.types.ts.SmartCardEmulation.ReportEstablishContextResultResult, - "SmartCardEmulation.reportEstablishContextResult" - >; - reportReleaseContextResult: CdpCommandAlias< - cdp.types.ts.SmartCardEmulation.ReportReleaseContextResultParams, - cdp.types.ts.SmartCardEmulation.ReportReleaseContextResultResult, - "SmartCardEmulation.reportReleaseContextResult" - >; - reportListReadersResult: CdpCommandAlias< - cdp.types.ts.SmartCardEmulation.ReportListReadersResultParams, - cdp.types.ts.SmartCardEmulation.ReportListReadersResultResult, - "SmartCardEmulation.reportListReadersResult" - >; - reportGetStatusChangeResult: CdpCommandAlias< - cdp.types.ts.SmartCardEmulation.ReportGetStatusChangeResultParams, - cdp.types.ts.SmartCardEmulation.ReportGetStatusChangeResultResult, - "SmartCardEmulation.reportGetStatusChangeResult" - >; - reportBeginTransactionResult: CdpCommandAlias< - cdp.types.ts.SmartCardEmulation.ReportBeginTransactionResultParams, - cdp.types.ts.SmartCardEmulation.ReportBeginTransactionResultResult, - "SmartCardEmulation.reportBeginTransactionResult" - >; - reportPlainResult: CdpCommandAlias< - cdp.types.ts.SmartCardEmulation.ReportPlainResultParams, - cdp.types.ts.SmartCardEmulation.ReportPlainResultResult, - "SmartCardEmulation.reportPlainResult" - >; - reportConnectResult: CdpCommandAlias< - cdp.types.ts.SmartCardEmulation.ReportConnectResultParams, - cdp.types.ts.SmartCardEmulation.ReportConnectResultResult, - "SmartCardEmulation.reportConnectResult" - >; - reportDataResult: CdpCommandAlias< - cdp.types.ts.SmartCardEmulation.ReportDataResultParams, - cdp.types.ts.SmartCardEmulation.ReportDataResultResult, - "SmartCardEmulation.reportDataResult" - >; - reportStatusResult: CdpCommandAlias< - cdp.types.ts.SmartCardEmulation.ReportStatusResultParams, - cdp.types.ts.SmartCardEmulation.ReportStatusResultResult, - "SmartCardEmulation.reportStatusResult" - >; - reportError: CdpCommandAlias< - cdp.types.ts.SmartCardEmulation.ReportErrorParams, - cdp.types.ts.SmartCardEmulation.ReportErrorResult, - "SmartCardEmulation.reportError" - >; - establishContextRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.EstablishContextRequestedEvent, - "SmartCardEmulation.establishContextRequested" - >; - releaseContextRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.ReleaseContextRequestedEvent, - "SmartCardEmulation.releaseContextRequested" - >; - listReadersRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.ListReadersRequestedEvent, - "SmartCardEmulation.listReadersRequested" - >; - getStatusChangeRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.GetStatusChangeRequestedEvent, - "SmartCardEmulation.getStatusChangeRequested" - >; - cancelRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.CancelRequestedEvent, - "SmartCardEmulation.cancelRequested" - >; - connectRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.ConnectRequestedEvent, - "SmartCardEmulation.connectRequested" - >; - disconnectRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.DisconnectRequestedEvent, - "SmartCardEmulation.disconnectRequested" - >; - transmitRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.TransmitRequestedEvent, - "SmartCardEmulation.transmitRequested" - >; - controlRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.ControlRequestedEvent, - "SmartCardEmulation.controlRequested" - >; - getAttribRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.GetAttribRequestedEvent, - "SmartCardEmulation.getAttribRequested" - >; - setAttribRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.SetAttribRequestedEvent, - "SmartCardEmulation.setAttribRequested" - >; - statusRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.StatusRequestedEvent, - "SmartCardEmulation.statusRequested" - >; - beginTransactionRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.BeginTransactionRequestedEvent, - "SmartCardEmulation.beginTransactionRequested" - >; - endTransactionRequested: CdpEventAlias< - cdp.types.ts.SmartCardEmulation.EndTransactionRequestedEvent, - "SmartCardEmulation.endTransactionRequested" - >; + enable: CdpOptionalCommandAlias; + disable: CdpOptionalCommandAlias; + reportEstablishContextResult: CdpCommandAlias; + reportReleaseContextResult: CdpCommandAlias; + reportListReadersResult: CdpCommandAlias; + reportGetStatusChangeResult: CdpCommandAlias; + reportBeginTransactionResult: CdpCommandAlias; + reportPlainResult: CdpCommandAlias; + reportConnectResult: CdpCommandAlias; + reportDataResult: CdpCommandAlias; + reportStatusResult: CdpCommandAlias; + reportError: CdpCommandAlias; + establishContextRequested: CdpEventAlias; + releaseContextRequested: CdpEventAlias; + listReadersRequested: CdpEventAlias; + getStatusChangeRequested: CdpEventAlias; + cancelRequested: CdpEventAlias; + connectRequested: CdpEventAlias; + disconnectRequested: CdpEventAlias; + transmitRequested: CdpEventAlias; + controlRequested: CdpEventAlias; + getAttribRequested: CdpEventAlias; + setAttribRequested: CdpEventAlias; + statusRequested: CdpEventAlias; + beginTransactionRequested: CdpEventAlias; + endTransactionRequested: CdpEventAlias; }; Storage: { - getStorageKeyForFrame: CdpCommandAlias< - cdp.types.ts.Storage.GetStorageKeyForFrameParams, - cdp.types.ts.Storage.GetStorageKeyForFrameResult, - "Storage.getStorageKeyForFrame" - >; - getStorageKey: CdpOptionalCommandAlias< - cdp.types.ts.Storage.GetStorageKeyParams, - cdp.types.ts.Storage.GetStorageKeyResult, - "Storage.getStorageKey" - >; - clearDataForOrigin: CdpCommandAlias< - cdp.types.ts.Storage.ClearDataForOriginParams, - cdp.types.ts.Storage.ClearDataForOriginResult, - "Storage.clearDataForOrigin" - >; - clearDataForStorageKey: CdpCommandAlias< - cdp.types.ts.Storage.ClearDataForStorageKeyParams, - cdp.types.ts.Storage.ClearDataForStorageKeyResult, - "Storage.clearDataForStorageKey" - >; - getCookies: CdpOptionalCommandAlias< - cdp.types.ts.Storage.GetCookiesParams, - cdp.types.ts.Storage.GetCookiesResult, - "Storage.getCookies" - >; - setCookies: CdpCommandAlias< - cdp.types.ts.Storage.SetCookiesParams, - cdp.types.ts.Storage.SetCookiesResult, - "Storage.setCookies" - >; - clearCookies: CdpOptionalCommandAlias< - cdp.types.ts.Storage.ClearCookiesParams, - cdp.types.ts.Storage.ClearCookiesResult, - "Storage.clearCookies" - >; - getUsageAndQuota: CdpCommandAlias< - cdp.types.ts.Storage.GetUsageAndQuotaParams, - cdp.types.ts.Storage.GetUsageAndQuotaResult, - "Storage.getUsageAndQuota" - >; - overrideQuotaForOrigin: CdpCommandAlias< - cdp.types.ts.Storage.OverrideQuotaForOriginParams, - cdp.types.ts.Storage.OverrideQuotaForOriginResult, - "Storage.overrideQuotaForOrigin" - >; - trackCacheStorageForOrigin: CdpCommandAlias< - cdp.types.ts.Storage.TrackCacheStorageForOriginParams, - cdp.types.ts.Storage.TrackCacheStorageForOriginResult, - "Storage.trackCacheStorageForOrigin" - >; - trackCacheStorageForStorageKey: CdpCommandAlias< - cdp.types.ts.Storage.TrackCacheStorageForStorageKeyParams, - cdp.types.ts.Storage.TrackCacheStorageForStorageKeyResult, - "Storage.trackCacheStorageForStorageKey" - >; - trackIndexedDBForOrigin: CdpCommandAlias< - cdp.types.ts.Storage.TrackIndexedDBForOriginParams, - cdp.types.ts.Storage.TrackIndexedDBForOriginResult, - "Storage.trackIndexedDBForOrigin" - >; - trackIndexedDBForStorageKey: CdpCommandAlias< - cdp.types.ts.Storage.TrackIndexedDBForStorageKeyParams, - cdp.types.ts.Storage.TrackIndexedDBForStorageKeyResult, - "Storage.trackIndexedDBForStorageKey" - >; - untrackCacheStorageForOrigin: CdpCommandAlias< - cdp.types.ts.Storage.UntrackCacheStorageForOriginParams, - cdp.types.ts.Storage.UntrackCacheStorageForOriginResult, - "Storage.untrackCacheStorageForOrigin" - >; - untrackCacheStorageForStorageKey: CdpCommandAlias< - cdp.types.ts.Storage.UntrackCacheStorageForStorageKeyParams, - cdp.types.ts.Storage.UntrackCacheStorageForStorageKeyResult, - "Storage.untrackCacheStorageForStorageKey" - >; - untrackIndexedDBForOrigin: CdpCommandAlias< - cdp.types.ts.Storage.UntrackIndexedDBForOriginParams, - cdp.types.ts.Storage.UntrackIndexedDBForOriginResult, - "Storage.untrackIndexedDBForOrigin" - >; - untrackIndexedDBForStorageKey: CdpCommandAlias< - cdp.types.ts.Storage.UntrackIndexedDBForStorageKeyParams, - cdp.types.ts.Storage.UntrackIndexedDBForStorageKeyResult, - "Storage.untrackIndexedDBForStorageKey" - >; - getTrustTokens: CdpOptionalCommandAlias< - cdp.types.ts.Storage.GetTrustTokensParams, - cdp.types.ts.Storage.GetTrustTokensResult, - "Storage.getTrustTokens" - >; - clearTrustTokens: CdpCommandAlias< - cdp.types.ts.Storage.ClearTrustTokensParams, - cdp.types.ts.Storage.ClearTrustTokensResult, - "Storage.clearTrustTokens" - >; - getInterestGroupDetails: CdpCommandAlias< - cdp.types.ts.Storage.GetInterestGroupDetailsParams, - cdp.types.ts.Storage.GetInterestGroupDetailsResult, - "Storage.getInterestGroupDetails" - >; - setInterestGroupTracking: CdpCommandAlias< - cdp.types.ts.Storage.SetInterestGroupTrackingParams, - cdp.types.ts.Storage.SetInterestGroupTrackingResult, - "Storage.setInterestGroupTracking" - >; - setInterestGroupAuctionTracking: CdpCommandAlias< - cdp.types.ts.Storage.SetInterestGroupAuctionTrackingParams, - cdp.types.ts.Storage.SetInterestGroupAuctionTrackingResult, - "Storage.setInterestGroupAuctionTracking" - >; - getSharedStorageMetadata: CdpCommandAlias< - cdp.types.ts.Storage.GetSharedStorageMetadataParams, - cdp.types.ts.Storage.GetSharedStorageMetadataResult, - "Storage.getSharedStorageMetadata" - >; - getSharedStorageEntries: CdpCommandAlias< - cdp.types.ts.Storage.GetSharedStorageEntriesParams, - cdp.types.ts.Storage.GetSharedStorageEntriesResult, - "Storage.getSharedStorageEntries" - >; - setSharedStorageEntry: CdpCommandAlias< - cdp.types.ts.Storage.SetSharedStorageEntryParams, - cdp.types.ts.Storage.SetSharedStorageEntryResult, - "Storage.setSharedStorageEntry" - >; - deleteSharedStorageEntry: CdpCommandAlias< - cdp.types.ts.Storage.DeleteSharedStorageEntryParams, - cdp.types.ts.Storage.DeleteSharedStorageEntryResult, - "Storage.deleteSharedStorageEntry" - >; - clearSharedStorageEntries: CdpCommandAlias< - cdp.types.ts.Storage.ClearSharedStorageEntriesParams, - cdp.types.ts.Storage.ClearSharedStorageEntriesResult, - "Storage.clearSharedStorageEntries" - >; - resetSharedStorageBudget: CdpCommandAlias< - cdp.types.ts.Storage.ResetSharedStorageBudgetParams, - cdp.types.ts.Storage.ResetSharedStorageBudgetResult, - "Storage.resetSharedStorageBudget" - >; - setSharedStorageTracking: CdpCommandAlias< - cdp.types.ts.Storage.SetSharedStorageTrackingParams, - cdp.types.ts.Storage.SetSharedStorageTrackingResult, - "Storage.setSharedStorageTracking" - >; - setStorageBucketTracking: CdpCommandAlias< - cdp.types.ts.Storage.SetStorageBucketTrackingParams, - cdp.types.ts.Storage.SetStorageBucketTrackingResult, - "Storage.setStorageBucketTracking" - >; - deleteStorageBucket: CdpCommandAlias< - cdp.types.ts.Storage.DeleteStorageBucketParams, - cdp.types.ts.Storage.DeleteStorageBucketResult, - "Storage.deleteStorageBucket" - >; - runBounceTrackingMitigations: CdpOptionalCommandAlias< - cdp.types.ts.Storage.RunBounceTrackingMitigationsParams, - cdp.types.ts.Storage.RunBounceTrackingMitigationsResult, - "Storage.runBounceTrackingMitigations" - >; - getRelatedWebsiteSets: CdpOptionalCommandAlias< - cdp.types.ts.Storage.GetRelatedWebsiteSetsParams, - cdp.types.ts.Storage.GetRelatedWebsiteSetsResult, - "Storage.getRelatedWebsiteSets" - >; - setProtectedAudienceKAnonymity: CdpCommandAlias< - cdp.types.ts.Storage.SetProtectedAudienceKAnonymityParams, - cdp.types.ts.Storage.SetProtectedAudienceKAnonymityResult, - "Storage.setProtectedAudienceKAnonymity" - >; - cacheStorageContentUpdated: CdpEventAlias< - cdp.types.ts.Storage.CacheStorageContentUpdatedEvent, - "Storage.cacheStorageContentUpdated" - >; - cacheStorageListUpdated: CdpEventAlias< - cdp.types.ts.Storage.CacheStorageListUpdatedEvent, - "Storage.cacheStorageListUpdated" - >; - indexedDBContentUpdated: CdpEventAlias< - cdp.types.ts.Storage.IndexedDBContentUpdatedEvent, - "Storage.indexedDBContentUpdated" - >; + getStorageKeyForFrame: CdpCommandAlias; + getStorageKey: CdpOptionalCommandAlias; + clearDataForOrigin: CdpCommandAlias; + clearDataForStorageKey: CdpCommandAlias; + getCookies: CdpOptionalCommandAlias; + setCookies: CdpCommandAlias; + clearCookies: CdpOptionalCommandAlias; + getUsageAndQuota: CdpCommandAlias; + overrideQuotaForOrigin: CdpCommandAlias; + trackCacheStorageForOrigin: CdpCommandAlias; + trackCacheStorageForStorageKey: CdpCommandAlias; + trackIndexedDBForOrigin: CdpCommandAlias; + trackIndexedDBForStorageKey: CdpCommandAlias; + untrackCacheStorageForOrigin: CdpCommandAlias; + untrackCacheStorageForStorageKey: CdpCommandAlias; + untrackIndexedDBForOrigin: CdpCommandAlias; + untrackIndexedDBForStorageKey: CdpCommandAlias; + getTrustTokens: CdpOptionalCommandAlias; + clearTrustTokens: CdpCommandAlias; + getInterestGroupDetails: CdpCommandAlias; + setInterestGroupTracking: CdpCommandAlias; + setInterestGroupAuctionTracking: CdpCommandAlias; + getSharedStorageMetadata: CdpCommandAlias; + getSharedStorageEntries: CdpCommandAlias; + setSharedStorageEntry: CdpCommandAlias; + deleteSharedStorageEntry: CdpCommandAlias; + clearSharedStorageEntries: CdpCommandAlias; + resetSharedStorageBudget: CdpCommandAlias; + setSharedStorageTracking: CdpCommandAlias; + setStorageBucketTracking: CdpCommandAlias; + deleteStorageBucket: CdpCommandAlias; + runBounceTrackingMitigations: CdpOptionalCommandAlias; + getRelatedWebsiteSets: CdpOptionalCommandAlias; + setProtectedAudienceKAnonymity: CdpCommandAlias; + cacheStorageContentUpdated: CdpEventAlias; + cacheStorageListUpdated: CdpEventAlias; + indexedDBContentUpdated: CdpEventAlias; indexedDBListUpdated: CdpEventAlias; - interestGroupAccessed: CdpEventAlias< - cdp.types.ts.Storage.InterestGroupAccessedEvent, - "Storage.interestGroupAccessed" - >; - interestGroupAuctionEventOccurred: CdpEventAlias< - cdp.types.ts.Storage.InterestGroupAuctionEventOccurredEvent, - "Storage.interestGroupAuctionEventOccurred" - >; - interestGroupAuctionNetworkRequestCreated: CdpEventAlias< - cdp.types.ts.Storage.InterestGroupAuctionNetworkRequestCreatedEvent, - "Storage.interestGroupAuctionNetworkRequestCreated" - >; - sharedStorageAccessed: CdpEventAlias< - cdp.types.ts.Storage.SharedStorageAccessedEvent, - "Storage.sharedStorageAccessed" - >; - sharedStorageWorkletOperationExecutionFinished: CdpEventAlias< - cdp.types.ts.Storage.SharedStorageWorkletOperationExecutionFinishedEvent, - "Storage.sharedStorageWorkletOperationExecutionFinished" - >; - storageBucketCreatedOrUpdated: CdpEventAlias< - cdp.types.ts.Storage.StorageBucketCreatedOrUpdatedEvent, - "Storage.storageBucketCreatedOrUpdated" - >; + interestGroupAccessed: CdpEventAlias; + interestGroupAuctionEventOccurred: CdpEventAlias; + interestGroupAuctionNetworkRequestCreated: CdpEventAlias; + sharedStorageAccessed: CdpEventAlias; + sharedStorageWorkletOperationExecutionFinished: CdpEventAlias; + storageBucketCreatedOrUpdated: CdpEventAlias; storageBucketDeleted: CdpEventAlias; }; SystemInfo: { - getInfo: CdpOptionalCommandAlias< - cdp.types.ts.SystemInfo.GetInfoParams, - cdp.types.ts.SystemInfo.GetInfoResult, - "SystemInfo.getInfo" - >; - getFeatureState: CdpCommandAlias< - cdp.types.ts.SystemInfo.GetFeatureStateParams, - cdp.types.ts.SystemInfo.GetFeatureStateResult, - "SystemInfo.getFeatureState" - >; - getProcessInfo: CdpOptionalCommandAlias< - cdp.types.ts.SystemInfo.GetProcessInfoParams, - cdp.types.ts.SystemInfo.GetProcessInfoResult, - "SystemInfo.getProcessInfo" - >; + getInfo: CdpOptionalCommandAlias; + getFeatureState: CdpCommandAlias; + getProcessInfo: CdpOptionalCommandAlias; }; Target: { - activateTarget: CdpCommandAlias< - cdp.types.ts.Target.ActivateTargetParams, - cdp.types.ts.Target.ActivateTargetResult, - "Target.activateTarget" - >; - attachToTarget: CdpCommandAlias< - cdp.types.ts.Target.AttachToTargetParams, - cdp.types.ts.Target.AttachToTargetResult, - "Target.attachToTarget" - >; - attachToBrowserTarget: CdpOptionalCommandAlias< - cdp.types.ts.Target.AttachToBrowserTargetParams, - cdp.types.ts.Target.AttachToBrowserTargetResult, - "Target.attachToBrowserTarget" - >; - closeTarget: CdpCommandAlias< - cdp.types.ts.Target.CloseTargetParams, - cdp.types.ts.Target.CloseTargetResult, - "Target.closeTarget" - >; - exposeDevToolsProtocol: CdpCommandAlias< - cdp.types.ts.Target.ExposeDevToolsProtocolParams, - cdp.types.ts.Target.ExposeDevToolsProtocolResult, - "Target.exposeDevToolsProtocol" - >; - createBrowserContext: CdpOptionalCommandAlias< - cdp.types.ts.Target.CreateBrowserContextParams, - cdp.types.ts.Target.CreateBrowserContextResult, - "Target.createBrowserContext" - >; - getBrowserContexts: CdpOptionalCommandAlias< - cdp.types.ts.Target.GetBrowserContextsParams, - cdp.types.ts.Target.GetBrowserContextsResult, - "Target.getBrowserContexts" - >; - createTarget: CdpCommandAlias< - cdp.types.ts.Target.CreateTargetParams, - cdp.types.ts.Target.CreateTargetResult, - "Target.createTarget" - >; - detachFromTarget: CdpOptionalCommandAlias< - cdp.types.ts.Target.DetachFromTargetParams, - cdp.types.ts.Target.DetachFromTargetResult, - "Target.detachFromTarget" - >; - disposeBrowserContext: CdpCommandAlias< - cdp.types.ts.Target.DisposeBrowserContextParams, - cdp.types.ts.Target.DisposeBrowserContextResult, - "Target.disposeBrowserContext" - >; - getTargetInfo: CdpOptionalCommandAlias< - cdp.types.ts.Target.GetTargetInfoParams, - cdp.types.ts.Target.GetTargetInfoResult, - "Target.getTargetInfo" - >; - getTargets: CdpOptionalCommandAlias< - cdp.types.ts.Target.GetTargetsParams, - cdp.types.ts.Target.GetTargetsResult, - "Target.getTargets" - >; - sendMessageToTarget: CdpCommandAlias< - cdp.types.ts.Target.SendMessageToTargetParams, - cdp.types.ts.Target.SendMessageToTargetResult, - "Target.sendMessageToTarget" - >; - setAutoAttach: CdpCommandAlias< - cdp.types.ts.Target.SetAutoAttachParams, - cdp.types.ts.Target.SetAutoAttachResult, - "Target.setAutoAttach" - >; - autoAttachRelated: CdpCommandAlias< - cdp.types.ts.Target.AutoAttachRelatedParams, - cdp.types.ts.Target.AutoAttachRelatedResult, - "Target.autoAttachRelated" - >; - setDiscoverTargets: CdpCommandAlias< - cdp.types.ts.Target.SetDiscoverTargetsParams, - cdp.types.ts.Target.SetDiscoverTargetsResult, - "Target.setDiscoverTargets" - >; - setRemoteLocations: CdpCommandAlias< - cdp.types.ts.Target.SetRemoteLocationsParams, - cdp.types.ts.Target.SetRemoteLocationsResult, - "Target.setRemoteLocations" - >; - getDevToolsTarget: CdpCommandAlias< - cdp.types.ts.Target.GetDevToolsTargetParams, - cdp.types.ts.Target.GetDevToolsTargetResult, - "Target.getDevToolsTarget" - >; - openDevTools: CdpCommandAlias< - cdp.types.ts.Target.OpenDevToolsParams, - cdp.types.ts.Target.OpenDevToolsResult, - "Target.openDevTools" - >; + activateTarget: CdpCommandAlias; + attachToTarget: CdpCommandAlias; + attachToBrowserTarget: CdpOptionalCommandAlias; + closeTarget: CdpCommandAlias; + exposeDevToolsProtocol: CdpCommandAlias; + createBrowserContext: CdpOptionalCommandAlias; + getBrowserContexts: CdpOptionalCommandAlias; + createTarget: CdpCommandAlias; + detachFromTarget: CdpOptionalCommandAlias; + disposeBrowserContext: CdpCommandAlias; + getTargetInfo: CdpOptionalCommandAlias; + getTargets: CdpOptionalCommandAlias; + sendMessageToTarget: CdpCommandAlias; + setAutoAttach: CdpCommandAlias; + autoAttachRelated: CdpCommandAlias; + setDiscoverTargets: CdpCommandAlias; + setRemoteLocations: CdpCommandAlias; + getDevToolsTarget: CdpCommandAlias; + openDevTools: CdpCommandAlias; attachedToTarget: CdpEventAlias; detachedFromTarget: CdpEventAlias; - receivedMessageFromTarget: CdpEventAlias< - cdp.types.ts.Target.ReceivedMessageFromTargetEvent, - "Target.receivedMessageFromTarget" - >; + receivedMessageFromTarget: CdpEventAlias; targetCreated: CdpEventAlias; targetDestroyed: CdpEventAlias; targetCrashed: CdpEventAlias; @@ -3715,209 +976,84 @@ export type CdpAliases = { }; Tethering: { bind: CdpCommandAlias; - unbind: CdpCommandAlias< - cdp.types.ts.Tethering.UnbindParams, - cdp.types.ts.Tethering.UnbindResult, - "Tethering.unbind" - >; + unbind: CdpCommandAlias; accepted: CdpEventAlias; }; Tracing: { end: CdpOptionalCommandAlias; - getCategories: CdpOptionalCommandAlias< - cdp.types.ts.Tracing.GetCategoriesParams, - cdp.types.ts.Tracing.GetCategoriesResult, - "Tracing.getCategories" - >; - getTrackEventDescriptor: CdpOptionalCommandAlias< - cdp.types.ts.Tracing.GetTrackEventDescriptorParams, - cdp.types.ts.Tracing.GetTrackEventDescriptorResult, - "Tracing.getTrackEventDescriptor" - >; - recordClockSyncMarker: CdpCommandAlias< - cdp.types.ts.Tracing.RecordClockSyncMarkerParams, - cdp.types.ts.Tracing.RecordClockSyncMarkerResult, - "Tracing.recordClockSyncMarker" - >; - requestMemoryDump: CdpOptionalCommandAlias< - cdp.types.ts.Tracing.RequestMemoryDumpParams, - cdp.types.ts.Tracing.RequestMemoryDumpResult, - "Tracing.requestMemoryDump" - >; + getCategories: CdpOptionalCommandAlias; + getTrackEventDescriptor: CdpOptionalCommandAlias; + recordClockSyncMarker: CdpCommandAlias; + requestMemoryDump: CdpOptionalCommandAlias; start: CdpOptionalCommandAlias; bufferUsage: CdpEventAlias; dataCollected: CdpEventAlias; tracingComplete: CdpEventAlias; }; WebAudio: { - enable: CdpOptionalCommandAlias< - cdp.types.ts.WebAudio.EnableParams, - cdp.types.ts.WebAudio.EnableResult, - "WebAudio.enable" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.WebAudio.DisableParams, - cdp.types.ts.WebAudio.DisableResult, - "WebAudio.disable" - >; - getRealtimeData: CdpCommandAlias< - cdp.types.ts.WebAudio.GetRealtimeDataParams, - cdp.types.ts.WebAudio.GetRealtimeDataResult, - "WebAudio.getRealtimeData" - >; + enable: CdpOptionalCommandAlias; + disable: CdpOptionalCommandAlias; + getRealtimeData: CdpCommandAlias; contextCreated: CdpEventAlias; - contextWillBeDestroyed: CdpEventAlias< - cdp.types.ts.WebAudio.ContextWillBeDestroyedEvent, - "WebAudio.contextWillBeDestroyed" - >; + contextWillBeDestroyed: CdpEventAlias; contextChanged: CdpEventAlias; - audioListenerCreated: CdpEventAlias< - cdp.types.ts.WebAudio.AudioListenerCreatedEvent, - "WebAudio.audioListenerCreated" - >; - audioListenerWillBeDestroyed: CdpEventAlias< - cdp.types.ts.WebAudio.AudioListenerWillBeDestroyedEvent, - "WebAudio.audioListenerWillBeDestroyed" - >; + audioListenerCreated: CdpEventAlias; + audioListenerWillBeDestroyed: CdpEventAlias; audioNodeCreated: CdpEventAlias; - audioNodeWillBeDestroyed: CdpEventAlias< - cdp.types.ts.WebAudio.AudioNodeWillBeDestroyedEvent, - "WebAudio.audioNodeWillBeDestroyed" - >; + audioNodeWillBeDestroyed: CdpEventAlias; audioParamCreated: CdpEventAlias; - audioParamWillBeDestroyed: CdpEventAlias< - cdp.types.ts.WebAudio.AudioParamWillBeDestroyedEvent, - "WebAudio.audioParamWillBeDestroyed" - >; + audioParamWillBeDestroyed: CdpEventAlias; nodesConnected: CdpEventAlias; nodesDisconnected: CdpEventAlias; nodeParamConnected: CdpEventAlias; - nodeParamDisconnected: CdpEventAlias< - cdp.types.ts.WebAudio.NodeParamDisconnectedEvent, - "WebAudio.nodeParamDisconnected" - >; + nodeParamDisconnected: CdpEventAlias; }; WebAuthn: { - enable: CdpOptionalCommandAlias< - cdp.types.ts.WebAuthn.EnableParams, - cdp.types.ts.WebAuthn.EnableResult, - "WebAuthn.enable" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.WebAuthn.DisableParams, - cdp.types.ts.WebAuthn.DisableResult, - "WebAuthn.disable" - >; - addVirtualAuthenticator: CdpCommandAlias< - cdp.types.ts.WebAuthn.AddVirtualAuthenticatorParams, - cdp.types.ts.WebAuthn.AddVirtualAuthenticatorResult, - "WebAuthn.addVirtualAuthenticator" - >; - setResponseOverrideBits: CdpCommandAlias< - cdp.types.ts.WebAuthn.SetResponseOverrideBitsParams, - cdp.types.ts.WebAuthn.SetResponseOverrideBitsResult, - "WebAuthn.setResponseOverrideBits" - >; - removeVirtualAuthenticator: CdpCommandAlias< - cdp.types.ts.WebAuthn.RemoveVirtualAuthenticatorParams, - cdp.types.ts.WebAuthn.RemoveVirtualAuthenticatorResult, - "WebAuthn.removeVirtualAuthenticator" - >; - addCredential: CdpCommandAlias< - cdp.types.ts.WebAuthn.AddCredentialParams, - cdp.types.ts.WebAuthn.AddCredentialResult, - "WebAuthn.addCredential" - >; - getCredential: CdpCommandAlias< - cdp.types.ts.WebAuthn.GetCredentialParams, - cdp.types.ts.WebAuthn.GetCredentialResult, - "WebAuthn.getCredential" - >; - getCredentials: CdpCommandAlias< - cdp.types.ts.WebAuthn.GetCredentialsParams, - cdp.types.ts.WebAuthn.GetCredentialsResult, - "WebAuthn.getCredentials" - >; - removeCredential: CdpCommandAlias< - cdp.types.ts.WebAuthn.RemoveCredentialParams, - cdp.types.ts.WebAuthn.RemoveCredentialResult, - "WebAuthn.removeCredential" - >; - clearCredentials: CdpCommandAlias< - cdp.types.ts.WebAuthn.ClearCredentialsParams, - cdp.types.ts.WebAuthn.ClearCredentialsResult, - "WebAuthn.clearCredentials" - >; - setUserVerified: CdpCommandAlias< - cdp.types.ts.WebAuthn.SetUserVerifiedParams, - cdp.types.ts.WebAuthn.SetUserVerifiedResult, - "WebAuthn.setUserVerified" - >; - setAutomaticPresenceSimulation: CdpCommandAlias< - cdp.types.ts.WebAuthn.SetAutomaticPresenceSimulationParams, - cdp.types.ts.WebAuthn.SetAutomaticPresenceSimulationResult, - "WebAuthn.setAutomaticPresenceSimulation" - >; - setCredentialProperties: CdpCommandAlias< - cdp.types.ts.WebAuthn.SetCredentialPropertiesParams, - cdp.types.ts.WebAuthn.SetCredentialPropertiesResult, - "WebAuthn.setCredentialProperties" - >; + enable: CdpOptionalCommandAlias; + disable: CdpOptionalCommandAlias; + addVirtualAuthenticator: CdpCommandAlias; + setResponseOverrideBits: CdpCommandAlias; + removeVirtualAuthenticator: CdpCommandAlias; + addCredential: CdpCommandAlias; + getCredential: CdpCommandAlias; + getCredentials: CdpCommandAlias; + removeCredential: CdpCommandAlias; + clearCredentials: CdpCommandAlias; + setUserVerified: CdpCommandAlias; + setAutomaticPresenceSimulation: CdpCommandAlias; + setCredentialProperties: CdpCommandAlias; credentialAdded: CdpEventAlias; credentialDeleted: CdpEventAlias; credentialUpdated: CdpEventAlias; credentialAsserted: CdpEventAlias; }; WebMCP: { - enable: CdpOptionalCommandAlias< - cdp.types.ts.WebMCP.EnableParams, - cdp.types.ts.WebMCP.EnableResult, - "WebMCP.enable" - >; - disable: CdpOptionalCommandAlias< - cdp.types.ts.WebMCP.DisableParams, - cdp.types.ts.WebMCP.DisableResult, - "WebMCP.disable" - >; - invokeTool: CdpCommandAlias< - cdp.types.ts.WebMCP.InvokeToolParams, - cdp.types.ts.WebMCP.InvokeToolResult, - "WebMCP.invokeTool" - >; - cancelInvocation: CdpCommandAlias< - cdp.types.ts.WebMCP.CancelInvocationParams, - cdp.types.ts.WebMCP.CancelInvocationResult, - "WebMCP.cancelInvocation" - >; + enable: CdpOptionalCommandAlias; + disable: CdpOptionalCommandAlias; + invokeTool: CdpCommandAlias; + cancelInvocation: CdpCommandAlias; toolsAdded: CdpEventAlias; toolsRemoved: CdpEventAlias; toolInvoked: CdpEventAlias; toolResponded: CdpEventAlias; }; - Magic: { - evaluate(params: cdp.types.ts.Magic.EvaluateParams): Promise; - addCustomCommand( - params: cdp.types.ts.Magic.AddCustomCommandParams, - ): Promise; - addCustomEvent(params: cdp.types.ts.Magic.AddCustomEventParams): Promise; - addMiddleware(params: cdp.types.ts.Magic.AddMiddlewareParams): Promise; - configure(params: cdp.types.ts.Magic.ConfigureParams): Promise; - ping(params?: cdp.types.ts.Magic.PingParams): Promise; + Mod: { + evaluate(params: cdp.types.ts.Mod.EvaluateParams): Promise; + addCustomCommand(params: cdp.types.ts.Mod.AddCustomCommandParams): Promise; + addCustomEvent(params: cdp.types.ts.Mod.AddCustomEventParams): Promise; + addMiddleware(params: cdp.types.ts.Mod.AddMiddlewareParams): Promise; + configure(params: cdp.types.ts.Mod.ConfigureParams): Promise; + ping(params?: cdp.types.ts.Mod.PingParams): Promise; }; }; -function withCdpName( - value: T, - id: Name, - kind: Kind, -): T & CdpNamedValue { +function withCdpName(value: T, id: Name, kind: Kind): T & CdpNamedValue { Object.defineProperties(value, { id: { value: id, enumerable: true, configurable: true }, name: { value: id, configurable: true }, kind: { value: kind, enumerable: true, configurable: true }, }); - if (!("meta" in value)) - Object.defineProperty(value, "meta", { value: () => ({ id, name: id, kind }), configurable: true }); + if (!("meta" in value)) Object.defineProperty(value, "meta", { value: () => ({ id, name: id, kind }), configurable: true }); return value as T & CdpNamedValue; } @@ -3930,7264 +1066,1064 @@ export function createCdpAliases(send: CdpAliasSend, hooks: CdpAliasHooks = {}): RESPONSE: "response", EVENT: "event", Accessibility: { - disable: withCdpName( - async (params?: unknown) => - commands["Accessibility.disable"].result.parse( - await send("Accessibility.disable", commands["Accessibility.disable"].params.parse(params ?? {})), - ), - "Accessibility.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Accessibility.enable"].result.parse( - await send("Accessibility.enable", commands["Accessibility.enable"].params.parse(params ?? {})), - ), - "Accessibility.enable", - "command", - ), - getPartialAXTree: withCdpName( - async (params?: unknown) => - commands["Accessibility.getPartialAXTree"].result.parse( - await send( - "Accessibility.getPartialAXTree", - commands["Accessibility.getPartialAXTree"].params.parse(params ?? {}), - ), - ), - "Accessibility.getPartialAXTree", - "command", - ), - getFullAXTree: withCdpName( - async (params?: unknown) => - commands["Accessibility.getFullAXTree"].result.parse( - await send( - "Accessibility.getFullAXTree", - commands["Accessibility.getFullAXTree"].params.parse(params ?? {}), - ), - ), - "Accessibility.getFullAXTree", - "command", - ), - getRootAXNode: withCdpName( - async (params?: unknown) => - commands["Accessibility.getRootAXNode"].result.parse( - await send( - "Accessibility.getRootAXNode", - commands["Accessibility.getRootAXNode"].params.parse(params ?? {}), - ), - ), - "Accessibility.getRootAXNode", - "command", - ), - getAXNodeAndAncestors: withCdpName( - async (params?: unknown) => - commands["Accessibility.getAXNodeAndAncestors"].result.parse( - await send( - "Accessibility.getAXNodeAndAncestors", - commands["Accessibility.getAXNodeAndAncestors"].params.parse(params ?? {}), - ), - ), - "Accessibility.getAXNodeAndAncestors", - "command", - ), - getChildAXNodes: withCdpName( - async (params?: unknown) => - commands["Accessibility.getChildAXNodes"].result.parse( - await send( - "Accessibility.getChildAXNodes", - commands["Accessibility.getChildAXNodes"].params.parse(params ?? {}), - ), - ), - "Accessibility.getChildAXNodes", - "command", - ), - queryAXTree: withCdpName( - async (params?: unknown) => - commands["Accessibility.queryAXTree"].result.parse( - await send("Accessibility.queryAXTree", commands["Accessibility.queryAXTree"].params.parse(params ?? {})), - ), - "Accessibility.queryAXTree", - "command", - ), - loadComplete: events["Accessibility.loadComplete"] as CdpEventAlias< - cdp.types.ts.Accessibility.LoadCompleteEvent, - "Accessibility.loadComplete" - >, - nodesUpdated: events["Accessibility.nodesUpdated"] as CdpEventAlias< - cdp.types.ts.Accessibility.NodesUpdatedEvent, - "Accessibility.nodesUpdated" - >, + disable: withCdpName(async (params?: unknown) => commands["Accessibility.disable"].result.parse(await send("Accessibility.disable", commands["Accessibility.disable"].params.parse(params ?? {}))), "Accessibility.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Accessibility.enable"].result.parse(await send("Accessibility.enable", commands["Accessibility.enable"].params.parse(params ?? {}))), "Accessibility.enable", "command"), + getPartialAXTree: withCdpName(async (params?: unknown) => commands["Accessibility.getPartialAXTree"].result.parse(await send("Accessibility.getPartialAXTree", commands["Accessibility.getPartialAXTree"].params.parse(params ?? {}))), "Accessibility.getPartialAXTree", "command"), + getFullAXTree: withCdpName(async (params?: unknown) => commands["Accessibility.getFullAXTree"].result.parse(await send("Accessibility.getFullAXTree", commands["Accessibility.getFullAXTree"].params.parse(params ?? {}))), "Accessibility.getFullAXTree", "command"), + getRootAXNode: withCdpName(async (params?: unknown) => commands["Accessibility.getRootAXNode"].result.parse(await send("Accessibility.getRootAXNode", commands["Accessibility.getRootAXNode"].params.parse(params ?? {}))), "Accessibility.getRootAXNode", "command"), + getAXNodeAndAncestors: withCdpName(async (params?: unknown) => commands["Accessibility.getAXNodeAndAncestors"].result.parse(await send("Accessibility.getAXNodeAndAncestors", commands["Accessibility.getAXNodeAndAncestors"].params.parse(params ?? {}))), "Accessibility.getAXNodeAndAncestors", "command"), + getChildAXNodes: withCdpName(async (params?: unknown) => commands["Accessibility.getChildAXNodes"].result.parse(await send("Accessibility.getChildAXNodes", commands["Accessibility.getChildAXNodes"].params.parse(params ?? {}))), "Accessibility.getChildAXNodes", "command"), + queryAXTree: withCdpName(async (params?: unknown) => commands["Accessibility.queryAXTree"].result.parse(await send("Accessibility.queryAXTree", commands["Accessibility.queryAXTree"].params.parse(params ?? {}))), "Accessibility.queryAXTree", "command"), + loadComplete: events["Accessibility.loadComplete"] as CdpEventAlias, + nodesUpdated: events["Accessibility.nodesUpdated"] as CdpEventAlias, }, Animation: { - disable: withCdpName( - async (params?: unknown) => - commands["Animation.disable"].result.parse( - await send("Animation.disable", commands["Animation.disable"].params.parse(params ?? {})), - ), - "Animation.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Animation.enable"].result.parse( - await send("Animation.enable", commands["Animation.enable"].params.parse(params ?? {})), - ), - "Animation.enable", - "command", - ), - getCurrentTime: withCdpName( - async (params?: unknown) => - commands["Animation.getCurrentTime"].result.parse( - await send("Animation.getCurrentTime", commands["Animation.getCurrentTime"].params.parse(params ?? {})), - ), - "Animation.getCurrentTime", - "command", - ), - getPlaybackRate: withCdpName( - async (params?: unknown) => - commands["Animation.getPlaybackRate"].result.parse( - await send("Animation.getPlaybackRate", commands["Animation.getPlaybackRate"].params.parse(params ?? {})), - ), - "Animation.getPlaybackRate", - "command", - ), - releaseAnimations: withCdpName( - async (params?: unknown) => - commands["Animation.releaseAnimations"].result.parse( - await send( - "Animation.releaseAnimations", - commands["Animation.releaseAnimations"].params.parse(params ?? {}), - ), - ), - "Animation.releaseAnimations", - "command", - ), - resolveAnimation: withCdpName( - async (params?: unknown) => - commands["Animation.resolveAnimation"].result.parse( - await send("Animation.resolveAnimation", commands["Animation.resolveAnimation"].params.parse(params ?? {})), - ), - "Animation.resolveAnimation", - "command", - ), - seekAnimations: withCdpName( - async (params?: unknown) => - commands["Animation.seekAnimations"].result.parse( - await send("Animation.seekAnimations", commands["Animation.seekAnimations"].params.parse(params ?? {})), - ), - "Animation.seekAnimations", - "command", - ), - setPaused: withCdpName( - async (params?: unknown) => - commands["Animation.setPaused"].result.parse( - await send("Animation.setPaused", commands["Animation.setPaused"].params.parse(params ?? {})), - ), - "Animation.setPaused", - "command", - ), - setPlaybackRate: withCdpName( - async (params?: unknown) => - commands["Animation.setPlaybackRate"].result.parse( - await send("Animation.setPlaybackRate", commands["Animation.setPlaybackRate"].params.parse(params ?? {})), - ), - "Animation.setPlaybackRate", - "command", - ), - setTiming: withCdpName( - async (params?: unknown) => - commands["Animation.setTiming"].result.parse( - await send("Animation.setTiming", commands["Animation.setTiming"].params.parse(params ?? {})), - ), - "Animation.setTiming", - "command", - ), - animationCanceled: events["Animation.animationCanceled"] as CdpEventAlias< - cdp.types.ts.Animation.AnimationCanceledEvent, - "Animation.animationCanceled" - >, - animationCreated: events["Animation.animationCreated"] as CdpEventAlias< - cdp.types.ts.Animation.AnimationCreatedEvent, - "Animation.animationCreated" - >, - animationStarted: events["Animation.animationStarted"] as CdpEventAlias< - cdp.types.ts.Animation.AnimationStartedEvent, - "Animation.animationStarted" - >, - animationUpdated: events["Animation.animationUpdated"] as CdpEventAlias< - cdp.types.ts.Animation.AnimationUpdatedEvent, - "Animation.animationUpdated" - >, + disable: withCdpName(async (params?: unknown) => commands["Animation.disable"].result.parse(await send("Animation.disable", commands["Animation.disable"].params.parse(params ?? {}))), "Animation.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Animation.enable"].result.parse(await send("Animation.enable", commands["Animation.enable"].params.parse(params ?? {}))), "Animation.enable", "command"), + getCurrentTime: withCdpName(async (params?: unknown) => commands["Animation.getCurrentTime"].result.parse(await send("Animation.getCurrentTime", commands["Animation.getCurrentTime"].params.parse(params ?? {}))), "Animation.getCurrentTime", "command"), + getPlaybackRate: withCdpName(async (params?: unknown) => commands["Animation.getPlaybackRate"].result.parse(await send("Animation.getPlaybackRate", commands["Animation.getPlaybackRate"].params.parse(params ?? {}))), "Animation.getPlaybackRate", "command"), + releaseAnimations: withCdpName(async (params?: unknown) => commands["Animation.releaseAnimations"].result.parse(await send("Animation.releaseAnimations", commands["Animation.releaseAnimations"].params.parse(params ?? {}))), "Animation.releaseAnimations", "command"), + resolveAnimation: withCdpName(async (params?: unknown) => commands["Animation.resolveAnimation"].result.parse(await send("Animation.resolveAnimation", commands["Animation.resolveAnimation"].params.parse(params ?? {}))), "Animation.resolveAnimation", "command"), + seekAnimations: withCdpName(async (params?: unknown) => commands["Animation.seekAnimations"].result.parse(await send("Animation.seekAnimations", commands["Animation.seekAnimations"].params.parse(params ?? {}))), "Animation.seekAnimations", "command"), + setPaused: withCdpName(async (params?: unknown) => commands["Animation.setPaused"].result.parse(await send("Animation.setPaused", commands["Animation.setPaused"].params.parse(params ?? {}))), "Animation.setPaused", "command"), + setPlaybackRate: withCdpName(async (params?: unknown) => commands["Animation.setPlaybackRate"].result.parse(await send("Animation.setPlaybackRate", commands["Animation.setPlaybackRate"].params.parse(params ?? {}))), "Animation.setPlaybackRate", "command"), + setTiming: withCdpName(async (params?: unknown) => commands["Animation.setTiming"].result.parse(await send("Animation.setTiming", commands["Animation.setTiming"].params.parse(params ?? {}))), "Animation.setTiming", "command"), + animationCanceled: events["Animation.animationCanceled"] as CdpEventAlias, + animationCreated: events["Animation.animationCreated"] as CdpEventAlias, + animationStarted: events["Animation.animationStarted"] as CdpEventAlias, + animationUpdated: events["Animation.animationUpdated"] as CdpEventAlias, }, Audits: { - getEncodedResponse: withCdpName( - async (params?: unknown) => - commands["Audits.getEncodedResponse"].result.parse( - await send("Audits.getEncodedResponse", commands["Audits.getEncodedResponse"].params.parse(params ?? {})), - ), - "Audits.getEncodedResponse", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Audits.disable"].result.parse( - await send("Audits.disable", commands["Audits.disable"].params.parse(params ?? {})), - ), - "Audits.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Audits.enable"].result.parse( - await send("Audits.enable", commands["Audits.enable"].params.parse(params ?? {})), - ), - "Audits.enable", - "command", - ), - checkFormsIssues: withCdpName( - async (params?: unknown) => - commands["Audits.checkFormsIssues"].result.parse( - await send("Audits.checkFormsIssues", commands["Audits.checkFormsIssues"].params.parse(params ?? {})), - ), - "Audits.checkFormsIssues", - "command", - ), - issueAdded: events["Audits.issueAdded"] as CdpEventAlias< - cdp.types.ts.Audits.IssueAddedEvent, - "Audits.issueAdded" - >, + getEncodedResponse: withCdpName(async (params?: unknown) => commands["Audits.getEncodedResponse"].result.parse(await send("Audits.getEncodedResponse", commands["Audits.getEncodedResponse"].params.parse(params ?? {}))), "Audits.getEncodedResponse", "command"), + disable: withCdpName(async (params?: unknown) => commands["Audits.disable"].result.parse(await send("Audits.disable", commands["Audits.disable"].params.parse(params ?? {}))), "Audits.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Audits.enable"].result.parse(await send("Audits.enable", commands["Audits.enable"].params.parse(params ?? {}))), "Audits.enable", "command"), + checkFormsIssues: withCdpName(async (params?: unknown) => commands["Audits.checkFormsIssues"].result.parse(await send("Audits.checkFormsIssues", commands["Audits.checkFormsIssues"].params.parse(params ?? {}))), "Audits.checkFormsIssues", "command"), + issueAdded: events["Audits.issueAdded"] as CdpEventAlias, }, Autofill: { - trigger: withCdpName( - async (params?: unknown) => - commands["Autofill.trigger"].result.parse( - await send("Autofill.trigger", commands["Autofill.trigger"].params.parse(params ?? {})), - ), - "Autofill.trigger", - "command", - ), - setAddresses: withCdpName( - async (params?: unknown) => - commands["Autofill.setAddresses"].result.parse( - await send("Autofill.setAddresses", commands["Autofill.setAddresses"].params.parse(params ?? {})), - ), - "Autofill.setAddresses", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Autofill.disable"].result.parse( - await send("Autofill.disable", commands["Autofill.disable"].params.parse(params ?? {})), - ), - "Autofill.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Autofill.enable"].result.parse( - await send("Autofill.enable", commands["Autofill.enable"].params.parse(params ?? {})), - ), - "Autofill.enable", - "command", - ), - addressFormFilled: events["Autofill.addressFormFilled"] as CdpEventAlias< - cdp.types.ts.Autofill.AddressFormFilledEvent, - "Autofill.addressFormFilled" - >, + trigger: withCdpName(async (params?: unknown) => commands["Autofill.trigger"].result.parse(await send("Autofill.trigger", commands["Autofill.trigger"].params.parse(params ?? {}))), "Autofill.trigger", "command"), + setAddresses: withCdpName(async (params?: unknown) => commands["Autofill.setAddresses"].result.parse(await send("Autofill.setAddresses", commands["Autofill.setAddresses"].params.parse(params ?? {}))), "Autofill.setAddresses", "command"), + disable: withCdpName(async (params?: unknown) => commands["Autofill.disable"].result.parse(await send("Autofill.disable", commands["Autofill.disable"].params.parse(params ?? {}))), "Autofill.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Autofill.enable"].result.parse(await send("Autofill.enable", commands["Autofill.enable"].params.parse(params ?? {}))), "Autofill.enable", "command"), + addressFormFilled: events["Autofill.addressFormFilled"] as CdpEventAlias, }, BackgroundService: { - startObserving: withCdpName( - async (params?: unknown) => - commands["BackgroundService.startObserving"].result.parse( - await send( - "BackgroundService.startObserving", - commands["BackgroundService.startObserving"].params.parse(params ?? {}), - ), - ), - "BackgroundService.startObserving", - "command", - ), - stopObserving: withCdpName( - async (params?: unknown) => - commands["BackgroundService.stopObserving"].result.parse( - await send( - "BackgroundService.stopObserving", - commands["BackgroundService.stopObserving"].params.parse(params ?? {}), - ), - ), - "BackgroundService.stopObserving", - "command", - ), - setRecording: withCdpName( - async (params?: unknown) => - commands["BackgroundService.setRecording"].result.parse( - await send( - "BackgroundService.setRecording", - commands["BackgroundService.setRecording"].params.parse(params ?? {}), - ), - ), - "BackgroundService.setRecording", - "command", - ), - clearEvents: withCdpName( - async (params?: unknown) => - commands["BackgroundService.clearEvents"].result.parse( - await send( - "BackgroundService.clearEvents", - commands["BackgroundService.clearEvents"].params.parse(params ?? {}), - ), - ), - "BackgroundService.clearEvents", - "command", - ), - recordingStateChanged: events["BackgroundService.recordingStateChanged"] as CdpEventAlias< - cdp.types.ts.BackgroundService.RecordingStateChangedEvent, - "BackgroundService.recordingStateChanged" - >, - backgroundServiceEventReceived: events["BackgroundService.backgroundServiceEventReceived"] as CdpEventAlias< - cdp.types.ts.BackgroundService.BackgroundServiceEventReceivedEvent, - "BackgroundService.backgroundServiceEventReceived" - >, + startObserving: withCdpName(async (params?: unknown) => commands["BackgroundService.startObserving"].result.parse(await send("BackgroundService.startObserving", commands["BackgroundService.startObserving"].params.parse(params ?? {}))), "BackgroundService.startObserving", "command"), + stopObserving: withCdpName(async (params?: unknown) => commands["BackgroundService.stopObserving"].result.parse(await send("BackgroundService.stopObserving", commands["BackgroundService.stopObserving"].params.parse(params ?? {}))), "BackgroundService.stopObserving", "command"), + setRecording: withCdpName(async (params?: unknown) => commands["BackgroundService.setRecording"].result.parse(await send("BackgroundService.setRecording", commands["BackgroundService.setRecording"].params.parse(params ?? {}))), "BackgroundService.setRecording", "command"), + clearEvents: withCdpName(async (params?: unknown) => commands["BackgroundService.clearEvents"].result.parse(await send("BackgroundService.clearEvents", commands["BackgroundService.clearEvents"].params.parse(params ?? {}))), "BackgroundService.clearEvents", "command"), + recordingStateChanged: events["BackgroundService.recordingStateChanged"] as CdpEventAlias, + backgroundServiceEventReceived: events["BackgroundService.backgroundServiceEventReceived"] as CdpEventAlias, }, BluetoothEmulation: { - enable: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.enable"].result.parse( - await send("BluetoothEmulation.enable", commands["BluetoothEmulation.enable"].params.parse(params ?? {})), - ), - "BluetoothEmulation.enable", - "command", - ), - setSimulatedCentralState: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.setSimulatedCentralState"].result.parse( - await send( - "BluetoothEmulation.setSimulatedCentralState", - commands["BluetoothEmulation.setSimulatedCentralState"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.setSimulatedCentralState", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.disable"].result.parse( - await send("BluetoothEmulation.disable", commands["BluetoothEmulation.disable"].params.parse(params ?? {})), - ), - "BluetoothEmulation.disable", - "command", - ), - simulatePreconnectedPeripheral: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.simulatePreconnectedPeripheral"].result.parse( - await send( - "BluetoothEmulation.simulatePreconnectedPeripheral", - commands["BluetoothEmulation.simulatePreconnectedPeripheral"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.simulatePreconnectedPeripheral", - "command", - ), - simulateAdvertisement: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.simulateAdvertisement"].result.parse( - await send( - "BluetoothEmulation.simulateAdvertisement", - commands["BluetoothEmulation.simulateAdvertisement"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.simulateAdvertisement", - "command", - ), - simulateGATTOperationResponse: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.simulateGATTOperationResponse"].result.parse( - await send( - "BluetoothEmulation.simulateGATTOperationResponse", - commands["BluetoothEmulation.simulateGATTOperationResponse"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.simulateGATTOperationResponse", - "command", - ), - simulateCharacteristicOperationResponse: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.simulateCharacteristicOperationResponse"].result.parse( - await send( - "BluetoothEmulation.simulateCharacteristicOperationResponse", - commands["BluetoothEmulation.simulateCharacteristicOperationResponse"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.simulateCharacteristicOperationResponse", - "command", - ), - simulateDescriptorOperationResponse: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.simulateDescriptorOperationResponse"].result.parse( - await send( - "BluetoothEmulation.simulateDescriptorOperationResponse", - commands["BluetoothEmulation.simulateDescriptorOperationResponse"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.simulateDescriptorOperationResponse", - "command", - ), - addService: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.addService"].result.parse( - await send( - "BluetoothEmulation.addService", - commands["BluetoothEmulation.addService"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.addService", - "command", - ), - removeService: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.removeService"].result.parse( - await send( - "BluetoothEmulation.removeService", - commands["BluetoothEmulation.removeService"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.removeService", - "command", - ), - addCharacteristic: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.addCharacteristic"].result.parse( - await send( - "BluetoothEmulation.addCharacteristic", - commands["BluetoothEmulation.addCharacteristic"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.addCharacteristic", - "command", - ), - removeCharacteristic: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.removeCharacteristic"].result.parse( - await send( - "BluetoothEmulation.removeCharacteristic", - commands["BluetoothEmulation.removeCharacteristic"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.removeCharacteristic", - "command", - ), - addDescriptor: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.addDescriptor"].result.parse( - await send( - "BluetoothEmulation.addDescriptor", - commands["BluetoothEmulation.addDescriptor"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.addDescriptor", - "command", - ), - removeDescriptor: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.removeDescriptor"].result.parse( - await send( - "BluetoothEmulation.removeDescriptor", - commands["BluetoothEmulation.removeDescriptor"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.removeDescriptor", - "command", - ), - simulateGATTDisconnection: withCdpName( - async (params?: unknown) => - commands["BluetoothEmulation.simulateGATTDisconnection"].result.parse( - await send( - "BluetoothEmulation.simulateGATTDisconnection", - commands["BluetoothEmulation.simulateGATTDisconnection"].params.parse(params ?? {}), - ), - ), - "BluetoothEmulation.simulateGATTDisconnection", - "command", - ), - gattOperationReceived: events["BluetoothEmulation.gattOperationReceived"] as CdpEventAlias< - cdp.types.ts.BluetoothEmulation.GattOperationReceivedEvent, - "BluetoothEmulation.gattOperationReceived" - >, - characteristicOperationReceived: events["BluetoothEmulation.characteristicOperationReceived"] as CdpEventAlias< - cdp.types.ts.BluetoothEmulation.CharacteristicOperationReceivedEvent, - "BluetoothEmulation.characteristicOperationReceived" - >, - descriptorOperationReceived: events["BluetoothEmulation.descriptorOperationReceived"] as CdpEventAlias< - cdp.types.ts.BluetoothEmulation.DescriptorOperationReceivedEvent, - "BluetoothEmulation.descriptorOperationReceived" - >, + enable: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.enable"].result.parse(await send("BluetoothEmulation.enable", commands["BluetoothEmulation.enable"].params.parse(params ?? {}))), "BluetoothEmulation.enable", "command"), + setSimulatedCentralState: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.setSimulatedCentralState"].result.parse(await send("BluetoothEmulation.setSimulatedCentralState", commands["BluetoothEmulation.setSimulatedCentralState"].params.parse(params ?? {}))), "BluetoothEmulation.setSimulatedCentralState", "command"), + disable: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.disable"].result.parse(await send("BluetoothEmulation.disable", commands["BluetoothEmulation.disable"].params.parse(params ?? {}))), "BluetoothEmulation.disable", "command"), + simulatePreconnectedPeripheral: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.simulatePreconnectedPeripheral"].result.parse(await send("BluetoothEmulation.simulatePreconnectedPeripheral", commands["BluetoothEmulation.simulatePreconnectedPeripheral"].params.parse(params ?? {}))), "BluetoothEmulation.simulatePreconnectedPeripheral", "command"), + simulateAdvertisement: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.simulateAdvertisement"].result.parse(await send("BluetoothEmulation.simulateAdvertisement", commands["BluetoothEmulation.simulateAdvertisement"].params.parse(params ?? {}))), "BluetoothEmulation.simulateAdvertisement", "command"), + simulateGATTOperationResponse: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.simulateGATTOperationResponse"].result.parse(await send("BluetoothEmulation.simulateGATTOperationResponse", commands["BluetoothEmulation.simulateGATTOperationResponse"].params.parse(params ?? {}))), "BluetoothEmulation.simulateGATTOperationResponse", "command"), + simulateCharacteristicOperationResponse: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.simulateCharacteristicOperationResponse"].result.parse(await send("BluetoothEmulation.simulateCharacteristicOperationResponse", commands["BluetoothEmulation.simulateCharacteristicOperationResponse"].params.parse(params ?? {}))), "BluetoothEmulation.simulateCharacteristicOperationResponse", "command"), + simulateDescriptorOperationResponse: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.simulateDescriptorOperationResponse"].result.parse(await send("BluetoothEmulation.simulateDescriptorOperationResponse", commands["BluetoothEmulation.simulateDescriptorOperationResponse"].params.parse(params ?? {}))), "BluetoothEmulation.simulateDescriptorOperationResponse", "command"), + addService: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.addService"].result.parse(await send("BluetoothEmulation.addService", commands["BluetoothEmulation.addService"].params.parse(params ?? {}))), "BluetoothEmulation.addService", "command"), + removeService: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.removeService"].result.parse(await send("BluetoothEmulation.removeService", commands["BluetoothEmulation.removeService"].params.parse(params ?? {}))), "BluetoothEmulation.removeService", "command"), + addCharacteristic: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.addCharacteristic"].result.parse(await send("BluetoothEmulation.addCharacteristic", commands["BluetoothEmulation.addCharacteristic"].params.parse(params ?? {}))), "BluetoothEmulation.addCharacteristic", "command"), + removeCharacteristic: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.removeCharacteristic"].result.parse(await send("BluetoothEmulation.removeCharacteristic", commands["BluetoothEmulation.removeCharacteristic"].params.parse(params ?? {}))), "BluetoothEmulation.removeCharacteristic", "command"), + addDescriptor: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.addDescriptor"].result.parse(await send("BluetoothEmulation.addDescriptor", commands["BluetoothEmulation.addDescriptor"].params.parse(params ?? {}))), "BluetoothEmulation.addDescriptor", "command"), + removeDescriptor: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.removeDescriptor"].result.parse(await send("BluetoothEmulation.removeDescriptor", commands["BluetoothEmulation.removeDescriptor"].params.parse(params ?? {}))), "BluetoothEmulation.removeDescriptor", "command"), + simulateGATTDisconnection: withCdpName(async (params?: unknown) => commands["BluetoothEmulation.simulateGATTDisconnection"].result.parse(await send("BluetoothEmulation.simulateGATTDisconnection", commands["BluetoothEmulation.simulateGATTDisconnection"].params.parse(params ?? {}))), "BluetoothEmulation.simulateGATTDisconnection", "command"), + gattOperationReceived: events["BluetoothEmulation.gattOperationReceived"] as CdpEventAlias, + characteristicOperationReceived: events["BluetoothEmulation.characteristicOperationReceived"] as CdpEventAlias, + descriptorOperationReceived: events["BluetoothEmulation.descriptorOperationReceived"] as CdpEventAlias, }, Browser: { - setPermission: withCdpName( - async (params?: unknown) => - commands["Browser.setPermission"].result.parse( - await send("Browser.setPermission", commands["Browser.setPermission"].params.parse(params ?? {})), - ), - "Browser.setPermission", - "command", - ), - grantPermissions: withCdpName( - async (params?: unknown) => - commands["Browser.grantPermissions"].result.parse( - await send("Browser.grantPermissions", commands["Browser.grantPermissions"].params.parse(params ?? {})), - ), - "Browser.grantPermissions", - "command", - ), - resetPermissions: withCdpName( - async (params?: unknown) => - commands["Browser.resetPermissions"].result.parse( - await send("Browser.resetPermissions", commands["Browser.resetPermissions"].params.parse(params ?? {})), - ), - "Browser.resetPermissions", - "command", - ), - setDownloadBehavior: withCdpName( - async (params?: unknown) => - commands["Browser.setDownloadBehavior"].result.parse( - await send( - "Browser.setDownloadBehavior", - commands["Browser.setDownloadBehavior"].params.parse(params ?? {}), - ), - ), - "Browser.setDownloadBehavior", - "command", - ), - cancelDownload: withCdpName( - async (params?: unknown) => - commands["Browser.cancelDownload"].result.parse( - await send("Browser.cancelDownload", commands["Browser.cancelDownload"].params.parse(params ?? {})), - ), - "Browser.cancelDownload", - "command", - ), - close: withCdpName( - async (params?: unknown) => - commands["Browser.close"].result.parse( - await send("Browser.close", commands["Browser.close"].params.parse(params ?? {})), - ), - "Browser.close", - "command", - ), - crash: withCdpName( - async (params?: unknown) => - commands["Browser.crash"].result.parse( - await send("Browser.crash", commands["Browser.crash"].params.parse(params ?? {})), - ), - "Browser.crash", - "command", - ), - crashGpuProcess: withCdpName( - async (params?: unknown) => - commands["Browser.crashGpuProcess"].result.parse( - await send("Browser.crashGpuProcess", commands["Browser.crashGpuProcess"].params.parse(params ?? {})), - ), - "Browser.crashGpuProcess", - "command", - ), - getVersion: withCdpName( - async (params?: unknown) => - commands["Browser.getVersion"].result.parse( - await send("Browser.getVersion", commands["Browser.getVersion"].params.parse(params ?? {})), - ), - "Browser.getVersion", - "command", - ), - getBrowserCommandLine: withCdpName( - async (params?: unknown) => - commands["Browser.getBrowserCommandLine"].result.parse( - await send( - "Browser.getBrowserCommandLine", - commands["Browser.getBrowserCommandLine"].params.parse(params ?? {}), - ), - ), - "Browser.getBrowserCommandLine", - "command", - ), - getHistograms: withCdpName( - async (params?: unknown) => - commands["Browser.getHistograms"].result.parse( - await send("Browser.getHistograms", commands["Browser.getHistograms"].params.parse(params ?? {})), - ), - "Browser.getHistograms", - "command", - ), - getHistogram: withCdpName( - async (params?: unknown) => - commands["Browser.getHistogram"].result.parse( - await send("Browser.getHistogram", commands["Browser.getHistogram"].params.parse(params ?? {})), - ), - "Browser.getHistogram", - "command", - ), - getWindowBounds: withCdpName( - async (params?: unknown) => - commands["Browser.getWindowBounds"].result.parse( - await send("Browser.getWindowBounds", commands["Browser.getWindowBounds"].params.parse(params ?? {})), - ), - "Browser.getWindowBounds", - "command", - ), - getWindowForTarget: withCdpName( - async (params?: unknown) => - commands["Browser.getWindowForTarget"].result.parse( - await send("Browser.getWindowForTarget", commands["Browser.getWindowForTarget"].params.parse(params ?? {})), - ), - "Browser.getWindowForTarget", - "command", - ), - setWindowBounds: withCdpName( - async (params?: unknown) => - commands["Browser.setWindowBounds"].result.parse( - await send("Browser.setWindowBounds", commands["Browser.setWindowBounds"].params.parse(params ?? {})), - ), - "Browser.setWindowBounds", - "command", - ), - setContentsSize: withCdpName( - async (params?: unknown) => - commands["Browser.setContentsSize"].result.parse( - await send("Browser.setContentsSize", commands["Browser.setContentsSize"].params.parse(params ?? {})), - ), - "Browser.setContentsSize", - "command", - ), - setDockTile: withCdpName( - async (params?: unknown) => - commands["Browser.setDockTile"].result.parse( - await send("Browser.setDockTile", commands["Browser.setDockTile"].params.parse(params ?? {})), - ), - "Browser.setDockTile", - "command", - ), - executeBrowserCommand: withCdpName( - async (params?: unknown) => - commands["Browser.executeBrowserCommand"].result.parse( - await send( - "Browser.executeBrowserCommand", - commands["Browser.executeBrowserCommand"].params.parse(params ?? {}), - ), - ), - "Browser.executeBrowserCommand", - "command", - ), - addPrivacySandboxEnrollmentOverride: withCdpName( - async (params?: unknown) => - commands["Browser.addPrivacySandboxEnrollmentOverride"].result.parse( - await send( - "Browser.addPrivacySandboxEnrollmentOverride", - commands["Browser.addPrivacySandboxEnrollmentOverride"].params.parse(params ?? {}), - ), - ), - "Browser.addPrivacySandboxEnrollmentOverride", - "command", - ), - addPrivacySandboxCoordinatorKeyConfig: withCdpName( - async (params?: unknown) => - commands["Browser.addPrivacySandboxCoordinatorKeyConfig"].result.parse( - await send( - "Browser.addPrivacySandboxCoordinatorKeyConfig", - commands["Browser.addPrivacySandboxCoordinatorKeyConfig"].params.parse(params ?? {}), - ), - ), - "Browser.addPrivacySandboxCoordinatorKeyConfig", - "command", - ), - downloadWillBegin: events["Browser.downloadWillBegin"] as CdpEventAlias< - cdp.types.ts.Browser.DownloadWillBeginEvent, - "Browser.downloadWillBegin" - >, - downloadProgress: events["Browser.downloadProgress"] as CdpEventAlias< - cdp.types.ts.Browser.DownloadProgressEvent, - "Browser.downloadProgress" - >, + setPermission: withCdpName(async (params?: unknown) => commands["Browser.setPermission"].result.parse(await send("Browser.setPermission", commands["Browser.setPermission"].params.parse(params ?? {}))), "Browser.setPermission", "command"), + grantPermissions: withCdpName(async (params?: unknown) => commands["Browser.grantPermissions"].result.parse(await send("Browser.grantPermissions", commands["Browser.grantPermissions"].params.parse(params ?? {}))), "Browser.grantPermissions", "command"), + resetPermissions: withCdpName(async (params?: unknown) => commands["Browser.resetPermissions"].result.parse(await send("Browser.resetPermissions", commands["Browser.resetPermissions"].params.parse(params ?? {}))), "Browser.resetPermissions", "command"), + setDownloadBehavior: withCdpName(async (params?: unknown) => commands["Browser.setDownloadBehavior"].result.parse(await send("Browser.setDownloadBehavior", commands["Browser.setDownloadBehavior"].params.parse(params ?? {}))), "Browser.setDownloadBehavior", "command"), + cancelDownload: withCdpName(async (params?: unknown) => commands["Browser.cancelDownload"].result.parse(await send("Browser.cancelDownload", commands["Browser.cancelDownload"].params.parse(params ?? {}))), "Browser.cancelDownload", "command"), + close: withCdpName(async (params?: unknown) => commands["Browser.close"].result.parse(await send("Browser.close", commands["Browser.close"].params.parse(params ?? {}))), "Browser.close", "command"), + crash: withCdpName(async (params?: unknown) => commands["Browser.crash"].result.parse(await send("Browser.crash", commands["Browser.crash"].params.parse(params ?? {}))), "Browser.crash", "command"), + crashGpuProcess: withCdpName(async (params?: unknown) => commands["Browser.crashGpuProcess"].result.parse(await send("Browser.crashGpuProcess", commands["Browser.crashGpuProcess"].params.parse(params ?? {}))), "Browser.crashGpuProcess", "command"), + getVersion: withCdpName(async (params?: unknown) => commands["Browser.getVersion"].result.parse(await send("Browser.getVersion", commands["Browser.getVersion"].params.parse(params ?? {}))), "Browser.getVersion", "command"), + getBrowserCommandLine: withCdpName(async (params?: unknown) => commands["Browser.getBrowserCommandLine"].result.parse(await send("Browser.getBrowserCommandLine", commands["Browser.getBrowserCommandLine"].params.parse(params ?? {}))), "Browser.getBrowserCommandLine", "command"), + getHistograms: withCdpName(async (params?: unknown) => commands["Browser.getHistograms"].result.parse(await send("Browser.getHistograms", commands["Browser.getHistograms"].params.parse(params ?? {}))), "Browser.getHistograms", "command"), + getHistogram: withCdpName(async (params?: unknown) => commands["Browser.getHistogram"].result.parse(await send("Browser.getHistogram", commands["Browser.getHistogram"].params.parse(params ?? {}))), "Browser.getHistogram", "command"), + getWindowBounds: withCdpName(async (params?: unknown) => commands["Browser.getWindowBounds"].result.parse(await send("Browser.getWindowBounds", commands["Browser.getWindowBounds"].params.parse(params ?? {}))), "Browser.getWindowBounds", "command"), + getWindowForTarget: withCdpName(async (params?: unknown) => commands["Browser.getWindowForTarget"].result.parse(await send("Browser.getWindowForTarget", commands["Browser.getWindowForTarget"].params.parse(params ?? {}))), "Browser.getWindowForTarget", "command"), + setWindowBounds: withCdpName(async (params?: unknown) => commands["Browser.setWindowBounds"].result.parse(await send("Browser.setWindowBounds", commands["Browser.setWindowBounds"].params.parse(params ?? {}))), "Browser.setWindowBounds", "command"), + setContentsSize: withCdpName(async (params?: unknown) => commands["Browser.setContentsSize"].result.parse(await send("Browser.setContentsSize", commands["Browser.setContentsSize"].params.parse(params ?? {}))), "Browser.setContentsSize", "command"), + setDockTile: withCdpName(async (params?: unknown) => commands["Browser.setDockTile"].result.parse(await send("Browser.setDockTile", commands["Browser.setDockTile"].params.parse(params ?? {}))), "Browser.setDockTile", "command"), + executeBrowserCommand: withCdpName(async (params?: unknown) => commands["Browser.executeBrowserCommand"].result.parse(await send("Browser.executeBrowserCommand", commands["Browser.executeBrowserCommand"].params.parse(params ?? {}))), "Browser.executeBrowserCommand", "command"), + addPrivacySandboxEnrollmentOverride: withCdpName(async (params?: unknown) => commands["Browser.addPrivacySandboxEnrollmentOverride"].result.parse(await send("Browser.addPrivacySandboxEnrollmentOverride", commands["Browser.addPrivacySandboxEnrollmentOverride"].params.parse(params ?? {}))), "Browser.addPrivacySandboxEnrollmentOverride", "command"), + addPrivacySandboxCoordinatorKeyConfig: withCdpName(async (params?: unknown) => commands["Browser.addPrivacySandboxCoordinatorKeyConfig"].result.parse(await send("Browser.addPrivacySandboxCoordinatorKeyConfig", commands["Browser.addPrivacySandboxCoordinatorKeyConfig"].params.parse(params ?? {}))), "Browser.addPrivacySandboxCoordinatorKeyConfig", "command"), + downloadWillBegin: events["Browser.downloadWillBegin"] as CdpEventAlias, + downloadProgress: events["Browser.downloadProgress"] as CdpEventAlias, }, CacheStorage: { - deleteCache: withCdpName( - async (params?: unknown) => - commands["CacheStorage.deleteCache"].result.parse( - await send("CacheStorage.deleteCache", commands["CacheStorage.deleteCache"].params.parse(params ?? {})), - ), - "CacheStorage.deleteCache", - "command", - ), - deleteEntry: withCdpName( - async (params?: unknown) => - commands["CacheStorage.deleteEntry"].result.parse( - await send("CacheStorage.deleteEntry", commands["CacheStorage.deleteEntry"].params.parse(params ?? {})), - ), - "CacheStorage.deleteEntry", - "command", - ), - requestCacheNames: withCdpName( - async (params?: unknown) => - commands["CacheStorage.requestCacheNames"].result.parse( - await send( - "CacheStorage.requestCacheNames", - commands["CacheStorage.requestCacheNames"].params.parse(params ?? {}), - ), - ), - "CacheStorage.requestCacheNames", - "command", - ), - requestCachedResponse: withCdpName( - async (params?: unknown) => - commands["CacheStorage.requestCachedResponse"].result.parse( - await send( - "CacheStorage.requestCachedResponse", - commands["CacheStorage.requestCachedResponse"].params.parse(params ?? {}), - ), - ), - "CacheStorage.requestCachedResponse", - "command", - ), - requestEntries: withCdpName( - async (params?: unknown) => - commands["CacheStorage.requestEntries"].result.parse( - await send( - "CacheStorage.requestEntries", - commands["CacheStorage.requestEntries"].params.parse(params ?? {}), - ), - ), - "CacheStorage.requestEntries", - "command", - ), + deleteCache: withCdpName(async (params?: unknown) => commands["CacheStorage.deleteCache"].result.parse(await send("CacheStorage.deleteCache", commands["CacheStorage.deleteCache"].params.parse(params ?? {}))), "CacheStorage.deleteCache", "command"), + deleteEntry: withCdpName(async (params?: unknown) => commands["CacheStorage.deleteEntry"].result.parse(await send("CacheStorage.deleteEntry", commands["CacheStorage.deleteEntry"].params.parse(params ?? {}))), "CacheStorage.deleteEntry", "command"), + requestCacheNames: withCdpName(async (params?: unknown) => commands["CacheStorage.requestCacheNames"].result.parse(await send("CacheStorage.requestCacheNames", commands["CacheStorage.requestCacheNames"].params.parse(params ?? {}))), "CacheStorage.requestCacheNames", "command"), + requestCachedResponse: withCdpName(async (params?: unknown) => commands["CacheStorage.requestCachedResponse"].result.parse(await send("CacheStorage.requestCachedResponse", commands["CacheStorage.requestCachedResponse"].params.parse(params ?? {}))), "CacheStorage.requestCachedResponse", "command"), + requestEntries: withCdpName(async (params?: unknown) => commands["CacheStorage.requestEntries"].result.parse(await send("CacheStorage.requestEntries", commands["CacheStorage.requestEntries"].params.parse(params ?? {}))), "CacheStorage.requestEntries", "command"), }, Cast: { - enable: withCdpName( - async (params?: unknown) => - commands["Cast.enable"].result.parse( - await send("Cast.enable", commands["Cast.enable"].params.parse(params ?? {})), - ), - "Cast.enable", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Cast.disable"].result.parse( - await send("Cast.disable", commands["Cast.disable"].params.parse(params ?? {})), - ), - "Cast.disable", - "command", - ), - setSinkToUse: withCdpName( - async (params?: unknown) => - commands["Cast.setSinkToUse"].result.parse( - await send("Cast.setSinkToUse", commands["Cast.setSinkToUse"].params.parse(params ?? {})), - ), - "Cast.setSinkToUse", - "command", - ), - startDesktopMirroring: withCdpName( - async (params?: unknown) => - commands["Cast.startDesktopMirroring"].result.parse( - await send("Cast.startDesktopMirroring", commands["Cast.startDesktopMirroring"].params.parse(params ?? {})), - ), - "Cast.startDesktopMirroring", - "command", - ), - startTabMirroring: withCdpName( - async (params?: unknown) => - commands["Cast.startTabMirroring"].result.parse( - await send("Cast.startTabMirroring", commands["Cast.startTabMirroring"].params.parse(params ?? {})), - ), - "Cast.startTabMirroring", - "command", - ), - stopCasting: withCdpName( - async (params?: unknown) => - commands["Cast.stopCasting"].result.parse( - await send("Cast.stopCasting", commands["Cast.stopCasting"].params.parse(params ?? {})), - ), - "Cast.stopCasting", - "command", - ), - sinksUpdated: events["Cast.sinksUpdated"] as CdpEventAlias< - cdp.types.ts.Cast.SinksUpdatedEvent, - "Cast.sinksUpdated" - >, - issueUpdated: events["Cast.issueUpdated"] as CdpEventAlias< - cdp.types.ts.Cast.IssueUpdatedEvent, - "Cast.issueUpdated" - >, + enable: withCdpName(async (params?: unknown) => commands["Cast.enable"].result.parse(await send("Cast.enable", commands["Cast.enable"].params.parse(params ?? {}))), "Cast.enable", "command"), + disable: withCdpName(async (params?: unknown) => commands["Cast.disable"].result.parse(await send("Cast.disable", commands["Cast.disable"].params.parse(params ?? {}))), "Cast.disable", "command"), + setSinkToUse: withCdpName(async (params?: unknown) => commands["Cast.setSinkToUse"].result.parse(await send("Cast.setSinkToUse", commands["Cast.setSinkToUse"].params.parse(params ?? {}))), "Cast.setSinkToUse", "command"), + startDesktopMirroring: withCdpName(async (params?: unknown) => commands["Cast.startDesktopMirroring"].result.parse(await send("Cast.startDesktopMirroring", commands["Cast.startDesktopMirroring"].params.parse(params ?? {}))), "Cast.startDesktopMirroring", "command"), + startTabMirroring: withCdpName(async (params?: unknown) => commands["Cast.startTabMirroring"].result.parse(await send("Cast.startTabMirroring", commands["Cast.startTabMirroring"].params.parse(params ?? {}))), "Cast.startTabMirroring", "command"), + stopCasting: withCdpName(async (params?: unknown) => commands["Cast.stopCasting"].result.parse(await send("Cast.stopCasting", commands["Cast.stopCasting"].params.parse(params ?? {}))), "Cast.stopCasting", "command"), + sinksUpdated: events["Cast.sinksUpdated"] as CdpEventAlias, + issueUpdated: events["Cast.issueUpdated"] as CdpEventAlias, }, Console: { - clearMessages: withCdpName( - async (params?: unknown) => - commands["Console.clearMessages"].result.parse( - await send("Console.clearMessages", commands["Console.clearMessages"].params.parse(params ?? {})), - ), - "Console.clearMessages", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Console.disable"].result.parse( - await send("Console.disable", commands["Console.disable"].params.parse(params ?? {})), - ), - "Console.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Console.enable"].result.parse( - await send("Console.enable", commands["Console.enable"].params.parse(params ?? {})), - ), - "Console.enable", - "command", - ), - messageAdded: events["Console.messageAdded"] as CdpEventAlias< - cdp.types.ts.Console.MessageAddedEvent, - "Console.messageAdded" - >, + clearMessages: withCdpName(async (params?: unknown) => commands["Console.clearMessages"].result.parse(await send("Console.clearMessages", commands["Console.clearMessages"].params.parse(params ?? {}))), "Console.clearMessages", "command"), + disable: withCdpName(async (params?: unknown) => commands["Console.disable"].result.parse(await send("Console.disable", commands["Console.disable"].params.parse(params ?? {}))), "Console.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Console.enable"].result.parse(await send("Console.enable", commands["Console.enable"].params.parse(params ?? {}))), "Console.enable", "command"), + messageAdded: events["Console.messageAdded"] as CdpEventAlias, }, CrashReportContext: { - getEntries: withCdpName( - async (params?: unknown) => - commands["CrashReportContext.getEntries"].result.parse( - await send( - "CrashReportContext.getEntries", - commands["CrashReportContext.getEntries"].params.parse(params ?? {}), - ), - ), - "CrashReportContext.getEntries", - "command", - ), + getEntries: withCdpName(async (params?: unknown) => commands["CrashReportContext.getEntries"].result.parse(await send("CrashReportContext.getEntries", commands["CrashReportContext.getEntries"].params.parse(params ?? {}))), "CrashReportContext.getEntries", "command"), }, CSS: { - addRule: withCdpName( - async (params?: unknown) => - commands["CSS.addRule"].result.parse( - await send("CSS.addRule", commands["CSS.addRule"].params.parse(params ?? {})), - ), - "CSS.addRule", - "command", - ), - collectClassNames: withCdpName( - async (params?: unknown) => - commands["CSS.collectClassNames"].result.parse( - await send("CSS.collectClassNames", commands["CSS.collectClassNames"].params.parse(params ?? {})), - ), - "CSS.collectClassNames", - "command", - ), - createStyleSheet: withCdpName( - async (params?: unknown) => - commands["CSS.createStyleSheet"].result.parse( - await send("CSS.createStyleSheet", commands["CSS.createStyleSheet"].params.parse(params ?? {})), - ), - "CSS.createStyleSheet", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["CSS.disable"].result.parse( - await send("CSS.disable", commands["CSS.disable"].params.parse(params ?? {})), - ), - "CSS.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["CSS.enable"].result.parse( - await send("CSS.enable", commands["CSS.enable"].params.parse(params ?? {})), - ), - "CSS.enable", - "command", - ), - forcePseudoState: withCdpName( - async (params?: unknown) => - commands["CSS.forcePseudoState"].result.parse( - await send("CSS.forcePseudoState", commands["CSS.forcePseudoState"].params.parse(params ?? {})), - ), - "CSS.forcePseudoState", - "command", - ), - forceStartingStyle: withCdpName( - async (params?: unknown) => - commands["CSS.forceStartingStyle"].result.parse( - await send("CSS.forceStartingStyle", commands["CSS.forceStartingStyle"].params.parse(params ?? {})), - ), - "CSS.forceStartingStyle", - "command", - ), - getBackgroundColors: withCdpName( - async (params?: unknown) => - commands["CSS.getBackgroundColors"].result.parse( - await send("CSS.getBackgroundColors", commands["CSS.getBackgroundColors"].params.parse(params ?? {})), - ), - "CSS.getBackgroundColors", - "command", - ), - getComputedStyleForNode: withCdpName( - async (params?: unknown) => - commands["CSS.getComputedStyleForNode"].result.parse( - await send( - "CSS.getComputedStyleForNode", - commands["CSS.getComputedStyleForNode"].params.parse(params ?? {}), - ), - ), - "CSS.getComputedStyleForNode", - "command", - ), - resolveValues: withCdpName( - async (params?: unknown) => - commands["CSS.resolveValues"].result.parse( - await send("CSS.resolveValues", commands["CSS.resolveValues"].params.parse(params ?? {})), - ), - "CSS.resolveValues", - "command", - ), - getLonghandProperties: withCdpName( - async (params?: unknown) => - commands["CSS.getLonghandProperties"].result.parse( - await send("CSS.getLonghandProperties", commands["CSS.getLonghandProperties"].params.parse(params ?? {})), - ), - "CSS.getLonghandProperties", - "command", - ), - getInlineStylesForNode: withCdpName( - async (params?: unknown) => - commands["CSS.getInlineStylesForNode"].result.parse( - await send("CSS.getInlineStylesForNode", commands["CSS.getInlineStylesForNode"].params.parse(params ?? {})), - ), - "CSS.getInlineStylesForNode", - "command", - ), - getAnimatedStylesForNode: withCdpName( - async (params?: unknown) => - commands["CSS.getAnimatedStylesForNode"].result.parse( - await send( - "CSS.getAnimatedStylesForNode", - commands["CSS.getAnimatedStylesForNode"].params.parse(params ?? {}), - ), - ), - "CSS.getAnimatedStylesForNode", - "command", - ), - getMatchedStylesForNode: withCdpName( - async (params?: unknown) => - commands["CSS.getMatchedStylesForNode"].result.parse( - await send( - "CSS.getMatchedStylesForNode", - commands["CSS.getMatchedStylesForNode"].params.parse(params ?? {}), - ), - ), - "CSS.getMatchedStylesForNode", - "command", - ), - getEnvironmentVariables: withCdpName( - async (params?: unknown) => - commands["CSS.getEnvironmentVariables"].result.parse( - await send( - "CSS.getEnvironmentVariables", - commands["CSS.getEnvironmentVariables"].params.parse(params ?? {}), - ), - ), - "CSS.getEnvironmentVariables", - "command", - ), - getMediaQueries: withCdpName( - async (params?: unknown) => - commands["CSS.getMediaQueries"].result.parse( - await send("CSS.getMediaQueries", commands["CSS.getMediaQueries"].params.parse(params ?? {})), - ), - "CSS.getMediaQueries", - "command", - ), - getPlatformFontsForNode: withCdpName( - async (params?: unknown) => - commands["CSS.getPlatformFontsForNode"].result.parse( - await send( - "CSS.getPlatformFontsForNode", - commands["CSS.getPlatformFontsForNode"].params.parse(params ?? {}), - ), - ), - "CSS.getPlatformFontsForNode", - "command", - ), - getStyleSheetText: withCdpName( - async (params?: unknown) => - commands["CSS.getStyleSheetText"].result.parse( - await send("CSS.getStyleSheetText", commands["CSS.getStyleSheetText"].params.parse(params ?? {})), - ), - "CSS.getStyleSheetText", - "command", - ), - getLayersForNode: withCdpName( - async (params?: unknown) => - commands["CSS.getLayersForNode"].result.parse( - await send("CSS.getLayersForNode", commands["CSS.getLayersForNode"].params.parse(params ?? {})), - ), - "CSS.getLayersForNode", - "command", - ), - getLocationForSelector: withCdpName( - async (params?: unknown) => - commands["CSS.getLocationForSelector"].result.parse( - await send("CSS.getLocationForSelector", commands["CSS.getLocationForSelector"].params.parse(params ?? {})), - ), - "CSS.getLocationForSelector", - "command", - ), - trackComputedStyleUpdatesForNode: withCdpName( - async (params?: unknown) => - commands["CSS.trackComputedStyleUpdatesForNode"].result.parse( - await send( - "CSS.trackComputedStyleUpdatesForNode", - commands["CSS.trackComputedStyleUpdatesForNode"].params.parse(params ?? {}), - ), - ), - "CSS.trackComputedStyleUpdatesForNode", - "command", - ), - trackComputedStyleUpdates: withCdpName( - async (params?: unknown) => - commands["CSS.trackComputedStyleUpdates"].result.parse( - await send( - "CSS.trackComputedStyleUpdates", - commands["CSS.trackComputedStyleUpdates"].params.parse(params ?? {}), - ), - ), - "CSS.trackComputedStyleUpdates", - "command", - ), - takeComputedStyleUpdates: withCdpName( - async (params?: unknown) => - commands["CSS.takeComputedStyleUpdates"].result.parse( - await send( - "CSS.takeComputedStyleUpdates", - commands["CSS.takeComputedStyleUpdates"].params.parse(params ?? {}), - ), - ), - "CSS.takeComputedStyleUpdates", - "command", - ), - setEffectivePropertyValueForNode: withCdpName( - async (params?: unknown) => - commands["CSS.setEffectivePropertyValueForNode"].result.parse( - await send( - "CSS.setEffectivePropertyValueForNode", - commands["CSS.setEffectivePropertyValueForNode"].params.parse(params ?? {}), - ), - ), - "CSS.setEffectivePropertyValueForNode", - "command", - ), - setPropertyRulePropertyName: withCdpName( - async (params?: unknown) => - commands["CSS.setPropertyRulePropertyName"].result.parse( - await send( - "CSS.setPropertyRulePropertyName", - commands["CSS.setPropertyRulePropertyName"].params.parse(params ?? {}), - ), - ), - "CSS.setPropertyRulePropertyName", - "command", - ), - setKeyframeKey: withCdpName( - async (params?: unknown) => - commands["CSS.setKeyframeKey"].result.parse( - await send("CSS.setKeyframeKey", commands["CSS.setKeyframeKey"].params.parse(params ?? {})), - ), - "CSS.setKeyframeKey", - "command", - ), - setMediaText: withCdpName( - async (params?: unknown) => - commands["CSS.setMediaText"].result.parse( - await send("CSS.setMediaText", commands["CSS.setMediaText"].params.parse(params ?? {})), - ), - "CSS.setMediaText", - "command", - ), - setContainerQueryText: withCdpName( - async (params?: unknown) => - commands["CSS.setContainerQueryText"].result.parse( - await send("CSS.setContainerQueryText", commands["CSS.setContainerQueryText"].params.parse(params ?? {})), - ), - "CSS.setContainerQueryText", - "command", - ), - setSupportsText: withCdpName( - async (params?: unknown) => - commands["CSS.setSupportsText"].result.parse( - await send("CSS.setSupportsText", commands["CSS.setSupportsText"].params.parse(params ?? {})), - ), - "CSS.setSupportsText", - "command", - ), - setNavigationText: withCdpName( - async (params?: unknown) => - commands["CSS.setNavigationText"].result.parse( - await send("CSS.setNavigationText", commands["CSS.setNavigationText"].params.parse(params ?? {})), - ), - "CSS.setNavigationText", - "command", - ), - setScopeText: withCdpName( - async (params?: unknown) => - commands["CSS.setScopeText"].result.parse( - await send("CSS.setScopeText", commands["CSS.setScopeText"].params.parse(params ?? {})), - ), - "CSS.setScopeText", - "command", - ), - setRuleSelector: withCdpName( - async (params?: unknown) => - commands["CSS.setRuleSelector"].result.parse( - await send("CSS.setRuleSelector", commands["CSS.setRuleSelector"].params.parse(params ?? {})), - ), - "CSS.setRuleSelector", - "command", - ), - setStyleSheetText: withCdpName( - async (params?: unknown) => - commands["CSS.setStyleSheetText"].result.parse( - await send("CSS.setStyleSheetText", commands["CSS.setStyleSheetText"].params.parse(params ?? {})), - ), - "CSS.setStyleSheetText", - "command", - ), - setStyleTexts: withCdpName( - async (params?: unknown) => - commands["CSS.setStyleTexts"].result.parse( - await send("CSS.setStyleTexts", commands["CSS.setStyleTexts"].params.parse(params ?? {})), - ), - "CSS.setStyleTexts", - "command", - ), - startRuleUsageTracking: withCdpName( - async (params?: unknown) => - commands["CSS.startRuleUsageTracking"].result.parse( - await send("CSS.startRuleUsageTracking", commands["CSS.startRuleUsageTracking"].params.parse(params ?? {})), - ), - "CSS.startRuleUsageTracking", - "command", - ), - stopRuleUsageTracking: withCdpName( - async (params?: unknown) => - commands["CSS.stopRuleUsageTracking"].result.parse( - await send("CSS.stopRuleUsageTracking", commands["CSS.stopRuleUsageTracking"].params.parse(params ?? {})), - ), - "CSS.stopRuleUsageTracking", - "command", - ), - takeCoverageDelta: withCdpName( - async (params?: unknown) => - commands["CSS.takeCoverageDelta"].result.parse( - await send("CSS.takeCoverageDelta", commands["CSS.takeCoverageDelta"].params.parse(params ?? {})), - ), - "CSS.takeCoverageDelta", - "command", - ), - setLocalFontsEnabled: withCdpName( - async (params?: unknown) => - commands["CSS.setLocalFontsEnabled"].result.parse( - await send("CSS.setLocalFontsEnabled", commands["CSS.setLocalFontsEnabled"].params.parse(params ?? {})), - ), - "CSS.setLocalFontsEnabled", - "command", - ), + addRule: withCdpName(async (params?: unknown) => commands["CSS.addRule"].result.parse(await send("CSS.addRule", commands["CSS.addRule"].params.parse(params ?? {}))), "CSS.addRule", "command"), + collectClassNames: withCdpName(async (params?: unknown) => commands["CSS.collectClassNames"].result.parse(await send("CSS.collectClassNames", commands["CSS.collectClassNames"].params.parse(params ?? {}))), "CSS.collectClassNames", "command"), + createStyleSheet: withCdpName(async (params?: unknown) => commands["CSS.createStyleSheet"].result.parse(await send("CSS.createStyleSheet", commands["CSS.createStyleSheet"].params.parse(params ?? {}))), "CSS.createStyleSheet", "command"), + disable: withCdpName(async (params?: unknown) => commands["CSS.disable"].result.parse(await send("CSS.disable", commands["CSS.disable"].params.parse(params ?? {}))), "CSS.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["CSS.enable"].result.parse(await send("CSS.enable", commands["CSS.enable"].params.parse(params ?? {}))), "CSS.enable", "command"), + forcePseudoState: withCdpName(async (params?: unknown) => commands["CSS.forcePseudoState"].result.parse(await send("CSS.forcePseudoState", commands["CSS.forcePseudoState"].params.parse(params ?? {}))), "CSS.forcePseudoState", "command"), + forceStartingStyle: withCdpName(async (params?: unknown) => commands["CSS.forceStartingStyle"].result.parse(await send("CSS.forceStartingStyle", commands["CSS.forceStartingStyle"].params.parse(params ?? {}))), "CSS.forceStartingStyle", "command"), + getBackgroundColors: withCdpName(async (params?: unknown) => commands["CSS.getBackgroundColors"].result.parse(await send("CSS.getBackgroundColors", commands["CSS.getBackgroundColors"].params.parse(params ?? {}))), "CSS.getBackgroundColors", "command"), + getComputedStyleForNode: withCdpName(async (params?: unknown) => commands["CSS.getComputedStyleForNode"].result.parse(await send("CSS.getComputedStyleForNode", commands["CSS.getComputedStyleForNode"].params.parse(params ?? {}))), "CSS.getComputedStyleForNode", "command"), + resolveValues: withCdpName(async (params?: unknown) => commands["CSS.resolveValues"].result.parse(await send("CSS.resolveValues", commands["CSS.resolveValues"].params.parse(params ?? {}))), "CSS.resolveValues", "command"), + getLonghandProperties: withCdpName(async (params?: unknown) => commands["CSS.getLonghandProperties"].result.parse(await send("CSS.getLonghandProperties", commands["CSS.getLonghandProperties"].params.parse(params ?? {}))), "CSS.getLonghandProperties", "command"), + getInlineStylesForNode: withCdpName(async (params?: unknown) => commands["CSS.getInlineStylesForNode"].result.parse(await send("CSS.getInlineStylesForNode", commands["CSS.getInlineStylesForNode"].params.parse(params ?? {}))), "CSS.getInlineStylesForNode", "command"), + getAnimatedStylesForNode: withCdpName(async (params?: unknown) => commands["CSS.getAnimatedStylesForNode"].result.parse(await send("CSS.getAnimatedStylesForNode", commands["CSS.getAnimatedStylesForNode"].params.parse(params ?? {}))), "CSS.getAnimatedStylesForNode", "command"), + getMatchedStylesForNode: withCdpName(async (params?: unknown) => commands["CSS.getMatchedStylesForNode"].result.parse(await send("CSS.getMatchedStylesForNode", commands["CSS.getMatchedStylesForNode"].params.parse(params ?? {}))), "CSS.getMatchedStylesForNode", "command"), + getEnvironmentVariables: withCdpName(async (params?: unknown) => commands["CSS.getEnvironmentVariables"].result.parse(await send("CSS.getEnvironmentVariables", commands["CSS.getEnvironmentVariables"].params.parse(params ?? {}))), "CSS.getEnvironmentVariables", "command"), + getMediaQueries: withCdpName(async (params?: unknown) => commands["CSS.getMediaQueries"].result.parse(await send("CSS.getMediaQueries", commands["CSS.getMediaQueries"].params.parse(params ?? {}))), "CSS.getMediaQueries", "command"), + getPlatformFontsForNode: withCdpName(async (params?: unknown) => commands["CSS.getPlatformFontsForNode"].result.parse(await send("CSS.getPlatformFontsForNode", commands["CSS.getPlatformFontsForNode"].params.parse(params ?? {}))), "CSS.getPlatformFontsForNode", "command"), + getStyleSheetText: withCdpName(async (params?: unknown) => commands["CSS.getStyleSheetText"].result.parse(await send("CSS.getStyleSheetText", commands["CSS.getStyleSheetText"].params.parse(params ?? {}))), "CSS.getStyleSheetText", "command"), + getLayersForNode: withCdpName(async (params?: unknown) => commands["CSS.getLayersForNode"].result.parse(await send("CSS.getLayersForNode", commands["CSS.getLayersForNode"].params.parse(params ?? {}))), "CSS.getLayersForNode", "command"), + getLocationForSelector: withCdpName(async (params?: unknown) => commands["CSS.getLocationForSelector"].result.parse(await send("CSS.getLocationForSelector", commands["CSS.getLocationForSelector"].params.parse(params ?? {}))), "CSS.getLocationForSelector", "command"), + trackComputedStyleUpdatesForNode: withCdpName(async (params?: unknown) => commands["CSS.trackComputedStyleUpdatesForNode"].result.parse(await send("CSS.trackComputedStyleUpdatesForNode", commands["CSS.trackComputedStyleUpdatesForNode"].params.parse(params ?? {}))), "CSS.trackComputedStyleUpdatesForNode", "command"), + trackComputedStyleUpdates: withCdpName(async (params?: unknown) => commands["CSS.trackComputedStyleUpdates"].result.parse(await send("CSS.trackComputedStyleUpdates", commands["CSS.trackComputedStyleUpdates"].params.parse(params ?? {}))), "CSS.trackComputedStyleUpdates", "command"), + takeComputedStyleUpdates: withCdpName(async (params?: unknown) => commands["CSS.takeComputedStyleUpdates"].result.parse(await send("CSS.takeComputedStyleUpdates", commands["CSS.takeComputedStyleUpdates"].params.parse(params ?? {}))), "CSS.takeComputedStyleUpdates", "command"), + setEffectivePropertyValueForNode: withCdpName(async (params?: unknown) => commands["CSS.setEffectivePropertyValueForNode"].result.parse(await send("CSS.setEffectivePropertyValueForNode", commands["CSS.setEffectivePropertyValueForNode"].params.parse(params ?? {}))), "CSS.setEffectivePropertyValueForNode", "command"), + setPropertyRulePropertyName: withCdpName(async (params?: unknown) => commands["CSS.setPropertyRulePropertyName"].result.parse(await send("CSS.setPropertyRulePropertyName", commands["CSS.setPropertyRulePropertyName"].params.parse(params ?? {}))), "CSS.setPropertyRulePropertyName", "command"), + setKeyframeKey: withCdpName(async (params?: unknown) => commands["CSS.setKeyframeKey"].result.parse(await send("CSS.setKeyframeKey", commands["CSS.setKeyframeKey"].params.parse(params ?? {}))), "CSS.setKeyframeKey", "command"), + setMediaText: withCdpName(async (params?: unknown) => commands["CSS.setMediaText"].result.parse(await send("CSS.setMediaText", commands["CSS.setMediaText"].params.parse(params ?? {}))), "CSS.setMediaText", "command"), + setContainerQueryText: withCdpName(async (params?: unknown) => commands["CSS.setContainerQueryText"].result.parse(await send("CSS.setContainerQueryText", commands["CSS.setContainerQueryText"].params.parse(params ?? {}))), "CSS.setContainerQueryText", "command"), + setSupportsText: withCdpName(async (params?: unknown) => commands["CSS.setSupportsText"].result.parse(await send("CSS.setSupportsText", commands["CSS.setSupportsText"].params.parse(params ?? {}))), "CSS.setSupportsText", "command"), + setNavigationText: withCdpName(async (params?: unknown) => commands["CSS.setNavigationText"].result.parse(await send("CSS.setNavigationText", commands["CSS.setNavigationText"].params.parse(params ?? {}))), "CSS.setNavigationText", "command"), + setScopeText: withCdpName(async (params?: unknown) => commands["CSS.setScopeText"].result.parse(await send("CSS.setScopeText", commands["CSS.setScopeText"].params.parse(params ?? {}))), "CSS.setScopeText", "command"), + setRuleSelector: withCdpName(async (params?: unknown) => commands["CSS.setRuleSelector"].result.parse(await send("CSS.setRuleSelector", commands["CSS.setRuleSelector"].params.parse(params ?? {}))), "CSS.setRuleSelector", "command"), + setStyleSheetText: withCdpName(async (params?: unknown) => commands["CSS.setStyleSheetText"].result.parse(await send("CSS.setStyleSheetText", commands["CSS.setStyleSheetText"].params.parse(params ?? {}))), "CSS.setStyleSheetText", "command"), + setStyleTexts: withCdpName(async (params?: unknown) => commands["CSS.setStyleTexts"].result.parse(await send("CSS.setStyleTexts", commands["CSS.setStyleTexts"].params.parse(params ?? {}))), "CSS.setStyleTexts", "command"), + startRuleUsageTracking: withCdpName(async (params?: unknown) => commands["CSS.startRuleUsageTracking"].result.parse(await send("CSS.startRuleUsageTracking", commands["CSS.startRuleUsageTracking"].params.parse(params ?? {}))), "CSS.startRuleUsageTracking", "command"), + stopRuleUsageTracking: withCdpName(async (params?: unknown) => commands["CSS.stopRuleUsageTracking"].result.parse(await send("CSS.stopRuleUsageTracking", commands["CSS.stopRuleUsageTracking"].params.parse(params ?? {}))), "CSS.stopRuleUsageTracking", "command"), + takeCoverageDelta: withCdpName(async (params?: unknown) => commands["CSS.takeCoverageDelta"].result.parse(await send("CSS.takeCoverageDelta", commands["CSS.takeCoverageDelta"].params.parse(params ?? {}))), "CSS.takeCoverageDelta", "command"), + setLocalFontsEnabled: withCdpName(async (params?: unknown) => commands["CSS.setLocalFontsEnabled"].result.parse(await send("CSS.setLocalFontsEnabled", commands["CSS.setLocalFontsEnabled"].params.parse(params ?? {}))), "CSS.setLocalFontsEnabled", "command"), fontsUpdated: events["CSS.fontsUpdated"] as CdpEventAlias, - mediaQueryResultChanged: events["CSS.mediaQueryResultChanged"] as CdpEventAlias< - cdp.types.ts.CSS.MediaQueryResultChangedEvent, - "CSS.mediaQueryResultChanged" - >, - styleSheetAdded: events["CSS.styleSheetAdded"] as CdpEventAlias< - cdp.types.ts.CSS.StyleSheetAddedEvent, - "CSS.styleSheetAdded" - >, - styleSheetChanged: events["CSS.styleSheetChanged"] as CdpEventAlias< - cdp.types.ts.CSS.StyleSheetChangedEvent, - "CSS.styleSheetChanged" - >, - styleSheetRemoved: events["CSS.styleSheetRemoved"] as CdpEventAlias< - cdp.types.ts.CSS.StyleSheetRemovedEvent, - "CSS.styleSheetRemoved" - >, - computedStyleUpdated: events["CSS.computedStyleUpdated"] as CdpEventAlias< - cdp.types.ts.CSS.ComputedStyleUpdatedEvent, - "CSS.computedStyleUpdated" - >, + mediaQueryResultChanged: events["CSS.mediaQueryResultChanged"] as CdpEventAlias, + styleSheetAdded: events["CSS.styleSheetAdded"] as CdpEventAlias, + styleSheetChanged: events["CSS.styleSheetChanged"] as CdpEventAlias, + styleSheetRemoved: events["CSS.styleSheetRemoved"] as CdpEventAlias, + computedStyleUpdated: events["CSS.computedStyleUpdated"] as CdpEventAlias, }, Debugger: { - continueToLocation: withCdpName( - async (params?: unknown) => - commands["Debugger.continueToLocation"].result.parse( - await send( - "Debugger.continueToLocation", - commands["Debugger.continueToLocation"].params.parse(params ?? {}), - ), - ), - "Debugger.continueToLocation", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Debugger.disable"].result.parse( - await send("Debugger.disable", commands["Debugger.disable"].params.parse(params ?? {})), - ), - "Debugger.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Debugger.enable"].result.parse( - await send("Debugger.enable", commands["Debugger.enable"].params.parse(params ?? {})), - ), - "Debugger.enable", - "command", - ), - evaluateOnCallFrame: withCdpName( - async (params?: unknown) => - commands["Debugger.evaluateOnCallFrame"].result.parse( - await send( - "Debugger.evaluateOnCallFrame", - commands["Debugger.evaluateOnCallFrame"].params.parse(params ?? {}), - ), - ), - "Debugger.evaluateOnCallFrame", - "command", - ), - getPossibleBreakpoints: withCdpName( - async (params?: unknown) => - commands["Debugger.getPossibleBreakpoints"].result.parse( - await send( - "Debugger.getPossibleBreakpoints", - commands["Debugger.getPossibleBreakpoints"].params.parse(params ?? {}), - ), - ), - "Debugger.getPossibleBreakpoints", - "command", - ), - getScriptSource: withCdpName( - async (params?: unknown) => - commands["Debugger.getScriptSource"].result.parse( - await send("Debugger.getScriptSource", commands["Debugger.getScriptSource"].params.parse(params ?? {})), - ), - "Debugger.getScriptSource", - "command", - ), - disassembleWasmModule: withCdpName( - async (params?: unknown) => - commands["Debugger.disassembleWasmModule"].result.parse( - await send( - "Debugger.disassembleWasmModule", - commands["Debugger.disassembleWasmModule"].params.parse(params ?? {}), - ), - ), - "Debugger.disassembleWasmModule", - "command", - ), - nextWasmDisassemblyChunk: withCdpName( - async (params?: unknown) => - commands["Debugger.nextWasmDisassemblyChunk"].result.parse( - await send( - "Debugger.nextWasmDisassemblyChunk", - commands["Debugger.nextWasmDisassemblyChunk"].params.parse(params ?? {}), - ), - ), - "Debugger.nextWasmDisassemblyChunk", - "command", - ), - getWasmBytecode: withCdpName( - async (params?: unknown) => - commands["Debugger.getWasmBytecode"].result.parse( - await send("Debugger.getWasmBytecode", commands["Debugger.getWasmBytecode"].params.parse(params ?? {})), - ), - "Debugger.getWasmBytecode", - "command", - ), - getStackTrace: withCdpName( - async (params?: unknown) => - commands["Debugger.getStackTrace"].result.parse( - await send("Debugger.getStackTrace", commands["Debugger.getStackTrace"].params.parse(params ?? {})), - ), - "Debugger.getStackTrace", - "command", - ), - pause: withCdpName( - async (params?: unknown) => - commands["Debugger.pause"].result.parse( - await send("Debugger.pause", commands["Debugger.pause"].params.parse(params ?? {})), - ), - "Debugger.pause", - "command", - ), - pauseOnAsyncCall: withCdpName( - async (params?: unknown) => - commands["Debugger.pauseOnAsyncCall"].result.parse( - await send("Debugger.pauseOnAsyncCall", commands["Debugger.pauseOnAsyncCall"].params.parse(params ?? {})), - ), - "Debugger.pauseOnAsyncCall", - "command", - ), - removeBreakpoint: withCdpName( - async (params?: unknown) => - commands["Debugger.removeBreakpoint"].result.parse( - await send("Debugger.removeBreakpoint", commands["Debugger.removeBreakpoint"].params.parse(params ?? {})), - ), - "Debugger.removeBreakpoint", - "command", - ), - restartFrame: withCdpName( - async (params?: unknown) => - commands["Debugger.restartFrame"].result.parse( - await send("Debugger.restartFrame", commands["Debugger.restartFrame"].params.parse(params ?? {})), - ), - "Debugger.restartFrame", - "command", - ), - resume: withCdpName( - async (params?: unknown) => - commands["Debugger.resume"].result.parse( - await send("Debugger.resume", commands["Debugger.resume"].params.parse(params ?? {})), - ), - "Debugger.resume", - "command", - ), - searchInContent: withCdpName( - async (params?: unknown) => - commands["Debugger.searchInContent"].result.parse( - await send("Debugger.searchInContent", commands["Debugger.searchInContent"].params.parse(params ?? {})), - ), - "Debugger.searchInContent", - "command", - ), - setAsyncCallStackDepth: withCdpName( - async (params?: unknown) => - commands["Debugger.setAsyncCallStackDepth"].result.parse( - await send( - "Debugger.setAsyncCallStackDepth", - commands["Debugger.setAsyncCallStackDepth"].params.parse(params ?? {}), - ), - ), - "Debugger.setAsyncCallStackDepth", - "command", - ), - setBlackboxExecutionContexts: withCdpName( - async (params?: unknown) => - commands["Debugger.setBlackboxExecutionContexts"].result.parse( - await send( - "Debugger.setBlackboxExecutionContexts", - commands["Debugger.setBlackboxExecutionContexts"].params.parse(params ?? {}), - ), - ), - "Debugger.setBlackboxExecutionContexts", - "command", - ), - setBlackboxPatterns: withCdpName( - async (params?: unknown) => - commands["Debugger.setBlackboxPatterns"].result.parse( - await send( - "Debugger.setBlackboxPatterns", - commands["Debugger.setBlackboxPatterns"].params.parse(params ?? {}), - ), - ), - "Debugger.setBlackboxPatterns", - "command", - ), - setBlackboxedRanges: withCdpName( - async (params?: unknown) => - commands["Debugger.setBlackboxedRanges"].result.parse( - await send( - "Debugger.setBlackboxedRanges", - commands["Debugger.setBlackboxedRanges"].params.parse(params ?? {}), - ), - ), - "Debugger.setBlackboxedRanges", - "command", - ), - setBreakpoint: withCdpName( - async (params?: unknown) => - commands["Debugger.setBreakpoint"].result.parse( - await send("Debugger.setBreakpoint", commands["Debugger.setBreakpoint"].params.parse(params ?? {})), - ), - "Debugger.setBreakpoint", - "command", - ), - setInstrumentationBreakpoint: withCdpName( - async (params?: unknown) => - commands["Debugger.setInstrumentationBreakpoint"].result.parse( - await send( - "Debugger.setInstrumentationBreakpoint", - commands["Debugger.setInstrumentationBreakpoint"].params.parse(params ?? {}), - ), - ), - "Debugger.setInstrumentationBreakpoint", - "command", - ), - setBreakpointByUrl: withCdpName( - async (params?: unknown) => - commands["Debugger.setBreakpointByUrl"].result.parse( - await send( - "Debugger.setBreakpointByUrl", - commands["Debugger.setBreakpointByUrl"].params.parse(params ?? {}), - ), - ), - "Debugger.setBreakpointByUrl", - "command", - ), - setBreakpointOnFunctionCall: withCdpName( - async (params?: unknown) => - commands["Debugger.setBreakpointOnFunctionCall"].result.parse( - await send( - "Debugger.setBreakpointOnFunctionCall", - commands["Debugger.setBreakpointOnFunctionCall"].params.parse(params ?? {}), - ), - ), - "Debugger.setBreakpointOnFunctionCall", - "command", - ), - setBreakpointsActive: withCdpName( - async (params?: unknown) => - commands["Debugger.setBreakpointsActive"].result.parse( - await send( - "Debugger.setBreakpointsActive", - commands["Debugger.setBreakpointsActive"].params.parse(params ?? {}), - ), - ), - "Debugger.setBreakpointsActive", - "command", - ), - setPauseOnExceptions: withCdpName( - async (params?: unknown) => - commands["Debugger.setPauseOnExceptions"].result.parse( - await send( - "Debugger.setPauseOnExceptions", - commands["Debugger.setPauseOnExceptions"].params.parse(params ?? {}), - ), - ), - "Debugger.setPauseOnExceptions", - "command", - ), - setReturnValue: withCdpName( - async (params?: unknown) => - commands["Debugger.setReturnValue"].result.parse( - await send("Debugger.setReturnValue", commands["Debugger.setReturnValue"].params.parse(params ?? {})), - ), - "Debugger.setReturnValue", - "command", - ), - setScriptSource: withCdpName( - async (params?: unknown) => - commands["Debugger.setScriptSource"].result.parse( - await send("Debugger.setScriptSource", commands["Debugger.setScriptSource"].params.parse(params ?? {})), - ), - "Debugger.setScriptSource", - "command", - ), - setSkipAllPauses: withCdpName( - async (params?: unknown) => - commands["Debugger.setSkipAllPauses"].result.parse( - await send("Debugger.setSkipAllPauses", commands["Debugger.setSkipAllPauses"].params.parse(params ?? {})), - ), - "Debugger.setSkipAllPauses", - "command", - ), - setVariableValue: withCdpName( - async (params?: unknown) => - commands["Debugger.setVariableValue"].result.parse( - await send("Debugger.setVariableValue", commands["Debugger.setVariableValue"].params.parse(params ?? {})), - ), - "Debugger.setVariableValue", - "command", - ), - stepInto: withCdpName( - async (params?: unknown) => - commands["Debugger.stepInto"].result.parse( - await send("Debugger.stepInto", commands["Debugger.stepInto"].params.parse(params ?? {})), - ), - "Debugger.stepInto", - "command", - ), - stepOut: withCdpName( - async (params?: unknown) => - commands["Debugger.stepOut"].result.parse( - await send("Debugger.stepOut", commands["Debugger.stepOut"].params.parse(params ?? {})), - ), - "Debugger.stepOut", - "command", - ), - stepOver: withCdpName( - async (params?: unknown) => - commands["Debugger.stepOver"].result.parse( - await send("Debugger.stepOver", commands["Debugger.stepOver"].params.parse(params ?? {})), - ), - "Debugger.stepOver", - "command", - ), - breakpointResolved: events["Debugger.breakpointResolved"] as CdpEventAlias< - cdp.types.ts.Debugger.BreakpointResolvedEvent, - "Debugger.breakpointResolved" - >, + continueToLocation: withCdpName(async (params?: unknown) => commands["Debugger.continueToLocation"].result.parse(await send("Debugger.continueToLocation", commands["Debugger.continueToLocation"].params.parse(params ?? {}))), "Debugger.continueToLocation", "command"), + disable: withCdpName(async (params?: unknown) => commands["Debugger.disable"].result.parse(await send("Debugger.disable", commands["Debugger.disable"].params.parse(params ?? {}))), "Debugger.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Debugger.enable"].result.parse(await send("Debugger.enable", commands["Debugger.enable"].params.parse(params ?? {}))), "Debugger.enable", "command"), + evaluateOnCallFrame: withCdpName(async (params?: unknown) => commands["Debugger.evaluateOnCallFrame"].result.parse(await send("Debugger.evaluateOnCallFrame", commands["Debugger.evaluateOnCallFrame"].params.parse(params ?? {}))), "Debugger.evaluateOnCallFrame", "command"), + getPossibleBreakpoints: withCdpName(async (params?: unknown) => commands["Debugger.getPossibleBreakpoints"].result.parse(await send("Debugger.getPossibleBreakpoints", commands["Debugger.getPossibleBreakpoints"].params.parse(params ?? {}))), "Debugger.getPossibleBreakpoints", "command"), + getScriptSource: withCdpName(async (params?: unknown) => commands["Debugger.getScriptSource"].result.parse(await send("Debugger.getScriptSource", commands["Debugger.getScriptSource"].params.parse(params ?? {}))), "Debugger.getScriptSource", "command"), + disassembleWasmModule: withCdpName(async (params?: unknown) => commands["Debugger.disassembleWasmModule"].result.parse(await send("Debugger.disassembleWasmModule", commands["Debugger.disassembleWasmModule"].params.parse(params ?? {}))), "Debugger.disassembleWasmModule", "command"), + nextWasmDisassemblyChunk: withCdpName(async (params?: unknown) => commands["Debugger.nextWasmDisassemblyChunk"].result.parse(await send("Debugger.nextWasmDisassemblyChunk", commands["Debugger.nextWasmDisassemblyChunk"].params.parse(params ?? {}))), "Debugger.nextWasmDisassemblyChunk", "command"), + getWasmBytecode: withCdpName(async (params?: unknown) => commands["Debugger.getWasmBytecode"].result.parse(await send("Debugger.getWasmBytecode", commands["Debugger.getWasmBytecode"].params.parse(params ?? {}))), "Debugger.getWasmBytecode", "command"), + getStackTrace: withCdpName(async (params?: unknown) => commands["Debugger.getStackTrace"].result.parse(await send("Debugger.getStackTrace", commands["Debugger.getStackTrace"].params.parse(params ?? {}))), "Debugger.getStackTrace", "command"), + pause: withCdpName(async (params?: unknown) => commands["Debugger.pause"].result.parse(await send("Debugger.pause", commands["Debugger.pause"].params.parse(params ?? {}))), "Debugger.pause", "command"), + pauseOnAsyncCall: withCdpName(async (params?: unknown) => commands["Debugger.pauseOnAsyncCall"].result.parse(await send("Debugger.pauseOnAsyncCall", commands["Debugger.pauseOnAsyncCall"].params.parse(params ?? {}))), "Debugger.pauseOnAsyncCall", "command"), + removeBreakpoint: withCdpName(async (params?: unknown) => commands["Debugger.removeBreakpoint"].result.parse(await send("Debugger.removeBreakpoint", commands["Debugger.removeBreakpoint"].params.parse(params ?? {}))), "Debugger.removeBreakpoint", "command"), + restartFrame: withCdpName(async (params?: unknown) => commands["Debugger.restartFrame"].result.parse(await send("Debugger.restartFrame", commands["Debugger.restartFrame"].params.parse(params ?? {}))), "Debugger.restartFrame", "command"), + resume: withCdpName(async (params?: unknown) => commands["Debugger.resume"].result.parse(await send("Debugger.resume", commands["Debugger.resume"].params.parse(params ?? {}))), "Debugger.resume", "command"), + searchInContent: withCdpName(async (params?: unknown) => commands["Debugger.searchInContent"].result.parse(await send("Debugger.searchInContent", commands["Debugger.searchInContent"].params.parse(params ?? {}))), "Debugger.searchInContent", "command"), + setAsyncCallStackDepth: withCdpName(async (params?: unknown) => commands["Debugger.setAsyncCallStackDepth"].result.parse(await send("Debugger.setAsyncCallStackDepth", commands["Debugger.setAsyncCallStackDepth"].params.parse(params ?? {}))), "Debugger.setAsyncCallStackDepth", "command"), + setBlackboxExecutionContexts: withCdpName(async (params?: unknown) => commands["Debugger.setBlackboxExecutionContexts"].result.parse(await send("Debugger.setBlackboxExecutionContexts", commands["Debugger.setBlackboxExecutionContexts"].params.parse(params ?? {}))), "Debugger.setBlackboxExecutionContexts", "command"), + setBlackboxPatterns: withCdpName(async (params?: unknown) => commands["Debugger.setBlackboxPatterns"].result.parse(await send("Debugger.setBlackboxPatterns", commands["Debugger.setBlackboxPatterns"].params.parse(params ?? {}))), "Debugger.setBlackboxPatterns", "command"), + setBlackboxedRanges: withCdpName(async (params?: unknown) => commands["Debugger.setBlackboxedRanges"].result.parse(await send("Debugger.setBlackboxedRanges", commands["Debugger.setBlackboxedRanges"].params.parse(params ?? {}))), "Debugger.setBlackboxedRanges", "command"), + setBreakpoint: withCdpName(async (params?: unknown) => commands["Debugger.setBreakpoint"].result.parse(await send("Debugger.setBreakpoint", commands["Debugger.setBreakpoint"].params.parse(params ?? {}))), "Debugger.setBreakpoint", "command"), + setInstrumentationBreakpoint: withCdpName(async (params?: unknown) => commands["Debugger.setInstrumentationBreakpoint"].result.parse(await send("Debugger.setInstrumentationBreakpoint", commands["Debugger.setInstrumentationBreakpoint"].params.parse(params ?? {}))), "Debugger.setInstrumentationBreakpoint", "command"), + setBreakpointByUrl: withCdpName(async (params?: unknown) => commands["Debugger.setBreakpointByUrl"].result.parse(await send("Debugger.setBreakpointByUrl", commands["Debugger.setBreakpointByUrl"].params.parse(params ?? {}))), "Debugger.setBreakpointByUrl", "command"), + setBreakpointOnFunctionCall: withCdpName(async (params?: unknown) => commands["Debugger.setBreakpointOnFunctionCall"].result.parse(await send("Debugger.setBreakpointOnFunctionCall", commands["Debugger.setBreakpointOnFunctionCall"].params.parse(params ?? {}))), "Debugger.setBreakpointOnFunctionCall", "command"), + setBreakpointsActive: withCdpName(async (params?: unknown) => commands["Debugger.setBreakpointsActive"].result.parse(await send("Debugger.setBreakpointsActive", commands["Debugger.setBreakpointsActive"].params.parse(params ?? {}))), "Debugger.setBreakpointsActive", "command"), + setPauseOnExceptions: withCdpName(async (params?: unknown) => commands["Debugger.setPauseOnExceptions"].result.parse(await send("Debugger.setPauseOnExceptions", commands["Debugger.setPauseOnExceptions"].params.parse(params ?? {}))), "Debugger.setPauseOnExceptions", "command"), + setReturnValue: withCdpName(async (params?: unknown) => commands["Debugger.setReturnValue"].result.parse(await send("Debugger.setReturnValue", commands["Debugger.setReturnValue"].params.parse(params ?? {}))), "Debugger.setReturnValue", "command"), + setScriptSource: withCdpName(async (params?: unknown) => commands["Debugger.setScriptSource"].result.parse(await send("Debugger.setScriptSource", commands["Debugger.setScriptSource"].params.parse(params ?? {}))), "Debugger.setScriptSource", "command"), + setSkipAllPauses: withCdpName(async (params?: unknown) => commands["Debugger.setSkipAllPauses"].result.parse(await send("Debugger.setSkipAllPauses", commands["Debugger.setSkipAllPauses"].params.parse(params ?? {}))), "Debugger.setSkipAllPauses", "command"), + setVariableValue: withCdpName(async (params?: unknown) => commands["Debugger.setVariableValue"].result.parse(await send("Debugger.setVariableValue", commands["Debugger.setVariableValue"].params.parse(params ?? {}))), "Debugger.setVariableValue", "command"), + stepInto: withCdpName(async (params?: unknown) => commands["Debugger.stepInto"].result.parse(await send("Debugger.stepInto", commands["Debugger.stepInto"].params.parse(params ?? {}))), "Debugger.stepInto", "command"), + stepOut: withCdpName(async (params?: unknown) => commands["Debugger.stepOut"].result.parse(await send("Debugger.stepOut", commands["Debugger.stepOut"].params.parse(params ?? {}))), "Debugger.stepOut", "command"), + stepOver: withCdpName(async (params?: unknown) => commands["Debugger.stepOver"].result.parse(await send("Debugger.stepOver", commands["Debugger.stepOver"].params.parse(params ?? {}))), "Debugger.stepOver", "command"), + breakpointResolved: events["Debugger.breakpointResolved"] as CdpEventAlias, paused: events["Debugger.paused"] as CdpEventAlias, resumed: events["Debugger.resumed"] as CdpEventAlias, - scriptFailedToParse: events["Debugger.scriptFailedToParse"] as CdpEventAlias< - cdp.types.ts.Debugger.ScriptFailedToParseEvent, - "Debugger.scriptFailedToParse" - >, - scriptParsed: events["Debugger.scriptParsed"] as CdpEventAlias< - cdp.types.ts.Debugger.ScriptParsedEvent, - "Debugger.scriptParsed" - >, + scriptFailedToParse: events["Debugger.scriptFailedToParse"] as CdpEventAlias, + scriptParsed: events["Debugger.scriptParsed"] as CdpEventAlias, }, DeviceAccess: { - enable: withCdpName( - async (params?: unknown) => - commands["DeviceAccess.enable"].result.parse( - await send("DeviceAccess.enable", commands["DeviceAccess.enable"].params.parse(params ?? {})), - ), - "DeviceAccess.enable", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["DeviceAccess.disable"].result.parse( - await send("DeviceAccess.disable", commands["DeviceAccess.disable"].params.parse(params ?? {})), - ), - "DeviceAccess.disable", - "command", - ), - selectPrompt: withCdpName( - async (params?: unknown) => - commands["DeviceAccess.selectPrompt"].result.parse( - await send("DeviceAccess.selectPrompt", commands["DeviceAccess.selectPrompt"].params.parse(params ?? {})), - ), - "DeviceAccess.selectPrompt", - "command", - ), - cancelPrompt: withCdpName( - async (params?: unknown) => - commands["DeviceAccess.cancelPrompt"].result.parse( - await send("DeviceAccess.cancelPrompt", commands["DeviceAccess.cancelPrompt"].params.parse(params ?? {})), - ), - "DeviceAccess.cancelPrompt", - "command", - ), - deviceRequestPrompted: events["DeviceAccess.deviceRequestPrompted"] as CdpEventAlias< - cdp.types.ts.DeviceAccess.DeviceRequestPromptedEvent, - "DeviceAccess.deviceRequestPrompted" - >, + enable: withCdpName(async (params?: unknown) => commands["DeviceAccess.enable"].result.parse(await send("DeviceAccess.enable", commands["DeviceAccess.enable"].params.parse(params ?? {}))), "DeviceAccess.enable", "command"), + disable: withCdpName(async (params?: unknown) => commands["DeviceAccess.disable"].result.parse(await send("DeviceAccess.disable", commands["DeviceAccess.disable"].params.parse(params ?? {}))), "DeviceAccess.disable", "command"), + selectPrompt: withCdpName(async (params?: unknown) => commands["DeviceAccess.selectPrompt"].result.parse(await send("DeviceAccess.selectPrompt", commands["DeviceAccess.selectPrompt"].params.parse(params ?? {}))), "DeviceAccess.selectPrompt", "command"), + cancelPrompt: withCdpName(async (params?: unknown) => commands["DeviceAccess.cancelPrompt"].result.parse(await send("DeviceAccess.cancelPrompt", commands["DeviceAccess.cancelPrompt"].params.parse(params ?? {}))), "DeviceAccess.cancelPrompt", "command"), + deviceRequestPrompted: events["DeviceAccess.deviceRequestPrompted"] as CdpEventAlias, }, DeviceOrientation: { - clearDeviceOrientationOverride: withCdpName( - async (params?: unknown) => - commands["DeviceOrientation.clearDeviceOrientationOverride"].result.parse( - await send( - "DeviceOrientation.clearDeviceOrientationOverride", - commands["DeviceOrientation.clearDeviceOrientationOverride"].params.parse(params ?? {}), - ), - ), - "DeviceOrientation.clearDeviceOrientationOverride", - "command", - ), - setDeviceOrientationOverride: withCdpName( - async (params?: unknown) => - commands["DeviceOrientation.setDeviceOrientationOverride"].result.parse( - await send( - "DeviceOrientation.setDeviceOrientationOverride", - commands["DeviceOrientation.setDeviceOrientationOverride"].params.parse(params ?? {}), - ), - ), - "DeviceOrientation.setDeviceOrientationOverride", - "command", - ), + clearDeviceOrientationOverride: withCdpName(async (params?: unknown) => commands["DeviceOrientation.clearDeviceOrientationOverride"].result.parse(await send("DeviceOrientation.clearDeviceOrientationOverride", commands["DeviceOrientation.clearDeviceOrientationOverride"].params.parse(params ?? {}))), "DeviceOrientation.clearDeviceOrientationOverride", "command"), + setDeviceOrientationOverride: withCdpName(async (params?: unknown) => commands["DeviceOrientation.setDeviceOrientationOverride"].result.parse(await send("DeviceOrientation.setDeviceOrientationOverride", commands["DeviceOrientation.setDeviceOrientationOverride"].params.parse(params ?? {}))), "DeviceOrientation.setDeviceOrientationOverride", "command"), }, DOM: { - collectClassNamesFromSubtree: withCdpName( - async (params?: unknown) => - commands["DOM.collectClassNamesFromSubtree"].result.parse( - await send( - "DOM.collectClassNamesFromSubtree", - commands["DOM.collectClassNamesFromSubtree"].params.parse(params ?? {}), - ), - ), - "DOM.collectClassNamesFromSubtree", - "command", - ), - copyTo: withCdpName( - async (params?: unknown) => - commands["DOM.copyTo"].result.parse( - await send("DOM.copyTo", commands["DOM.copyTo"].params.parse(params ?? {})), - ), - "DOM.copyTo", - "command", - ), - describeNode: withCdpName( - async (params?: unknown) => - commands["DOM.describeNode"].result.parse( - await send("DOM.describeNode", commands["DOM.describeNode"].params.parse(params ?? {})), - ), - "DOM.describeNode", - "command", - ), - scrollIntoViewIfNeeded: withCdpName( - async (params?: unknown) => - commands["DOM.scrollIntoViewIfNeeded"].result.parse( - await send("DOM.scrollIntoViewIfNeeded", commands["DOM.scrollIntoViewIfNeeded"].params.parse(params ?? {})), - ), - "DOM.scrollIntoViewIfNeeded", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["DOM.disable"].result.parse( - await send("DOM.disable", commands["DOM.disable"].params.parse(params ?? {})), - ), - "DOM.disable", - "command", - ), - discardSearchResults: withCdpName( - async (params?: unknown) => - commands["DOM.discardSearchResults"].result.parse( - await send("DOM.discardSearchResults", commands["DOM.discardSearchResults"].params.parse(params ?? {})), - ), - "DOM.discardSearchResults", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["DOM.enable"].result.parse( - await send("DOM.enable", commands["DOM.enable"].params.parse(params ?? {})), - ), - "DOM.enable", - "command", - ), - focus: withCdpName( - async (params?: unknown) => - commands["DOM.focus"].result.parse(await send("DOM.focus", commands["DOM.focus"].params.parse(params ?? {}))), - "DOM.focus", - "command", - ), - getAttributes: withCdpName( - async (params?: unknown) => - commands["DOM.getAttributes"].result.parse( - await send("DOM.getAttributes", commands["DOM.getAttributes"].params.parse(params ?? {})), - ), - "DOM.getAttributes", - "command", - ), - getBoxModel: withCdpName( - async (params?: unknown) => - commands["DOM.getBoxModel"].result.parse( - await send("DOM.getBoxModel", commands["DOM.getBoxModel"].params.parse(params ?? {})), - ), - "DOM.getBoxModel", - "command", - ), - getContentQuads: withCdpName( - async (params?: unknown) => - commands["DOM.getContentQuads"].result.parse( - await send("DOM.getContentQuads", commands["DOM.getContentQuads"].params.parse(params ?? {})), - ), - "DOM.getContentQuads", - "command", - ), - getDocument: withCdpName( - async (params?: unknown) => - commands["DOM.getDocument"].result.parse( - await send("DOM.getDocument", commands["DOM.getDocument"].params.parse(params ?? {})), - ), - "DOM.getDocument", - "command", - ), - getFlattenedDocument: withCdpName( - async (params?: unknown) => - commands["DOM.getFlattenedDocument"].result.parse( - await send("DOM.getFlattenedDocument", commands["DOM.getFlattenedDocument"].params.parse(params ?? {})), - ), - "DOM.getFlattenedDocument", - "command", - ), - getNodesForSubtreeByStyle: withCdpName( - async (params?: unknown) => - commands["DOM.getNodesForSubtreeByStyle"].result.parse( - await send( - "DOM.getNodesForSubtreeByStyle", - commands["DOM.getNodesForSubtreeByStyle"].params.parse(params ?? {}), - ), - ), - "DOM.getNodesForSubtreeByStyle", - "command", - ), - getNodeForLocation: withCdpName( - async (params?: unknown) => - commands["DOM.getNodeForLocation"].result.parse( - await send("DOM.getNodeForLocation", commands["DOM.getNodeForLocation"].params.parse(params ?? {})), - ), - "DOM.getNodeForLocation", - "command", - ), - getOuterHTML: withCdpName( - async (params?: unknown) => - commands["DOM.getOuterHTML"].result.parse( - await send("DOM.getOuterHTML", commands["DOM.getOuterHTML"].params.parse(params ?? {})), - ), - "DOM.getOuterHTML", - "command", - ), - getRelayoutBoundary: withCdpName( - async (params?: unknown) => - commands["DOM.getRelayoutBoundary"].result.parse( - await send("DOM.getRelayoutBoundary", commands["DOM.getRelayoutBoundary"].params.parse(params ?? {})), - ), - "DOM.getRelayoutBoundary", - "command", - ), - getSearchResults: withCdpName( - async (params?: unknown) => - commands["DOM.getSearchResults"].result.parse( - await send("DOM.getSearchResults", commands["DOM.getSearchResults"].params.parse(params ?? {})), - ), - "DOM.getSearchResults", - "command", - ), - hideHighlight: withCdpName( - async (params?: unknown) => - commands["DOM.hideHighlight"].result.parse( - await send("DOM.hideHighlight", commands["DOM.hideHighlight"].params.parse(params ?? {})), - ), - "DOM.hideHighlight", - "command", - ), - highlightNode: withCdpName( - async (params?: unknown) => - commands["DOM.highlightNode"].result.parse( - await send("DOM.highlightNode", commands["DOM.highlightNode"].params.parse(params ?? {})), - ), - "DOM.highlightNode", - "command", - ), - highlightRect: withCdpName( - async (params?: unknown) => - commands["DOM.highlightRect"].result.parse( - await send("DOM.highlightRect", commands["DOM.highlightRect"].params.parse(params ?? {})), - ), - "DOM.highlightRect", - "command", - ), - markUndoableState: withCdpName( - async (params?: unknown) => - commands["DOM.markUndoableState"].result.parse( - await send("DOM.markUndoableState", commands["DOM.markUndoableState"].params.parse(params ?? {})), - ), - "DOM.markUndoableState", - "command", - ), - moveTo: withCdpName( - async (params?: unknown) => - commands["DOM.moveTo"].result.parse( - await send("DOM.moveTo", commands["DOM.moveTo"].params.parse(params ?? {})), - ), - "DOM.moveTo", - "command", - ), - performSearch: withCdpName( - async (params?: unknown) => - commands["DOM.performSearch"].result.parse( - await send("DOM.performSearch", commands["DOM.performSearch"].params.parse(params ?? {})), - ), - "DOM.performSearch", - "command", - ), - pushNodeByPathToFrontend: withCdpName( - async (params?: unknown) => - commands["DOM.pushNodeByPathToFrontend"].result.parse( - await send( - "DOM.pushNodeByPathToFrontend", - commands["DOM.pushNodeByPathToFrontend"].params.parse(params ?? {}), - ), - ), - "DOM.pushNodeByPathToFrontend", - "command", - ), - pushNodesByBackendIdsToFrontend: withCdpName( - async (params?: unknown) => - commands["DOM.pushNodesByBackendIdsToFrontend"].result.parse( - await send( - "DOM.pushNodesByBackendIdsToFrontend", - commands["DOM.pushNodesByBackendIdsToFrontend"].params.parse(params ?? {}), - ), - ), - "DOM.pushNodesByBackendIdsToFrontend", - "command", - ), - querySelector: withCdpName( - async (params?: unknown) => - commands["DOM.querySelector"].result.parse( - await send("DOM.querySelector", commands["DOM.querySelector"].params.parse(params ?? {})), - ), - "DOM.querySelector", - "command", - ), - querySelectorAll: withCdpName( - async (params?: unknown) => - commands["DOM.querySelectorAll"].result.parse( - await send("DOM.querySelectorAll", commands["DOM.querySelectorAll"].params.parse(params ?? {})), - ), - "DOM.querySelectorAll", - "command", - ), - getTopLayerElements: withCdpName( - async (params?: unknown) => - commands["DOM.getTopLayerElements"].result.parse( - await send("DOM.getTopLayerElements", commands["DOM.getTopLayerElements"].params.parse(params ?? {})), - ), - "DOM.getTopLayerElements", - "command", - ), - getElementByRelation: withCdpName( - async (params?: unknown) => - commands["DOM.getElementByRelation"].result.parse( - await send("DOM.getElementByRelation", commands["DOM.getElementByRelation"].params.parse(params ?? {})), - ), - "DOM.getElementByRelation", - "command", - ), - redo: withCdpName( - async (params?: unknown) => - commands["DOM.redo"].result.parse(await send("DOM.redo", commands["DOM.redo"].params.parse(params ?? {}))), - "DOM.redo", - "command", - ), - removeAttribute: withCdpName( - async (params?: unknown) => - commands["DOM.removeAttribute"].result.parse( - await send("DOM.removeAttribute", commands["DOM.removeAttribute"].params.parse(params ?? {})), - ), - "DOM.removeAttribute", - "command", - ), - removeNode: withCdpName( - async (params?: unknown) => - commands["DOM.removeNode"].result.parse( - await send("DOM.removeNode", commands["DOM.removeNode"].params.parse(params ?? {})), - ), - "DOM.removeNode", - "command", - ), - requestChildNodes: withCdpName( - async (params?: unknown) => - commands["DOM.requestChildNodes"].result.parse( - await send("DOM.requestChildNodes", commands["DOM.requestChildNodes"].params.parse(params ?? {})), - ), - "DOM.requestChildNodes", - "command", - ), - requestNode: withCdpName( - async (params?: unknown) => - commands["DOM.requestNode"].result.parse( - await send("DOM.requestNode", commands["DOM.requestNode"].params.parse(params ?? {})), - ), - "DOM.requestNode", - "command", - ), - resolveNode: withCdpName( - async (params?: unknown) => - commands["DOM.resolveNode"].result.parse( - await send("DOM.resolveNode", commands["DOM.resolveNode"].params.parse(params ?? {})), - ), - "DOM.resolveNode", - "command", - ), - setAttributeValue: withCdpName( - async (params?: unknown) => - commands["DOM.setAttributeValue"].result.parse( - await send("DOM.setAttributeValue", commands["DOM.setAttributeValue"].params.parse(params ?? {})), - ), - "DOM.setAttributeValue", - "command", - ), - setAttributesAsText: withCdpName( - async (params?: unknown) => - commands["DOM.setAttributesAsText"].result.parse( - await send("DOM.setAttributesAsText", commands["DOM.setAttributesAsText"].params.parse(params ?? {})), - ), - "DOM.setAttributesAsText", - "command", - ), - setFileInputFiles: withCdpName( - async (params?: unknown) => - commands["DOM.setFileInputFiles"].result.parse( - await send("DOM.setFileInputFiles", commands["DOM.setFileInputFiles"].params.parse(params ?? {})), - ), - "DOM.setFileInputFiles", - "command", - ), - setNodeStackTracesEnabled: withCdpName( - async (params?: unknown) => - commands["DOM.setNodeStackTracesEnabled"].result.parse( - await send( - "DOM.setNodeStackTracesEnabled", - commands["DOM.setNodeStackTracesEnabled"].params.parse(params ?? {}), - ), - ), - "DOM.setNodeStackTracesEnabled", - "command", - ), - getNodeStackTraces: withCdpName( - async (params?: unknown) => - commands["DOM.getNodeStackTraces"].result.parse( - await send("DOM.getNodeStackTraces", commands["DOM.getNodeStackTraces"].params.parse(params ?? {})), - ), - "DOM.getNodeStackTraces", - "command", - ), - getFileInfo: withCdpName( - async (params?: unknown) => - commands["DOM.getFileInfo"].result.parse( - await send("DOM.getFileInfo", commands["DOM.getFileInfo"].params.parse(params ?? {})), - ), - "DOM.getFileInfo", - "command", - ), - getDetachedDomNodes: withCdpName( - async (params?: unknown) => - commands["DOM.getDetachedDomNodes"].result.parse( - await send("DOM.getDetachedDomNodes", commands["DOM.getDetachedDomNodes"].params.parse(params ?? {})), - ), - "DOM.getDetachedDomNodes", - "command", - ), - setInspectedNode: withCdpName( - async (params?: unknown) => - commands["DOM.setInspectedNode"].result.parse( - await send("DOM.setInspectedNode", commands["DOM.setInspectedNode"].params.parse(params ?? {})), - ), - "DOM.setInspectedNode", - "command", - ), - setNodeName: withCdpName( - async (params?: unknown) => - commands["DOM.setNodeName"].result.parse( - await send("DOM.setNodeName", commands["DOM.setNodeName"].params.parse(params ?? {})), - ), - "DOM.setNodeName", - "command", - ), - setNodeValue: withCdpName( - async (params?: unknown) => - commands["DOM.setNodeValue"].result.parse( - await send("DOM.setNodeValue", commands["DOM.setNodeValue"].params.parse(params ?? {})), - ), - "DOM.setNodeValue", - "command", - ), - setOuterHTML: withCdpName( - async (params?: unknown) => - commands["DOM.setOuterHTML"].result.parse( - await send("DOM.setOuterHTML", commands["DOM.setOuterHTML"].params.parse(params ?? {})), - ), - "DOM.setOuterHTML", - "command", - ), - undo: withCdpName( - async (params?: unknown) => - commands["DOM.undo"].result.parse(await send("DOM.undo", commands["DOM.undo"].params.parse(params ?? {}))), - "DOM.undo", - "command", - ), - getFrameOwner: withCdpName( - async (params?: unknown) => - commands["DOM.getFrameOwner"].result.parse( - await send("DOM.getFrameOwner", commands["DOM.getFrameOwner"].params.parse(params ?? {})), - ), - "DOM.getFrameOwner", - "command", - ), - getContainerForNode: withCdpName( - async (params?: unknown) => - commands["DOM.getContainerForNode"].result.parse( - await send("DOM.getContainerForNode", commands["DOM.getContainerForNode"].params.parse(params ?? {})), - ), - "DOM.getContainerForNode", - "command", - ), - getQueryingDescendantsForContainer: withCdpName( - async (params?: unknown) => - commands["DOM.getQueryingDescendantsForContainer"].result.parse( - await send( - "DOM.getQueryingDescendantsForContainer", - commands["DOM.getQueryingDescendantsForContainer"].params.parse(params ?? {}), - ), - ), - "DOM.getQueryingDescendantsForContainer", - "command", - ), - getAnchorElement: withCdpName( - async (params?: unknown) => - commands["DOM.getAnchorElement"].result.parse( - await send("DOM.getAnchorElement", commands["DOM.getAnchorElement"].params.parse(params ?? {})), - ), - "DOM.getAnchorElement", - "command", - ), - forceShowPopover: withCdpName( - async (params?: unknown) => - commands["DOM.forceShowPopover"].result.parse( - await send("DOM.forceShowPopover", commands["DOM.forceShowPopover"].params.parse(params ?? {})), - ), - "DOM.forceShowPopover", - "command", - ), - attributeModified: events["DOM.attributeModified"] as CdpEventAlias< - cdp.types.ts.DOM.AttributeModifiedEvent, - "DOM.attributeModified" - >, - adoptedStyleSheetsModified: events["DOM.adoptedStyleSheetsModified"] as CdpEventAlias< - cdp.types.ts.DOM.AdoptedStyleSheetsModifiedEvent, - "DOM.adoptedStyleSheetsModified" - >, - attributeRemoved: events["DOM.attributeRemoved"] as CdpEventAlias< - cdp.types.ts.DOM.AttributeRemovedEvent, - "DOM.attributeRemoved" - >, - characterDataModified: events["DOM.characterDataModified"] as CdpEventAlias< - cdp.types.ts.DOM.CharacterDataModifiedEvent, - "DOM.characterDataModified" - >, - childNodeCountUpdated: events["DOM.childNodeCountUpdated"] as CdpEventAlias< - cdp.types.ts.DOM.ChildNodeCountUpdatedEvent, - "DOM.childNodeCountUpdated" - >, - childNodeInserted: events["DOM.childNodeInserted"] as CdpEventAlias< - cdp.types.ts.DOM.ChildNodeInsertedEvent, - "DOM.childNodeInserted" - >, - childNodeRemoved: events["DOM.childNodeRemoved"] as CdpEventAlias< - cdp.types.ts.DOM.ChildNodeRemovedEvent, - "DOM.childNodeRemoved" - >, - distributedNodesUpdated: events["DOM.distributedNodesUpdated"] as CdpEventAlias< - cdp.types.ts.DOM.DistributedNodesUpdatedEvent, - "DOM.distributedNodesUpdated" - >, - documentUpdated: events["DOM.documentUpdated"] as CdpEventAlias< - cdp.types.ts.DOM.DocumentUpdatedEvent, - "DOM.documentUpdated" - >, - inlineStyleInvalidated: events["DOM.inlineStyleInvalidated"] as CdpEventAlias< - cdp.types.ts.DOM.InlineStyleInvalidatedEvent, - "DOM.inlineStyleInvalidated" - >, - pseudoElementAdded: events["DOM.pseudoElementAdded"] as CdpEventAlias< - cdp.types.ts.DOM.PseudoElementAddedEvent, - "DOM.pseudoElementAdded" - >, - topLayerElementsUpdated: events["DOM.topLayerElementsUpdated"] as CdpEventAlias< - cdp.types.ts.DOM.TopLayerElementsUpdatedEvent, - "DOM.topLayerElementsUpdated" - >, - scrollableFlagUpdated: events["DOM.scrollableFlagUpdated"] as CdpEventAlias< - cdp.types.ts.DOM.ScrollableFlagUpdatedEvent, - "DOM.scrollableFlagUpdated" - >, - adRelatedStateUpdated: events["DOM.adRelatedStateUpdated"] as CdpEventAlias< - cdp.types.ts.DOM.AdRelatedStateUpdatedEvent, - "DOM.adRelatedStateUpdated" - >, - affectedByStartingStylesFlagUpdated: events["DOM.affectedByStartingStylesFlagUpdated"] as CdpEventAlias< - cdp.types.ts.DOM.AffectedByStartingStylesFlagUpdatedEvent, - "DOM.affectedByStartingStylesFlagUpdated" - >, - pseudoElementRemoved: events["DOM.pseudoElementRemoved"] as CdpEventAlias< - cdp.types.ts.DOM.PseudoElementRemovedEvent, - "DOM.pseudoElementRemoved" - >, - setChildNodes: events["DOM.setChildNodes"] as CdpEventAlias< - cdp.types.ts.DOM.SetChildNodesEvent, - "DOM.setChildNodes" - >, - shadowRootPopped: events["DOM.shadowRootPopped"] as CdpEventAlias< - cdp.types.ts.DOM.ShadowRootPoppedEvent, - "DOM.shadowRootPopped" - >, - shadowRootPushed: events["DOM.shadowRootPushed"] as CdpEventAlias< - cdp.types.ts.DOM.ShadowRootPushedEvent, - "DOM.shadowRootPushed" - >, + collectClassNamesFromSubtree: withCdpName(async (params?: unknown) => commands["DOM.collectClassNamesFromSubtree"].result.parse(await send("DOM.collectClassNamesFromSubtree", commands["DOM.collectClassNamesFromSubtree"].params.parse(params ?? {}))), "DOM.collectClassNamesFromSubtree", "command"), + copyTo: withCdpName(async (params?: unknown) => commands["DOM.copyTo"].result.parse(await send("DOM.copyTo", commands["DOM.copyTo"].params.parse(params ?? {}))), "DOM.copyTo", "command"), + describeNode: withCdpName(async (params?: unknown) => commands["DOM.describeNode"].result.parse(await send("DOM.describeNode", commands["DOM.describeNode"].params.parse(params ?? {}))), "DOM.describeNode", "command"), + scrollIntoViewIfNeeded: withCdpName(async (params?: unknown) => commands["DOM.scrollIntoViewIfNeeded"].result.parse(await send("DOM.scrollIntoViewIfNeeded", commands["DOM.scrollIntoViewIfNeeded"].params.parse(params ?? {}))), "DOM.scrollIntoViewIfNeeded", "command"), + disable: withCdpName(async (params?: unknown) => commands["DOM.disable"].result.parse(await send("DOM.disable", commands["DOM.disable"].params.parse(params ?? {}))), "DOM.disable", "command"), + discardSearchResults: withCdpName(async (params?: unknown) => commands["DOM.discardSearchResults"].result.parse(await send("DOM.discardSearchResults", commands["DOM.discardSearchResults"].params.parse(params ?? {}))), "DOM.discardSearchResults", "command"), + enable: withCdpName(async (params?: unknown) => commands["DOM.enable"].result.parse(await send("DOM.enable", commands["DOM.enable"].params.parse(params ?? {}))), "DOM.enable", "command"), + focus: withCdpName(async (params?: unknown) => commands["DOM.focus"].result.parse(await send("DOM.focus", commands["DOM.focus"].params.parse(params ?? {}))), "DOM.focus", "command"), + getAttributes: withCdpName(async (params?: unknown) => commands["DOM.getAttributes"].result.parse(await send("DOM.getAttributes", commands["DOM.getAttributes"].params.parse(params ?? {}))), "DOM.getAttributes", "command"), + getBoxModel: withCdpName(async (params?: unknown) => commands["DOM.getBoxModel"].result.parse(await send("DOM.getBoxModel", commands["DOM.getBoxModel"].params.parse(params ?? {}))), "DOM.getBoxModel", "command"), + getContentQuads: withCdpName(async (params?: unknown) => commands["DOM.getContentQuads"].result.parse(await send("DOM.getContentQuads", commands["DOM.getContentQuads"].params.parse(params ?? {}))), "DOM.getContentQuads", "command"), + getDocument: withCdpName(async (params?: unknown) => commands["DOM.getDocument"].result.parse(await send("DOM.getDocument", commands["DOM.getDocument"].params.parse(params ?? {}))), "DOM.getDocument", "command"), + getFlattenedDocument: withCdpName(async (params?: unknown) => commands["DOM.getFlattenedDocument"].result.parse(await send("DOM.getFlattenedDocument", commands["DOM.getFlattenedDocument"].params.parse(params ?? {}))), "DOM.getFlattenedDocument", "command"), + getNodesForSubtreeByStyle: withCdpName(async (params?: unknown) => commands["DOM.getNodesForSubtreeByStyle"].result.parse(await send("DOM.getNodesForSubtreeByStyle", commands["DOM.getNodesForSubtreeByStyle"].params.parse(params ?? {}))), "DOM.getNodesForSubtreeByStyle", "command"), + getNodeForLocation: withCdpName(async (params?: unknown) => commands["DOM.getNodeForLocation"].result.parse(await send("DOM.getNodeForLocation", commands["DOM.getNodeForLocation"].params.parse(params ?? {}))), "DOM.getNodeForLocation", "command"), + getOuterHTML: withCdpName(async (params?: unknown) => commands["DOM.getOuterHTML"].result.parse(await send("DOM.getOuterHTML", commands["DOM.getOuterHTML"].params.parse(params ?? {}))), "DOM.getOuterHTML", "command"), + getRelayoutBoundary: withCdpName(async (params?: unknown) => commands["DOM.getRelayoutBoundary"].result.parse(await send("DOM.getRelayoutBoundary", commands["DOM.getRelayoutBoundary"].params.parse(params ?? {}))), "DOM.getRelayoutBoundary", "command"), + getSearchResults: withCdpName(async (params?: unknown) => commands["DOM.getSearchResults"].result.parse(await send("DOM.getSearchResults", commands["DOM.getSearchResults"].params.parse(params ?? {}))), "DOM.getSearchResults", "command"), + hideHighlight: withCdpName(async (params?: unknown) => commands["DOM.hideHighlight"].result.parse(await send("DOM.hideHighlight", commands["DOM.hideHighlight"].params.parse(params ?? {}))), "DOM.hideHighlight", "command"), + highlightNode: withCdpName(async (params?: unknown) => commands["DOM.highlightNode"].result.parse(await send("DOM.highlightNode", commands["DOM.highlightNode"].params.parse(params ?? {}))), "DOM.highlightNode", "command"), + highlightRect: withCdpName(async (params?: unknown) => commands["DOM.highlightRect"].result.parse(await send("DOM.highlightRect", commands["DOM.highlightRect"].params.parse(params ?? {}))), "DOM.highlightRect", "command"), + markUndoableState: withCdpName(async (params?: unknown) => commands["DOM.markUndoableState"].result.parse(await send("DOM.markUndoableState", commands["DOM.markUndoableState"].params.parse(params ?? {}))), "DOM.markUndoableState", "command"), + moveTo: withCdpName(async (params?: unknown) => commands["DOM.moveTo"].result.parse(await send("DOM.moveTo", commands["DOM.moveTo"].params.parse(params ?? {}))), "DOM.moveTo", "command"), + performSearch: withCdpName(async (params?: unknown) => commands["DOM.performSearch"].result.parse(await send("DOM.performSearch", commands["DOM.performSearch"].params.parse(params ?? {}))), "DOM.performSearch", "command"), + pushNodeByPathToFrontend: withCdpName(async (params?: unknown) => commands["DOM.pushNodeByPathToFrontend"].result.parse(await send("DOM.pushNodeByPathToFrontend", commands["DOM.pushNodeByPathToFrontend"].params.parse(params ?? {}))), "DOM.pushNodeByPathToFrontend", "command"), + pushNodesByBackendIdsToFrontend: withCdpName(async (params?: unknown) => commands["DOM.pushNodesByBackendIdsToFrontend"].result.parse(await send("DOM.pushNodesByBackendIdsToFrontend", commands["DOM.pushNodesByBackendIdsToFrontend"].params.parse(params ?? {}))), "DOM.pushNodesByBackendIdsToFrontend", "command"), + querySelector: withCdpName(async (params?: unknown) => commands["DOM.querySelector"].result.parse(await send("DOM.querySelector", commands["DOM.querySelector"].params.parse(params ?? {}))), "DOM.querySelector", "command"), + querySelectorAll: withCdpName(async (params?: unknown) => commands["DOM.querySelectorAll"].result.parse(await send("DOM.querySelectorAll", commands["DOM.querySelectorAll"].params.parse(params ?? {}))), "DOM.querySelectorAll", "command"), + getTopLayerElements: withCdpName(async (params?: unknown) => commands["DOM.getTopLayerElements"].result.parse(await send("DOM.getTopLayerElements", commands["DOM.getTopLayerElements"].params.parse(params ?? {}))), "DOM.getTopLayerElements", "command"), + getElementByRelation: withCdpName(async (params?: unknown) => commands["DOM.getElementByRelation"].result.parse(await send("DOM.getElementByRelation", commands["DOM.getElementByRelation"].params.parse(params ?? {}))), "DOM.getElementByRelation", "command"), + redo: withCdpName(async (params?: unknown) => commands["DOM.redo"].result.parse(await send("DOM.redo", commands["DOM.redo"].params.parse(params ?? {}))), "DOM.redo", "command"), + removeAttribute: withCdpName(async (params?: unknown) => commands["DOM.removeAttribute"].result.parse(await send("DOM.removeAttribute", commands["DOM.removeAttribute"].params.parse(params ?? {}))), "DOM.removeAttribute", "command"), + removeNode: withCdpName(async (params?: unknown) => commands["DOM.removeNode"].result.parse(await send("DOM.removeNode", commands["DOM.removeNode"].params.parse(params ?? {}))), "DOM.removeNode", "command"), + requestChildNodes: withCdpName(async (params?: unknown) => commands["DOM.requestChildNodes"].result.parse(await send("DOM.requestChildNodes", commands["DOM.requestChildNodes"].params.parse(params ?? {}))), "DOM.requestChildNodes", "command"), + requestNode: withCdpName(async (params?: unknown) => commands["DOM.requestNode"].result.parse(await send("DOM.requestNode", commands["DOM.requestNode"].params.parse(params ?? {}))), "DOM.requestNode", "command"), + resolveNode: withCdpName(async (params?: unknown) => commands["DOM.resolveNode"].result.parse(await send("DOM.resolveNode", commands["DOM.resolveNode"].params.parse(params ?? {}))), "DOM.resolveNode", "command"), + setAttributeValue: withCdpName(async (params?: unknown) => commands["DOM.setAttributeValue"].result.parse(await send("DOM.setAttributeValue", commands["DOM.setAttributeValue"].params.parse(params ?? {}))), "DOM.setAttributeValue", "command"), + setAttributesAsText: withCdpName(async (params?: unknown) => commands["DOM.setAttributesAsText"].result.parse(await send("DOM.setAttributesAsText", commands["DOM.setAttributesAsText"].params.parse(params ?? {}))), "DOM.setAttributesAsText", "command"), + setFileInputFiles: withCdpName(async (params?: unknown) => commands["DOM.setFileInputFiles"].result.parse(await send("DOM.setFileInputFiles", commands["DOM.setFileInputFiles"].params.parse(params ?? {}))), "DOM.setFileInputFiles", "command"), + setNodeStackTracesEnabled: withCdpName(async (params?: unknown) => commands["DOM.setNodeStackTracesEnabled"].result.parse(await send("DOM.setNodeStackTracesEnabled", commands["DOM.setNodeStackTracesEnabled"].params.parse(params ?? {}))), "DOM.setNodeStackTracesEnabled", "command"), + getNodeStackTraces: withCdpName(async (params?: unknown) => commands["DOM.getNodeStackTraces"].result.parse(await send("DOM.getNodeStackTraces", commands["DOM.getNodeStackTraces"].params.parse(params ?? {}))), "DOM.getNodeStackTraces", "command"), + getFileInfo: withCdpName(async (params?: unknown) => commands["DOM.getFileInfo"].result.parse(await send("DOM.getFileInfo", commands["DOM.getFileInfo"].params.parse(params ?? {}))), "DOM.getFileInfo", "command"), + getDetachedDomNodes: withCdpName(async (params?: unknown) => commands["DOM.getDetachedDomNodes"].result.parse(await send("DOM.getDetachedDomNodes", commands["DOM.getDetachedDomNodes"].params.parse(params ?? {}))), "DOM.getDetachedDomNodes", "command"), + setInspectedNode: withCdpName(async (params?: unknown) => commands["DOM.setInspectedNode"].result.parse(await send("DOM.setInspectedNode", commands["DOM.setInspectedNode"].params.parse(params ?? {}))), "DOM.setInspectedNode", "command"), + setNodeName: withCdpName(async (params?: unknown) => commands["DOM.setNodeName"].result.parse(await send("DOM.setNodeName", commands["DOM.setNodeName"].params.parse(params ?? {}))), "DOM.setNodeName", "command"), + setNodeValue: withCdpName(async (params?: unknown) => commands["DOM.setNodeValue"].result.parse(await send("DOM.setNodeValue", commands["DOM.setNodeValue"].params.parse(params ?? {}))), "DOM.setNodeValue", "command"), + setOuterHTML: withCdpName(async (params?: unknown) => commands["DOM.setOuterHTML"].result.parse(await send("DOM.setOuterHTML", commands["DOM.setOuterHTML"].params.parse(params ?? {}))), "DOM.setOuterHTML", "command"), + undo: withCdpName(async (params?: unknown) => commands["DOM.undo"].result.parse(await send("DOM.undo", commands["DOM.undo"].params.parse(params ?? {}))), "DOM.undo", "command"), + getFrameOwner: withCdpName(async (params?: unknown) => commands["DOM.getFrameOwner"].result.parse(await send("DOM.getFrameOwner", commands["DOM.getFrameOwner"].params.parse(params ?? {}))), "DOM.getFrameOwner", "command"), + getContainerForNode: withCdpName(async (params?: unknown) => commands["DOM.getContainerForNode"].result.parse(await send("DOM.getContainerForNode", commands["DOM.getContainerForNode"].params.parse(params ?? {}))), "DOM.getContainerForNode", "command"), + getQueryingDescendantsForContainer: withCdpName(async (params?: unknown) => commands["DOM.getQueryingDescendantsForContainer"].result.parse(await send("DOM.getQueryingDescendantsForContainer", commands["DOM.getQueryingDescendantsForContainer"].params.parse(params ?? {}))), "DOM.getQueryingDescendantsForContainer", "command"), + getAnchorElement: withCdpName(async (params?: unknown) => commands["DOM.getAnchorElement"].result.parse(await send("DOM.getAnchorElement", commands["DOM.getAnchorElement"].params.parse(params ?? {}))), "DOM.getAnchorElement", "command"), + forceShowPopover: withCdpName(async (params?: unknown) => commands["DOM.forceShowPopover"].result.parse(await send("DOM.forceShowPopover", commands["DOM.forceShowPopover"].params.parse(params ?? {}))), "DOM.forceShowPopover", "command"), + attributeModified: events["DOM.attributeModified"] as CdpEventAlias, + adoptedStyleSheetsModified: events["DOM.adoptedStyleSheetsModified"] as CdpEventAlias, + attributeRemoved: events["DOM.attributeRemoved"] as CdpEventAlias, + characterDataModified: events["DOM.characterDataModified"] as CdpEventAlias, + childNodeCountUpdated: events["DOM.childNodeCountUpdated"] as CdpEventAlias, + childNodeInserted: events["DOM.childNodeInserted"] as CdpEventAlias, + childNodeRemoved: events["DOM.childNodeRemoved"] as CdpEventAlias, + distributedNodesUpdated: events["DOM.distributedNodesUpdated"] as CdpEventAlias, + documentUpdated: events["DOM.documentUpdated"] as CdpEventAlias, + inlineStyleInvalidated: events["DOM.inlineStyleInvalidated"] as CdpEventAlias, + pseudoElementAdded: events["DOM.pseudoElementAdded"] as CdpEventAlias, + topLayerElementsUpdated: events["DOM.topLayerElementsUpdated"] as CdpEventAlias, + scrollableFlagUpdated: events["DOM.scrollableFlagUpdated"] as CdpEventAlias, + adRelatedStateUpdated: events["DOM.adRelatedStateUpdated"] as CdpEventAlias, + affectedByStartingStylesFlagUpdated: events["DOM.affectedByStartingStylesFlagUpdated"] as CdpEventAlias, + pseudoElementRemoved: events["DOM.pseudoElementRemoved"] as CdpEventAlias, + setChildNodes: events["DOM.setChildNodes"] as CdpEventAlias, + shadowRootPopped: events["DOM.shadowRootPopped"] as CdpEventAlias, + shadowRootPushed: events["DOM.shadowRootPushed"] as CdpEventAlias, }, DOMDebugger: { - getEventListeners: withCdpName( - async (params?: unknown) => - commands["DOMDebugger.getEventListeners"].result.parse( - await send( - "DOMDebugger.getEventListeners", - commands["DOMDebugger.getEventListeners"].params.parse(params ?? {}), - ), - ), - "DOMDebugger.getEventListeners", - "command", - ), - removeDOMBreakpoint: withCdpName( - async (params?: unknown) => - commands["DOMDebugger.removeDOMBreakpoint"].result.parse( - await send( - "DOMDebugger.removeDOMBreakpoint", - commands["DOMDebugger.removeDOMBreakpoint"].params.parse(params ?? {}), - ), - ), - "DOMDebugger.removeDOMBreakpoint", - "command", - ), - removeEventListenerBreakpoint: withCdpName( - async (params?: unknown) => - commands["DOMDebugger.removeEventListenerBreakpoint"].result.parse( - await send( - "DOMDebugger.removeEventListenerBreakpoint", - commands["DOMDebugger.removeEventListenerBreakpoint"].params.parse(params ?? {}), - ), - ), - "DOMDebugger.removeEventListenerBreakpoint", - "command", - ), - removeInstrumentationBreakpoint: withCdpName( - async (params?: unknown) => - commands["DOMDebugger.removeInstrumentationBreakpoint"].result.parse( - await send( - "DOMDebugger.removeInstrumentationBreakpoint", - commands["DOMDebugger.removeInstrumentationBreakpoint"].params.parse(params ?? {}), - ), - ), - "DOMDebugger.removeInstrumentationBreakpoint", - "command", - ), - removeXHRBreakpoint: withCdpName( - async (params?: unknown) => - commands["DOMDebugger.removeXHRBreakpoint"].result.parse( - await send( - "DOMDebugger.removeXHRBreakpoint", - commands["DOMDebugger.removeXHRBreakpoint"].params.parse(params ?? {}), - ), - ), - "DOMDebugger.removeXHRBreakpoint", - "command", - ), - setBreakOnCSPViolation: withCdpName( - async (params?: unknown) => - commands["DOMDebugger.setBreakOnCSPViolation"].result.parse( - await send( - "DOMDebugger.setBreakOnCSPViolation", - commands["DOMDebugger.setBreakOnCSPViolation"].params.parse(params ?? {}), - ), - ), - "DOMDebugger.setBreakOnCSPViolation", - "command", - ), - setDOMBreakpoint: withCdpName( - async (params?: unknown) => - commands["DOMDebugger.setDOMBreakpoint"].result.parse( - await send( - "DOMDebugger.setDOMBreakpoint", - commands["DOMDebugger.setDOMBreakpoint"].params.parse(params ?? {}), - ), - ), - "DOMDebugger.setDOMBreakpoint", - "command", - ), - setEventListenerBreakpoint: withCdpName( - async (params?: unknown) => - commands["DOMDebugger.setEventListenerBreakpoint"].result.parse( - await send( - "DOMDebugger.setEventListenerBreakpoint", - commands["DOMDebugger.setEventListenerBreakpoint"].params.parse(params ?? {}), - ), - ), - "DOMDebugger.setEventListenerBreakpoint", - "command", - ), - setInstrumentationBreakpoint: withCdpName( - async (params?: unknown) => - commands["DOMDebugger.setInstrumentationBreakpoint"].result.parse( - await send( - "DOMDebugger.setInstrumentationBreakpoint", - commands["DOMDebugger.setInstrumentationBreakpoint"].params.parse(params ?? {}), - ), - ), - "DOMDebugger.setInstrumentationBreakpoint", - "command", - ), - setXHRBreakpoint: withCdpName( - async (params?: unknown) => - commands["DOMDebugger.setXHRBreakpoint"].result.parse( - await send( - "DOMDebugger.setXHRBreakpoint", - commands["DOMDebugger.setXHRBreakpoint"].params.parse(params ?? {}), - ), - ), - "DOMDebugger.setXHRBreakpoint", - "command", - ), + getEventListeners: withCdpName(async (params?: unknown) => commands["DOMDebugger.getEventListeners"].result.parse(await send("DOMDebugger.getEventListeners", commands["DOMDebugger.getEventListeners"].params.parse(params ?? {}))), "DOMDebugger.getEventListeners", "command"), + removeDOMBreakpoint: withCdpName(async (params?: unknown) => commands["DOMDebugger.removeDOMBreakpoint"].result.parse(await send("DOMDebugger.removeDOMBreakpoint", commands["DOMDebugger.removeDOMBreakpoint"].params.parse(params ?? {}))), "DOMDebugger.removeDOMBreakpoint", "command"), + removeEventListenerBreakpoint: withCdpName(async (params?: unknown) => commands["DOMDebugger.removeEventListenerBreakpoint"].result.parse(await send("DOMDebugger.removeEventListenerBreakpoint", commands["DOMDebugger.removeEventListenerBreakpoint"].params.parse(params ?? {}))), "DOMDebugger.removeEventListenerBreakpoint", "command"), + removeInstrumentationBreakpoint: withCdpName(async (params?: unknown) => commands["DOMDebugger.removeInstrumentationBreakpoint"].result.parse(await send("DOMDebugger.removeInstrumentationBreakpoint", commands["DOMDebugger.removeInstrumentationBreakpoint"].params.parse(params ?? {}))), "DOMDebugger.removeInstrumentationBreakpoint", "command"), + removeXHRBreakpoint: withCdpName(async (params?: unknown) => commands["DOMDebugger.removeXHRBreakpoint"].result.parse(await send("DOMDebugger.removeXHRBreakpoint", commands["DOMDebugger.removeXHRBreakpoint"].params.parse(params ?? {}))), "DOMDebugger.removeXHRBreakpoint", "command"), + setBreakOnCSPViolation: withCdpName(async (params?: unknown) => commands["DOMDebugger.setBreakOnCSPViolation"].result.parse(await send("DOMDebugger.setBreakOnCSPViolation", commands["DOMDebugger.setBreakOnCSPViolation"].params.parse(params ?? {}))), "DOMDebugger.setBreakOnCSPViolation", "command"), + setDOMBreakpoint: withCdpName(async (params?: unknown) => commands["DOMDebugger.setDOMBreakpoint"].result.parse(await send("DOMDebugger.setDOMBreakpoint", commands["DOMDebugger.setDOMBreakpoint"].params.parse(params ?? {}))), "DOMDebugger.setDOMBreakpoint", "command"), + setEventListenerBreakpoint: withCdpName(async (params?: unknown) => commands["DOMDebugger.setEventListenerBreakpoint"].result.parse(await send("DOMDebugger.setEventListenerBreakpoint", commands["DOMDebugger.setEventListenerBreakpoint"].params.parse(params ?? {}))), "DOMDebugger.setEventListenerBreakpoint", "command"), + setInstrumentationBreakpoint: withCdpName(async (params?: unknown) => commands["DOMDebugger.setInstrumentationBreakpoint"].result.parse(await send("DOMDebugger.setInstrumentationBreakpoint", commands["DOMDebugger.setInstrumentationBreakpoint"].params.parse(params ?? {}))), "DOMDebugger.setInstrumentationBreakpoint", "command"), + setXHRBreakpoint: withCdpName(async (params?: unknown) => commands["DOMDebugger.setXHRBreakpoint"].result.parse(await send("DOMDebugger.setXHRBreakpoint", commands["DOMDebugger.setXHRBreakpoint"].params.parse(params ?? {}))), "DOMDebugger.setXHRBreakpoint", "command"), }, DOMSnapshot: { - disable: withCdpName( - async (params?: unknown) => - commands["DOMSnapshot.disable"].result.parse( - await send("DOMSnapshot.disable", commands["DOMSnapshot.disable"].params.parse(params ?? {})), - ), - "DOMSnapshot.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["DOMSnapshot.enable"].result.parse( - await send("DOMSnapshot.enable", commands["DOMSnapshot.enable"].params.parse(params ?? {})), - ), - "DOMSnapshot.enable", - "command", - ), - getSnapshot: withCdpName( - async (params?: unknown) => - commands["DOMSnapshot.getSnapshot"].result.parse( - await send("DOMSnapshot.getSnapshot", commands["DOMSnapshot.getSnapshot"].params.parse(params ?? {})), - ), - "DOMSnapshot.getSnapshot", - "command", - ), - captureSnapshot: withCdpName( - async (params?: unknown) => - commands["DOMSnapshot.captureSnapshot"].result.parse( - await send( - "DOMSnapshot.captureSnapshot", - commands["DOMSnapshot.captureSnapshot"].params.parse(params ?? {}), - ), - ), - "DOMSnapshot.captureSnapshot", - "command", - ), + disable: withCdpName(async (params?: unknown) => commands["DOMSnapshot.disable"].result.parse(await send("DOMSnapshot.disable", commands["DOMSnapshot.disable"].params.parse(params ?? {}))), "DOMSnapshot.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["DOMSnapshot.enable"].result.parse(await send("DOMSnapshot.enable", commands["DOMSnapshot.enable"].params.parse(params ?? {}))), "DOMSnapshot.enable", "command"), + getSnapshot: withCdpName(async (params?: unknown) => commands["DOMSnapshot.getSnapshot"].result.parse(await send("DOMSnapshot.getSnapshot", commands["DOMSnapshot.getSnapshot"].params.parse(params ?? {}))), "DOMSnapshot.getSnapshot", "command"), + captureSnapshot: withCdpName(async (params?: unknown) => commands["DOMSnapshot.captureSnapshot"].result.parse(await send("DOMSnapshot.captureSnapshot", commands["DOMSnapshot.captureSnapshot"].params.parse(params ?? {}))), "DOMSnapshot.captureSnapshot", "command"), }, DOMStorage: { - clear: withCdpName( - async (params?: unknown) => - commands["DOMStorage.clear"].result.parse( - await send("DOMStorage.clear", commands["DOMStorage.clear"].params.parse(params ?? {})), - ), - "DOMStorage.clear", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["DOMStorage.disable"].result.parse( - await send("DOMStorage.disable", commands["DOMStorage.disable"].params.parse(params ?? {})), - ), - "DOMStorage.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["DOMStorage.enable"].result.parse( - await send("DOMStorage.enable", commands["DOMStorage.enable"].params.parse(params ?? {})), - ), - "DOMStorage.enable", - "command", - ), - getDOMStorageItems: withCdpName( - async (params?: unknown) => - commands["DOMStorage.getDOMStorageItems"].result.parse( - await send( - "DOMStorage.getDOMStorageItems", - commands["DOMStorage.getDOMStorageItems"].params.parse(params ?? {}), - ), - ), - "DOMStorage.getDOMStorageItems", - "command", - ), - removeDOMStorageItem: withCdpName( - async (params?: unknown) => - commands["DOMStorage.removeDOMStorageItem"].result.parse( - await send( - "DOMStorage.removeDOMStorageItem", - commands["DOMStorage.removeDOMStorageItem"].params.parse(params ?? {}), - ), - ), - "DOMStorage.removeDOMStorageItem", - "command", - ), - setDOMStorageItem: withCdpName( - async (params?: unknown) => - commands["DOMStorage.setDOMStorageItem"].result.parse( - await send( - "DOMStorage.setDOMStorageItem", - commands["DOMStorage.setDOMStorageItem"].params.parse(params ?? {}), - ), - ), - "DOMStorage.setDOMStorageItem", - "command", - ), - domStorageItemAdded: events["DOMStorage.domStorageItemAdded"] as CdpEventAlias< - cdp.types.ts.DOMStorage.DomStorageItemAddedEvent, - "DOMStorage.domStorageItemAdded" - >, - domStorageItemRemoved: events["DOMStorage.domStorageItemRemoved"] as CdpEventAlias< - cdp.types.ts.DOMStorage.DomStorageItemRemovedEvent, - "DOMStorage.domStorageItemRemoved" - >, - domStorageItemUpdated: events["DOMStorage.domStorageItemUpdated"] as CdpEventAlias< - cdp.types.ts.DOMStorage.DomStorageItemUpdatedEvent, - "DOMStorage.domStorageItemUpdated" - >, - domStorageItemsCleared: events["DOMStorage.domStorageItemsCleared"] as CdpEventAlias< - cdp.types.ts.DOMStorage.DomStorageItemsClearedEvent, - "DOMStorage.domStorageItemsCleared" - >, + clear: withCdpName(async (params?: unknown) => commands["DOMStorage.clear"].result.parse(await send("DOMStorage.clear", commands["DOMStorage.clear"].params.parse(params ?? {}))), "DOMStorage.clear", "command"), + disable: withCdpName(async (params?: unknown) => commands["DOMStorage.disable"].result.parse(await send("DOMStorage.disable", commands["DOMStorage.disable"].params.parse(params ?? {}))), "DOMStorage.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["DOMStorage.enable"].result.parse(await send("DOMStorage.enable", commands["DOMStorage.enable"].params.parse(params ?? {}))), "DOMStorage.enable", "command"), + getDOMStorageItems: withCdpName(async (params?: unknown) => commands["DOMStorage.getDOMStorageItems"].result.parse(await send("DOMStorage.getDOMStorageItems", commands["DOMStorage.getDOMStorageItems"].params.parse(params ?? {}))), "DOMStorage.getDOMStorageItems", "command"), + removeDOMStorageItem: withCdpName(async (params?: unknown) => commands["DOMStorage.removeDOMStorageItem"].result.parse(await send("DOMStorage.removeDOMStorageItem", commands["DOMStorage.removeDOMStorageItem"].params.parse(params ?? {}))), "DOMStorage.removeDOMStorageItem", "command"), + setDOMStorageItem: withCdpName(async (params?: unknown) => commands["DOMStorage.setDOMStorageItem"].result.parse(await send("DOMStorage.setDOMStorageItem", commands["DOMStorage.setDOMStorageItem"].params.parse(params ?? {}))), "DOMStorage.setDOMStorageItem", "command"), + domStorageItemAdded: events["DOMStorage.domStorageItemAdded"] as CdpEventAlias, + domStorageItemRemoved: events["DOMStorage.domStorageItemRemoved"] as CdpEventAlias, + domStorageItemUpdated: events["DOMStorage.domStorageItemUpdated"] as CdpEventAlias, + domStorageItemsCleared: events["DOMStorage.domStorageItemsCleared"] as CdpEventAlias, }, Emulation: { - canEmulate: withCdpName( - async (params?: unknown) => - commands["Emulation.canEmulate"].result.parse( - await send("Emulation.canEmulate", commands["Emulation.canEmulate"].params.parse(params ?? {})), - ), - "Emulation.canEmulate", - "command", - ), - clearDeviceMetricsOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.clearDeviceMetricsOverride"].result.parse( - await send( - "Emulation.clearDeviceMetricsOverride", - commands["Emulation.clearDeviceMetricsOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.clearDeviceMetricsOverride", - "command", - ), - clearGeolocationOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.clearGeolocationOverride"].result.parse( - await send( - "Emulation.clearGeolocationOverride", - commands["Emulation.clearGeolocationOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.clearGeolocationOverride", - "command", - ), - resetPageScaleFactor: withCdpName( - async (params?: unknown) => - commands["Emulation.resetPageScaleFactor"].result.parse( - await send( - "Emulation.resetPageScaleFactor", - commands["Emulation.resetPageScaleFactor"].params.parse(params ?? {}), - ), - ), - "Emulation.resetPageScaleFactor", - "command", - ), - setFocusEmulationEnabled: withCdpName( - async (params?: unknown) => - commands["Emulation.setFocusEmulationEnabled"].result.parse( - await send( - "Emulation.setFocusEmulationEnabled", - commands["Emulation.setFocusEmulationEnabled"].params.parse(params ?? {}), - ), - ), - "Emulation.setFocusEmulationEnabled", - "command", - ), - setAutoDarkModeOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setAutoDarkModeOverride"].result.parse( - await send( - "Emulation.setAutoDarkModeOverride", - commands["Emulation.setAutoDarkModeOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setAutoDarkModeOverride", - "command", - ), - setCPUThrottlingRate: withCdpName( - async (params?: unknown) => - commands["Emulation.setCPUThrottlingRate"].result.parse( - await send( - "Emulation.setCPUThrottlingRate", - commands["Emulation.setCPUThrottlingRate"].params.parse(params ?? {}), - ), - ), - "Emulation.setCPUThrottlingRate", - "command", - ), - setDefaultBackgroundColorOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setDefaultBackgroundColorOverride"].result.parse( - await send( - "Emulation.setDefaultBackgroundColorOverride", - commands["Emulation.setDefaultBackgroundColorOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setDefaultBackgroundColorOverride", - "command", - ), - setSafeAreaInsetsOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setSafeAreaInsetsOverride"].result.parse( - await send( - "Emulation.setSafeAreaInsetsOverride", - commands["Emulation.setSafeAreaInsetsOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setSafeAreaInsetsOverride", - "command", - ), - setDeviceMetricsOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setDeviceMetricsOverride"].result.parse( - await send( - "Emulation.setDeviceMetricsOverride", - commands["Emulation.setDeviceMetricsOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setDeviceMetricsOverride", - "command", - ), - setDevicePostureOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setDevicePostureOverride"].result.parse( - await send( - "Emulation.setDevicePostureOverride", - commands["Emulation.setDevicePostureOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setDevicePostureOverride", - "command", - ), - clearDevicePostureOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.clearDevicePostureOverride"].result.parse( - await send( - "Emulation.clearDevicePostureOverride", - commands["Emulation.clearDevicePostureOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.clearDevicePostureOverride", - "command", - ), - setDisplayFeaturesOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setDisplayFeaturesOverride"].result.parse( - await send( - "Emulation.setDisplayFeaturesOverride", - commands["Emulation.setDisplayFeaturesOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setDisplayFeaturesOverride", - "command", - ), - clearDisplayFeaturesOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.clearDisplayFeaturesOverride"].result.parse( - await send( - "Emulation.clearDisplayFeaturesOverride", - commands["Emulation.clearDisplayFeaturesOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.clearDisplayFeaturesOverride", - "command", - ), - setScrollbarsHidden: withCdpName( - async (params?: unknown) => - commands["Emulation.setScrollbarsHidden"].result.parse( - await send( - "Emulation.setScrollbarsHidden", - commands["Emulation.setScrollbarsHidden"].params.parse(params ?? {}), - ), - ), - "Emulation.setScrollbarsHidden", - "command", - ), - setDocumentCookieDisabled: withCdpName( - async (params?: unknown) => - commands["Emulation.setDocumentCookieDisabled"].result.parse( - await send( - "Emulation.setDocumentCookieDisabled", - commands["Emulation.setDocumentCookieDisabled"].params.parse(params ?? {}), - ), - ), - "Emulation.setDocumentCookieDisabled", - "command", - ), - setEmitTouchEventsForMouse: withCdpName( - async (params?: unknown) => - commands["Emulation.setEmitTouchEventsForMouse"].result.parse( - await send( - "Emulation.setEmitTouchEventsForMouse", - commands["Emulation.setEmitTouchEventsForMouse"].params.parse(params ?? {}), - ), - ), - "Emulation.setEmitTouchEventsForMouse", - "command", - ), - setEmulatedMedia: withCdpName( - async (params?: unknown) => - commands["Emulation.setEmulatedMedia"].result.parse( - await send("Emulation.setEmulatedMedia", commands["Emulation.setEmulatedMedia"].params.parse(params ?? {})), - ), - "Emulation.setEmulatedMedia", - "command", - ), - setEmulatedVisionDeficiency: withCdpName( - async (params?: unknown) => - commands["Emulation.setEmulatedVisionDeficiency"].result.parse( - await send( - "Emulation.setEmulatedVisionDeficiency", - commands["Emulation.setEmulatedVisionDeficiency"].params.parse(params ?? {}), - ), - ), - "Emulation.setEmulatedVisionDeficiency", - "command", - ), - setEmulatedOSTextScale: withCdpName( - async (params?: unknown) => - commands["Emulation.setEmulatedOSTextScale"].result.parse( - await send( - "Emulation.setEmulatedOSTextScale", - commands["Emulation.setEmulatedOSTextScale"].params.parse(params ?? {}), - ), - ), - "Emulation.setEmulatedOSTextScale", - "command", - ), - setGeolocationOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setGeolocationOverride"].result.parse( - await send( - "Emulation.setGeolocationOverride", - commands["Emulation.setGeolocationOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setGeolocationOverride", - "command", - ), - getOverriddenSensorInformation: withCdpName( - async (params?: unknown) => - commands["Emulation.getOverriddenSensorInformation"].result.parse( - await send( - "Emulation.getOverriddenSensorInformation", - commands["Emulation.getOverriddenSensorInformation"].params.parse(params ?? {}), - ), - ), - "Emulation.getOverriddenSensorInformation", - "command", - ), - setSensorOverrideEnabled: withCdpName( - async (params?: unknown) => - commands["Emulation.setSensorOverrideEnabled"].result.parse( - await send( - "Emulation.setSensorOverrideEnabled", - commands["Emulation.setSensorOverrideEnabled"].params.parse(params ?? {}), - ), - ), - "Emulation.setSensorOverrideEnabled", - "command", - ), - setSensorOverrideReadings: withCdpName( - async (params?: unknown) => - commands["Emulation.setSensorOverrideReadings"].result.parse( - await send( - "Emulation.setSensorOverrideReadings", - commands["Emulation.setSensorOverrideReadings"].params.parse(params ?? {}), - ), - ), - "Emulation.setSensorOverrideReadings", - "command", - ), - setPressureSourceOverrideEnabled: withCdpName( - async (params?: unknown) => - commands["Emulation.setPressureSourceOverrideEnabled"].result.parse( - await send( - "Emulation.setPressureSourceOverrideEnabled", - commands["Emulation.setPressureSourceOverrideEnabled"].params.parse(params ?? {}), - ), - ), - "Emulation.setPressureSourceOverrideEnabled", - "command", - ), - setPressureStateOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setPressureStateOverride"].result.parse( - await send( - "Emulation.setPressureStateOverride", - commands["Emulation.setPressureStateOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setPressureStateOverride", - "command", - ), - setPressureDataOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setPressureDataOverride"].result.parse( - await send( - "Emulation.setPressureDataOverride", - commands["Emulation.setPressureDataOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setPressureDataOverride", - "command", - ), - setIdleOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setIdleOverride"].result.parse( - await send("Emulation.setIdleOverride", commands["Emulation.setIdleOverride"].params.parse(params ?? {})), - ), - "Emulation.setIdleOverride", - "command", - ), - clearIdleOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.clearIdleOverride"].result.parse( - await send( - "Emulation.clearIdleOverride", - commands["Emulation.clearIdleOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.clearIdleOverride", - "command", - ), - setNavigatorOverrides: withCdpName( - async (params?: unknown) => - commands["Emulation.setNavigatorOverrides"].result.parse( - await send( - "Emulation.setNavigatorOverrides", - commands["Emulation.setNavigatorOverrides"].params.parse(params ?? {}), - ), - ), - "Emulation.setNavigatorOverrides", - "command", - ), - setPageScaleFactor: withCdpName( - async (params?: unknown) => - commands["Emulation.setPageScaleFactor"].result.parse( - await send( - "Emulation.setPageScaleFactor", - commands["Emulation.setPageScaleFactor"].params.parse(params ?? {}), - ), - ), - "Emulation.setPageScaleFactor", - "command", - ), - setScriptExecutionDisabled: withCdpName( - async (params?: unknown) => - commands["Emulation.setScriptExecutionDisabled"].result.parse( - await send( - "Emulation.setScriptExecutionDisabled", - commands["Emulation.setScriptExecutionDisabled"].params.parse(params ?? {}), - ), - ), - "Emulation.setScriptExecutionDisabled", - "command", - ), - setTouchEmulationEnabled: withCdpName( - async (params?: unknown) => - commands["Emulation.setTouchEmulationEnabled"].result.parse( - await send( - "Emulation.setTouchEmulationEnabled", - commands["Emulation.setTouchEmulationEnabled"].params.parse(params ?? {}), - ), - ), - "Emulation.setTouchEmulationEnabled", - "command", - ), - setVirtualTimePolicy: withCdpName( - async (params?: unknown) => - commands["Emulation.setVirtualTimePolicy"].result.parse( - await send( - "Emulation.setVirtualTimePolicy", - commands["Emulation.setVirtualTimePolicy"].params.parse(params ?? {}), - ), - ), - "Emulation.setVirtualTimePolicy", - "command", - ), - setLocaleOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setLocaleOverride"].result.parse( - await send( - "Emulation.setLocaleOverride", - commands["Emulation.setLocaleOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setLocaleOverride", - "command", - ), - setTimezoneOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setTimezoneOverride"].result.parse( - await send( - "Emulation.setTimezoneOverride", - commands["Emulation.setTimezoneOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setTimezoneOverride", - "command", - ), - setVisibleSize: withCdpName( - async (params?: unknown) => - commands["Emulation.setVisibleSize"].result.parse( - await send("Emulation.setVisibleSize", commands["Emulation.setVisibleSize"].params.parse(params ?? {})), - ), - "Emulation.setVisibleSize", - "command", - ), - setDisabledImageTypes: withCdpName( - async (params?: unknown) => - commands["Emulation.setDisabledImageTypes"].result.parse( - await send( - "Emulation.setDisabledImageTypes", - commands["Emulation.setDisabledImageTypes"].params.parse(params ?? {}), - ), - ), - "Emulation.setDisabledImageTypes", - "command", - ), - setDataSaverOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setDataSaverOverride"].result.parse( - await send( - "Emulation.setDataSaverOverride", - commands["Emulation.setDataSaverOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setDataSaverOverride", - "command", - ), - setHardwareConcurrencyOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setHardwareConcurrencyOverride"].result.parse( - await send( - "Emulation.setHardwareConcurrencyOverride", - commands["Emulation.setHardwareConcurrencyOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setHardwareConcurrencyOverride", - "command", - ), - setUserAgentOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setUserAgentOverride"].result.parse( - await send( - "Emulation.setUserAgentOverride", - commands["Emulation.setUserAgentOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setUserAgentOverride", - "command", - ), - setAutomationOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setAutomationOverride"].result.parse( - await send( - "Emulation.setAutomationOverride", - commands["Emulation.setAutomationOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setAutomationOverride", - "command", - ), - setSmallViewportHeightDifferenceOverride: withCdpName( - async (params?: unknown) => - commands["Emulation.setSmallViewportHeightDifferenceOverride"].result.parse( - await send( - "Emulation.setSmallViewportHeightDifferenceOverride", - commands["Emulation.setSmallViewportHeightDifferenceOverride"].params.parse(params ?? {}), - ), - ), - "Emulation.setSmallViewportHeightDifferenceOverride", - "command", - ), - getScreenInfos: withCdpName( - async (params?: unknown) => - commands["Emulation.getScreenInfos"].result.parse( - await send("Emulation.getScreenInfos", commands["Emulation.getScreenInfos"].params.parse(params ?? {})), - ), - "Emulation.getScreenInfos", - "command", - ), - addScreen: withCdpName( - async (params?: unknown) => - commands["Emulation.addScreen"].result.parse( - await send("Emulation.addScreen", commands["Emulation.addScreen"].params.parse(params ?? {})), - ), - "Emulation.addScreen", - "command", - ), - updateScreen: withCdpName( - async (params?: unknown) => - commands["Emulation.updateScreen"].result.parse( - await send("Emulation.updateScreen", commands["Emulation.updateScreen"].params.parse(params ?? {})), - ), - "Emulation.updateScreen", - "command", - ), - removeScreen: withCdpName( - async (params?: unknown) => - commands["Emulation.removeScreen"].result.parse( - await send("Emulation.removeScreen", commands["Emulation.removeScreen"].params.parse(params ?? {})), - ), - "Emulation.removeScreen", - "command", - ), - setPrimaryScreen: withCdpName( - async (params?: unknown) => - commands["Emulation.setPrimaryScreen"].result.parse( - await send("Emulation.setPrimaryScreen", commands["Emulation.setPrimaryScreen"].params.parse(params ?? {})), - ), - "Emulation.setPrimaryScreen", - "command", - ), - virtualTimeBudgetExpired: events["Emulation.virtualTimeBudgetExpired"] as CdpEventAlias< - cdp.types.ts.Emulation.VirtualTimeBudgetExpiredEvent, - "Emulation.virtualTimeBudgetExpired" - >, - screenOrientationLockChanged: events["Emulation.screenOrientationLockChanged"] as CdpEventAlias< - cdp.types.ts.Emulation.ScreenOrientationLockChangedEvent, - "Emulation.screenOrientationLockChanged" - >, + canEmulate: withCdpName(async (params?: unknown) => commands["Emulation.canEmulate"].result.parse(await send("Emulation.canEmulate", commands["Emulation.canEmulate"].params.parse(params ?? {}))), "Emulation.canEmulate", "command"), + clearDeviceMetricsOverride: withCdpName(async (params?: unknown) => commands["Emulation.clearDeviceMetricsOverride"].result.parse(await send("Emulation.clearDeviceMetricsOverride", commands["Emulation.clearDeviceMetricsOverride"].params.parse(params ?? {}))), "Emulation.clearDeviceMetricsOverride", "command"), + clearGeolocationOverride: withCdpName(async (params?: unknown) => commands["Emulation.clearGeolocationOverride"].result.parse(await send("Emulation.clearGeolocationOverride", commands["Emulation.clearGeolocationOverride"].params.parse(params ?? {}))), "Emulation.clearGeolocationOverride", "command"), + resetPageScaleFactor: withCdpName(async (params?: unknown) => commands["Emulation.resetPageScaleFactor"].result.parse(await send("Emulation.resetPageScaleFactor", commands["Emulation.resetPageScaleFactor"].params.parse(params ?? {}))), "Emulation.resetPageScaleFactor", "command"), + setFocusEmulationEnabled: withCdpName(async (params?: unknown) => commands["Emulation.setFocusEmulationEnabled"].result.parse(await send("Emulation.setFocusEmulationEnabled", commands["Emulation.setFocusEmulationEnabled"].params.parse(params ?? {}))), "Emulation.setFocusEmulationEnabled", "command"), + setAutoDarkModeOverride: withCdpName(async (params?: unknown) => commands["Emulation.setAutoDarkModeOverride"].result.parse(await send("Emulation.setAutoDarkModeOverride", commands["Emulation.setAutoDarkModeOverride"].params.parse(params ?? {}))), "Emulation.setAutoDarkModeOverride", "command"), + setCPUThrottlingRate: withCdpName(async (params?: unknown) => commands["Emulation.setCPUThrottlingRate"].result.parse(await send("Emulation.setCPUThrottlingRate", commands["Emulation.setCPUThrottlingRate"].params.parse(params ?? {}))), "Emulation.setCPUThrottlingRate", "command"), + setDefaultBackgroundColorOverride: withCdpName(async (params?: unknown) => commands["Emulation.setDefaultBackgroundColorOverride"].result.parse(await send("Emulation.setDefaultBackgroundColorOverride", commands["Emulation.setDefaultBackgroundColorOverride"].params.parse(params ?? {}))), "Emulation.setDefaultBackgroundColorOverride", "command"), + setSafeAreaInsetsOverride: withCdpName(async (params?: unknown) => commands["Emulation.setSafeAreaInsetsOverride"].result.parse(await send("Emulation.setSafeAreaInsetsOverride", commands["Emulation.setSafeAreaInsetsOverride"].params.parse(params ?? {}))), "Emulation.setSafeAreaInsetsOverride", "command"), + setDeviceMetricsOverride: withCdpName(async (params?: unknown) => commands["Emulation.setDeviceMetricsOverride"].result.parse(await send("Emulation.setDeviceMetricsOverride", commands["Emulation.setDeviceMetricsOverride"].params.parse(params ?? {}))), "Emulation.setDeviceMetricsOverride", "command"), + setDevicePostureOverride: withCdpName(async (params?: unknown) => commands["Emulation.setDevicePostureOverride"].result.parse(await send("Emulation.setDevicePostureOverride", commands["Emulation.setDevicePostureOverride"].params.parse(params ?? {}))), "Emulation.setDevicePostureOverride", "command"), + clearDevicePostureOverride: withCdpName(async (params?: unknown) => commands["Emulation.clearDevicePostureOverride"].result.parse(await send("Emulation.clearDevicePostureOverride", commands["Emulation.clearDevicePostureOverride"].params.parse(params ?? {}))), "Emulation.clearDevicePostureOverride", "command"), + setDisplayFeaturesOverride: withCdpName(async (params?: unknown) => commands["Emulation.setDisplayFeaturesOverride"].result.parse(await send("Emulation.setDisplayFeaturesOverride", commands["Emulation.setDisplayFeaturesOverride"].params.parse(params ?? {}))), "Emulation.setDisplayFeaturesOverride", "command"), + clearDisplayFeaturesOverride: withCdpName(async (params?: unknown) => commands["Emulation.clearDisplayFeaturesOverride"].result.parse(await send("Emulation.clearDisplayFeaturesOverride", commands["Emulation.clearDisplayFeaturesOverride"].params.parse(params ?? {}))), "Emulation.clearDisplayFeaturesOverride", "command"), + setScrollbarsHidden: withCdpName(async (params?: unknown) => commands["Emulation.setScrollbarsHidden"].result.parse(await send("Emulation.setScrollbarsHidden", commands["Emulation.setScrollbarsHidden"].params.parse(params ?? {}))), "Emulation.setScrollbarsHidden", "command"), + setDocumentCookieDisabled: withCdpName(async (params?: unknown) => commands["Emulation.setDocumentCookieDisabled"].result.parse(await send("Emulation.setDocumentCookieDisabled", commands["Emulation.setDocumentCookieDisabled"].params.parse(params ?? {}))), "Emulation.setDocumentCookieDisabled", "command"), + setEmitTouchEventsForMouse: withCdpName(async (params?: unknown) => commands["Emulation.setEmitTouchEventsForMouse"].result.parse(await send("Emulation.setEmitTouchEventsForMouse", commands["Emulation.setEmitTouchEventsForMouse"].params.parse(params ?? {}))), "Emulation.setEmitTouchEventsForMouse", "command"), + setEmulatedMedia: withCdpName(async (params?: unknown) => commands["Emulation.setEmulatedMedia"].result.parse(await send("Emulation.setEmulatedMedia", commands["Emulation.setEmulatedMedia"].params.parse(params ?? {}))), "Emulation.setEmulatedMedia", "command"), + setEmulatedVisionDeficiency: withCdpName(async (params?: unknown) => commands["Emulation.setEmulatedVisionDeficiency"].result.parse(await send("Emulation.setEmulatedVisionDeficiency", commands["Emulation.setEmulatedVisionDeficiency"].params.parse(params ?? {}))), "Emulation.setEmulatedVisionDeficiency", "command"), + setEmulatedOSTextScale: withCdpName(async (params?: unknown) => commands["Emulation.setEmulatedOSTextScale"].result.parse(await send("Emulation.setEmulatedOSTextScale", commands["Emulation.setEmulatedOSTextScale"].params.parse(params ?? {}))), "Emulation.setEmulatedOSTextScale", "command"), + setGeolocationOverride: withCdpName(async (params?: unknown) => commands["Emulation.setGeolocationOverride"].result.parse(await send("Emulation.setGeolocationOverride", commands["Emulation.setGeolocationOverride"].params.parse(params ?? {}))), "Emulation.setGeolocationOverride", "command"), + getOverriddenSensorInformation: withCdpName(async (params?: unknown) => commands["Emulation.getOverriddenSensorInformation"].result.parse(await send("Emulation.getOverriddenSensorInformation", commands["Emulation.getOverriddenSensorInformation"].params.parse(params ?? {}))), "Emulation.getOverriddenSensorInformation", "command"), + setSensorOverrideEnabled: withCdpName(async (params?: unknown) => commands["Emulation.setSensorOverrideEnabled"].result.parse(await send("Emulation.setSensorOverrideEnabled", commands["Emulation.setSensorOverrideEnabled"].params.parse(params ?? {}))), "Emulation.setSensorOverrideEnabled", "command"), + setSensorOverrideReadings: withCdpName(async (params?: unknown) => commands["Emulation.setSensorOverrideReadings"].result.parse(await send("Emulation.setSensorOverrideReadings", commands["Emulation.setSensorOverrideReadings"].params.parse(params ?? {}))), "Emulation.setSensorOverrideReadings", "command"), + setPressureSourceOverrideEnabled: withCdpName(async (params?: unknown) => commands["Emulation.setPressureSourceOverrideEnabled"].result.parse(await send("Emulation.setPressureSourceOverrideEnabled", commands["Emulation.setPressureSourceOverrideEnabled"].params.parse(params ?? {}))), "Emulation.setPressureSourceOverrideEnabled", "command"), + setPressureStateOverride: withCdpName(async (params?: unknown) => commands["Emulation.setPressureStateOverride"].result.parse(await send("Emulation.setPressureStateOverride", commands["Emulation.setPressureStateOverride"].params.parse(params ?? {}))), "Emulation.setPressureStateOverride", "command"), + setPressureDataOverride: withCdpName(async (params?: unknown) => commands["Emulation.setPressureDataOverride"].result.parse(await send("Emulation.setPressureDataOverride", commands["Emulation.setPressureDataOverride"].params.parse(params ?? {}))), "Emulation.setPressureDataOverride", "command"), + setIdleOverride: withCdpName(async (params?: unknown) => commands["Emulation.setIdleOverride"].result.parse(await send("Emulation.setIdleOverride", commands["Emulation.setIdleOverride"].params.parse(params ?? {}))), "Emulation.setIdleOverride", "command"), + clearIdleOverride: withCdpName(async (params?: unknown) => commands["Emulation.clearIdleOverride"].result.parse(await send("Emulation.clearIdleOverride", commands["Emulation.clearIdleOverride"].params.parse(params ?? {}))), "Emulation.clearIdleOverride", "command"), + setNavigatorOverrides: withCdpName(async (params?: unknown) => commands["Emulation.setNavigatorOverrides"].result.parse(await send("Emulation.setNavigatorOverrides", commands["Emulation.setNavigatorOverrides"].params.parse(params ?? {}))), "Emulation.setNavigatorOverrides", "command"), + setPageScaleFactor: withCdpName(async (params?: unknown) => commands["Emulation.setPageScaleFactor"].result.parse(await send("Emulation.setPageScaleFactor", commands["Emulation.setPageScaleFactor"].params.parse(params ?? {}))), "Emulation.setPageScaleFactor", "command"), + setScriptExecutionDisabled: withCdpName(async (params?: unknown) => commands["Emulation.setScriptExecutionDisabled"].result.parse(await send("Emulation.setScriptExecutionDisabled", commands["Emulation.setScriptExecutionDisabled"].params.parse(params ?? {}))), "Emulation.setScriptExecutionDisabled", "command"), + setTouchEmulationEnabled: withCdpName(async (params?: unknown) => commands["Emulation.setTouchEmulationEnabled"].result.parse(await send("Emulation.setTouchEmulationEnabled", commands["Emulation.setTouchEmulationEnabled"].params.parse(params ?? {}))), "Emulation.setTouchEmulationEnabled", "command"), + setVirtualTimePolicy: withCdpName(async (params?: unknown) => commands["Emulation.setVirtualTimePolicy"].result.parse(await send("Emulation.setVirtualTimePolicy", commands["Emulation.setVirtualTimePolicy"].params.parse(params ?? {}))), "Emulation.setVirtualTimePolicy", "command"), + setLocaleOverride: withCdpName(async (params?: unknown) => commands["Emulation.setLocaleOverride"].result.parse(await send("Emulation.setLocaleOverride", commands["Emulation.setLocaleOverride"].params.parse(params ?? {}))), "Emulation.setLocaleOverride", "command"), + setTimezoneOverride: withCdpName(async (params?: unknown) => commands["Emulation.setTimezoneOverride"].result.parse(await send("Emulation.setTimezoneOverride", commands["Emulation.setTimezoneOverride"].params.parse(params ?? {}))), "Emulation.setTimezoneOverride", "command"), + setVisibleSize: withCdpName(async (params?: unknown) => commands["Emulation.setVisibleSize"].result.parse(await send("Emulation.setVisibleSize", commands["Emulation.setVisibleSize"].params.parse(params ?? {}))), "Emulation.setVisibleSize", "command"), + setDisabledImageTypes: withCdpName(async (params?: unknown) => commands["Emulation.setDisabledImageTypes"].result.parse(await send("Emulation.setDisabledImageTypes", commands["Emulation.setDisabledImageTypes"].params.parse(params ?? {}))), "Emulation.setDisabledImageTypes", "command"), + setDataSaverOverride: withCdpName(async (params?: unknown) => commands["Emulation.setDataSaverOverride"].result.parse(await send("Emulation.setDataSaverOverride", commands["Emulation.setDataSaverOverride"].params.parse(params ?? {}))), "Emulation.setDataSaverOverride", "command"), + setHardwareConcurrencyOverride: withCdpName(async (params?: unknown) => commands["Emulation.setHardwareConcurrencyOverride"].result.parse(await send("Emulation.setHardwareConcurrencyOverride", commands["Emulation.setHardwareConcurrencyOverride"].params.parse(params ?? {}))), "Emulation.setHardwareConcurrencyOverride", "command"), + setUserAgentOverride: withCdpName(async (params?: unknown) => commands["Emulation.setUserAgentOverride"].result.parse(await send("Emulation.setUserAgentOverride", commands["Emulation.setUserAgentOverride"].params.parse(params ?? {}))), "Emulation.setUserAgentOverride", "command"), + setAutomationOverride: withCdpName(async (params?: unknown) => commands["Emulation.setAutomationOverride"].result.parse(await send("Emulation.setAutomationOverride", commands["Emulation.setAutomationOverride"].params.parse(params ?? {}))), "Emulation.setAutomationOverride", "command"), + setSmallViewportHeightDifferenceOverride: withCdpName(async (params?: unknown) => commands["Emulation.setSmallViewportHeightDifferenceOverride"].result.parse(await send("Emulation.setSmallViewportHeightDifferenceOverride", commands["Emulation.setSmallViewportHeightDifferenceOverride"].params.parse(params ?? {}))), "Emulation.setSmallViewportHeightDifferenceOverride", "command"), + getScreenInfos: withCdpName(async (params?: unknown) => commands["Emulation.getScreenInfos"].result.parse(await send("Emulation.getScreenInfos", commands["Emulation.getScreenInfos"].params.parse(params ?? {}))), "Emulation.getScreenInfos", "command"), + addScreen: withCdpName(async (params?: unknown) => commands["Emulation.addScreen"].result.parse(await send("Emulation.addScreen", commands["Emulation.addScreen"].params.parse(params ?? {}))), "Emulation.addScreen", "command"), + updateScreen: withCdpName(async (params?: unknown) => commands["Emulation.updateScreen"].result.parse(await send("Emulation.updateScreen", commands["Emulation.updateScreen"].params.parse(params ?? {}))), "Emulation.updateScreen", "command"), + removeScreen: withCdpName(async (params?: unknown) => commands["Emulation.removeScreen"].result.parse(await send("Emulation.removeScreen", commands["Emulation.removeScreen"].params.parse(params ?? {}))), "Emulation.removeScreen", "command"), + setPrimaryScreen: withCdpName(async (params?: unknown) => commands["Emulation.setPrimaryScreen"].result.parse(await send("Emulation.setPrimaryScreen", commands["Emulation.setPrimaryScreen"].params.parse(params ?? {}))), "Emulation.setPrimaryScreen", "command"), + virtualTimeBudgetExpired: events["Emulation.virtualTimeBudgetExpired"] as CdpEventAlias, + screenOrientationLockChanged: events["Emulation.screenOrientationLockChanged"] as CdpEventAlias, }, EventBreakpoints: { - setInstrumentationBreakpoint: withCdpName( - async (params?: unknown) => - commands["EventBreakpoints.setInstrumentationBreakpoint"].result.parse( - await send( - "EventBreakpoints.setInstrumentationBreakpoint", - commands["EventBreakpoints.setInstrumentationBreakpoint"].params.parse(params ?? {}), - ), - ), - "EventBreakpoints.setInstrumentationBreakpoint", - "command", - ), - removeInstrumentationBreakpoint: withCdpName( - async (params?: unknown) => - commands["EventBreakpoints.removeInstrumentationBreakpoint"].result.parse( - await send( - "EventBreakpoints.removeInstrumentationBreakpoint", - commands["EventBreakpoints.removeInstrumentationBreakpoint"].params.parse(params ?? {}), - ), - ), - "EventBreakpoints.removeInstrumentationBreakpoint", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["EventBreakpoints.disable"].result.parse( - await send("EventBreakpoints.disable", commands["EventBreakpoints.disable"].params.parse(params ?? {})), - ), - "EventBreakpoints.disable", - "command", - ), + setInstrumentationBreakpoint: withCdpName(async (params?: unknown) => commands["EventBreakpoints.setInstrumentationBreakpoint"].result.parse(await send("EventBreakpoints.setInstrumentationBreakpoint", commands["EventBreakpoints.setInstrumentationBreakpoint"].params.parse(params ?? {}))), "EventBreakpoints.setInstrumentationBreakpoint", "command"), + removeInstrumentationBreakpoint: withCdpName(async (params?: unknown) => commands["EventBreakpoints.removeInstrumentationBreakpoint"].result.parse(await send("EventBreakpoints.removeInstrumentationBreakpoint", commands["EventBreakpoints.removeInstrumentationBreakpoint"].params.parse(params ?? {}))), "EventBreakpoints.removeInstrumentationBreakpoint", "command"), + disable: withCdpName(async (params?: unknown) => commands["EventBreakpoints.disable"].result.parse(await send("EventBreakpoints.disable", commands["EventBreakpoints.disable"].params.parse(params ?? {}))), "EventBreakpoints.disable", "command"), }, Extensions: { - triggerAction: withCdpName( - async (params?: unknown) => - commands["Extensions.triggerAction"].result.parse( - await send("Extensions.triggerAction", commands["Extensions.triggerAction"].params.parse(params ?? {})), - ), - "Extensions.triggerAction", - "command", - ), - loadUnpacked: withCdpName( - async (params?: unknown) => - commands["Extensions.loadUnpacked"].result.parse( - await send("Extensions.loadUnpacked", commands["Extensions.loadUnpacked"].params.parse(params ?? {})), - ), - "Extensions.loadUnpacked", - "command", - ), - getExtensions: withCdpName( - async (params?: unknown) => - commands["Extensions.getExtensions"].result.parse( - await send("Extensions.getExtensions", commands["Extensions.getExtensions"].params.parse(params ?? {})), - ), - "Extensions.getExtensions", - "command", - ), - uninstall: withCdpName( - async (params?: unknown) => - commands["Extensions.uninstall"].result.parse( - await send("Extensions.uninstall", commands["Extensions.uninstall"].params.parse(params ?? {})), - ), - "Extensions.uninstall", - "command", - ), - getStorageItems: withCdpName( - async (params?: unknown) => - commands["Extensions.getStorageItems"].result.parse( - await send("Extensions.getStorageItems", commands["Extensions.getStorageItems"].params.parse(params ?? {})), - ), - "Extensions.getStorageItems", - "command", - ), - removeStorageItems: withCdpName( - async (params?: unknown) => - commands["Extensions.removeStorageItems"].result.parse( - await send( - "Extensions.removeStorageItems", - commands["Extensions.removeStorageItems"].params.parse(params ?? {}), - ), - ), - "Extensions.removeStorageItems", - "command", - ), - clearStorageItems: withCdpName( - async (params?: unknown) => - commands["Extensions.clearStorageItems"].result.parse( - await send( - "Extensions.clearStorageItems", - commands["Extensions.clearStorageItems"].params.parse(params ?? {}), - ), - ), - "Extensions.clearStorageItems", - "command", - ), - setStorageItems: withCdpName( - async (params?: unknown) => - commands["Extensions.setStorageItems"].result.parse( - await send("Extensions.setStorageItems", commands["Extensions.setStorageItems"].params.parse(params ?? {})), - ), - "Extensions.setStorageItems", - "command", - ), + triggerAction: withCdpName(async (params?: unknown) => commands["Extensions.triggerAction"].result.parse(await send("Extensions.triggerAction", commands["Extensions.triggerAction"].params.parse(params ?? {}))), "Extensions.triggerAction", "command"), + loadUnpacked: withCdpName(async (params?: unknown) => commands["Extensions.loadUnpacked"].result.parse(await send("Extensions.loadUnpacked", commands["Extensions.loadUnpacked"].params.parse(params ?? {}))), "Extensions.loadUnpacked", "command"), + getExtensions: withCdpName(async (params?: unknown) => commands["Extensions.getExtensions"].result.parse(await send("Extensions.getExtensions", commands["Extensions.getExtensions"].params.parse(params ?? {}))), "Extensions.getExtensions", "command"), + uninstall: withCdpName(async (params?: unknown) => commands["Extensions.uninstall"].result.parse(await send("Extensions.uninstall", commands["Extensions.uninstall"].params.parse(params ?? {}))), "Extensions.uninstall", "command"), + getStorageItems: withCdpName(async (params?: unknown) => commands["Extensions.getStorageItems"].result.parse(await send("Extensions.getStorageItems", commands["Extensions.getStorageItems"].params.parse(params ?? {}))), "Extensions.getStorageItems", "command"), + removeStorageItems: withCdpName(async (params?: unknown) => commands["Extensions.removeStorageItems"].result.parse(await send("Extensions.removeStorageItems", commands["Extensions.removeStorageItems"].params.parse(params ?? {}))), "Extensions.removeStorageItems", "command"), + clearStorageItems: withCdpName(async (params?: unknown) => commands["Extensions.clearStorageItems"].result.parse(await send("Extensions.clearStorageItems", commands["Extensions.clearStorageItems"].params.parse(params ?? {}))), "Extensions.clearStorageItems", "command"), + setStorageItems: withCdpName(async (params?: unknown) => commands["Extensions.setStorageItems"].result.parse(await send("Extensions.setStorageItems", commands["Extensions.setStorageItems"].params.parse(params ?? {}))), "Extensions.setStorageItems", "command"), }, FedCm: { - enable: withCdpName( - async (params?: unknown) => - commands["FedCm.enable"].result.parse( - await send("FedCm.enable", commands["FedCm.enable"].params.parse(params ?? {})), - ), - "FedCm.enable", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["FedCm.disable"].result.parse( - await send("FedCm.disable", commands["FedCm.disable"].params.parse(params ?? {})), - ), - "FedCm.disable", - "command", - ), - selectAccount: withCdpName( - async (params?: unknown) => - commands["FedCm.selectAccount"].result.parse( - await send("FedCm.selectAccount", commands["FedCm.selectAccount"].params.parse(params ?? {})), - ), - "FedCm.selectAccount", - "command", - ), - clickDialogButton: withCdpName( - async (params?: unknown) => - commands["FedCm.clickDialogButton"].result.parse( - await send("FedCm.clickDialogButton", commands["FedCm.clickDialogButton"].params.parse(params ?? {})), - ), - "FedCm.clickDialogButton", - "command", - ), - openUrl: withCdpName( - async (params?: unknown) => - commands["FedCm.openUrl"].result.parse( - await send("FedCm.openUrl", commands["FedCm.openUrl"].params.parse(params ?? {})), - ), - "FedCm.openUrl", - "command", - ), - dismissDialog: withCdpName( - async (params?: unknown) => - commands["FedCm.dismissDialog"].result.parse( - await send("FedCm.dismissDialog", commands["FedCm.dismissDialog"].params.parse(params ?? {})), - ), - "FedCm.dismissDialog", - "command", - ), - resetCooldown: withCdpName( - async (params?: unknown) => - commands["FedCm.resetCooldown"].result.parse( - await send("FedCm.resetCooldown", commands["FedCm.resetCooldown"].params.parse(params ?? {})), - ), - "FedCm.resetCooldown", - "command", - ), - dialogShown: events["FedCm.dialogShown"] as CdpEventAlias< - cdp.types.ts.FedCm.DialogShownEvent, - "FedCm.dialogShown" - >, - dialogClosed: events["FedCm.dialogClosed"] as CdpEventAlias< - cdp.types.ts.FedCm.DialogClosedEvent, - "FedCm.dialogClosed" - >, + enable: withCdpName(async (params?: unknown) => commands["FedCm.enable"].result.parse(await send("FedCm.enable", commands["FedCm.enable"].params.parse(params ?? {}))), "FedCm.enable", "command"), + disable: withCdpName(async (params?: unknown) => commands["FedCm.disable"].result.parse(await send("FedCm.disable", commands["FedCm.disable"].params.parse(params ?? {}))), "FedCm.disable", "command"), + selectAccount: withCdpName(async (params?: unknown) => commands["FedCm.selectAccount"].result.parse(await send("FedCm.selectAccount", commands["FedCm.selectAccount"].params.parse(params ?? {}))), "FedCm.selectAccount", "command"), + clickDialogButton: withCdpName(async (params?: unknown) => commands["FedCm.clickDialogButton"].result.parse(await send("FedCm.clickDialogButton", commands["FedCm.clickDialogButton"].params.parse(params ?? {}))), "FedCm.clickDialogButton", "command"), + openUrl: withCdpName(async (params?: unknown) => commands["FedCm.openUrl"].result.parse(await send("FedCm.openUrl", commands["FedCm.openUrl"].params.parse(params ?? {}))), "FedCm.openUrl", "command"), + dismissDialog: withCdpName(async (params?: unknown) => commands["FedCm.dismissDialog"].result.parse(await send("FedCm.dismissDialog", commands["FedCm.dismissDialog"].params.parse(params ?? {}))), "FedCm.dismissDialog", "command"), + resetCooldown: withCdpName(async (params?: unknown) => commands["FedCm.resetCooldown"].result.parse(await send("FedCm.resetCooldown", commands["FedCm.resetCooldown"].params.parse(params ?? {}))), "FedCm.resetCooldown", "command"), + dialogShown: events["FedCm.dialogShown"] as CdpEventAlias, + dialogClosed: events["FedCm.dialogClosed"] as CdpEventAlias, }, Fetch: { - disable: withCdpName( - async (params?: unknown) => - commands["Fetch.disable"].result.parse( - await send("Fetch.disable", commands["Fetch.disable"].params.parse(params ?? {})), - ), - "Fetch.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Fetch.enable"].result.parse( - await send("Fetch.enable", commands["Fetch.enable"].params.parse(params ?? {})), - ), - "Fetch.enable", - "command", - ), - failRequest: withCdpName( - async (params?: unknown) => - commands["Fetch.failRequest"].result.parse( - await send("Fetch.failRequest", commands["Fetch.failRequest"].params.parse(params ?? {})), - ), - "Fetch.failRequest", - "command", - ), - fulfillRequest: withCdpName( - async (params?: unknown) => - commands["Fetch.fulfillRequest"].result.parse( - await send("Fetch.fulfillRequest", commands["Fetch.fulfillRequest"].params.parse(params ?? {})), - ), - "Fetch.fulfillRequest", - "command", - ), - continueRequest: withCdpName( - async (params?: unknown) => - commands["Fetch.continueRequest"].result.parse( - await send("Fetch.continueRequest", commands["Fetch.continueRequest"].params.parse(params ?? {})), - ), - "Fetch.continueRequest", - "command", - ), - continueWithAuth: withCdpName( - async (params?: unknown) => - commands["Fetch.continueWithAuth"].result.parse( - await send("Fetch.continueWithAuth", commands["Fetch.continueWithAuth"].params.parse(params ?? {})), - ), - "Fetch.continueWithAuth", - "command", - ), - continueResponse: withCdpName( - async (params?: unknown) => - commands["Fetch.continueResponse"].result.parse( - await send("Fetch.continueResponse", commands["Fetch.continueResponse"].params.parse(params ?? {})), - ), - "Fetch.continueResponse", - "command", - ), - getResponseBody: withCdpName( - async (params?: unknown) => - commands["Fetch.getResponseBody"].result.parse( - await send("Fetch.getResponseBody", commands["Fetch.getResponseBody"].params.parse(params ?? {})), - ), - "Fetch.getResponseBody", - "command", - ), - takeResponseBodyAsStream: withCdpName( - async (params?: unknown) => - commands["Fetch.takeResponseBodyAsStream"].result.parse( - await send( - "Fetch.takeResponseBodyAsStream", - commands["Fetch.takeResponseBodyAsStream"].params.parse(params ?? {}), - ), - ), - "Fetch.takeResponseBodyAsStream", - "command", - ), - requestPaused: events["Fetch.requestPaused"] as CdpEventAlias< - cdp.types.ts.Fetch.RequestPausedEvent, - "Fetch.requestPaused" - >, - authRequired: events["Fetch.authRequired"] as CdpEventAlias< - cdp.types.ts.Fetch.AuthRequiredEvent, - "Fetch.authRequired" - >, + disable: withCdpName(async (params?: unknown) => commands["Fetch.disable"].result.parse(await send("Fetch.disable", commands["Fetch.disable"].params.parse(params ?? {}))), "Fetch.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Fetch.enable"].result.parse(await send("Fetch.enable", commands["Fetch.enable"].params.parse(params ?? {}))), "Fetch.enable", "command"), + failRequest: withCdpName(async (params?: unknown) => commands["Fetch.failRequest"].result.parse(await send("Fetch.failRequest", commands["Fetch.failRequest"].params.parse(params ?? {}))), "Fetch.failRequest", "command"), + fulfillRequest: withCdpName(async (params?: unknown) => commands["Fetch.fulfillRequest"].result.parse(await send("Fetch.fulfillRequest", commands["Fetch.fulfillRequest"].params.parse(params ?? {}))), "Fetch.fulfillRequest", "command"), + continueRequest: withCdpName(async (params?: unknown) => commands["Fetch.continueRequest"].result.parse(await send("Fetch.continueRequest", commands["Fetch.continueRequest"].params.parse(params ?? {}))), "Fetch.continueRequest", "command"), + continueWithAuth: withCdpName(async (params?: unknown) => commands["Fetch.continueWithAuth"].result.parse(await send("Fetch.continueWithAuth", commands["Fetch.continueWithAuth"].params.parse(params ?? {}))), "Fetch.continueWithAuth", "command"), + continueResponse: withCdpName(async (params?: unknown) => commands["Fetch.continueResponse"].result.parse(await send("Fetch.continueResponse", commands["Fetch.continueResponse"].params.parse(params ?? {}))), "Fetch.continueResponse", "command"), + getResponseBody: withCdpName(async (params?: unknown) => commands["Fetch.getResponseBody"].result.parse(await send("Fetch.getResponseBody", commands["Fetch.getResponseBody"].params.parse(params ?? {}))), "Fetch.getResponseBody", "command"), + takeResponseBodyAsStream: withCdpName(async (params?: unknown) => commands["Fetch.takeResponseBodyAsStream"].result.parse(await send("Fetch.takeResponseBodyAsStream", commands["Fetch.takeResponseBodyAsStream"].params.parse(params ?? {}))), "Fetch.takeResponseBodyAsStream", "command"), + requestPaused: events["Fetch.requestPaused"] as CdpEventAlias, + authRequired: events["Fetch.authRequired"] as CdpEventAlias, }, FileSystem: { - getDirectory: withCdpName( - async (params?: unknown) => - commands["FileSystem.getDirectory"].result.parse( - await send("FileSystem.getDirectory", commands["FileSystem.getDirectory"].params.parse(params ?? {})), - ), - "FileSystem.getDirectory", - "command", - ), + getDirectory: withCdpName(async (params?: unknown) => commands["FileSystem.getDirectory"].result.parse(await send("FileSystem.getDirectory", commands["FileSystem.getDirectory"].params.parse(params ?? {}))), "FileSystem.getDirectory", "command"), }, HeadlessExperimental: { - beginFrame: withCdpName( - async (params?: unknown) => - commands["HeadlessExperimental.beginFrame"].result.parse( - await send( - "HeadlessExperimental.beginFrame", - commands["HeadlessExperimental.beginFrame"].params.parse(params ?? {}), - ), - ), - "HeadlessExperimental.beginFrame", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["HeadlessExperimental.disable"].result.parse( - await send( - "HeadlessExperimental.disable", - commands["HeadlessExperimental.disable"].params.parse(params ?? {}), - ), - ), - "HeadlessExperimental.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["HeadlessExperimental.enable"].result.parse( - await send( - "HeadlessExperimental.enable", - commands["HeadlessExperimental.enable"].params.parse(params ?? {}), - ), - ), - "HeadlessExperimental.enable", - "command", - ), + beginFrame: withCdpName(async (params?: unknown) => commands["HeadlessExperimental.beginFrame"].result.parse(await send("HeadlessExperimental.beginFrame", commands["HeadlessExperimental.beginFrame"].params.parse(params ?? {}))), "HeadlessExperimental.beginFrame", "command"), + disable: withCdpName(async (params?: unknown) => commands["HeadlessExperimental.disable"].result.parse(await send("HeadlessExperimental.disable", commands["HeadlessExperimental.disable"].params.parse(params ?? {}))), "HeadlessExperimental.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["HeadlessExperimental.enable"].result.parse(await send("HeadlessExperimental.enable", commands["HeadlessExperimental.enable"].params.parse(params ?? {}))), "HeadlessExperimental.enable", "command"), }, HeapProfiler: { - addInspectedHeapObject: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.addInspectedHeapObject"].result.parse( - await send( - "HeapProfiler.addInspectedHeapObject", - commands["HeapProfiler.addInspectedHeapObject"].params.parse(params ?? {}), - ), - ), - "HeapProfiler.addInspectedHeapObject", - "command", - ), - collectGarbage: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.collectGarbage"].result.parse( - await send( - "HeapProfiler.collectGarbage", - commands["HeapProfiler.collectGarbage"].params.parse(params ?? {}), - ), - ), - "HeapProfiler.collectGarbage", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.disable"].result.parse( - await send("HeapProfiler.disable", commands["HeapProfiler.disable"].params.parse(params ?? {})), - ), - "HeapProfiler.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.enable"].result.parse( - await send("HeapProfiler.enable", commands["HeapProfiler.enable"].params.parse(params ?? {})), - ), - "HeapProfiler.enable", - "command", - ), - getHeapObjectId: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.getHeapObjectId"].result.parse( - await send( - "HeapProfiler.getHeapObjectId", - commands["HeapProfiler.getHeapObjectId"].params.parse(params ?? {}), - ), - ), - "HeapProfiler.getHeapObjectId", - "command", - ), - getObjectByHeapObjectId: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.getObjectByHeapObjectId"].result.parse( - await send( - "HeapProfiler.getObjectByHeapObjectId", - commands["HeapProfiler.getObjectByHeapObjectId"].params.parse(params ?? {}), - ), - ), - "HeapProfiler.getObjectByHeapObjectId", - "command", - ), - getSamplingProfile: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.getSamplingProfile"].result.parse( - await send( - "HeapProfiler.getSamplingProfile", - commands["HeapProfiler.getSamplingProfile"].params.parse(params ?? {}), - ), - ), - "HeapProfiler.getSamplingProfile", - "command", - ), - startSampling: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.startSampling"].result.parse( - await send("HeapProfiler.startSampling", commands["HeapProfiler.startSampling"].params.parse(params ?? {})), - ), - "HeapProfiler.startSampling", - "command", - ), - startTrackingHeapObjects: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.startTrackingHeapObjects"].result.parse( - await send( - "HeapProfiler.startTrackingHeapObjects", - commands["HeapProfiler.startTrackingHeapObjects"].params.parse(params ?? {}), - ), - ), - "HeapProfiler.startTrackingHeapObjects", - "command", - ), - stopSampling: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.stopSampling"].result.parse( - await send("HeapProfiler.stopSampling", commands["HeapProfiler.stopSampling"].params.parse(params ?? {})), - ), - "HeapProfiler.stopSampling", - "command", - ), - stopTrackingHeapObjects: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.stopTrackingHeapObjects"].result.parse( - await send( - "HeapProfiler.stopTrackingHeapObjects", - commands["HeapProfiler.stopTrackingHeapObjects"].params.parse(params ?? {}), - ), - ), - "HeapProfiler.stopTrackingHeapObjects", - "command", - ), - takeHeapSnapshot: withCdpName( - async (params?: unknown) => - commands["HeapProfiler.takeHeapSnapshot"].result.parse( - await send( - "HeapProfiler.takeHeapSnapshot", - commands["HeapProfiler.takeHeapSnapshot"].params.parse(params ?? {}), - ), - ), - "HeapProfiler.takeHeapSnapshot", - "command", - ), - addHeapSnapshotChunk: events["HeapProfiler.addHeapSnapshotChunk"] as CdpEventAlias< - cdp.types.ts.HeapProfiler.AddHeapSnapshotChunkEvent, - "HeapProfiler.addHeapSnapshotChunk" - >, - heapStatsUpdate: events["HeapProfiler.heapStatsUpdate"] as CdpEventAlias< - cdp.types.ts.HeapProfiler.HeapStatsUpdateEvent, - "HeapProfiler.heapStatsUpdate" - >, - lastSeenObjectId: events["HeapProfiler.lastSeenObjectId"] as CdpEventAlias< - cdp.types.ts.HeapProfiler.LastSeenObjectIdEvent, - "HeapProfiler.lastSeenObjectId" - >, - reportHeapSnapshotProgress: events["HeapProfiler.reportHeapSnapshotProgress"] as CdpEventAlias< - cdp.types.ts.HeapProfiler.ReportHeapSnapshotProgressEvent, - "HeapProfiler.reportHeapSnapshotProgress" - >, - resetProfiles: events["HeapProfiler.resetProfiles"] as CdpEventAlias< - cdp.types.ts.HeapProfiler.ResetProfilesEvent, - "HeapProfiler.resetProfiles" - >, + addInspectedHeapObject: withCdpName(async (params?: unknown) => commands["HeapProfiler.addInspectedHeapObject"].result.parse(await send("HeapProfiler.addInspectedHeapObject", commands["HeapProfiler.addInspectedHeapObject"].params.parse(params ?? {}))), "HeapProfiler.addInspectedHeapObject", "command"), + collectGarbage: withCdpName(async (params?: unknown) => commands["HeapProfiler.collectGarbage"].result.parse(await send("HeapProfiler.collectGarbage", commands["HeapProfiler.collectGarbage"].params.parse(params ?? {}))), "HeapProfiler.collectGarbage", "command"), + disable: withCdpName(async (params?: unknown) => commands["HeapProfiler.disable"].result.parse(await send("HeapProfiler.disable", commands["HeapProfiler.disable"].params.parse(params ?? {}))), "HeapProfiler.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["HeapProfiler.enable"].result.parse(await send("HeapProfiler.enable", commands["HeapProfiler.enable"].params.parse(params ?? {}))), "HeapProfiler.enable", "command"), + getHeapObjectId: withCdpName(async (params?: unknown) => commands["HeapProfiler.getHeapObjectId"].result.parse(await send("HeapProfiler.getHeapObjectId", commands["HeapProfiler.getHeapObjectId"].params.parse(params ?? {}))), "HeapProfiler.getHeapObjectId", "command"), + getObjectByHeapObjectId: withCdpName(async (params?: unknown) => commands["HeapProfiler.getObjectByHeapObjectId"].result.parse(await send("HeapProfiler.getObjectByHeapObjectId", commands["HeapProfiler.getObjectByHeapObjectId"].params.parse(params ?? {}))), "HeapProfiler.getObjectByHeapObjectId", "command"), + getSamplingProfile: withCdpName(async (params?: unknown) => commands["HeapProfiler.getSamplingProfile"].result.parse(await send("HeapProfiler.getSamplingProfile", commands["HeapProfiler.getSamplingProfile"].params.parse(params ?? {}))), "HeapProfiler.getSamplingProfile", "command"), + startSampling: withCdpName(async (params?: unknown) => commands["HeapProfiler.startSampling"].result.parse(await send("HeapProfiler.startSampling", commands["HeapProfiler.startSampling"].params.parse(params ?? {}))), "HeapProfiler.startSampling", "command"), + startTrackingHeapObjects: withCdpName(async (params?: unknown) => commands["HeapProfiler.startTrackingHeapObjects"].result.parse(await send("HeapProfiler.startTrackingHeapObjects", commands["HeapProfiler.startTrackingHeapObjects"].params.parse(params ?? {}))), "HeapProfiler.startTrackingHeapObjects", "command"), + stopSampling: withCdpName(async (params?: unknown) => commands["HeapProfiler.stopSampling"].result.parse(await send("HeapProfiler.stopSampling", commands["HeapProfiler.stopSampling"].params.parse(params ?? {}))), "HeapProfiler.stopSampling", "command"), + stopTrackingHeapObjects: withCdpName(async (params?: unknown) => commands["HeapProfiler.stopTrackingHeapObjects"].result.parse(await send("HeapProfiler.stopTrackingHeapObjects", commands["HeapProfiler.stopTrackingHeapObjects"].params.parse(params ?? {}))), "HeapProfiler.stopTrackingHeapObjects", "command"), + takeHeapSnapshot: withCdpName(async (params?: unknown) => commands["HeapProfiler.takeHeapSnapshot"].result.parse(await send("HeapProfiler.takeHeapSnapshot", commands["HeapProfiler.takeHeapSnapshot"].params.parse(params ?? {}))), "HeapProfiler.takeHeapSnapshot", "command"), + addHeapSnapshotChunk: events["HeapProfiler.addHeapSnapshotChunk"] as CdpEventAlias, + heapStatsUpdate: events["HeapProfiler.heapStatsUpdate"] as CdpEventAlias, + lastSeenObjectId: events["HeapProfiler.lastSeenObjectId"] as CdpEventAlias, + reportHeapSnapshotProgress: events["HeapProfiler.reportHeapSnapshotProgress"] as CdpEventAlias, + resetProfiles: events["HeapProfiler.resetProfiles"] as CdpEventAlias, }, IndexedDB: { - clearObjectStore: withCdpName( - async (params?: unknown) => - commands["IndexedDB.clearObjectStore"].result.parse( - await send("IndexedDB.clearObjectStore", commands["IndexedDB.clearObjectStore"].params.parse(params ?? {})), - ), - "IndexedDB.clearObjectStore", - "command", - ), - deleteDatabase: withCdpName( - async (params?: unknown) => - commands["IndexedDB.deleteDatabase"].result.parse( - await send("IndexedDB.deleteDatabase", commands["IndexedDB.deleteDatabase"].params.parse(params ?? {})), - ), - "IndexedDB.deleteDatabase", - "command", - ), - deleteObjectStoreEntries: withCdpName( - async (params?: unknown) => - commands["IndexedDB.deleteObjectStoreEntries"].result.parse( - await send( - "IndexedDB.deleteObjectStoreEntries", - commands["IndexedDB.deleteObjectStoreEntries"].params.parse(params ?? {}), - ), - ), - "IndexedDB.deleteObjectStoreEntries", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["IndexedDB.disable"].result.parse( - await send("IndexedDB.disable", commands["IndexedDB.disable"].params.parse(params ?? {})), - ), - "IndexedDB.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["IndexedDB.enable"].result.parse( - await send("IndexedDB.enable", commands["IndexedDB.enable"].params.parse(params ?? {})), - ), - "IndexedDB.enable", - "command", - ), - requestData: withCdpName( - async (params?: unknown) => - commands["IndexedDB.requestData"].result.parse( - await send("IndexedDB.requestData", commands["IndexedDB.requestData"].params.parse(params ?? {})), - ), - "IndexedDB.requestData", - "command", - ), - getMetadata: withCdpName( - async (params?: unknown) => - commands["IndexedDB.getMetadata"].result.parse( - await send("IndexedDB.getMetadata", commands["IndexedDB.getMetadata"].params.parse(params ?? {})), - ), - "IndexedDB.getMetadata", - "command", - ), - requestDatabase: withCdpName( - async (params?: unknown) => - commands["IndexedDB.requestDatabase"].result.parse( - await send("IndexedDB.requestDatabase", commands["IndexedDB.requestDatabase"].params.parse(params ?? {})), - ), - "IndexedDB.requestDatabase", - "command", - ), - requestDatabaseNames: withCdpName( - async (params?: unknown) => - commands["IndexedDB.requestDatabaseNames"].result.parse( - await send( - "IndexedDB.requestDatabaseNames", - commands["IndexedDB.requestDatabaseNames"].params.parse(params ?? {}), - ), - ), - "IndexedDB.requestDatabaseNames", - "command", - ), + clearObjectStore: withCdpName(async (params?: unknown) => commands["IndexedDB.clearObjectStore"].result.parse(await send("IndexedDB.clearObjectStore", commands["IndexedDB.clearObjectStore"].params.parse(params ?? {}))), "IndexedDB.clearObjectStore", "command"), + deleteDatabase: withCdpName(async (params?: unknown) => commands["IndexedDB.deleteDatabase"].result.parse(await send("IndexedDB.deleteDatabase", commands["IndexedDB.deleteDatabase"].params.parse(params ?? {}))), "IndexedDB.deleteDatabase", "command"), + deleteObjectStoreEntries: withCdpName(async (params?: unknown) => commands["IndexedDB.deleteObjectStoreEntries"].result.parse(await send("IndexedDB.deleteObjectStoreEntries", commands["IndexedDB.deleteObjectStoreEntries"].params.parse(params ?? {}))), "IndexedDB.deleteObjectStoreEntries", "command"), + disable: withCdpName(async (params?: unknown) => commands["IndexedDB.disable"].result.parse(await send("IndexedDB.disable", commands["IndexedDB.disable"].params.parse(params ?? {}))), "IndexedDB.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["IndexedDB.enable"].result.parse(await send("IndexedDB.enable", commands["IndexedDB.enable"].params.parse(params ?? {}))), "IndexedDB.enable", "command"), + requestData: withCdpName(async (params?: unknown) => commands["IndexedDB.requestData"].result.parse(await send("IndexedDB.requestData", commands["IndexedDB.requestData"].params.parse(params ?? {}))), "IndexedDB.requestData", "command"), + getMetadata: withCdpName(async (params?: unknown) => commands["IndexedDB.getMetadata"].result.parse(await send("IndexedDB.getMetadata", commands["IndexedDB.getMetadata"].params.parse(params ?? {}))), "IndexedDB.getMetadata", "command"), + requestDatabase: withCdpName(async (params?: unknown) => commands["IndexedDB.requestDatabase"].result.parse(await send("IndexedDB.requestDatabase", commands["IndexedDB.requestDatabase"].params.parse(params ?? {}))), "IndexedDB.requestDatabase", "command"), + requestDatabaseNames: withCdpName(async (params?: unknown) => commands["IndexedDB.requestDatabaseNames"].result.parse(await send("IndexedDB.requestDatabaseNames", commands["IndexedDB.requestDatabaseNames"].params.parse(params ?? {}))), "IndexedDB.requestDatabaseNames", "command"), }, Input: { - dispatchDragEvent: withCdpName( - async (params?: unknown) => - commands["Input.dispatchDragEvent"].result.parse( - await send("Input.dispatchDragEvent", commands["Input.dispatchDragEvent"].params.parse(params ?? {})), - ), - "Input.dispatchDragEvent", - "command", - ), - dispatchKeyEvent: withCdpName( - async (params?: unknown) => - commands["Input.dispatchKeyEvent"].result.parse( - await send("Input.dispatchKeyEvent", commands["Input.dispatchKeyEvent"].params.parse(params ?? {})), - ), - "Input.dispatchKeyEvent", - "command", - ), - insertText: withCdpName( - async (params?: unknown) => - commands["Input.insertText"].result.parse( - await send("Input.insertText", commands["Input.insertText"].params.parse(params ?? {})), - ), - "Input.insertText", - "command", - ), - imeSetComposition: withCdpName( - async (params?: unknown) => - commands["Input.imeSetComposition"].result.parse( - await send("Input.imeSetComposition", commands["Input.imeSetComposition"].params.parse(params ?? {})), - ), - "Input.imeSetComposition", - "command", - ), - dispatchMouseEvent: withCdpName( - async (params?: unknown) => - commands["Input.dispatchMouseEvent"].result.parse( - await send("Input.dispatchMouseEvent", commands["Input.dispatchMouseEvent"].params.parse(params ?? {})), - ), - "Input.dispatchMouseEvent", - "command", - ), - dispatchTouchEvent: withCdpName( - async (params?: unknown) => - commands["Input.dispatchTouchEvent"].result.parse( - await send("Input.dispatchTouchEvent", commands["Input.dispatchTouchEvent"].params.parse(params ?? {})), - ), - "Input.dispatchTouchEvent", - "command", - ), - cancelDragging: withCdpName( - async (params?: unknown) => - commands["Input.cancelDragging"].result.parse( - await send("Input.cancelDragging", commands["Input.cancelDragging"].params.parse(params ?? {})), - ), - "Input.cancelDragging", - "command", - ), - emulateTouchFromMouseEvent: withCdpName( - async (params?: unknown) => - commands["Input.emulateTouchFromMouseEvent"].result.parse( - await send( - "Input.emulateTouchFromMouseEvent", - commands["Input.emulateTouchFromMouseEvent"].params.parse(params ?? {}), - ), - ), - "Input.emulateTouchFromMouseEvent", - "command", - ), - setIgnoreInputEvents: withCdpName( - async (params?: unknown) => - commands["Input.setIgnoreInputEvents"].result.parse( - await send("Input.setIgnoreInputEvents", commands["Input.setIgnoreInputEvents"].params.parse(params ?? {})), - ), - "Input.setIgnoreInputEvents", - "command", - ), - setInterceptDrags: withCdpName( - async (params?: unknown) => - commands["Input.setInterceptDrags"].result.parse( - await send("Input.setInterceptDrags", commands["Input.setInterceptDrags"].params.parse(params ?? {})), - ), - "Input.setInterceptDrags", - "command", - ), - synthesizePinchGesture: withCdpName( - async (params?: unknown) => - commands["Input.synthesizePinchGesture"].result.parse( - await send( - "Input.synthesizePinchGesture", - commands["Input.synthesizePinchGesture"].params.parse(params ?? {}), - ), - ), - "Input.synthesizePinchGesture", - "command", - ), - synthesizeScrollGesture: withCdpName( - async (params?: unknown) => - commands["Input.synthesizeScrollGesture"].result.parse( - await send( - "Input.synthesizeScrollGesture", - commands["Input.synthesizeScrollGesture"].params.parse(params ?? {}), - ), - ), - "Input.synthesizeScrollGesture", - "command", - ), - synthesizeTapGesture: withCdpName( - async (params?: unknown) => - commands["Input.synthesizeTapGesture"].result.parse( - await send("Input.synthesizeTapGesture", commands["Input.synthesizeTapGesture"].params.parse(params ?? {})), - ), - "Input.synthesizeTapGesture", - "command", - ), - dragIntercepted: events["Input.dragIntercepted"] as CdpEventAlias< - cdp.types.ts.Input.DragInterceptedEvent, - "Input.dragIntercepted" - >, + dispatchDragEvent: withCdpName(async (params?: unknown) => commands["Input.dispatchDragEvent"].result.parse(await send("Input.dispatchDragEvent", commands["Input.dispatchDragEvent"].params.parse(params ?? {}))), "Input.dispatchDragEvent", "command"), + dispatchKeyEvent: withCdpName(async (params?: unknown) => commands["Input.dispatchKeyEvent"].result.parse(await send("Input.dispatchKeyEvent", commands["Input.dispatchKeyEvent"].params.parse(params ?? {}))), "Input.dispatchKeyEvent", "command"), + insertText: withCdpName(async (params?: unknown) => commands["Input.insertText"].result.parse(await send("Input.insertText", commands["Input.insertText"].params.parse(params ?? {}))), "Input.insertText", "command"), + imeSetComposition: withCdpName(async (params?: unknown) => commands["Input.imeSetComposition"].result.parse(await send("Input.imeSetComposition", commands["Input.imeSetComposition"].params.parse(params ?? {}))), "Input.imeSetComposition", "command"), + dispatchMouseEvent: withCdpName(async (params?: unknown) => commands["Input.dispatchMouseEvent"].result.parse(await send("Input.dispatchMouseEvent", commands["Input.dispatchMouseEvent"].params.parse(params ?? {}))), "Input.dispatchMouseEvent", "command"), + dispatchTouchEvent: withCdpName(async (params?: unknown) => commands["Input.dispatchTouchEvent"].result.parse(await send("Input.dispatchTouchEvent", commands["Input.dispatchTouchEvent"].params.parse(params ?? {}))), "Input.dispatchTouchEvent", "command"), + cancelDragging: withCdpName(async (params?: unknown) => commands["Input.cancelDragging"].result.parse(await send("Input.cancelDragging", commands["Input.cancelDragging"].params.parse(params ?? {}))), "Input.cancelDragging", "command"), + emulateTouchFromMouseEvent: withCdpName(async (params?: unknown) => commands["Input.emulateTouchFromMouseEvent"].result.parse(await send("Input.emulateTouchFromMouseEvent", commands["Input.emulateTouchFromMouseEvent"].params.parse(params ?? {}))), "Input.emulateTouchFromMouseEvent", "command"), + setIgnoreInputEvents: withCdpName(async (params?: unknown) => commands["Input.setIgnoreInputEvents"].result.parse(await send("Input.setIgnoreInputEvents", commands["Input.setIgnoreInputEvents"].params.parse(params ?? {}))), "Input.setIgnoreInputEvents", "command"), + setInterceptDrags: withCdpName(async (params?: unknown) => commands["Input.setInterceptDrags"].result.parse(await send("Input.setInterceptDrags", commands["Input.setInterceptDrags"].params.parse(params ?? {}))), "Input.setInterceptDrags", "command"), + synthesizePinchGesture: withCdpName(async (params?: unknown) => commands["Input.synthesizePinchGesture"].result.parse(await send("Input.synthesizePinchGesture", commands["Input.synthesizePinchGesture"].params.parse(params ?? {}))), "Input.synthesizePinchGesture", "command"), + synthesizeScrollGesture: withCdpName(async (params?: unknown) => commands["Input.synthesizeScrollGesture"].result.parse(await send("Input.synthesizeScrollGesture", commands["Input.synthesizeScrollGesture"].params.parse(params ?? {}))), "Input.synthesizeScrollGesture", "command"), + synthesizeTapGesture: withCdpName(async (params?: unknown) => commands["Input.synthesizeTapGesture"].result.parse(await send("Input.synthesizeTapGesture", commands["Input.synthesizeTapGesture"].params.parse(params ?? {}))), "Input.synthesizeTapGesture", "command"), + dragIntercepted: events["Input.dragIntercepted"] as CdpEventAlias, }, Inspector: { - disable: withCdpName( - async (params?: unknown) => - commands["Inspector.disable"].result.parse( - await send("Inspector.disable", commands["Inspector.disable"].params.parse(params ?? {})), - ), - "Inspector.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Inspector.enable"].result.parse( - await send("Inspector.enable", commands["Inspector.enable"].params.parse(params ?? {})), - ), - "Inspector.enable", - "command", - ), - detached: events["Inspector.detached"] as CdpEventAlias< - cdp.types.ts.Inspector.DetachedEvent, - "Inspector.detached" - >, - targetCrashed: events["Inspector.targetCrashed"] as CdpEventAlias< - cdp.types.ts.Inspector.TargetCrashedEvent, - "Inspector.targetCrashed" - >, - targetReloadedAfterCrash: events["Inspector.targetReloadedAfterCrash"] as CdpEventAlias< - cdp.types.ts.Inspector.TargetReloadedAfterCrashEvent, - "Inspector.targetReloadedAfterCrash" - >, - workerScriptLoaded: events["Inspector.workerScriptLoaded"] as CdpEventAlias< - cdp.types.ts.Inspector.WorkerScriptLoadedEvent, - "Inspector.workerScriptLoaded" - >, + disable: withCdpName(async (params?: unknown) => commands["Inspector.disable"].result.parse(await send("Inspector.disable", commands["Inspector.disable"].params.parse(params ?? {}))), "Inspector.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Inspector.enable"].result.parse(await send("Inspector.enable", commands["Inspector.enable"].params.parse(params ?? {}))), "Inspector.enable", "command"), + detached: events["Inspector.detached"] as CdpEventAlias, + targetCrashed: events["Inspector.targetCrashed"] as CdpEventAlias, + targetReloadedAfterCrash: events["Inspector.targetReloadedAfterCrash"] as CdpEventAlias, + workerScriptLoaded: events["Inspector.workerScriptLoaded"] as CdpEventAlias, }, IO: { - close: withCdpName( - async (params?: unknown) => - commands["IO.close"].result.parse(await send("IO.close", commands["IO.close"].params.parse(params ?? {}))), - "IO.close", - "command", - ), - read: withCdpName( - async (params?: unknown) => - commands["IO.read"].result.parse(await send("IO.read", commands["IO.read"].params.parse(params ?? {}))), - "IO.read", - "command", - ), - resolveBlob: withCdpName( - async (params?: unknown) => - commands["IO.resolveBlob"].result.parse( - await send("IO.resolveBlob", commands["IO.resolveBlob"].params.parse(params ?? {})), - ), - "IO.resolveBlob", - "command", - ), + close: withCdpName(async (params?: unknown) => commands["IO.close"].result.parse(await send("IO.close", commands["IO.close"].params.parse(params ?? {}))), "IO.close", "command"), + read: withCdpName(async (params?: unknown) => commands["IO.read"].result.parse(await send("IO.read", commands["IO.read"].params.parse(params ?? {}))), "IO.read", "command"), + resolveBlob: withCdpName(async (params?: unknown) => commands["IO.resolveBlob"].result.parse(await send("IO.resolveBlob", commands["IO.resolveBlob"].params.parse(params ?? {}))), "IO.resolveBlob", "command"), }, LayerTree: { - compositingReasons: withCdpName( - async (params?: unknown) => - commands["LayerTree.compositingReasons"].result.parse( - await send( - "LayerTree.compositingReasons", - commands["LayerTree.compositingReasons"].params.parse(params ?? {}), - ), - ), - "LayerTree.compositingReasons", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["LayerTree.disable"].result.parse( - await send("LayerTree.disable", commands["LayerTree.disable"].params.parse(params ?? {})), - ), - "LayerTree.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["LayerTree.enable"].result.parse( - await send("LayerTree.enable", commands["LayerTree.enable"].params.parse(params ?? {})), - ), - "LayerTree.enable", - "command", - ), - loadSnapshot: withCdpName( - async (params?: unknown) => - commands["LayerTree.loadSnapshot"].result.parse( - await send("LayerTree.loadSnapshot", commands["LayerTree.loadSnapshot"].params.parse(params ?? {})), - ), - "LayerTree.loadSnapshot", - "command", - ), - makeSnapshot: withCdpName( - async (params?: unknown) => - commands["LayerTree.makeSnapshot"].result.parse( - await send("LayerTree.makeSnapshot", commands["LayerTree.makeSnapshot"].params.parse(params ?? {})), - ), - "LayerTree.makeSnapshot", - "command", - ), - profileSnapshot: withCdpName( - async (params?: unknown) => - commands["LayerTree.profileSnapshot"].result.parse( - await send("LayerTree.profileSnapshot", commands["LayerTree.profileSnapshot"].params.parse(params ?? {})), - ), - "LayerTree.profileSnapshot", - "command", - ), - releaseSnapshot: withCdpName( - async (params?: unknown) => - commands["LayerTree.releaseSnapshot"].result.parse( - await send("LayerTree.releaseSnapshot", commands["LayerTree.releaseSnapshot"].params.parse(params ?? {})), - ), - "LayerTree.releaseSnapshot", - "command", - ), - replaySnapshot: withCdpName( - async (params?: unknown) => - commands["LayerTree.replaySnapshot"].result.parse( - await send("LayerTree.replaySnapshot", commands["LayerTree.replaySnapshot"].params.parse(params ?? {})), - ), - "LayerTree.replaySnapshot", - "command", - ), - snapshotCommandLog: withCdpName( - async (params?: unknown) => - commands["LayerTree.snapshotCommandLog"].result.parse( - await send( - "LayerTree.snapshotCommandLog", - commands["LayerTree.snapshotCommandLog"].params.parse(params ?? {}), - ), - ), - "LayerTree.snapshotCommandLog", - "command", - ), - layerPainted: events["LayerTree.layerPainted"] as CdpEventAlias< - cdp.types.ts.LayerTree.LayerPaintedEvent, - "LayerTree.layerPainted" - >, - layerTreeDidChange: events["LayerTree.layerTreeDidChange"] as CdpEventAlias< - cdp.types.ts.LayerTree.LayerTreeDidChangeEvent, - "LayerTree.layerTreeDidChange" - >, + compositingReasons: withCdpName(async (params?: unknown) => commands["LayerTree.compositingReasons"].result.parse(await send("LayerTree.compositingReasons", commands["LayerTree.compositingReasons"].params.parse(params ?? {}))), "LayerTree.compositingReasons", "command"), + disable: withCdpName(async (params?: unknown) => commands["LayerTree.disable"].result.parse(await send("LayerTree.disable", commands["LayerTree.disable"].params.parse(params ?? {}))), "LayerTree.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["LayerTree.enable"].result.parse(await send("LayerTree.enable", commands["LayerTree.enable"].params.parse(params ?? {}))), "LayerTree.enable", "command"), + loadSnapshot: withCdpName(async (params?: unknown) => commands["LayerTree.loadSnapshot"].result.parse(await send("LayerTree.loadSnapshot", commands["LayerTree.loadSnapshot"].params.parse(params ?? {}))), "LayerTree.loadSnapshot", "command"), + makeSnapshot: withCdpName(async (params?: unknown) => commands["LayerTree.makeSnapshot"].result.parse(await send("LayerTree.makeSnapshot", commands["LayerTree.makeSnapshot"].params.parse(params ?? {}))), "LayerTree.makeSnapshot", "command"), + profileSnapshot: withCdpName(async (params?: unknown) => commands["LayerTree.profileSnapshot"].result.parse(await send("LayerTree.profileSnapshot", commands["LayerTree.profileSnapshot"].params.parse(params ?? {}))), "LayerTree.profileSnapshot", "command"), + releaseSnapshot: withCdpName(async (params?: unknown) => commands["LayerTree.releaseSnapshot"].result.parse(await send("LayerTree.releaseSnapshot", commands["LayerTree.releaseSnapshot"].params.parse(params ?? {}))), "LayerTree.releaseSnapshot", "command"), + replaySnapshot: withCdpName(async (params?: unknown) => commands["LayerTree.replaySnapshot"].result.parse(await send("LayerTree.replaySnapshot", commands["LayerTree.replaySnapshot"].params.parse(params ?? {}))), "LayerTree.replaySnapshot", "command"), + snapshotCommandLog: withCdpName(async (params?: unknown) => commands["LayerTree.snapshotCommandLog"].result.parse(await send("LayerTree.snapshotCommandLog", commands["LayerTree.snapshotCommandLog"].params.parse(params ?? {}))), "LayerTree.snapshotCommandLog", "command"), + layerPainted: events["LayerTree.layerPainted"] as CdpEventAlias, + layerTreeDidChange: events["LayerTree.layerTreeDidChange"] as CdpEventAlias, }, Log: { - clear: withCdpName( - async (params?: unknown) => - commands["Log.clear"].result.parse(await send("Log.clear", commands["Log.clear"].params.parse(params ?? {}))), - "Log.clear", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Log.disable"].result.parse( - await send("Log.disable", commands["Log.disable"].params.parse(params ?? {})), - ), - "Log.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Log.enable"].result.parse( - await send("Log.enable", commands["Log.enable"].params.parse(params ?? {})), - ), - "Log.enable", - "command", - ), - startViolationsReport: withCdpName( - async (params?: unknown) => - commands["Log.startViolationsReport"].result.parse( - await send("Log.startViolationsReport", commands["Log.startViolationsReport"].params.parse(params ?? {})), - ), - "Log.startViolationsReport", - "command", - ), - stopViolationsReport: withCdpName( - async (params?: unknown) => - commands["Log.stopViolationsReport"].result.parse( - await send("Log.stopViolationsReport", commands["Log.stopViolationsReport"].params.parse(params ?? {})), - ), - "Log.stopViolationsReport", - "command", - ), + clear: withCdpName(async (params?: unknown) => commands["Log.clear"].result.parse(await send("Log.clear", commands["Log.clear"].params.parse(params ?? {}))), "Log.clear", "command"), + disable: withCdpName(async (params?: unknown) => commands["Log.disable"].result.parse(await send("Log.disable", commands["Log.disable"].params.parse(params ?? {}))), "Log.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Log.enable"].result.parse(await send("Log.enable", commands["Log.enable"].params.parse(params ?? {}))), "Log.enable", "command"), + startViolationsReport: withCdpName(async (params?: unknown) => commands["Log.startViolationsReport"].result.parse(await send("Log.startViolationsReport", commands["Log.startViolationsReport"].params.parse(params ?? {}))), "Log.startViolationsReport", "command"), + stopViolationsReport: withCdpName(async (params?: unknown) => commands["Log.stopViolationsReport"].result.parse(await send("Log.stopViolationsReport", commands["Log.stopViolationsReport"].params.parse(params ?? {}))), "Log.stopViolationsReport", "command"), entryAdded: events["Log.entryAdded"] as CdpEventAlias, }, Media: { - enable: withCdpName( - async (params?: unknown) => - commands["Media.enable"].result.parse( - await send("Media.enable", commands["Media.enable"].params.parse(params ?? {})), - ), - "Media.enable", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Media.disable"].result.parse( - await send("Media.disable", commands["Media.disable"].params.parse(params ?? {})), - ), - "Media.disable", - "command", - ), - playerPropertiesChanged: events["Media.playerPropertiesChanged"] as CdpEventAlias< - cdp.types.ts.Media.PlayerPropertiesChangedEvent, - "Media.playerPropertiesChanged" - >, - playerEventsAdded: events["Media.playerEventsAdded"] as CdpEventAlias< - cdp.types.ts.Media.PlayerEventsAddedEvent, - "Media.playerEventsAdded" - >, - playerMessagesLogged: events["Media.playerMessagesLogged"] as CdpEventAlias< - cdp.types.ts.Media.PlayerMessagesLoggedEvent, - "Media.playerMessagesLogged" - >, - playerErrorsRaised: events["Media.playerErrorsRaised"] as CdpEventAlias< - cdp.types.ts.Media.PlayerErrorsRaisedEvent, - "Media.playerErrorsRaised" - >, - playerCreated: events["Media.playerCreated"] as CdpEventAlias< - cdp.types.ts.Media.PlayerCreatedEvent, - "Media.playerCreated" - >, + enable: withCdpName(async (params?: unknown) => commands["Media.enable"].result.parse(await send("Media.enable", commands["Media.enable"].params.parse(params ?? {}))), "Media.enable", "command"), + disable: withCdpName(async (params?: unknown) => commands["Media.disable"].result.parse(await send("Media.disable", commands["Media.disable"].params.parse(params ?? {}))), "Media.disable", "command"), + playerPropertiesChanged: events["Media.playerPropertiesChanged"] as CdpEventAlias, + playerEventsAdded: events["Media.playerEventsAdded"] as CdpEventAlias, + playerMessagesLogged: events["Media.playerMessagesLogged"] as CdpEventAlias, + playerErrorsRaised: events["Media.playerErrorsRaised"] as CdpEventAlias, + playerCreated: events["Media.playerCreated"] as CdpEventAlias, }, Memory: { - getDOMCounters: withCdpName( - async (params?: unknown) => - commands["Memory.getDOMCounters"].result.parse( - await send("Memory.getDOMCounters", commands["Memory.getDOMCounters"].params.parse(params ?? {})), - ), - "Memory.getDOMCounters", - "command", - ), - getDOMCountersForLeakDetection: withCdpName( - async (params?: unknown) => - commands["Memory.getDOMCountersForLeakDetection"].result.parse( - await send( - "Memory.getDOMCountersForLeakDetection", - commands["Memory.getDOMCountersForLeakDetection"].params.parse(params ?? {}), - ), - ), - "Memory.getDOMCountersForLeakDetection", - "command", - ), - prepareForLeakDetection: withCdpName( - async (params?: unknown) => - commands["Memory.prepareForLeakDetection"].result.parse( - await send( - "Memory.prepareForLeakDetection", - commands["Memory.prepareForLeakDetection"].params.parse(params ?? {}), - ), - ), - "Memory.prepareForLeakDetection", - "command", - ), - forciblyPurgeJavaScriptMemory: withCdpName( - async (params?: unknown) => - commands["Memory.forciblyPurgeJavaScriptMemory"].result.parse( - await send( - "Memory.forciblyPurgeJavaScriptMemory", - commands["Memory.forciblyPurgeJavaScriptMemory"].params.parse(params ?? {}), - ), - ), - "Memory.forciblyPurgeJavaScriptMemory", - "command", - ), - setPressureNotificationsSuppressed: withCdpName( - async (params?: unknown) => - commands["Memory.setPressureNotificationsSuppressed"].result.parse( - await send( - "Memory.setPressureNotificationsSuppressed", - commands["Memory.setPressureNotificationsSuppressed"].params.parse(params ?? {}), - ), - ), - "Memory.setPressureNotificationsSuppressed", - "command", - ), - simulatePressureNotification: withCdpName( - async (params?: unknown) => - commands["Memory.simulatePressureNotification"].result.parse( - await send( - "Memory.simulatePressureNotification", - commands["Memory.simulatePressureNotification"].params.parse(params ?? {}), - ), - ), - "Memory.simulatePressureNotification", - "command", - ), - startSampling: withCdpName( - async (params?: unknown) => - commands["Memory.startSampling"].result.parse( - await send("Memory.startSampling", commands["Memory.startSampling"].params.parse(params ?? {})), - ), - "Memory.startSampling", - "command", - ), - stopSampling: withCdpName( - async (params?: unknown) => - commands["Memory.stopSampling"].result.parse( - await send("Memory.stopSampling", commands["Memory.stopSampling"].params.parse(params ?? {})), - ), - "Memory.stopSampling", - "command", - ), - getAllTimeSamplingProfile: withCdpName( - async (params?: unknown) => - commands["Memory.getAllTimeSamplingProfile"].result.parse( - await send( - "Memory.getAllTimeSamplingProfile", - commands["Memory.getAllTimeSamplingProfile"].params.parse(params ?? {}), - ), - ), - "Memory.getAllTimeSamplingProfile", - "command", - ), - getBrowserSamplingProfile: withCdpName( - async (params?: unknown) => - commands["Memory.getBrowserSamplingProfile"].result.parse( - await send( - "Memory.getBrowserSamplingProfile", - commands["Memory.getBrowserSamplingProfile"].params.parse(params ?? {}), - ), - ), - "Memory.getBrowserSamplingProfile", - "command", - ), - getSamplingProfile: withCdpName( - async (params?: unknown) => - commands["Memory.getSamplingProfile"].result.parse( - await send("Memory.getSamplingProfile", commands["Memory.getSamplingProfile"].params.parse(params ?? {})), - ), - "Memory.getSamplingProfile", - "command", - ), + getDOMCounters: withCdpName(async (params?: unknown) => commands["Memory.getDOMCounters"].result.parse(await send("Memory.getDOMCounters", commands["Memory.getDOMCounters"].params.parse(params ?? {}))), "Memory.getDOMCounters", "command"), + getDOMCountersForLeakDetection: withCdpName(async (params?: unknown) => commands["Memory.getDOMCountersForLeakDetection"].result.parse(await send("Memory.getDOMCountersForLeakDetection", commands["Memory.getDOMCountersForLeakDetection"].params.parse(params ?? {}))), "Memory.getDOMCountersForLeakDetection", "command"), + prepareForLeakDetection: withCdpName(async (params?: unknown) => commands["Memory.prepareForLeakDetection"].result.parse(await send("Memory.prepareForLeakDetection", commands["Memory.prepareForLeakDetection"].params.parse(params ?? {}))), "Memory.prepareForLeakDetection", "command"), + forciblyPurgeJavaScriptMemory: withCdpName(async (params?: unknown) => commands["Memory.forciblyPurgeJavaScriptMemory"].result.parse(await send("Memory.forciblyPurgeJavaScriptMemory", commands["Memory.forciblyPurgeJavaScriptMemory"].params.parse(params ?? {}))), "Memory.forciblyPurgeJavaScriptMemory", "command"), + setPressureNotificationsSuppressed: withCdpName(async (params?: unknown) => commands["Memory.setPressureNotificationsSuppressed"].result.parse(await send("Memory.setPressureNotificationsSuppressed", commands["Memory.setPressureNotificationsSuppressed"].params.parse(params ?? {}))), "Memory.setPressureNotificationsSuppressed", "command"), + simulatePressureNotification: withCdpName(async (params?: unknown) => commands["Memory.simulatePressureNotification"].result.parse(await send("Memory.simulatePressureNotification", commands["Memory.simulatePressureNotification"].params.parse(params ?? {}))), "Memory.simulatePressureNotification", "command"), + startSampling: withCdpName(async (params?: unknown) => commands["Memory.startSampling"].result.parse(await send("Memory.startSampling", commands["Memory.startSampling"].params.parse(params ?? {}))), "Memory.startSampling", "command"), + stopSampling: withCdpName(async (params?: unknown) => commands["Memory.stopSampling"].result.parse(await send("Memory.stopSampling", commands["Memory.stopSampling"].params.parse(params ?? {}))), "Memory.stopSampling", "command"), + getAllTimeSamplingProfile: withCdpName(async (params?: unknown) => commands["Memory.getAllTimeSamplingProfile"].result.parse(await send("Memory.getAllTimeSamplingProfile", commands["Memory.getAllTimeSamplingProfile"].params.parse(params ?? {}))), "Memory.getAllTimeSamplingProfile", "command"), + getBrowserSamplingProfile: withCdpName(async (params?: unknown) => commands["Memory.getBrowserSamplingProfile"].result.parse(await send("Memory.getBrowserSamplingProfile", commands["Memory.getBrowserSamplingProfile"].params.parse(params ?? {}))), "Memory.getBrowserSamplingProfile", "command"), + getSamplingProfile: withCdpName(async (params?: unknown) => commands["Memory.getSamplingProfile"].result.parse(await send("Memory.getSamplingProfile", commands["Memory.getSamplingProfile"].params.parse(params ?? {}))), "Memory.getSamplingProfile", "command"), }, Network: { - setAcceptedEncodings: withCdpName( - async (params?: unknown) => - commands["Network.setAcceptedEncodings"].result.parse( - await send( - "Network.setAcceptedEncodings", - commands["Network.setAcceptedEncodings"].params.parse(params ?? {}), - ), - ), - "Network.setAcceptedEncodings", - "command", - ), - clearAcceptedEncodingsOverride: withCdpName( - async (params?: unknown) => - commands["Network.clearAcceptedEncodingsOverride"].result.parse( - await send( - "Network.clearAcceptedEncodingsOverride", - commands["Network.clearAcceptedEncodingsOverride"].params.parse(params ?? {}), - ), - ), - "Network.clearAcceptedEncodingsOverride", - "command", - ), - canClearBrowserCache: withCdpName( - async (params?: unknown) => - commands["Network.canClearBrowserCache"].result.parse( - await send( - "Network.canClearBrowserCache", - commands["Network.canClearBrowserCache"].params.parse(params ?? {}), - ), - ), - "Network.canClearBrowserCache", - "command", - ), - canClearBrowserCookies: withCdpName( - async (params?: unknown) => - commands["Network.canClearBrowserCookies"].result.parse( - await send( - "Network.canClearBrowserCookies", - commands["Network.canClearBrowserCookies"].params.parse(params ?? {}), - ), - ), - "Network.canClearBrowserCookies", - "command", - ), - canEmulateNetworkConditions: withCdpName( - async (params?: unknown) => - commands["Network.canEmulateNetworkConditions"].result.parse( - await send( - "Network.canEmulateNetworkConditions", - commands["Network.canEmulateNetworkConditions"].params.parse(params ?? {}), - ), - ), - "Network.canEmulateNetworkConditions", - "command", - ), - clearBrowserCache: withCdpName( - async (params?: unknown) => - commands["Network.clearBrowserCache"].result.parse( - await send("Network.clearBrowserCache", commands["Network.clearBrowserCache"].params.parse(params ?? {})), - ), - "Network.clearBrowserCache", - "command", - ), - clearBrowserCookies: withCdpName( - async (params?: unknown) => - commands["Network.clearBrowserCookies"].result.parse( - await send( - "Network.clearBrowserCookies", - commands["Network.clearBrowserCookies"].params.parse(params ?? {}), - ), - ), - "Network.clearBrowserCookies", - "command", - ), - continueInterceptedRequest: withCdpName( - async (params?: unknown) => - commands["Network.continueInterceptedRequest"].result.parse( - await send( - "Network.continueInterceptedRequest", - commands["Network.continueInterceptedRequest"].params.parse(params ?? {}), - ), - ), - "Network.continueInterceptedRequest", - "command", - ), - deleteCookies: withCdpName( - async (params?: unknown) => - commands["Network.deleteCookies"].result.parse( - await send("Network.deleteCookies", commands["Network.deleteCookies"].params.parse(params ?? {})), - ), - "Network.deleteCookies", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Network.disable"].result.parse( - await send("Network.disable", commands["Network.disable"].params.parse(params ?? {})), - ), - "Network.disable", - "command", - ), - emulateNetworkConditions: withCdpName( - async (params?: unknown) => - commands["Network.emulateNetworkConditions"].result.parse( - await send( - "Network.emulateNetworkConditions", - commands["Network.emulateNetworkConditions"].params.parse(params ?? {}), - ), - ), - "Network.emulateNetworkConditions", - "command", - ), - emulateNetworkConditionsByRule: withCdpName( - async (params?: unknown) => - commands["Network.emulateNetworkConditionsByRule"].result.parse( - await send( - "Network.emulateNetworkConditionsByRule", - commands["Network.emulateNetworkConditionsByRule"].params.parse(params ?? {}), - ), - ), - "Network.emulateNetworkConditionsByRule", - "command", - ), - overrideNetworkState: withCdpName( - async (params?: unknown) => - commands["Network.overrideNetworkState"].result.parse( - await send( - "Network.overrideNetworkState", - commands["Network.overrideNetworkState"].params.parse(params ?? {}), - ), - ), - "Network.overrideNetworkState", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Network.enable"].result.parse( - await send("Network.enable", commands["Network.enable"].params.parse(params ?? {})), - ), - "Network.enable", - "command", - ), - configureDurableMessages: withCdpName( - async (params?: unknown) => - commands["Network.configureDurableMessages"].result.parse( - await send( - "Network.configureDurableMessages", - commands["Network.configureDurableMessages"].params.parse(params ?? {}), - ), - ), - "Network.configureDurableMessages", - "command", - ), - getAllCookies: withCdpName( - async (params?: unknown) => - commands["Network.getAllCookies"].result.parse( - await send("Network.getAllCookies", commands["Network.getAllCookies"].params.parse(params ?? {})), - ), - "Network.getAllCookies", - "command", - ), - getCertificate: withCdpName( - async (params?: unknown) => - commands["Network.getCertificate"].result.parse( - await send("Network.getCertificate", commands["Network.getCertificate"].params.parse(params ?? {})), - ), - "Network.getCertificate", - "command", - ), - getCookies: withCdpName( - async (params?: unknown) => - commands["Network.getCookies"].result.parse( - await send("Network.getCookies", commands["Network.getCookies"].params.parse(params ?? {})), - ), - "Network.getCookies", - "command", - ), - getResponseBody: withCdpName( - async (params?: unknown) => - commands["Network.getResponseBody"].result.parse( - await send("Network.getResponseBody", commands["Network.getResponseBody"].params.parse(params ?? {})), - ), - "Network.getResponseBody", - "command", - ), - getRequestPostData: withCdpName( - async (params?: unknown) => - commands["Network.getRequestPostData"].result.parse( - await send("Network.getRequestPostData", commands["Network.getRequestPostData"].params.parse(params ?? {})), - ), - "Network.getRequestPostData", - "command", - ), - getResponseBodyForInterception: withCdpName( - async (params?: unknown) => - commands["Network.getResponseBodyForInterception"].result.parse( - await send( - "Network.getResponseBodyForInterception", - commands["Network.getResponseBodyForInterception"].params.parse(params ?? {}), - ), - ), - "Network.getResponseBodyForInterception", - "command", - ), - takeResponseBodyForInterceptionAsStream: withCdpName( - async (params?: unknown) => - commands["Network.takeResponseBodyForInterceptionAsStream"].result.parse( - await send( - "Network.takeResponseBodyForInterceptionAsStream", - commands["Network.takeResponseBodyForInterceptionAsStream"].params.parse(params ?? {}), - ), - ), - "Network.takeResponseBodyForInterceptionAsStream", - "command", - ), - replayXHR: withCdpName( - async (params?: unknown) => - commands["Network.replayXHR"].result.parse( - await send("Network.replayXHR", commands["Network.replayXHR"].params.parse(params ?? {})), - ), - "Network.replayXHR", - "command", - ), - searchInResponseBody: withCdpName( - async (params?: unknown) => - commands["Network.searchInResponseBody"].result.parse( - await send( - "Network.searchInResponseBody", - commands["Network.searchInResponseBody"].params.parse(params ?? {}), - ), - ), - "Network.searchInResponseBody", - "command", - ), - setBlockedURLs: withCdpName( - async (params?: unknown) => - commands["Network.setBlockedURLs"].result.parse( - await send("Network.setBlockedURLs", commands["Network.setBlockedURLs"].params.parse(params ?? {})), - ), - "Network.setBlockedURLs", - "command", - ), - setBypassServiceWorker: withCdpName( - async (params?: unknown) => - commands["Network.setBypassServiceWorker"].result.parse( - await send( - "Network.setBypassServiceWorker", - commands["Network.setBypassServiceWorker"].params.parse(params ?? {}), - ), - ), - "Network.setBypassServiceWorker", - "command", - ), - setCacheDisabled: withCdpName( - async (params?: unknown) => - commands["Network.setCacheDisabled"].result.parse( - await send("Network.setCacheDisabled", commands["Network.setCacheDisabled"].params.parse(params ?? {})), - ), - "Network.setCacheDisabled", - "command", - ), - setCookie: withCdpName( - async (params?: unknown) => - commands["Network.setCookie"].result.parse( - await send("Network.setCookie", commands["Network.setCookie"].params.parse(params ?? {})), - ), - "Network.setCookie", - "command", - ), - setCookies: withCdpName( - async (params?: unknown) => - commands["Network.setCookies"].result.parse( - await send("Network.setCookies", commands["Network.setCookies"].params.parse(params ?? {})), - ), - "Network.setCookies", - "command", - ), - setExtraHTTPHeaders: withCdpName( - async (params?: unknown) => - commands["Network.setExtraHTTPHeaders"].result.parse( - await send( - "Network.setExtraHTTPHeaders", - commands["Network.setExtraHTTPHeaders"].params.parse(params ?? {}), - ), - ), - "Network.setExtraHTTPHeaders", - "command", - ), - setAttachDebugStack: withCdpName( - async (params?: unknown) => - commands["Network.setAttachDebugStack"].result.parse( - await send( - "Network.setAttachDebugStack", - commands["Network.setAttachDebugStack"].params.parse(params ?? {}), - ), - ), - "Network.setAttachDebugStack", - "command", - ), - setRequestInterception: withCdpName( - async (params?: unknown) => - commands["Network.setRequestInterception"].result.parse( - await send( - "Network.setRequestInterception", - commands["Network.setRequestInterception"].params.parse(params ?? {}), - ), - ), - "Network.setRequestInterception", - "command", - ), - setUserAgentOverride: withCdpName( - async (params?: unknown) => - commands["Network.setUserAgentOverride"].result.parse( - await send( - "Network.setUserAgentOverride", - commands["Network.setUserAgentOverride"].params.parse(params ?? {}), - ), - ), - "Network.setUserAgentOverride", - "command", - ), - streamResourceContent: withCdpName( - async (params?: unknown) => - commands["Network.streamResourceContent"].result.parse( - await send( - "Network.streamResourceContent", - commands["Network.streamResourceContent"].params.parse(params ?? {}), - ), - ), - "Network.streamResourceContent", - "command", - ), - getSecurityIsolationStatus: withCdpName( - async (params?: unknown) => - commands["Network.getSecurityIsolationStatus"].result.parse( - await send( - "Network.getSecurityIsolationStatus", - commands["Network.getSecurityIsolationStatus"].params.parse(params ?? {}), - ), - ), - "Network.getSecurityIsolationStatus", - "command", - ), - enableReportingApi: withCdpName( - async (params?: unknown) => - commands["Network.enableReportingApi"].result.parse( - await send("Network.enableReportingApi", commands["Network.enableReportingApi"].params.parse(params ?? {})), - ), - "Network.enableReportingApi", - "command", - ), - enableDeviceBoundSessions: withCdpName( - async (params?: unknown) => - commands["Network.enableDeviceBoundSessions"].result.parse( - await send( - "Network.enableDeviceBoundSessions", - commands["Network.enableDeviceBoundSessions"].params.parse(params ?? {}), - ), - ), - "Network.enableDeviceBoundSessions", - "command", - ), - deleteDeviceBoundSession: withCdpName( - async (params?: unknown) => - commands["Network.deleteDeviceBoundSession"].result.parse( - await send( - "Network.deleteDeviceBoundSession", - commands["Network.deleteDeviceBoundSession"].params.parse(params ?? {}), - ), - ), - "Network.deleteDeviceBoundSession", - "command", - ), - fetchSchemefulSite: withCdpName( - async (params?: unknown) => - commands["Network.fetchSchemefulSite"].result.parse( - await send("Network.fetchSchemefulSite", commands["Network.fetchSchemefulSite"].params.parse(params ?? {})), - ), - "Network.fetchSchemefulSite", - "command", - ), - loadNetworkResource: withCdpName( - async (params?: unknown) => - commands["Network.loadNetworkResource"].result.parse( - await send( - "Network.loadNetworkResource", - commands["Network.loadNetworkResource"].params.parse(params ?? {}), - ), - ), - "Network.loadNetworkResource", - "command", - ), - setCookieControls: withCdpName( - async (params?: unknown) => - commands["Network.setCookieControls"].result.parse( - await send("Network.setCookieControls", commands["Network.setCookieControls"].params.parse(params ?? {})), - ), - "Network.setCookieControls", - "command", - ), - dataReceived: events["Network.dataReceived"] as CdpEventAlias< - cdp.types.ts.Network.DataReceivedEvent, - "Network.dataReceived" - >, - eventSourceMessageReceived: events["Network.eventSourceMessageReceived"] as CdpEventAlias< - cdp.types.ts.Network.EventSourceMessageReceivedEvent, - "Network.eventSourceMessageReceived" - >, - loadingFailed: events["Network.loadingFailed"] as CdpEventAlias< - cdp.types.ts.Network.LoadingFailedEvent, - "Network.loadingFailed" - >, - loadingFinished: events["Network.loadingFinished"] as CdpEventAlias< - cdp.types.ts.Network.LoadingFinishedEvent, - "Network.loadingFinished" - >, - requestIntercepted: events["Network.requestIntercepted"] as CdpEventAlias< - cdp.types.ts.Network.RequestInterceptedEvent, - "Network.requestIntercepted" - >, - requestServedFromCache: events["Network.requestServedFromCache"] as CdpEventAlias< - cdp.types.ts.Network.RequestServedFromCacheEvent, - "Network.requestServedFromCache" - >, - requestWillBeSent: events["Network.requestWillBeSent"] as CdpEventAlias< - cdp.types.ts.Network.RequestWillBeSentEvent, - "Network.requestWillBeSent" - >, - resourceChangedPriority: events["Network.resourceChangedPriority"] as CdpEventAlias< - cdp.types.ts.Network.ResourceChangedPriorityEvent, - "Network.resourceChangedPriority" - >, - signedExchangeReceived: events["Network.signedExchangeReceived"] as CdpEventAlias< - cdp.types.ts.Network.SignedExchangeReceivedEvent, - "Network.signedExchangeReceived" - >, - responseReceived: events["Network.responseReceived"] as CdpEventAlias< - cdp.types.ts.Network.ResponseReceivedEvent, - "Network.responseReceived" - >, - webSocketClosed: events["Network.webSocketClosed"] as CdpEventAlias< - cdp.types.ts.Network.WebSocketClosedEvent, - "Network.webSocketClosed" - >, - webSocketCreated: events["Network.webSocketCreated"] as CdpEventAlias< - cdp.types.ts.Network.WebSocketCreatedEvent, - "Network.webSocketCreated" - >, - webSocketFrameError: events["Network.webSocketFrameError"] as CdpEventAlias< - cdp.types.ts.Network.WebSocketFrameErrorEvent, - "Network.webSocketFrameError" - >, - webSocketFrameReceived: events["Network.webSocketFrameReceived"] as CdpEventAlias< - cdp.types.ts.Network.WebSocketFrameReceivedEvent, - "Network.webSocketFrameReceived" - >, - webSocketFrameSent: events["Network.webSocketFrameSent"] as CdpEventAlias< - cdp.types.ts.Network.WebSocketFrameSentEvent, - "Network.webSocketFrameSent" - >, - webSocketHandshakeResponseReceived: events["Network.webSocketHandshakeResponseReceived"] as CdpEventAlias< - cdp.types.ts.Network.WebSocketHandshakeResponseReceivedEvent, - "Network.webSocketHandshakeResponseReceived" - >, - webSocketWillSendHandshakeRequest: events["Network.webSocketWillSendHandshakeRequest"] as CdpEventAlias< - cdp.types.ts.Network.WebSocketWillSendHandshakeRequestEvent, - "Network.webSocketWillSendHandshakeRequest" - >, - webTransportCreated: events["Network.webTransportCreated"] as CdpEventAlias< - cdp.types.ts.Network.WebTransportCreatedEvent, - "Network.webTransportCreated" - >, - webTransportConnectionEstablished: events["Network.webTransportConnectionEstablished"] as CdpEventAlias< - cdp.types.ts.Network.WebTransportConnectionEstablishedEvent, - "Network.webTransportConnectionEstablished" - >, - webTransportClosed: events["Network.webTransportClosed"] as CdpEventAlias< - cdp.types.ts.Network.WebTransportClosedEvent, - "Network.webTransportClosed" - >, - directTCPSocketCreated: events["Network.directTCPSocketCreated"] as CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketCreatedEvent, - "Network.directTCPSocketCreated" - >, - directTCPSocketOpened: events["Network.directTCPSocketOpened"] as CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketOpenedEvent, - "Network.directTCPSocketOpened" - >, - directTCPSocketAborted: events["Network.directTCPSocketAborted"] as CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketAbortedEvent, - "Network.directTCPSocketAborted" - >, - directTCPSocketClosed: events["Network.directTCPSocketClosed"] as CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketClosedEvent, - "Network.directTCPSocketClosed" - >, - directTCPSocketChunkSent: events["Network.directTCPSocketChunkSent"] as CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketChunkSentEvent, - "Network.directTCPSocketChunkSent" - >, - directTCPSocketChunkReceived: events["Network.directTCPSocketChunkReceived"] as CdpEventAlias< - cdp.types.ts.Network.DirectTCPSocketChunkReceivedEvent, - "Network.directTCPSocketChunkReceived" - >, - directUDPSocketJoinedMulticastGroup: events["Network.directUDPSocketJoinedMulticastGroup"] as CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketJoinedMulticastGroupEvent, - "Network.directUDPSocketJoinedMulticastGroup" - >, - directUDPSocketLeftMulticastGroup: events["Network.directUDPSocketLeftMulticastGroup"] as CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketLeftMulticastGroupEvent, - "Network.directUDPSocketLeftMulticastGroup" - >, - directUDPSocketCreated: events["Network.directUDPSocketCreated"] as CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketCreatedEvent, - "Network.directUDPSocketCreated" - >, - directUDPSocketOpened: events["Network.directUDPSocketOpened"] as CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketOpenedEvent, - "Network.directUDPSocketOpened" - >, - directUDPSocketAborted: events["Network.directUDPSocketAborted"] as CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketAbortedEvent, - "Network.directUDPSocketAborted" - >, - directUDPSocketClosed: events["Network.directUDPSocketClosed"] as CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketClosedEvent, - "Network.directUDPSocketClosed" - >, - directUDPSocketChunkSent: events["Network.directUDPSocketChunkSent"] as CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketChunkSentEvent, - "Network.directUDPSocketChunkSent" - >, - directUDPSocketChunkReceived: events["Network.directUDPSocketChunkReceived"] as CdpEventAlias< - cdp.types.ts.Network.DirectUDPSocketChunkReceivedEvent, - "Network.directUDPSocketChunkReceived" - >, - requestWillBeSentExtraInfo: events["Network.requestWillBeSentExtraInfo"] as CdpEventAlias< - cdp.types.ts.Network.RequestWillBeSentExtraInfoEvent, - "Network.requestWillBeSentExtraInfo" - >, - responseReceivedExtraInfo: events["Network.responseReceivedExtraInfo"] as CdpEventAlias< - cdp.types.ts.Network.ResponseReceivedExtraInfoEvent, - "Network.responseReceivedExtraInfo" - >, - responseReceivedEarlyHints: events["Network.responseReceivedEarlyHints"] as CdpEventAlias< - cdp.types.ts.Network.ResponseReceivedEarlyHintsEvent, - "Network.responseReceivedEarlyHints" - >, - trustTokenOperationDone: events["Network.trustTokenOperationDone"] as CdpEventAlias< - cdp.types.ts.Network.TrustTokenOperationDoneEvent, - "Network.trustTokenOperationDone" - >, - policyUpdated: events["Network.policyUpdated"] as CdpEventAlias< - cdp.types.ts.Network.PolicyUpdatedEvent, - "Network.policyUpdated" - >, - reportingApiReportAdded: events["Network.reportingApiReportAdded"] as CdpEventAlias< - cdp.types.ts.Network.ReportingApiReportAddedEvent, - "Network.reportingApiReportAdded" - >, - reportingApiReportUpdated: events["Network.reportingApiReportUpdated"] as CdpEventAlias< - cdp.types.ts.Network.ReportingApiReportUpdatedEvent, - "Network.reportingApiReportUpdated" - >, - reportingApiEndpointsChangedForOrigin: events["Network.reportingApiEndpointsChangedForOrigin"] as CdpEventAlias< - cdp.types.ts.Network.ReportingApiEndpointsChangedForOriginEvent, - "Network.reportingApiEndpointsChangedForOrigin" - >, - deviceBoundSessionsAdded: events["Network.deviceBoundSessionsAdded"] as CdpEventAlias< - cdp.types.ts.Network.DeviceBoundSessionsAddedEvent, - "Network.deviceBoundSessionsAdded" - >, - deviceBoundSessionEventOccurred: events["Network.deviceBoundSessionEventOccurred"] as CdpEventAlias< - cdp.types.ts.Network.DeviceBoundSessionEventOccurredEvent, - "Network.deviceBoundSessionEventOccurred" - >, + setAcceptedEncodings: withCdpName(async (params?: unknown) => commands["Network.setAcceptedEncodings"].result.parse(await send("Network.setAcceptedEncodings", commands["Network.setAcceptedEncodings"].params.parse(params ?? {}))), "Network.setAcceptedEncodings", "command"), + clearAcceptedEncodingsOverride: withCdpName(async (params?: unknown) => commands["Network.clearAcceptedEncodingsOverride"].result.parse(await send("Network.clearAcceptedEncodingsOverride", commands["Network.clearAcceptedEncodingsOverride"].params.parse(params ?? {}))), "Network.clearAcceptedEncodingsOverride", "command"), + canClearBrowserCache: withCdpName(async (params?: unknown) => commands["Network.canClearBrowserCache"].result.parse(await send("Network.canClearBrowserCache", commands["Network.canClearBrowserCache"].params.parse(params ?? {}))), "Network.canClearBrowserCache", "command"), + canClearBrowserCookies: withCdpName(async (params?: unknown) => commands["Network.canClearBrowserCookies"].result.parse(await send("Network.canClearBrowserCookies", commands["Network.canClearBrowserCookies"].params.parse(params ?? {}))), "Network.canClearBrowserCookies", "command"), + canEmulateNetworkConditions: withCdpName(async (params?: unknown) => commands["Network.canEmulateNetworkConditions"].result.parse(await send("Network.canEmulateNetworkConditions", commands["Network.canEmulateNetworkConditions"].params.parse(params ?? {}))), "Network.canEmulateNetworkConditions", "command"), + clearBrowserCache: withCdpName(async (params?: unknown) => commands["Network.clearBrowserCache"].result.parse(await send("Network.clearBrowserCache", commands["Network.clearBrowserCache"].params.parse(params ?? {}))), "Network.clearBrowserCache", "command"), + clearBrowserCookies: withCdpName(async (params?: unknown) => commands["Network.clearBrowserCookies"].result.parse(await send("Network.clearBrowserCookies", commands["Network.clearBrowserCookies"].params.parse(params ?? {}))), "Network.clearBrowserCookies", "command"), + continueInterceptedRequest: withCdpName(async (params?: unknown) => commands["Network.continueInterceptedRequest"].result.parse(await send("Network.continueInterceptedRequest", commands["Network.continueInterceptedRequest"].params.parse(params ?? {}))), "Network.continueInterceptedRequest", "command"), + deleteCookies: withCdpName(async (params?: unknown) => commands["Network.deleteCookies"].result.parse(await send("Network.deleteCookies", commands["Network.deleteCookies"].params.parse(params ?? {}))), "Network.deleteCookies", "command"), + disable: withCdpName(async (params?: unknown) => commands["Network.disable"].result.parse(await send("Network.disable", commands["Network.disable"].params.parse(params ?? {}))), "Network.disable", "command"), + emulateNetworkConditions: withCdpName(async (params?: unknown) => commands["Network.emulateNetworkConditions"].result.parse(await send("Network.emulateNetworkConditions", commands["Network.emulateNetworkConditions"].params.parse(params ?? {}))), "Network.emulateNetworkConditions", "command"), + emulateNetworkConditionsByRule: withCdpName(async (params?: unknown) => commands["Network.emulateNetworkConditionsByRule"].result.parse(await send("Network.emulateNetworkConditionsByRule", commands["Network.emulateNetworkConditionsByRule"].params.parse(params ?? {}))), "Network.emulateNetworkConditionsByRule", "command"), + overrideNetworkState: withCdpName(async (params?: unknown) => commands["Network.overrideNetworkState"].result.parse(await send("Network.overrideNetworkState", commands["Network.overrideNetworkState"].params.parse(params ?? {}))), "Network.overrideNetworkState", "command"), + enable: withCdpName(async (params?: unknown) => commands["Network.enable"].result.parse(await send("Network.enable", commands["Network.enable"].params.parse(params ?? {}))), "Network.enable", "command"), + configureDurableMessages: withCdpName(async (params?: unknown) => commands["Network.configureDurableMessages"].result.parse(await send("Network.configureDurableMessages", commands["Network.configureDurableMessages"].params.parse(params ?? {}))), "Network.configureDurableMessages", "command"), + getAllCookies: withCdpName(async (params?: unknown) => commands["Network.getAllCookies"].result.parse(await send("Network.getAllCookies", commands["Network.getAllCookies"].params.parse(params ?? {}))), "Network.getAllCookies", "command"), + getCertificate: withCdpName(async (params?: unknown) => commands["Network.getCertificate"].result.parse(await send("Network.getCertificate", commands["Network.getCertificate"].params.parse(params ?? {}))), "Network.getCertificate", "command"), + getCookies: withCdpName(async (params?: unknown) => commands["Network.getCookies"].result.parse(await send("Network.getCookies", commands["Network.getCookies"].params.parse(params ?? {}))), "Network.getCookies", "command"), + getResponseBody: withCdpName(async (params?: unknown) => commands["Network.getResponseBody"].result.parse(await send("Network.getResponseBody", commands["Network.getResponseBody"].params.parse(params ?? {}))), "Network.getResponseBody", "command"), + getRequestPostData: withCdpName(async (params?: unknown) => commands["Network.getRequestPostData"].result.parse(await send("Network.getRequestPostData", commands["Network.getRequestPostData"].params.parse(params ?? {}))), "Network.getRequestPostData", "command"), + getResponseBodyForInterception: withCdpName(async (params?: unknown) => commands["Network.getResponseBodyForInterception"].result.parse(await send("Network.getResponseBodyForInterception", commands["Network.getResponseBodyForInterception"].params.parse(params ?? {}))), "Network.getResponseBodyForInterception", "command"), + takeResponseBodyForInterceptionAsStream: withCdpName(async (params?: unknown) => commands["Network.takeResponseBodyForInterceptionAsStream"].result.parse(await send("Network.takeResponseBodyForInterceptionAsStream", commands["Network.takeResponseBodyForInterceptionAsStream"].params.parse(params ?? {}))), "Network.takeResponseBodyForInterceptionAsStream", "command"), + replayXHR: withCdpName(async (params?: unknown) => commands["Network.replayXHR"].result.parse(await send("Network.replayXHR", commands["Network.replayXHR"].params.parse(params ?? {}))), "Network.replayXHR", "command"), + searchInResponseBody: withCdpName(async (params?: unknown) => commands["Network.searchInResponseBody"].result.parse(await send("Network.searchInResponseBody", commands["Network.searchInResponseBody"].params.parse(params ?? {}))), "Network.searchInResponseBody", "command"), + setBlockedURLs: withCdpName(async (params?: unknown) => commands["Network.setBlockedURLs"].result.parse(await send("Network.setBlockedURLs", commands["Network.setBlockedURLs"].params.parse(params ?? {}))), "Network.setBlockedURLs", "command"), + setBypassServiceWorker: withCdpName(async (params?: unknown) => commands["Network.setBypassServiceWorker"].result.parse(await send("Network.setBypassServiceWorker", commands["Network.setBypassServiceWorker"].params.parse(params ?? {}))), "Network.setBypassServiceWorker", "command"), + setCacheDisabled: withCdpName(async (params?: unknown) => commands["Network.setCacheDisabled"].result.parse(await send("Network.setCacheDisabled", commands["Network.setCacheDisabled"].params.parse(params ?? {}))), "Network.setCacheDisabled", "command"), + setCookie: withCdpName(async (params?: unknown) => commands["Network.setCookie"].result.parse(await send("Network.setCookie", commands["Network.setCookie"].params.parse(params ?? {}))), "Network.setCookie", "command"), + setCookies: withCdpName(async (params?: unknown) => commands["Network.setCookies"].result.parse(await send("Network.setCookies", commands["Network.setCookies"].params.parse(params ?? {}))), "Network.setCookies", "command"), + setExtraHTTPHeaders: withCdpName(async (params?: unknown) => commands["Network.setExtraHTTPHeaders"].result.parse(await send("Network.setExtraHTTPHeaders", commands["Network.setExtraHTTPHeaders"].params.parse(params ?? {}))), "Network.setExtraHTTPHeaders", "command"), + setAttachDebugStack: withCdpName(async (params?: unknown) => commands["Network.setAttachDebugStack"].result.parse(await send("Network.setAttachDebugStack", commands["Network.setAttachDebugStack"].params.parse(params ?? {}))), "Network.setAttachDebugStack", "command"), + setRequestInterception: withCdpName(async (params?: unknown) => commands["Network.setRequestInterception"].result.parse(await send("Network.setRequestInterception", commands["Network.setRequestInterception"].params.parse(params ?? {}))), "Network.setRequestInterception", "command"), + setUserAgentOverride: withCdpName(async (params?: unknown) => commands["Network.setUserAgentOverride"].result.parse(await send("Network.setUserAgentOverride", commands["Network.setUserAgentOverride"].params.parse(params ?? {}))), "Network.setUserAgentOverride", "command"), + streamResourceContent: withCdpName(async (params?: unknown) => commands["Network.streamResourceContent"].result.parse(await send("Network.streamResourceContent", commands["Network.streamResourceContent"].params.parse(params ?? {}))), "Network.streamResourceContent", "command"), + getSecurityIsolationStatus: withCdpName(async (params?: unknown) => commands["Network.getSecurityIsolationStatus"].result.parse(await send("Network.getSecurityIsolationStatus", commands["Network.getSecurityIsolationStatus"].params.parse(params ?? {}))), "Network.getSecurityIsolationStatus", "command"), + enableReportingApi: withCdpName(async (params?: unknown) => commands["Network.enableReportingApi"].result.parse(await send("Network.enableReportingApi", commands["Network.enableReportingApi"].params.parse(params ?? {}))), "Network.enableReportingApi", "command"), + enableDeviceBoundSessions: withCdpName(async (params?: unknown) => commands["Network.enableDeviceBoundSessions"].result.parse(await send("Network.enableDeviceBoundSessions", commands["Network.enableDeviceBoundSessions"].params.parse(params ?? {}))), "Network.enableDeviceBoundSessions", "command"), + deleteDeviceBoundSession: withCdpName(async (params?: unknown) => commands["Network.deleteDeviceBoundSession"].result.parse(await send("Network.deleteDeviceBoundSession", commands["Network.deleteDeviceBoundSession"].params.parse(params ?? {}))), "Network.deleteDeviceBoundSession", "command"), + fetchSchemefulSite: withCdpName(async (params?: unknown) => commands["Network.fetchSchemefulSite"].result.parse(await send("Network.fetchSchemefulSite", commands["Network.fetchSchemefulSite"].params.parse(params ?? {}))), "Network.fetchSchemefulSite", "command"), + loadNetworkResource: withCdpName(async (params?: unknown) => commands["Network.loadNetworkResource"].result.parse(await send("Network.loadNetworkResource", commands["Network.loadNetworkResource"].params.parse(params ?? {}))), "Network.loadNetworkResource", "command"), + setCookieControls: withCdpName(async (params?: unknown) => commands["Network.setCookieControls"].result.parse(await send("Network.setCookieControls", commands["Network.setCookieControls"].params.parse(params ?? {}))), "Network.setCookieControls", "command"), + dataReceived: events["Network.dataReceived"] as CdpEventAlias, + eventSourceMessageReceived: events["Network.eventSourceMessageReceived"] as CdpEventAlias, + loadingFailed: events["Network.loadingFailed"] as CdpEventAlias, + loadingFinished: events["Network.loadingFinished"] as CdpEventAlias, + requestIntercepted: events["Network.requestIntercepted"] as CdpEventAlias, + requestServedFromCache: events["Network.requestServedFromCache"] as CdpEventAlias, + requestWillBeSent: events["Network.requestWillBeSent"] as CdpEventAlias, + resourceChangedPriority: events["Network.resourceChangedPriority"] as CdpEventAlias, + signedExchangeReceived: events["Network.signedExchangeReceived"] as CdpEventAlias, + responseReceived: events["Network.responseReceived"] as CdpEventAlias, + webSocketClosed: events["Network.webSocketClosed"] as CdpEventAlias, + webSocketCreated: events["Network.webSocketCreated"] as CdpEventAlias, + webSocketFrameError: events["Network.webSocketFrameError"] as CdpEventAlias, + webSocketFrameReceived: events["Network.webSocketFrameReceived"] as CdpEventAlias, + webSocketFrameSent: events["Network.webSocketFrameSent"] as CdpEventAlias, + webSocketHandshakeResponseReceived: events["Network.webSocketHandshakeResponseReceived"] as CdpEventAlias, + webSocketWillSendHandshakeRequest: events["Network.webSocketWillSendHandshakeRequest"] as CdpEventAlias, + webTransportCreated: events["Network.webTransportCreated"] as CdpEventAlias, + webTransportConnectionEstablished: events["Network.webTransportConnectionEstablished"] as CdpEventAlias, + webTransportClosed: events["Network.webTransportClosed"] as CdpEventAlias, + directTCPSocketCreated: events["Network.directTCPSocketCreated"] as CdpEventAlias, + directTCPSocketOpened: events["Network.directTCPSocketOpened"] as CdpEventAlias, + directTCPSocketAborted: events["Network.directTCPSocketAborted"] as CdpEventAlias, + directTCPSocketClosed: events["Network.directTCPSocketClosed"] as CdpEventAlias, + directTCPSocketChunkSent: events["Network.directTCPSocketChunkSent"] as CdpEventAlias, + directTCPSocketChunkReceived: events["Network.directTCPSocketChunkReceived"] as CdpEventAlias, + directUDPSocketJoinedMulticastGroup: events["Network.directUDPSocketJoinedMulticastGroup"] as CdpEventAlias, + directUDPSocketLeftMulticastGroup: events["Network.directUDPSocketLeftMulticastGroup"] as CdpEventAlias, + directUDPSocketCreated: events["Network.directUDPSocketCreated"] as CdpEventAlias, + directUDPSocketOpened: events["Network.directUDPSocketOpened"] as CdpEventAlias, + directUDPSocketAborted: events["Network.directUDPSocketAborted"] as CdpEventAlias, + directUDPSocketClosed: events["Network.directUDPSocketClosed"] as CdpEventAlias, + directUDPSocketChunkSent: events["Network.directUDPSocketChunkSent"] as CdpEventAlias, + directUDPSocketChunkReceived: events["Network.directUDPSocketChunkReceived"] as CdpEventAlias, + requestWillBeSentExtraInfo: events["Network.requestWillBeSentExtraInfo"] as CdpEventAlias, + responseReceivedExtraInfo: events["Network.responseReceivedExtraInfo"] as CdpEventAlias, + responseReceivedEarlyHints: events["Network.responseReceivedEarlyHints"] as CdpEventAlias, + trustTokenOperationDone: events["Network.trustTokenOperationDone"] as CdpEventAlias, + policyUpdated: events["Network.policyUpdated"] as CdpEventAlias, + reportingApiReportAdded: events["Network.reportingApiReportAdded"] as CdpEventAlias, + reportingApiReportUpdated: events["Network.reportingApiReportUpdated"] as CdpEventAlias, + reportingApiEndpointsChangedForOrigin: events["Network.reportingApiEndpointsChangedForOrigin"] as CdpEventAlias, + deviceBoundSessionsAdded: events["Network.deviceBoundSessionsAdded"] as CdpEventAlias, + deviceBoundSessionEventOccurred: events["Network.deviceBoundSessionEventOccurred"] as CdpEventAlias, }, Overlay: { - disable: withCdpName( - async (params?: unknown) => - commands["Overlay.disable"].result.parse( - await send("Overlay.disable", commands["Overlay.disable"].params.parse(params ?? {})), - ), - "Overlay.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Overlay.enable"].result.parse( - await send("Overlay.enable", commands["Overlay.enable"].params.parse(params ?? {})), - ), - "Overlay.enable", - "command", - ), - getHighlightObjectForTest: withCdpName( - async (params?: unknown) => - commands["Overlay.getHighlightObjectForTest"].result.parse( - await send( - "Overlay.getHighlightObjectForTest", - commands["Overlay.getHighlightObjectForTest"].params.parse(params ?? {}), - ), - ), - "Overlay.getHighlightObjectForTest", - "command", - ), - getGridHighlightObjectsForTest: withCdpName( - async (params?: unknown) => - commands["Overlay.getGridHighlightObjectsForTest"].result.parse( - await send( - "Overlay.getGridHighlightObjectsForTest", - commands["Overlay.getGridHighlightObjectsForTest"].params.parse(params ?? {}), - ), - ), - "Overlay.getGridHighlightObjectsForTest", - "command", - ), - getSourceOrderHighlightObjectForTest: withCdpName( - async (params?: unknown) => - commands["Overlay.getSourceOrderHighlightObjectForTest"].result.parse( - await send( - "Overlay.getSourceOrderHighlightObjectForTest", - commands["Overlay.getSourceOrderHighlightObjectForTest"].params.parse(params ?? {}), - ), - ), - "Overlay.getSourceOrderHighlightObjectForTest", - "command", - ), - hideHighlight: withCdpName( - async (params?: unknown) => - commands["Overlay.hideHighlight"].result.parse( - await send("Overlay.hideHighlight", commands["Overlay.hideHighlight"].params.parse(params ?? {})), - ), - "Overlay.hideHighlight", - "command", - ), - highlightFrame: withCdpName( - async (params?: unknown) => - commands["Overlay.highlightFrame"].result.parse( - await send("Overlay.highlightFrame", commands["Overlay.highlightFrame"].params.parse(params ?? {})), - ), - "Overlay.highlightFrame", - "command", - ), - highlightNode: withCdpName( - async (params?: unknown) => - commands["Overlay.highlightNode"].result.parse( - await send("Overlay.highlightNode", commands["Overlay.highlightNode"].params.parse(params ?? {})), - ), - "Overlay.highlightNode", - "command", - ), - highlightQuad: withCdpName( - async (params?: unknown) => - commands["Overlay.highlightQuad"].result.parse( - await send("Overlay.highlightQuad", commands["Overlay.highlightQuad"].params.parse(params ?? {})), - ), - "Overlay.highlightQuad", - "command", - ), - highlightRect: withCdpName( - async (params?: unknown) => - commands["Overlay.highlightRect"].result.parse( - await send("Overlay.highlightRect", commands["Overlay.highlightRect"].params.parse(params ?? {})), - ), - "Overlay.highlightRect", - "command", - ), - highlightSourceOrder: withCdpName( - async (params?: unknown) => - commands["Overlay.highlightSourceOrder"].result.parse( - await send( - "Overlay.highlightSourceOrder", - commands["Overlay.highlightSourceOrder"].params.parse(params ?? {}), - ), - ), - "Overlay.highlightSourceOrder", - "command", - ), - setInspectMode: withCdpName( - async (params?: unknown) => - commands["Overlay.setInspectMode"].result.parse( - await send("Overlay.setInspectMode", commands["Overlay.setInspectMode"].params.parse(params ?? {})), - ), - "Overlay.setInspectMode", - "command", - ), - setShowAdHighlights: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowAdHighlights"].result.parse( - await send( - "Overlay.setShowAdHighlights", - commands["Overlay.setShowAdHighlights"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowAdHighlights", - "command", - ), - setPausedInDebuggerMessage: withCdpName( - async (params?: unknown) => - commands["Overlay.setPausedInDebuggerMessage"].result.parse( - await send( - "Overlay.setPausedInDebuggerMessage", - commands["Overlay.setPausedInDebuggerMessage"].params.parse(params ?? {}), - ), - ), - "Overlay.setPausedInDebuggerMessage", - "command", - ), - setShowDebugBorders: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowDebugBorders"].result.parse( - await send( - "Overlay.setShowDebugBorders", - commands["Overlay.setShowDebugBorders"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowDebugBorders", - "command", - ), - setShowFPSCounter: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowFPSCounter"].result.parse( - await send("Overlay.setShowFPSCounter", commands["Overlay.setShowFPSCounter"].params.parse(params ?? {})), - ), - "Overlay.setShowFPSCounter", - "command", - ), - setShowGridOverlays: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowGridOverlays"].result.parse( - await send( - "Overlay.setShowGridOverlays", - commands["Overlay.setShowGridOverlays"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowGridOverlays", - "command", - ), - setShowFlexOverlays: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowFlexOverlays"].result.parse( - await send( - "Overlay.setShowFlexOverlays", - commands["Overlay.setShowFlexOverlays"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowFlexOverlays", - "command", - ), - setShowScrollSnapOverlays: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowScrollSnapOverlays"].result.parse( - await send( - "Overlay.setShowScrollSnapOverlays", - commands["Overlay.setShowScrollSnapOverlays"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowScrollSnapOverlays", - "command", - ), - setShowContainerQueryOverlays: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowContainerQueryOverlays"].result.parse( - await send( - "Overlay.setShowContainerQueryOverlays", - commands["Overlay.setShowContainerQueryOverlays"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowContainerQueryOverlays", - "command", - ), - setShowInspectedElementAnchor: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowInspectedElementAnchor"].result.parse( - await send( - "Overlay.setShowInspectedElementAnchor", - commands["Overlay.setShowInspectedElementAnchor"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowInspectedElementAnchor", - "command", - ), - setShowPaintRects: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowPaintRects"].result.parse( - await send("Overlay.setShowPaintRects", commands["Overlay.setShowPaintRects"].params.parse(params ?? {})), - ), - "Overlay.setShowPaintRects", - "command", - ), - setShowLayoutShiftRegions: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowLayoutShiftRegions"].result.parse( - await send( - "Overlay.setShowLayoutShiftRegions", - commands["Overlay.setShowLayoutShiftRegions"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowLayoutShiftRegions", - "command", - ), - setShowScrollBottleneckRects: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowScrollBottleneckRects"].result.parse( - await send( - "Overlay.setShowScrollBottleneckRects", - commands["Overlay.setShowScrollBottleneckRects"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowScrollBottleneckRects", - "command", - ), - setShowHitTestBorders: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowHitTestBorders"].result.parse( - await send( - "Overlay.setShowHitTestBorders", - commands["Overlay.setShowHitTestBorders"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowHitTestBorders", - "command", - ), - setShowWebVitals: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowWebVitals"].result.parse( - await send("Overlay.setShowWebVitals", commands["Overlay.setShowWebVitals"].params.parse(params ?? {})), - ), - "Overlay.setShowWebVitals", - "command", - ), - setShowViewportSizeOnResize: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowViewportSizeOnResize"].result.parse( - await send( - "Overlay.setShowViewportSizeOnResize", - commands["Overlay.setShowViewportSizeOnResize"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowViewportSizeOnResize", - "command", - ), - setShowHinge: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowHinge"].result.parse( - await send("Overlay.setShowHinge", commands["Overlay.setShowHinge"].params.parse(params ?? {})), - ), - "Overlay.setShowHinge", - "command", - ), - setShowIsolatedElements: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowIsolatedElements"].result.parse( - await send( - "Overlay.setShowIsolatedElements", - commands["Overlay.setShowIsolatedElements"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowIsolatedElements", - "command", - ), - setShowWindowControlsOverlay: withCdpName( - async (params?: unknown) => - commands["Overlay.setShowWindowControlsOverlay"].result.parse( - await send( - "Overlay.setShowWindowControlsOverlay", - commands["Overlay.setShowWindowControlsOverlay"].params.parse(params ?? {}), - ), - ), - "Overlay.setShowWindowControlsOverlay", - "command", - ), - inspectNodeRequested: events["Overlay.inspectNodeRequested"] as CdpEventAlias< - cdp.types.ts.Overlay.InspectNodeRequestedEvent, - "Overlay.inspectNodeRequested" - >, - nodeHighlightRequested: events["Overlay.nodeHighlightRequested"] as CdpEventAlias< - cdp.types.ts.Overlay.NodeHighlightRequestedEvent, - "Overlay.nodeHighlightRequested" - >, - screenshotRequested: events["Overlay.screenshotRequested"] as CdpEventAlias< - cdp.types.ts.Overlay.ScreenshotRequestedEvent, - "Overlay.screenshotRequested" - >, - inspectPanelShowRequested: events["Overlay.inspectPanelShowRequested"] as CdpEventAlias< - cdp.types.ts.Overlay.InspectPanelShowRequestedEvent, - "Overlay.inspectPanelShowRequested" - >, - inspectedElementWindowRestored: events["Overlay.inspectedElementWindowRestored"] as CdpEventAlias< - cdp.types.ts.Overlay.InspectedElementWindowRestoredEvent, - "Overlay.inspectedElementWindowRestored" - >, - inspectModeCanceled: events["Overlay.inspectModeCanceled"] as CdpEventAlias< - cdp.types.ts.Overlay.InspectModeCanceledEvent, - "Overlay.inspectModeCanceled" - >, + disable: withCdpName(async (params?: unknown) => commands["Overlay.disable"].result.parse(await send("Overlay.disable", commands["Overlay.disable"].params.parse(params ?? {}))), "Overlay.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Overlay.enable"].result.parse(await send("Overlay.enable", commands["Overlay.enable"].params.parse(params ?? {}))), "Overlay.enable", "command"), + getHighlightObjectForTest: withCdpName(async (params?: unknown) => commands["Overlay.getHighlightObjectForTest"].result.parse(await send("Overlay.getHighlightObjectForTest", commands["Overlay.getHighlightObjectForTest"].params.parse(params ?? {}))), "Overlay.getHighlightObjectForTest", "command"), + getGridHighlightObjectsForTest: withCdpName(async (params?: unknown) => commands["Overlay.getGridHighlightObjectsForTest"].result.parse(await send("Overlay.getGridHighlightObjectsForTest", commands["Overlay.getGridHighlightObjectsForTest"].params.parse(params ?? {}))), "Overlay.getGridHighlightObjectsForTest", "command"), + getSourceOrderHighlightObjectForTest: withCdpName(async (params?: unknown) => commands["Overlay.getSourceOrderHighlightObjectForTest"].result.parse(await send("Overlay.getSourceOrderHighlightObjectForTest", commands["Overlay.getSourceOrderHighlightObjectForTest"].params.parse(params ?? {}))), "Overlay.getSourceOrderHighlightObjectForTest", "command"), + hideHighlight: withCdpName(async (params?: unknown) => commands["Overlay.hideHighlight"].result.parse(await send("Overlay.hideHighlight", commands["Overlay.hideHighlight"].params.parse(params ?? {}))), "Overlay.hideHighlight", "command"), + highlightFrame: withCdpName(async (params?: unknown) => commands["Overlay.highlightFrame"].result.parse(await send("Overlay.highlightFrame", commands["Overlay.highlightFrame"].params.parse(params ?? {}))), "Overlay.highlightFrame", "command"), + highlightNode: withCdpName(async (params?: unknown) => commands["Overlay.highlightNode"].result.parse(await send("Overlay.highlightNode", commands["Overlay.highlightNode"].params.parse(params ?? {}))), "Overlay.highlightNode", "command"), + highlightQuad: withCdpName(async (params?: unknown) => commands["Overlay.highlightQuad"].result.parse(await send("Overlay.highlightQuad", commands["Overlay.highlightQuad"].params.parse(params ?? {}))), "Overlay.highlightQuad", "command"), + highlightRect: withCdpName(async (params?: unknown) => commands["Overlay.highlightRect"].result.parse(await send("Overlay.highlightRect", commands["Overlay.highlightRect"].params.parse(params ?? {}))), "Overlay.highlightRect", "command"), + highlightSourceOrder: withCdpName(async (params?: unknown) => commands["Overlay.highlightSourceOrder"].result.parse(await send("Overlay.highlightSourceOrder", commands["Overlay.highlightSourceOrder"].params.parse(params ?? {}))), "Overlay.highlightSourceOrder", "command"), + setInspectMode: withCdpName(async (params?: unknown) => commands["Overlay.setInspectMode"].result.parse(await send("Overlay.setInspectMode", commands["Overlay.setInspectMode"].params.parse(params ?? {}))), "Overlay.setInspectMode", "command"), + setShowAdHighlights: withCdpName(async (params?: unknown) => commands["Overlay.setShowAdHighlights"].result.parse(await send("Overlay.setShowAdHighlights", commands["Overlay.setShowAdHighlights"].params.parse(params ?? {}))), "Overlay.setShowAdHighlights", "command"), + setPausedInDebuggerMessage: withCdpName(async (params?: unknown) => commands["Overlay.setPausedInDebuggerMessage"].result.parse(await send("Overlay.setPausedInDebuggerMessage", commands["Overlay.setPausedInDebuggerMessage"].params.parse(params ?? {}))), "Overlay.setPausedInDebuggerMessage", "command"), + setShowDebugBorders: withCdpName(async (params?: unknown) => commands["Overlay.setShowDebugBorders"].result.parse(await send("Overlay.setShowDebugBorders", commands["Overlay.setShowDebugBorders"].params.parse(params ?? {}))), "Overlay.setShowDebugBorders", "command"), + setShowFPSCounter: withCdpName(async (params?: unknown) => commands["Overlay.setShowFPSCounter"].result.parse(await send("Overlay.setShowFPSCounter", commands["Overlay.setShowFPSCounter"].params.parse(params ?? {}))), "Overlay.setShowFPSCounter", "command"), + setShowGridOverlays: withCdpName(async (params?: unknown) => commands["Overlay.setShowGridOverlays"].result.parse(await send("Overlay.setShowGridOverlays", commands["Overlay.setShowGridOverlays"].params.parse(params ?? {}))), "Overlay.setShowGridOverlays", "command"), + setShowFlexOverlays: withCdpName(async (params?: unknown) => commands["Overlay.setShowFlexOverlays"].result.parse(await send("Overlay.setShowFlexOverlays", commands["Overlay.setShowFlexOverlays"].params.parse(params ?? {}))), "Overlay.setShowFlexOverlays", "command"), + setShowScrollSnapOverlays: withCdpName(async (params?: unknown) => commands["Overlay.setShowScrollSnapOverlays"].result.parse(await send("Overlay.setShowScrollSnapOverlays", commands["Overlay.setShowScrollSnapOverlays"].params.parse(params ?? {}))), "Overlay.setShowScrollSnapOverlays", "command"), + setShowContainerQueryOverlays: withCdpName(async (params?: unknown) => commands["Overlay.setShowContainerQueryOverlays"].result.parse(await send("Overlay.setShowContainerQueryOverlays", commands["Overlay.setShowContainerQueryOverlays"].params.parse(params ?? {}))), "Overlay.setShowContainerQueryOverlays", "command"), + setShowInspectedElementAnchor: withCdpName(async (params?: unknown) => commands["Overlay.setShowInspectedElementAnchor"].result.parse(await send("Overlay.setShowInspectedElementAnchor", commands["Overlay.setShowInspectedElementAnchor"].params.parse(params ?? {}))), "Overlay.setShowInspectedElementAnchor", "command"), + setShowPaintRects: withCdpName(async (params?: unknown) => commands["Overlay.setShowPaintRects"].result.parse(await send("Overlay.setShowPaintRects", commands["Overlay.setShowPaintRects"].params.parse(params ?? {}))), "Overlay.setShowPaintRects", "command"), + setShowLayoutShiftRegions: withCdpName(async (params?: unknown) => commands["Overlay.setShowLayoutShiftRegions"].result.parse(await send("Overlay.setShowLayoutShiftRegions", commands["Overlay.setShowLayoutShiftRegions"].params.parse(params ?? {}))), "Overlay.setShowLayoutShiftRegions", "command"), + setShowScrollBottleneckRects: withCdpName(async (params?: unknown) => commands["Overlay.setShowScrollBottleneckRects"].result.parse(await send("Overlay.setShowScrollBottleneckRects", commands["Overlay.setShowScrollBottleneckRects"].params.parse(params ?? {}))), "Overlay.setShowScrollBottleneckRects", "command"), + setShowHitTestBorders: withCdpName(async (params?: unknown) => commands["Overlay.setShowHitTestBorders"].result.parse(await send("Overlay.setShowHitTestBorders", commands["Overlay.setShowHitTestBorders"].params.parse(params ?? {}))), "Overlay.setShowHitTestBorders", "command"), + setShowWebVitals: withCdpName(async (params?: unknown) => commands["Overlay.setShowWebVitals"].result.parse(await send("Overlay.setShowWebVitals", commands["Overlay.setShowWebVitals"].params.parse(params ?? {}))), "Overlay.setShowWebVitals", "command"), + setShowViewportSizeOnResize: withCdpName(async (params?: unknown) => commands["Overlay.setShowViewportSizeOnResize"].result.parse(await send("Overlay.setShowViewportSizeOnResize", commands["Overlay.setShowViewportSizeOnResize"].params.parse(params ?? {}))), "Overlay.setShowViewportSizeOnResize", "command"), + setShowHinge: withCdpName(async (params?: unknown) => commands["Overlay.setShowHinge"].result.parse(await send("Overlay.setShowHinge", commands["Overlay.setShowHinge"].params.parse(params ?? {}))), "Overlay.setShowHinge", "command"), + setShowIsolatedElements: withCdpName(async (params?: unknown) => commands["Overlay.setShowIsolatedElements"].result.parse(await send("Overlay.setShowIsolatedElements", commands["Overlay.setShowIsolatedElements"].params.parse(params ?? {}))), "Overlay.setShowIsolatedElements", "command"), + setShowWindowControlsOverlay: withCdpName(async (params?: unknown) => commands["Overlay.setShowWindowControlsOverlay"].result.parse(await send("Overlay.setShowWindowControlsOverlay", commands["Overlay.setShowWindowControlsOverlay"].params.parse(params ?? {}))), "Overlay.setShowWindowControlsOverlay", "command"), + inspectNodeRequested: events["Overlay.inspectNodeRequested"] as CdpEventAlias, + nodeHighlightRequested: events["Overlay.nodeHighlightRequested"] as CdpEventAlias, + screenshotRequested: events["Overlay.screenshotRequested"] as CdpEventAlias, + inspectPanelShowRequested: events["Overlay.inspectPanelShowRequested"] as CdpEventAlias, + inspectedElementWindowRestored: events["Overlay.inspectedElementWindowRestored"] as CdpEventAlias, + inspectModeCanceled: events["Overlay.inspectModeCanceled"] as CdpEventAlias, }, Page: { - addScriptToEvaluateOnLoad: withCdpName( - async (params?: unknown) => - commands["Page.addScriptToEvaluateOnLoad"].result.parse( - await send( - "Page.addScriptToEvaluateOnLoad", - commands["Page.addScriptToEvaluateOnLoad"].params.parse(params ?? {}), - ), - ), - "Page.addScriptToEvaluateOnLoad", - "command", - ), - addScriptToEvaluateOnNewDocument: withCdpName( - async (params?: unknown) => - commands["Page.addScriptToEvaluateOnNewDocument"].result.parse( - await send( - "Page.addScriptToEvaluateOnNewDocument", - commands["Page.addScriptToEvaluateOnNewDocument"].params.parse(params ?? {}), - ), - ), - "Page.addScriptToEvaluateOnNewDocument", - "command", - ), - bringToFront: withCdpName( - async (params?: unknown) => - commands["Page.bringToFront"].result.parse( - await send("Page.bringToFront", commands["Page.bringToFront"].params.parse(params ?? {})), - ), - "Page.bringToFront", - "command", - ), - captureScreenshot: withCdpName( - async (params?: unknown) => - commands["Page.captureScreenshot"].result.parse( - await send("Page.captureScreenshot", commands["Page.captureScreenshot"].params.parse(params ?? {})), - ), - "Page.captureScreenshot", - "command", - ), - captureSnapshot: withCdpName( - async (params?: unknown) => - commands["Page.captureSnapshot"].result.parse( - await send("Page.captureSnapshot", commands["Page.captureSnapshot"].params.parse(params ?? {})), - ), - "Page.captureSnapshot", - "command", - ), - clearDeviceMetricsOverride: withCdpName( - async (params?: unknown) => - commands["Page.clearDeviceMetricsOverride"].result.parse( - await send( - "Page.clearDeviceMetricsOverride", - commands["Page.clearDeviceMetricsOverride"].params.parse(params ?? {}), - ), - ), - "Page.clearDeviceMetricsOverride", - "command", - ), - clearDeviceOrientationOverride: withCdpName( - async (params?: unknown) => - commands["Page.clearDeviceOrientationOverride"].result.parse( - await send( - "Page.clearDeviceOrientationOverride", - commands["Page.clearDeviceOrientationOverride"].params.parse(params ?? {}), - ), - ), - "Page.clearDeviceOrientationOverride", - "command", - ), - clearGeolocationOverride: withCdpName( - async (params?: unknown) => - commands["Page.clearGeolocationOverride"].result.parse( - await send( - "Page.clearGeolocationOverride", - commands["Page.clearGeolocationOverride"].params.parse(params ?? {}), - ), - ), - "Page.clearGeolocationOverride", - "command", - ), - createIsolatedWorld: withCdpName( - async (params?: unknown) => - commands["Page.createIsolatedWorld"].result.parse( - await send("Page.createIsolatedWorld", commands["Page.createIsolatedWorld"].params.parse(params ?? {})), - ), - "Page.createIsolatedWorld", - "command", - ), - deleteCookie: withCdpName( - async (params?: unknown) => - commands["Page.deleteCookie"].result.parse( - await send("Page.deleteCookie", commands["Page.deleteCookie"].params.parse(params ?? {})), - ), - "Page.deleteCookie", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Page.disable"].result.parse( - await send("Page.disable", commands["Page.disable"].params.parse(params ?? {})), - ), - "Page.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Page.enable"].result.parse( - await send("Page.enable", commands["Page.enable"].params.parse(params ?? {})), - ), - "Page.enable", - "command", - ), - getAppManifest: withCdpName( - async (params?: unknown) => - commands["Page.getAppManifest"].result.parse( - await send("Page.getAppManifest", commands["Page.getAppManifest"].params.parse(params ?? {})), - ), - "Page.getAppManifest", - "command", - ), - getInstallabilityErrors: withCdpName( - async (params?: unknown) => - commands["Page.getInstallabilityErrors"].result.parse( - await send( - "Page.getInstallabilityErrors", - commands["Page.getInstallabilityErrors"].params.parse(params ?? {}), - ), - ), - "Page.getInstallabilityErrors", - "command", - ), - getManifestIcons: withCdpName( - async (params?: unknown) => - commands["Page.getManifestIcons"].result.parse( - await send("Page.getManifestIcons", commands["Page.getManifestIcons"].params.parse(params ?? {})), - ), - "Page.getManifestIcons", - "command", - ), - getAppId: withCdpName( - async (params?: unknown) => - commands["Page.getAppId"].result.parse( - await send("Page.getAppId", commands["Page.getAppId"].params.parse(params ?? {})), - ), - "Page.getAppId", - "command", - ), - getAdScriptAncestry: withCdpName( - async (params?: unknown) => - commands["Page.getAdScriptAncestry"].result.parse( - await send("Page.getAdScriptAncestry", commands["Page.getAdScriptAncestry"].params.parse(params ?? {})), - ), - "Page.getAdScriptAncestry", - "command", - ), - getFrameTree: withCdpName( - async (params?: unknown) => - commands["Page.getFrameTree"].result.parse( - await send("Page.getFrameTree", commands["Page.getFrameTree"].params.parse(params ?? {})), - ), - "Page.getFrameTree", - "command", - ), - getLayoutMetrics: withCdpName( - async (params?: unknown) => - commands["Page.getLayoutMetrics"].result.parse( - await send("Page.getLayoutMetrics", commands["Page.getLayoutMetrics"].params.parse(params ?? {})), - ), - "Page.getLayoutMetrics", - "command", - ), - getNavigationHistory: withCdpName( - async (params?: unknown) => - commands["Page.getNavigationHistory"].result.parse( - await send("Page.getNavigationHistory", commands["Page.getNavigationHistory"].params.parse(params ?? {})), - ), - "Page.getNavigationHistory", - "command", - ), - resetNavigationHistory: withCdpName( - async (params?: unknown) => - commands["Page.resetNavigationHistory"].result.parse( - await send( - "Page.resetNavigationHistory", - commands["Page.resetNavigationHistory"].params.parse(params ?? {}), - ), - ), - "Page.resetNavigationHistory", - "command", - ), - getResourceContent: withCdpName( - async (params?: unknown) => - commands["Page.getResourceContent"].result.parse( - await send("Page.getResourceContent", commands["Page.getResourceContent"].params.parse(params ?? {})), - ), - "Page.getResourceContent", - "command", - ), - getResourceTree: withCdpName( - async (params?: unknown) => - commands["Page.getResourceTree"].result.parse( - await send("Page.getResourceTree", commands["Page.getResourceTree"].params.parse(params ?? {})), - ), - "Page.getResourceTree", - "command", - ), - handleJavaScriptDialog: withCdpName( - async (params?: unknown) => - commands["Page.handleJavaScriptDialog"].result.parse( - await send( - "Page.handleJavaScriptDialog", - commands["Page.handleJavaScriptDialog"].params.parse(params ?? {}), - ), - ), - "Page.handleJavaScriptDialog", - "command", - ), - navigate: withCdpName( - async (params?: unknown) => - commands["Page.navigate"].result.parse( - await send("Page.navigate", commands["Page.navigate"].params.parse(params ?? {})), - ), - "Page.navigate", - "command", - ), - navigateToHistoryEntry: withCdpName( - async (params?: unknown) => - commands["Page.navigateToHistoryEntry"].result.parse( - await send( - "Page.navigateToHistoryEntry", - commands["Page.navigateToHistoryEntry"].params.parse(params ?? {}), - ), - ), - "Page.navigateToHistoryEntry", - "command", - ), - printToPDF: withCdpName( - async (params?: unknown) => - commands["Page.printToPDF"].result.parse( - await send("Page.printToPDF", commands["Page.printToPDF"].params.parse(params ?? {})), - ), - "Page.printToPDF", - "command", - ), - reload: withCdpName( - async (params?: unknown) => - commands["Page.reload"].result.parse( - await send("Page.reload", commands["Page.reload"].params.parse(params ?? {})), - ), - "Page.reload", - "command", - ), - removeScriptToEvaluateOnLoad: withCdpName( - async (params?: unknown) => - commands["Page.removeScriptToEvaluateOnLoad"].result.parse( - await send( - "Page.removeScriptToEvaluateOnLoad", - commands["Page.removeScriptToEvaluateOnLoad"].params.parse(params ?? {}), - ), - ), - "Page.removeScriptToEvaluateOnLoad", - "command", - ), - removeScriptToEvaluateOnNewDocument: withCdpName( - async (params?: unknown) => - commands["Page.removeScriptToEvaluateOnNewDocument"].result.parse( - await send( - "Page.removeScriptToEvaluateOnNewDocument", - commands["Page.removeScriptToEvaluateOnNewDocument"].params.parse(params ?? {}), - ), - ), - "Page.removeScriptToEvaluateOnNewDocument", - "command", - ), - screencastFrameAck: withCdpName( - async (params?: unknown) => - commands["Page.screencastFrameAck"].result.parse( - await send("Page.screencastFrameAck", commands["Page.screencastFrameAck"].params.parse(params ?? {})), - ), - "Page.screencastFrameAck", - "command", - ), - searchInResource: withCdpName( - async (params?: unknown) => - commands["Page.searchInResource"].result.parse( - await send("Page.searchInResource", commands["Page.searchInResource"].params.parse(params ?? {})), - ), - "Page.searchInResource", - "command", - ), - setAdBlockingEnabled: withCdpName( - async (params?: unknown) => - commands["Page.setAdBlockingEnabled"].result.parse( - await send("Page.setAdBlockingEnabled", commands["Page.setAdBlockingEnabled"].params.parse(params ?? {})), - ), - "Page.setAdBlockingEnabled", - "command", - ), - setBypassCSP: withCdpName( - async (params?: unknown) => - commands["Page.setBypassCSP"].result.parse( - await send("Page.setBypassCSP", commands["Page.setBypassCSP"].params.parse(params ?? {})), - ), - "Page.setBypassCSP", - "command", - ), - getPermissionsPolicyState: withCdpName( - async (params?: unknown) => - commands["Page.getPermissionsPolicyState"].result.parse( - await send( - "Page.getPermissionsPolicyState", - commands["Page.getPermissionsPolicyState"].params.parse(params ?? {}), - ), - ), - "Page.getPermissionsPolicyState", - "command", - ), - getOriginTrials: withCdpName( - async (params?: unknown) => - commands["Page.getOriginTrials"].result.parse( - await send("Page.getOriginTrials", commands["Page.getOriginTrials"].params.parse(params ?? {})), - ), - "Page.getOriginTrials", - "command", - ), - setDeviceMetricsOverride: withCdpName( - async (params?: unknown) => - commands["Page.setDeviceMetricsOverride"].result.parse( - await send( - "Page.setDeviceMetricsOverride", - commands["Page.setDeviceMetricsOverride"].params.parse(params ?? {}), - ), - ), - "Page.setDeviceMetricsOverride", - "command", - ), - setDeviceOrientationOverride: withCdpName( - async (params?: unknown) => - commands["Page.setDeviceOrientationOverride"].result.parse( - await send( - "Page.setDeviceOrientationOverride", - commands["Page.setDeviceOrientationOverride"].params.parse(params ?? {}), - ), - ), - "Page.setDeviceOrientationOverride", - "command", - ), - setFontFamilies: withCdpName( - async (params?: unknown) => - commands["Page.setFontFamilies"].result.parse( - await send("Page.setFontFamilies", commands["Page.setFontFamilies"].params.parse(params ?? {})), - ), - "Page.setFontFamilies", - "command", - ), - setFontSizes: withCdpName( - async (params?: unknown) => - commands["Page.setFontSizes"].result.parse( - await send("Page.setFontSizes", commands["Page.setFontSizes"].params.parse(params ?? {})), - ), - "Page.setFontSizes", - "command", - ), - setDocumentContent: withCdpName( - async (params?: unknown) => - commands["Page.setDocumentContent"].result.parse( - await send("Page.setDocumentContent", commands["Page.setDocumentContent"].params.parse(params ?? {})), - ), - "Page.setDocumentContent", - "command", - ), - setDownloadBehavior: withCdpName( - async (params?: unknown) => - commands["Page.setDownloadBehavior"].result.parse( - await send("Page.setDownloadBehavior", commands["Page.setDownloadBehavior"].params.parse(params ?? {})), - ), - "Page.setDownloadBehavior", - "command", - ), - setGeolocationOverride: withCdpName( - async (params?: unknown) => - commands["Page.setGeolocationOverride"].result.parse( - await send( - "Page.setGeolocationOverride", - commands["Page.setGeolocationOverride"].params.parse(params ?? {}), - ), - ), - "Page.setGeolocationOverride", - "command", - ), - setLifecycleEventsEnabled: withCdpName( - async (params?: unknown) => - commands["Page.setLifecycleEventsEnabled"].result.parse( - await send( - "Page.setLifecycleEventsEnabled", - commands["Page.setLifecycleEventsEnabled"].params.parse(params ?? {}), - ), - ), - "Page.setLifecycleEventsEnabled", - "command", - ), - setTouchEmulationEnabled: withCdpName( - async (params?: unknown) => - commands["Page.setTouchEmulationEnabled"].result.parse( - await send( - "Page.setTouchEmulationEnabled", - commands["Page.setTouchEmulationEnabled"].params.parse(params ?? {}), - ), - ), - "Page.setTouchEmulationEnabled", - "command", - ), - startScreencast: withCdpName( - async (params?: unknown) => - commands["Page.startScreencast"].result.parse( - await send("Page.startScreencast", commands["Page.startScreencast"].params.parse(params ?? {})), - ), - "Page.startScreencast", - "command", - ), - stopLoading: withCdpName( - async (params?: unknown) => - commands["Page.stopLoading"].result.parse( - await send("Page.stopLoading", commands["Page.stopLoading"].params.parse(params ?? {})), - ), - "Page.stopLoading", - "command", - ), - crash: withCdpName( - async (params?: unknown) => - commands["Page.crash"].result.parse( - await send("Page.crash", commands["Page.crash"].params.parse(params ?? {})), - ), - "Page.crash", - "command", - ), - close: withCdpName( - async (params?: unknown) => - commands["Page.close"].result.parse( - await send("Page.close", commands["Page.close"].params.parse(params ?? {})), - ), - "Page.close", - "command", - ), - setWebLifecycleState: withCdpName( - async (params?: unknown) => - commands["Page.setWebLifecycleState"].result.parse( - await send("Page.setWebLifecycleState", commands["Page.setWebLifecycleState"].params.parse(params ?? {})), - ), - "Page.setWebLifecycleState", - "command", - ), - stopScreencast: withCdpName( - async (params?: unknown) => - commands["Page.stopScreencast"].result.parse( - await send("Page.stopScreencast", commands["Page.stopScreencast"].params.parse(params ?? {})), - ), - "Page.stopScreencast", - "command", - ), - produceCompilationCache: withCdpName( - async (params?: unknown) => - commands["Page.produceCompilationCache"].result.parse( - await send( - "Page.produceCompilationCache", - commands["Page.produceCompilationCache"].params.parse(params ?? {}), - ), - ), - "Page.produceCompilationCache", - "command", - ), - addCompilationCache: withCdpName( - async (params?: unknown) => - commands["Page.addCompilationCache"].result.parse( - await send("Page.addCompilationCache", commands["Page.addCompilationCache"].params.parse(params ?? {})), - ), - "Page.addCompilationCache", - "command", - ), - clearCompilationCache: withCdpName( - async (params?: unknown) => - commands["Page.clearCompilationCache"].result.parse( - await send("Page.clearCompilationCache", commands["Page.clearCompilationCache"].params.parse(params ?? {})), - ), - "Page.clearCompilationCache", - "command", - ), - setSPCTransactionMode: withCdpName( - async (params?: unknown) => - commands["Page.setSPCTransactionMode"].result.parse( - await send("Page.setSPCTransactionMode", commands["Page.setSPCTransactionMode"].params.parse(params ?? {})), - ), - "Page.setSPCTransactionMode", - "command", - ), - setRPHRegistrationMode: withCdpName( - async (params?: unknown) => - commands["Page.setRPHRegistrationMode"].result.parse( - await send( - "Page.setRPHRegistrationMode", - commands["Page.setRPHRegistrationMode"].params.parse(params ?? {}), - ), - ), - "Page.setRPHRegistrationMode", - "command", - ), - generateTestReport: withCdpName( - async (params?: unknown) => - commands["Page.generateTestReport"].result.parse( - await send("Page.generateTestReport", commands["Page.generateTestReport"].params.parse(params ?? {})), - ), - "Page.generateTestReport", - "command", - ), - waitForDebugger: withCdpName( - async (params?: unknown) => - commands["Page.waitForDebugger"].result.parse( - await send("Page.waitForDebugger", commands["Page.waitForDebugger"].params.parse(params ?? {})), - ), - "Page.waitForDebugger", - "command", - ), - setInterceptFileChooserDialog: withCdpName( - async (params?: unknown) => - commands["Page.setInterceptFileChooserDialog"].result.parse( - await send( - "Page.setInterceptFileChooserDialog", - commands["Page.setInterceptFileChooserDialog"].params.parse(params ?? {}), - ), - ), - "Page.setInterceptFileChooserDialog", - "command", - ), - setPrerenderingAllowed: withCdpName( - async (params?: unknown) => - commands["Page.setPrerenderingAllowed"].result.parse( - await send( - "Page.setPrerenderingAllowed", - commands["Page.setPrerenderingAllowed"].params.parse(params ?? {}), - ), - ), - "Page.setPrerenderingAllowed", - "command", - ), - getAnnotatedPageContent: withCdpName( - async (params?: unknown) => - commands["Page.getAnnotatedPageContent"].result.parse( - await send( - "Page.getAnnotatedPageContent", - commands["Page.getAnnotatedPageContent"].params.parse(params ?? {}), - ), - ), - "Page.getAnnotatedPageContent", - "command", - ), - domContentEventFired: events["Page.domContentEventFired"] as CdpEventAlias< - cdp.types.ts.Page.DomContentEventFiredEvent, - "Page.domContentEventFired" - >, - fileChooserOpened: events["Page.fileChooserOpened"] as CdpEventAlias< - cdp.types.ts.Page.FileChooserOpenedEvent, - "Page.fileChooserOpened" - >, - frameAttached: events["Page.frameAttached"] as CdpEventAlias< - cdp.types.ts.Page.FrameAttachedEvent, - "Page.frameAttached" - >, - frameClearedScheduledNavigation: events["Page.frameClearedScheduledNavigation"] as CdpEventAlias< - cdp.types.ts.Page.FrameClearedScheduledNavigationEvent, - "Page.frameClearedScheduledNavigation" - >, - frameDetached: events["Page.frameDetached"] as CdpEventAlias< - cdp.types.ts.Page.FrameDetachedEvent, - "Page.frameDetached" - >, - frameSubtreeWillBeDetached: events["Page.frameSubtreeWillBeDetached"] as CdpEventAlias< - cdp.types.ts.Page.FrameSubtreeWillBeDetachedEvent, - "Page.frameSubtreeWillBeDetached" - >, - frameNavigated: events["Page.frameNavigated"] as CdpEventAlias< - cdp.types.ts.Page.FrameNavigatedEvent, - "Page.frameNavigated" - >, - documentOpened: events["Page.documentOpened"] as CdpEventAlias< - cdp.types.ts.Page.DocumentOpenedEvent, - "Page.documentOpened" - >, - frameResized: events["Page.frameResized"] as CdpEventAlias< - cdp.types.ts.Page.FrameResizedEvent, - "Page.frameResized" - >, - frameStartedNavigating: events["Page.frameStartedNavigating"] as CdpEventAlias< - cdp.types.ts.Page.FrameStartedNavigatingEvent, - "Page.frameStartedNavigating" - >, - frameRequestedNavigation: events["Page.frameRequestedNavigation"] as CdpEventAlias< - cdp.types.ts.Page.FrameRequestedNavigationEvent, - "Page.frameRequestedNavigation" - >, - frameScheduledNavigation: events["Page.frameScheduledNavigation"] as CdpEventAlias< - cdp.types.ts.Page.FrameScheduledNavigationEvent, - "Page.frameScheduledNavigation" - >, - frameStartedLoading: events["Page.frameStartedLoading"] as CdpEventAlias< - cdp.types.ts.Page.FrameStartedLoadingEvent, - "Page.frameStartedLoading" - >, - frameStoppedLoading: events["Page.frameStoppedLoading"] as CdpEventAlias< - cdp.types.ts.Page.FrameStoppedLoadingEvent, - "Page.frameStoppedLoading" - >, - downloadWillBegin: events["Page.downloadWillBegin"] as CdpEventAlias< - cdp.types.ts.Page.DownloadWillBeginEvent, - "Page.downloadWillBegin" - >, - downloadProgress: events["Page.downloadProgress"] as CdpEventAlias< - cdp.types.ts.Page.DownloadProgressEvent, - "Page.downloadProgress" - >, - interstitialHidden: events["Page.interstitialHidden"] as CdpEventAlias< - cdp.types.ts.Page.InterstitialHiddenEvent, - "Page.interstitialHidden" - >, - interstitialShown: events["Page.interstitialShown"] as CdpEventAlias< - cdp.types.ts.Page.InterstitialShownEvent, - "Page.interstitialShown" - >, - javascriptDialogClosed: events["Page.javascriptDialogClosed"] as CdpEventAlias< - cdp.types.ts.Page.JavascriptDialogClosedEvent, - "Page.javascriptDialogClosed" - >, - javascriptDialogOpening: events["Page.javascriptDialogOpening"] as CdpEventAlias< - cdp.types.ts.Page.JavascriptDialogOpeningEvent, - "Page.javascriptDialogOpening" - >, - lifecycleEvent: events["Page.lifecycleEvent"] as CdpEventAlias< - cdp.types.ts.Page.LifecycleEventEvent, - "Page.lifecycleEvent" - >, - backForwardCacheNotUsed: events["Page.backForwardCacheNotUsed"] as CdpEventAlias< - cdp.types.ts.Page.BackForwardCacheNotUsedEvent, - "Page.backForwardCacheNotUsed" - >, - loadEventFired: events["Page.loadEventFired"] as CdpEventAlias< - cdp.types.ts.Page.LoadEventFiredEvent, - "Page.loadEventFired" - >, - navigatedWithinDocument: events["Page.navigatedWithinDocument"] as CdpEventAlias< - cdp.types.ts.Page.NavigatedWithinDocumentEvent, - "Page.navigatedWithinDocument" - >, - screencastFrame: events["Page.screencastFrame"] as CdpEventAlias< - cdp.types.ts.Page.ScreencastFrameEvent, - "Page.screencastFrame" - >, - screencastVisibilityChanged: events["Page.screencastVisibilityChanged"] as CdpEventAlias< - cdp.types.ts.Page.ScreencastVisibilityChangedEvent, - "Page.screencastVisibilityChanged" - >, + addScriptToEvaluateOnLoad: withCdpName(async (params?: unknown) => commands["Page.addScriptToEvaluateOnLoad"].result.parse(await send("Page.addScriptToEvaluateOnLoad", commands["Page.addScriptToEvaluateOnLoad"].params.parse(params ?? {}))), "Page.addScriptToEvaluateOnLoad", "command"), + addScriptToEvaluateOnNewDocument: withCdpName(async (params?: unknown) => commands["Page.addScriptToEvaluateOnNewDocument"].result.parse(await send("Page.addScriptToEvaluateOnNewDocument", commands["Page.addScriptToEvaluateOnNewDocument"].params.parse(params ?? {}))), "Page.addScriptToEvaluateOnNewDocument", "command"), + bringToFront: withCdpName(async (params?: unknown) => commands["Page.bringToFront"].result.parse(await send("Page.bringToFront", commands["Page.bringToFront"].params.parse(params ?? {}))), "Page.bringToFront", "command"), + captureScreenshot: withCdpName(async (params?: unknown) => commands["Page.captureScreenshot"].result.parse(await send("Page.captureScreenshot", commands["Page.captureScreenshot"].params.parse(params ?? {}))), "Page.captureScreenshot", "command"), + captureSnapshot: withCdpName(async (params?: unknown) => commands["Page.captureSnapshot"].result.parse(await send("Page.captureSnapshot", commands["Page.captureSnapshot"].params.parse(params ?? {}))), "Page.captureSnapshot", "command"), + clearDeviceMetricsOverride: withCdpName(async (params?: unknown) => commands["Page.clearDeviceMetricsOverride"].result.parse(await send("Page.clearDeviceMetricsOverride", commands["Page.clearDeviceMetricsOverride"].params.parse(params ?? {}))), "Page.clearDeviceMetricsOverride", "command"), + clearDeviceOrientationOverride: withCdpName(async (params?: unknown) => commands["Page.clearDeviceOrientationOverride"].result.parse(await send("Page.clearDeviceOrientationOverride", commands["Page.clearDeviceOrientationOverride"].params.parse(params ?? {}))), "Page.clearDeviceOrientationOverride", "command"), + clearGeolocationOverride: withCdpName(async (params?: unknown) => commands["Page.clearGeolocationOverride"].result.parse(await send("Page.clearGeolocationOverride", commands["Page.clearGeolocationOverride"].params.parse(params ?? {}))), "Page.clearGeolocationOverride", "command"), + createIsolatedWorld: withCdpName(async (params?: unknown) => commands["Page.createIsolatedWorld"].result.parse(await send("Page.createIsolatedWorld", commands["Page.createIsolatedWorld"].params.parse(params ?? {}))), "Page.createIsolatedWorld", "command"), + deleteCookie: withCdpName(async (params?: unknown) => commands["Page.deleteCookie"].result.parse(await send("Page.deleteCookie", commands["Page.deleteCookie"].params.parse(params ?? {}))), "Page.deleteCookie", "command"), + disable: withCdpName(async (params?: unknown) => commands["Page.disable"].result.parse(await send("Page.disable", commands["Page.disable"].params.parse(params ?? {}))), "Page.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Page.enable"].result.parse(await send("Page.enable", commands["Page.enable"].params.parse(params ?? {}))), "Page.enable", "command"), + getAppManifest: withCdpName(async (params?: unknown) => commands["Page.getAppManifest"].result.parse(await send("Page.getAppManifest", commands["Page.getAppManifest"].params.parse(params ?? {}))), "Page.getAppManifest", "command"), + getInstallabilityErrors: withCdpName(async (params?: unknown) => commands["Page.getInstallabilityErrors"].result.parse(await send("Page.getInstallabilityErrors", commands["Page.getInstallabilityErrors"].params.parse(params ?? {}))), "Page.getInstallabilityErrors", "command"), + getManifestIcons: withCdpName(async (params?: unknown) => commands["Page.getManifestIcons"].result.parse(await send("Page.getManifestIcons", commands["Page.getManifestIcons"].params.parse(params ?? {}))), "Page.getManifestIcons", "command"), + getAppId: withCdpName(async (params?: unknown) => commands["Page.getAppId"].result.parse(await send("Page.getAppId", commands["Page.getAppId"].params.parse(params ?? {}))), "Page.getAppId", "command"), + getAdScriptAncestry: withCdpName(async (params?: unknown) => commands["Page.getAdScriptAncestry"].result.parse(await send("Page.getAdScriptAncestry", commands["Page.getAdScriptAncestry"].params.parse(params ?? {}))), "Page.getAdScriptAncestry", "command"), + getFrameTree: withCdpName(async (params?: unknown) => commands["Page.getFrameTree"].result.parse(await send("Page.getFrameTree", commands["Page.getFrameTree"].params.parse(params ?? {}))), "Page.getFrameTree", "command"), + getLayoutMetrics: withCdpName(async (params?: unknown) => commands["Page.getLayoutMetrics"].result.parse(await send("Page.getLayoutMetrics", commands["Page.getLayoutMetrics"].params.parse(params ?? {}))), "Page.getLayoutMetrics", "command"), + getNavigationHistory: withCdpName(async (params?: unknown) => commands["Page.getNavigationHistory"].result.parse(await send("Page.getNavigationHistory", commands["Page.getNavigationHistory"].params.parse(params ?? {}))), "Page.getNavigationHistory", "command"), + resetNavigationHistory: withCdpName(async (params?: unknown) => commands["Page.resetNavigationHistory"].result.parse(await send("Page.resetNavigationHistory", commands["Page.resetNavigationHistory"].params.parse(params ?? {}))), "Page.resetNavigationHistory", "command"), + getResourceContent: withCdpName(async (params?: unknown) => commands["Page.getResourceContent"].result.parse(await send("Page.getResourceContent", commands["Page.getResourceContent"].params.parse(params ?? {}))), "Page.getResourceContent", "command"), + getResourceTree: withCdpName(async (params?: unknown) => commands["Page.getResourceTree"].result.parse(await send("Page.getResourceTree", commands["Page.getResourceTree"].params.parse(params ?? {}))), "Page.getResourceTree", "command"), + handleJavaScriptDialog: withCdpName(async (params?: unknown) => commands["Page.handleJavaScriptDialog"].result.parse(await send("Page.handleJavaScriptDialog", commands["Page.handleJavaScriptDialog"].params.parse(params ?? {}))), "Page.handleJavaScriptDialog", "command"), + navigate: withCdpName(async (params?: unknown) => commands["Page.navigate"].result.parse(await send("Page.navigate", commands["Page.navigate"].params.parse(params ?? {}))), "Page.navigate", "command"), + navigateToHistoryEntry: withCdpName(async (params?: unknown) => commands["Page.navigateToHistoryEntry"].result.parse(await send("Page.navigateToHistoryEntry", commands["Page.navigateToHistoryEntry"].params.parse(params ?? {}))), "Page.navigateToHistoryEntry", "command"), + printToPDF: withCdpName(async (params?: unknown) => commands["Page.printToPDF"].result.parse(await send("Page.printToPDF", commands["Page.printToPDF"].params.parse(params ?? {}))), "Page.printToPDF", "command"), + reload: withCdpName(async (params?: unknown) => commands["Page.reload"].result.parse(await send("Page.reload", commands["Page.reload"].params.parse(params ?? {}))), "Page.reload", "command"), + removeScriptToEvaluateOnLoad: withCdpName(async (params?: unknown) => commands["Page.removeScriptToEvaluateOnLoad"].result.parse(await send("Page.removeScriptToEvaluateOnLoad", commands["Page.removeScriptToEvaluateOnLoad"].params.parse(params ?? {}))), "Page.removeScriptToEvaluateOnLoad", "command"), + removeScriptToEvaluateOnNewDocument: withCdpName(async (params?: unknown) => commands["Page.removeScriptToEvaluateOnNewDocument"].result.parse(await send("Page.removeScriptToEvaluateOnNewDocument", commands["Page.removeScriptToEvaluateOnNewDocument"].params.parse(params ?? {}))), "Page.removeScriptToEvaluateOnNewDocument", "command"), + screencastFrameAck: withCdpName(async (params?: unknown) => commands["Page.screencastFrameAck"].result.parse(await send("Page.screencastFrameAck", commands["Page.screencastFrameAck"].params.parse(params ?? {}))), "Page.screencastFrameAck", "command"), + searchInResource: withCdpName(async (params?: unknown) => commands["Page.searchInResource"].result.parse(await send("Page.searchInResource", commands["Page.searchInResource"].params.parse(params ?? {}))), "Page.searchInResource", "command"), + setAdBlockingEnabled: withCdpName(async (params?: unknown) => commands["Page.setAdBlockingEnabled"].result.parse(await send("Page.setAdBlockingEnabled", commands["Page.setAdBlockingEnabled"].params.parse(params ?? {}))), "Page.setAdBlockingEnabled", "command"), + setBypassCSP: withCdpName(async (params?: unknown) => commands["Page.setBypassCSP"].result.parse(await send("Page.setBypassCSP", commands["Page.setBypassCSP"].params.parse(params ?? {}))), "Page.setBypassCSP", "command"), + getPermissionsPolicyState: withCdpName(async (params?: unknown) => commands["Page.getPermissionsPolicyState"].result.parse(await send("Page.getPermissionsPolicyState", commands["Page.getPermissionsPolicyState"].params.parse(params ?? {}))), "Page.getPermissionsPolicyState", "command"), + getOriginTrials: withCdpName(async (params?: unknown) => commands["Page.getOriginTrials"].result.parse(await send("Page.getOriginTrials", commands["Page.getOriginTrials"].params.parse(params ?? {}))), "Page.getOriginTrials", "command"), + setDeviceMetricsOverride: withCdpName(async (params?: unknown) => commands["Page.setDeviceMetricsOverride"].result.parse(await send("Page.setDeviceMetricsOverride", commands["Page.setDeviceMetricsOverride"].params.parse(params ?? {}))), "Page.setDeviceMetricsOverride", "command"), + setDeviceOrientationOverride: withCdpName(async (params?: unknown) => commands["Page.setDeviceOrientationOverride"].result.parse(await send("Page.setDeviceOrientationOverride", commands["Page.setDeviceOrientationOverride"].params.parse(params ?? {}))), "Page.setDeviceOrientationOverride", "command"), + setFontFamilies: withCdpName(async (params?: unknown) => commands["Page.setFontFamilies"].result.parse(await send("Page.setFontFamilies", commands["Page.setFontFamilies"].params.parse(params ?? {}))), "Page.setFontFamilies", "command"), + setFontSizes: withCdpName(async (params?: unknown) => commands["Page.setFontSizes"].result.parse(await send("Page.setFontSizes", commands["Page.setFontSizes"].params.parse(params ?? {}))), "Page.setFontSizes", "command"), + setDocumentContent: withCdpName(async (params?: unknown) => commands["Page.setDocumentContent"].result.parse(await send("Page.setDocumentContent", commands["Page.setDocumentContent"].params.parse(params ?? {}))), "Page.setDocumentContent", "command"), + setDownloadBehavior: withCdpName(async (params?: unknown) => commands["Page.setDownloadBehavior"].result.parse(await send("Page.setDownloadBehavior", commands["Page.setDownloadBehavior"].params.parse(params ?? {}))), "Page.setDownloadBehavior", "command"), + setGeolocationOverride: withCdpName(async (params?: unknown) => commands["Page.setGeolocationOverride"].result.parse(await send("Page.setGeolocationOverride", commands["Page.setGeolocationOverride"].params.parse(params ?? {}))), "Page.setGeolocationOverride", "command"), + setLifecycleEventsEnabled: withCdpName(async (params?: unknown) => commands["Page.setLifecycleEventsEnabled"].result.parse(await send("Page.setLifecycleEventsEnabled", commands["Page.setLifecycleEventsEnabled"].params.parse(params ?? {}))), "Page.setLifecycleEventsEnabled", "command"), + setTouchEmulationEnabled: withCdpName(async (params?: unknown) => commands["Page.setTouchEmulationEnabled"].result.parse(await send("Page.setTouchEmulationEnabled", commands["Page.setTouchEmulationEnabled"].params.parse(params ?? {}))), "Page.setTouchEmulationEnabled", "command"), + startScreencast: withCdpName(async (params?: unknown) => commands["Page.startScreencast"].result.parse(await send("Page.startScreencast", commands["Page.startScreencast"].params.parse(params ?? {}))), "Page.startScreencast", "command"), + stopLoading: withCdpName(async (params?: unknown) => commands["Page.stopLoading"].result.parse(await send("Page.stopLoading", commands["Page.stopLoading"].params.parse(params ?? {}))), "Page.stopLoading", "command"), + crash: withCdpName(async (params?: unknown) => commands["Page.crash"].result.parse(await send("Page.crash", commands["Page.crash"].params.parse(params ?? {}))), "Page.crash", "command"), + close: withCdpName(async (params?: unknown) => commands["Page.close"].result.parse(await send("Page.close", commands["Page.close"].params.parse(params ?? {}))), "Page.close", "command"), + setWebLifecycleState: withCdpName(async (params?: unknown) => commands["Page.setWebLifecycleState"].result.parse(await send("Page.setWebLifecycleState", commands["Page.setWebLifecycleState"].params.parse(params ?? {}))), "Page.setWebLifecycleState", "command"), + stopScreencast: withCdpName(async (params?: unknown) => commands["Page.stopScreencast"].result.parse(await send("Page.stopScreencast", commands["Page.stopScreencast"].params.parse(params ?? {}))), "Page.stopScreencast", "command"), + produceCompilationCache: withCdpName(async (params?: unknown) => commands["Page.produceCompilationCache"].result.parse(await send("Page.produceCompilationCache", commands["Page.produceCompilationCache"].params.parse(params ?? {}))), "Page.produceCompilationCache", "command"), + addCompilationCache: withCdpName(async (params?: unknown) => commands["Page.addCompilationCache"].result.parse(await send("Page.addCompilationCache", commands["Page.addCompilationCache"].params.parse(params ?? {}))), "Page.addCompilationCache", "command"), + clearCompilationCache: withCdpName(async (params?: unknown) => commands["Page.clearCompilationCache"].result.parse(await send("Page.clearCompilationCache", commands["Page.clearCompilationCache"].params.parse(params ?? {}))), "Page.clearCompilationCache", "command"), + setSPCTransactionMode: withCdpName(async (params?: unknown) => commands["Page.setSPCTransactionMode"].result.parse(await send("Page.setSPCTransactionMode", commands["Page.setSPCTransactionMode"].params.parse(params ?? {}))), "Page.setSPCTransactionMode", "command"), + setRPHRegistrationMode: withCdpName(async (params?: unknown) => commands["Page.setRPHRegistrationMode"].result.parse(await send("Page.setRPHRegistrationMode", commands["Page.setRPHRegistrationMode"].params.parse(params ?? {}))), "Page.setRPHRegistrationMode", "command"), + generateTestReport: withCdpName(async (params?: unknown) => commands["Page.generateTestReport"].result.parse(await send("Page.generateTestReport", commands["Page.generateTestReport"].params.parse(params ?? {}))), "Page.generateTestReport", "command"), + waitForDebugger: withCdpName(async (params?: unknown) => commands["Page.waitForDebugger"].result.parse(await send("Page.waitForDebugger", commands["Page.waitForDebugger"].params.parse(params ?? {}))), "Page.waitForDebugger", "command"), + setInterceptFileChooserDialog: withCdpName(async (params?: unknown) => commands["Page.setInterceptFileChooserDialog"].result.parse(await send("Page.setInterceptFileChooserDialog", commands["Page.setInterceptFileChooserDialog"].params.parse(params ?? {}))), "Page.setInterceptFileChooserDialog", "command"), + setPrerenderingAllowed: withCdpName(async (params?: unknown) => commands["Page.setPrerenderingAllowed"].result.parse(await send("Page.setPrerenderingAllowed", commands["Page.setPrerenderingAllowed"].params.parse(params ?? {}))), "Page.setPrerenderingAllowed", "command"), + getAnnotatedPageContent: withCdpName(async (params?: unknown) => commands["Page.getAnnotatedPageContent"].result.parse(await send("Page.getAnnotatedPageContent", commands["Page.getAnnotatedPageContent"].params.parse(params ?? {}))), "Page.getAnnotatedPageContent", "command"), + domContentEventFired: events["Page.domContentEventFired"] as CdpEventAlias, + fileChooserOpened: events["Page.fileChooserOpened"] as CdpEventAlias, + frameAttached: events["Page.frameAttached"] as CdpEventAlias, + frameClearedScheduledNavigation: events["Page.frameClearedScheduledNavigation"] as CdpEventAlias, + frameDetached: events["Page.frameDetached"] as CdpEventAlias, + frameSubtreeWillBeDetached: events["Page.frameSubtreeWillBeDetached"] as CdpEventAlias, + frameNavigated: events["Page.frameNavigated"] as CdpEventAlias, + documentOpened: events["Page.documentOpened"] as CdpEventAlias, + frameResized: events["Page.frameResized"] as CdpEventAlias, + frameStartedNavigating: events["Page.frameStartedNavigating"] as CdpEventAlias, + frameRequestedNavigation: events["Page.frameRequestedNavigation"] as CdpEventAlias, + frameScheduledNavigation: events["Page.frameScheduledNavigation"] as CdpEventAlias, + frameStartedLoading: events["Page.frameStartedLoading"] as CdpEventAlias, + frameStoppedLoading: events["Page.frameStoppedLoading"] as CdpEventAlias, + downloadWillBegin: events["Page.downloadWillBegin"] as CdpEventAlias, + downloadProgress: events["Page.downloadProgress"] as CdpEventAlias, + interstitialHidden: events["Page.interstitialHidden"] as CdpEventAlias, + interstitialShown: events["Page.interstitialShown"] as CdpEventAlias, + javascriptDialogClosed: events["Page.javascriptDialogClosed"] as CdpEventAlias, + javascriptDialogOpening: events["Page.javascriptDialogOpening"] as CdpEventAlias, + lifecycleEvent: events["Page.lifecycleEvent"] as CdpEventAlias, + backForwardCacheNotUsed: events["Page.backForwardCacheNotUsed"] as CdpEventAlias, + loadEventFired: events["Page.loadEventFired"] as CdpEventAlias, + navigatedWithinDocument: events["Page.navigatedWithinDocument"] as CdpEventAlias, + screencastFrame: events["Page.screencastFrame"] as CdpEventAlias, + screencastVisibilityChanged: events["Page.screencastVisibilityChanged"] as CdpEventAlias, windowOpen: events["Page.windowOpen"] as CdpEventAlias, - compilationCacheProduced: events["Page.compilationCacheProduced"] as CdpEventAlias< - cdp.types.ts.Page.CompilationCacheProducedEvent, - "Page.compilationCacheProduced" - >, + compilationCacheProduced: events["Page.compilationCacheProduced"] as CdpEventAlias, }, Performance: { - disable: withCdpName( - async (params?: unknown) => - commands["Performance.disable"].result.parse( - await send("Performance.disable", commands["Performance.disable"].params.parse(params ?? {})), - ), - "Performance.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Performance.enable"].result.parse( - await send("Performance.enable", commands["Performance.enable"].params.parse(params ?? {})), - ), - "Performance.enable", - "command", - ), - setTimeDomain: withCdpName( - async (params?: unknown) => - commands["Performance.setTimeDomain"].result.parse( - await send("Performance.setTimeDomain", commands["Performance.setTimeDomain"].params.parse(params ?? {})), - ), - "Performance.setTimeDomain", - "command", - ), - getMetrics: withCdpName( - async (params?: unknown) => - commands["Performance.getMetrics"].result.parse( - await send("Performance.getMetrics", commands["Performance.getMetrics"].params.parse(params ?? {})), - ), - "Performance.getMetrics", - "command", - ), - metrics: events["Performance.metrics"] as CdpEventAlias< - cdp.types.ts.Performance.MetricsEvent, - "Performance.metrics" - >, + disable: withCdpName(async (params?: unknown) => commands["Performance.disable"].result.parse(await send("Performance.disable", commands["Performance.disable"].params.parse(params ?? {}))), "Performance.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Performance.enable"].result.parse(await send("Performance.enable", commands["Performance.enable"].params.parse(params ?? {}))), "Performance.enable", "command"), + setTimeDomain: withCdpName(async (params?: unknown) => commands["Performance.setTimeDomain"].result.parse(await send("Performance.setTimeDomain", commands["Performance.setTimeDomain"].params.parse(params ?? {}))), "Performance.setTimeDomain", "command"), + getMetrics: withCdpName(async (params?: unknown) => commands["Performance.getMetrics"].result.parse(await send("Performance.getMetrics", commands["Performance.getMetrics"].params.parse(params ?? {}))), "Performance.getMetrics", "command"), + metrics: events["Performance.metrics"] as CdpEventAlias, }, PerformanceTimeline: { - enable: withCdpName( - async (params?: unknown) => - commands["PerformanceTimeline.enable"].result.parse( - await send("PerformanceTimeline.enable", commands["PerformanceTimeline.enable"].params.parse(params ?? {})), - ), - "PerformanceTimeline.enable", - "command", - ), - timelineEventAdded: events["PerformanceTimeline.timelineEventAdded"] as CdpEventAlias< - cdp.types.ts.PerformanceTimeline.TimelineEventAddedEvent, - "PerformanceTimeline.timelineEventAdded" - >, + enable: withCdpName(async (params?: unknown) => commands["PerformanceTimeline.enable"].result.parse(await send("PerformanceTimeline.enable", commands["PerformanceTimeline.enable"].params.parse(params ?? {}))), "PerformanceTimeline.enable", "command"), + timelineEventAdded: events["PerformanceTimeline.timelineEventAdded"] as CdpEventAlias, }, Preload: { - enable: withCdpName( - async (params?: unknown) => - commands["Preload.enable"].result.parse( - await send("Preload.enable", commands["Preload.enable"].params.parse(params ?? {})), - ), - "Preload.enable", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Preload.disable"].result.parse( - await send("Preload.disable", commands["Preload.disable"].params.parse(params ?? {})), - ), - "Preload.disable", - "command", - ), - ruleSetUpdated: events["Preload.ruleSetUpdated"] as CdpEventAlias< - cdp.types.ts.Preload.RuleSetUpdatedEvent, - "Preload.ruleSetUpdated" - >, - ruleSetRemoved: events["Preload.ruleSetRemoved"] as CdpEventAlias< - cdp.types.ts.Preload.RuleSetRemovedEvent, - "Preload.ruleSetRemoved" - >, - preloadEnabledStateUpdated: events["Preload.preloadEnabledStateUpdated"] as CdpEventAlias< - cdp.types.ts.Preload.PreloadEnabledStateUpdatedEvent, - "Preload.preloadEnabledStateUpdated" - >, - prefetchStatusUpdated: events["Preload.prefetchStatusUpdated"] as CdpEventAlias< - cdp.types.ts.Preload.PrefetchStatusUpdatedEvent, - "Preload.prefetchStatusUpdated" - >, - prerenderStatusUpdated: events["Preload.prerenderStatusUpdated"] as CdpEventAlias< - cdp.types.ts.Preload.PrerenderStatusUpdatedEvent, - "Preload.prerenderStatusUpdated" - >, - preloadingAttemptSourcesUpdated: events["Preload.preloadingAttemptSourcesUpdated"] as CdpEventAlias< - cdp.types.ts.Preload.PreloadingAttemptSourcesUpdatedEvent, - "Preload.preloadingAttemptSourcesUpdated" - >, + enable: withCdpName(async (params?: unknown) => commands["Preload.enable"].result.parse(await send("Preload.enable", commands["Preload.enable"].params.parse(params ?? {}))), "Preload.enable", "command"), + disable: withCdpName(async (params?: unknown) => commands["Preload.disable"].result.parse(await send("Preload.disable", commands["Preload.disable"].params.parse(params ?? {}))), "Preload.disable", "command"), + ruleSetUpdated: events["Preload.ruleSetUpdated"] as CdpEventAlias, + ruleSetRemoved: events["Preload.ruleSetRemoved"] as CdpEventAlias, + preloadEnabledStateUpdated: events["Preload.preloadEnabledStateUpdated"] as CdpEventAlias, + prefetchStatusUpdated: events["Preload.prefetchStatusUpdated"] as CdpEventAlias, + prerenderStatusUpdated: events["Preload.prerenderStatusUpdated"] as CdpEventAlias, + preloadingAttemptSourcesUpdated: events["Preload.preloadingAttemptSourcesUpdated"] as CdpEventAlias, }, Profiler: { - disable: withCdpName( - async (params?: unknown) => - commands["Profiler.disable"].result.parse( - await send("Profiler.disable", commands["Profiler.disable"].params.parse(params ?? {})), - ), - "Profiler.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Profiler.enable"].result.parse( - await send("Profiler.enable", commands["Profiler.enable"].params.parse(params ?? {})), - ), - "Profiler.enable", - "command", - ), - getBestEffortCoverage: withCdpName( - async (params?: unknown) => - commands["Profiler.getBestEffortCoverage"].result.parse( - await send( - "Profiler.getBestEffortCoverage", - commands["Profiler.getBestEffortCoverage"].params.parse(params ?? {}), - ), - ), - "Profiler.getBestEffortCoverage", - "command", - ), - setSamplingInterval: withCdpName( - async (params?: unknown) => - commands["Profiler.setSamplingInterval"].result.parse( - await send( - "Profiler.setSamplingInterval", - commands["Profiler.setSamplingInterval"].params.parse(params ?? {}), - ), - ), - "Profiler.setSamplingInterval", - "command", - ), - start: withCdpName( - async (params?: unknown) => - commands["Profiler.start"].result.parse( - await send("Profiler.start", commands["Profiler.start"].params.parse(params ?? {})), - ), - "Profiler.start", - "command", - ), - startPreciseCoverage: withCdpName( - async (params?: unknown) => - commands["Profiler.startPreciseCoverage"].result.parse( - await send( - "Profiler.startPreciseCoverage", - commands["Profiler.startPreciseCoverage"].params.parse(params ?? {}), - ), - ), - "Profiler.startPreciseCoverage", - "command", - ), - stop: withCdpName( - async (params?: unknown) => - commands["Profiler.stop"].result.parse( - await send("Profiler.stop", commands["Profiler.stop"].params.parse(params ?? {})), - ), - "Profiler.stop", - "command", - ), - stopPreciseCoverage: withCdpName( - async (params?: unknown) => - commands["Profiler.stopPreciseCoverage"].result.parse( - await send( - "Profiler.stopPreciseCoverage", - commands["Profiler.stopPreciseCoverage"].params.parse(params ?? {}), - ), - ), - "Profiler.stopPreciseCoverage", - "command", - ), - takePreciseCoverage: withCdpName( - async (params?: unknown) => - commands["Profiler.takePreciseCoverage"].result.parse( - await send( - "Profiler.takePreciseCoverage", - commands["Profiler.takePreciseCoverage"].params.parse(params ?? {}), - ), - ), - "Profiler.takePreciseCoverage", - "command", - ), - consoleProfileFinished: events["Profiler.consoleProfileFinished"] as CdpEventAlias< - cdp.types.ts.Profiler.ConsoleProfileFinishedEvent, - "Profiler.consoleProfileFinished" - >, - consoleProfileStarted: events["Profiler.consoleProfileStarted"] as CdpEventAlias< - cdp.types.ts.Profiler.ConsoleProfileStartedEvent, - "Profiler.consoleProfileStarted" - >, - preciseCoverageDeltaUpdate: events["Profiler.preciseCoverageDeltaUpdate"] as CdpEventAlias< - cdp.types.ts.Profiler.PreciseCoverageDeltaUpdateEvent, - "Profiler.preciseCoverageDeltaUpdate" - >, + disable: withCdpName(async (params?: unknown) => commands["Profiler.disable"].result.parse(await send("Profiler.disable", commands["Profiler.disable"].params.parse(params ?? {}))), "Profiler.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Profiler.enable"].result.parse(await send("Profiler.enable", commands["Profiler.enable"].params.parse(params ?? {}))), "Profiler.enable", "command"), + getBestEffortCoverage: withCdpName(async (params?: unknown) => commands["Profiler.getBestEffortCoverage"].result.parse(await send("Profiler.getBestEffortCoverage", commands["Profiler.getBestEffortCoverage"].params.parse(params ?? {}))), "Profiler.getBestEffortCoverage", "command"), + setSamplingInterval: withCdpName(async (params?: unknown) => commands["Profiler.setSamplingInterval"].result.parse(await send("Profiler.setSamplingInterval", commands["Profiler.setSamplingInterval"].params.parse(params ?? {}))), "Profiler.setSamplingInterval", "command"), + start: withCdpName(async (params?: unknown) => commands["Profiler.start"].result.parse(await send("Profiler.start", commands["Profiler.start"].params.parse(params ?? {}))), "Profiler.start", "command"), + startPreciseCoverage: withCdpName(async (params?: unknown) => commands["Profiler.startPreciseCoverage"].result.parse(await send("Profiler.startPreciseCoverage", commands["Profiler.startPreciseCoverage"].params.parse(params ?? {}))), "Profiler.startPreciseCoverage", "command"), + stop: withCdpName(async (params?: unknown) => commands["Profiler.stop"].result.parse(await send("Profiler.stop", commands["Profiler.stop"].params.parse(params ?? {}))), "Profiler.stop", "command"), + stopPreciseCoverage: withCdpName(async (params?: unknown) => commands["Profiler.stopPreciseCoverage"].result.parse(await send("Profiler.stopPreciseCoverage", commands["Profiler.stopPreciseCoverage"].params.parse(params ?? {}))), "Profiler.stopPreciseCoverage", "command"), + takePreciseCoverage: withCdpName(async (params?: unknown) => commands["Profiler.takePreciseCoverage"].result.parse(await send("Profiler.takePreciseCoverage", commands["Profiler.takePreciseCoverage"].params.parse(params ?? {}))), "Profiler.takePreciseCoverage", "command"), + consoleProfileFinished: events["Profiler.consoleProfileFinished"] as CdpEventAlias, + consoleProfileStarted: events["Profiler.consoleProfileStarted"] as CdpEventAlias, + preciseCoverageDeltaUpdate: events["Profiler.preciseCoverageDeltaUpdate"] as CdpEventAlias, }, PWA: { - getOsAppState: withCdpName( - async (params?: unknown) => - commands["PWA.getOsAppState"].result.parse( - await send("PWA.getOsAppState", commands["PWA.getOsAppState"].params.parse(params ?? {})), - ), - "PWA.getOsAppState", - "command", - ), - install: withCdpName( - async (params?: unknown) => - commands["PWA.install"].result.parse( - await send("PWA.install", commands["PWA.install"].params.parse(params ?? {})), - ), - "PWA.install", - "command", - ), - uninstall: withCdpName( - async (params?: unknown) => - commands["PWA.uninstall"].result.parse( - await send("PWA.uninstall", commands["PWA.uninstall"].params.parse(params ?? {})), - ), - "PWA.uninstall", - "command", - ), - launch: withCdpName( - async (params?: unknown) => - commands["PWA.launch"].result.parse( - await send("PWA.launch", commands["PWA.launch"].params.parse(params ?? {})), - ), - "PWA.launch", - "command", - ), - launchFilesInApp: withCdpName( - async (params?: unknown) => - commands["PWA.launchFilesInApp"].result.parse( - await send("PWA.launchFilesInApp", commands["PWA.launchFilesInApp"].params.parse(params ?? {})), - ), - "PWA.launchFilesInApp", - "command", - ), - openCurrentPageInApp: withCdpName( - async (params?: unknown) => - commands["PWA.openCurrentPageInApp"].result.parse( - await send("PWA.openCurrentPageInApp", commands["PWA.openCurrentPageInApp"].params.parse(params ?? {})), - ), - "PWA.openCurrentPageInApp", - "command", - ), - changeAppUserSettings: withCdpName( - async (params?: unknown) => - commands["PWA.changeAppUserSettings"].result.parse( - await send("PWA.changeAppUserSettings", commands["PWA.changeAppUserSettings"].params.parse(params ?? {})), - ), - "PWA.changeAppUserSettings", - "command", - ), + getOsAppState: withCdpName(async (params?: unknown) => commands["PWA.getOsAppState"].result.parse(await send("PWA.getOsAppState", commands["PWA.getOsAppState"].params.parse(params ?? {}))), "PWA.getOsAppState", "command"), + install: withCdpName(async (params?: unknown) => commands["PWA.install"].result.parse(await send("PWA.install", commands["PWA.install"].params.parse(params ?? {}))), "PWA.install", "command"), + uninstall: withCdpName(async (params?: unknown) => commands["PWA.uninstall"].result.parse(await send("PWA.uninstall", commands["PWA.uninstall"].params.parse(params ?? {}))), "PWA.uninstall", "command"), + launch: withCdpName(async (params?: unknown) => commands["PWA.launch"].result.parse(await send("PWA.launch", commands["PWA.launch"].params.parse(params ?? {}))), "PWA.launch", "command"), + launchFilesInApp: withCdpName(async (params?: unknown) => commands["PWA.launchFilesInApp"].result.parse(await send("PWA.launchFilesInApp", commands["PWA.launchFilesInApp"].params.parse(params ?? {}))), "PWA.launchFilesInApp", "command"), + openCurrentPageInApp: withCdpName(async (params?: unknown) => commands["PWA.openCurrentPageInApp"].result.parse(await send("PWA.openCurrentPageInApp", commands["PWA.openCurrentPageInApp"].params.parse(params ?? {}))), "PWA.openCurrentPageInApp", "command"), + changeAppUserSettings: withCdpName(async (params?: unknown) => commands["PWA.changeAppUserSettings"].result.parse(await send("PWA.changeAppUserSettings", commands["PWA.changeAppUserSettings"].params.parse(params ?? {}))), "PWA.changeAppUserSettings", "command"), }, Runtime: { - awaitPromise: withCdpName( - async (params?: unknown) => - commands["Runtime.awaitPromise"].result.parse( - await send("Runtime.awaitPromise", commands["Runtime.awaitPromise"].params.parse(params ?? {})), - ), - "Runtime.awaitPromise", - "command", - ), - callFunctionOn: withCdpName( - async (params?: unknown) => - commands["Runtime.callFunctionOn"].result.parse( - await send("Runtime.callFunctionOn", commands["Runtime.callFunctionOn"].params.parse(params ?? {})), - ), - "Runtime.callFunctionOn", - "command", - ), - compileScript: withCdpName( - async (params?: unknown) => - commands["Runtime.compileScript"].result.parse( - await send("Runtime.compileScript", commands["Runtime.compileScript"].params.parse(params ?? {})), - ), - "Runtime.compileScript", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["Runtime.disable"].result.parse( - await send("Runtime.disable", commands["Runtime.disable"].params.parse(params ?? {})), - ), - "Runtime.disable", - "command", - ), - discardConsoleEntries: withCdpName( - async (params?: unknown) => - commands["Runtime.discardConsoleEntries"].result.parse( - await send( - "Runtime.discardConsoleEntries", - commands["Runtime.discardConsoleEntries"].params.parse(params ?? {}), - ), - ), - "Runtime.discardConsoleEntries", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Runtime.enable"].result.parse( - await send("Runtime.enable", commands["Runtime.enable"].params.parse(params ?? {})), - ), - "Runtime.enable", - "command", - ), - evaluate: withCdpName( - async (params?: unknown) => - commands["Runtime.evaluate"].result.parse( - await send("Runtime.evaluate", commands["Runtime.evaluate"].params.parse(params ?? {})), - ), - "Runtime.evaluate", - "command", - ), - getIsolateId: withCdpName( - async (params?: unknown) => - commands["Runtime.getIsolateId"].result.parse( - await send("Runtime.getIsolateId", commands["Runtime.getIsolateId"].params.parse(params ?? {})), - ), - "Runtime.getIsolateId", - "command", - ), - getHeapUsage: withCdpName( - async (params?: unknown) => - commands["Runtime.getHeapUsage"].result.parse( - await send("Runtime.getHeapUsage", commands["Runtime.getHeapUsage"].params.parse(params ?? {})), - ), - "Runtime.getHeapUsage", - "command", - ), - getProperties: withCdpName( - async (params?: unknown) => - commands["Runtime.getProperties"].result.parse( - await send("Runtime.getProperties", commands["Runtime.getProperties"].params.parse(params ?? {})), - ), - "Runtime.getProperties", - "command", - ), - globalLexicalScopeNames: withCdpName( - async (params?: unknown) => - commands["Runtime.globalLexicalScopeNames"].result.parse( - await send( - "Runtime.globalLexicalScopeNames", - commands["Runtime.globalLexicalScopeNames"].params.parse(params ?? {}), - ), - ), - "Runtime.globalLexicalScopeNames", - "command", - ), - queryObjects: withCdpName( - async (params?: unknown) => - commands["Runtime.queryObjects"].result.parse( - await send("Runtime.queryObjects", commands["Runtime.queryObjects"].params.parse(params ?? {})), - ), - "Runtime.queryObjects", - "command", - ), - releaseObject: withCdpName( - async (params?: unknown) => - commands["Runtime.releaseObject"].result.parse( - await send("Runtime.releaseObject", commands["Runtime.releaseObject"].params.parse(params ?? {})), - ), - "Runtime.releaseObject", - "command", - ), - releaseObjectGroup: withCdpName( - async (params?: unknown) => - commands["Runtime.releaseObjectGroup"].result.parse( - await send("Runtime.releaseObjectGroup", commands["Runtime.releaseObjectGroup"].params.parse(params ?? {})), - ), - "Runtime.releaseObjectGroup", - "command", - ), - runIfWaitingForDebugger: withCdpName( - async (params?: unknown) => - commands["Runtime.runIfWaitingForDebugger"].result.parse( - await send( - "Runtime.runIfWaitingForDebugger", - commands["Runtime.runIfWaitingForDebugger"].params.parse(params ?? {}), - ), - ), - "Runtime.runIfWaitingForDebugger", - "command", - ), - runScript: withCdpName( - async (params?: unknown) => - commands["Runtime.runScript"].result.parse( - await send("Runtime.runScript", commands["Runtime.runScript"].params.parse(params ?? {})), - ), - "Runtime.runScript", - "command", - ), - setAsyncCallStackDepth: withCdpName( - async (params?: unknown) => - commands["Runtime.setAsyncCallStackDepth"].result.parse( - await send( - "Runtime.setAsyncCallStackDepth", - commands["Runtime.setAsyncCallStackDepth"].params.parse(params ?? {}), - ), - ), - "Runtime.setAsyncCallStackDepth", - "command", - ), - setCustomObjectFormatterEnabled: withCdpName( - async (params?: unknown) => - commands["Runtime.setCustomObjectFormatterEnabled"].result.parse( - await send( - "Runtime.setCustomObjectFormatterEnabled", - commands["Runtime.setCustomObjectFormatterEnabled"].params.parse(params ?? {}), - ), - ), - "Runtime.setCustomObjectFormatterEnabled", - "command", - ), - setMaxCallStackSizeToCapture: withCdpName( - async (params?: unknown) => - commands["Runtime.setMaxCallStackSizeToCapture"].result.parse( - await send( - "Runtime.setMaxCallStackSizeToCapture", - commands["Runtime.setMaxCallStackSizeToCapture"].params.parse(params ?? {}), - ), - ), - "Runtime.setMaxCallStackSizeToCapture", - "command", - ), - terminateExecution: withCdpName( - async (params?: unknown) => - commands["Runtime.terminateExecution"].result.parse( - await send("Runtime.terminateExecution", commands["Runtime.terminateExecution"].params.parse(params ?? {})), - ), - "Runtime.terminateExecution", - "command", - ), - addBinding: withCdpName( - async (params?: unknown) => - commands["Runtime.addBinding"].result.parse( - await send("Runtime.addBinding", commands["Runtime.addBinding"].params.parse(params ?? {})), - ), - "Runtime.addBinding", - "command", - ), - removeBinding: withCdpName( - async (params?: unknown) => - commands["Runtime.removeBinding"].result.parse( - await send("Runtime.removeBinding", commands["Runtime.removeBinding"].params.parse(params ?? {})), - ), - "Runtime.removeBinding", - "command", - ), - getExceptionDetails: withCdpName( - async (params?: unknown) => - commands["Runtime.getExceptionDetails"].result.parse( - await send( - "Runtime.getExceptionDetails", - commands["Runtime.getExceptionDetails"].params.parse(params ?? {}), - ), - ), - "Runtime.getExceptionDetails", - "command", - ), - bindingCalled: events["Runtime.bindingCalled"] as CdpEventAlias< - cdp.types.ts.Runtime.BindingCalledEvent, - "Runtime.bindingCalled" - >, - consoleAPICalled: events["Runtime.consoleAPICalled"] as CdpEventAlias< - cdp.types.ts.Runtime.ConsoleAPICalledEvent, - "Runtime.consoleAPICalled" - >, - exceptionRevoked: events["Runtime.exceptionRevoked"] as CdpEventAlias< - cdp.types.ts.Runtime.ExceptionRevokedEvent, - "Runtime.exceptionRevoked" - >, - exceptionThrown: events["Runtime.exceptionThrown"] as CdpEventAlias< - cdp.types.ts.Runtime.ExceptionThrownEvent, - "Runtime.exceptionThrown" - >, - executionContextCreated: events["Runtime.executionContextCreated"] as CdpEventAlias< - cdp.types.ts.Runtime.ExecutionContextCreatedEvent, - "Runtime.executionContextCreated" - >, - executionContextDestroyed: events["Runtime.executionContextDestroyed"] as CdpEventAlias< - cdp.types.ts.Runtime.ExecutionContextDestroyedEvent, - "Runtime.executionContextDestroyed" - >, - executionContextsCleared: events["Runtime.executionContextsCleared"] as CdpEventAlias< - cdp.types.ts.Runtime.ExecutionContextsClearedEvent, - "Runtime.executionContextsCleared" - >, - inspectRequested: events["Runtime.inspectRequested"] as CdpEventAlias< - cdp.types.ts.Runtime.InspectRequestedEvent, - "Runtime.inspectRequested" - >, + awaitPromise: withCdpName(async (params?: unknown) => commands["Runtime.awaitPromise"].result.parse(await send("Runtime.awaitPromise", commands["Runtime.awaitPromise"].params.parse(params ?? {}))), "Runtime.awaitPromise", "command"), + callFunctionOn: withCdpName(async (params?: unknown) => commands["Runtime.callFunctionOn"].result.parse(await send("Runtime.callFunctionOn", commands["Runtime.callFunctionOn"].params.parse(params ?? {}))), "Runtime.callFunctionOn", "command"), + compileScript: withCdpName(async (params?: unknown) => commands["Runtime.compileScript"].result.parse(await send("Runtime.compileScript", commands["Runtime.compileScript"].params.parse(params ?? {}))), "Runtime.compileScript", "command"), + disable: withCdpName(async (params?: unknown) => commands["Runtime.disable"].result.parse(await send("Runtime.disable", commands["Runtime.disable"].params.parse(params ?? {}))), "Runtime.disable", "command"), + discardConsoleEntries: withCdpName(async (params?: unknown) => commands["Runtime.discardConsoleEntries"].result.parse(await send("Runtime.discardConsoleEntries", commands["Runtime.discardConsoleEntries"].params.parse(params ?? {}))), "Runtime.discardConsoleEntries", "command"), + enable: withCdpName(async (params?: unknown) => commands["Runtime.enable"].result.parse(await send("Runtime.enable", commands["Runtime.enable"].params.parse(params ?? {}))), "Runtime.enable", "command"), + evaluate: withCdpName(async (params?: unknown) => commands["Runtime.evaluate"].result.parse(await send("Runtime.evaluate", commands["Runtime.evaluate"].params.parse(params ?? {}))), "Runtime.evaluate", "command"), + getIsolateId: withCdpName(async (params?: unknown) => commands["Runtime.getIsolateId"].result.parse(await send("Runtime.getIsolateId", commands["Runtime.getIsolateId"].params.parse(params ?? {}))), "Runtime.getIsolateId", "command"), + getHeapUsage: withCdpName(async (params?: unknown) => commands["Runtime.getHeapUsage"].result.parse(await send("Runtime.getHeapUsage", commands["Runtime.getHeapUsage"].params.parse(params ?? {}))), "Runtime.getHeapUsage", "command"), + getProperties: withCdpName(async (params?: unknown) => commands["Runtime.getProperties"].result.parse(await send("Runtime.getProperties", commands["Runtime.getProperties"].params.parse(params ?? {}))), "Runtime.getProperties", "command"), + globalLexicalScopeNames: withCdpName(async (params?: unknown) => commands["Runtime.globalLexicalScopeNames"].result.parse(await send("Runtime.globalLexicalScopeNames", commands["Runtime.globalLexicalScopeNames"].params.parse(params ?? {}))), "Runtime.globalLexicalScopeNames", "command"), + queryObjects: withCdpName(async (params?: unknown) => commands["Runtime.queryObjects"].result.parse(await send("Runtime.queryObjects", commands["Runtime.queryObjects"].params.parse(params ?? {}))), "Runtime.queryObjects", "command"), + releaseObject: withCdpName(async (params?: unknown) => commands["Runtime.releaseObject"].result.parse(await send("Runtime.releaseObject", commands["Runtime.releaseObject"].params.parse(params ?? {}))), "Runtime.releaseObject", "command"), + releaseObjectGroup: withCdpName(async (params?: unknown) => commands["Runtime.releaseObjectGroup"].result.parse(await send("Runtime.releaseObjectGroup", commands["Runtime.releaseObjectGroup"].params.parse(params ?? {}))), "Runtime.releaseObjectGroup", "command"), + runIfWaitingForDebugger: withCdpName(async (params?: unknown) => commands["Runtime.runIfWaitingForDebugger"].result.parse(await send("Runtime.runIfWaitingForDebugger", commands["Runtime.runIfWaitingForDebugger"].params.parse(params ?? {}))), "Runtime.runIfWaitingForDebugger", "command"), + runScript: withCdpName(async (params?: unknown) => commands["Runtime.runScript"].result.parse(await send("Runtime.runScript", commands["Runtime.runScript"].params.parse(params ?? {}))), "Runtime.runScript", "command"), + setAsyncCallStackDepth: withCdpName(async (params?: unknown) => commands["Runtime.setAsyncCallStackDepth"].result.parse(await send("Runtime.setAsyncCallStackDepth", commands["Runtime.setAsyncCallStackDepth"].params.parse(params ?? {}))), "Runtime.setAsyncCallStackDepth", "command"), + setCustomObjectFormatterEnabled: withCdpName(async (params?: unknown) => commands["Runtime.setCustomObjectFormatterEnabled"].result.parse(await send("Runtime.setCustomObjectFormatterEnabled", commands["Runtime.setCustomObjectFormatterEnabled"].params.parse(params ?? {}))), "Runtime.setCustomObjectFormatterEnabled", "command"), + setMaxCallStackSizeToCapture: withCdpName(async (params?: unknown) => commands["Runtime.setMaxCallStackSizeToCapture"].result.parse(await send("Runtime.setMaxCallStackSizeToCapture", commands["Runtime.setMaxCallStackSizeToCapture"].params.parse(params ?? {}))), "Runtime.setMaxCallStackSizeToCapture", "command"), + terminateExecution: withCdpName(async (params?: unknown) => commands["Runtime.terminateExecution"].result.parse(await send("Runtime.terminateExecution", commands["Runtime.terminateExecution"].params.parse(params ?? {}))), "Runtime.terminateExecution", "command"), + addBinding: withCdpName(async (params?: unknown) => commands["Runtime.addBinding"].result.parse(await send("Runtime.addBinding", commands["Runtime.addBinding"].params.parse(params ?? {}))), "Runtime.addBinding", "command"), + removeBinding: withCdpName(async (params?: unknown) => commands["Runtime.removeBinding"].result.parse(await send("Runtime.removeBinding", commands["Runtime.removeBinding"].params.parse(params ?? {}))), "Runtime.removeBinding", "command"), + getExceptionDetails: withCdpName(async (params?: unknown) => commands["Runtime.getExceptionDetails"].result.parse(await send("Runtime.getExceptionDetails", commands["Runtime.getExceptionDetails"].params.parse(params ?? {}))), "Runtime.getExceptionDetails", "command"), + bindingCalled: events["Runtime.bindingCalled"] as CdpEventAlias, + consoleAPICalled: events["Runtime.consoleAPICalled"] as CdpEventAlias, + exceptionRevoked: events["Runtime.exceptionRevoked"] as CdpEventAlias, + exceptionThrown: events["Runtime.exceptionThrown"] as CdpEventAlias, + executionContextCreated: events["Runtime.executionContextCreated"] as CdpEventAlias, + executionContextDestroyed: events["Runtime.executionContextDestroyed"] as CdpEventAlias, + executionContextsCleared: events["Runtime.executionContextsCleared"] as CdpEventAlias, + inspectRequested: events["Runtime.inspectRequested"] as CdpEventAlias, }, Schema: { - getDomains: withCdpName( - async (params?: unknown) => - commands["Schema.getDomains"].result.parse( - await send("Schema.getDomains", commands["Schema.getDomains"].params.parse(params ?? {})), - ), - "Schema.getDomains", - "command", - ), + getDomains: withCdpName(async (params?: unknown) => commands["Schema.getDomains"].result.parse(await send("Schema.getDomains", commands["Schema.getDomains"].params.parse(params ?? {}))), "Schema.getDomains", "command"), }, Security: { - disable: withCdpName( - async (params?: unknown) => - commands["Security.disable"].result.parse( - await send("Security.disable", commands["Security.disable"].params.parse(params ?? {})), - ), - "Security.disable", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["Security.enable"].result.parse( - await send("Security.enable", commands["Security.enable"].params.parse(params ?? {})), - ), - "Security.enable", - "command", - ), - setIgnoreCertificateErrors: withCdpName( - async (params?: unknown) => - commands["Security.setIgnoreCertificateErrors"].result.parse( - await send( - "Security.setIgnoreCertificateErrors", - commands["Security.setIgnoreCertificateErrors"].params.parse(params ?? {}), - ), - ), - "Security.setIgnoreCertificateErrors", - "command", - ), - handleCertificateError: withCdpName( - async (params?: unknown) => - commands["Security.handleCertificateError"].result.parse( - await send( - "Security.handleCertificateError", - commands["Security.handleCertificateError"].params.parse(params ?? {}), - ), - ), - "Security.handleCertificateError", - "command", - ), - setOverrideCertificateErrors: withCdpName( - async (params?: unknown) => - commands["Security.setOverrideCertificateErrors"].result.parse( - await send( - "Security.setOverrideCertificateErrors", - commands["Security.setOverrideCertificateErrors"].params.parse(params ?? {}), - ), - ), - "Security.setOverrideCertificateErrors", - "command", - ), - certificateError: events["Security.certificateError"] as CdpEventAlias< - cdp.types.ts.Security.CertificateErrorEvent, - "Security.certificateError" - >, - visibleSecurityStateChanged: events["Security.visibleSecurityStateChanged"] as CdpEventAlias< - cdp.types.ts.Security.VisibleSecurityStateChangedEvent, - "Security.visibleSecurityStateChanged" - >, - securityStateChanged: events["Security.securityStateChanged"] as CdpEventAlias< - cdp.types.ts.Security.SecurityStateChangedEvent, - "Security.securityStateChanged" - >, + disable: withCdpName(async (params?: unknown) => commands["Security.disable"].result.parse(await send("Security.disable", commands["Security.disable"].params.parse(params ?? {}))), "Security.disable", "command"), + enable: withCdpName(async (params?: unknown) => commands["Security.enable"].result.parse(await send("Security.enable", commands["Security.enable"].params.parse(params ?? {}))), "Security.enable", "command"), + setIgnoreCertificateErrors: withCdpName(async (params?: unknown) => commands["Security.setIgnoreCertificateErrors"].result.parse(await send("Security.setIgnoreCertificateErrors", commands["Security.setIgnoreCertificateErrors"].params.parse(params ?? {}))), "Security.setIgnoreCertificateErrors", "command"), + handleCertificateError: withCdpName(async (params?: unknown) => commands["Security.handleCertificateError"].result.parse(await send("Security.handleCertificateError", commands["Security.handleCertificateError"].params.parse(params ?? {}))), "Security.handleCertificateError", "command"), + setOverrideCertificateErrors: withCdpName(async (params?: unknown) => commands["Security.setOverrideCertificateErrors"].result.parse(await send("Security.setOverrideCertificateErrors", commands["Security.setOverrideCertificateErrors"].params.parse(params ?? {}))), "Security.setOverrideCertificateErrors", "command"), + certificateError: events["Security.certificateError"] as CdpEventAlias, + visibleSecurityStateChanged: events["Security.visibleSecurityStateChanged"] as CdpEventAlias, + securityStateChanged: events["Security.securityStateChanged"] as CdpEventAlias, }, ServiceWorker: { - deliverPushMessage: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.deliverPushMessage"].result.parse( - await send( - "ServiceWorker.deliverPushMessage", - commands["ServiceWorker.deliverPushMessage"].params.parse(params ?? {}), - ), - ), - "ServiceWorker.deliverPushMessage", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.disable"].result.parse( - await send("ServiceWorker.disable", commands["ServiceWorker.disable"].params.parse(params ?? {})), - ), - "ServiceWorker.disable", - "command", - ), - dispatchSyncEvent: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.dispatchSyncEvent"].result.parse( - await send( - "ServiceWorker.dispatchSyncEvent", - commands["ServiceWorker.dispatchSyncEvent"].params.parse(params ?? {}), - ), - ), - "ServiceWorker.dispatchSyncEvent", - "command", - ), - dispatchPeriodicSyncEvent: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.dispatchPeriodicSyncEvent"].result.parse( - await send( - "ServiceWorker.dispatchPeriodicSyncEvent", - commands["ServiceWorker.dispatchPeriodicSyncEvent"].params.parse(params ?? {}), - ), - ), - "ServiceWorker.dispatchPeriodicSyncEvent", - "command", - ), - enable: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.enable"].result.parse( - await send("ServiceWorker.enable", commands["ServiceWorker.enable"].params.parse(params ?? {})), - ), - "ServiceWorker.enable", - "command", - ), - setForceUpdateOnPageLoad: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.setForceUpdateOnPageLoad"].result.parse( - await send( - "ServiceWorker.setForceUpdateOnPageLoad", - commands["ServiceWorker.setForceUpdateOnPageLoad"].params.parse(params ?? {}), - ), - ), - "ServiceWorker.setForceUpdateOnPageLoad", - "command", - ), - skipWaiting: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.skipWaiting"].result.parse( - await send("ServiceWorker.skipWaiting", commands["ServiceWorker.skipWaiting"].params.parse(params ?? {})), - ), - "ServiceWorker.skipWaiting", - "command", - ), - startWorker: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.startWorker"].result.parse( - await send("ServiceWorker.startWorker", commands["ServiceWorker.startWorker"].params.parse(params ?? {})), - ), - "ServiceWorker.startWorker", - "command", - ), - stopAllWorkers: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.stopAllWorkers"].result.parse( - await send( - "ServiceWorker.stopAllWorkers", - commands["ServiceWorker.stopAllWorkers"].params.parse(params ?? {}), - ), - ), - "ServiceWorker.stopAllWorkers", - "command", - ), - stopWorker: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.stopWorker"].result.parse( - await send("ServiceWorker.stopWorker", commands["ServiceWorker.stopWorker"].params.parse(params ?? {})), - ), - "ServiceWorker.stopWorker", - "command", - ), - unregister: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.unregister"].result.parse( - await send("ServiceWorker.unregister", commands["ServiceWorker.unregister"].params.parse(params ?? {})), - ), - "ServiceWorker.unregister", - "command", - ), - updateRegistration: withCdpName( - async (params?: unknown) => - commands["ServiceWorker.updateRegistration"].result.parse( - await send( - "ServiceWorker.updateRegistration", - commands["ServiceWorker.updateRegistration"].params.parse(params ?? {}), - ), - ), - "ServiceWorker.updateRegistration", - "command", - ), - workerErrorReported: events["ServiceWorker.workerErrorReported"] as CdpEventAlias< - cdp.types.ts.ServiceWorker.WorkerErrorReportedEvent, - "ServiceWorker.workerErrorReported" - >, - workerRegistrationUpdated: events["ServiceWorker.workerRegistrationUpdated"] as CdpEventAlias< - cdp.types.ts.ServiceWorker.WorkerRegistrationUpdatedEvent, - "ServiceWorker.workerRegistrationUpdated" - >, - workerVersionUpdated: events["ServiceWorker.workerVersionUpdated"] as CdpEventAlias< - cdp.types.ts.ServiceWorker.WorkerVersionUpdatedEvent, - "ServiceWorker.workerVersionUpdated" - >, + deliverPushMessage: withCdpName(async (params?: unknown) => commands["ServiceWorker.deliverPushMessage"].result.parse(await send("ServiceWorker.deliverPushMessage", commands["ServiceWorker.deliverPushMessage"].params.parse(params ?? {}))), "ServiceWorker.deliverPushMessage", "command"), + disable: withCdpName(async (params?: unknown) => commands["ServiceWorker.disable"].result.parse(await send("ServiceWorker.disable", commands["ServiceWorker.disable"].params.parse(params ?? {}))), "ServiceWorker.disable", "command"), + dispatchSyncEvent: withCdpName(async (params?: unknown) => commands["ServiceWorker.dispatchSyncEvent"].result.parse(await send("ServiceWorker.dispatchSyncEvent", commands["ServiceWorker.dispatchSyncEvent"].params.parse(params ?? {}))), "ServiceWorker.dispatchSyncEvent", "command"), + dispatchPeriodicSyncEvent: withCdpName(async (params?: unknown) => commands["ServiceWorker.dispatchPeriodicSyncEvent"].result.parse(await send("ServiceWorker.dispatchPeriodicSyncEvent", commands["ServiceWorker.dispatchPeriodicSyncEvent"].params.parse(params ?? {}))), "ServiceWorker.dispatchPeriodicSyncEvent", "command"), + enable: withCdpName(async (params?: unknown) => commands["ServiceWorker.enable"].result.parse(await send("ServiceWorker.enable", commands["ServiceWorker.enable"].params.parse(params ?? {}))), "ServiceWorker.enable", "command"), + setForceUpdateOnPageLoad: withCdpName(async (params?: unknown) => commands["ServiceWorker.setForceUpdateOnPageLoad"].result.parse(await send("ServiceWorker.setForceUpdateOnPageLoad", commands["ServiceWorker.setForceUpdateOnPageLoad"].params.parse(params ?? {}))), "ServiceWorker.setForceUpdateOnPageLoad", "command"), + skipWaiting: withCdpName(async (params?: unknown) => commands["ServiceWorker.skipWaiting"].result.parse(await send("ServiceWorker.skipWaiting", commands["ServiceWorker.skipWaiting"].params.parse(params ?? {}))), "ServiceWorker.skipWaiting", "command"), + startWorker: withCdpName(async (params?: unknown) => commands["ServiceWorker.startWorker"].result.parse(await send("ServiceWorker.startWorker", commands["ServiceWorker.startWorker"].params.parse(params ?? {}))), "ServiceWorker.startWorker", "command"), + stopAllWorkers: withCdpName(async (params?: unknown) => commands["ServiceWorker.stopAllWorkers"].result.parse(await send("ServiceWorker.stopAllWorkers", commands["ServiceWorker.stopAllWorkers"].params.parse(params ?? {}))), "ServiceWorker.stopAllWorkers", "command"), + stopWorker: withCdpName(async (params?: unknown) => commands["ServiceWorker.stopWorker"].result.parse(await send("ServiceWorker.stopWorker", commands["ServiceWorker.stopWorker"].params.parse(params ?? {}))), "ServiceWorker.stopWorker", "command"), + unregister: withCdpName(async (params?: unknown) => commands["ServiceWorker.unregister"].result.parse(await send("ServiceWorker.unregister", commands["ServiceWorker.unregister"].params.parse(params ?? {}))), "ServiceWorker.unregister", "command"), + updateRegistration: withCdpName(async (params?: unknown) => commands["ServiceWorker.updateRegistration"].result.parse(await send("ServiceWorker.updateRegistration", commands["ServiceWorker.updateRegistration"].params.parse(params ?? {}))), "ServiceWorker.updateRegistration", "command"), + workerErrorReported: events["ServiceWorker.workerErrorReported"] as CdpEventAlias, + workerRegistrationUpdated: events["ServiceWorker.workerRegistrationUpdated"] as CdpEventAlias, + workerVersionUpdated: events["ServiceWorker.workerVersionUpdated"] as CdpEventAlias, }, SmartCardEmulation: { - enable: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.enable"].result.parse( - await send("SmartCardEmulation.enable", commands["SmartCardEmulation.enable"].params.parse(params ?? {})), - ), - "SmartCardEmulation.enable", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.disable"].result.parse( - await send("SmartCardEmulation.disable", commands["SmartCardEmulation.disable"].params.parse(params ?? {})), - ), - "SmartCardEmulation.disable", - "command", - ), - reportEstablishContextResult: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.reportEstablishContextResult"].result.parse( - await send( - "SmartCardEmulation.reportEstablishContextResult", - commands["SmartCardEmulation.reportEstablishContextResult"].params.parse(params ?? {}), - ), - ), - "SmartCardEmulation.reportEstablishContextResult", - "command", - ), - reportReleaseContextResult: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.reportReleaseContextResult"].result.parse( - await send( - "SmartCardEmulation.reportReleaseContextResult", - commands["SmartCardEmulation.reportReleaseContextResult"].params.parse(params ?? {}), - ), - ), - "SmartCardEmulation.reportReleaseContextResult", - "command", - ), - reportListReadersResult: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.reportListReadersResult"].result.parse( - await send( - "SmartCardEmulation.reportListReadersResult", - commands["SmartCardEmulation.reportListReadersResult"].params.parse(params ?? {}), - ), - ), - "SmartCardEmulation.reportListReadersResult", - "command", - ), - reportGetStatusChangeResult: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.reportGetStatusChangeResult"].result.parse( - await send( - "SmartCardEmulation.reportGetStatusChangeResult", - commands["SmartCardEmulation.reportGetStatusChangeResult"].params.parse(params ?? {}), - ), - ), - "SmartCardEmulation.reportGetStatusChangeResult", - "command", - ), - reportBeginTransactionResult: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.reportBeginTransactionResult"].result.parse( - await send( - "SmartCardEmulation.reportBeginTransactionResult", - commands["SmartCardEmulation.reportBeginTransactionResult"].params.parse(params ?? {}), - ), - ), - "SmartCardEmulation.reportBeginTransactionResult", - "command", - ), - reportPlainResult: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.reportPlainResult"].result.parse( - await send( - "SmartCardEmulation.reportPlainResult", - commands["SmartCardEmulation.reportPlainResult"].params.parse(params ?? {}), - ), - ), - "SmartCardEmulation.reportPlainResult", - "command", - ), - reportConnectResult: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.reportConnectResult"].result.parse( - await send( - "SmartCardEmulation.reportConnectResult", - commands["SmartCardEmulation.reportConnectResult"].params.parse(params ?? {}), - ), - ), - "SmartCardEmulation.reportConnectResult", - "command", - ), - reportDataResult: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.reportDataResult"].result.parse( - await send( - "SmartCardEmulation.reportDataResult", - commands["SmartCardEmulation.reportDataResult"].params.parse(params ?? {}), - ), - ), - "SmartCardEmulation.reportDataResult", - "command", - ), - reportStatusResult: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.reportStatusResult"].result.parse( - await send( - "SmartCardEmulation.reportStatusResult", - commands["SmartCardEmulation.reportStatusResult"].params.parse(params ?? {}), - ), - ), - "SmartCardEmulation.reportStatusResult", - "command", - ), - reportError: withCdpName( - async (params?: unknown) => - commands["SmartCardEmulation.reportError"].result.parse( - await send( - "SmartCardEmulation.reportError", - commands["SmartCardEmulation.reportError"].params.parse(params ?? {}), - ), - ), - "SmartCardEmulation.reportError", - "command", - ), - establishContextRequested: events["SmartCardEmulation.establishContextRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.EstablishContextRequestedEvent, - "SmartCardEmulation.establishContextRequested" - >, - releaseContextRequested: events["SmartCardEmulation.releaseContextRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.ReleaseContextRequestedEvent, - "SmartCardEmulation.releaseContextRequested" - >, - listReadersRequested: events["SmartCardEmulation.listReadersRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.ListReadersRequestedEvent, - "SmartCardEmulation.listReadersRequested" - >, - getStatusChangeRequested: events["SmartCardEmulation.getStatusChangeRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.GetStatusChangeRequestedEvent, - "SmartCardEmulation.getStatusChangeRequested" - >, - cancelRequested: events["SmartCardEmulation.cancelRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.CancelRequestedEvent, - "SmartCardEmulation.cancelRequested" - >, - connectRequested: events["SmartCardEmulation.connectRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.ConnectRequestedEvent, - "SmartCardEmulation.connectRequested" - >, - disconnectRequested: events["SmartCardEmulation.disconnectRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.DisconnectRequestedEvent, - "SmartCardEmulation.disconnectRequested" - >, - transmitRequested: events["SmartCardEmulation.transmitRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.TransmitRequestedEvent, - "SmartCardEmulation.transmitRequested" - >, - controlRequested: events["SmartCardEmulation.controlRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.ControlRequestedEvent, - "SmartCardEmulation.controlRequested" - >, - getAttribRequested: events["SmartCardEmulation.getAttribRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.GetAttribRequestedEvent, - "SmartCardEmulation.getAttribRequested" - >, - setAttribRequested: events["SmartCardEmulation.setAttribRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.SetAttribRequestedEvent, - "SmartCardEmulation.setAttribRequested" - >, - statusRequested: events["SmartCardEmulation.statusRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.StatusRequestedEvent, - "SmartCardEmulation.statusRequested" - >, - beginTransactionRequested: events["SmartCardEmulation.beginTransactionRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.BeginTransactionRequestedEvent, - "SmartCardEmulation.beginTransactionRequested" - >, - endTransactionRequested: events["SmartCardEmulation.endTransactionRequested"] as CdpEventAlias< - cdp.types.ts.SmartCardEmulation.EndTransactionRequestedEvent, - "SmartCardEmulation.endTransactionRequested" - >, + enable: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.enable"].result.parse(await send("SmartCardEmulation.enable", commands["SmartCardEmulation.enable"].params.parse(params ?? {}))), "SmartCardEmulation.enable", "command"), + disable: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.disable"].result.parse(await send("SmartCardEmulation.disable", commands["SmartCardEmulation.disable"].params.parse(params ?? {}))), "SmartCardEmulation.disable", "command"), + reportEstablishContextResult: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.reportEstablishContextResult"].result.parse(await send("SmartCardEmulation.reportEstablishContextResult", commands["SmartCardEmulation.reportEstablishContextResult"].params.parse(params ?? {}))), "SmartCardEmulation.reportEstablishContextResult", "command"), + reportReleaseContextResult: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.reportReleaseContextResult"].result.parse(await send("SmartCardEmulation.reportReleaseContextResult", commands["SmartCardEmulation.reportReleaseContextResult"].params.parse(params ?? {}))), "SmartCardEmulation.reportReleaseContextResult", "command"), + reportListReadersResult: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.reportListReadersResult"].result.parse(await send("SmartCardEmulation.reportListReadersResult", commands["SmartCardEmulation.reportListReadersResult"].params.parse(params ?? {}))), "SmartCardEmulation.reportListReadersResult", "command"), + reportGetStatusChangeResult: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.reportGetStatusChangeResult"].result.parse(await send("SmartCardEmulation.reportGetStatusChangeResult", commands["SmartCardEmulation.reportGetStatusChangeResult"].params.parse(params ?? {}))), "SmartCardEmulation.reportGetStatusChangeResult", "command"), + reportBeginTransactionResult: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.reportBeginTransactionResult"].result.parse(await send("SmartCardEmulation.reportBeginTransactionResult", commands["SmartCardEmulation.reportBeginTransactionResult"].params.parse(params ?? {}))), "SmartCardEmulation.reportBeginTransactionResult", "command"), + reportPlainResult: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.reportPlainResult"].result.parse(await send("SmartCardEmulation.reportPlainResult", commands["SmartCardEmulation.reportPlainResult"].params.parse(params ?? {}))), "SmartCardEmulation.reportPlainResult", "command"), + reportConnectResult: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.reportConnectResult"].result.parse(await send("SmartCardEmulation.reportConnectResult", commands["SmartCardEmulation.reportConnectResult"].params.parse(params ?? {}))), "SmartCardEmulation.reportConnectResult", "command"), + reportDataResult: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.reportDataResult"].result.parse(await send("SmartCardEmulation.reportDataResult", commands["SmartCardEmulation.reportDataResult"].params.parse(params ?? {}))), "SmartCardEmulation.reportDataResult", "command"), + reportStatusResult: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.reportStatusResult"].result.parse(await send("SmartCardEmulation.reportStatusResult", commands["SmartCardEmulation.reportStatusResult"].params.parse(params ?? {}))), "SmartCardEmulation.reportStatusResult", "command"), + reportError: withCdpName(async (params?: unknown) => commands["SmartCardEmulation.reportError"].result.parse(await send("SmartCardEmulation.reportError", commands["SmartCardEmulation.reportError"].params.parse(params ?? {}))), "SmartCardEmulation.reportError", "command"), + establishContextRequested: events["SmartCardEmulation.establishContextRequested"] as CdpEventAlias, + releaseContextRequested: events["SmartCardEmulation.releaseContextRequested"] as CdpEventAlias, + listReadersRequested: events["SmartCardEmulation.listReadersRequested"] as CdpEventAlias, + getStatusChangeRequested: events["SmartCardEmulation.getStatusChangeRequested"] as CdpEventAlias, + cancelRequested: events["SmartCardEmulation.cancelRequested"] as CdpEventAlias, + connectRequested: events["SmartCardEmulation.connectRequested"] as CdpEventAlias, + disconnectRequested: events["SmartCardEmulation.disconnectRequested"] as CdpEventAlias, + transmitRequested: events["SmartCardEmulation.transmitRequested"] as CdpEventAlias, + controlRequested: events["SmartCardEmulation.controlRequested"] as CdpEventAlias, + getAttribRequested: events["SmartCardEmulation.getAttribRequested"] as CdpEventAlias, + setAttribRequested: events["SmartCardEmulation.setAttribRequested"] as CdpEventAlias, + statusRequested: events["SmartCardEmulation.statusRequested"] as CdpEventAlias, + beginTransactionRequested: events["SmartCardEmulation.beginTransactionRequested"] as CdpEventAlias, + endTransactionRequested: events["SmartCardEmulation.endTransactionRequested"] as CdpEventAlias, }, Storage: { - getStorageKeyForFrame: withCdpName( - async (params?: unknown) => - commands["Storage.getStorageKeyForFrame"].result.parse( - await send( - "Storage.getStorageKeyForFrame", - commands["Storage.getStorageKeyForFrame"].params.parse(params ?? {}), - ), - ), - "Storage.getStorageKeyForFrame", - "command", - ), - getStorageKey: withCdpName( - async (params?: unknown) => - commands["Storage.getStorageKey"].result.parse( - await send("Storage.getStorageKey", commands["Storage.getStorageKey"].params.parse(params ?? {})), - ), - "Storage.getStorageKey", - "command", - ), - clearDataForOrigin: withCdpName( - async (params?: unknown) => - commands["Storage.clearDataForOrigin"].result.parse( - await send("Storage.clearDataForOrigin", commands["Storage.clearDataForOrigin"].params.parse(params ?? {})), - ), - "Storage.clearDataForOrigin", - "command", - ), - clearDataForStorageKey: withCdpName( - async (params?: unknown) => - commands["Storage.clearDataForStorageKey"].result.parse( - await send( - "Storage.clearDataForStorageKey", - commands["Storage.clearDataForStorageKey"].params.parse(params ?? {}), - ), - ), - "Storage.clearDataForStorageKey", - "command", - ), - getCookies: withCdpName( - async (params?: unknown) => - commands["Storage.getCookies"].result.parse( - await send("Storage.getCookies", commands["Storage.getCookies"].params.parse(params ?? {})), - ), - "Storage.getCookies", - "command", - ), - setCookies: withCdpName( - async (params?: unknown) => - commands["Storage.setCookies"].result.parse( - await send("Storage.setCookies", commands["Storage.setCookies"].params.parse(params ?? {})), - ), - "Storage.setCookies", - "command", - ), - clearCookies: withCdpName( - async (params?: unknown) => - commands["Storage.clearCookies"].result.parse( - await send("Storage.clearCookies", commands["Storage.clearCookies"].params.parse(params ?? {})), - ), - "Storage.clearCookies", - "command", - ), - getUsageAndQuota: withCdpName( - async (params?: unknown) => - commands["Storage.getUsageAndQuota"].result.parse( - await send("Storage.getUsageAndQuota", commands["Storage.getUsageAndQuota"].params.parse(params ?? {})), - ), - "Storage.getUsageAndQuota", - "command", - ), - overrideQuotaForOrigin: withCdpName( - async (params?: unknown) => - commands["Storage.overrideQuotaForOrigin"].result.parse( - await send( - "Storage.overrideQuotaForOrigin", - commands["Storage.overrideQuotaForOrigin"].params.parse(params ?? {}), - ), - ), - "Storage.overrideQuotaForOrigin", - "command", - ), - trackCacheStorageForOrigin: withCdpName( - async (params?: unknown) => - commands["Storage.trackCacheStorageForOrigin"].result.parse( - await send( - "Storage.trackCacheStorageForOrigin", - commands["Storage.trackCacheStorageForOrigin"].params.parse(params ?? {}), - ), - ), - "Storage.trackCacheStorageForOrigin", - "command", - ), - trackCacheStorageForStorageKey: withCdpName( - async (params?: unknown) => - commands["Storage.trackCacheStorageForStorageKey"].result.parse( - await send( - "Storage.trackCacheStorageForStorageKey", - commands["Storage.trackCacheStorageForStorageKey"].params.parse(params ?? {}), - ), - ), - "Storage.trackCacheStorageForStorageKey", - "command", - ), - trackIndexedDBForOrigin: withCdpName( - async (params?: unknown) => - commands["Storage.trackIndexedDBForOrigin"].result.parse( - await send( - "Storage.trackIndexedDBForOrigin", - commands["Storage.trackIndexedDBForOrigin"].params.parse(params ?? {}), - ), - ), - "Storage.trackIndexedDBForOrigin", - "command", - ), - trackIndexedDBForStorageKey: withCdpName( - async (params?: unknown) => - commands["Storage.trackIndexedDBForStorageKey"].result.parse( - await send( - "Storage.trackIndexedDBForStorageKey", - commands["Storage.trackIndexedDBForStorageKey"].params.parse(params ?? {}), - ), - ), - "Storage.trackIndexedDBForStorageKey", - "command", - ), - untrackCacheStorageForOrigin: withCdpName( - async (params?: unknown) => - commands["Storage.untrackCacheStorageForOrigin"].result.parse( - await send( - "Storage.untrackCacheStorageForOrigin", - commands["Storage.untrackCacheStorageForOrigin"].params.parse(params ?? {}), - ), - ), - "Storage.untrackCacheStorageForOrigin", - "command", - ), - untrackCacheStorageForStorageKey: withCdpName( - async (params?: unknown) => - commands["Storage.untrackCacheStorageForStorageKey"].result.parse( - await send( - "Storage.untrackCacheStorageForStorageKey", - commands["Storage.untrackCacheStorageForStorageKey"].params.parse(params ?? {}), - ), - ), - "Storage.untrackCacheStorageForStorageKey", - "command", - ), - untrackIndexedDBForOrigin: withCdpName( - async (params?: unknown) => - commands["Storage.untrackIndexedDBForOrigin"].result.parse( - await send( - "Storage.untrackIndexedDBForOrigin", - commands["Storage.untrackIndexedDBForOrigin"].params.parse(params ?? {}), - ), - ), - "Storage.untrackIndexedDBForOrigin", - "command", - ), - untrackIndexedDBForStorageKey: withCdpName( - async (params?: unknown) => - commands["Storage.untrackIndexedDBForStorageKey"].result.parse( - await send( - "Storage.untrackIndexedDBForStorageKey", - commands["Storage.untrackIndexedDBForStorageKey"].params.parse(params ?? {}), - ), - ), - "Storage.untrackIndexedDBForStorageKey", - "command", - ), - getTrustTokens: withCdpName( - async (params?: unknown) => - commands["Storage.getTrustTokens"].result.parse( - await send("Storage.getTrustTokens", commands["Storage.getTrustTokens"].params.parse(params ?? {})), - ), - "Storage.getTrustTokens", - "command", - ), - clearTrustTokens: withCdpName( - async (params?: unknown) => - commands["Storage.clearTrustTokens"].result.parse( - await send("Storage.clearTrustTokens", commands["Storage.clearTrustTokens"].params.parse(params ?? {})), - ), - "Storage.clearTrustTokens", - "command", - ), - getInterestGroupDetails: withCdpName( - async (params?: unknown) => - commands["Storage.getInterestGroupDetails"].result.parse( - await send( - "Storage.getInterestGroupDetails", - commands["Storage.getInterestGroupDetails"].params.parse(params ?? {}), - ), - ), - "Storage.getInterestGroupDetails", - "command", - ), - setInterestGroupTracking: withCdpName( - async (params?: unknown) => - commands["Storage.setInterestGroupTracking"].result.parse( - await send( - "Storage.setInterestGroupTracking", - commands["Storage.setInterestGroupTracking"].params.parse(params ?? {}), - ), - ), - "Storage.setInterestGroupTracking", - "command", - ), - setInterestGroupAuctionTracking: withCdpName( - async (params?: unknown) => - commands["Storage.setInterestGroupAuctionTracking"].result.parse( - await send( - "Storage.setInterestGroupAuctionTracking", - commands["Storage.setInterestGroupAuctionTracking"].params.parse(params ?? {}), - ), - ), - "Storage.setInterestGroupAuctionTracking", - "command", - ), - getSharedStorageMetadata: withCdpName( - async (params?: unknown) => - commands["Storage.getSharedStorageMetadata"].result.parse( - await send( - "Storage.getSharedStorageMetadata", - commands["Storage.getSharedStorageMetadata"].params.parse(params ?? {}), - ), - ), - "Storage.getSharedStorageMetadata", - "command", - ), - getSharedStorageEntries: withCdpName( - async (params?: unknown) => - commands["Storage.getSharedStorageEntries"].result.parse( - await send( - "Storage.getSharedStorageEntries", - commands["Storage.getSharedStorageEntries"].params.parse(params ?? {}), - ), - ), - "Storage.getSharedStorageEntries", - "command", - ), - setSharedStorageEntry: withCdpName( - async (params?: unknown) => - commands["Storage.setSharedStorageEntry"].result.parse( - await send( - "Storage.setSharedStorageEntry", - commands["Storage.setSharedStorageEntry"].params.parse(params ?? {}), - ), - ), - "Storage.setSharedStorageEntry", - "command", - ), - deleteSharedStorageEntry: withCdpName( - async (params?: unknown) => - commands["Storage.deleteSharedStorageEntry"].result.parse( - await send( - "Storage.deleteSharedStorageEntry", - commands["Storage.deleteSharedStorageEntry"].params.parse(params ?? {}), - ), - ), - "Storage.deleteSharedStorageEntry", - "command", - ), - clearSharedStorageEntries: withCdpName( - async (params?: unknown) => - commands["Storage.clearSharedStorageEntries"].result.parse( - await send( - "Storage.clearSharedStorageEntries", - commands["Storage.clearSharedStorageEntries"].params.parse(params ?? {}), - ), - ), - "Storage.clearSharedStorageEntries", - "command", - ), - resetSharedStorageBudget: withCdpName( - async (params?: unknown) => - commands["Storage.resetSharedStorageBudget"].result.parse( - await send( - "Storage.resetSharedStorageBudget", - commands["Storage.resetSharedStorageBudget"].params.parse(params ?? {}), - ), - ), - "Storage.resetSharedStorageBudget", - "command", - ), - setSharedStorageTracking: withCdpName( - async (params?: unknown) => - commands["Storage.setSharedStorageTracking"].result.parse( - await send( - "Storage.setSharedStorageTracking", - commands["Storage.setSharedStorageTracking"].params.parse(params ?? {}), - ), - ), - "Storage.setSharedStorageTracking", - "command", - ), - setStorageBucketTracking: withCdpName( - async (params?: unknown) => - commands["Storage.setStorageBucketTracking"].result.parse( - await send( - "Storage.setStorageBucketTracking", - commands["Storage.setStorageBucketTracking"].params.parse(params ?? {}), - ), - ), - "Storage.setStorageBucketTracking", - "command", - ), - deleteStorageBucket: withCdpName( - async (params?: unknown) => - commands["Storage.deleteStorageBucket"].result.parse( - await send( - "Storage.deleteStorageBucket", - commands["Storage.deleteStorageBucket"].params.parse(params ?? {}), - ), - ), - "Storage.deleteStorageBucket", - "command", - ), - runBounceTrackingMitigations: withCdpName( - async (params?: unknown) => - commands["Storage.runBounceTrackingMitigations"].result.parse( - await send( - "Storage.runBounceTrackingMitigations", - commands["Storage.runBounceTrackingMitigations"].params.parse(params ?? {}), - ), - ), - "Storage.runBounceTrackingMitigations", - "command", - ), - getRelatedWebsiteSets: withCdpName( - async (params?: unknown) => - commands["Storage.getRelatedWebsiteSets"].result.parse( - await send( - "Storage.getRelatedWebsiteSets", - commands["Storage.getRelatedWebsiteSets"].params.parse(params ?? {}), - ), - ), - "Storage.getRelatedWebsiteSets", - "command", - ), - setProtectedAudienceKAnonymity: withCdpName( - async (params?: unknown) => - commands["Storage.setProtectedAudienceKAnonymity"].result.parse( - await send( - "Storage.setProtectedAudienceKAnonymity", - commands["Storage.setProtectedAudienceKAnonymity"].params.parse(params ?? {}), - ), - ), - "Storage.setProtectedAudienceKAnonymity", - "command", - ), - cacheStorageContentUpdated: events["Storage.cacheStorageContentUpdated"] as CdpEventAlias< - cdp.types.ts.Storage.CacheStorageContentUpdatedEvent, - "Storage.cacheStorageContentUpdated" - >, - cacheStorageListUpdated: events["Storage.cacheStorageListUpdated"] as CdpEventAlias< - cdp.types.ts.Storage.CacheStorageListUpdatedEvent, - "Storage.cacheStorageListUpdated" - >, - indexedDBContentUpdated: events["Storage.indexedDBContentUpdated"] as CdpEventAlias< - cdp.types.ts.Storage.IndexedDBContentUpdatedEvent, - "Storage.indexedDBContentUpdated" - >, - indexedDBListUpdated: events["Storage.indexedDBListUpdated"] as CdpEventAlias< - cdp.types.ts.Storage.IndexedDBListUpdatedEvent, - "Storage.indexedDBListUpdated" - >, - interestGroupAccessed: events["Storage.interestGroupAccessed"] as CdpEventAlias< - cdp.types.ts.Storage.InterestGroupAccessedEvent, - "Storage.interestGroupAccessed" - >, - interestGroupAuctionEventOccurred: events["Storage.interestGroupAuctionEventOccurred"] as CdpEventAlias< - cdp.types.ts.Storage.InterestGroupAuctionEventOccurredEvent, - "Storage.interestGroupAuctionEventOccurred" - >, - interestGroupAuctionNetworkRequestCreated: events[ - "Storage.interestGroupAuctionNetworkRequestCreated" - ] as CdpEventAlias< - cdp.types.ts.Storage.InterestGroupAuctionNetworkRequestCreatedEvent, - "Storage.interestGroupAuctionNetworkRequestCreated" - >, - sharedStorageAccessed: events["Storage.sharedStorageAccessed"] as CdpEventAlias< - cdp.types.ts.Storage.SharedStorageAccessedEvent, - "Storage.sharedStorageAccessed" - >, - sharedStorageWorkletOperationExecutionFinished: events[ - "Storage.sharedStorageWorkletOperationExecutionFinished" - ] as CdpEventAlias< - cdp.types.ts.Storage.SharedStorageWorkletOperationExecutionFinishedEvent, - "Storage.sharedStorageWorkletOperationExecutionFinished" - >, - storageBucketCreatedOrUpdated: events["Storage.storageBucketCreatedOrUpdated"] as CdpEventAlias< - cdp.types.ts.Storage.StorageBucketCreatedOrUpdatedEvent, - "Storage.storageBucketCreatedOrUpdated" - >, - storageBucketDeleted: events["Storage.storageBucketDeleted"] as CdpEventAlias< - cdp.types.ts.Storage.StorageBucketDeletedEvent, - "Storage.storageBucketDeleted" - >, + getStorageKeyForFrame: withCdpName(async (params?: unknown) => commands["Storage.getStorageKeyForFrame"].result.parse(await send("Storage.getStorageKeyForFrame", commands["Storage.getStorageKeyForFrame"].params.parse(params ?? {}))), "Storage.getStorageKeyForFrame", "command"), + getStorageKey: withCdpName(async (params?: unknown) => commands["Storage.getStorageKey"].result.parse(await send("Storage.getStorageKey", commands["Storage.getStorageKey"].params.parse(params ?? {}))), "Storage.getStorageKey", "command"), + clearDataForOrigin: withCdpName(async (params?: unknown) => commands["Storage.clearDataForOrigin"].result.parse(await send("Storage.clearDataForOrigin", commands["Storage.clearDataForOrigin"].params.parse(params ?? {}))), "Storage.clearDataForOrigin", "command"), + clearDataForStorageKey: withCdpName(async (params?: unknown) => commands["Storage.clearDataForStorageKey"].result.parse(await send("Storage.clearDataForStorageKey", commands["Storage.clearDataForStorageKey"].params.parse(params ?? {}))), "Storage.clearDataForStorageKey", "command"), + getCookies: withCdpName(async (params?: unknown) => commands["Storage.getCookies"].result.parse(await send("Storage.getCookies", commands["Storage.getCookies"].params.parse(params ?? {}))), "Storage.getCookies", "command"), + setCookies: withCdpName(async (params?: unknown) => commands["Storage.setCookies"].result.parse(await send("Storage.setCookies", commands["Storage.setCookies"].params.parse(params ?? {}))), "Storage.setCookies", "command"), + clearCookies: withCdpName(async (params?: unknown) => commands["Storage.clearCookies"].result.parse(await send("Storage.clearCookies", commands["Storage.clearCookies"].params.parse(params ?? {}))), "Storage.clearCookies", "command"), + getUsageAndQuota: withCdpName(async (params?: unknown) => commands["Storage.getUsageAndQuota"].result.parse(await send("Storage.getUsageAndQuota", commands["Storage.getUsageAndQuota"].params.parse(params ?? {}))), "Storage.getUsageAndQuota", "command"), + overrideQuotaForOrigin: withCdpName(async (params?: unknown) => commands["Storage.overrideQuotaForOrigin"].result.parse(await send("Storage.overrideQuotaForOrigin", commands["Storage.overrideQuotaForOrigin"].params.parse(params ?? {}))), "Storage.overrideQuotaForOrigin", "command"), + trackCacheStorageForOrigin: withCdpName(async (params?: unknown) => commands["Storage.trackCacheStorageForOrigin"].result.parse(await send("Storage.trackCacheStorageForOrigin", commands["Storage.trackCacheStorageForOrigin"].params.parse(params ?? {}))), "Storage.trackCacheStorageForOrigin", "command"), + trackCacheStorageForStorageKey: withCdpName(async (params?: unknown) => commands["Storage.trackCacheStorageForStorageKey"].result.parse(await send("Storage.trackCacheStorageForStorageKey", commands["Storage.trackCacheStorageForStorageKey"].params.parse(params ?? {}))), "Storage.trackCacheStorageForStorageKey", "command"), + trackIndexedDBForOrigin: withCdpName(async (params?: unknown) => commands["Storage.trackIndexedDBForOrigin"].result.parse(await send("Storage.trackIndexedDBForOrigin", commands["Storage.trackIndexedDBForOrigin"].params.parse(params ?? {}))), "Storage.trackIndexedDBForOrigin", "command"), + trackIndexedDBForStorageKey: withCdpName(async (params?: unknown) => commands["Storage.trackIndexedDBForStorageKey"].result.parse(await send("Storage.trackIndexedDBForStorageKey", commands["Storage.trackIndexedDBForStorageKey"].params.parse(params ?? {}))), "Storage.trackIndexedDBForStorageKey", "command"), + untrackCacheStorageForOrigin: withCdpName(async (params?: unknown) => commands["Storage.untrackCacheStorageForOrigin"].result.parse(await send("Storage.untrackCacheStorageForOrigin", commands["Storage.untrackCacheStorageForOrigin"].params.parse(params ?? {}))), "Storage.untrackCacheStorageForOrigin", "command"), + untrackCacheStorageForStorageKey: withCdpName(async (params?: unknown) => commands["Storage.untrackCacheStorageForStorageKey"].result.parse(await send("Storage.untrackCacheStorageForStorageKey", commands["Storage.untrackCacheStorageForStorageKey"].params.parse(params ?? {}))), "Storage.untrackCacheStorageForStorageKey", "command"), + untrackIndexedDBForOrigin: withCdpName(async (params?: unknown) => commands["Storage.untrackIndexedDBForOrigin"].result.parse(await send("Storage.untrackIndexedDBForOrigin", commands["Storage.untrackIndexedDBForOrigin"].params.parse(params ?? {}))), "Storage.untrackIndexedDBForOrigin", "command"), + untrackIndexedDBForStorageKey: withCdpName(async (params?: unknown) => commands["Storage.untrackIndexedDBForStorageKey"].result.parse(await send("Storage.untrackIndexedDBForStorageKey", commands["Storage.untrackIndexedDBForStorageKey"].params.parse(params ?? {}))), "Storage.untrackIndexedDBForStorageKey", "command"), + getTrustTokens: withCdpName(async (params?: unknown) => commands["Storage.getTrustTokens"].result.parse(await send("Storage.getTrustTokens", commands["Storage.getTrustTokens"].params.parse(params ?? {}))), "Storage.getTrustTokens", "command"), + clearTrustTokens: withCdpName(async (params?: unknown) => commands["Storage.clearTrustTokens"].result.parse(await send("Storage.clearTrustTokens", commands["Storage.clearTrustTokens"].params.parse(params ?? {}))), "Storage.clearTrustTokens", "command"), + getInterestGroupDetails: withCdpName(async (params?: unknown) => commands["Storage.getInterestGroupDetails"].result.parse(await send("Storage.getInterestGroupDetails", commands["Storage.getInterestGroupDetails"].params.parse(params ?? {}))), "Storage.getInterestGroupDetails", "command"), + setInterestGroupTracking: withCdpName(async (params?: unknown) => commands["Storage.setInterestGroupTracking"].result.parse(await send("Storage.setInterestGroupTracking", commands["Storage.setInterestGroupTracking"].params.parse(params ?? {}))), "Storage.setInterestGroupTracking", "command"), + setInterestGroupAuctionTracking: withCdpName(async (params?: unknown) => commands["Storage.setInterestGroupAuctionTracking"].result.parse(await send("Storage.setInterestGroupAuctionTracking", commands["Storage.setInterestGroupAuctionTracking"].params.parse(params ?? {}))), "Storage.setInterestGroupAuctionTracking", "command"), + getSharedStorageMetadata: withCdpName(async (params?: unknown) => commands["Storage.getSharedStorageMetadata"].result.parse(await send("Storage.getSharedStorageMetadata", commands["Storage.getSharedStorageMetadata"].params.parse(params ?? {}))), "Storage.getSharedStorageMetadata", "command"), + getSharedStorageEntries: withCdpName(async (params?: unknown) => commands["Storage.getSharedStorageEntries"].result.parse(await send("Storage.getSharedStorageEntries", commands["Storage.getSharedStorageEntries"].params.parse(params ?? {}))), "Storage.getSharedStorageEntries", "command"), + setSharedStorageEntry: withCdpName(async (params?: unknown) => commands["Storage.setSharedStorageEntry"].result.parse(await send("Storage.setSharedStorageEntry", commands["Storage.setSharedStorageEntry"].params.parse(params ?? {}))), "Storage.setSharedStorageEntry", "command"), + deleteSharedStorageEntry: withCdpName(async (params?: unknown) => commands["Storage.deleteSharedStorageEntry"].result.parse(await send("Storage.deleteSharedStorageEntry", commands["Storage.deleteSharedStorageEntry"].params.parse(params ?? {}))), "Storage.deleteSharedStorageEntry", "command"), + clearSharedStorageEntries: withCdpName(async (params?: unknown) => commands["Storage.clearSharedStorageEntries"].result.parse(await send("Storage.clearSharedStorageEntries", commands["Storage.clearSharedStorageEntries"].params.parse(params ?? {}))), "Storage.clearSharedStorageEntries", "command"), + resetSharedStorageBudget: withCdpName(async (params?: unknown) => commands["Storage.resetSharedStorageBudget"].result.parse(await send("Storage.resetSharedStorageBudget", commands["Storage.resetSharedStorageBudget"].params.parse(params ?? {}))), "Storage.resetSharedStorageBudget", "command"), + setSharedStorageTracking: withCdpName(async (params?: unknown) => commands["Storage.setSharedStorageTracking"].result.parse(await send("Storage.setSharedStorageTracking", commands["Storage.setSharedStorageTracking"].params.parse(params ?? {}))), "Storage.setSharedStorageTracking", "command"), + setStorageBucketTracking: withCdpName(async (params?: unknown) => commands["Storage.setStorageBucketTracking"].result.parse(await send("Storage.setStorageBucketTracking", commands["Storage.setStorageBucketTracking"].params.parse(params ?? {}))), "Storage.setStorageBucketTracking", "command"), + deleteStorageBucket: withCdpName(async (params?: unknown) => commands["Storage.deleteStorageBucket"].result.parse(await send("Storage.deleteStorageBucket", commands["Storage.deleteStorageBucket"].params.parse(params ?? {}))), "Storage.deleteStorageBucket", "command"), + runBounceTrackingMitigations: withCdpName(async (params?: unknown) => commands["Storage.runBounceTrackingMitigations"].result.parse(await send("Storage.runBounceTrackingMitigations", commands["Storage.runBounceTrackingMitigations"].params.parse(params ?? {}))), "Storage.runBounceTrackingMitigations", "command"), + getRelatedWebsiteSets: withCdpName(async (params?: unknown) => commands["Storage.getRelatedWebsiteSets"].result.parse(await send("Storage.getRelatedWebsiteSets", commands["Storage.getRelatedWebsiteSets"].params.parse(params ?? {}))), "Storage.getRelatedWebsiteSets", "command"), + setProtectedAudienceKAnonymity: withCdpName(async (params?: unknown) => commands["Storage.setProtectedAudienceKAnonymity"].result.parse(await send("Storage.setProtectedAudienceKAnonymity", commands["Storage.setProtectedAudienceKAnonymity"].params.parse(params ?? {}))), "Storage.setProtectedAudienceKAnonymity", "command"), + cacheStorageContentUpdated: events["Storage.cacheStorageContentUpdated"] as CdpEventAlias, + cacheStorageListUpdated: events["Storage.cacheStorageListUpdated"] as CdpEventAlias, + indexedDBContentUpdated: events["Storage.indexedDBContentUpdated"] as CdpEventAlias, + indexedDBListUpdated: events["Storage.indexedDBListUpdated"] as CdpEventAlias, + interestGroupAccessed: events["Storage.interestGroupAccessed"] as CdpEventAlias, + interestGroupAuctionEventOccurred: events["Storage.interestGroupAuctionEventOccurred"] as CdpEventAlias, + interestGroupAuctionNetworkRequestCreated: events["Storage.interestGroupAuctionNetworkRequestCreated"] as CdpEventAlias, + sharedStorageAccessed: events["Storage.sharedStorageAccessed"] as CdpEventAlias, + sharedStorageWorkletOperationExecutionFinished: events["Storage.sharedStorageWorkletOperationExecutionFinished"] as CdpEventAlias, + storageBucketCreatedOrUpdated: events["Storage.storageBucketCreatedOrUpdated"] as CdpEventAlias, + storageBucketDeleted: events["Storage.storageBucketDeleted"] as CdpEventAlias, }, SystemInfo: { - getInfo: withCdpName( - async (params?: unknown) => - commands["SystemInfo.getInfo"].result.parse( - await send("SystemInfo.getInfo", commands["SystemInfo.getInfo"].params.parse(params ?? {})), - ), - "SystemInfo.getInfo", - "command", - ), - getFeatureState: withCdpName( - async (params?: unknown) => - commands["SystemInfo.getFeatureState"].result.parse( - await send("SystemInfo.getFeatureState", commands["SystemInfo.getFeatureState"].params.parse(params ?? {})), - ), - "SystemInfo.getFeatureState", - "command", - ), - getProcessInfo: withCdpName( - async (params?: unknown) => - commands["SystemInfo.getProcessInfo"].result.parse( - await send("SystemInfo.getProcessInfo", commands["SystemInfo.getProcessInfo"].params.parse(params ?? {})), - ), - "SystemInfo.getProcessInfo", - "command", - ), + getInfo: withCdpName(async (params?: unknown) => commands["SystemInfo.getInfo"].result.parse(await send("SystemInfo.getInfo", commands["SystemInfo.getInfo"].params.parse(params ?? {}))), "SystemInfo.getInfo", "command"), + getFeatureState: withCdpName(async (params?: unknown) => commands["SystemInfo.getFeatureState"].result.parse(await send("SystemInfo.getFeatureState", commands["SystemInfo.getFeatureState"].params.parse(params ?? {}))), "SystemInfo.getFeatureState", "command"), + getProcessInfo: withCdpName(async (params?: unknown) => commands["SystemInfo.getProcessInfo"].result.parse(await send("SystemInfo.getProcessInfo", commands["SystemInfo.getProcessInfo"].params.parse(params ?? {}))), "SystemInfo.getProcessInfo", "command"), }, Target: { - activateTarget: withCdpName( - async (params?: unknown) => - commands["Target.activateTarget"].result.parse( - await send("Target.activateTarget", commands["Target.activateTarget"].params.parse(params ?? {})), - ), - "Target.activateTarget", - "command", - ), - attachToTarget: withCdpName( - async (params?: unknown) => - commands["Target.attachToTarget"].result.parse( - await send("Target.attachToTarget", commands["Target.attachToTarget"].params.parse(params ?? {})), - ), - "Target.attachToTarget", - "command", - ), - attachToBrowserTarget: withCdpName( - async (params?: unknown) => - commands["Target.attachToBrowserTarget"].result.parse( - await send( - "Target.attachToBrowserTarget", - commands["Target.attachToBrowserTarget"].params.parse(params ?? {}), - ), - ), - "Target.attachToBrowserTarget", - "command", - ), - closeTarget: withCdpName( - async (params?: unknown) => - commands["Target.closeTarget"].result.parse( - await send("Target.closeTarget", commands["Target.closeTarget"].params.parse(params ?? {})), - ), - "Target.closeTarget", - "command", - ), - exposeDevToolsProtocol: withCdpName( - async (params?: unknown) => - commands["Target.exposeDevToolsProtocol"].result.parse( - await send( - "Target.exposeDevToolsProtocol", - commands["Target.exposeDevToolsProtocol"].params.parse(params ?? {}), - ), - ), - "Target.exposeDevToolsProtocol", - "command", - ), - createBrowserContext: withCdpName( - async (params?: unknown) => - commands["Target.createBrowserContext"].result.parse( - await send( - "Target.createBrowserContext", - commands["Target.createBrowserContext"].params.parse(params ?? {}), - ), - ), - "Target.createBrowserContext", - "command", - ), - getBrowserContexts: withCdpName( - async (params?: unknown) => - commands["Target.getBrowserContexts"].result.parse( - await send("Target.getBrowserContexts", commands["Target.getBrowserContexts"].params.parse(params ?? {})), - ), - "Target.getBrowserContexts", - "command", - ), - createTarget: withCdpName( - async (params?: unknown) => - commands["Target.createTarget"].result.parse( - await send("Target.createTarget", commands["Target.createTarget"].params.parse(params ?? {})), - ), - "Target.createTarget", - "command", - ), - detachFromTarget: withCdpName( - async (params?: unknown) => - commands["Target.detachFromTarget"].result.parse( - await send("Target.detachFromTarget", commands["Target.detachFromTarget"].params.parse(params ?? {})), - ), - "Target.detachFromTarget", - "command", - ), - disposeBrowserContext: withCdpName( - async (params?: unknown) => - commands["Target.disposeBrowserContext"].result.parse( - await send( - "Target.disposeBrowserContext", - commands["Target.disposeBrowserContext"].params.parse(params ?? {}), - ), - ), - "Target.disposeBrowserContext", - "command", - ), - getTargetInfo: withCdpName( - async (params?: unknown) => - commands["Target.getTargetInfo"].result.parse( - await send("Target.getTargetInfo", commands["Target.getTargetInfo"].params.parse(params ?? {})), - ), - "Target.getTargetInfo", - "command", - ), - getTargets: withCdpName( - async (params?: unknown) => - commands["Target.getTargets"].result.parse( - await send("Target.getTargets", commands["Target.getTargets"].params.parse(params ?? {})), - ), - "Target.getTargets", - "command", - ), - sendMessageToTarget: withCdpName( - async (params?: unknown) => - commands["Target.sendMessageToTarget"].result.parse( - await send("Target.sendMessageToTarget", commands["Target.sendMessageToTarget"].params.parse(params ?? {})), - ), - "Target.sendMessageToTarget", - "command", - ), - setAutoAttach: withCdpName( - async (params?: unknown) => - commands["Target.setAutoAttach"].result.parse( - await send("Target.setAutoAttach", commands["Target.setAutoAttach"].params.parse(params ?? {})), - ), - "Target.setAutoAttach", - "command", - ), - autoAttachRelated: withCdpName( - async (params?: unknown) => - commands["Target.autoAttachRelated"].result.parse( - await send("Target.autoAttachRelated", commands["Target.autoAttachRelated"].params.parse(params ?? {})), - ), - "Target.autoAttachRelated", - "command", - ), - setDiscoverTargets: withCdpName( - async (params?: unknown) => - commands["Target.setDiscoverTargets"].result.parse( - await send("Target.setDiscoverTargets", commands["Target.setDiscoverTargets"].params.parse(params ?? {})), - ), - "Target.setDiscoverTargets", - "command", - ), - setRemoteLocations: withCdpName( - async (params?: unknown) => - commands["Target.setRemoteLocations"].result.parse( - await send("Target.setRemoteLocations", commands["Target.setRemoteLocations"].params.parse(params ?? {})), - ), - "Target.setRemoteLocations", - "command", - ), - getDevToolsTarget: withCdpName( - async (params?: unknown) => - commands["Target.getDevToolsTarget"].result.parse( - await send("Target.getDevToolsTarget", commands["Target.getDevToolsTarget"].params.parse(params ?? {})), - ), - "Target.getDevToolsTarget", - "command", - ), - openDevTools: withCdpName( - async (params?: unknown) => - commands["Target.openDevTools"].result.parse( - await send("Target.openDevTools", commands["Target.openDevTools"].params.parse(params ?? {})), - ), - "Target.openDevTools", - "command", - ), - attachedToTarget: events["Target.attachedToTarget"] as CdpEventAlias< - cdp.types.ts.Target.AttachedToTargetEvent, - "Target.attachedToTarget" - >, - detachedFromTarget: events["Target.detachedFromTarget"] as CdpEventAlias< - cdp.types.ts.Target.DetachedFromTargetEvent, - "Target.detachedFromTarget" - >, - receivedMessageFromTarget: events["Target.receivedMessageFromTarget"] as CdpEventAlias< - cdp.types.ts.Target.ReceivedMessageFromTargetEvent, - "Target.receivedMessageFromTarget" - >, - targetCreated: events["Target.targetCreated"] as CdpEventAlias< - cdp.types.ts.Target.TargetCreatedEvent, - "Target.targetCreated" - >, - targetDestroyed: events["Target.targetDestroyed"] as CdpEventAlias< - cdp.types.ts.Target.TargetDestroyedEvent, - "Target.targetDestroyed" - >, - targetCrashed: events["Target.targetCrashed"] as CdpEventAlias< - cdp.types.ts.Target.TargetCrashedEvent, - "Target.targetCrashed" - >, - targetInfoChanged: events["Target.targetInfoChanged"] as CdpEventAlias< - cdp.types.ts.Target.TargetInfoChangedEvent, - "Target.targetInfoChanged" - >, + activateTarget: withCdpName(async (params?: unknown) => commands["Target.activateTarget"].result.parse(await send("Target.activateTarget", commands["Target.activateTarget"].params.parse(params ?? {}))), "Target.activateTarget", "command"), + attachToTarget: withCdpName(async (params?: unknown) => commands["Target.attachToTarget"].result.parse(await send("Target.attachToTarget", commands["Target.attachToTarget"].params.parse(params ?? {}))), "Target.attachToTarget", "command"), + attachToBrowserTarget: withCdpName(async (params?: unknown) => commands["Target.attachToBrowserTarget"].result.parse(await send("Target.attachToBrowserTarget", commands["Target.attachToBrowserTarget"].params.parse(params ?? {}))), "Target.attachToBrowserTarget", "command"), + closeTarget: withCdpName(async (params?: unknown) => commands["Target.closeTarget"].result.parse(await send("Target.closeTarget", commands["Target.closeTarget"].params.parse(params ?? {}))), "Target.closeTarget", "command"), + exposeDevToolsProtocol: withCdpName(async (params?: unknown) => commands["Target.exposeDevToolsProtocol"].result.parse(await send("Target.exposeDevToolsProtocol", commands["Target.exposeDevToolsProtocol"].params.parse(params ?? {}))), "Target.exposeDevToolsProtocol", "command"), + createBrowserContext: withCdpName(async (params?: unknown) => commands["Target.createBrowserContext"].result.parse(await send("Target.createBrowserContext", commands["Target.createBrowserContext"].params.parse(params ?? {}))), "Target.createBrowserContext", "command"), + getBrowserContexts: withCdpName(async (params?: unknown) => commands["Target.getBrowserContexts"].result.parse(await send("Target.getBrowserContexts", commands["Target.getBrowserContexts"].params.parse(params ?? {}))), "Target.getBrowserContexts", "command"), + createTarget: withCdpName(async (params?: unknown) => commands["Target.createTarget"].result.parse(await send("Target.createTarget", commands["Target.createTarget"].params.parse(params ?? {}))), "Target.createTarget", "command"), + detachFromTarget: withCdpName(async (params?: unknown) => commands["Target.detachFromTarget"].result.parse(await send("Target.detachFromTarget", commands["Target.detachFromTarget"].params.parse(params ?? {}))), "Target.detachFromTarget", "command"), + disposeBrowserContext: withCdpName(async (params?: unknown) => commands["Target.disposeBrowserContext"].result.parse(await send("Target.disposeBrowserContext", commands["Target.disposeBrowserContext"].params.parse(params ?? {}))), "Target.disposeBrowserContext", "command"), + getTargetInfo: withCdpName(async (params?: unknown) => commands["Target.getTargetInfo"].result.parse(await send("Target.getTargetInfo", commands["Target.getTargetInfo"].params.parse(params ?? {}))), "Target.getTargetInfo", "command"), + getTargets: withCdpName(async (params?: unknown) => commands["Target.getTargets"].result.parse(await send("Target.getTargets", commands["Target.getTargets"].params.parse(params ?? {}))), "Target.getTargets", "command"), + sendMessageToTarget: withCdpName(async (params?: unknown) => commands["Target.sendMessageToTarget"].result.parse(await send("Target.sendMessageToTarget", commands["Target.sendMessageToTarget"].params.parse(params ?? {}))), "Target.sendMessageToTarget", "command"), + setAutoAttach: withCdpName(async (params?: unknown) => commands["Target.setAutoAttach"].result.parse(await send("Target.setAutoAttach", commands["Target.setAutoAttach"].params.parse(params ?? {}))), "Target.setAutoAttach", "command"), + autoAttachRelated: withCdpName(async (params?: unknown) => commands["Target.autoAttachRelated"].result.parse(await send("Target.autoAttachRelated", commands["Target.autoAttachRelated"].params.parse(params ?? {}))), "Target.autoAttachRelated", "command"), + setDiscoverTargets: withCdpName(async (params?: unknown) => commands["Target.setDiscoverTargets"].result.parse(await send("Target.setDiscoverTargets", commands["Target.setDiscoverTargets"].params.parse(params ?? {}))), "Target.setDiscoverTargets", "command"), + setRemoteLocations: withCdpName(async (params?: unknown) => commands["Target.setRemoteLocations"].result.parse(await send("Target.setRemoteLocations", commands["Target.setRemoteLocations"].params.parse(params ?? {}))), "Target.setRemoteLocations", "command"), + getDevToolsTarget: withCdpName(async (params?: unknown) => commands["Target.getDevToolsTarget"].result.parse(await send("Target.getDevToolsTarget", commands["Target.getDevToolsTarget"].params.parse(params ?? {}))), "Target.getDevToolsTarget", "command"), + openDevTools: withCdpName(async (params?: unknown) => commands["Target.openDevTools"].result.parse(await send("Target.openDevTools", commands["Target.openDevTools"].params.parse(params ?? {}))), "Target.openDevTools", "command"), + attachedToTarget: events["Target.attachedToTarget"] as CdpEventAlias, + detachedFromTarget: events["Target.detachedFromTarget"] as CdpEventAlias, + receivedMessageFromTarget: events["Target.receivedMessageFromTarget"] as CdpEventAlias, + targetCreated: events["Target.targetCreated"] as CdpEventAlias, + targetDestroyed: events["Target.targetDestroyed"] as CdpEventAlias, + targetCrashed: events["Target.targetCrashed"] as CdpEventAlias, + targetInfoChanged: events["Target.targetInfoChanged"] as CdpEventAlias, }, Tethering: { - bind: withCdpName( - async (params?: unknown) => - commands["Tethering.bind"].result.parse( - await send("Tethering.bind", commands["Tethering.bind"].params.parse(params ?? {})), - ), - "Tethering.bind", - "command", - ), - unbind: withCdpName( - async (params?: unknown) => - commands["Tethering.unbind"].result.parse( - await send("Tethering.unbind", commands["Tethering.unbind"].params.parse(params ?? {})), - ), - "Tethering.unbind", - "command", - ), - accepted: events["Tethering.accepted"] as CdpEventAlias< - cdp.types.ts.Tethering.AcceptedEvent, - "Tethering.accepted" - >, + bind: withCdpName(async (params?: unknown) => commands["Tethering.bind"].result.parse(await send("Tethering.bind", commands["Tethering.bind"].params.parse(params ?? {}))), "Tethering.bind", "command"), + unbind: withCdpName(async (params?: unknown) => commands["Tethering.unbind"].result.parse(await send("Tethering.unbind", commands["Tethering.unbind"].params.parse(params ?? {}))), "Tethering.unbind", "command"), + accepted: events["Tethering.accepted"] as CdpEventAlias, }, Tracing: { - end: withCdpName( - async (params?: unknown) => - commands["Tracing.end"].result.parse( - await send("Tracing.end", commands["Tracing.end"].params.parse(params ?? {})), - ), - "Tracing.end", - "command", - ), - getCategories: withCdpName( - async (params?: unknown) => - commands["Tracing.getCategories"].result.parse( - await send("Tracing.getCategories", commands["Tracing.getCategories"].params.parse(params ?? {})), - ), - "Tracing.getCategories", - "command", - ), - getTrackEventDescriptor: withCdpName( - async (params?: unknown) => - commands["Tracing.getTrackEventDescriptor"].result.parse( - await send( - "Tracing.getTrackEventDescriptor", - commands["Tracing.getTrackEventDescriptor"].params.parse(params ?? {}), - ), - ), - "Tracing.getTrackEventDescriptor", - "command", - ), - recordClockSyncMarker: withCdpName( - async (params?: unknown) => - commands["Tracing.recordClockSyncMarker"].result.parse( - await send( - "Tracing.recordClockSyncMarker", - commands["Tracing.recordClockSyncMarker"].params.parse(params ?? {}), - ), - ), - "Tracing.recordClockSyncMarker", - "command", - ), - requestMemoryDump: withCdpName( - async (params?: unknown) => - commands["Tracing.requestMemoryDump"].result.parse( - await send("Tracing.requestMemoryDump", commands["Tracing.requestMemoryDump"].params.parse(params ?? {})), - ), - "Tracing.requestMemoryDump", - "command", - ), - start: withCdpName( - async (params?: unknown) => - commands["Tracing.start"].result.parse( - await send("Tracing.start", commands["Tracing.start"].params.parse(params ?? {})), - ), - "Tracing.start", - "command", - ), - bufferUsage: events["Tracing.bufferUsage"] as CdpEventAlias< - cdp.types.ts.Tracing.BufferUsageEvent, - "Tracing.bufferUsage" - >, - dataCollected: events["Tracing.dataCollected"] as CdpEventAlias< - cdp.types.ts.Tracing.DataCollectedEvent, - "Tracing.dataCollected" - >, - tracingComplete: events["Tracing.tracingComplete"] as CdpEventAlias< - cdp.types.ts.Tracing.TracingCompleteEvent, - "Tracing.tracingComplete" - >, + end: withCdpName(async (params?: unknown) => commands["Tracing.end"].result.parse(await send("Tracing.end", commands["Tracing.end"].params.parse(params ?? {}))), "Tracing.end", "command"), + getCategories: withCdpName(async (params?: unknown) => commands["Tracing.getCategories"].result.parse(await send("Tracing.getCategories", commands["Tracing.getCategories"].params.parse(params ?? {}))), "Tracing.getCategories", "command"), + getTrackEventDescriptor: withCdpName(async (params?: unknown) => commands["Tracing.getTrackEventDescriptor"].result.parse(await send("Tracing.getTrackEventDescriptor", commands["Tracing.getTrackEventDescriptor"].params.parse(params ?? {}))), "Tracing.getTrackEventDescriptor", "command"), + recordClockSyncMarker: withCdpName(async (params?: unknown) => commands["Tracing.recordClockSyncMarker"].result.parse(await send("Tracing.recordClockSyncMarker", commands["Tracing.recordClockSyncMarker"].params.parse(params ?? {}))), "Tracing.recordClockSyncMarker", "command"), + requestMemoryDump: withCdpName(async (params?: unknown) => commands["Tracing.requestMemoryDump"].result.parse(await send("Tracing.requestMemoryDump", commands["Tracing.requestMemoryDump"].params.parse(params ?? {}))), "Tracing.requestMemoryDump", "command"), + start: withCdpName(async (params?: unknown) => commands["Tracing.start"].result.parse(await send("Tracing.start", commands["Tracing.start"].params.parse(params ?? {}))), "Tracing.start", "command"), + bufferUsage: events["Tracing.bufferUsage"] as CdpEventAlias, + dataCollected: events["Tracing.dataCollected"] as CdpEventAlias, + tracingComplete: events["Tracing.tracingComplete"] as CdpEventAlias, }, WebAudio: { - enable: withCdpName( - async (params?: unknown) => - commands["WebAudio.enable"].result.parse( - await send("WebAudio.enable", commands["WebAudio.enable"].params.parse(params ?? {})), - ), - "WebAudio.enable", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["WebAudio.disable"].result.parse( - await send("WebAudio.disable", commands["WebAudio.disable"].params.parse(params ?? {})), - ), - "WebAudio.disable", - "command", - ), - getRealtimeData: withCdpName( - async (params?: unknown) => - commands["WebAudio.getRealtimeData"].result.parse( - await send("WebAudio.getRealtimeData", commands["WebAudio.getRealtimeData"].params.parse(params ?? {})), - ), - "WebAudio.getRealtimeData", - "command", - ), - contextCreated: events["WebAudio.contextCreated"] as CdpEventAlias< - cdp.types.ts.WebAudio.ContextCreatedEvent, - "WebAudio.contextCreated" - >, - contextWillBeDestroyed: events["WebAudio.contextWillBeDestroyed"] as CdpEventAlias< - cdp.types.ts.WebAudio.ContextWillBeDestroyedEvent, - "WebAudio.contextWillBeDestroyed" - >, - contextChanged: events["WebAudio.contextChanged"] as CdpEventAlias< - cdp.types.ts.WebAudio.ContextChangedEvent, - "WebAudio.contextChanged" - >, - audioListenerCreated: events["WebAudio.audioListenerCreated"] as CdpEventAlias< - cdp.types.ts.WebAudio.AudioListenerCreatedEvent, - "WebAudio.audioListenerCreated" - >, - audioListenerWillBeDestroyed: events["WebAudio.audioListenerWillBeDestroyed"] as CdpEventAlias< - cdp.types.ts.WebAudio.AudioListenerWillBeDestroyedEvent, - "WebAudio.audioListenerWillBeDestroyed" - >, - audioNodeCreated: events["WebAudio.audioNodeCreated"] as CdpEventAlias< - cdp.types.ts.WebAudio.AudioNodeCreatedEvent, - "WebAudio.audioNodeCreated" - >, - audioNodeWillBeDestroyed: events["WebAudio.audioNodeWillBeDestroyed"] as CdpEventAlias< - cdp.types.ts.WebAudio.AudioNodeWillBeDestroyedEvent, - "WebAudio.audioNodeWillBeDestroyed" - >, - audioParamCreated: events["WebAudio.audioParamCreated"] as CdpEventAlias< - cdp.types.ts.WebAudio.AudioParamCreatedEvent, - "WebAudio.audioParamCreated" - >, - audioParamWillBeDestroyed: events["WebAudio.audioParamWillBeDestroyed"] as CdpEventAlias< - cdp.types.ts.WebAudio.AudioParamWillBeDestroyedEvent, - "WebAudio.audioParamWillBeDestroyed" - >, - nodesConnected: events["WebAudio.nodesConnected"] as CdpEventAlias< - cdp.types.ts.WebAudio.NodesConnectedEvent, - "WebAudio.nodesConnected" - >, - nodesDisconnected: events["WebAudio.nodesDisconnected"] as CdpEventAlias< - cdp.types.ts.WebAudio.NodesDisconnectedEvent, - "WebAudio.nodesDisconnected" - >, - nodeParamConnected: events["WebAudio.nodeParamConnected"] as CdpEventAlias< - cdp.types.ts.WebAudio.NodeParamConnectedEvent, - "WebAudio.nodeParamConnected" - >, - nodeParamDisconnected: events["WebAudio.nodeParamDisconnected"] as CdpEventAlias< - cdp.types.ts.WebAudio.NodeParamDisconnectedEvent, - "WebAudio.nodeParamDisconnected" - >, + enable: withCdpName(async (params?: unknown) => commands["WebAudio.enable"].result.parse(await send("WebAudio.enable", commands["WebAudio.enable"].params.parse(params ?? {}))), "WebAudio.enable", "command"), + disable: withCdpName(async (params?: unknown) => commands["WebAudio.disable"].result.parse(await send("WebAudio.disable", commands["WebAudio.disable"].params.parse(params ?? {}))), "WebAudio.disable", "command"), + getRealtimeData: withCdpName(async (params?: unknown) => commands["WebAudio.getRealtimeData"].result.parse(await send("WebAudio.getRealtimeData", commands["WebAudio.getRealtimeData"].params.parse(params ?? {}))), "WebAudio.getRealtimeData", "command"), + contextCreated: events["WebAudio.contextCreated"] as CdpEventAlias, + contextWillBeDestroyed: events["WebAudio.contextWillBeDestroyed"] as CdpEventAlias, + contextChanged: events["WebAudio.contextChanged"] as CdpEventAlias, + audioListenerCreated: events["WebAudio.audioListenerCreated"] as CdpEventAlias, + audioListenerWillBeDestroyed: events["WebAudio.audioListenerWillBeDestroyed"] as CdpEventAlias, + audioNodeCreated: events["WebAudio.audioNodeCreated"] as CdpEventAlias, + audioNodeWillBeDestroyed: events["WebAudio.audioNodeWillBeDestroyed"] as CdpEventAlias, + audioParamCreated: events["WebAudio.audioParamCreated"] as CdpEventAlias, + audioParamWillBeDestroyed: events["WebAudio.audioParamWillBeDestroyed"] as CdpEventAlias, + nodesConnected: events["WebAudio.nodesConnected"] as CdpEventAlias, + nodesDisconnected: events["WebAudio.nodesDisconnected"] as CdpEventAlias, + nodeParamConnected: events["WebAudio.nodeParamConnected"] as CdpEventAlias, + nodeParamDisconnected: events["WebAudio.nodeParamDisconnected"] as CdpEventAlias, }, WebAuthn: { - enable: withCdpName( - async (params?: unknown) => - commands["WebAuthn.enable"].result.parse( - await send("WebAuthn.enable", commands["WebAuthn.enable"].params.parse(params ?? {})), - ), - "WebAuthn.enable", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["WebAuthn.disable"].result.parse( - await send("WebAuthn.disable", commands["WebAuthn.disable"].params.parse(params ?? {})), - ), - "WebAuthn.disable", - "command", - ), - addVirtualAuthenticator: withCdpName( - async (params?: unknown) => - commands["WebAuthn.addVirtualAuthenticator"].result.parse( - await send( - "WebAuthn.addVirtualAuthenticator", - commands["WebAuthn.addVirtualAuthenticator"].params.parse(params ?? {}), - ), - ), - "WebAuthn.addVirtualAuthenticator", - "command", - ), - setResponseOverrideBits: withCdpName( - async (params?: unknown) => - commands["WebAuthn.setResponseOverrideBits"].result.parse( - await send( - "WebAuthn.setResponseOverrideBits", - commands["WebAuthn.setResponseOverrideBits"].params.parse(params ?? {}), - ), - ), - "WebAuthn.setResponseOverrideBits", - "command", - ), - removeVirtualAuthenticator: withCdpName( - async (params?: unknown) => - commands["WebAuthn.removeVirtualAuthenticator"].result.parse( - await send( - "WebAuthn.removeVirtualAuthenticator", - commands["WebAuthn.removeVirtualAuthenticator"].params.parse(params ?? {}), - ), - ), - "WebAuthn.removeVirtualAuthenticator", - "command", - ), - addCredential: withCdpName( - async (params?: unknown) => - commands["WebAuthn.addCredential"].result.parse( - await send("WebAuthn.addCredential", commands["WebAuthn.addCredential"].params.parse(params ?? {})), - ), - "WebAuthn.addCredential", - "command", - ), - getCredential: withCdpName( - async (params?: unknown) => - commands["WebAuthn.getCredential"].result.parse( - await send("WebAuthn.getCredential", commands["WebAuthn.getCredential"].params.parse(params ?? {})), - ), - "WebAuthn.getCredential", - "command", - ), - getCredentials: withCdpName( - async (params?: unknown) => - commands["WebAuthn.getCredentials"].result.parse( - await send("WebAuthn.getCredentials", commands["WebAuthn.getCredentials"].params.parse(params ?? {})), - ), - "WebAuthn.getCredentials", - "command", - ), - removeCredential: withCdpName( - async (params?: unknown) => - commands["WebAuthn.removeCredential"].result.parse( - await send("WebAuthn.removeCredential", commands["WebAuthn.removeCredential"].params.parse(params ?? {})), - ), - "WebAuthn.removeCredential", - "command", - ), - clearCredentials: withCdpName( - async (params?: unknown) => - commands["WebAuthn.clearCredentials"].result.parse( - await send("WebAuthn.clearCredentials", commands["WebAuthn.clearCredentials"].params.parse(params ?? {})), - ), - "WebAuthn.clearCredentials", - "command", - ), - setUserVerified: withCdpName( - async (params?: unknown) => - commands["WebAuthn.setUserVerified"].result.parse( - await send("WebAuthn.setUserVerified", commands["WebAuthn.setUserVerified"].params.parse(params ?? {})), - ), - "WebAuthn.setUserVerified", - "command", - ), - setAutomaticPresenceSimulation: withCdpName( - async (params?: unknown) => - commands["WebAuthn.setAutomaticPresenceSimulation"].result.parse( - await send( - "WebAuthn.setAutomaticPresenceSimulation", - commands["WebAuthn.setAutomaticPresenceSimulation"].params.parse(params ?? {}), - ), - ), - "WebAuthn.setAutomaticPresenceSimulation", - "command", - ), - setCredentialProperties: withCdpName( - async (params?: unknown) => - commands["WebAuthn.setCredentialProperties"].result.parse( - await send( - "WebAuthn.setCredentialProperties", - commands["WebAuthn.setCredentialProperties"].params.parse(params ?? {}), - ), - ), - "WebAuthn.setCredentialProperties", - "command", - ), - credentialAdded: events["WebAuthn.credentialAdded"] as CdpEventAlias< - cdp.types.ts.WebAuthn.CredentialAddedEvent, - "WebAuthn.credentialAdded" - >, - credentialDeleted: events["WebAuthn.credentialDeleted"] as CdpEventAlias< - cdp.types.ts.WebAuthn.CredentialDeletedEvent, - "WebAuthn.credentialDeleted" - >, - credentialUpdated: events["WebAuthn.credentialUpdated"] as CdpEventAlias< - cdp.types.ts.WebAuthn.CredentialUpdatedEvent, - "WebAuthn.credentialUpdated" - >, - credentialAsserted: events["WebAuthn.credentialAsserted"] as CdpEventAlias< - cdp.types.ts.WebAuthn.CredentialAssertedEvent, - "WebAuthn.credentialAsserted" - >, + enable: withCdpName(async (params?: unknown) => commands["WebAuthn.enable"].result.parse(await send("WebAuthn.enable", commands["WebAuthn.enable"].params.parse(params ?? {}))), "WebAuthn.enable", "command"), + disable: withCdpName(async (params?: unknown) => commands["WebAuthn.disable"].result.parse(await send("WebAuthn.disable", commands["WebAuthn.disable"].params.parse(params ?? {}))), "WebAuthn.disable", "command"), + addVirtualAuthenticator: withCdpName(async (params?: unknown) => commands["WebAuthn.addVirtualAuthenticator"].result.parse(await send("WebAuthn.addVirtualAuthenticator", commands["WebAuthn.addVirtualAuthenticator"].params.parse(params ?? {}))), "WebAuthn.addVirtualAuthenticator", "command"), + setResponseOverrideBits: withCdpName(async (params?: unknown) => commands["WebAuthn.setResponseOverrideBits"].result.parse(await send("WebAuthn.setResponseOverrideBits", commands["WebAuthn.setResponseOverrideBits"].params.parse(params ?? {}))), "WebAuthn.setResponseOverrideBits", "command"), + removeVirtualAuthenticator: withCdpName(async (params?: unknown) => commands["WebAuthn.removeVirtualAuthenticator"].result.parse(await send("WebAuthn.removeVirtualAuthenticator", commands["WebAuthn.removeVirtualAuthenticator"].params.parse(params ?? {}))), "WebAuthn.removeVirtualAuthenticator", "command"), + addCredential: withCdpName(async (params?: unknown) => commands["WebAuthn.addCredential"].result.parse(await send("WebAuthn.addCredential", commands["WebAuthn.addCredential"].params.parse(params ?? {}))), "WebAuthn.addCredential", "command"), + getCredential: withCdpName(async (params?: unknown) => commands["WebAuthn.getCredential"].result.parse(await send("WebAuthn.getCredential", commands["WebAuthn.getCredential"].params.parse(params ?? {}))), "WebAuthn.getCredential", "command"), + getCredentials: withCdpName(async (params?: unknown) => commands["WebAuthn.getCredentials"].result.parse(await send("WebAuthn.getCredentials", commands["WebAuthn.getCredentials"].params.parse(params ?? {}))), "WebAuthn.getCredentials", "command"), + removeCredential: withCdpName(async (params?: unknown) => commands["WebAuthn.removeCredential"].result.parse(await send("WebAuthn.removeCredential", commands["WebAuthn.removeCredential"].params.parse(params ?? {}))), "WebAuthn.removeCredential", "command"), + clearCredentials: withCdpName(async (params?: unknown) => commands["WebAuthn.clearCredentials"].result.parse(await send("WebAuthn.clearCredentials", commands["WebAuthn.clearCredentials"].params.parse(params ?? {}))), "WebAuthn.clearCredentials", "command"), + setUserVerified: withCdpName(async (params?: unknown) => commands["WebAuthn.setUserVerified"].result.parse(await send("WebAuthn.setUserVerified", commands["WebAuthn.setUserVerified"].params.parse(params ?? {}))), "WebAuthn.setUserVerified", "command"), + setAutomaticPresenceSimulation: withCdpName(async (params?: unknown) => commands["WebAuthn.setAutomaticPresenceSimulation"].result.parse(await send("WebAuthn.setAutomaticPresenceSimulation", commands["WebAuthn.setAutomaticPresenceSimulation"].params.parse(params ?? {}))), "WebAuthn.setAutomaticPresenceSimulation", "command"), + setCredentialProperties: withCdpName(async (params?: unknown) => commands["WebAuthn.setCredentialProperties"].result.parse(await send("WebAuthn.setCredentialProperties", commands["WebAuthn.setCredentialProperties"].params.parse(params ?? {}))), "WebAuthn.setCredentialProperties", "command"), + credentialAdded: events["WebAuthn.credentialAdded"] as CdpEventAlias, + credentialDeleted: events["WebAuthn.credentialDeleted"] as CdpEventAlias, + credentialUpdated: events["WebAuthn.credentialUpdated"] as CdpEventAlias, + credentialAsserted: events["WebAuthn.credentialAsserted"] as CdpEventAlias, }, WebMCP: { - enable: withCdpName( - async (params?: unknown) => - commands["WebMCP.enable"].result.parse( - await send("WebMCP.enable", commands["WebMCP.enable"].params.parse(params ?? {})), - ), - "WebMCP.enable", - "command", - ), - disable: withCdpName( - async (params?: unknown) => - commands["WebMCP.disable"].result.parse( - await send("WebMCP.disable", commands["WebMCP.disable"].params.parse(params ?? {})), - ), - "WebMCP.disable", - "command", - ), - invokeTool: withCdpName( - async (params?: unknown) => - commands["WebMCP.invokeTool"].result.parse( - await send("WebMCP.invokeTool", commands["WebMCP.invokeTool"].params.parse(params ?? {})), - ), - "WebMCP.invokeTool", - "command", - ), - cancelInvocation: withCdpName( - async (params?: unknown) => - commands["WebMCP.cancelInvocation"].result.parse( - await send("WebMCP.cancelInvocation", commands["WebMCP.cancelInvocation"].params.parse(params ?? {})), - ), - "WebMCP.cancelInvocation", - "command", - ), - toolsAdded: events["WebMCP.toolsAdded"] as CdpEventAlias< - cdp.types.ts.WebMCP.ToolsAddedEvent, - "WebMCP.toolsAdded" - >, - toolsRemoved: events["WebMCP.toolsRemoved"] as CdpEventAlias< - cdp.types.ts.WebMCP.ToolsRemovedEvent, - "WebMCP.toolsRemoved" - >, - toolInvoked: events["WebMCP.toolInvoked"] as CdpEventAlias< - cdp.types.ts.WebMCP.ToolInvokedEvent, - "WebMCP.toolInvoked" - >, - toolResponded: events["WebMCP.toolResponded"] as CdpEventAlias< - cdp.types.ts.WebMCP.ToolRespondedEvent, - "WebMCP.toolResponded" - >, + enable: withCdpName(async (params?: unknown) => commands["WebMCP.enable"].result.parse(await send("WebMCP.enable", commands["WebMCP.enable"].params.parse(params ?? {}))), "WebMCP.enable", "command"), + disable: withCdpName(async (params?: unknown) => commands["WebMCP.disable"].result.parse(await send("WebMCP.disable", commands["WebMCP.disable"].params.parse(params ?? {}))), "WebMCP.disable", "command"), + invokeTool: withCdpName(async (params?: unknown) => commands["WebMCP.invokeTool"].result.parse(await send("WebMCP.invokeTool", commands["WebMCP.invokeTool"].params.parse(params ?? {}))), "WebMCP.invokeTool", "command"), + cancelInvocation: withCdpName(async (params?: unknown) => commands["WebMCP.cancelInvocation"].result.parse(await send("WebMCP.cancelInvocation", commands["WebMCP.cancelInvocation"].params.parse(params ?? {}))), "WebMCP.cancelInvocation", "command"), + toolsAdded: events["WebMCP.toolsAdded"] as CdpEventAlias, + toolsRemoved: events["WebMCP.toolsRemoved"] as CdpEventAlias, + toolInvoked: events["WebMCP.toolInvoked"] as CdpEventAlias, + toolResponded: events["WebMCP.toolResponded"] as CdpEventAlias, }, - Magic: { + Mod: { evaluate: async (params?: unknown) => { - const parsed = Magic.EvaluateParams.parse(params ?? {}); - return Magic.EvaluateResponse.parse(await send("Magic.evaluate", parsed)); + const parsed = Mod.EvaluateParams.parse(params ?? {}); + return Mod.EvaluateResponse.parse(await send("Mod.evaluate", parsed)); }, addCustomCommand: async (params?: unknown) => { - const parsed = Magic.AddCustomCommandParams.parse(params ?? {}); - const name = normalizeMagicName(parsed.name); - const paramsSchema = normalizeMagicPayloadSchema(parsed.paramsSchema); - const resultSchema = normalizeMagicPayloadSchema(parsed.resultSchema); - const response = Magic.AddCustomCommandResponse.parse( - await send("Magic.addCustomCommand", { ...parsed, name, paramsSchema: null, resultSchema: null }), - ); + const parsed = Mod.AddCustomCommandParams.parse(params ?? {}); + const name = normalizeCDPModName(parsed.name); + const paramsSchema = normalizeCDPModPayloadSchema(parsed.paramsSchema); + const resultSchema = normalizeCDPModPayloadSchema(parsed.resultSchema); + const response = Mod.AddCustomCommandResponse.parse(await send("Mod.addCustomCommand", { ...parsed, name, paramsSchema: null, resultSchema: null })); hooks.onCustomCommand?.(name, paramsSchema, resultSchema); return response; }, addCustomEvent: async (params?: unknown) => { - const parsed = Magic.AddCustomEventParams.parse(params ?? {}); - const directSchema = Magic.ZodType.safeParse(parsed); + const parsed = Mod.AddCustomEventParams.parse(params ?? {}); + const directSchema = Mod.ZodType.safeParse(parsed); if (directSchema.success) { - const name = normalizeMagicName(directSchema.data); - const eventSchema = normalizeMagicPayloadSchema(directSchema.data); - const response = Magic.AddCustomEventResponse.parse( - await send("Magic.addCustomEvent", { name, eventSchema: null }), - ); + const name = normalizeCDPModName(directSchema.data); + const eventSchema = normalizeCDPModPayloadSchema(directSchema.data); + const response = Mod.AddCustomEventResponse.parse(await send("Mod.addCustomEvent", { name, eventSchema: null })); hooks.onCustomEvent?.(name, eventSchema); return response; } - const objectParams = Magic.AddCustomEventObjectParams.parse(parsed); - const name = normalizeMagicName(objectParams.name); - const eventSchema = normalizeMagicPayloadSchema(objectParams.eventSchema); - const response = Magic.AddCustomEventResponse.parse( - await send("Magic.addCustomEvent", { ...objectParams, name, eventSchema: null }), - ); + const objectParams = Mod.AddCustomEventObjectParams.parse(parsed); + const name = normalizeCDPModName(objectParams.name); + const eventSchema = normalizeCDPModPayloadSchema(objectParams.eventSchema); + const response = Mod.AddCustomEventResponse.parse(await send("Mod.addCustomEvent", { ...objectParams, name, eventSchema: null })); hooks.onCustomEvent?.(name, eventSchema); return response; }, addMiddleware: async (params?: unknown) => { - const parsed = Magic.AddMiddlewareParams.parse(params ?? {}); - const name = parsed.name == null ? undefined : normalizeMagicName(parsed.name); - return Magic.AddMiddlewareResponse.parse(await send("Magic.addMiddleware", { ...parsed, name })); + const parsed = Mod.AddMiddlewareParams.parse(params ?? {}); + const name = parsed.name == null ? undefined : normalizeCDPModName(parsed.name); + return Mod.AddMiddlewareResponse.parse(await send("Mod.addMiddleware", { ...parsed, name })); }, configure: async (params?: unknown) => { - const parsed = Magic.ConfigureParams.parse(params ?? {}); - return Magic.ConfigureResponse.parse(await send("Magic.configure", parsed)); + const parsed = Mod.ConfigureParams.parse(params ?? {}); + return Mod.ConfigureResponse.parse(await send("Mod.configure", parsed)); }, ping: async (params?: unknown) => { - const parsed = Magic.PingParams.parse(params ?? {}); - return Magic.PingResponse.parse(await send("Magic.ping", parsed)); + const parsed = Mod.PingParams.parse(params ?? {}); + return Mod.PingResponse.parse(await send("Mod.ping", parsed)); }, }, }; diff --git a/types/cdp.ts b/types/cdp.ts index f45deff..2c1a683 100644 --- a/types/cdp.ts +++ b/types/cdp.ts @@ -1,7 +1,7 @@ // Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. import { zod, commands, events, types as runtimeTypes } from "./zod.js"; import type { z } from "zod"; -import type { MagicRoutes, MagicCustomPayload, MagicNamedValue, MagicName, MagicZodType, MagicPayloadShape, MagicPayloadSchemaSpec, MagicEvaluateParams, MagicAddCustomCommandParams, MagicAddCustomEventParams, MagicAddMiddlewareParams, MagicConfigureParams, MagicPingParams, MagicPongEvent, MagicPingLatency, MagicCommandParams, MagicCommandResult, MagicEvaluateResponse, MagicAddCustomCommandResponse, MagicAddCustomEventResponse, MagicAddMiddlewareResponse, MagicConfigureResponse, MagicPingResponse, MagicBindingPayload, MagicCustomCommandRegistration, MagicCustomEventRegistration, MagicMiddlewareRegistration } from "./magic.js"; +import type { CDPModRoutes, CDPModCustomPayload, CDPModNamedValue, CDPModName, CDPModZodType, CDPModPayloadShape, CDPModPayloadSchemaSpec, CDPModEvaluateParams, CDPModAddCustomCommandParams, CDPModAddCustomEventParams, CDPModAddMiddlewareParams, CDPModConfigureParams, CDPModPingParams, CDPModPongEvent, CDPModPingLatency, CDPModCommandParams, CDPModCommandResult, CDPModEvaluateResponse, CDPModAddCustomCommandResponse, CDPModAddCustomEventResponse, CDPModAddMiddlewareResponse, CDPModConfigureResponse, CDPModPingResponse, CDPModBindingPayload, CDPModCustomCommandRegistration, CDPModCustomEventRegistration, CDPModMiddlewareRegistration } from "./cdpmod.js"; export const REQUEST = "request" as const; export const RESPONSE = "response" as const; @@ -14,34 +14,34 @@ export const types = cdp.types; export namespace cdp { export namespace types { export namespace ts { - export namespace Magic { - export type Routes = MagicRoutes; - export type CustomPayload = MagicCustomPayload; - export type NamedValue = MagicNamedValue; - export type Name = MagicName; - export type ZodType = MagicZodType; - export type PayloadShape = MagicPayloadShape; - export type PayloadSchemaSpec = MagicPayloadSchemaSpec; - export type EvaluateParams = MagicEvaluateParams; - export type AddCustomCommandParams = MagicAddCustomCommandParams; - export type AddCustomEventParams = MagicAddCustomEventParams; - export type AddMiddlewareParams = MagicAddMiddlewareParams; - export type ConfigureParams = MagicConfigureParams; - export type PingParams = MagicPingParams; - export type PongEvent = MagicPongEvent; - export type PingLatency = MagicPingLatency; - export type CommandParams = MagicCommandParams; - export type CommandResult = MagicCommandResult; - export type EvaluateResponse = MagicEvaluateResponse; - export type AddCustomCommandResponse = MagicAddCustomCommandResponse; - export type AddCustomEventResponse = MagicAddCustomEventResponse; - export type AddMiddlewareResponse = MagicAddMiddlewareResponse; - export type ConfigureResponse = MagicConfigureResponse; - export type PingResponse = MagicPingResponse; - export type BindingPayload = MagicBindingPayload; - export type CustomCommandRegistration = MagicCustomCommandRegistration; - export type CustomEventRegistration = MagicCustomEventRegistration; - export type MiddlewareRegistration = MagicMiddlewareRegistration; + export namespace Mod { + export type Routes = CDPModRoutes; + export type CustomPayload = CDPModCustomPayload; + export type NamedValue = CDPModNamedValue; + export type Name = CDPModName; + export type ZodType = CDPModZodType; + export type PayloadShape = CDPModPayloadShape; + export type PayloadSchemaSpec = CDPModPayloadSchemaSpec; + export type EvaluateParams = CDPModEvaluateParams; + export type AddCustomCommandParams = CDPModAddCustomCommandParams; + export type AddCustomEventParams = CDPModAddCustomEventParams; + export type AddMiddlewareParams = CDPModAddMiddlewareParams; + export type ConfigureParams = CDPModConfigureParams; + export type PingParams = CDPModPingParams; + export type PongEvent = CDPModPongEvent; + export type PingLatency = CDPModPingLatency; + export type CommandParams = CDPModCommandParams; + export type CommandResult = CDPModCommandResult; + export type EvaluateResponse = CDPModEvaluateResponse; + export type AddCustomCommandResponse = CDPModAddCustomCommandResponse; + export type AddCustomEventResponse = CDPModAddCustomEventResponse; + export type AddMiddlewareResponse = CDPModAddMiddlewareResponse; + export type ConfigureResponse = CDPModConfigureResponse; + export type PingResponse = CDPModPingResponse; + export type BindingPayload = CDPModBindingPayload; + export type CustomCommandRegistration = CDPModCustomCommandRegistration; + export type CustomEventRegistration = CDPModCustomEventRegistration; + export type MiddlewareRegistration = CDPModMiddlewareRegistration; } export namespace Accessibility { export type AXNodeId = z.infer; diff --git a/types/cdpmod.ts b/types/cdpmod.ts new file mode 100644 index 0000000..15c23f8 --- /dev/null +++ b/types/cdpmod.ts @@ -0,0 +1,420 @@ +/// + +import { z } from "zod"; + +const isZodType = (value: unknown): value is z.ZodType => + value != null && typeof value === "object" && typeof (value as z.ZodType).parse === "function"; + +export const CdpCommandParamsSchema = z.object({}).passthrough(); +export type CdpCommandParams = z.infer; + +export const CdpCommandResultSchema = z.object({}).passthrough(); +export type CdpCommandResult = z.infer; + +export const CdpEventParamsSchema = z.object({}).passthrough(); +export type CdpEventParams = z.infer; + +export const RuntimeBindingCalledEventSchema = z + .object({ + name: z.string(), + payload: z.string(), + executionContextId: z.number().optional(), + }) + .passthrough(); +export type RuntimeBindingCalledEvent = z.infer; + +export const TargetAttachedToTargetEventSchema = z + .object({ + sessionId: z.string(), + targetInfo: z.object({ targetId: z.string() }).passthrough(), + waitingForDebugger: z.boolean(), + }) + .passthrough(); +export type TargetAttachedToTargetEvent = z.infer; + +export const CDPModRoutesSchema = z.object({}).catchall(z.string()); +export type CDPModRoutes = z.infer; + +export const CDPModCustomPayloadSchema = z.object({}).passthrough(); +export type CDPModCustomPayload = z.infer; + +export type CDPModNamedValue = { + cdp_command_name?: string; + cdp_event_name?: string; + id?: string; + name?: string; + meta?: () => { cdp_command_name?: unknown; cdp_event_name?: unknown; id?: unknown; name?: unknown } | undefined; +}; + +export function normalizeCDPModName(value: CDPModName) { + if (typeof value === "string") return value; + const meta = typeof value?.meta === "function" ? value.meta() : undefined; + const name = + value?.cdp_command_name ?? + value?.cdp_event_name ?? + (typeof meta?.cdp_command_name === "string" ? meta.cdp_command_name : undefined) ?? + (typeof meta?.cdp_event_name === "string" ? meta.cdp_event_name : undefined) ?? + value?.id ?? + (typeof meta?.id === "string" ? meta.id : undefined) ?? + (typeof meta?.name === "string" ? meta.name : undefined) ?? + value?.name; + if (typeof name !== "string" || !name) throw new Error("Expected a CDP name string or named CDP schema."); + return name; +} + +export const CDPModNameSchema = z.custom((value) => { + try { + normalizeCDPModName(value as CDPModName); + return true; + } catch { + return false; + } +}); +export type CDPModName = z.infer; + +export const CDPModZodTypeSchema = z.custom(isZodType); +export type CDPModZodType = z.infer; + +export const CDPModPayloadJsonSchemaSchema = z.record(z.string(), z.unknown()); +export const CDPModPayloadShapeSchema = z.record(z.string(), CDPModZodTypeSchema); +export type CDPModPayloadShape = z.infer; + +export const CDPModPayloadSchemaSpecSchema = z.union([ + CDPModZodTypeSchema, + CDPModPayloadShapeSchema, + CDPModPayloadJsonSchemaSchema, +]); +export type CDPModPayloadSchemaSpec = z.infer; + +export function normalizeCDPModPayloadSchema(schema: CDPModPayloadSchemaSpec | null | undefined) { + if (!schema) return null; + if (isZodType(schema)) return schema; + if (Object.values(schema).every(isZodType)) return z.object(schema as CDPModPayloadShape).passthrough(); + if (schema.type === "object") return z.object({}).passthrough(); + throw new Error("Unsupported payload schema; pass a Zod schema, Zod shape, or object JSON schema."); +} + +export const CDPModEvaluateParamsSchema = z.object({ + expression: z.string(), + params: CDPModCustomPayloadSchema.optional(), + cdpSessionId: z.string().nullable().optional(), +}); +export type CDPModEvaluateParams = z.infer; + +export const CDPModAddCustomCommandParamsSchema = z.object({ + name: CDPModNameSchema, + expression: z.string(), + paramsSchema: CDPModPayloadSchemaSpecSchema.nullable().optional(), + resultSchema: CDPModPayloadSchemaSpecSchema.nullable().optional(), +}); +export type CDPModAddCustomCommandParams = z.infer; + +export const CDPModAddCustomEventObjectParamsSchema = z.object({ + name: CDPModNameSchema, + eventSchema: CDPModPayloadSchemaSpecSchema.nullable().optional(), +}); +export type CDPModAddCustomEventObjectParams = z.infer; +export const CDPModAddCustomEventParamsSchema = z.union([CDPModZodTypeSchema, CDPModAddCustomEventObjectParamsSchema]); +export type CDPModAddCustomEventParams = z.infer; + +export const CDPModAddMiddlewareParamsSchema = z.object({ + name: CDPModNameSchema.optional(), + phase: z.enum(["request", "response", "event"]), + expression: z.string(), +}); +export type CDPModAddMiddlewareParams = z.infer; + +export const CDPModConfigureParamsSchema = z.object({ + loopback_cdp_url: z.string().nullable().optional(), + routes: CDPModRoutesSchema.optional(), + browserToken: z.string().nullable().optional(), + custom_commands: z.array(CDPModAddCustomCommandParamsSchema).optional(), + custom_events: z.array(CDPModAddCustomEventObjectParamsSchema).optional(), + custom_middlewares: z.array(CDPModAddMiddlewareParamsSchema).optional(), +}); +export type CDPModConfigureParams = z.infer; + +export const CDPModPingParamsSchema = z.object({ + sentAt: z.number().optional(), +}); +export type CDPModPingParams = z.infer; + +export const CDPModPongEventSchema = z.object({ + sentAt: z.number(), + receivedAt: z.number(), + from: z.string(), +}); +export type CDPModPongEvent = z.infer; + +export const CDPModPingLatencySchema = z.object({ + sentAt: z.number(), + receivedAt: z.number().nullable(), + returnedAt: z.number(), + roundTripMs: z.number(), + serviceWorkerMs: z.number().nullable(), + returnPathMs: z.number().nullable(), +}); +export type CDPModPingLatency = z.infer; + +export const CDPModCommandParamsSchema = z.union([ + CDPModEvaluateParamsSchema, + CDPModAddCustomCommandParamsSchema, + CDPModAddCustomEventParamsSchema, + CDPModAddMiddlewareParamsSchema, + CDPModConfigureParamsSchema, + CDPModPingParamsSchema, + CDPModCustomPayloadSchema, +]); +export type CDPModCommandParams = z.infer; + +export const CDPModCommandResultSchema = z.union([ + z.object({ ok: z.boolean() }).passthrough(), + CDPModCustomPayloadSchema, +]); +export type CDPModCommandResult = z.infer; + +export const CDPModEvaluateResponseSchema = z.unknown(); +export type CDPModEvaluateResponse = z.infer; + +export const CDPModAddCustomCommandResponseSchema = z + .object({ + name: z.string(), + registered: z.boolean(), + }) + .passthrough(); +export type CDPModAddCustomCommandResponse = z.infer; + +export const CDPModAddCustomEventResponseSchema = z + .object({ + name: z.string(), + bindingName: z.string(), + registered: z.boolean(), + }) + .passthrough(); +export type CDPModAddCustomEventResponse = z.infer; + +export const CDPModAddMiddlewareResponseSchema = z + .object({ + name: z.string(), + phase: z.enum(["request", "response", "event"]), + registered: z.boolean(), + }) + .passthrough(); +export type CDPModAddMiddlewareResponse = z.infer; + +export const CDPModConfigureResponseSchema = z + .object({ + loopback_cdp_url: z.string().nullable().optional(), + routes: CDPModRoutesSchema, + }) + .passthrough(); +export type CDPModConfigureResponse = z.infer; + +export const CDPModPingResponseSchema = z + .object({ + ok: z.boolean(), + }) + .passthrough(); +export type CDPModPingResponse = z.infer; + +export const CDPModBindingPayloadSchema = z.object({ + event: z.string(), + data: z.unknown(), + cdpSessionId: z.string().nullable().optional(), +}); +export type CDPModBindingPayload = z.infer; + +export const CdpDebuggeeCommandParamsSchema = CDPModCustomPayloadSchema.extend({ + debuggee: z.custom().nullable().optional(), + tabId: z.number().nullable().optional(), + targetId: z.string().nullable().optional(), + extensionId: z.string().nullable().optional(), +}); +export type CdpDebuggeeCommandParams = z.infer; + +export const ProtocolParamsSchema = z.union([CdpCommandParamsSchema, CDPModCommandParamsSchema]); +export type ProtocolParams = z.infer; + +export const ProtocolResultSchema = z.union([CdpCommandResultSchema, CDPModCommandResultSchema]); +export type ProtocolResult = z.infer; + +export const ProtocolEventParamsSchema = z.union([ + CdpEventParamsSchema, + CDPModPongEventSchema, + CDPModCustomPayloadSchema, +]); +export type ProtocolEventParams = z.infer; + +export const ProtocolPayloadSchema = z.union([ + ProtocolParamsSchema, + ProtocolResultSchema, + ProtocolEventParamsSchema, + CDPModBindingPayloadSchema, + z.null(), +]); +export type ProtocolPayload = z.infer; + +export const CDPModCustomCommandRegistrationSchema = CDPModAddCustomCommandParamsSchema.extend({ + expression: z.string().nullable().optional(), + handler: + z.custom< + (params: ProtocolParams, cdpSessionId: string | null, method?: string) => ProtocolResult | Promise + >(), +}); +export type CDPModCustomCommandRegistration = z.infer; + +export const CDPModCustomEventRegistrationSchema = CDPModAddCustomEventObjectParamsSchema.extend({ + bindingName: z.string(), +}); +export type CDPModCustomEventRegistration = z.infer; + +export const CDPModMiddlewareRegistrationSchema = CDPModAddMiddlewareParamsSchema.extend({ + expression: z.string().nullable().optional(), + handler: + z.custom< + ( + payload: ProtocolPayload, + next: (payload?: ProtocolPayload) => Promise, + context: CDPModCustomPayload, + ) => ProtocolPayload | Promise + >(), +}); +export type CDPModMiddlewareRegistration = z.infer; + +export const CdpErrorSchema = z + .object({ + code: z.number().optional(), + message: z.string(), + data: z.unknown().optional(), + }) + .passthrough(); +export type CdpError = z.infer; + +export const CdpCommandFrameSchema = z + .object({ + id: z.number(), + method: z.string(), + params: ProtocolParamsSchema.optional(), + sessionId: z.string().optional(), + }) + .passthrough(); +export type CdpCommandFrame = z.infer; + +export const CdpResponseFrameSchema = z + .object({ + id: z.number(), + result: ProtocolResultSchema.optional(), + error: CdpErrorSchema.optional(), + sessionId: z.string().optional(), + }) + .passthrough(); +export type CdpResponseFrame = z.infer; + +export const CdpEventFrameSchema = z + .object({ + method: z.string(), + params: ProtocolEventParamsSchema.optional(), + sessionId: z.string().optional(), + }) + .passthrough(); +export type CdpEventFrame = z.infer; + +export const CdpFrameSchema = z.union([CdpCommandFrameSchema, CdpResponseFrameSchema, CdpEventFrameSchema]); +export type CdpFrame = z.infer; + +export const TranslatedStepSchema = z + .object({ + method: z.string(), + params: ProtocolParamsSchema.optional(), + unwrap: z.literal("evaluate").optional(), + }) + .passthrough(); +export type TranslatedStep = z.infer; + +export const TranslatedCommandSchema = z + .object({ + route: z.string(), + target: z.enum(["direct_cdp", "service_worker", "self"]), + steps: z.array(TranslatedStepSchema), + }) + .passthrough(); +export type TranslatedCommand = z.infer; + +export const UnwrappedCDPModEventSchema = z + .object({ + event: z.string(), + data: ProtocolPayloadSchema, + sessionId: z.string().nullable(), + }) + .passthrough(); +export type UnwrappedCDPModEvent = z.infer; + +export const ProxyPendingSchema = z + .object({ + kind: z.string(), + clientId: z.number().optional(), + clientSessionId: z.string().nullable().optional(), + eventName: z.string().optional(), + resolve: z.custom<(value: ProtocolResult) => void>().optional(), + reject: z.custom<(error: Error) => void>().optional(), + }) + .passthrough(); +export type ProxyPending = z.infer; + +export const ProxyUpstreamStateSchema = z + .object({ + url: z.string(), + launched: z.custom>>().nullable(), + launchPromise: z + .promise(z.custom>>()) + .nullable() + .optional(), + }) + .passthrough(); +export type ProxyUpstreamState = z.infer; + +export const ProxyConnectionStateSchema = z.object({ + client: z.custom(), + upstream: z.custom(), + nextUpstreamId: z.number(), + pending: z.custom>(), + extSessionId: z.string().nullable(), + extTargetId: z.string().nullable(), + hiddenSessionIds: z.custom>(), + hiddenTargetIds: z.custom>(), + targetSessionIds: z.custom>(), + clientSessionIds: z.custom>(), + bootstrapped: z.boolean(), + queuedFromClient: z.array(z.custom()), +}); +export type ProxyConnectionState = z.infer; + +export const Mod = { + Routes: CDPModRoutesSchema, + CustomPayload: CDPModCustomPayloadSchema, + Name: CDPModNameSchema, + ZodType: CDPModZodTypeSchema, + PayloadShape: CDPModPayloadShapeSchema, + PayloadSchemaSpec: CDPModPayloadSchemaSpecSchema, + EvaluateParams: CDPModEvaluateParamsSchema, + AddCustomCommandParams: CDPModAddCustomCommandParamsSchema, + AddCustomEventObjectParams: CDPModAddCustomEventObjectParamsSchema, + AddCustomEventParams: CDPModAddCustomEventParamsSchema, + AddMiddlewareParams: CDPModAddMiddlewareParamsSchema, + ConfigureParams: CDPModConfigureParamsSchema, + PingParams: CDPModPingParamsSchema, + PongEvent: CDPModPongEventSchema, + PingLatency: CDPModPingLatencySchema, + CommandParams: CDPModCommandParamsSchema, + CommandResult: CDPModCommandResultSchema, + EvaluateResponse: CDPModEvaluateResponseSchema, + AddCustomCommandResponse: CDPModAddCustomCommandResponseSchema, + AddCustomEventResponse: CDPModAddCustomEventResponseSchema, + AddMiddlewareResponse: CDPModAddMiddlewareResponseSchema, + ConfigureResponse: CDPModConfigureResponseSchema, + PingResponse: CDPModPingResponseSchema, + BindingPayload: CDPModBindingPayloadSchema, + CustomCommandRegistration: CDPModCustomCommandRegistrationSchema, + CustomEventRegistration: CDPModCustomEventRegistrationSchema, + MiddlewareRegistration: CDPModMiddlewareRegistrationSchema, +} as const; diff --git a/types/codegen.ts b/types/codegen.ts old mode 100644 new mode 100755 index 358a6bf..dc98391 --- a/types/codegen.ts +++ b/types/codegen.ts @@ -7,8 +7,10 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; const here = path.dirname(fileURLToPath(import.meta.url)); -const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "magic-cdp-protocol-")); -const meta = await fetch("https://registry.npmjs.org/devtools-protocol/latest").then((r) => r.json()); +const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "cdpmod-protocol-")); +const existing_cdp = fs.existsSync(path.join(here, "cdp.ts")) ? fs.readFileSync(path.join(here, "cdp.ts"), "utf8") : ""; +const protocol_version = existing_cdp.match(/devtools-protocol@([^.\s]+(?:\.[^.\s]+)*)/)?.[1] || "latest"; +const meta = await fetch(`https://registry.npmjs.org/devtools-protocol/${protocol_version}`).then((r) => r.json()); const tgz = path.join(tmp, "devtools-protocol.tgz"); fs.writeFileSync(tgz, Buffer.from((await fetch(meta.dist.tarball).then((r) => r.arrayBuffer())) as ArrayBuffer)); execFileSync("tar", ["-xzf", tgz, "-C", tmp]); @@ -21,16 +23,17 @@ const domains = ["json/js_protocol.json", "json/browser_protocol.json"] const word = (x) => (/^[$A-Z_a-z][$\w]*$/.test(x) ? x : JSON.stringify(x)); const safe = (x) => x.replaceAll(/[^A-Z_a-z0-9]/g, "_").replace(/^(\d)/, "_$1"); const title = (x) => (x ? x[0].toUpperCase() + x.slice(1) : x); -const name = (d, x) => `${safe(d)}_${safe(x)}`; const params = (x) => `${title(x)}Params`; const result = (x) => `${title(x)}Result`; const event = (x) => `${title(x)}Event`; +const domain_file = (d) => safe(d); +const local_name = (x) => safe(x); const zexpr = (x, d) => { if (!x) return "z.unknown()"; if (x.$ref) { const [rd, rn] = x.$ref.includes(".") ? x.$ref.split(".", 2) : [d, x.$ref]; - return `z.lazy(() => ${name(rd, rn)})`; + return `z.lazy(() => ${rd === d ? local_name(rn) : `${domain_file(rd)}.${local_name(rn)}`})`; } if (x.enum) return x.enum.length ? `z.enum([${x.enum.map(JSON.stringify).join(", ")}])` : "z.string()"; if (x.type === "array") return `z.array(${zexpr(x.items, d)})`; @@ -44,14 +47,25 @@ const zexpr = (x, d) => { const zobj = (xs: any[] = [], d: string) => `z.object({ ${xs.map((x) => `${JSON.stringify(x.name)}: ${zexpr(x, d)}${x.optional ? ".optional()" : ""}`).join(", ")} }).passthrough()`; -const magicTypes = [ - ...fs.readFileSync(path.join(here, "magic.ts"), "utf8").matchAll(/^export type Magic([A-Z]\w*)\s*=/gm), -].map((match) => ({ name: match[1], type: `Magic${match[1]}` })); -const magicTypeNames = new Set(magicTypes.map((x) => x.name)); -const magicCommands = magicTypes +const collect_refs = (x, d, refs) => { + if (!x) return; + if (x.$ref) { + const [rd] = x.$ref.includes(".") ? x.$ref.split(".", 2) : [d, x.$ref]; + if (rd !== d) refs.add(rd); + } + if (x.items) collect_refs(x.items, d, refs); + for (const p of x.properties || []) collect_refs(p, d, refs); + for (const p of x.parameters || []) collect_refs(p, d, refs); + for (const p of x.returns || []) collect_refs(p, d, refs); +}; +const cdpmodTypes = [ + ...fs.readFileSync(path.join(here, "cdpmod.ts"), "utf8").matchAll(/^export type CDPMod([A-Z]\w*)\s*=/gm), +].map((match) => ({ name: match[1], type: `CDPMod${match[1]}` })); +const cdpmodTypeNames = new Set(cdpmodTypes.map((x) => x.name)); +const cdpmodCommands = cdpmodTypes .filter((x) => x.name.endsWith("Params")) .map((x) => x.name.slice(0, -"Params".length)) - .filter((base) => magicTypeNames.has(`${base}Response`)); + .filter((base) => cdpmodTypeNames.has(`${base}Response`)); const method = (x) => (x ? x[0].toLowerCase() + x.slice(1) : x); const hasRequiredParams = (x) => (x.parameters || []).some((p) => !p.optional); const hasCommandsOrEvents = (d) => (d.commands || []).length || (d.events || []).length; @@ -71,9 +85,9 @@ const emitCdpNamespace = (lines, indent = "") => { } }; -const emitMagicNamespace = (lines, indent = "") => { - lines.push(`${indent}export namespace Magic {`); - for (const x of magicTypes) lines.push(`${indent} export type ${x.name} = ${x.type};`); +const emitCDPModNamespace = (lines, indent = "") => { + lines.push(`${indent}export namespace Mod {`); + for (const x of cdpmodTypes) lines.push(`${indent} export type ${x.name} = ${x.type};`); lines.push(`${indent}}`); }; @@ -81,7 +95,7 @@ const cdp = [ `// Generated by types/codegen.ts from devtools-protocol@${meta.version}. Do not edit by hand.`, `import { zod, commands, events, types as runtimeTypes } from "./zod.js";`, `import type { z } from "zod";`, - `import type { ${magicTypes.map((x) => x.type).join(", ")} } from "./magic.js";`, + `import type { ${cdpmodTypes.map((x) => x.type).join(", ")} } from "./cdpmod.js";`, ``, `export const REQUEST = "request" as const;`, `export const RESPONSE = "response" as const;`, @@ -95,7 +109,7 @@ const cdp = [ ` export namespace types {`, ` export namespace ts {`, ]; -emitMagicNamespace(cdp, " "); +emitCDPModNamespace(cdp, " "); emitCdpNamespace(cdp, " "); cdp.push(` }`, ` }`, `}`, ``); @@ -104,7 +118,7 @@ const aliases = [ `import type { z } from "zod";`, `import type { cdp } from "./cdp.js";`, `import { commands, events, types as runtimeTypes } from "./zod.js";`, - `import { Magic, normalizeMagicName, normalizeMagicPayloadSchema } from "./magic.js";`, + `import { Mod, normalizeCDPModName, normalizeCDPModPayloadSchema } from "./cdpmod.js";`, ``, `export type CdpNamedValue = { readonly id: Name; readonly name: Name; readonly kind: Kind; meta(): { id: Name; name: Name; kind: Kind } };`, `export type CdpCommandAlias = ((params: Params) => Promise) & CdpNamedValue;`, @@ -142,11 +156,11 @@ for (const d of domains) { } aliases.push(` };`); } -aliases.push(` Magic: {`); -for (const base of magicCommands) { +aliases.push(` Mod: {`); +for (const base of cdpmodCommands) { const optional = base === "Ping"; aliases.push( - ` ${method(base)}(${optional ? "params?" : "params"}: cdp.types.ts.Magic.${base}Params): Promise;`, + ` ${method(base)}(${optional ? "params?" : "params"}: cdp.types.ts.Mod.${base}Params): Promise;`, ); } aliases.push(` };`, `};`, ``); @@ -188,60 +202,63 @@ for (const d of domains) { } aliases.push(` },`); } -aliases.push(` Magic: {`); -for (const base of magicCommands) { +aliases.push(` Mod: {`); +for (const base of cdpmodCommands) { const methodName = method(base); - const commandName = `Magic.${methodName}`; + const commandName = `Mod.${methodName}`; const lines = [ ` ${methodName}: async (params?: unknown) => {`, - ` const parsed = Magic.${base}Params.parse(params ?? {});`, + ` const parsed = Mod.${base}Params.parse(params ?? {});`, ]; if (base === "AddCustomCommand") { lines.push( - ` const name = normalizeMagicName(parsed.name);`, - ` const paramsSchema = normalizeMagicPayloadSchema(parsed.paramsSchema);`, - ` const resultSchema = normalizeMagicPayloadSchema(parsed.resultSchema);`, - ` const response = Magic.${base}Response.parse(await send(${JSON.stringify(commandName)}, { ...parsed, name, paramsSchema: null, resultSchema: null }));`, + ` const name = normalizeCDPModName(parsed.name);`, + ` const paramsSchema = normalizeCDPModPayloadSchema(parsed.paramsSchema);`, + ` const resultSchema = normalizeCDPModPayloadSchema(parsed.resultSchema);`, + ` const response = Mod.${base}Response.parse(await send(${JSON.stringify(commandName)}, { ...parsed, name, paramsSchema: null, resultSchema: null }));`, ` hooks.onCustomCommand?.(name, paramsSchema, resultSchema);`, ` return response;`, ); } else if (base === "AddCustomEvent") { lines.push( - ` const directSchema = Magic.ZodType.safeParse(parsed);`, + ` const directSchema = Mod.ZodType.safeParse(parsed);`, ` if (directSchema.success) {`, - ` const name = normalizeMagicName(directSchema.data);`, - ` const eventSchema = normalizeMagicPayloadSchema(directSchema.data);`, - ` const response = Magic.${base}Response.parse(await send(${JSON.stringify(commandName)}, { name, eventSchema: null }));`, + ` const name = normalizeCDPModName(directSchema.data);`, + ` const eventSchema = normalizeCDPModPayloadSchema(directSchema.data);`, + ` const response = Mod.${base}Response.parse(await send(${JSON.stringify(commandName)}, { name, eventSchema: null }));`, ` hooks.onCustomEvent?.(name, eventSchema);`, ` return response;`, ` }`, - ` const objectParams = Magic.AddCustomEventObjectParams.parse(parsed);`, - ` const name = normalizeMagicName(objectParams.name);`, - ` const eventSchema = normalizeMagicPayloadSchema(objectParams.eventSchema);`, - ` const response = Magic.${base}Response.parse(await send(${JSON.stringify(commandName)}, { ...objectParams, name, eventSchema: null }));`, + ` const objectParams = Mod.AddCustomEventObjectParams.parse(parsed);`, + ` const name = normalizeCDPModName(objectParams.name);`, + ` const eventSchema = normalizeCDPModPayloadSchema(objectParams.eventSchema);`, + ` const response = Mod.${base}Response.parse(await send(${JSON.stringify(commandName)}, { ...objectParams, name, eventSchema: null }));`, ` hooks.onCustomEvent?.(name, eventSchema);`, ` return response;`, ); } else if (base === "AddMiddleware") { lines.push( - ` const name = parsed.name == null ? undefined : normalizeMagicName(parsed.name);`, - ` return Magic.${base}Response.parse(await send(${JSON.stringify(commandName)}, { ...parsed, name }));`, + ` const name = parsed.name == null ? undefined : normalizeCDPModName(parsed.name);`, + ` return Mod.${base}Response.parse(await send(${JSON.stringify(commandName)}, { ...parsed, name }));`, ); } else { - lines.push(` return Magic.${base}Response.parse(await send(${JSON.stringify(commandName)}, parsed));`); + lines.push(` return Mod.${base}Response.parse(await send(${JSON.stringify(commandName)}, parsed));`); } lines.push(` },`); aliases.push(...lines); } aliases.push(` },`, ` };`, `}`, ``); -const zod = [ +const zod_dir = path.join(here, "zod"); +fs.rmSync(zod_dir, { recursive: true, force: true }); +fs.mkdirSync(zod_dir, { recursive: true }); + +const zod_helper = [ `// Generated by types/codegen.ts from devtools-protocol@${meta.version}. Do not edit by hand.`, - `// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references.`, - `import { z } from "zod";`, - `import { Magic } from "./magic.js";`, + `import type { z } from "zod";`, ``, - `const withCdpMeta = (schema, id, kind, extra = {}) => {`, + `export type CdpNamedSchema = T & { readonly id: string; readonly name: string; readonly kind: string; meta(): { id: string; name: string; kind: string } };`, + `export const withCdpMeta = (schema: T, id: string, kind: string, extra = {}): CdpNamedSchema => {`, ` const meta = { id, name: id, kind, ...extra };`, ` const named = schema.meta(meta);`, ` Object.defineProperties(named, {`, @@ -249,52 +266,86 @@ const zod = [ ` name: { value: id, configurable: true },`, ` kind: { value: kind, enumerable: true, configurable: true },`, ` });`, - ` return named;`, + ` return named as CdpNamedSchema;`, `};`, ``, ]; +fs.writeFileSync(path.join(zod_dir, "helpers.ts"), zod_helper.join("\n")); + for (const d of domains) { + const refs = new Set(); + for (const x of d.types || []) collect_refs(x, d.domain, refs); + for (const x of d.commands || []) collect_refs(x, d.domain, refs); + for (const x of d.events || []) collect_refs(x, d.domain, refs); + + const domain_zod = [ + `// Generated by types/codegen.ts from devtools-protocol@${meta.version}. Do not edit by hand.`, + `// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references.`, + `import { z } from "zod";`, + `import { withCdpMeta } from "./helpers.js";`, + ]; + for (const ref of [...refs].sort()) + domain_zod.push(`import * as ${domain_file(ref)} from "./${domain_file(ref)}.js";`); + domain_zod.push(``); + for (const x of d.types || []) - zod.push( - `const ${name(d.domain, x.id)} = withCdpMeta(${zexpr(x, d.domain)}, ${JSON.stringify(`${d.domain}.${x.id}`)}, "type");`, + domain_zod.push( + `export const ${local_name(x.id)} = withCdpMeta(${zexpr(x, d.domain)}, ${JSON.stringify(`${d.domain}.${x.id}`)}, "type");`, ); for (const x of d.commands || []) { const commandName = `${d.domain}.${x.name}`; - zod.push( - `const ${name(d.domain, params(x.name))} = withCdpMeta(${zobj(x.parameters || [], d.domain)}, ${JSON.stringify(`${commandName}.params`)}, "commandParams", { method: ${JSON.stringify(commandName)} });`, + const paramsExpr = + commandName === "CacheStorage.requestCacheNames" + ? `${zobj(x.parameters || [], d.domain)}.refine((value) => [value.securityOrigin, value.storageKey, value.storageBucket].filter((item) => item !== undefined).length === 1, { message: "Exactly one of securityOrigin, storageKey, or storageBucket must be provided." })` + : zobj(x.parameters || [], d.domain); + domain_zod.push( + `export const ${local_name(params(x.name))} = withCdpMeta(${paramsExpr}, ${JSON.stringify(`${commandName}.params`)}, "commandParams", { method: ${JSON.stringify(commandName)} });`, ); - zod.push( - `const ${name(d.domain, result(x.name))} = withCdpMeta(${zobj(x.returns || [], d.domain)}, ${JSON.stringify(`${commandName}.result`)}, "commandResult", { method: ${JSON.stringify(commandName)} });`, + domain_zod.push( + `export const ${local_name(result(x.name))} = withCdpMeta(${zobj(x.returns || [], d.domain)}, ${JSON.stringify(`${commandName}.result`)}, "commandResult", { method: ${JSON.stringify(commandName)} });`, ); } for (const x of d.events || []) - zod.push( - `const ${name(d.domain, event(x.name))} = withCdpMeta(${zobj(x.parameters || [], d.domain)}, ${JSON.stringify(`${d.domain}.${x.name}`)}, "event", { phase: "event" });`, + domain_zod.push( + `export const ${local_name(event(x.name))} = withCdpMeta(${zobj(x.parameters || [], d.domain)}, ${JSON.stringify(`${d.domain}.${x.name}`)}, "event", { phase: "event" });`, ); -} -zod.push(``, `export const zod = {`); -zod.push(` Magic,`); -for (const d of domains) { - zod.push(` ${word(d.domain)}: {`); - for (const x of d.types || []) zod.push(` ${word(x.id)}: ${name(d.domain, x.id)},`); + + domain_zod.push(``, `export const zod = {`); + for (const x of d.types || []) domain_zod.push(` ${word(x.id)}: ${local_name(x.id)},`); for (const x of d.commands || []) - zod.push( - ` ${word(params(x.name))}: ${name(d.domain, params(x.name))},`, - ` ${word(result(x.name))}: ${name(d.domain, result(x.name))},`, + domain_zod.push( + ` ${word(params(x.name))}: ${local_name(params(x.name))},`, + ` ${word(result(x.name))}: ${local_name(result(x.name))},`, ); - for (const x of d.events || []) zod.push(` ${word(event(x.name))}: ${name(d.domain, event(x.name))},`); - zod.push(` },`); -} -zod.push(`} as const;`, `export const commands = {`); -for (const d of domains) + for (const x of d.events || []) domain_zod.push(` ${word(event(x.name))}: ${local_name(event(x.name))},`); + domain_zod.push(`} as const;`, `export const commands = {`); for (const x of d.commands || []) - zod.push( - ` ${JSON.stringify(`${d.domain}.${x.name}`)}: { params: ${name(d.domain, params(x.name))}, result: ${name(d.domain, result(x.name))} },`, + domain_zod.push( + ` ${JSON.stringify(`${d.domain}.${x.name}`)}: { params: ${local_name(params(x.name))}, result: ${local_name(result(x.name))} },`, ); -zod.push(`} as const;`, `export const events = {`); -for (const d of domains) + domain_zod.push(`} as const;`, `export const events = {`); for (const x of d.events || []) - zod.push(` ${JSON.stringify(`${d.domain}.${x.name}`)}: ${name(d.domain, event(x.name))},`); + domain_zod.push(` ${JSON.stringify(`${d.domain}.${x.name}`)}: ${local_name(event(x.name))},`); + domain_zod.push( + `} as const;`, + `export const types = { zod } as const;`, + `export const cdp = { types, commands, events } as const;`, + ``, + ); + fs.writeFileSync(path.join(zod_dir, `${domain_file(d.domain)}.ts`), domain_zod.join("\n")); +} + +const zod = [ + `// Generated by types/codegen.ts from devtools-protocol@${meta.version}. Do not edit by hand.`, + `import { Mod } from "./cdpmod.js";`, +]; +for (const d of domains) zod.push(`import * as ${domain_file(d.domain)} from "./zod/${domain_file(d.domain)}.js";`); +zod.push(``, `export const zod = {`, ` Mod,`); +for (const d of domains) zod.push(` ${word(d.domain)}: ${domain_file(d.domain)}.zod,`); +zod.push(`} as const;`, `export const commands = {`); +for (const d of domains) zod.push(` ...${domain_file(d.domain)}.commands,`); +zod.push(`} as const;`, `export const events = {`); +for (const d of domains) zod.push(` ...${domain_file(d.domain)}.events,`); zod.push( `} as const;`, `export const types = { zod } as const;`, @@ -307,5 +358,5 @@ fs.writeFileSync(path.join(here, "zod.ts"), zod.join("\n")); fs.writeFileSync(path.join(here, "aliases.ts"), aliases.join("\n")); fs.rmSync(tmp, { recursive: true, force: true }); console.log( - `Generated types/cdp.ts, types/zod.ts, and types/aliases.ts from devtools-protocol@${meta.version} (${domains.length} domains).`, + `Generated types/cdp.ts, types/zod.ts, types/zod/*.ts, and types/aliases.ts from devtools-protocol@${meta.version} (${domains.length} domains).`, ); diff --git a/types/magic.ts b/types/magic.ts deleted file mode 100644 index 2fdbf39..0000000 --- a/types/magic.ts +++ /dev/null @@ -1,395 +0,0 @@ -import { z } from "zod"; - -import { commands, events } from "./zod.js"; - -const zodUnion = (schemas: z.ZodType[]) => z.union(schemas as unknown as [z.ZodType, z.ZodType, ...z.ZodType[]]); -const isZodType = (value: unknown): value is z.ZodType => - value != null && typeof value === "object" && typeof (value as z.ZodType).parse === "function"; - -export const CdpCommandParamsSchema = z.lazy(() => zodUnion(Object.values(commands).map((command) => command.params))); -export type CdpCommandParams = z.infer; - -export const CdpCommandResultSchema = z.lazy(() => zodUnion(Object.values(commands).map((command) => command.result))); -export type CdpCommandResult = z.infer; - -export const CdpEventParamsSchema = z.lazy(() => zodUnion(Object.values(events))); -export type CdpEventParams = z.infer; - -export const RuntimeBindingCalledEventSchema = z.lazy(() => events["Runtime.bindingCalled"]); -export type RuntimeBindingCalledEvent = z.infer; - -export const TargetAttachedToTargetEventSchema = z.lazy(() => events["Target.attachedToTarget"]); -export type TargetAttachedToTargetEvent = z.infer; - -export const MagicRoutesSchema = z.object({}).catchall(z.string()); -export type MagicRoutes = z.infer; - -export const MagicCustomPayloadSchema = z.object({}).passthrough(); -export type MagicCustomPayload = z.infer; - -export type MagicNamedValue = { - id?: string; - name?: string; - meta?: () => { id?: unknown; name?: unknown } | undefined; -}; - -export function normalizeMagicName(value: MagicName) { - if (typeof value === "string") return value; - const meta = typeof value?.meta === "function" ? value.meta() : undefined; - const name = - value?.id ?? - (typeof meta?.id === "string" ? meta.id : undefined) ?? - (typeof meta?.name === "string" ? meta.name : undefined) ?? - value?.name; - if (typeof name !== "string" || !name) throw new Error("Expected a CDP name string or a named CDP schema/alias."); - return name; -} - -export const MagicNameSchema = z.custom((value) => { - try { - normalizeMagicName(value as MagicName); - return true; - } catch { - return false; - } -}); -export type MagicName = z.infer; - -export const MagicZodTypeSchema = z.custom(isZodType); -export type MagicZodType = z.infer; - -export const MagicPayloadShapeSchema = z.record(z.string(), MagicZodTypeSchema); -export type MagicPayloadShape = z.infer; - -export const MagicPayloadSchemaSpecSchema = z.union([MagicZodTypeSchema, MagicPayloadShapeSchema]); -export type MagicPayloadSchemaSpec = z.infer; - -export function normalizeMagicPayloadSchema(schema: MagicPayloadSchemaSpec | null | undefined) { - if (!schema) return null; - return isZodType(schema) ? schema : z.object(schema).passthrough(); -} - -export const MagicEvaluateParamsSchema = z.object({ - expression: z.string(), - params: MagicCustomPayloadSchema.optional(), - cdpSessionId: z.string().nullable().optional(), -}); -export type MagicEvaluateParams = z.infer; - -export const MagicAddCustomCommandParamsSchema = z.object({ - name: MagicNameSchema, - expression: z.string(), - paramsSchema: MagicPayloadSchemaSpecSchema.nullable().optional(), - resultSchema: MagicPayloadSchemaSpecSchema.nullable().optional(), -}); -export type MagicAddCustomCommandParams = z.infer; - -export const MagicAddCustomEventObjectParamsSchema = z.object({ - name: MagicNameSchema, - eventSchema: MagicPayloadSchemaSpecSchema.nullable().optional(), -}); -export const MagicAddCustomEventParamsSchema = z.union([MagicZodTypeSchema, MagicAddCustomEventObjectParamsSchema]); -export type MagicAddCustomEventParams = z.infer; - -export const MagicAddMiddlewareParamsSchema = z.object({ - name: MagicNameSchema.optional(), - phase: z.enum(["request", "response", "event"]), - expression: z.string(), -}); -export type MagicAddMiddlewareParams = z.infer; - -export const MagicConfigureParamsSchema = z.object({ - loopback_cdp_url: z.string().nullable().optional(), - routes: MagicRoutesSchema.optional(), - browserToken: z.string().nullable().optional(), -}); -export type MagicConfigureParams = z.infer; - -export const MagicPingParamsSchema = z.object({ - sentAt: z.number().optional(), -}); -export type MagicPingParams = z.infer; - -export const MagicPongEventSchema = z.object({ - sentAt: z.number(), - receivedAt: z.number(), - from: z.string(), -}); -export type MagicPongEvent = z.infer; - -export const MagicPingLatencySchema = z.object({ - sentAt: z.number(), - receivedAt: z.number().nullable(), - returnedAt: z.number(), - roundTripMs: z.number(), - serviceWorkerMs: z.number().nullable(), - returnPathMs: z.number().nullable(), -}); -export type MagicPingLatency = z.infer; - -export const MagicCommandParamsSchema = z.union([ - MagicEvaluateParamsSchema, - MagicAddCustomCommandParamsSchema, - MagicAddCustomEventParamsSchema, - MagicAddMiddlewareParamsSchema, - MagicConfigureParamsSchema, - MagicPingParamsSchema, - MagicCustomPayloadSchema, -]); -export type MagicCommandParams = z.infer; - -export const MagicCommandResultSchema = z.union([ - MagicCustomPayloadSchema, - z.object({ ok: z.boolean() }).passthrough(), -]); -export type MagicCommandResult = z.infer; - -export const MagicEvaluateResponseSchema = z.unknown(); -export type MagicEvaluateResponse = z.infer; - -export const MagicAddCustomCommandResponseSchema = z - .object({ - name: z.string(), - registered: z.boolean(), - }) - .passthrough(); -export type MagicAddCustomCommandResponse = z.infer; - -export const MagicAddCustomEventResponseSchema = z - .object({ - name: z.string(), - bindingName: z.string(), - registered: z.boolean(), - }) - .passthrough(); -export type MagicAddCustomEventResponse = z.infer; - -export const MagicAddMiddlewareResponseSchema = z - .object({ - name: z.string(), - phase: z.enum(["request", "response", "event"]), - registered: z.boolean(), - }) - .passthrough(); -export type MagicAddMiddlewareResponse = z.infer; - -export const MagicConfigureResponseSchema = z - .object({ - loopback_cdp_url: z.string().nullable().optional(), - routes: MagicRoutesSchema, - }) - .passthrough(); -export type MagicConfigureResponse = z.infer; - -export const MagicPingResponseSchema = z - .object({ - ok: z.boolean(), - }) - .passthrough(); -export type MagicPingResponse = z.infer; - -export const MagicBindingPayloadSchema = z.object({ - event: z.string(), - data: z.unknown(), - cdpSessionId: z.string().nullable().optional(), -}); -export type MagicBindingPayload = z.infer; - -export const CdpDebuggeeCommandParamsSchema = MagicCustomPayloadSchema.extend({ - debuggee: z.custom().nullable().optional(), - tabId: z.number().nullable().optional(), - targetId: z.string().nullable().optional(), - extensionId: z.string().nullable().optional(), -}); -export type CdpDebuggeeCommandParams = z.infer; - -export const ProtocolParamsSchema = z.union([CdpCommandParamsSchema, MagicCommandParamsSchema]); -export type ProtocolParams = z.infer; - -export const ProtocolResultSchema = z.union([CdpCommandResultSchema, MagicCommandResultSchema]); -export type ProtocolResult = z.infer; - -export const ProtocolEventParamsSchema = z.union([ - CdpEventParamsSchema, - MagicCustomPayloadSchema, - MagicPongEventSchema, -]); -export type ProtocolEventParams = z.infer; - -export const ProtocolPayloadSchema = z.union([ - ProtocolParamsSchema, - ProtocolResultSchema, - ProtocolEventParamsSchema, - MagicBindingPayloadSchema, - z.null(), -]); -export type ProtocolPayload = z.infer; - -export const MagicCustomCommandRegistrationSchema = MagicAddCustomCommandParamsSchema.extend({ - expression: z.string().nullable().optional(), - handler: - z.custom<(params: ProtocolParams, cdpSessionId: string | null) => ProtocolResult | Promise>(), -}); -export type MagicCustomCommandRegistration = z.infer; - -export const MagicCustomEventRegistrationSchema = MagicAddCustomEventObjectParamsSchema.extend({ - bindingName: z.string(), -}); -export type MagicCustomEventRegistration = z.infer; - -export const MagicMiddlewareRegistrationSchema = MagicAddMiddlewareParamsSchema.extend({ - handler: - z.custom< - ( - payload: ProtocolPayload, - next: (payload?: ProtocolPayload) => Promise, - context: MagicCustomPayload, - ) => ProtocolPayload | Promise - >(), -}); -export type MagicMiddlewareRegistration = z.infer; - -export const CdpErrorSchema = z - .object({ - code: z.number().optional(), - message: z.string(), - data: z.unknown().optional(), - }) - .passthrough(); -export type CdpError = z.infer; - -export const CdpCommandFrameSchema = z - .object({ - id: z.number(), - method: z.string(), - params: ProtocolParamsSchema.optional(), - sessionId: z.string().optional(), - }) - .passthrough(); -export type CdpCommandFrame = z.infer; - -export const CdpResponseFrameSchema = z - .object({ - id: z.number(), - result: z.lazy(() => z.union([ProtocolResultSchema, commands["Runtime.evaluate"].result])).optional(), - error: CdpErrorSchema.optional(), - sessionId: z.string().optional(), - }) - .passthrough(); -export type CdpResponseFrame = z.infer; - -export const CdpEventFrameSchema = z - .object({ - method: z.string(), - params: z - .lazy(() => - z.union([ProtocolEventParamsSchema, events["Runtime.bindingCalled"], events["Target.attachedToTarget"]]), - ) - .optional(), - sessionId: z.string().optional(), - }) - .passthrough(); -export type CdpEventFrame = z.infer; - -export const CdpFrameSchema = z.union([CdpCommandFrameSchema, CdpResponseFrameSchema, CdpEventFrameSchema]); -export type CdpFrame = z.infer; - -export const TranslatedStepSchema = z - .object({ - method: z.string(), - params: z - .lazy(() => - z.union([ProtocolParamsSchema, commands["Runtime.evaluate"].params, commands["Runtime.addBinding"].params]), - ) - .optional(), - unwrap: z.literal("evaluate").optional(), - }) - .passthrough(); -export type TranslatedStep = z.infer; - -export const TranslatedCommandSchema = z - .object({ - route: z.string(), - target: z.enum(["direct_cdp", "service_worker"]), - steps: z.array(TranslatedStepSchema), - }) - .passthrough(); -export type TranslatedCommand = z.infer; - -export const UnwrappedMagicEventSchema = z - .object({ - event: z.string(), - data: ProtocolPayloadSchema, - sessionId: z.string().nullable(), - }) - .passthrough(); -export type UnwrappedMagicEvent = z.infer; - -export const ProxyPendingSchema = z - .object({ - kind: z.string(), - clientId: z.number().optional(), - clientSessionId: z.string().nullable().optional(), - eventName: z.string().optional(), - resolve: z.custom<(value: ProtocolResult) => void>().optional(), - reject: z.custom<(error: Error) => void>().optional(), - }) - .passthrough(); -export type ProxyPending = z.infer; - -export const ProxyUpstreamStateSchema = z - .object({ - url: z.string(), - launched: z.custom>>().nullable(), - launchPromise: z - .promise(z.custom>>()) - .nullable() - .optional(), - }) - .passthrough(); -export type ProxyUpstreamState = z.infer; - -export const ProxyConnectionStateSchema = z.object({ - client: z.custom(), - upstream: z.custom(), - nextUpstreamId: z.number(), - pending: z.custom>(), - extSessionId: z.string().nullable(), - extTargetId: z.string().nullable(), - hiddenSessionIds: z.custom>(), - hiddenTargetIds: z.custom>(), - clientSessionIds: z.custom>(), - bootstrapped: z.boolean(), - queuedFromClient: z.array(z.custom()), -}); -export type ProxyConnectionState = z.infer; - -export const Magic = { - Routes: MagicRoutesSchema, - CustomPayload: MagicCustomPayloadSchema, - Name: MagicNameSchema, - ZodType: MagicZodTypeSchema, - PayloadShape: MagicPayloadShapeSchema, - PayloadSchemaSpec: MagicPayloadSchemaSpecSchema, - EvaluateParams: MagicEvaluateParamsSchema, - AddCustomCommandParams: MagicAddCustomCommandParamsSchema, - AddCustomEventObjectParams: MagicAddCustomEventObjectParamsSchema, - AddCustomEventParams: MagicAddCustomEventParamsSchema, - AddMiddlewareParams: MagicAddMiddlewareParamsSchema, - ConfigureParams: MagicConfigureParamsSchema, - PingParams: MagicPingParamsSchema, - PongEvent: MagicPongEventSchema, - PingLatency: MagicPingLatencySchema, - CommandParams: MagicCommandParamsSchema, - CommandResult: MagicCommandResultSchema, - EvaluateResponse: MagicEvaluateResponseSchema, - AddCustomCommandResponse: MagicAddCustomCommandResponseSchema, - AddCustomEventResponse: MagicAddCustomEventResponseSchema, - AddMiddlewareResponse: MagicAddMiddlewareResponseSchema, - ConfigureResponse: MagicConfigureResponseSchema, - PingResponse: MagicPingResponseSchema, - BindingPayload: MagicBindingPayloadSchema, - CustomCommandRegistration: MagicCustomCommandRegistrationSchema, - CustomEventRegistration: MagicCustomEventRegistrationSchema, - MiddlewareRegistration: MagicMiddlewareRegistrationSchema, -} as const; diff --git a/types/zod.ts b/types/zod.ts index b935704..58d8e55 100644 --- a/types/zod.ts +++ b/types/zod.ts @@ -1,5402 +1,236 @@ // Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. -// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. -import { z } from "zod"; -import { Magic } from "./magic.js"; - -const withCdpMeta = (schema, id, kind, extra = {}) => { - const meta = { id, name: id, kind, ...extra }; - const named = schema.meta(meta); - Object.defineProperties(named, { - id: { value: id, enumerable: true, configurable: true }, - name: { value: id, configurable: true }, - kind: { value: kind, enumerable: true, configurable: true }, - }); - return named; -}; - -const Accessibility_AXNodeId = withCdpMeta(z.string(), "Accessibility.AXNodeId", "type"); -const Accessibility_AXValueType = withCdpMeta(z.enum(["boolean", "tristate", "booleanOrUndefined", "idref", "idrefList", "integer", "node", "nodeList", "number", "string", "computedString", "token", "tokenList", "domRelation", "role", "internalRole", "valueUndefined"]), "Accessibility.AXValueType", "type"); -const Accessibility_AXValueSourceType = withCdpMeta(z.enum(["attribute", "implicit", "style", "contents", "placeholder", "relatedElement"]), "Accessibility.AXValueSourceType", "type"); -const Accessibility_AXValueNativeSourceType = withCdpMeta(z.enum(["description", "figcaption", "label", "labelfor", "labelwrapped", "legend", "rubyannotation", "tablecaption", "title", "other"]), "Accessibility.AXValueNativeSourceType", "type"); -const Accessibility_AXValueSource = withCdpMeta(z.object({ "type": z.lazy(() => Accessibility_AXValueSourceType), "value": z.lazy(() => Accessibility_AXValue).optional(), "attribute": z.string().optional(), "attributeValue": z.lazy(() => Accessibility_AXValue).optional(), "superseded": z.boolean().optional(), "nativeSource": z.lazy(() => Accessibility_AXValueNativeSourceType).optional(), "nativeSourceValue": z.lazy(() => Accessibility_AXValue).optional(), "invalid": z.boolean().optional(), "invalidReason": z.string().optional() }).passthrough(), "Accessibility.AXValueSource", "type"); -const Accessibility_AXRelatedNode = withCdpMeta(z.object({ "backendDOMNodeId": z.lazy(() => DOM_BackendNodeId), "idref": z.string().optional(), "text": z.string().optional() }).passthrough(), "Accessibility.AXRelatedNode", "type"); -const Accessibility_AXProperty = withCdpMeta(z.object({ "name": z.lazy(() => Accessibility_AXPropertyName), "value": z.lazy(() => Accessibility_AXValue) }).passthrough(), "Accessibility.AXProperty", "type"); -const Accessibility_AXValue = withCdpMeta(z.object({ "type": z.lazy(() => Accessibility_AXValueType), "value": z.any().optional(), "relatedNodes": z.array(z.lazy(() => Accessibility_AXRelatedNode)).optional(), "sources": z.array(z.lazy(() => Accessibility_AXValueSource)).optional() }).passthrough(), "Accessibility.AXValue", "type"); -const Accessibility_AXPropertyName = withCdpMeta(z.enum(["actions", "busy", "disabled", "editable", "focusable", "focused", "hidden", "hiddenRoot", "invalid", "keyshortcuts", "settable", "roledescription", "live", "atomic", "relevant", "root", "autocomplete", "hasPopup", "level", "multiselectable", "orientation", "multiline", "readonly", "required", "valuemin", "valuemax", "valuetext", "checked", "expanded", "modal", "pressed", "selected", "activedescendant", "controls", "describedby", "details", "errormessage", "flowto", "labelledby", "owns", "url", "activeFullscreenElement", "activeModalDialog", "activeAriaModalDialog", "ariaHiddenElement", "ariaHiddenSubtree", "emptyAlt", "emptyText", "inertElement", "inertSubtree", "labelContainer", "labelFor", "notRendered", "notVisible", "presentationalRole", "probablyPresentational", "inactiveCarouselTabContent", "uninteresting"]), "Accessibility.AXPropertyName", "type"); -const Accessibility_AXNode = withCdpMeta(z.object({ "nodeId": z.lazy(() => Accessibility_AXNodeId), "ignored": z.boolean(), "ignoredReasons": z.array(z.lazy(() => Accessibility_AXProperty)).optional(), "role": z.lazy(() => Accessibility_AXValue).optional(), "chromeRole": z.lazy(() => Accessibility_AXValue).optional(), "name": z.lazy(() => Accessibility_AXValue).optional(), "description": z.lazy(() => Accessibility_AXValue).optional(), "value": z.lazy(() => Accessibility_AXValue).optional(), "properties": z.array(z.lazy(() => Accessibility_AXProperty)).optional(), "parentId": z.lazy(() => Accessibility_AXNodeId).optional(), "childIds": z.array(z.lazy(() => Accessibility_AXNodeId)).optional(), "backendDOMNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "frameId": z.lazy(() => Page_FrameId).optional() }).passthrough(), "Accessibility.AXNode", "type"); -const Accessibility_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Accessibility.disable.params", "commandParams", { method: "Accessibility.disable" }); -const Accessibility_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Accessibility.disable.result", "commandResult", { method: "Accessibility.disable" }); -const Accessibility_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Accessibility.enable.params", "commandParams", { method: "Accessibility.enable" }); -const Accessibility_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Accessibility.enable.result", "commandResult", { method: "Accessibility.enable" }); -const Accessibility_GetPartialAXTreeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional(), "fetchRelatives": z.boolean().optional() }).passthrough(), "Accessibility.getPartialAXTree.params", "commandParams", { method: "Accessibility.getPartialAXTree" }); -const Accessibility_GetPartialAXTreeResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => Accessibility_AXNode)) }).passthrough(), "Accessibility.getPartialAXTree.result", "commandResult", { method: "Accessibility.getPartialAXTree" }); -const Accessibility_GetFullAXTreeParams = withCdpMeta(z.object({ "depth": z.number().int().optional(), "frameId": z.lazy(() => Page_FrameId).optional() }).passthrough(), "Accessibility.getFullAXTree.params", "commandParams", { method: "Accessibility.getFullAXTree" }); -const Accessibility_GetFullAXTreeResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => Accessibility_AXNode)) }).passthrough(), "Accessibility.getFullAXTree.result", "commandResult", { method: "Accessibility.getFullAXTree" }); -const Accessibility_GetRootAXNodeParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId).optional() }).passthrough(), "Accessibility.getRootAXNode.params", "commandParams", { method: "Accessibility.getRootAXNode" }); -const Accessibility_GetRootAXNodeResult = withCdpMeta(z.object({ "node": z.lazy(() => Accessibility_AXNode) }).passthrough(), "Accessibility.getRootAXNode.result", "commandResult", { method: "Accessibility.getRootAXNode" }); -const Accessibility_GetAXNodeAndAncestorsParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional() }).passthrough(), "Accessibility.getAXNodeAndAncestors.params", "commandParams", { method: "Accessibility.getAXNodeAndAncestors" }); -const Accessibility_GetAXNodeAndAncestorsResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => Accessibility_AXNode)) }).passthrough(), "Accessibility.getAXNodeAndAncestors.result", "commandResult", { method: "Accessibility.getAXNodeAndAncestors" }); -const Accessibility_GetChildAXNodesParams = withCdpMeta(z.object({ "id": z.lazy(() => Accessibility_AXNodeId), "frameId": z.lazy(() => Page_FrameId).optional() }).passthrough(), "Accessibility.getChildAXNodes.params", "commandParams", { method: "Accessibility.getChildAXNodes" }); -const Accessibility_GetChildAXNodesResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => Accessibility_AXNode)) }).passthrough(), "Accessibility.getChildAXNodes.result", "commandResult", { method: "Accessibility.getChildAXNodes" }); -const Accessibility_QueryAXTreeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional(), "accessibleName": z.string().optional(), "role": z.string().optional() }).passthrough(), "Accessibility.queryAXTree.params", "commandParams", { method: "Accessibility.queryAXTree" }); -const Accessibility_QueryAXTreeResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => Accessibility_AXNode)) }).passthrough(), "Accessibility.queryAXTree.result", "commandResult", { method: "Accessibility.queryAXTree" }); -const Accessibility_LoadCompleteEvent = withCdpMeta(z.object({ "root": z.lazy(() => Accessibility_AXNode) }).passthrough(), "Accessibility.loadComplete", "event", { phase: "event" }); -const Accessibility_NodesUpdatedEvent = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => Accessibility_AXNode)) }).passthrough(), "Accessibility.nodesUpdated", "event", { phase: "event" }); -const Animation_Animation = withCdpMeta(z.object({ "id": z.string(), "name": z.string(), "pausedState": z.boolean(), "playState": z.string(), "playbackRate": z.number(), "startTime": z.number(), "currentTime": z.number(), "type": z.enum(["CSSTransition", "CSSAnimation", "WebAnimation"]), "source": z.lazy(() => Animation_AnimationEffect).optional(), "cssId": z.string().optional(), "viewOrScrollTimeline": z.lazy(() => Animation_ViewOrScrollTimeline).optional() }).passthrough(), "Animation.Animation", "type"); -const Animation_ViewOrScrollTimeline = withCdpMeta(z.object({ "sourceNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "startOffset": z.number().optional(), "endOffset": z.number().optional(), "subjectNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "axis": z.lazy(() => DOM_ScrollOrientation) }).passthrough(), "Animation.ViewOrScrollTimeline", "type"); -const Animation_AnimationEffect = withCdpMeta(z.object({ "delay": z.number(), "endDelay": z.number(), "iterationStart": z.number(), "iterations": z.number().optional(), "duration": z.number(), "direction": z.string(), "fill": z.string(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "keyframesRule": z.lazy(() => Animation_KeyframesRule).optional(), "easing": z.string() }).passthrough(), "Animation.AnimationEffect", "type"); -const Animation_KeyframesRule = withCdpMeta(z.object({ "name": z.string().optional(), "keyframes": z.array(z.lazy(() => Animation_KeyframeStyle)) }).passthrough(), "Animation.KeyframesRule", "type"); -const Animation_KeyframeStyle = withCdpMeta(z.object({ "offset": z.string(), "easing": z.string() }).passthrough(), "Animation.KeyframeStyle", "type"); -const Animation_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Animation.disable.params", "commandParams", { method: "Animation.disable" }); -const Animation_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Animation.disable.result", "commandResult", { method: "Animation.disable" }); -const Animation_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Animation.enable.params", "commandParams", { method: "Animation.enable" }); -const Animation_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Animation.enable.result", "commandResult", { method: "Animation.enable" }); -const Animation_GetCurrentTimeParams = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Animation.getCurrentTime.params", "commandParams", { method: "Animation.getCurrentTime" }); -const Animation_GetCurrentTimeResult = withCdpMeta(z.object({ "currentTime": z.number() }).passthrough(), "Animation.getCurrentTime.result", "commandResult", { method: "Animation.getCurrentTime" }); -const Animation_GetPlaybackRateParams = withCdpMeta(z.object({ }).passthrough(), "Animation.getPlaybackRate.params", "commandParams", { method: "Animation.getPlaybackRate" }); -const Animation_GetPlaybackRateResult = withCdpMeta(z.object({ "playbackRate": z.number() }).passthrough(), "Animation.getPlaybackRate.result", "commandResult", { method: "Animation.getPlaybackRate" }); -const Animation_ReleaseAnimationsParams = withCdpMeta(z.object({ "animations": z.array(z.string()) }).passthrough(), "Animation.releaseAnimations.params", "commandParams", { method: "Animation.releaseAnimations" }); -const Animation_ReleaseAnimationsResult = withCdpMeta(z.object({ }).passthrough(), "Animation.releaseAnimations.result", "commandResult", { method: "Animation.releaseAnimations" }); -const Animation_ResolveAnimationParams = withCdpMeta(z.object({ "animationId": z.string() }).passthrough(), "Animation.resolveAnimation.params", "commandParams", { method: "Animation.resolveAnimation" }); -const Animation_ResolveAnimationResult = withCdpMeta(z.object({ "remoteObject": z.lazy(() => Runtime_RemoteObject) }).passthrough(), "Animation.resolveAnimation.result", "commandResult", { method: "Animation.resolveAnimation" }); -const Animation_SeekAnimationsParams = withCdpMeta(z.object({ "animations": z.array(z.string()), "currentTime": z.number() }).passthrough(), "Animation.seekAnimations.params", "commandParams", { method: "Animation.seekAnimations" }); -const Animation_SeekAnimationsResult = withCdpMeta(z.object({ }).passthrough(), "Animation.seekAnimations.result", "commandResult", { method: "Animation.seekAnimations" }); -const Animation_SetPausedParams = withCdpMeta(z.object({ "animations": z.array(z.string()), "paused": z.boolean() }).passthrough(), "Animation.setPaused.params", "commandParams", { method: "Animation.setPaused" }); -const Animation_SetPausedResult = withCdpMeta(z.object({ }).passthrough(), "Animation.setPaused.result", "commandResult", { method: "Animation.setPaused" }); -const Animation_SetPlaybackRateParams = withCdpMeta(z.object({ "playbackRate": z.number() }).passthrough(), "Animation.setPlaybackRate.params", "commandParams", { method: "Animation.setPlaybackRate" }); -const Animation_SetPlaybackRateResult = withCdpMeta(z.object({ }).passthrough(), "Animation.setPlaybackRate.result", "commandResult", { method: "Animation.setPlaybackRate" }); -const Animation_SetTimingParams = withCdpMeta(z.object({ "animationId": z.string(), "duration": z.number(), "delay": z.number() }).passthrough(), "Animation.setTiming.params", "commandParams", { method: "Animation.setTiming" }); -const Animation_SetTimingResult = withCdpMeta(z.object({ }).passthrough(), "Animation.setTiming.result", "commandResult", { method: "Animation.setTiming" }); -const Animation_AnimationCanceledEvent = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Animation.animationCanceled", "event", { phase: "event" }); -const Animation_AnimationCreatedEvent = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Animation.animationCreated", "event", { phase: "event" }); -const Animation_AnimationStartedEvent = withCdpMeta(z.object({ "animation": z.lazy(() => Animation_Animation) }).passthrough(), "Animation.animationStarted", "event", { phase: "event" }); -const Animation_AnimationUpdatedEvent = withCdpMeta(z.object({ "animation": z.lazy(() => Animation_Animation) }).passthrough(), "Animation.animationUpdated", "event", { phase: "event" }); -const Audits_AffectedCookie = withCdpMeta(z.object({ "name": z.string(), "path": z.string(), "domain": z.string() }).passthrough(), "Audits.AffectedCookie", "type"); -const Audits_AffectedRequest = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId).optional(), "url": z.string() }).passthrough(), "Audits.AffectedRequest", "type"); -const Audits_AffectedFrame = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "Audits.AffectedFrame", "type"); -const Audits_CookieExclusionReason = withCdpMeta(z.enum(["ExcludeSameSiteUnspecifiedTreatedAsLax", "ExcludeSameSiteNoneInsecure", "ExcludeSameSiteLax", "ExcludeSameSiteStrict", "ExcludeDomainNonASCII", "ExcludeThirdPartyCookieBlockedInFirstPartySet", "ExcludeThirdPartyPhaseout", "ExcludePortMismatch", "ExcludeSchemeMismatch"]), "Audits.CookieExclusionReason", "type"); -const Audits_CookieWarningReason = withCdpMeta(z.enum(["WarnSameSiteUnspecifiedCrossSiteContext", "WarnSameSiteNoneInsecure", "WarnSameSiteUnspecifiedLaxAllowUnsafe", "WarnSameSiteStrictLaxDowngradeStrict", "WarnSameSiteStrictCrossDowngradeStrict", "WarnSameSiteStrictCrossDowngradeLax", "WarnSameSiteLaxCrossDowngradeStrict", "WarnSameSiteLaxCrossDowngradeLax", "WarnAttributeValueExceedsMaxSize", "WarnDomainNonASCII", "WarnThirdPartyPhaseout", "WarnCrossSiteRedirectDowngradeChangesInclusion", "WarnDeprecationTrialMetadata", "WarnThirdPartyCookieHeuristic"]), "Audits.CookieWarningReason", "type"); -const Audits_CookieOperation = withCdpMeta(z.enum(["SetCookie", "ReadCookie"]), "Audits.CookieOperation", "type"); -const Audits_InsightType = withCdpMeta(z.enum(["GitHubResource", "GracePeriod", "Heuristics"]), "Audits.InsightType", "type"); -const Audits_CookieIssueInsight = withCdpMeta(z.object({ "type": z.lazy(() => Audits_InsightType), "tableEntryUrl": z.string().optional() }).passthrough(), "Audits.CookieIssueInsight", "type"); -const Audits_CookieIssueDetails = withCdpMeta(z.object({ "cookie": z.lazy(() => Audits_AffectedCookie).optional(), "rawCookieLine": z.string().optional(), "cookieWarningReasons": z.array(z.lazy(() => Audits_CookieWarningReason)), "cookieExclusionReasons": z.array(z.lazy(() => Audits_CookieExclusionReason)), "operation": z.lazy(() => Audits_CookieOperation), "siteForCookies": z.string().optional(), "cookieUrl": z.string().optional(), "request": z.lazy(() => Audits_AffectedRequest).optional(), "insight": z.lazy(() => Audits_CookieIssueInsight).optional() }).passthrough(), "Audits.CookieIssueDetails", "type"); -const Audits_PerformanceIssueType = withCdpMeta(z.enum(["DocumentCookie"]), "Audits.PerformanceIssueType", "type"); -const Audits_PerformanceIssueDetails = withCdpMeta(z.object({ "performanceIssueType": z.lazy(() => Audits_PerformanceIssueType), "sourceCodeLocation": z.lazy(() => Audits_SourceCodeLocation).optional() }).passthrough(), "Audits.PerformanceIssueDetails", "type"); -const Audits_MixedContentResolutionStatus = withCdpMeta(z.enum(["MixedContentBlocked", "MixedContentAutomaticallyUpgraded", "MixedContentWarning"]), "Audits.MixedContentResolutionStatus", "type"); -const Audits_MixedContentResourceType = withCdpMeta(z.enum(["AttributionSrc", "Audio", "Beacon", "CSPReport", "Download", "EventSource", "Favicon", "Font", "Form", "Frame", "Image", "Import", "JSON", "Manifest", "Ping", "PluginData", "PluginResource", "Prefetch", "Resource", "Script", "ServiceWorker", "SharedWorker", "SpeculationRules", "Stylesheet", "Track", "Video", "Worker", "XMLHttpRequest", "XSLT"]), "Audits.MixedContentResourceType", "type"); -const Audits_MixedContentIssueDetails = withCdpMeta(z.object({ "resourceType": z.lazy(() => Audits_MixedContentResourceType).optional(), "resolutionStatus": z.lazy(() => Audits_MixedContentResolutionStatus), "insecureURL": z.string(), "mainResourceURL": z.string(), "request": z.lazy(() => Audits_AffectedRequest).optional(), "frame": z.lazy(() => Audits_AffectedFrame).optional() }).passthrough(), "Audits.MixedContentIssueDetails", "type"); -const Audits_BlockedByResponseReason = withCdpMeta(z.enum(["CoepFrameResourceNeedsCoepHeader", "CoopSandboxedIFrameCannotNavigateToCoopPage", "CorpNotSameOrigin", "CorpNotSameOriginAfterDefaultedToSameOriginByCoep", "CorpNotSameOriginAfterDefaultedToSameOriginByDip", "CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip", "CorpNotSameSite", "SRIMessageSignatureMismatch"]), "Audits.BlockedByResponseReason", "type"); -const Audits_BlockedByResponseIssueDetails = withCdpMeta(z.object({ "request": z.lazy(() => Audits_AffectedRequest), "parentFrame": z.lazy(() => Audits_AffectedFrame).optional(), "blockedFrame": z.lazy(() => Audits_AffectedFrame).optional(), "reason": z.lazy(() => Audits_BlockedByResponseReason) }).passthrough(), "Audits.BlockedByResponseIssueDetails", "type"); -const Audits_HeavyAdResolutionStatus = withCdpMeta(z.enum(["HeavyAdBlocked", "HeavyAdWarning"]), "Audits.HeavyAdResolutionStatus", "type"); -const Audits_HeavyAdReason = withCdpMeta(z.enum(["NetworkTotalLimit", "CpuTotalLimit", "CpuPeakLimit"]), "Audits.HeavyAdReason", "type"); -const Audits_HeavyAdIssueDetails = withCdpMeta(z.object({ "resolution": z.lazy(() => Audits_HeavyAdResolutionStatus), "reason": z.lazy(() => Audits_HeavyAdReason), "frame": z.lazy(() => Audits_AffectedFrame) }).passthrough(), "Audits.HeavyAdIssueDetails", "type"); -const Audits_ContentSecurityPolicyViolationType = withCdpMeta(z.enum(["kInlineViolation", "kEvalViolation", "kURLViolation", "kSRIViolation", "kTrustedTypesSinkViolation", "kTrustedTypesPolicyViolation", "kWasmEvalViolation"]), "Audits.ContentSecurityPolicyViolationType", "type"); -const Audits_SourceCodeLocation = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId).optional(), "url": z.string(), "lineNumber": z.number().int(), "columnNumber": z.number().int() }).passthrough(), "Audits.SourceCodeLocation", "type"); -const Audits_ContentSecurityPolicyIssueDetails = withCdpMeta(z.object({ "blockedURL": z.string().optional(), "violatedDirective": z.string(), "isReportOnly": z.boolean(), "contentSecurityPolicyViolationType": z.lazy(() => Audits_ContentSecurityPolicyViolationType), "frameAncestor": z.lazy(() => Audits_AffectedFrame).optional(), "sourceCodeLocation": z.lazy(() => Audits_SourceCodeLocation).optional(), "violatingNodeId": z.lazy(() => DOM_BackendNodeId).optional() }).passthrough(), "Audits.ContentSecurityPolicyIssueDetails", "type"); -const Audits_SharedArrayBufferIssueType = withCdpMeta(z.enum(["TransferIssue", "CreationIssue"]), "Audits.SharedArrayBufferIssueType", "type"); -const Audits_SharedArrayBufferIssueDetails = withCdpMeta(z.object({ "sourceCodeLocation": z.lazy(() => Audits_SourceCodeLocation), "isWarning": z.boolean(), "type": z.lazy(() => Audits_SharedArrayBufferIssueType) }).passthrough(), "Audits.SharedArrayBufferIssueDetails", "type"); -const Audits_CorsIssueDetails = withCdpMeta(z.object({ "corsErrorStatus": z.lazy(() => Network_CorsErrorStatus), "isWarning": z.boolean(), "request": z.lazy(() => Audits_AffectedRequest), "location": z.lazy(() => Audits_SourceCodeLocation).optional(), "initiatorOrigin": z.string().optional(), "resourceIPAddressSpace": z.lazy(() => Network_IPAddressSpace).optional(), "clientSecurityState": z.lazy(() => Network_ClientSecurityState).optional() }).passthrough(), "Audits.CorsIssueDetails", "type"); -const Audits_AttributionReportingIssueType = withCdpMeta(z.enum(["PermissionPolicyDisabled", "UntrustworthyReportingOrigin", "InsecureContext", "InvalidHeader", "InvalidRegisterTriggerHeader", "SourceAndTriggerHeaders", "SourceIgnored", "TriggerIgnored", "OsSourceIgnored", "OsTriggerIgnored", "InvalidRegisterOsSourceHeader", "InvalidRegisterOsTriggerHeader", "WebAndOsHeaders", "NoWebOrOsSupport", "NavigationRegistrationWithoutTransientUserActivation", "InvalidInfoHeader", "NoRegisterSourceHeader", "NoRegisterTriggerHeader", "NoRegisterOsSourceHeader", "NoRegisterOsTriggerHeader", "NavigationRegistrationUniqueScopeAlreadySet"]), "Audits.AttributionReportingIssueType", "type"); -const Audits_SharedDictionaryError = withCdpMeta(z.enum(["UseErrorCrossOriginNoCorsRequest", "UseErrorDictionaryLoadFailure", "UseErrorMatchingDictionaryNotUsed", "UseErrorUnexpectedContentDictionaryHeader", "WriteErrorCossOriginNoCorsRequest", "WriteErrorDisallowedBySettings", "WriteErrorExpiredResponse", "WriteErrorFeatureDisabled", "WriteErrorInsufficientResources", "WriteErrorInvalidMatchField", "WriteErrorInvalidStructuredHeader", "WriteErrorInvalidTTLField", "WriteErrorNavigationRequest", "WriteErrorNoMatchField", "WriteErrorNonIntegerTTLField", "WriteErrorNonListMatchDestField", "WriteErrorNonSecureContext", "WriteErrorNonStringIdField", "WriteErrorNonStringInMatchDestList", "WriteErrorNonStringMatchField", "WriteErrorNonTokenTypeField", "WriteErrorRequestAborted", "WriteErrorShuttingDown", "WriteErrorTooLongIdField", "WriteErrorUnsupportedType"]), "Audits.SharedDictionaryError", "type"); -const Audits_SRIMessageSignatureError = withCdpMeta(z.enum(["MissingSignatureHeader", "MissingSignatureInputHeader", "InvalidSignatureHeader", "InvalidSignatureInputHeader", "SignatureHeaderValueIsNotByteSequence", "SignatureHeaderValueIsParameterized", "SignatureHeaderValueIsIncorrectLength", "SignatureInputHeaderMissingLabel", "SignatureInputHeaderValueNotInnerList", "SignatureInputHeaderValueMissingComponents", "SignatureInputHeaderInvalidComponentType", "SignatureInputHeaderInvalidComponentName", "SignatureInputHeaderInvalidHeaderComponentParameter", "SignatureInputHeaderInvalidDerivedComponentParameter", "SignatureInputHeaderKeyIdLength", "SignatureInputHeaderInvalidParameter", "SignatureInputHeaderMissingRequiredParameters", "ValidationFailedSignatureExpired", "ValidationFailedInvalidLength", "ValidationFailedSignatureMismatch", "ValidationFailedIntegrityMismatch"]), "Audits.SRIMessageSignatureError", "type"); -const Audits_UnencodedDigestError = withCdpMeta(z.enum(["MalformedDictionary", "UnknownAlgorithm", "IncorrectDigestType", "IncorrectDigestLength"]), "Audits.UnencodedDigestError", "type"); -const Audits_ConnectionAllowlistError = withCdpMeta(z.enum(["InvalidHeader", "MoreThanOneList", "ItemNotInnerList", "InvalidAllowlistItemType", "ReportingEndpointNotToken", "InvalidUrlPattern"]), "Audits.ConnectionAllowlistError", "type"); -const Audits_AttributionReportingIssueDetails = withCdpMeta(z.object({ "violationType": z.lazy(() => Audits_AttributionReportingIssueType), "request": z.lazy(() => Audits_AffectedRequest).optional(), "violatingNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "invalidParameter": z.string().optional() }).passthrough(), "Audits.AttributionReportingIssueDetails", "type"); -const Audits_QuirksModeIssueDetails = withCdpMeta(z.object({ "isLimitedQuirksMode": z.boolean(), "documentNodeId": z.lazy(() => DOM_BackendNodeId), "url": z.string(), "frameId": z.lazy(() => Page_FrameId), "loaderId": z.lazy(() => Network_LoaderId) }).passthrough(), "Audits.QuirksModeIssueDetails", "type"); -const Audits_NavigatorUserAgentIssueDetails = withCdpMeta(z.object({ "url": z.string(), "location": z.lazy(() => Audits_SourceCodeLocation).optional() }).passthrough(), "Audits.NavigatorUserAgentIssueDetails", "type"); -const Audits_SharedDictionaryIssueDetails = withCdpMeta(z.object({ "sharedDictionaryError": z.lazy(() => Audits_SharedDictionaryError), "request": z.lazy(() => Audits_AffectedRequest) }).passthrough(), "Audits.SharedDictionaryIssueDetails", "type"); -const Audits_SRIMessageSignatureIssueDetails = withCdpMeta(z.object({ "error": z.lazy(() => Audits_SRIMessageSignatureError), "signatureBase": z.string(), "integrityAssertions": z.array(z.string()), "request": z.lazy(() => Audits_AffectedRequest) }).passthrough(), "Audits.SRIMessageSignatureIssueDetails", "type"); -const Audits_UnencodedDigestIssueDetails = withCdpMeta(z.object({ "error": z.lazy(() => Audits_UnencodedDigestError), "request": z.lazy(() => Audits_AffectedRequest) }).passthrough(), "Audits.UnencodedDigestIssueDetails", "type"); -const Audits_ConnectionAllowlistIssueDetails = withCdpMeta(z.object({ "error": z.lazy(() => Audits_ConnectionAllowlistError), "request": z.lazy(() => Audits_AffectedRequest) }).passthrough(), "Audits.ConnectionAllowlistIssueDetails", "type"); -const Audits_GenericIssueErrorType = withCdpMeta(z.enum(["FormLabelForNameError", "FormDuplicateIdForInputError", "FormInputWithNoLabelError", "FormAutocompleteAttributeEmptyError", "FormEmptyIdAndNameAttributesForInputError", "FormAriaLabelledByToNonExistingIdError", "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", "FormLabelHasNeitherForNorNestedInputError", "FormLabelForMatchesNonExistingIdError", "FormInputHasWrongButWellIntendedAutocompleteValueError", "ResponseWasBlockedByORB", "NavigationEntryMarkedSkippable", "AutofillAndManualTextPolicyControlledFeaturesInfo", "AutofillPolicyControlledFeatureInfo", "ManualTextPolicyControlledFeatureInfo", "FormModelContextParameterMissingTitleAndDescription", "FormModelContextMissingToolName", "FormModelContextMissingToolDescription", "FormModelContextRequiredParameterMissingName", "FormModelContextParameterMissingName"]), "Audits.GenericIssueErrorType", "type"); -const Audits_GenericIssueDetails = withCdpMeta(z.object({ "errorType": z.lazy(() => Audits_GenericIssueErrorType), "frameId": z.lazy(() => Page_FrameId).optional(), "violatingNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "violatingNodeAttribute": z.string().optional(), "request": z.lazy(() => Audits_AffectedRequest).optional() }).passthrough(), "Audits.GenericIssueDetails", "type"); -const Audits_DeprecationIssueDetails = withCdpMeta(z.object({ "affectedFrame": z.lazy(() => Audits_AffectedFrame).optional(), "sourceCodeLocation": z.lazy(() => Audits_SourceCodeLocation), "type": z.string() }).passthrough(), "Audits.DeprecationIssueDetails", "type"); -const Audits_BounceTrackingIssueDetails = withCdpMeta(z.object({ "trackingSites": z.array(z.string()) }).passthrough(), "Audits.BounceTrackingIssueDetails", "type"); -const Audits_CookieDeprecationMetadataIssueDetails = withCdpMeta(z.object({ "allowedSites": z.array(z.string()), "optOutPercentage": z.number(), "isOptOutTopLevel": z.boolean(), "operation": z.lazy(() => Audits_CookieOperation) }).passthrough(), "Audits.CookieDeprecationMetadataIssueDetails", "type"); -const Audits_ClientHintIssueReason = withCdpMeta(z.enum(["MetaTagAllowListInvalidOrigin", "MetaTagModifiedHTML"]), "Audits.ClientHintIssueReason", "type"); -const Audits_FederatedAuthRequestIssueDetails = withCdpMeta(z.object({ "federatedAuthRequestIssueReason": z.lazy(() => Audits_FederatedAuthRequestIssueReason) }).passthrough(), "Audits.FederatedAuthRequestIssueDetails", "type"); -const Audits_FederatedAuthRequestIssueReason = withCdpMeta(z.enum(["ShouldEmbargo", "TooManyRequests", "WellKnownHttpNotFound", "WellKnownNoResponse", "WellKnownInvalidResponse", "WellKnownListEmpty", "WellKnownInvalidContentType", "ConfigNotInWellKnown", "WellKnownTooBig", "ConfigHttpNotFound", "ConfigNoResponse", "ConfigInvalidResponse", "ConfigInvalidContentType", "IdpNotPotentiallyTrustworthy", "DisabledInSettings", "DisabledInFlags", "ErrorFetchingSignin", "InvalidSigninResponse", "AccountsHttpNotFound", "AccountsNoResponse", "AccountsInvalidResponse", "AccountsListEmpty", "AccountsInvalidContentType", "IdTokenHttpNotFound", "IdTokenNoResponse", "IdTokenInvalidResponse", "IdTokenIdpErrorResponse", "IdTokenCrossSiteIdpErrorResponse", "IdTokenInvalidRequest", "IdTokenInvalidContentType", "ErrorIdToken", "Canceled", "RpPageNotVisible", "SilentMediationFailure", "NotSignedInWithIdp", "MissingTransientUserActivation", "ReplacedByActiveMode", "RelyingPartyOriginIsOpaque", "TypeNotMatching", "UiDismissedNoEmbargo", "CorsError", "SuppressedBySegmentationPlatform"]), "Audits.FederatedAuthRequestIssueReason", "type"); -const Audits_FederatedAuthUserInfoRequestIssueDetails = withCdpMeta(z.object({ "federatedAuthUserInfoRequestIssueReason": z.lazy(() => Audits_FederatedAuthUserInfoRequestIssueReason) }).passthrough(), "Audits.FederatedAuthUserInfoRequestIssueDetails", "type"); -const Audits_FederatedAuthUserInfoRequestIssueReason = withCdpMeta(z.enum(["NotSameOrigin", "NotIframe", "NotPotentiallyTrustworthy", "NoApiPermission", "NotSignedInWithIdp", "NoAccountSharingPermission", "InvalidConfigOrWellKnown", "InvalidAccountsResponse", "NoReturningUserFromFetchedAccounts"]), "Audits.FederatedAuthUserInfoRequestIssueReason", "type"); -const Audits_ClientHintIssueDetails = withCdpMeta(z.object({ "sourceCodeLocation": z.lazy(() => Audits_SourceCodeLocation), "clientHintIssueReason": z.lazy(() => Audits_ClientHintIssueReason) }).passthrough(), "Audits.ClientHintIssueDetails", "type"); -const Audits_FailedRequestInfo = withCdpMeta(z.object({ "url": z.string(), "failureMessage": z.string(), "requestId": z.lazy(() => Network_RequestId).optional() }).passthrough(), "Audits.FailedRequestInfo", "type"); -const Audits_PartitioningBlobURLInfo = withCdpMeta(z.enum(["BlockedCrossPartitionFetching", "EnforceNoopenerForNavigation"]), "Audits.PartitioningBlobURLInfo", "type"); -const Audits_PartitioningBlobURLIssueDetails = withCdpMeta(z.object({ "url": z.string(), "partitioningBlobURLInfo": z.lazy(() => Audits_PartitioningBlobURLInfo) }).passthrough(), "Audits.PartitioningBlobURLIssueDetails", "type"); -const Audits_ElementAccessibilityIssueReason = withCdpMeta(z.enum(["DisallowedSelectChild", "DisallowedOptGroupChild", "NonPhrasingContentOptionChild", "InteractiveContentOptionChild", "InteractiveContentLegendChild", "InteractiveContentSummaryDescendant"]), "Audits.ElementAccessibilityIssueReason", "type"); -const Audits_ElementAccessibilityIssueDetails = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_BackendNodeId), "elementAccessibilityIssueReason": z.lazy(() => Audits_ElementAccessibilityIssueReason), "hasDisallowedAttributes": z.boolean() }).passthrough(), "Audits.ElementAccessibilityIssueDetails", "type"); -const Audits_StyleSheetLoadingIssueReason = withCdpMeta(z.enum(["LateImportRule", "RequestFailed"]), "Audits.StyleSheetLoadingIssueReason", "type"); -const Audits_StylesheetLoadingIssueDetails = withCdpMeta(z.object({ "sourceCodeLocation": z.lazy(() => Audits_SourceCodeLocation), "styleSheetLoadingIssueReason": z.lazy(() => Audits_StyleSheetLoadingIssueReason), "failedRequestInfo": z.lazy(() => Audits_FailedRequestInfo).optional() }).passthrough(), "Audits.StylesheetLoadingIssueDetails", "type"); -const Audits_PropertyRuleIssueReason = withCdpMeta(z.enum(["InvalidSyntax", "InvalidInitialValue", "InvalidInherits", "InvalidName"]), "Audits.PropertyRuleIssueReason", "type"); -const Audits_PropertyRuleIssueDetails = withCdpMeta(z.object({ "sourceCodeLocation": z.lazy(() => Audits_SourceCodeLocation), "propertyRuleIssueReason": z.lazy(() => Audits_PropertyRuleIssueReason), "propertyValue": z.string().optional() }).passthrough(), "Audits.PropertyRuleIssueDetails", "type"); -const Audits_UserReidentificationIssueType = withCdpMeta(z.enum(["BlockedFrameNavigation", "BlockedSubresource", "NoisedCanvasReadback"]), "Audits.UserReidentificationIssueType", "type"); -const Audits_UserReidentificationIssueDetails = withCdpMeta(z.object({ "type": z.lazy(() => Audits_UserReidentificationIssueType), "request": z.lazy(() => Audits_AffectedRequest).optional(), "sourceCodeLocation": z.lazy(() => Audits_SourceCodeLocation).optional() }).passthrough(), "Audits.UserReidentificationIssueDetails", "type"); -const Audits_PermissionElementIssueType = withCdpMeta(z.enum(["InvalidType", "FencedFrameDisallowed", "CspFrameAncestorsMissing", "PermissionsPolicyBlocked", "PaddingRightUnsupported", "PaddingBottomUnsupported", "InsetBoxShadowUnsupported", "RequestInProgress", "UntrustedEvent", "RegistrationFailed", "TypeNotSupported", "InvalidTypeActivation", "SecurityChecksFailed", "ActivationDisabled", "GeolocationDeprecated", "InvalidDisplayStyle", "NonOpaqueColor", "LowContrast", "FontSizeTooSmall", "FontSizeTooLarge", "InvalidSizeValue"]), "Audits.PermissionElementIssueType", "type"); -const Audits_PermissionElementIssueDetails = withCdpMeta(z.object({ "issueType": z.lazy(() => Audits_PermissionElementIssueType), "type": z.string().optional(), "nodeId": z.lazy(() => DOM_BackendNodeId).optional(), "isWarning": z.boolean().optional(), "permissionName": z.string().optional(), "occluderNodeInfo": z.string().optional(), "occluderParentNodeInfo": z.string().optional(), "disableReason": z.string().optional() }).passthrough(), "Audits.PermissionElementIssueDetails", "type"); -const Audits_SelectivePermissionsInterventionIssueDetails = withCdpMeta(z.object({ "apiName": z.string(), "adAncestry": z.lazy(() => Network_AdAncestry), "stackTrace": z.lazy(() => Runtime_StackTrace).optional() }).passthrough(), "Audits.SelectivePermissionsInterventionIssueDetails", "type"); -const Audits_InspectorIssueCode = withCdpMeta(z.enum(["CookieIssue", "MixedContentIssue", "BlockedByResponseIssue", "HeavyAdIssue", "ContentSecurityPolicyIssue", "SharedArrayBufferIssue", "CorsIssue", "AttributionReportingIssue", "QuirksModeIssue", "PartitioningBlobURLIssue", "NavigatorUserAgentIssue", "GenericIssue", "DeprecationIssue", "ClientHintIssue", "FederatedAuthRequestIssue", "BounceTrackingIssue", "CookieDeprecationMetadataIssue", "StylesheetLoadingIssue", "FederatedAuthUserInfoRequestIssue", "PropertyRuleIssue", "SharedDictionaryIssue", "ElementAccessibilityIssue", "SRIMessageSignatureIssue", "UnencodedDigestIssue", "ConnectionAllowlistIssue", "UserReidentificationIssue", "PermissionElementIssue", "PerformanceIssue", "SelectivePermissionsInterventionIssue"]), "Audits.InspectorIssueCode", "type"); -const Audits_InspectorIssueDetails = withCdpMeta(z.object({ "cookieIssueDetails": z.lazy(() => Audits_CookieIssueDetails).optional(), "mixedContentIssueDetails": z.lazy(() => Audits_MixedContentIssueDetails).optional(), "blockedByResponseIssueDetails": z.lazy(() => Audits_BlockedByResponseIssueDetails).optional(), "heavyAdIssueDetails": z.lazy(() => Audits_HeavyAdIssueDetails).optional(), "contentSecurityPolicyIssueDetails": z.lazy(() => Audits_ContentSecurityPolicyIssueDetails).optional(), "sharedArrayBufferIssueDetails": z.lazy(() => Audits_SharedArrayBufferIssueDetails).optional(), "corsIssueDetails": z.lazy(() => Audits_CorsIssueDetails).optional(), "attributionReportingIssueDetails": z.lazy(() => Audits_AttributionReportingIssueDetails).optional(), "quirksModeIssueDetails": z.lazy(() => Audits_QuirksModeIssueDetails).optional(), "partitioningBlobURLIssueDetails": z.lazy(() => Audits_PartitioningBlobURLIssueDetails).optional(), "navigatorUserAgentIssueDetails": z.lazy(() => Audits_NavigatorUserAgentIssueDetails).optional(), "genericIssueDetails": z.lazy(() => Audits_GenericIssueDetails).optional(), "deprecationIssueDetails": z.lazy(() => Audits_DeprecationIssueDetails).optional(), "clientHintIssueDetails": z.lazy(() => Audits_ClientHintIssueDetails).optional(), "federatedAuthRequestIssueDetails": z.lazy(() => Audits_FederatedAuthRequestIssueDetails).optional(), "bounceTrackingIssueDetails": z.lazy(() => Audits_BounceTrackingIssueDetails).optional(), "cookieDeprecationMetadataIssueDetails": z.lazy(() => Audits_CookieDeprecationMetadataIssueDetails).optional(), "stylesheetLoadingIssueDetails": z.lazy(() => Audits_StylesheetLoadingIssueDetails).optional(), "propertyRuleIssueDetails": z.lazy(() => Audits_PropertyRuleIssueDetails).optional(), "federatedAuthUserInfoRequestIssueDetails": z.lazy(() => Audits_FederatedAuthUserInfoRequestIssueDetails).optional(), "sharedDictionaryIssueDetails": z.lazy(() => Audits_SharedDictionaryIssueDetails).optional(), "elementAccessibilityIssueDetails": z.lazy(() => Audits_ElementAccessibilityIssueDetails).optional(), "sriMessageSignatureIssueDetails": z.lazy(() => Audits_SRIMessageSignatureIssueDetails).optional(), "unencodedDigestIssueDetails": z.lazy(() => Audits_UnencodedDigestIssueDetails).optional(), "connectionAllowlistIssueDetails": z.lazy(() => Audits_ConnectionAllowlistIssueDetails).optional(), "userReidentificationIssueDetails": z.lazy(() => Audits_UserReidentificationIssueDetails).optional(), "permissionElementIssueDetails": z.lazy(() => Audits_PermissionElementIssueDetails).optional(), "performanceIssueDetails": z.lazy(() => Audits_PerformanceIssueDetails).optional(), "selectivePermissionsInterventionIssueDetails": z.lazy(() => Audits_SelectivePermissionsInterventionIssueDetails).optional() }).passthrough(), "Audits.InspectorIssueDetails", "type"); -const Audits_IssueId = withCdpMeta(z.string(), "Audits.IssueId", "type"); -const Audits_InspectorIssue = withCdpMeta(z.object({ "code": z.lazy(() => Audits_InspectorIssueCode), "details": z.lazy(() => Audits_InspectorIssueDetails), "issueId": z.lazy(() => Audits_IssueId).optional() }).passthrough(), "Audits.InspectorIssue", "type"); -const Audits_GetEncodedResponseParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "encoding": z.enum(["webp", "jpeg", "png"]), "quality": z.number().optional(), "sizeOnly": z.boolean().optional() }).passthrough(), "Audits.getEncodedResponse.params", "commandParams", { method: "Audits.getEncodedResponse" }); -const Audits_GetEncodedResponseResult = withCdpMeta(z.object({ "body": z.string().optional(), "originalSize": z.number().int(), "encodedSize": z.number().int() }).passthrough(), "Audits.getEncodedResponse.result", "commandResult", { method: "Audits.getEncodedResponse" }); -const Audits_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Audits.disable.params", "commandParams", { method: "Audits.disable" }); -const Audits_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Audits.disable.result", "commandResult", { method: "Audits.disable" }); -const Audits_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Audits.enable.params", "commandParams", { method: "Audits.enable" }); -const Audits_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Audits.enable.result", "commandResult", { method: "Audits.enable" }); -const Audits_CheckFormsIssuesParams = withCdpMeta(z.object({ }).passthrough(), "Audits.checkFormsIssues.params", "commandParams", { method: "Audits.checkFormsIssues" }); -const Audits_CheckFormsIssuesResult = withCdpMeta(z.object({ "formIssues": z.array(z.lazy(() => Audits_GenericIssueDetails)) }).passthrough(), "Audits.checkFormsIssues.result", "commandResult", { method: "Audits.checkFormsIssues" }); -const Audits_IssueAddedEvent = withCdpMeta(z.object({ "issue": z.lazy(() => Audits_InspectorIssue) }).passthrough(), "Audits.issueAdded", "event", { phase: "event" }); -const Autofill_CreditCard = withCdpMeta(z.object({ "number": z.string(), "name": z.string(), "expiryMonth": z.string(), "expiryYear": z.string(), "cvc": z.string() }).passthrough(), "Autofill.CreditCard", "type"); -const Autofill_AddressField = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "Autofill.AddressField", "type"); -const Autofill_AddressFields = withCdpMeta(z.object({ "fields": z.array(z.lazy(() => Autofill_AddressField)) }).passthrough(), "Autofill.AddressFields", "type"); -const Autofill_Address = withCdpMeta(z.object({ "fields": z.array(z.lazy(() => Autofill_AddressField)) }).passthrough(), "Autofill.Address", "type"); -const Autofill_AddressUI = withCdpMeta(z.object({ "addressFields": z.array(z.lazy(() => Autofill_AddressFields)) }).passthrough(), "Autofill.AddressUI", "type"); -const Autofill_FillingStrategy = withCdpMeta(z.enum(["autocompleteAttribute", "autofillInferred"]), "Autofill.FillingStrategy", "type"); -const Autofill_FilledField = withCdpMeta(z.object({ "htmlType": z.string(), "id": z.string(), "name": z.string(), "value": z.string(), "autofillType": z.string(), "fillingStrategy": z.lazy(() => Autofill_FillingStrategy), "frameId": z.lazy(() => Page_FrameId), "fieldId": z.lazy(() => DOM_BackendNodeId) }).passthrough(), "Autofill.FilledField", "type"); -const Autofill_TriggerParams = withCdpMeta(z.object({ "fieldId": z.lazy(() => DOM_BackendNodeId), "frameId": z.lazy(() => Page_FrameId).optional(), "card": z.lazy(() => Autofill_CreditCard).optional(), "address": z.lazy(() => Autofill_Address).optional() }).passthrough(), "Autofill.trigger.params", "commandParams", { method: "Autofill.trigger" }); -const Autofill_TriggerResult = withCdpMeta(z.object({ }).passthrough(), "Autofill.trigger.result", "commandResult", { method: "Autofill.trigger" }); -const Autofill_SetAddressesParams = withCdpMeta(z.object({ "addresses": z.array(z.lazy(() => Autofill_Address)) }).passthrough(), "Autofill.setAddresses.params", "commandParams", { method: "Autofill.setAddresses" }); -const Autofill_SetAddressesResult = withCdpMeta(z.object({ }).passthrough(), "Autofill.setAddresses.result", "commandResult", { method: "Autofill.setAddresses" }); -const Autofill_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Autofill.disable.params", "commandParams", { method: "Autofill.disable" }); -const Autofill_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Autofill.disable.result", "commandResult", { method: "Autofill.disable" }); -const Autofill_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Autofill.enable.params", "commandParams", { method: "Autofill.enable" }); -const Autofill_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Autofill.enable.result", "commandResult", { method: "Autofill.enable" }); -const Autofill_AddressFormFilledEvent = withCdpMeta(z.object({ "filledFields": z.array(z.lazy(() => Autofill_FilledField)), "addressUi": z.lazy(() => Autofill_AddressUI) }).passthrough(), "Autofill.addressFormFilled", "event", { phase: "event" }); -const BackgroundService_ServiceName = withCdpMeta(z.enum(["backgroundFetch", "backgroundSync", "pushMessaging", "notifications", "paymentHandler", "periodicBackgroundSync"]), "BackgroundService.ServiceName", "type"); -const BackgroundService_EventMetadata = withCdpMeta(z.object({ "key": z.string(), "value": z.string() }).passthrough(), "BackgroundService.EventMetadata", "type"); -const BackgroundService_BackgroundServiceEvent = withCdpMeta(z.object({ "timestamp": z.lazy(() => Network_TimeSinceEpoch), "origin": z.string(), "serviceWorkerRegistrationId": z.lazy(() => ServiceWorker_RegistrationID), "service": z.lazy(() => BackgroundService_ServiceName), "eventName": z.string(), "instanceId": z.string(), "eventMetadata": z.array(z.lazy(() => BackgroundService_EventMetadata)), "storageKey": z.string() }).passthrough(), "BackgroundService.BackgroundServiceEvent", "type"); -const BackgroundService_StartObservingParams = withCdpMeta(z.object({ "service": z.lazy(() => BackgroundService_ServiceName) }).passthrough(), "BackgroundService.startObserving.params", "commandParams", { method: "BackgroundService.startObserving" }); -const BackgroundService_StartObservingResult = withCdpMeta(z.object({ }).passthrough(), "BackgroundService.startObserving.result", "commandResult", { method: "BackgroundService.startObserving" }); -const BackgroundService_StopObservingParams = withCdpMeta(z.object({ "service": z.lazy(() => BackgroundService_ServiceName) }).passthrough(), "BackgroundService.stopObserving.params", "commandParams", { method: "BackgroundService.stopObserving" }); -const BackgroundService_StopObservingResult = withCdpMeta(z.object({ }).passthrough(), "BackgroundService.stopObserving.result", "commandResult", { method: "BackgroundService.stopObserving" }); -const BackgroundService_SetRecordingParams = withCdpMeta(z.object({ "shouldRecord": z.boolean(), "service": z.lazy(() => BackgroundService_ServiceName) }).passthrough(), "BackgroundService.setRecording.params", "commandParams", { method: "BackgroundService.setRecording" }); -const BackgroundService_SetRecordingResult = withCdpMeta(z.object({ }).passthrough(), "BackgroundService.setRecording.result", "commandResult", { method: "BackgroundService.setRecording" }); -const BackgroundService_ClearEventsParams = withCdpMeta(z.object({ "service": z.lazy(() => BackgroundService_ServiceName) }).passthrough(), "BackgroundService.clearEvents.params", "commandParams", { method: "BackgroundService.clearEvents" }); -const BackgroundService_ClearEventsResult = withCdpMeta(z.object({ }).passthrough(), "BackgroundService.clearEvents.result", "commandResult", { method: "BackgroundService.clearEvents" }); -const BackgroundService_RecordingStateChangedEvent = withCdpMeta(z.object({ "isRecording": z.boolean(), "service": z.lazy(() => BackgroundService_ServiceName) }).passthrough(), "BackgroundService.recordingStateChanged", "event", { phase: "event" }); -const BackgroundService_BackgroundServiceEventReceivedEvent = withCdpMeta(z.object({ "backgroundServiceEvent": z.lazy(() => BackgroundService_BackgroundServiceEvent) }).passthrough(), "BackgroundService.backgroundServiceEventReceived", "event", { phase: "event" }); -const BluetoothEmulation_CentralState = withCdpMeta(z.enum(["absent", "powered-off", "powered-on"]), "BluetoothEmulation.CentralState", "type"); -const BluetoothEmulation_GATTOperationType = withCdpMeta(z.enum(["connection", "discovery"]), "BluetoothEmulation.GATTOperationType", "type"); -const BluetoothEmulation_CharacteristicWriteType = withCdpMeta(z.enum(["write-default-deprecated", "write-with-response", "write-without-response"]), "BluetoothEmulation.CharacteristicWriteType", "type"); -const BluetoothEmulation_CharacteristicOperationType = withCdpMeta(z.enum(["read", "write", "subscribe-to-notifications", "unsubscribe-from-notifications"]), "BluetoothEmulation.CharacteristicOperationType", "type"); -const BluetoothEmulation_DescriptorOperationType = withCdpMeta(z.enum(["read", "write"]), "BluetoothEmulation.DescriptorOperationType", "type"); -const BluetoothEmulation_ManufacturerData = withCdpMeta(z.object({ "key": z.number().int(), "data": z.string() }).passthrough(), "BluetoothEmulation.ManufacturerData", "type"); -const BluetoothEmulation_ScanRecord = withCdpMeta(z.object({ "name": z.string().optional(), "uuids": z.array(z.string()).optional(), "appearance": z.number().int().optional(), "txPower": z.number().int().optional(), "manufacturerData": z.array(z.lazy(() => BluetoothEmulation_ManufacturerData)).optional() }).passthrough(), "BluetoothEmulation.ScanRecord", "type"); -const BluetoothEmulation_ScanEntry = withCdpMeta(z.object({ "deviceAddress": z.string(), "rssi": z.number().int(), "scanRecord": z.lazy(() => BluetoothEmulation_ScanRecord) }).passthrough(), "BluetoothEmulation.ScanEntry", "type"); -const BluetoothEmulation_CharacteristicProperties = withCdpMeta(z.object({ "broadcast": z.boolean().optional(), "read": z.boolean().optional(), "writeWithoutResponse": z.boolean().optional(), "write": z.boolean().optional(), "notify": z.boolean().optional(), "indicate": z.boolean().optional(), "authenticatedSignedWrites": z.boolean().optional(), "extendedProperties": z.boolean().optional() }).passthrough(), "BluetoothEmulation.CharacteristicProperties", "type"); -const BluetoothEmulation_EnableParams = withCdpMeta(z.object({ "state": z.lazy(() => BluetoothEmulation_CentralState), "leSupported": z.boolean() }).passthrough(), "BluetoothEmulation.enable.params", "commandParams", { method: "BluetoothEmulation.enable" }); -const BluetoothEmulation_EnableResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.enable.result", "commandResult", { method: "BluetoothEmulation.enable" }); -const BluetoothEmulation_SetSimulatedCentralStateParams = withCdpMeta(z.object({ "state": z.lazy(() => BluetoothEmulation_CentralState) }).passthrough(), "BluetoothEmulation.setSimulatedCentralState.params", "commandParams", { method: "BluetoothEmulation.setSimulatedCentralState" }); -const BluetoothEmulation_SetSimulatedCentralStateResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.setSimulatedCentralState.result", "commandResult", { method: "BluetoothEmulation.setSimulatedCentralState" }); -const BluetoothEmulation_DisableParams = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.disable.params", "commandParams", { method: "BluetoothEmulation.disable" }); -const BluetoothEmulation_DisableResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.disable.result", "commandResult", { method: "BluetoothEmulation.disable" }); -const BluetoothEmulation_SimulatePreconnectedPeripheralParams = withCdpMeta(z.object({ "address": z.string(), "name": z.string(), "manufacturerData": z.array(z.lazy(() => BluetoothEmulation_ManufacturerData)), "knownServiceUuids": z.array(z.string()) }).passthrough(), "BluetoothEmulation.simulatePreconnectedPeripheral.params", "commandParams", { method: "BluetoothEmulation.simulatePreconnectedPeripheral" }); -const BluetoothEmulation_SimulatePreconnectedPeripheralResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulatePreconnectedPeripheral.result", "commandResult", { method: "BluetoothEmulation.simulatePreconnectedPeripheral" }); -const BluetoothEmulation_SimulateAdvertisementParams = withCdpMeta(z.object({ "entry": z.lazy(() => BluetoothEmulation_ScanEntry) }).passthrough(), "BluetoothEmulation.simulateAdvertisement.params", "commandParams", { method: "BluetoothEmulation.simulateAdvertisement" }); -const BluetoothEmulation_SimulateAdvertisementResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulateAdvertisement.result", "commandResult", { method: "BluetoothEmulation.simulateAdvertisement" }); -const BluetoothEmulation_SimulateGATTOperationResponseParams = withCdpMeta(z.object({ "address": z.string(), "type": z.lazy(() => BluetoothEmulation_GATTOperationType), "code": z.number().int() }).passthrough(), "BluetoothEmulation.simulateGATTOperationResponse.params", "commandParams", { method: "BluetoothEmulation.simulateGATTOperationResponse" }); -const BluetoothEmulation_SimulateGATTOperationResponseResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulateGATTOperationResponse.result", "commandResult", { method: "BluetoothEmulation.simulateGATTOperationResponse" }); -const BluetoothEmulation_SimulateCharacteristicOperationResponseParams = withCdpMeta(z.object({ "characteristicId": z.string(), "type": z.lazy(() => BluetoothEmulation_CharacteristicOperationType), "code": z.number().int(), "data": z.string().optional() }).passthrough(), "BluetoothEmulation.simulateCharacteristicOperationResponse.params", "commandParams", { method: "BluetoothEmulation.simulateCharacteristicOperationResponse" }); -const BluetoothEmulation_SimulateCharacteristicOperationResponseResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulateCharacteristicOperationResponse.result", "commandResult", { method: "BluetoothEmulation.simulateCharacteristicOperationResponse" }); -const BluetoothEmulation_SimulateDescriptorOperationResponseParams = withCdpMeta(z.object({ "descriptorId": z.string(), "type": z.lazy(() => BluetoothEmulation_DescriptorOperationType), "code": z.number().int(), "data": z.string().optional() }).passthrough(), "BluetoothEmulation.simulateDescriptorOperationResponse.params", "commandParams", { method: "BluetoothEmulation.simulateDescriptorOperationResponse" }); -const BluetoothEmulation_SimulateDescriptorOperationResponseResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulateDescriptorOperationResponse.result", "commandResult", { method: "BluetoothEmulation.simulateDescriptorOperationResponse" }); -const BluetoothEmulation_AddServiceParams = withCdpMeta(z.object({ "address": z.string(), "serviceUuid": z.string() }).passthrough(), "BluetoothEmulation.addService.params", "commandParams", { method: "BluetoothEmulation.addService" }); -const BluetoothEmulation_AddServiceResult = withCdpMeta(z.object({ "serviceId": z.string() }).passthrough(), "BluetoothEmulation.addService.result", "commandResult", { method: "BluetoothEmulation.addService" }); -const BluetoothEmulation_RemoveServiceParams = withCdpMeta(z.object({ "serviceId": z.string() }).passthrough(), "BluetoothEmulation.removeService.params", "commandParams", { method: "BluetoothEmulation.removeService" }); -const BluetoothEmulation_RemoveServiceResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.removeService.result", "commandResult", { method: "BluetoothEmulation.removeService" }); -const BluetoothEmulation_AddCharacteristicParams = withCdpMeta(z.object({ "serviceId": z.string(), "characteristicUuid": z.string(), "properties": z.lazy(() => BluetoothEmulation_CharacteristicProperties) }).passthrough(), "BluetoothEmulation.addCharacteristic.params", "commandParams", { method: "BluetoothEmulation.addCharacteristic" }); -const BluetoothEmulation_AddCharacteristicResult = withCdpMeta(z.object({ "characteristicId": z.string() }).passthrough(), "BluetoothEmulation.addCharacteristic.result", "commandResult", { method: "BluetoothEmulation.addCharacteristic" }); -const BluetoothEmulation_RemoveCharacteristicParams = withCdpMeta(z.object({ "characteristicId": z.string() }).passthrough(), "BluetoothEmulation.removeCharacteristic.params", "commandParams", { method: "BluetoothEmulation.removeCharacteristic" }); -const BluetoothEmulation_RemoveCharacteristicResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.removeCharacteristic.result", "commandResult", { method: "BluetoothEmulation.removeCharacteristic" }); -const BluetoothEmulation_AddDescriptorParams = withCdpMeta(z.object({ "characteristicId": z.string(), "descriptorUuid": z.string() }).passthrough(), "BluetoothEmulation.addDescriptor.params", "commandParams", { method: "BluetoothEmulation.addDescriptor" }); -const BluetoothEmulation_AddDescriptorResult = withCdpMeta(z.object({ "descriptorId": z.string() }).passthrough(), "BluetoothEmulation.addDescriptor.result", "commandResult", { method: "BluetoothEmulation.addDescriptor" }); -const BluetoothEmulation_RemoveDescriptorParams = withCdpMeta(z.object({ "descriptorId": z.string() }).passthrough(), "BluetoothEmulation.removeDescriptor.params", "commandParams", { method: "BluetoothEmulation.removeDescriptor" }); -const BluetoothEmulation_RemoveDescriptorResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.removeDescriptor.result", "commandResult", { method: "BluetoothEmulation.removeDescriptor" }); -const BluetoothEmulation_SimulateGATTDisconnectionParams = withCdpMeta(z.object({ "address": z.string() }).passthrough(), "BluetoothEmulation.simulateGATTDisconnection.params", "commandParams", { method: "BluetoothEmulation.simulateGATTDisconnection" }); -const BluetoothEmulation_SimulateGATTDisconnectionResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulateGATTDisconnection.result", "commandResult", { method: "BluetoothEmulation.simulateGATTDisconnection" }); -const BluetoothEmulation_GattOperationReceivedEvent = withCdpMeta(z.object({ "address": z.string(), "type": z.lazy(() => BluetoothEmulation_GATTOperationType) }).passthrough(), "BluetoothEmulation.gattOperationReceived", "event", { phase: "event" }); -const BluetoothEmulation_CharacteristicOperationReceivedEvent = withCdpMeta(z.object({ "characteristicId": z.string(), "type": z.lazy(() => BluetoothEmulation_CharacteristicOperationType), "data": z.string().optional(), "writeType": z.lazy(() => BluetoothEmulation_CharacteristicWriteType).optional() }).passthrough(), "BluetoothEmulation.characteristicOperationReceived", "event", { phase: "event" }); -const BluetoothEmulation_DescriptorOperationReceivedEvent = withCdpMeta(z.object({ "descriptorId": z.string(), "type": z.lazy(() => BluetoothEmulation_DescriptorOperationType), "data": z.string().optional() }).passthrough(), "BluetoothEmulation.descriptorOperationReceived", "event", { phase: "event" }); -const Browser_BrowserContextID = withCdpMeta(z.string(), "Browser.BrowserContextID", "type"); -const Browser_WindowID = withCdpMeta(z.number().int(), "Browser.WindowID", "type"); -const Browser_WindowState = withCdpMeta(z.enum(["normal", "minimized", "maximized", "fullscreen"]), "Browser.WindowState", "type"); -const Browser_Bounds = withCdpMeta(z.object({ "left": z.number().int().optional(), "top": z.number().int().optional(), "width": z.number().int().optional(), "height": z.number().int().optional(), "windowState": z.lazy(() => Browser_WindowState).optional() }).passthrough(), "Browser.Bounds", "type"); -const Browser_PermissionType = withCdpMeta(z.enum(["ar", "audioCapture", "automaticFullscreen", "backgroundFetch", "backgroundSync", "cameraPanTiltZoom", "capturedSurfaceControl", "clipboardReadWrite", "clipboardSanitizedWrite", "displayCapture", "durableStorage", "geolocation", "handTracking", "idleDetection", "keyboardLock", "localFonts", "localNetwork", "localNetworkAccess", "loopbackNetwork", "midi", "midiSysex", "nfc", "notifications", "paymentHandler", "periodicBackgroundSync", "pointerLock", "protectedMediaIdentifier", "sensors", "smartCard", "speakerSelection", "storageAccess", "topLevelStorageAccess", "videoCapture", "vr", "wakeLockScreen", "wakeLockSystem", "webAppInstallation", "webPrinting", "windowManagement"]), "Browser.PermissionType", "type"); -const Browser_PermissionSetting = withCdpMeta(z.enum(["granted", "denied", "prompt"]), "Browser.PermissionSetting", "type"); -const Browser_PermissionDescriptor = withCdpMeta(z.object({ "name": z.string(), "sysex": z.boolean().optional(), "userVisibleOnly": z.boolean().optional(), "allowWithoutSanitization": z.boolean().optional(), "allowWithoutGesture": z.boolean().optional(), "panTiltZoom": z.boolean().optional() }).passthrough(), "Browser.PermissionDescriptor", "type"); -const Browser_BrowserCommandId = withCdpMeta(z.enum(["openTabSearch", "closeTabSearch", "openGlic"]), "Browser.BrowserCommandId", "type"); -const Browser_Bucket = withCdpMeta(z.object({ "low": z.number().int(), "high": z.number().int(), "count": z.number().int() }).passthrough(), "Browser.Bucket", "type"); -const Browser_Histogram = withCdpMeta(z.object({ "name": z.string(), "sum": z.number().int(), "count": z.number().int(), "buckets": z.array(z.lazy(() => Browser_Bucket)) }).passthrough(), "Browser.Histogram", "type"); -const Browser_PrivacySandboxAPI = withCdpMeta(z.enum(["BiddingAndAuctionServices", "TrustedKeyValue"]), "Browser.PrivacySandboxAPI", "type"); -const Browser_SetPermissionParams = withCdpMeta(z.object({ "permission": z.lazy(() => Browser_PermissionDescriptor), "setting": z.lazy(() => Browser_PermissionSetting), "origin": z.string().optional(), "embeddedOrigin": z.string().optional(), "browserContextId": z.lazy(() => Browser_BrowserContextID).optional() }).passthrough(), "Browser.setPermission.params", "commandParams", { method: "Browser.setPermission" }); -const Browser_SetPermissionResult = withCdpMeta(z.object({ }).passthrough(), "Browser.setPermission.result", "commandResult", { method: "Browser.setPermission" }); -const Browser_GrantPermissionsParams = withCdpMeta(z.object({ "permissions": z.array(z.lazy(() => Browser_PermissionType)), "origin": z.string().optional(), "browserContextId": z.lazy(() => Browser_BrowserContextID).optional() }).passthrough(), "Browser.grantPermissions.params", "commandParams", { method: "Browser.grantPermissions" }); -const Browser_GrantPermissionsResult = withCdpMeta(z.object({ }).passthrough(), "Browser.grantPermissions.result", "commandResult", { method: "Browser.grantPermissions" }); -const Browser_ResetPermissionsParams = withCdpMeta(z.object({ "browserContextId": z.lazy(() => Browser_BrowserContextID).optional() }).passthrough(), "Browser.resetPermissions.params", "commandParams", { method: "Browser.resetPermissions" }); -const Browser_ResetPermissionsResult = withCdpMeta(z.object({ }).passthrough(), "Browser.resetPermissions.result", "commandResult", { method: "Browser.resetPermissions" }); -const Browser_SetDownloadBehaviorParams = withCdpMeta(z.object({ "behavior": z.enum(["deny", "allow", "allowAndName", "default"]), "browserContextId": z.lazy(() => Browser_BrowserContextID).optional(), "downloadPath": z.string().optional(), "eventsEnabled": z.boolean().optional() }).passthrough(), "Browser.setDownloadBehavior.params", "commandParams", { method: "Browser.setDownloadBehavior" }); -const Browser_SetDownloadBehaviorResult = withCdpMeta(z.object({ }).passthrough(), "Browser.setDownloadBehavior.result", "commandResult", { method: "Browser.setDownloadBehavior" }); -const Browser_CancelDownloadParams = withCdpMeta(z.object({ "guid": z.string(), "browserContextId": z.lazy(() => Browser_BrowserContextID).optional() }).passthrough(), "Browser.cancelDownload.params", "commandParams", { method: "Browser.cancelDownload" }); -const Browser_CancelDownloadResult = withCdpMeta(z.object({ }).passthrough(), "Browser.cancelDownload.result", "commandResult", { method: "Browser.cancelDownload" }); -const Browser_CloseParams = withCdpMeta(z.object({ }).passthrough(), "Browser.close.params", "commandParams", { method: "Browser.close" }); -const Browser_CloseResult = withCdpMeta(z.object({ }).passthrough(), "Browser.close.result", "commandResult", { method: "Browser.close" }); -const Browser_CrashParams = withCdpMeta(z.object({ }).passthrough(), "Browser.crash.params", "commandParams", { method: "Browser.crash" }); -const Browser_CrashResult = withCdpMeta(z.object({ }).passthrough(), "Browser.crash.result", "commandResult", { method: "Browser.crash" }); -const Browser_CrashGpuProcessParams = withCdpMeta(z.object({ }).passthrough(), "Browser.crashGpuProcess.params", "commandParams", { method: "Browser.crashGpuProcess" }); -const Browser_CrashGpuProcessResult = withCdpMeta(z.object({ }).passthrough(), "Browser.crashGpuProcess.result", "commandResult", { method: "Browser.crashGpuProcess" }); -const Browser_GetVersionParams = withCdpMeta(z.object({ }).passthrough(), "Browser.getVersion.params", "commandParams", { method: "Browser.getVersion" }); -const Browser_GetVersionResult = withCdpMeta(z.object({ "protocolVersion": z.string(), "product": z.string(), "revision": z.string(), "userAgent": z.string(), "jsVersion": z.string() }).passthrough(), "Browser.getVersion.result", "commandResult", { method: "Browser.getVersion" }); -const Browser_GetBrowserCommandLineParams = withCdpMeta(z.object({ }).passthrough(), "Browser.getBrowserCommandLine.params", "commandParams", { method: "Browser.getBrowserCommandLine" }); -const Browser_GetBrowserCommandLineResult = withCdpMeta(z.object({ "arguments": z.array(z.string()) }).passthrough(), "Browser.getBrowserCommandLine.result", "commandResult", { method: "Browser.getBrowserCommandLine" }); -const Browser_GetHistogramsParams = withCdpMeta(z.object({ "query": z.string().optional(), "delta": z.boolean().optional() }).passthrough(), "Browser.getHistograms.params", "commandParams", { method: "Browser.getHistograms" }); -const Browser_GetHistogramsResult = withCdpMeta(z.object({ "histograms": z.array(z.lazy(() => Browser_Histogram)) }).passthrough(), "Browser.getHistograms.result", "commandResult", { method: "Browser.getHistograms" }); -const Browser_GetHistogramParams = withCdpMeta(z.object({ "name": z.string(), "delta": z.boolean().optional() }).passthrough(), "Browser.getHistogram.params", "commandParams", { method: "Browser.getHistogram" }); -const Browser_GetHistogramResult = withCdpMeta(z.object({ "histogram": z.lazy(() => Browser_Histogram) }).passthrough(), "Browser.getHistogram.result", "commandResult", { method: "Browser.getHistogram" }); -const Browser_GetWindowBoundsParams = withCdpMeta(z.object({ "windowId": z.lazy(() => Browser_WindowID) }).passthrough(), "Browser.getWindowBounds.params", "commandParams", { method: "Browser.getWindowBounds" }); -const Browser_GetWindowBoundsResult = withCdpMeta(z.object({ "bounds": z.lazy(() => Browser_Bounds) }).passthrough(), "Browser.getWindowBounds.result", "commandResult", { method: "Browser.getWindowBounds" }); -const Browser_GetWindowForTargetParams = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID).optional() }).passthrough(), "Browser.getWindowForTarget.params", "commandParams", { method: "Browser.getWindowForTarget" }); -const Browser_GetWindowForTargetResult = withCdpMeta(z.object({ "windowId": z.lazy(() => Browser_WindowID), "bounds": z.lazy(() => Browser_Bounds) }).passthrough(), "Browser.getWindowForTarget.result", "commandResult", { method: "Browser.getWindowForTarget" }); -const Browser_SetWindowBoundsParams = withCdpMeta(z.object({ "windowId": z.lazy(() => Browser_WindowID), "bounds": z.lazy(() => Browser_Bounds) }).passthrough(), "Browser.setWindowBounds.params", "commandParams", { method: "Browser.setWindowBounds" }); -const Browser_SetWindowBoundsResult = withCdpMeta(z.object({ }).passthrough(), "Browser.setWindowBounds.result", "commandResult", { method: "Browser.setWindowBounds" }); -const Browser_SetContentsSizeParams = withCdpMeta(z.object({ "windowId": z.lazy(() => Browser_WindowID), "width": z.number().int().optional(), "height": z.number().int().optional() }).passthrough(), "Browser.setContentsSize.params", "commandParams", { method: "Browser.setContentsSize" }); -const Browser_SetContentsSizeResult = withCdpMeta(z.object({ }).passthrough(), "Browser.setContentsSize.result", "commandResult", { method: "Browser.setContentsSize" }); -const Browser_SetDockTileParams = withCdpMeta(z.object({ "badgeLabel": z.string().optional(), "image": z.string().optional() }).passthrough(), "Browser.setDockTile.params", "commandParams", { method: "Browser.setDockTile" }); -const Browser_SetDockTileResult = withCdpMeta(z.object({ }).passthrough(), "Browser.setDockTile.result", "commandResult", { method: "Browser.setDockTile" }); -const Browser_ExecuteBrowserCommandParams = withCdpMeta(z.object({ "commandId": z.lazy(() => Browser_BrowserCommandId) }).passthrough(), "Browser.executeBrowserCommand.params", "commandParams", { method: "Browser.executeBrowserCommand" }); -const Browser_ExecuteBrowserCommandResult = withCdpMeta(z.object({ }).passthrough(), "Browser.executeBrowserCommand.result", "commandResult", { method: "Browser.executeBrowserCommand" }); -const Browser_AddPrivacySandboxEnrollmentOverrideParams = withCdpMeta(z.object({ "url": z.string() }).passthrough(), "Browser.addPrivacySandboxEnrollmentOverride.params", "commandParams", { method: "Browser.addPrivacySandboxEnrollmentOverride" }); -const Browser_AddPrivacySandboxEnrollmentOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Browser.addPrivacySandboxEnrollmentOverride.result", "commandResult", { method: "Browser.addPrivacySandboxEnrollmentOverride" }); -const Browser_AddPrivacySandboxCoordinatorKeyConfigParams = withCdpMeta(z.object({ "api": z.lazy(() => Browser_PrivacySandboxAPI), "coordinatorOrigin": z.string(), "keyConfig": z.string(), "browserContextId": z.lazy(() => Browser_BrowserContextID).optional() }).passthrough(), "Browser.addPrivacySandboxCoordinatorKeyConfig.params", "commandParams", { method: "Browser.addPrivacySandboxCoordinatorKeyConfig" }); -const Browser_AddPrivacySandboxCoordinatorKeyConfigResult = withCdpMeta(z.object({ }).passthrough(), "Browser.addPrivacySandboxCoordinatorKeyConfig.result", "commandResult", { method: "Browser.addPrivacySandboxCoordinatorKeyConfig" }); -const Browser_DownloadWillBeginEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "guid": z.string(), "url": z.string(), "suggestedFilename": z.string() }).passthrough(), "Browser.downloadWillBegin", "event", { phase: "event" }); -const Browser_DownloadProgressEvent = withCdpMeta(z.object({ "guid": z.string(), "totalBytes": z.number(), "receivedBytes": z.number(), "state": z.enum(["inProgress", "completed", "canceled"]), "filePath": z.string().optional() }).passthrough(), "Browser.downloadProgress", "event", { phase: "event" }); -const CacheStorage_CacheId = withCdpMeta(z.string(), "CacheStorage.CacheId", "type"); -const CacheStorage_CachedResponseType = withCdpMeta(z.enum(["basic", "cors", "default", "error", "opaqueResponse", "opaqueRedirect"]), "CacheStorage.CachedResponseType", "type"); -const CacheStorage_DataEntry = withCdpMeta(z.object({ "requestURL": z.string(), "requestMethod": z.string(), "requestHeaders": z.array(z.lazy(() => CacheStorage_Header)), "responseTime": z.number(), "responseStatus": z.number().int(), "responseStatusText": z.string(), "responseType": z.lazy(() => CacheStorage_CachedResponseType), "responseHeaders": z.array(z.lazy(() => CacheStorage_Header)) }).passthrough(), "CacheStorage.DataEntry", "type"); -const CacheStorage_Cache = withCdpMeta(z.object({ "cacheId": z.lazy(() => CacheStorage_CacheId), "securityOrigin": z.string(), "storageKey": z.string(), "storageBucket": z.lazy(() => Storage_StorageBucket).optional(), "cacheName": z.string() }).passthrough(), "CacheStorage.Cache", "type"); -const CacheStorage_Header = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "CacheStorage.Header", "type"); -const CacheStorage_CachedResponse = withCdpMeta(z.object({ "body": z.string() }).passthrough(), "CacheStorage.CachedResponse", "type"); -const CacheStorage_DeleteCacheParams = withCdpMeta(z.object({ "cacheId": z.lazy(() => CacheStorage_CacheId) }).passthrough(), "CacheStorage.deleteCache.params", "commandParams", { method: "CacheStorage.deleteCache" }); -const CacheStorage_DeleteCacheResult = withCdpMeta(z.object({ }).passthrough(), "CacheStorage.deleteCache.result", "commandResult", { method: "CacheStorage.deleteCache" }); -const CacheStorage_DeleteEntryParams = withCdpMeta(z.object({ "cacheId": z.lazy(() => CacheStorage_CacheId), "request": z.string() }).passthrough(), "CacheStorage.deleteEntry.params", "commandParams", { method: "CacheStorage.deleteEntry" }); -const CacheStorage_DeleteEntryResult = withCdpMeta(z.object({ }).passthrough(), "CacheStorage.deleteEntry.result", "commandResult", { method: "CacheStorage.deleteEntry" }); -const CacheStorage_RequestCacheNamesParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage_StorageBucket).optional() }).passthrough(), "CacheStorage.requestCacheNames.params", "commandParams", { method: "CacheStorage.requestCacheNames" }); -const CacheStorage_RequestCacheNamesResult = withCdpMeta(z.object({ "caches": z.array(z.lazy(() => CacheStorage_Cache)) }).passthrough(), "CacheStorage.requestCacheNames.result", "commandResult", { method: "CacheStorage.requestCacheNames" }); -const CacheStorage_RequestCachedResponseParams = withCdpMeta(z.object({ "cacheId": z.lazy(() => CacheStorage_CacheId), "requestURL": z.string(), "requestHeaders": z.array(z.lazy(() => CacheStorage_Header)) }).passthrough(), "CacheStorage.requestCachedResponse.params", "commandParams", { method: "CacheStorage.requestCachedResponse" }); -const CacheStorage_RequestCachedResponseResult = withCdpMeta(z.object({ "response": z.lazy(() => CacheStorage_CachedResponse) }).passthrough(), "CacheStorage.requestCachedResponse.result", "commandResult", { method: "CacheStorage.requestCachedResponse" }); -const CacheStorage_RequestEntriesParams = withCdpMeta(z.object({ "cacheId": z.lazy(() => CacheStorage_CacheId), "skipCount": z.number().int().optional(), "pageSize": z.number().int().optional(), "pathFilter": z.string().optional() }).passthrough(), "CacheStorage.requestEntries.params", "commandParams", { method: "CacheStorage.requestEntries" }); -const CacheStorage_RequestEntriesResult = withCdpMeta(z.object({ "cacheDataEntries": z.array(z.lazy(() => CacheStorage_DataEntry)), "returnCount": z.number() }).passthrough(), "CacheStorage.requestEntries.result", "commandResult", { method: "CacheStorage.requestEntries" }); -const Cast_Sink = withCdpMeta(z.object({ "name": z.string(), "id": z.string(), "session": z.string().optional() }).passthrough(), "Cast.Sink", "type"); -const Cast_EnableParams = withCdpMeta(z.object({ "presentationUrl": z.string().optional() }).passthrough(), "Cast.enable.params", "commandParams", { method: "Cast.enable" }); -const Cast_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Cast.enable.result", "commandResult", { method: "Cast.enable" }); -const Cast_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Cast.disable.params", "commandParams", { method: "Cast.disable" }); -const Cast_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Cast.disable.result", "commandResult", { method: "Cast.disable" }); -const Cast_SetSinkToUseParams = withCdpMeta(z.object({ "sinkName": z.string() }).passthrough(), "Cast.setSinkToUse.params", "commandParams", { method: "Cast.setSinkToUse" }); -const Cast_SetSinkToUseResult = withCdpMeta(z.object({ }).passthrough(), "Cast.setSinkToUse.result", "commandResult", { method: "Cast.setSinkToUse" }); -const Cast_StartDesktopMirroringParams = withCdpMeta(z.object({ "sinkName": z.string() }).passthrough(), "Cast.startDesktopMirroring.params", "commandParams", { method: "Cast.startDesktopMirroring" }); -const Cast_StartDesktopMirroringResult = withCdpMeta(z.object({ }).passthrough(), "Cast.startDesktopMirroring.result", "commandResult", { method: "Cast.startDesktopMirroring" }); -const Cast_StartTabMirroringParams = withCdpMeta(z.object({ "sinkName": z.string() }).passthrough(), "Cast.startTabMirroring.params", "commandParams", { method: "Cast.startTabMirroring" }); -const Cast_StartTabMirroringResult = withCdpMeta(z.object({ }).passthrough(), "Cast.startTabMirroring.result", "commandResult", { method: "Cast.startTabMirroring" }); -const Cast_StopCastingParams = withCdpMeta(z.object({ "sinkName": z.string() }).passthrough(), "Cast.stopCasting.params", "commandParams", { method: "Cast.stopCasting" }); -const Cast_StopCastingResult = withCdpMeta(z.object({ }).passthrough(), "Cast.stopCasting.result", "commandResult", { method: "Cast.stopCasting" }); -const Cast_SinksUpdatedEvent = withCdpMeta(z.object({ "sinks": z.array(z.lazy(() => Cast_Sink)) }).passthrough(), "Cast.sinksUpdated", "event", { phase: "event" }); -const Cast_IssueUpdatedEvent = withCdpMeta(z.object({ "issueMessage": z.string() }).passthrough(), "Cast.issueUpdated", "event", { phase: "event" }); -const Console_ConsoleMessage = withCdpMeta(z.object({ "source": z.enum(["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "security", "other", "deprecation", "worker"]), "level": z.enum(["log", "warning", "error", "debug", "info"]), "text": z.string(), "url": z.string().optional(), "line": z.number().int().optional(), "column": z.number().int().optional() }).passthrough(), "Console.ConsoleMessage", "type"); -const Console_ClearMessagesParams = withCdpMeta(z.object({ }).passthrough(), "Console.clearMessages.params", "commandParams", { method: "Console.clearMessages" }); -const Console_ClearMessagesResult = withCdpMeta(z.object({ }).passthrough(), "Console.clearMessages.result", "commandResult", { method: "Console.clearMessages" }); -const Console_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Console.disable.params", "commandParams", { method: "Console.disable" }); -const Console_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Console.disable.result", "commandResult", { method: "Console.disable" }); -const Console_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Console.enable.params", "commandParams", { method: "Console.enable" }); -const Console_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Console.enable.result", "commandResult", { method: "Console.enable" }); -const Console_MessageAddedEvent = withCdpMeta(z.object({ "message": z.lazy(() => Console_ConsoleMessage) }).passthrough(), "Console.messageAdded", "event", { phase: "event" }); -const CrashReportContext_CrashReportContextEntry = withCdpMeta(z.object({ "key": z.string(), "value": z.string(), "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "CrashReportContext.CrashReportContextEntry", "type"); -const CrashReportContext_GetEntriesParams = withCdpMeta(z.object({ }).passthrough(), "CrashReportContext.getEntries.params", "commandParams", { method: "CrashReportContext.getEntries" }); -const CrashReportContext_GetEntriesResult = withCdpMeta(z.object({ "entries": z.array(z.lazy(() => CrashReportContext_CrashReportContextEntry)) }).passthrough(), "CrashReportContext.getEntries.result", "commandResult", { method: "CrashReportContext.getEntries" }); -const CSS_StyleSheetOrigin = withCdpMeta(z.enum(["injected", "user-agent", "inspector", "regular"]), "CSS.StyleSheetOrigin", "type"); -const CSS_PseudoElementMatches = withCdpMeta(z.object({ "pseudoType": z.lazy(() => DOM_PseudoType), "pseudoIdentifier": z.string().optional(), "matches": z.array(z.lazy(() => CSS_RuleMatch)) }).passthrough(), "CSS.PseudoElementMatches", "type"); -const CSS_CSSAnimationStyle = withCdpMeta(z.object({ "name": z.string().optional(), "style": z.lazy(() => CSS_CSSStyle) }).passthrough(), "CSS.CSSAnimationStyle", "type"); -const CSS_InheritedStyleEntry = withCdpMeta(z.object({ "inlineStyle": z.lazy(() => CSS_CSSStyle).optional(), "matchedCSSRules": z.array(z.lazy(() => CSS_RuleMatch)) }).passthrough(), "CSS.InheritedStyleEntry", "type"); -const CSS_InheritedAnimatedStyleEntry = withCdpMeta(z.object({ "animationStyles": z.array(z.lazy(() => CSS_CSSAnimationStyle)).optional(), "transitionsStyle": z.lazy(() => CSS_CSSStyle).optional() }).passthrough(), "CSS.InheritedAnimatedStyleEntry", "type"); -const CSS_InheritedPseudoElementMatches = withCdpMeta(z.object({ "pseudoElements": z.array(z.lazy(() => CSS_PseudoElementMatches)) }).passthrough(), "CSS.InheritedPseudoElementMatches", "type"); -const CSS_RuleMatch = withCdpMeta(z.object({ "rule": z.lazy(() => CSS_CSSRule), "matchingSelectors": z.array(z.number().int()) }).passthrough(), "CSS.RuleMatch", "type"); -const CSS_Value = withCdpMeta(z.object({ "text": z.string(), "range": z.lazy(() => CSS_SourceRange).optional(), "specificity": z.lazy(() => CSS_Specificity).optional() }).passthrough(), "CSS.Value", "type"); -const CSS_Specificity = withCdpMeta(z.object({ "a": z.number().int(), "b": z.number().int(), "c": z.number().int() }).passthrough(), "CSS.Specificity", "type"); -const CSS_SelectorList = withCdpMeta(z.object({ "selectors": z.array(z.lazy(() => CSS_Value)), "text": z.string() }).passthrough(), "CSS.SelectorList", "type"); -const CSS_CSSStyleSheetHeader = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "frameId": z.lazy(() => Page_FrameId), "sourceURL": z.string(), "sourceMapURL": z.string().optional(), "origin": z.lazy(() => CSS_StyleSheetOrigin), "title": z.string(), "ownerNode": z.lazy(() => DOM_BackendNodeId).optional(), "disabled": z.boolean(), "hasSourceURL": z.boolean().optional(), "isInline": z.boolean(), "isMutable": z.boolean(), "isConstructed": z.boolean(), "startLine": z.number(), "startColumn": z.number(), "length": z.number(), "endLine": z.number(), "endColumn": z.number(), "loadingFailed": z.boolean().optional() }).passthrough(), "CSS.CSSStyleSheetHeader", "type"); -const CSS_CSSRule = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional(), "selectorList": z.lazy(() => CSS_SelectorList), "nestingSelectors": z.array(z.string()).optional(), "origin": z.lazy(() => CSS_StyleSheetOrigin), "style": z.lazy(() => CSS_CSSStyle), "originTreeScopeNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "media": z.array(z.lazy(() => CSS_CSSMedia)).optional(), "containerQueries": z.array(z.lazy(() => CSS_CSSContainerQuery)).optional(), "supports": z.array(z.lazy(() => CSS_CSSSupports)).optional(), "layers": z.array(z.lazy(() => CSS_CSSLayer)).optional(), "scopes": z.array(z.lazy(() => CSS_CSSScope)).optional(), "ruleTypes": z.array(z.lazy(() => CSS_CSSRuleType)).optional(), "startingStyles": z.array(z.lazy(() => CSS_CSSStartingStyle)).optional(), "navigations": z.array(z.lazy(() => CSS_CSSNavigation)).optional() }).passthrough(), "CSS.CSSRule", "type"); -const CSS_CSSRuleType = withCdpMeta(z.enum(["MediaRule", "SupportsRule", "ContainerRule", "LayerRule", "ScopeRule", "StyleRule", "StartingStyleRule", "NavigationRule"]), "CSS.CSSRuleType", "type"); -const CSS_RuleUsage = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "startOffset": z.number(), "endOffset": z.number(), "used": z.boolean() }).passthrough(), "CSS.RuleUsage", "type"); -const CSS_SourceRange = withCdpMeta(z.object({ "startLine": z.number().int(), "startColumn": z.number().int(), "endLine": z.number().int(), "endColumn": z.number().int() }).passthrough(), "CSS.SourceRange", "type"); -const CSS_ShorthandEntry = withCdpMeta(z.object({ "name": z.string(), "value": z.string(), "important": z.boolean().optional() }).passthrough(), "CSS.ShorthandEntry", "type"); -const CSS_CSSComputedStyleProperty = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "CSS.CSSComputedStyleProperty", "type"); -const CSS_ComputedStyleExtraFields = withCdpMeta(z.object({ "isAppearanceBase": z.boolean() }).passthrough(), "CSS.ComputedStyleExtraFields", "type"); -const CSS_CSSStyle = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional(), "cssProperties": z.array(z.lazy(() => CSS_CSSProperty)), "shorthandEntries": z.array(z.lazy(() => CSS_ShorthandEntry)), "cssText": z.string().optional(), "range": z.lazy(() => CSS_SourceRange).optional() }).passthrough(), "CSS.CSSStyle", "type"); -const CSS_CSSProperty = withCdpMeta(z.object({ "name": z.string(), "value": z.string(), "important": z.boolean().optional(), "implicit": z.boolean().optional(), "text": z.string().optional(), "parsedOk": z.boolean().optional(), "disabled": z.boolean().optional(), "range": z.lazy(() => CSS_SourceRange).optional(), "longhandProperties": z.array(z.lazy(() => CSS_CSSProperty)).optional() }).passthrough(), "CSS.CSSProperty", "type"); -const CSS_CSSMedia = withCdpMeta(z.object({ "text": z.string(), "source": z.enum(["mediaRule", "importRule", "linkedSheet", "inlineSheet"]), "sourceURL": z.string().optional(), "range": z.lazy(() => CSS_SourceRange).optional(), "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional(), "mediaList": z.array(z.lazy(() => CSS_MediaQuery)).optional() }).passthrough(), "CSS.CSSMedia", "type"); -const CSS_MediaQuery = withCdpMeta(z.object({ "expressions": z.array(z.lazy(() => CSS_MediaQueryExpression)), "active": z.boolean() }).passthrough(), "CSS.MediaQuery", "type"); -const CSS_MediaQueryExpression = withCdpMeta(z.object({ "value": z.number(), "unit": z.string(), "feature": z.string(), "valueRange": z.lazy(() => CSS_SourceRange).optional(), "computedLength": z.number().optional() }).passthrough(), "CSS.MediaQueryExpression", "type"); -const CSS_CSSContainerQuery = withCdpMeta(z.object({ "text": z.string(), "range": z.lazy(() => CSS_SourceRange).optional(), "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional(), "name": z.string().optional(), "physicalAxes": z.lazy(() => DOM_PhysicalAxes).optional(), "logicalAxes": z.lazy(() => DOM_LogicalAxes).optional(), "queriesScrollState": z.boolean().optional(), "queriesAnchored": z.boolean().optional() }).passthrough(), "CSS.CSSContainerQuery", "type"); -const CSS_CSSSupports = withCdpMeta(z.object({ "text": z.string(), "active": z.boolean(), "range": z.lazy(() => CSS_SourceRange).optional(), "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional() }).passthrough(), "CSS.CSSSupports", "type"); -const CSS_CSSNavigation = withCdpMeta(z.object({ "text": z.string(), "active": z.boolean().optional(), "range": z.lazy(() => CSS_SourceRange).optional(), "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional() }).passthrough(), "CSS.CSSNavigation", "type"); -const CSS_CSSScope = withCdpMeta(z.object({ "text": z.string(), "range": z.lazy(() => CSS_SourceRange).optional(), "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional() }).passthrough(), "CSS.CSSScope", "type"); -const CSS_CSSLayer = withCdpMeta(z.object({ "text": z.string(), "range": z.lazy(() => CSS_SourceRange).optional(), "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional() }).passthrough(), "CSS.CSSLayer", "type"); -const CSS_CSSStartingStyle = withCdpMeta(z.object({ "range": z.lazy(() => CSS_SourceRange).optional(), "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional() }).passthrough(), "CSS.CSSStartingStyle", "type"); -const CSS_CSSLayerData = withCdpMeta(z.object({ "name": z.string(), "subLayers": z.array(z.lazy(() => CSS_CSSLayerData)).optional(), "order": z.number() }).passthrough(), "CSS.CSSLayerData", "type"); -const CSS_PlatformFontUsage = withCdpMeta(z.object({ "familyName": z.string(), "postScriptName": z.string(), "isCustomFont": z.boolean(), "glyphCount": z.number() }).passthrough(), "CSS.PlatformFontUsage", "type"); -const CSS_FontVariationAxis = withCdpMeta(z.object({ "tag": z.string(), "name": z.string(), "minValue": z.number(), "maxValue": z.number(), "defaultValue": z.number() }).passthrough(), "CSS.FontVariationAxis", "type"); -const CSS_FontFace = withCdpMeta(z.object({ "fontFamily": z.string(), "fontStyle": z.string(), "fontVariant": z.string(), "fontWeight": z.string(), "fontStretch": z.string(), "fontDisplay": z.string(), "unicodeRange": z.string(), "src": z.string(), "platformFontFamily": z.string(), "fontVariationAxes": z.array(z.lazy(() => CSS_FontVariationAxis)).optional() }).passthrough(), "CSS.FontFace", "type"); -const CSS_CSSTryRule = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional(), "origin": z.lazy(() => CSS_StyleSheetOrigin), "style": z.lazy(() => CSS_CSSStyle) }).passthrough(), "CSS.CSSTryRule", "type"); -const CSS_CSSPositionTryRule = withCdpMeta(z.object({ "name": z.lazy(() => CSS_Value), "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional(), "origin": z.lazy(() => CSS_StyleSheetOrigin), "style": z.lazy(() => CSS_CSSStyle), "active": z.boolean() }).passthrough(), "CSS.CSSPositionTryRule", "type"); -const CSS_CSSKeyframesRule = withCdpMeta(z.object({ "animationName": z.lazy(() => CSS_Value), "keyframes": z.array(z.lazy(() => CSS_CSSKeyframeRule)) }).passthrough(), "CSS.CSSKeyframesRule", "type"); -const CSS_CSSPropertyRegistration = withCdpMeta(z.object({ "propertyName": z.string(), "initialValue": z.lazy(() => CSS_Value).optional(), "inherits": z.boolean(), "syntax": z.string() }).passthrough(), "CSS.CSSPropertyRegistration", "type"); -const CSS_CSSAtRule = withCdpMeta(z.object({ "type": z.enum(["font-face", "font-feature-values", "font-palette-values"]), "subsection": z.enum(["swash", "annotation", "ornaments", "stylistic", "styleset", "character-variant"]).optional(), "name": z.lazy(() => CSS_Value).optional(), "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional(), "origin": z.lazy(() => CSS_StyleSheetOrigin), "style": z.lazy(() => CSS_CSSStyle) }).passthrough(), "CSS.CSSAtRule", "type"); -const CSS_CSSPropertyRule = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional(), "origin": z.lazy(() => CSS_StyleSheetOrigin), "propertyName": z.lazy(() => CSS_Value), "style": z.lazy(() => CSS_CSSStyle) }).passthrough(), "CSS.CSSPropertyRule", "type"); -const CSS_CSSFunctionParameter = withCdpMeta(z.object({ "name": z.string(), "type": z.string() }).passthrough(), "CSS.CSSFunctionParameter", "type"); -const CSS_CSSFunctionConditionNode = withCdpMeta(z.object({ "media": z.lazy(() => CSS_CSSMedia).optional(), "containerQueries": z.lazy(() => CSS_CSSContainerQuery).optional(), "supports": z.lazy(() => CSS_CSSSupports).optional(), "navigation": z.lazy(() => CSS_CSSNavigation).optional(), "children": z.array(z.lazy(() => CSS_CSSFunctionNode)), "conditionText": z.string() }).passthrough(), "CSS.CSSFunctionConditionNode", "type"); -const CSS_CSSFunctionNode = withCdpMeta(z.object({ "condition": z.lazy(() => CSS_CSSFunctionConditionNode).optional(), "style": z.lazy(() => CSS_CSSStyle).optional() }).passthrough(), "CSS.CSSFunctionNode", "type"); -const CSS_CSSFunctionRule = withCdpMeta(z.object({ "name": z.lazy(() => CSS_Value), "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional(), "origin": z.lazy(() => CSS_StyleSheetOrigin), "parameters": z.array(z.lazy(() => CSS_CSSFunctionParameter)), "children": z.array(z.lazy(() => CSS_CSSFunctionNode)), "originTreeScopeNodeId": z.lazy(() => DOM_BackendNodeId).optional() }).passthrough(), "CSS.CSSFunctionRule", "type"); -const CSS_CSSKeyframeRule = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId).optional(), "origin": z.lazy(() => CSS_StyleSheetOrigin), "keyText": z.lazy(() => CSS_Value), "style": z.lazy(() => CSS_CSSStyle) }).passthrough(), "CSS.CSSKeyframeRule", "type"); -const CSS_StyleDeclarationEdit = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "range": z.lazy(() => CSS_SourceRange), "text": z.string() }).passthrough(), "CSS.StyleDeclarationEdit", "type"); -const CSS_AddRuleParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "ruleText": z.string(), "location": z.lazy(() => CSS_SourceRange), "nodeForPropertySyntaxValidation": z.lazy(() => DOM_NodeId).optional() }).passthrough(), "CSS.addRule.params", "commandParams", { method: "CSS.addRule" }); -const CSS_AddRuleResult = withCdpMeta(z.object({ "rule": z.lazy(() => CSS_CSSRule) }).passthrough(), "CSS.addRule.result", "commandResult", { method: "CSS.addRule" }); -const CSS_CollectClassNamesParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId) }).passthrough(), "CSS.collectClassNames.params", "commandParams", { method: "CSS.collectClassNames" }); -const CSS_CollectClassNamesResult = withCdpMeta(z.object({ "classNames": z.array(z.string()) }).passthrough(), "CSS.collectClassNames.result", "commandResult", { method: "CSS.collectClassNames" }); -const CSS_CreateStyleSheetParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "force": z.boolean().optional() }).passthrough(), "CSS.createStyleSheet.params", "commandParams", { method: "CSS.createStyleSheet" }); -const CSS_CreateStyleSheetResult = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId) }).passthrough(), "CSS.createStyleSheet.result", "commandResult", { method: "CSS.createStyleSheet" }); -const CSS_DisableParams = withCdpMeta(z.object({ }).passthrough(), "CSS.disable.params", "commandParams", { method: "CSS.disable" }); -const CSS_DisableResult = withCdpMeta(z.object({ }).passthrough(), "CSS.disable.result", "commandResult", { method: "CSS.disable" }); -const CSS_EnableParams = withCdpMeta(z.object({ }).passthrough(), "CSS.enable.params", "commandParams", { method: "CSS.enable" }); -const CSS_EnableResult = withCdpMeta(z.object({ }).passthrough(), "CSS.enable.result", "commandResult", { method: "CSS.enable" }); -const CSS_ForcePseudoStateParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "forcedPseudoClasses": z.array(z.string()) }).passthrough(), "CSS.forcePseudoState.params", "commandParams", { method: "CSS.forcePseudoState" }); -const CSS_ForcePseudoStateResult = withCdpMeta(z.object({ }).passthrough(), "CSS.forcePseudoState.result", "commandResult", { method: "CSS.forcePseudoState" }); -const CSS_ForceStartingStyleParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "forced": z.boolean() }).passthrough(), "CSS.forceStartingStyle.params", "commandParams", { method: "CSS.forceStartingStyle" }); -const CSS_ForceStartingStyleResult = withCdpMeta(z.object({ }).passthrough(), "CSS.forceStartingStyle.result", "commandResult", { method: "CSS.forceStartingStyle" }); -const CSS_GetBackgroundColorsParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "CSS.getBackgroundColors.params", "commandParams", { method: "CSS.getBackgroundColors" }); -const CSS_GetBackgroundColorsResult = withCdpMeta(z.object({ "backgroundColors": z.array(z.string()).optional(), "computedFontSize": z.string().optional(), "computedFontWeight": z.string().optional() }).passthrough(), "CSS.getBackgroundColors.result", "commandResult", { method: "CSS.getBackgroundColors" }); -const CSS_GetComputedStyleForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "CSS.getComputedStyleForNode.params", "commandParams", { method: "CSS.getComputedStyleForNode" }); -const CSS_GetComputedStyleForNodeResult = withCdpMeta(z.object({ "computedStyle": z.array(z.lazy(() => CSS_CSSComputedStyleProperty)), "extraFields": z.lazy(() => CSS_ComputedStyleExtraFields) }).passthrough(), "CSS.getComputedStyleForNode.result", "commandResult", { method: "CSS.getComputedStyleForNode" }); -const CSS_ResolveValuesParams = withCdpMeta(z.object({ "values": z.array(z.string()), "nodeId": z.lazy(() => DOM_NodeId), "propertyName": z.string().optional(), "pseudoType": z.lazy(() => DOM_PseudoType).optional(), "pseudoIdentifier": z.string().optional() }).passthrough(), "CSS.resolveValues.params", "commandParams", { method: "CSS.resolveValues" }); -const CSS_ResolveValuesResult = withCdpMeta(z.object({ "results": z.array(z.string()) }).passthrough(), "CSS.resolveValues.result", "commandResult", { method: "CSS.resolveValues" }); -const CSS_GetLonghandPropertiesParams = withCdpMeta(z.object({ "shorthandName": z.string(), "value": z.string() }).passthrough(), "CSS.getLonghandProperties.params", "commandParams", { method: "CSS.getLonghandProperties" }); -const CSS_GetLonghandPropertiesResult = withCdpMeta(z.object({ "longhandProperties": z.array(z.lazy(() => CSS_CSSProperty)) }).passthrough(), "CSS.getLonghandProperties.result", "commandResult", { method: "CSS.getLonghandProperties" }); -const CSS_GetInlineStylesForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "CSS.getInlineStylesForNode.params", "commandParams", { method: "CSS.getInlineStylesForNode" }); -const CSS_GetInlineStylesForNodeResult = withCdpMeta(z.object({ "inlineStyle": z.lazy(() => CSS_CSSStyle).optional(), "attributesStyle": z.lazy(() => CSS_CSSStyle).optional() }).passthrough(), "CSS.getInlineStylesForNode.result", "commandResult", { method: "CSS.getInlineStylesForNode" }); -const CSS_GetAnimatedStylesForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "CSS.getAnimatedStylesForNode.params", "commandParams", { method: "CSS.getAnimatedStylesForNode" }); -const CSS_GetAnimatedStylesForNodeResult = withCdpMeta(z.object({ "animationStyles": z.array(z.lazy(() => CSS_CSSAnimationStyle)).optional(), "transitionsStyle": z.lazy(() => CSS_CSSStyle).optional(), "inherited": z.array(z.lazy(() => CSS_InheritedAnimatedStyleEntry)).optional() }).passthrough(), "CSS.getAnimatedStylesForNode.result", "commandResult", { method: "CSS.getAnimatedStylesForNode" }); -const CSS_GetMatchedStylesForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "CSS.getMatchedStylesForNode.params", "commandParams", { method: "CSS.getMatchedStylesForNode" }); -const CSS_GetMatchedStylesForNodeResult = withCdpMeta(z.object({ "inlineStyle": z.lazy(() => CSS_CSSStyle).optional(), "attributesStyle": z.lazy(() => CSS_CSSStyle).optional(), "matchedCSSRules": z.array(z.lazy(() => CSS_RuleMatch)).optional(), "pseudoElements": z.array(z.lazy(() => CSS_PseudoElementMatches)).optional(), "inherited": z.array(z.lazy(() => CSS_InheritedStyleEntry)).optional(), "inheritedPseudoElements": z.array(z.lazy(() => CSS_InheritedPseudoElementMatches)).optional(), "cssKeyframesRules": z.array(z.lazy(() => CSS_CSSKeyframesRule)).optional(), "cssPositionTryRules": z.array(z.lazy(() => CSS_CSSPositionTryRule)).optional(), "activePositionFallbackIndex": z.number().int().optional(), "cssPropertyRules": z.array(z.lazy(() => CSS_CSSPropertyRule)).optional(), "cssPropertyRegistrations": z.array(z.lazy(() => CSS_CSSPropertyRegistration)).optional(), "cssAtRules": z.array(z.lazy(() => CSS_CSSAtRule)).optional(), "parentLayoutNodeId": z.lazy(() => DOM_NodeId).optional(), "cssFunctionRules": z.array(z.lazy(() => CSS_CSSFunctionRule)).optional() }).passthrough(), "CSS.getMatchedStylesForNode.result", "commandResult", { method: "CSS.getMatchedStylesForNode" }); -const CSS_GetEnvironmentVariablesParams = withCdpMeta(z.object({ }).passthrough(), "CSS.getEnvironmentVariables.params", "commandParams", { method: "CSS.getEnvironmentVariables" }); -const CSS_GetEnvironmentVariablesResult = withCdpMeta(z.object({ "environmentVariables": z.record(z.string(), z.unknown()) }).passthrough(), "CSS.getEnvironmentVariables.result", "commandResult", { method: "CSS.getEnvironmentVariables" }); -const CSS_GetMediaQueriesParams = withCdpMeta(z.object({ }).passthrough(), "CSS.getMediaQueries.params", "commandParams", { method: "CSS.getMediaQueries" }); -const CSS_GetMediaQueriesResult = withCdpMeta(z.object({ "medias": z.array(z.lazy(() => CSS_CSSMedia)) }).passthrough(), "CSS.getMediaQueries.result", "commandResult", { method: "CSS.getMediaQueries" }); -const CSS_GetPlatformFontsForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "CSS.getPlatformFontsForNode.params", "commandParams", { method: "CSS.getPlatformFontsForNode" }); -const CSS_GetPlatformFontsForNodeResult = withCdpMeta(z.object({ "fonts": z.array(z.lazy(() => CSS_PlatformFontUsage)) }).passthrough(), "CSS.getPlatformFontsForNode.result", "commandResult", { method: "CSS.getPlatformFontsForNode" }); -const CSS_GetStyleSheetTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId) }).passthrough(), "CSS.getStyleSheetText.params", "commandParams", { method: "CSS.getStyleSheetText" }); -const CSS_GetStyleSheetTextResult = withCdpMeta(z.object({ "text": z.string() }).passthrough(), "CSS.getStyleSheetText.result", "commandResult", { method: "CSS.getStyleSheetText" }); -const CSS_GetLayersForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "CSS.getLayersForNode.params", "commandParams", { method: "CSS.getLayersForNode" }); -const CSS_GetLayersForNodeResult = withCdpMeta(z.object({ "rootLayer": z.lazy(() => CSS_CSSLayerData) }).passthrough(), "CSS.getLayersForNode.result", "commandResult", { method: "CSS.getLayersForNode" }); -const CSS_GetLocationForSelectorParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "selectorText": z.string() }).passthrough(), "CSS.getLocationForSelector.params", "commandParams", { method: "CSS.getLocationForSelector" }); -const CSS_GetLocationForSelectorResult = withCdpMeta(z.object({ "ranges": z.array(z.lazy(() => CSS_SourceRange)) }).passthrough(), "CSS.getLocationForSelector.result", "commandResult", { method: "CSS.getLocationForSelector" }); -const CSS_TrackComputedStyleUpdatesForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional() }).passthrough(), "CSS.trackComputedStyleUpdatesForNode.params", "commandParams", { method: "CSS.trackComputedStyleUpdatesForNode" }); -const CSS_TrackComputedStyleUpdatesForNodeResult = withCdpMeta(z.object({ }).passthrough(), "CSS.trackComputedStyleUpdatesForNode.result", "commandResult", { method: "CSS.trackComputedStyleUpdatesForNode" }); -const CSS_TrackComputedStyleUpdatesParams = withCdpMeta(z.object({ "propertiesToTrack": z.array(z.lazy(() => CSS_CSSComputedStyleProperty)) }).passthrough(), "CSS.trackComputedStyleUpdates.params", "commandParams", { method: "CSS.trackComputedStyleUpdates" }); -const CSS_TrackComputedStyleUpdatesResult = withCdpMeta(z.object({ }).passthrough(), "CSS.trackComputedStyleUpdates.result", "commandResult", { method: "CSS.trackComputedStyleUpdates" }); -const CSS_TakeComputedStyleUpdatesParams = withCdpMeta(z.object({ }).passthrough(), "CSS.takeComputedStyleUpdates.params", "commandParams", { method: "CSS.takeComputedStyleUpdates" }); -const CSS_TakeComputedStyleUpdatesResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "CSS.takeComputedStyleUpdates.result", "commandResult", { method: "CSS.takeComputedStyleUpdates" }); -const CSS_SetEffectivePropertyValueForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "propertyName": z.string(), "value": z.string() }).passthrough(), "CSS.setEffectivePropertyValueForNode.params", "commandParams", { method: "CSS.setEffectivePropertyValueForNode" }); -const CSS_SetEffectivePropertyValueForNodeResult = withCdpMeta(z.object({ }).passthrough(), "CSS.setEffectivePropertyValueForNode.result", "commandResult", { method: "CSS.setEffectivePropertyValueForNode" }); -const CSS_SetPropertyRulePropertyNameParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "range": z.lazy(() => CSS_SourceRange), "propertyName": z.string() }).passthrough(), "CSS.setPropertyRulePropertyName.params", "commandParams", { method: "CSS.setPropertyRulePropertyName" }); -const CSS_SetPropertyRulePropertyNameResult = withCdpMeta(z.object({ "propertyName": z.lazy(() => CSS_Value) }).passthrough(), "CSS.setPropertyRulePropertyName.result", "commandResult", { method: "CSS.setPropertyRulePropertyName" }); -const CSS_SetKeyframeKeyParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "range": z.lazy(() => CSS_SourceRange), "keyText": z.string() }).passthrough(), "CSS.setKeyframeKey.params", "commandParams", { method: "CSS.setKeyframeKey" }); -const CSS_SetKeyframeKeyResult = withCdpMeta(z.object({ "keyText": z.lazy(() => CSS_Value) }).passthrough(), "CSS.setKeyframeKey.result", "commandResult", { method: "CSS.setKeyframeKey" }); -const CSS_SetMediaTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "range": z.lazy(() => CSS_SourceRange), "text": z.string() }).passthrough(), "CSS.setMediaText.params", "commandParams", { method: "CSS.setMediaText" }); -const CSS_SetMediaTextResult = withCdpMeta(z.object({ "media": z.lazy(() => CSS_CSSMedia) }).passthrough(), "CSS.setMediaText.result", "commandResult", { method: "CSS.setMediaText" }); -const CSS_SetContainerQueryTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "range": z.lazy(() => CSS_SourceRange), "text": z.string() }).passthrough(), "CSS.setContainerQueryText.params", "commandParams", { method: "CSS.setContainerQueryText" }); -const CSS_SetContainerQueryTextResult = withCdpMeta(z.object({ "containerQuery": z.lazy(() => CSS_CSSContainerQuery) }).passthrough(), "CSS.setContainerQueryText.result", "commandResult", { method: "CSS.setContainerQueryText" }); -const CSS_SetSupportsTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "range": z.lazy(() => CSS_SourceRange), "text": z.string() }).passthrough(), "CSS.setSupportsText.params", "commandParams", { method: "CSS.setSupportsText" }); -const CSS_SetSupportsTextResult = withCdpMeta(z.object({ "supports": z.lazy(() => CSS_CSSSupports) }).passthrough(), "CSS.setSupportsText.result", "commandResult", { method: "CSS.setSupportsText" }); -const CSS_SetNavigationTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "range": z.lazy(() => CSS_SourceRange), "text": z.string() }).passthrough(), "CSS.setNavigationText.params", "commandParams", { method: "CSS.setNavigationText" }); -const CSS_SetNavigationTextResult = withCdpMeta(z.object({ "navigation": z.lazy(() => CSS_CSSNavigation) }).passthrough(), "CSS.setNavigationText.result", "commandResult", { method: "CSS.setNavigationText" }); -const CSS_SetScopeTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "range": z.lazy(() => CSS_SourceRange), "text": z.string() }).passthrough(), "CSS.setScopeText.params", "commandParams", { method: "CSS.setScopeText" }); -const CSS_SetScopeTextResult = withCdpMeta(z.object({ "scope": z.lazy(() => CSS_CSSScope) }).passthrough(), "CSS.setScopeText.result", "commandResult", { method: "CSS.setScopeText" }); -const CSS_SetRuleSelectorParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "range": z.lazy(() => CSS_SourceRange), "selector": z.string() }).passthrough(), "CSS.setRuleSelector.params", "commandParams", { method: "CSS.setRuleSelector" }); -const CSS_SetRuleSelectorResult = withCdpMeta(z.object({ "selectorList": z.lazy(() => CSS_SelectorList) }).passthrough(), "CSS.setRuleSelector.result", "commandResult", { method: "CSS.setRuleSelector" }); -const CSS_SetStyleSheetTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId), "text": z.string() }).passthrough(), "CSS.setStyleSheetText.params", "commandParams", { method: "CSS.setStyleSheetText" }); -const CSS_SetStyleSheetTextResult = withCdpMeta(z.object({ "sourceMapURL": z.string().optional() }).passthrough(), "CSS.setStyleSheetText.result", "commandResult", { method: "CSS.setStyleSheetText" }); -const CSS_SetStyleTextsParams = withCdpMeta(z.object({ "edits": z.array(z.lazy(() => CSS_StyleDeclarationEdit)), "nodeForPropertySyntaxValidation": z.lazy(() => DOM_NodeId).optional() }).passthrough(), "CSS.setStyleTexts.params", "commandParams", { method: "CSS.setStyleTexts" }); -const CSS_SetStyleTextsResult = withCdpMeta(z.object({ "styles": z.array(z.lazy(() => CSS_CSSStyle)) }).passthrough(), "CSS.setStyleTexts.result", "commandResult", { method: "CSS.setStyleTexts" }); -const CSS_StartRuleUsageTrackingParams = withCdpMeta(z.object({ }).passthrough(), "CSS.startRuleUsageTracking.params", "commandParams", { method: "CSS.startRuleUsageTracking" }); -const CSS_StartRuleUsageTrackingResult = withCdpMeta(z.object({ }).passthrough(), "CSS.startRuleUsageTracking.result", "commandResult", { method: "CSS.startRuleUsageTracking" }); -const CSS_StopRuleUsageTrackingParams = withCdpMeta(z.object({ }).passthrough(), "CSS.stopRuleUsageTracking.params", "commandParams", { method: "CSS.stopRuleUsageTracking" }); -const CSS_StopRuleUsageTrackingResult = withCdpMeta(z.object({ "ruleUsage": z.array(z.lazy(() => CSS_RuleUsage)) }).passthrough(), "CSS.stopRuleUsageTracking.result", "commandResult", { method: "CSS.stopRuleUsageTracking" }); -const CSS_TakeCoverageDeltaParams = withCdpMeta(z.object({ }).passthrough(), "CSS.takeCoverageDelta.params", "commandParams", { method: "CSS.takeCoverageDelta" }); -const CSS_TakeCoverageDeltaResult = withCdpMeta(z.object({ "coverage": z.array(z.lazy(() => CSS_RuleUsage)), "timestamp": z.number() }).passthrough(), "CSS.takeCoverageDelta.result", "commandResult", { method: "CSS.takeCoverageDelta" }); -const CSS_SetLocalFontsEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "CSS.setLocalFontsEnabled.params", "commandParams", { method: "CSS.setLocalFontsEnabled" }); -const CSS_SetLocalFontsEnabledResult = withCdpMeta(z.object({ }).passthrough(), "CSS.setLocalFontsEnabled.result", "commandResult", { method: "CSS.setLocalFontsEnabled" }); -const CSS_FontsUpdatedEvent = withCdpMeta(z.object({ "font": z.lazy(() => CSS_FontFace).optional() }).passthrough(), "CSS.fontsUpdated", "event", { phase: "event" }); -const CSS_MediaQueryResultChangedEvent = withCdpMeta(z.object({ }).passthrough(), "CSS.mediaQueryResultChanged", "event", { phase: "event" }); -const CSS_StyleSheetAddedEvent = withCdpMeta(z.object({ "header": z.lazy(() => CSS_CSSStyleSheetHeader) }).passthrough(), "CSS.styleSheetAdded", "event", { phase: "event" }); -const CSS_StyleSheetChangedEvent = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId) }).passthrough(), "CSS.styleSheetChanged", "event", { phase: "event" }); -const CSS_StyleSheetRemovedEvent = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM_StyleSheetId) }).passthrough(), "CSS.styleSheetRemoved", "event", { phase: "event" }); -const CSS_ComputedStyleUpdatedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "CSS.computedStyleUpdated", "event", { phase: "event" }); -const Debugger_BreakpointId = withCdpMeta(z.string(), "Debugger.BreakpointId", "type"); -const Debugger_CallFrameId = withCdpMeta(z.string(), "Debugger.CallFrameId", "type"); -const Debugger_Location = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "lineNumber": z.number().int(), "columnNumber": z.number().int().optional() }).passthrough(), "Debugger.Location", "type"); -const Debugger_ScriptPosition = withCdpMeta(z.object({ "lineNumber": z.number().int(), "columnNumber": z.number().int() }).passthrough(), "Debugger.ScriptPosition", "type"); -const Debugger_LocationRange = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "start": z.lazy(() => Debugger_ScriptPosition), "end": z.lazy(() => Debugger_ScriptPosition) }).passthrough(), "Debugger.LocationRange", "type"); -const Debugger_CallFrame = withCdpMeta(z.object({ "callFrameId": z.lazy(() => Debugger_CallFrameId), "functionName": z.string(), "functionLocation": z.lazy(() => Debugger_Location).optional(), "location": z.lazy(() => Debugger_Location), "url": z.string(), "scopeChain": z.array(z.lazy(() => Debugger_Scope)), "this": z.lazy(() => Runtime_RemoteObject), "returnValue": z.lazy(() => Runtime_RemoteObject).optional(), "canBeRestarted": z.boolean().optional() }).passthrough(), "Debugger.CallFrame", "type"); -const Debugger_Scope = withCdpMeta(z.object({ "type": z.enum(["global", "local", "with", "closure", "catch", "block", "script", "eval", "module", "wasm-expression-stack"]), "object": z.lazy(() => Runtime_RemoteObject), "name": z.string().optional(), "startLocation": z.lazy(() => Debugger_Location).optional(), "endLocation": z.lazy(() => Debugger_Location).optional() }).passthrough(), "Debugger.Scope", "type"); -const Debugger_SearchMatch = withCdpMeta(z.object({ "lineNumber": z.number(), "lineContent": z.string() }).passthrough(), "Debugger.SearchMatch", "type"); -const Debugger_BreakLocation = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "lineNumber": z.number().int(), "columnNumber": z.number().int().optional(), "type": z.enum(["debuggerStatement", "call", "return"]).optional() }).passthrough(), "Debugger.BreakLocation", "type"); -const Debugger_WasmDisassemblyChunk = withCdpMeta(z.object({ "lines": z.array(z.string()), "bytecodeOffsets": z.array(z.number().int()) }).passthrough(), "Debugger.WasmDisassemblyChunk", "type"); -const Debugger_ScriptLanguage = withCdpMeta(z.enum(["JavaScript", "WebAssembly"]), "Debugger.ScriptLanguage", "type"); -const Debugger_DebugSymbols = withCdpMeta(z.object({ "type": z.enum(["SourceMap", "EmbeddedDWARF", "ExternalDWARF"]), "externalURL": z.string().optional() }).passthrough(), "Debugger.DebugSymbols", "type"); -const Debugger_ResolvedBreakpoint = withCdpMeta(z.object({ "breakpointId": z.lazy(() => Debugger_BreakpointId), "location": z.lazy(() => Debugger_Location) }).passthrough(), "Debugger.ResolvedBreakpoint", "type"); -const Debugger_ContinueToLocationParams = withCdpMeta(z.object({ "location": z.lazy(() => Debugger_Location), "targetCallFrames": z.enum(["any", "current"]).optional() }).passthrough(), "Debugger.continueToLocation.params", "commandParams", { method: "Debugger.continueToLocation" }); -const Debugger_ContinueToLocationResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.continueToLocation.result", "commandResult", { method: "Debugger.continueToLocation" }); -const Debugger_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Debugger.disable.params", "commandParams", { method: "Debugger.disable" }); -const Debugger_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.disable.result", "commandResult", { method: "Debugger.disable" }); -const Debugger_EnableParams = withCdpMeta(z.object({ "maxScriptsCacheSize": z.number().optional() }).passthrough(), "Debugger.enable.params", "commandParams", { method: "Debugger.enable" }); -const Debugger_EnableResult = withCdpMeta(z.object({ "debuggerId": z.lazy(() => Runtime_UniqueDebuggerId) }).passthrough(), "Debugger.enable.result", "commandResult", { method: "Debugger.enable" }); -const Debugger_EvaluateOnCallFrameParams = withCdpMeta(z.object({ "callFrameId": z.lazy(() => Debugger_CallFrameId), "expression": z.string(), "objectGroup": z.string().optional(), "includeCommandLineAPI": z.boolean().optional(), "silent": z.boolean().optional(), "returnByValue": z.boolean().optional(), "generatePreview": z.boolean().optional(), "throwOnSideEffect": z.boolean().optional(), "timeout": z.lazy(() => Runtime_TimeDelta).optional() }).passthrough(), "Debugger.evaluateOnCallFrame.params", "commandParams", { method: "Debugger.evaluateOnCallFrame" }); -const Debugger_EvaluateOnCallFrameResult = withCdpMeta(z.object({ "result": z.lazy(() => Runtime_RemoteObject), "exceptionDetails": z.lazy(() => Runtime_ExceptionDetails).optional() }).passthrough(), "Debugger.evaluateOnCallFrame.result", "commandResult", { method: "Debugger.evaluateOnCallFrame" }); -const Debugger_GetPossibleBreakpointsParams = withCdpMeta(z.object({ "start": z.lazy(() => Debugger_Location), "end": z.lazy(() => Debugger_Location).optional(), "restrictToFunction": z.boolean().optional() }).passthrough(), "Debugger.getPossibleBreakpoints.params", "commandParams", { method: "Debugger.getPossibleBreakpoints" }); -const Debugger_GetPossibleBreakpointsResult = withCdpMeta(z.object({ "locations": z.array(z.lazy(() => Debugger_BreakLocation)) }).passthrough(), "Debugger.getPossibleBreakpoints.result", "commandResult", { method: "Debugger.getPossibleBreakpoints" }); -const Debugger_GetScriptSourceParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId) }).passthrough(), "Debugger.getScriptSource.params", "commandParams", { method: "Debugger.getScriptSource" }); -const Debugger_GetScriptSourceResult = withCdpMeta(z.object({ "scriptSource": z.string(), "bytecode": z.string().optional() }).passthrough(), "Debugger.getScriptSource.result", "commandResult", { method: "Debugger.getScriptSource" }); -const Debugger_DisassembleWasmModuleParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId) }).passthrough(), "Debugger.disassembleWasmModule.params", "commandParams", { method: "Debugger.disassembleWasmModule" }); -const Debugger_DisassembleWasmModuleResult = withCdpMeta(z.object({ "streamId": z.string().optional(), "totalNumberOfLines": z.number().int(), "functionBodyOffsets": z.array(z.number().int()), "chunk": z.lazy(() => Debugger_WasmDisassemblyChunk) }).passthrough(), "Debugger.disassembleWasmModule.result", "commandResult", { method: "Debugger.disassembleWasmModule" }); -const Debugger_NextWasmDisassemblyChunkParams = withCdpMeta(z.object({ "streamId": z.string() }).passthrough(), "Debugger.nextWasmDisassemblyChunk.params", "commandParams", { method: "Debugger.nextWasmDisassemblyChunk" }); -const Debugger_NextWasmDisassemblyChunkResult = withCdpMeta(z.object({ "chunk": z.lazy(() => Debugger_WasmDisassemblyChunk) }).passthrough(), "Debugger.nextWasmDisassemblyChunk.result", "commandResult", { method: "Debugger.nextWasmDisassemblyChunk" }); -const Debugger_GetWasmBytecodeParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId) }).passthrough(), "Debugger.getWasmBytecode.params", "commandParams", { method: "Debugger.getWasmBytecode" }); -const Debugger_GetWasmBytecodeResult = withCdpMeta(z.object({ "bytecode": z.string() }).passthrough(), "Debugger.getWasmBytecode.result", "commandResult", { method: "Debugger.getWasmBytecode" }); -const Debugger_GetStackTraceParams = withCdpMeta(z.object({ "stackTraceId": z.lazy(() => Runtime_StackTraceId) }).passthrough(), "Debugger.getStackTrace.params", "commandParams", { method: "Debugger.getStackTrace" }); -const Debugger_GetStackTraceResult = withCdpMeta(z.object({ "stackTrace": z.lazy(() => Runtime_StackTrace) }).passthrough(), "Debugger.getStackTrace.result", "commandResult", { method: "Debugger.getStackTrace" }); -const Debugger_PauseParams = withCdpMeta(z.object({ }).passthrough(), "Debugger.pause.params", "commandParams", { method: "Debugger.pause" }); -const Debugger_PauseResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.pause.result", "commandResult", { method: "Debugger.pause" }); -const Debugger_PauseOnAsyncCallParams = withCdpMeta(z.object({ "parentStackTraceId": z.lazy(() => Runtime_StackTraceId) }).passthrough(), "Debugger.pauseOnAsyncCall.params", "commandParams", { method: "Debugger.pauseOnAsyncCall" }); -const Debugger_PauseOnAsyncCallResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.pauseOnAsyncCall.result", "commandResult", { method: "Debugger.pauseOnAsyncCall" }); -const Debugger_RemoveBreakpointParams = withCdpMeta(z.object({ "breakpointId": z.lazy(() => Debugger_BreakpointId) }).passthrough(), "Debugger.removeBreakpoint.params", "commandParams", { method: "Debugger.removeBreakpoint" }); -const Debugger_RemoveBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.removeBreakpoint.result", "commandResult", { method: "Debugger.removeBreakpoint" }); -const Debugger_RestartFrameParams = withCdpMeta(z.object({ "callFrameId": z.lazy(() => Debugger_CallFrameId), "mode": z.enum(["StepInto"]).optional() }).passthrough(), "Debugger.restartFrame.params", "commandParams", { method: "Debugger.restartFrame" }); -const Debugger_RestartFrameResult = withCdpMeta(z.object({ "callFrames": z.array(z.lazy(() => Debugger_CallFrame)), "asyncStackTrace": z.lazy(() => Runtime_StackTrace).optional(), "asyncStackTraceId": z.lazy(() => Runtime_StackTraceId).optional() }).passthrough(), "Debugger.restartFrame.result", "commandResult", { method: "Debugger.restartFrame" }); -const Debugger_ResumeParams = withCdpMeta(z.object({ "terminateOnResume": z.boolean().optional() }).passthrough(), "Debugger.resume.params", "commandParams", { method: "Debugger.resume" }); -const Debugger_ResumeResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.resume.result", "commandResult", { method: "Debugger.resume" }); -const Debugger_SearchInContentParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "query": z.string(), "caseSensitive": z.boolean().optional(), "isRegex": z.boolean().optional() }).passthrough(), "Debugger.searchInContent.params", "commandParams", { method: "Debugger.searchInContent" }); -const Debugger_SearchInContentResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => Debugger_SearchMatch)) }).passthrough(), "Debugger.searchInContent.result", "commandResult", { method: "Debugger.searchInContent" }); -const Debugger_SetAsyncCallStackDepthParams = withCdpMeta(z.object({ "maxDepth": z.number().int() }).passthrough(), "Debugger.setAsyncCallStackDepth.params", "commandParams", { method: "Debugger.setAsyncCallStackDepth" }); -const Debugger_SetAsyncCallStackDepthResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setAsyncCallStackDepth.result", "commandResult", { method: "Debugger.setAsyncCallStackDepth" }); -const Debugger_SetBlackboxExecutionContextsParams = withCdpMeta(z.object({ "uniqueIds": z.array(z.string()) }).passthrough(), "Debugger.setBlackboxExecutionContexts.params", "commandParams", { method: "Debugger.setBlackboxExecutionContexts" }); -const Debugger_SetBlackboxExecutionContextsResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setBlackboxExecutionContexts.result", "commandResult", { method: "Debugger.setBlackboxExecutionContexts" }); -const Debugger_SetBlackboxPatternsParams = withCdpMeta(z.object({ "patterns": z.array(z.string()), "skipAnonymous": z.boolean().optional() }).passthrough(), "Debugger.setBlackboxPatterns.params", "commandParams", { method: "Debugger.setBlackboxPatterns" }); -const Debugger_SetBlackboxPatternsResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setBlackboxPatterns.result", "commandResult", { method: "Debugger.setBlackboxPatterns" }); -const Debugger_SetBlackboxedRangesParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "positions": z.array(z.lazy(() => Debugger_ScriptPosition)) }).passthrough(), "Debugger.setBlackboxedRanges.params", "commandParams", { method: "Debugger.setBlackboxedRanges" }); -const Debugger_SetBlackboxedRangesResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setBlackboxedRanges.result", "commandResult", { method: "Debugger.setBlackboxedRanges" }); -const Debugger_SetBreakpointParams = withCdpMeta(z.object({ "location": z.lazy(() => Debugger_Location), "condition": z.string().optional() }).passthrough(), "Debugger.setBreakpoint.params", "commandParams", { method: "Debugger.setBreakpoint" }); -const Debugger_SetBreakpointResult = withCdpMeta(z.object({ "breakpointId": z.lazy(() => Debugger_BreakpointId), "actualLocation": z.lazy(() => Debugger_Location) }).passthrough(), "Debugger.setBreakpoint.result", "commandResult", { method: "Debugger.setBreakpoint" }); -const Debugger_SetInstrumentationBreakpointParams = withCdpMeta(z.object({ "instrumentation": z.enum(["beforeScriptExecution", "beforeScriptWithSourceMapExecution"]) }).passthrough(), "Debugger.setInstrumentationBreakpoint.params", "commandParams", { method: "Debugger.setInstrumentationBreakpoint" }); -const Debugger_SetInstrumentationBreakpointResult = withCdpMeta(z.object({ "breakpointId": z.lazy(() => Debugger_BreakpointId) }).passthrough(), "Debugger.setInstrumentationBreakpoint.result", "commandResult", { method: "Debugger.setInstrumentationBreakpoint" }); -const Debugger_SetBreakpointByUrlParams = withCdpMeta(z.object({ "lineNumber": z.number().int(), "url": z.string().optional(), "urlRegex": z.string().optional(), "scriptHash": z.string().optional(), "columnNumber": z.number().int().optional(), "condition": z.string().optional() }).passthrough(), "Debugger.setBreakpointByUrl.params", "commandParams", { method: "Debugger.setBreakpointByUrl" }); -const Debugger_SetBreakpointByUrlResult = withCdpMeta(z.object({ "breakpointId": z.lazy(() => Debugger_BreakpointId), "locations": z.array(z.lazy(() => Debugger_Location)) }).passthrough(), "Debugger.setBreakpointByUrl.result", "commandResult", { method: "Debugger.setBreakpointByUrl" }); -const Debugger_SetBreakpointOnFunctionCallParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime_RemoteObjectId), "condition": z.string().optional() }).passthrough(), "Debugger.setBreakpointOnFunctionCall.params", "commandParams", { method: "Debugger.setBreakpointOnFunctionCall" }); -const Debugger_SetBreakpointOnFunctionCallResult = withCdpMeta(z.object({ "breakpointId": z.lazy(() => Debugger_BreakpointId) }).passthrough(), "Debugger.setBreakpointOnFunctionCall.result", "commandResult", { method: "Debugger.setBreakpointOnFunctionCall" }); -const Debugger_SetBreakpointsActiveParams = withCdpMeta(z.object({ "active": z.boolean() }).passthrough(), "Debugger.setBreakpointsActive.params", "commandParams", { method: "Debugger.setBreakpointsActive" }); -const Debugger_SetBreakpointsActiveResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setBreakpointsActive.result", "commandResult", { method: "Debugger.setBreakpointsActive" }); -const Debugger_SetPauseOnExceptionsParams = withCdpMeta(z.object({ "state": z.enum(["none", "caught", "uncaught", "all"]) }).passthrough(), "Debugger.setPauseOnExceptions.params", "commandParams", { method: "Debugger.setPauseOnExceptions" }); -const Debugger_SetPauseOnExceptionsResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setPauseOnExceptions.result", "commandResult", { method: "Debugger.setPauseOnExceptions" }); -const Debugger_SetReturnValueParams = withCdpMeta(z.object({ "newValue": z.lazy(() => Runtime_CallArgument) }).passthrough(), "Debugger.setReturnValue.params", "commandParams", { method: "Debugger.setReturnValue" }); -const Debugger_SetReturnValueResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setReturnValue.result", "commandResult", { method: "Debugger.setReturnValue" }); -const Debugger_SetScriptSourceParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "scriptSource": z.string(), "dryRun": z.boolean().optional(), "allowTopFrameEditing": z.boolean().optional() }).passthrough(), "Debugger.setScriptSource.params", "commandParams", { method: "Debugger.setScriptSource" }); -const Debugger_SetScriptSourceResult = withCdpMeta(z.object({ "callFrames": z.array(z.lazy(() => Debugger_CallFrame)).optional(), "stackChanged": z.boolean().optional(), "asyncStackTrace": z.lazy(() => Runtime_StackTrace).optional(), "asyncStackTraceId": z.lazy(() => Runtime_StackTraceId).optional(), "status": z.enum(["Ok", "CompileError", "BlockedByActiveGenerator", "BlockedByActiveFunction", "BlockedByTopLevelEsModuleChange"]), "exceptionDetails": z.lazy(() => Runtime_ExceptionDetails).optional() }).passthrough(), "Debugger.setScriptSource.result", "commandResult", { method: "Debugger.setScriptSource" }); -const Debugger_SetSkipAllPausesParams = withCdpMeta(z.object({ "skip": z.boolean() }).passthrough(), "Debugger.setSkipAllPauses.params", "commandParams", { method: "Debugger.setSkipAllPauses" }); -const Debugger_SetSkipAllPausesResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setSkipAllPauses.result", "commandResult", { method: "Debugger.setSkipAllPauses" }); -const Debugger_SetVariableValueParams = withCdpMeta(z.object({ "scopeNumber": z.number().int(), "variableName": z.string(), "newValue": z.lazy(() => Runtime_CallArgument), "callFrameId": z.lazy(() => Debugger_CallFrameId) }).passthrough(), "Debugger.setVariableValue.params", "commandParams", { method: "Debugger.setVariableValue" }); -const Debugger_SetVariableValueResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setVariableValue.result", "commandResult", { method: "Debugger.setVariableValue" }); -const Debugger_StepIntoParams = withCdpMeta(z.object({ "breakOnAsyncCall": z.boolean().optional(), "skipList": z.array(z.lazy(() => Debugger_LocationRange)).optional() }).passthrough(), "Debugger.stepInto.params", "commandParams", { method: "Debugger.stepInto" }); -const Debugger_StepIntoResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.stepInto.result", "commandResult", { method: "Debugger.stepInto" }); -const Debugger_StepOutParams = withCdpMeta(z.object({ }).passthrough(), "Debugger.stepOut.params", "commandParams", { method: "Debugger.stepOut" }); -const Debugger_StepOutResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.stepOut.result", "commandResult", { method: "Debugger.stepOut" }); -const Debugger_StepOverParams = withCdpMeta(z.object({ "skipList": z.array(z.lazy(() => Debugger_LocationRange)).optional() }).passthrough(), "Debugger.stepOver.params", "commandParams", { method: "Debugger.stepOver" }); -const Debugger_StepOverResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.stepOver.result", "commandResult", { method: "Debugger.stepOver" }); -const Debugger_BreakpointResolvedEvent = withCdpMeta(z.object({ "breakpointId": z.lazy(() => Debugger_BreakpointId), "location": z.lazy(() => Debugger_Location) }).passthrough(), "Debugger.breakpointResolved", "event", { phase: "event" }); -const Debugger_PausedEvent = withCdpMeta(z.object({ "callFrames": z.array(z.lazy(() => Debugger_CallFrame)), "reason": z.enum(["ambiguous", "assert", "CSPViolation", "debugCommand", "DOM", "EventListener", "exception", "instrumentation", "OOM", "other", "promiseRejection", "XHR", "step"]), "data": z.record(z.string(), z.unknown()).optional(), "hitBreakpoints": z.array(z.string()).optional(), "asyncStackTrace": z.lazy(() => Runtime_StackTrace).optional(), "asyncStackTraceId": z.lazy(() => Runtime_StackTraceId).optional(), "asyncCallStackTraceId": z.lazy(() => Runtime_StackTraceId).optional() }).passthrough(), "Debugger.paused", "event", { phase: "event" }); -const Debugger_ResumedEvent = withCdpMeta(z.object({ }).passthrough(), "Debugger.resumed", "event", { phase: "event" }); -const Debugger_ScriptFailedToParseEvent = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "url": z.string(), "startLine": z.number().int(), "startColumn": z.number().int(), "endLine": z.number().int(), "endColumn": z.number().int(), "executionContextId": z.lazy(() => Runtime_ExecutionContextId), "hash": z.string(), "buildId": z.string(), "executionContextAuxData": z.record(z.string(), z.unknown()).optional(), "sourceMapURL": z.string().optional(), "hasSourceURL": z.boolean().optional(), "isModule": z.boolean().optional(), "length": z.number().int().optional(), "stackTrace": z.lazy(() => Runtime_StackTrace).optional(), "codeOffset": z.number().int().optional(), "scriptLanguage": z.lazy(() => Debugger_ScriptLanguage).optional(), "embedderName": z.string().optional() }).passthrough(), "Debugger.scriptFailedToParse", "event", { phase: "event" }); -const Debugger_ScriptParsedEvent = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "url": z.string(), "startLine": z.number().int(), "startColumn": z.number().int(), "endLine": z.number().int(), "endColumn": z.number().int(), "executionContextId": z.lazy(() => Runtime_ExecutionContextId), "hash": z.string(), "buildId": z.string(), "executionContextAuxData": z.record(z.string(), z.unknown()).optional(), "isLiveEdit": z.boolean().optional(), "sourceMapURL": z.string().optional(), "hasSourceURL": z.boolean().optional(), "isModule": z.boolean().optional(), "length": z.number().int().optional(), "stackTrace": z.lazy(() => Runtime_StackTrace).optional(), "codeOffset": z.number().int().optional(), "scriptLanguage": z.lazy(() => Debugger_ScriptLanguage).optional(), "debugSymbols": z.array(z.lazy(() => Debugger_DebugSymbols)).optional(), "embedderName": z.string().optional(), "resolvedBreakpoints": z.array(z.lazy(() => Debugger_ResolvedBreakpoint)).optional() }).passthrough(), "Debugger.scriptParsed", "event", { phase: "event" }); -const DeviceAccess_RequestId = withCdpMeta(z.string(), "DeviceAccess.RequestId", "type"); -const DeviceAccess_DeviceId = withCdpMeta(z.string(), "DeviceAccess.DeviceId", "type"); -const DeviceAccess_PromptDevice = withCdpMeta(z.object({ "id": z.lazy(() => DeviceAccess_DeviceId), "name": z.string() }).passthrough(), "DeviceAccess.PromptDevice", "type"); -const DeviceAccess_EnableParams = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.enable.params", "commandParams", { method: "DeviceAccess.enable" }); -const DeviceAccess_EnableResult = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.enable.result", "commandResult", { method: "DeviceAccess.enable" }); -const DeviceAccess_DisableParams = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.disable.params", "commandParams", { method: "DeviceAccess.disable" }); -const DeviceAccess_DisableResult = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.disable.result", "commandResult", { method: "DeviceAccess.disable" }); -const DeviceAccess_SelectPromptParams = withCdpMeta(z.object({ "id": z.lazy(() => DeviceAccess_RequestId), "deviceId": z.lazy(() => DeviceAccess_DeviceId) }).passthrough(), "DeviceAccess.selectPrompt.params", "commandParams", { method: "DeviceAccess.selectPrompt" }); -const DeviceAccess_SelectPromptResult = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.selectPrompt.result", "commandResult", { method: "DeviceAccess.selectPrompt" }); -const DeviceAccess_CancelPromptParams = withCdpMeta(z.object({ "id": z.lazy(() => DeviceAccess_RequestId) }).passthrough(), "DeviceAccess.cancelPrompt.params", "commandParams", { method: "DeviceAccess.cancelPrompt" }); -const DeviceAccess_CancelPromptResult = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.cancelPrompt.result", "commandResult", { method: "DeviceAccess.cancelPrompt" }); -const DeviceAccess_DeviceRequestPromptedEvent = withCdpMeta(z.object({ "id": z.lazy(() => DeviceAccess_RequestId), "devices": z.array(z.lazy(() => DeviceAccess_PromptDevice)) }).passthrough(), "DeviceAccess.deviceRequestPrompted", "event", { phase: "event" }); -const DeviceOrientation_ClearDeviceOrientationOverrideParams = withCdpMeta(z.object({ }).passthrough(), "DeviceOrientation.clearDeviceOrientationOverride.params", "commandParams", { method: "DeviceOrientation.clearDeviceOrientationOverride" }); -const DeviceOrientation_ClearDeviceOrientationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "DeviceOrientation.clearDeviceOrientationOverride.result", "commandResult", { method: "DeviceOrientation.clearDeviceOrientationOverride" }); -const DeviceOrientation_SetDeviceOrientationOverrideParams = withCdpMeta(z.object({ "alpha": z.number(), "beta": z.number(), "gamma": z.number() }).passthrough(), "DeviceOrientation.setDeviceOrientationOverride.params", "commandParams", { method: "DeviceOrientation.setDeviceOrientationOverride" }); -const DeviceOrientation_SetDeviceOrientationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "DeviceOrientation.setDeviceOrientationOverride.result", "commandResult", { method: "DeviceOrientation.setDeviceOrientationOverride" }); -const DOM_NodeId = withCdpMeta(z.number().int(), "DOM.NodeId", "type"); -const DOM_BackendNodeId = withCdpMeta(z.number().int(), "DOM.BackendNodeId", "type"); -const DOM_StyleSheetId = withCdpMeta(z.string(), "DOM.StyleSheetId", "type"); -const DOM_BackendNode = withCdpMeta(z.object({ "nodeType": z.number().int(), "nodeName": z.string(), "backendNodeId": z.lazy(() => DOM_BackendNodeId) }).passthrough(), "DOM.BackendNode", "type"); -const DOM_PseudoType = withCdpMeta(z.enum(["first-line", "first-letter", "checkmark", "before", "after", "expand-icon", "picker-icon", "interest-button", "marker", "backdrop", "column", "selection", "search-text", "target-text", "spelling-error", "grammar-error", "highlight", "first-line-inherited", "scroll-marker", "scroll-marker-group", "scroll-button", "scrollbar", "scrollbar-thumb", "scrollbar-button", "scrollbar-track", "scrollbar-track-piece", "scrollbar-corner", "resizer", "input-list-button", "view-transition", "view-transition-group", "view-transition-image-pair", "view-transition-group-children", "view-transition-old", "view-transition-new", "placeholder", "file-selector-button", "details-content", "picker", "permission-icon", "overscroll-area-parent"]), "DOM.PseudoType", "type"); -const DOM_ShadowRootType = withCdpMeta(z.enum(["user-agent", "open", "closed"]), "DOM.ShadowRootType", "type"); -const DOM_CompatibilityMode = withCdpMeta(z.enum(["QuirksMode", "LimitedQuirksMode", "NoQuirksMode"]), "DOM.CompatibilityMode", "type"); -const DOM_PhysicalAxes = withCdpMeta(z.enum(["Horizontal", "Vertical", "Both"]), "DOM.PhysicalAxes", "type"); -const DOM_LogicalAxes = withCdpMeta(z.enum(["Inline", "Block", "Both"]), "DOM.LogicalAxes", "type"); -const DOM_ScrollOrientation = withCdpMeta(z.enum(["horizontal", "vertical"]), "DOM.ScrollOrientation", "type"); -const DOM_Node = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "parentId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId), "nodeType": z.number().int(), "nodeName": z.string(), "localName": z.string(), "nodeValue": z.string(), "childNodeCount": z.number().int().optional(), "children": z.array(z.lazy(() => DOM_Node)).optional(), "attributes": z.array(z.string()).optional(), "documentURL": z.string().optional(), "baseURL": z.string().optional(), "publicId": z.string().optional(), "systemId": z.string().optional(), "internalSubset": z.string().optional(), "xmlVersion": z.string().optional(), "name": z.string().optional(), "value": z.string().optional(), "pseudoType": z.lazy(() => DOM_PseudoType).optional(), "pseudoIdentifier": z.string().optional(), "shadowRootType": z.lazy(() => DOM_ShadowRootType).optional(), "frameId": z.lazy(() => Page_FrameId).optional(), "contentDocument": z.lazy(() => DOM_Node).optional(), "shadowRoots": z.array(z.lazy(() => DOM_Node)).optional(), "templateContent": z.lazy(() => DOM_Node).optional(), "pseudoElements": z.array(z.lazy(() => DOM_Node)).optional(), "importedDocument": z.lazy(() => DOM_Node).optional(), "distributedNodes": z.array(z.lazy(() => DOM_BackendNode)).optional(), "isSVG": z.boolean().optional(), "compatibilityMode": z.lazy(() => DOM_CompatibilityMode).optional(), "assignedSlot": z.lazy(() => DOM_BackendNode).optional(), "isScrollable": z.boolean().optional(), "affectedByStartingStyles": z.boolean().optional(), "adoptedStyleSheets": z.array(z.lazy(() => DOM_StyleSheetId)).optional(), "adProvenance": z.lazy(() => Network_AdProvenance).optional() }).passthrough(), "DOM.Node", "type"); -const DOM_DetachedElementInfo = withCdpMeta(z.object({ "treeNode": z.lazy(() => DOM_Node), "retainedNodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "DOM.DetachedElementInfo", "type"); -const DOM_RGBA = withCdpMeta(z.object({ "r": z.number().int(), "g": z.number().int(), "b": z.number().int(), "a": z.number().optional() }).passthrough(), "DOM.RGBA", "type"); -const DOM_Quad = withCdpMeta(z.array(z.number()), "DOM.Quad", "type"); -const DOM_BoxModel = withCdpMeta(z.object({ "content": z.lazy(() => DOM_Quad), "padding": z.lazy(() => DOM_Quad), "border": z.lazy(() => DOM_Quad), "margin": z.lazy(() => DOM_Quad), "width": z.number().int(), "height": z.number().int(), "shapeOutside": z.lazy(() => DOM_ShapeOutsideInfo).optional() }).passthrough(), "DOM.BoxModel", "type"); -const DOM_ShapeOutsideInfo = withCdpMeta(z.object({ "bounds": z.lazy(() => DOM_Quad), "shape": z.array(z.any()), "marginShape": z.array(z.any()) }).passthrough(), "DOM.ShapeOutsideInfo", "type"); -const DOM_Rect = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "width": z.number(), "height": z.number() }).passthrough(), "DOM.Rect", "type"); -const DOM_CSSComputedStyleProperty = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "DOM.CSSComputedStyleProperty", "type"); -const DOM_CollectClassNamesFromSubtreeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.collectClassNamesFromSubtree.params", "commandParams", { method: "DOM.collectClassNamesFromSubtree" }); -const DOM_CollectClassNamesFromSubtreeResult = withCdpMeta(z.object({ "classNames": z.array(z.string()) }).passthrough(), "DOM.collectClassNamesFromSubtree.result", "commandResult", { method: "DOM.collectClassNamesFromSubtree" }); -const DOM_CopyToParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "targetNodeId": z.lazy(() => DOM_NodeId), "insertBeforeNodeId": z.lazy(() => DOM_NodeId).optional() }).passthrough(), "DOM.copyTo.params", "commandParams", { method: "DOM.copyTo" }); -const DOM_CopyToResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.copyTo.result", "commandResult", { method: "DOM.copyTo" }); -const DOM_DescribeNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional(), "depth": z.number().int().optional(), "pierce": z.boolean().optional() }).passthrough(), "DOM.describeNode.params", "commandParams", { method: "DOM.describeNode" }); -const DOM_DescribeNodeResult = withCdpMeta(z.object({ "node": z.lazy(() => DOM_Node) }).passthrough(), "DOM.describeNode.result", "commandResult", { method: "DOM.describeNode" }); -const DOM_ScrollIntoViewIfNeededParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional(), "rect": z.lazy(() => DOM_Rect).optional() }).passthrough(), "DOM.scrollIntoViewIfNeeded.params", "commandParams", { method: "DOM.scrollIntoViewIfNeeded" }); -const DOM_ScrollIntoViewIfNeededResult = withCdpMeta(z.object({ }).passthrough(), "DOM.scrollIntoViewIfNeeded.result", "commandResult", { method: "DOM.scrollIntoViewIfNeeded" }); -const DOM_DisableParams = withCdpMeta(z.object({ }).passthrough(), "DOM.disable.params", "commandParams", { method: "DOM.disable" }); -const DOM_DisableResult = withCdpMeta(z.object({ }).passthrough(), "DOM.disable.result", "commandResult", { method: "DOM.disable" }); -const DOM_DiscardSearchResultsParams = withCdpMeta(z.object({ "searchId": z.string() }).passthrough(), "DOM.discardSearchResults.params", "commandParams", { method: "DOM.discardSearchResults" }); -const DOM_DiscardSearchResultsResult = withCdpMeta(z.object({ }).passthrough(), "DOM.discardSearchResults.result", "commandResult", { method: "DOM.discardSearchResults" }); -const DOM_EnableParams = withCdpMeta(z.object({ "includeWhitespace": z.enum(["none", "all"]).optional() }).passthrough(), "DOM.enable.params", "commandParams", { method: "DOM.enable" }); -const DOM_EnableResult = withCdpMeta(z.object({ }).passthrough(), "DOM.enable.result", "commandResult", { method: "DOM.enable" }); -const DOM_FocusParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional() }).passthrough(), "DOM.focus.params", "commandParams", { method: "DOM.focus" }); -const DOM_FocusResult = withCdpMeta(z.object({ }).passthrough(), "DOM.focus.result", "commandResult", { method: "DOM.focus" }); -const DOM_GetAttributesParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.getAttributes.params", "commandParams", { method: "DOM.getAttributes" }); -const DOM_GetAttributesResult = withCdpMeta(z.object({ "attributes": z.array(z.string()) }).passthrough(), "DOM.getAttributes.result", "commandResult", { method: "DOM.getAttributes" }); -const DOM_GetBoxModelParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional() }).passthrough(), "DOM.getBoxModel.params", "commandParams", { method: "DOM.getBoxModel" }); -const DOM_GetBoxModelResult = withCdpMeta(z.object({ "model": z.lazy(() => DOM_BoxModel) }).passthrough(), "DOM.getBoxModel.result", "commandResult", { method: "DOM.getBoxModel" }); -const DOM_GetContentQuadsParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional() }).passthrough(), "DOM.getContentQuads.params", "commandParams", { method: "DOM.getContentQuads" }); -const DOM_GetContentQuadsResult = withCdpMeta(z.object({ "quads": z.array(z.lazy(() => DOM_Quad)) }).passthrough(), "DOM.getContentQuads.result", "commandResult", { method: "DOM.getContentQuads" }); -const DOM_GetDocumentParams = withCdpMeta(z.object({ "depth": z.number().int().optional(), "pierce": z.boolean().optional() }).passthrough(), "DOM.getDocument.params", "commandParams", { method: "DOM.getDocument" }); -const DOM_GetDocumentResult = withCdpMeta(z.object({ "root": z.lazy(() => DOM_Node) }).passthrough(), "DOM.getDocument.result", "commandResult", { method: "DOM.getDocument" }); -const DOM_GetFlattenedDocumentParams = withCdpMeta(z.object({ "depth": z.number().int().optional(), "pierce": z.boolean().optional() }).passthrough(), "DOM.getFlattenedDocument.params", "commandParams", { method: "DOM.getFlattenedDocument" }); -const DOM_GetFlattenedDocumentResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => DOM_Node)) }).passthrough(), "DOM.getFlattenedDocument.result", "commandResult", { method: "DOM.getFlattenedDocument" }); -const DOM_GetNodesForSubtreeByStyleParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "computedStyles": z.array(z.lazy(() => DOM_CSSComputedStyleProperty)), "pierce": z.boolean().optional() }).passthrough(), "DOM.getNodesForSubtreeByStyle.params", "commandParams", { method: "DOM.getNodesForSubtreeByStyle" }); -const DOM_GetNodesForSubtreeByStyleResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "DOM.getNodesForSubtreeByStyle.result", "commandResult", { method: "DOM.getNodesForSubtreeByStyle" }); -const DOM_GetNodeForLocationParams = withCdpMeta(z.object({ "x": z.number().int(), "y": z.number().int(), "includeUserAgentShadowDOM": z.boolean().optional(), "ignorePointerEventsNone": z.boolean().optional() }).passthrough(), "DOM.getNodeForLocation.params", "commandParams", { method: "DOM.getNodeForLocation" }); -const DOM_GetNodeForLocationResult = withCdpMeta(z.object({ "backendNodeId": z.lazy(() => DOM_BackendNodeId), "frameId": z.lazy(() => Page_FrameId), "nodeId": z.lazy(() => DOM_NodeId).optional() }).passthrough(), "DOM.getNodeForLocation.result", "commandResult", { method: "DOM.getNodeForLocation" }); -const DOM_GetOuterHTMLParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional(), "includeShadowDOM": z.boolean().optional() }).passthrough(), "DOM.getOuterHTML.params", "commandParams", { method: "DOM.getOuterHTML" }); -const DOM_GetOuterHTMLResult = withCdpMeta(z.object({ "outerHTML": z.string() }).passthrough(), "DOM.getOuterHTML.result", "commandResult", { method: "DOM.getOuterHTML" }); -const DOM_GetRelayoutBoundaryParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.getRelayoutBoundary.params", "commandParams", { method: "DOM.getRelayoutBoundary" }); -const DOM_GetRelayoutBoundaryResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.getRelayoutBoundary.result", "commandResult", { method: "DOM.getRelayoutBoundary" }); -const DOM_GetSearchResultsParams = withCdpMeta(z.object({ "searchId": z.string(), "fromIndex": z.number().int(), "toIndex": z.number().int() }).passthrough(), "DOM.getSearchResults.params", "commandParams", { method: "DOM.getSearchResults" }); -const DOM_GetSearchResultsResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "DOM.getSearchResults.result", "commandResult", { method: "DOM.getSearchResults" }); -const DOM_HideHighlightParams = withCdpMeta(z.object({ }).passthrough(), "DOM.hideHighlight.params", "commandParams", { method: "DOM.hideHighlight" }); -const DOM_HideHighlightResult = withCdpMeta(z.object({ }).passthrough(), "DOM.hideHighlight.result", "commandResult", { method: "DOM.hideHighlight" }); -const DOM_HighlightNodeParams = withCdpMeta(z.object({ }).passthrough(), "DOM.highlightNode.params", "commandParams", { method: "DOM.highlightNode" }); -const DOM_HighlightNodeResult = withCdpMeta(z.object({ }).passthrough(), "DOM.highlightNode.result", "commandResult", { method: "DOM.highlightNode" }); -const DOM_HighlightRectParams = withCdpMeta(z.object({ }).passthrough(), "DOM.highlightRect.params", "commandParams", { method: "DOM.highlightRect" }); -const DOM_HighlightRectResult = withCdpMeta(z.object({ }).passthrough(), "DOM.highlightRect.result", "commandResult", { method: "DOM.highlightRect" }); -const DOM_MarkUndoableStateParams = withCdpMeta(z.object({ }).passthrough(), "DOM.markUndoableState.params", "commandParams", { method: "DOM.markUndoableState" }); -const DOM_MarkUndoableStateResult = withCdpMeta(z.object({ }).passthrough(), "DOM.markUndoableState.result", "commandResult", { method: "DOM.markUndoableState" }); -const DOM_MoveToParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "targetNodeId": z.lazy(() => DOM_NodeId), "insertBeforeNodeId": z.lazy(() => DOM_NodeId).optional() }).passthrough(), "DOM.moveTo.params", "commandParams", { method: "DOM.moveTo" }); -const DOM_MoveToResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.moveTo.result", "commandResult", { method: "DOM.moveTo" }); -const DOM_PerformSearchParams = withCdpMeta(z.object({ "query": z.string(), "includeUserAgentShadowDOM": z.boolean().optional() }).passthrough(), "DOM.performSearch.params", "commandParams", { method: "DOM.performSearch" }); -const DOM_PerformSearchResult = withCdpMeta(z.object({ "searchId": z.string(), "resultCount": z.number().int() }).passthrough(), "DOM.performSearch.result", "commandResult", { method: "DOM.performSearch" }); -const DOM_PushNodeByPathToFrontendParams = withCdpMeta(z.object({ "path": z.string() }).passthrough(), "DOM.pushNodeByPathToFrontend.params", "commandParams", { method: "DOM.pushNodeByPathToFrontend" }); -const DOM_PushNodeByPathToFrontendResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.pushNodeByPathToFrontend.result", "commandResult", { method: "DOM.pushNodeByPathToFrontend" }); -const DOM_PushNodesByBackendIdsToFrontendParams = withCdpMeta(z.object({ "backendNodeIds": z.array(z.lazy(() => DOM_BackendNodeId)) }).passthrough(), "DOM.pushNodesByBackendIdsToFrontend.params", "commandParams", { method: "DOM.pushNodesByBackendIdsToFrontend" }); -const DOM_PushNodesByBackendIdsToFrontendResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "DOM.pushNodesByBackendIdsToFrontend.result", "commandResult", { method: "DOM.pushNodesByBackendIdsToFrontend" }); -const DOM_QuerySelectorParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "selector": z.string() }).passthrough(), "DOM.querySelector.params", "commandParams", { method: "DOM.querySelector" }); -const DOM_QuerySelectorResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.querySelector.result", "commandResult", { method: "DOM.querySelector" }); -const DOM_QuerySelectorAllParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "selector": z.string() }).passthrough(), "DOM.querySelectorAll.params", "commandParams", { method: "DOM.querySelectorAll" }); -const DOM_QuerySelectorAllResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "DOM.querySelectorAll.result", "commandResult", { method: "DOM.querySelectorAll" }); -const DOM_GetTopLayerElementsParams = withCdpMeta(z.object({ }).passthrough(), "DOM.getTopLayerElements.params", "commandParams", { method: "DOM.getTopLayerElements" }); -const DOM_GetTopLayerElementsResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "DOM.getTopLayerElements.result", "commandResult", { method: "DOM.getTopLayerElements" }); -const DOM_GetElementByRelationParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "relation": z.enum(["PopoverTarget", "InterestTarget", "CommandFor"]) }).passthrough(), "DOM.getElementByRelation.params", "commandParams", { method: "DOM.getElementByRelation" }); -const DOM_GetElementByRelationResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.getElementByRelation.result", "commandResult", { method: "DOM.getElementByRelation" }); -const DOM_RedoParams = withCdpMeta(z.object({ }).passthrough(), "DOM.redo.params", "commandParams", { method: "DOM.redo" }); -const DOM_RedoResult = withCdpMeta(z.object({ }).passthrough(), "DOM.redo.result", "commandResult", { method: "DOM.redo" }); -const DOM_RemoveAttributeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "name": z.string() }).passthrough(), "DOM.removeAttribute.params", "commandParams", { method: "DOM.removeAttribute" }); -const DOM_RemoveAttributeResult = withCdpMeta(z.object({ }).passthrough(), "DOM.removeAttribute.result", "commandResult", { method: "DOM.removeAttribute" }); -const DOM_RemoveNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.removeNode.params", "commandParams", { method: "DOM.removeNode" }); -const DOM_RemoveNodeResult = withCdpMeta(z.object({ }).passthrough(), "DOM.removeNode.result", "commandResult", { method: "DOM.removeNode" }); -const DOM_RequestChildNodesParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "depth": z.number().int().optional(), "pierce": z.boolean().optional() }).passthrough(), "DOM.requestChildNodes.params", "commandParams", { method: "DOM.requestChildNodes" }); -const DOM_RequestChildNodesResult = withCdpMeta(z.object({ }).passthrough(), "DOM.requestChildNodes.result", "commandResult", { method: "DOM.requestChildNodes" }); -const DOM_RequestNodeParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime_RemoteObjectId) }).passthrough(), "DOM.requestNode.params", "commandParams", { method: "DOM.requestNode" }); -const DOM_RequestNodeResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.requestNode.result", "commandResult", { method: "DOM.requestNode" }); -const DOM_ResolveNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectGroup": z.string().optional(), "executionContextId": z.lazy(() => Runtime_ExecutionContextId).optional() }).passthrough(), "DOM.resolveNode.params", "commandParams", { method: "DOM.resolveNode" }); -const DOM_ResolveNodeResult = withCdpMeta(z.object({ "object": z.lazy(() => Runtime_RemoteObject) }).passthrough(), "DOM.resolveNode.result", "commandResult", { method: "DOM.resolveNode" }); -const DOM_SetAttributeValueParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "name": z.string(), "value": z.string() }).passthrough(), "DOM.setAttributeValue.params", "commandParams", { method: "DOM.setAttributeValue" }); -const DOM_SetAttributeValueResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setAttributeValue.result", "commandResult", { method: "DOM.setAttributeValue" }); -const DOM_SetAttributesAsTextParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "text": z.string(), "name": z.string().optional() }).passthrough(), "DOM.setAttributesAsText.params", "commandParams", { method: "DOM.setAttributesAsText" }); -const DOM_SetAttributesAsTextResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setAttributesAsText.result", "commandResult", { method: "DOM.setAttributesAsText" }); -const DOM_SetFileInputFilesParams = withCdpMeta(z.object({ "files": z.array(z.string()), "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional() }).passthrough(), "DOM.setFileInputFiles.params", "commandParams", { method: "DOM.setFileInputFiles" }); -const DOM_SetFileInputFilesResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setFileInputFiles.result", "commandResult", { method: "DOM.setFileInputFiles" }); -const DOM_SetNodeStackTracesEnabledParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "DOM.setNodeStackTracesEnabled.params", "commandParams", { method: "DOM.setNodeStackTracesEnabled" }); -const DOM_SetNodeStackTracesEnabledResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setNodeStackTracesEnabled.result", "commandResult", { method: "DOM.setNodeStackTracesEnabled" }); -const DOM_GetNodeStackTracesParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.getNodeStackTraces.params", "commandParams", { method: "DOM.getNodeStackTraces" }); -const DOM_GetNodeStackTracesResult = withCdpMeta(z.object({ "creation": z.lazy(() => Runtime_StackTrace).optional() }).passthrough(), "DOM.getNodeStackTraces.result", "commandResult", { method: "DOM.getNodeStackTraces" }); -const DOM_GetFileInfoParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime_RemoteObjectId) }).passthrough(), "DOM.getFileInfo.params", "commandParams", { method: "DOM.getFileInfo" }); -const DOM_GetFileInfoResult = withCdpMeta(z.object({ "path": z.string() }).passthrough(), "DOM.getFileInfo.result", "commandResult", { method: "DOM.getFileInfo" }); -const DOM_GetDetachedDomNodesParams = withCdpMeta(z.object({ }).passthrough(), "DOM.getDetachedDomNodes.params", "commandParams", { method: "DOM.getDetachedDomNodes" }); -const DOM_GetDetachedDomNodesResult = withCdpMeta(z.object({ "detachedNodes": z.array(z.lazy(() => DOM_DetachedElementInfo)) }).passthrough(), "DOM.getDetachedDomNodes.result", "commandResult", { method: "DOM.getDetachedDomNodes" }); -const DOM_SetInspectedNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.setInspectedNode.params", "commandParams", { method: "DOM.setInspectedNode" }); -const DOM_SetInspectedNodeResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setInspectedNode.result", "commandResult", { method: "DOM.setInspectedNode" }); -const DOM_SetNodeNameParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "name": z.string() }).passthrough(), "DOM.setNodeName.params", "commandParams", { method: "DOM.setNodeName" }); -const DOM_SetNodeNameResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.setNodeName.result", "commandResult", { method: "DOM.setNodeName" }); -const DOM_SetNodeValueParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "value": z.string() }).passthrough(), "DOM.setNodeValue.params", "commandParams", { method: "DOM.setNodeValue" }); -const DOM_SetNodeValueResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setNodeValue.result", "commandResult", { method: "DOM.setNodeValue" }); -const DOM_SetOuterHTMLParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "outerHTML": z.string() }).passthrough(), "DOM.setOuterHTML.params", "commandParams", { method: "DOM.setOuterHTML" }); -const DOM_SetOuterHTMLResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setOuterHTML.result", "commandResult", { method: "DOM.setOuterHTML" }); -const DOM_UndoParams = withCdpMeta(z.object({ }).passthrough(), "DOM.undo.params", "commandParams", { method: "DOM.undo" }); -const DOM_UndoResult = withCdpMeta(z.object({ }).passthrough(), "DOM.undo.result", "commandResult", { method: "DOM.undo" }); -const DOM_GetFrameOwnerParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "DOM.getFrameOwner.params", "commandParams", { method: "DOM.getFrameOwner" }); -const DOM_GetFrameOwnerResult = withCdpMeta(z.object({ "backendNodeId": z.lazy(() => DOM_BackendNodeId), "nodeId": z.lazy(() => DOM_NodeId).optional() }).passthrough(), "DOM.getFrameOwner.result", "commandResult", { method: "DOM.getFrameOwner" }); -const DOM_GetContainerForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "containerName": z.string().optional(), "physicalAxes": z.lazy(() => DOM_PhysicalAxes).optional(), "logicalAxes": z.lazy(() => DOM_LogicalAxes).optional(), "queriesScrollState": z.boolean().optional(), "queriesAnchored": z.boolean().optional() }).passthrough(), "DOM.getContainerForNode.params", "commandParams", { method: "DOM.getContainerForNode" }); -const DOM_GetContainerForNodeResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional() }).passthrough(), "DOM.getContainerForNode.result", "commandResult", { method: "DOM.getContainerForNode" }); -const DOM_GetQueryingDescendantsForContainerParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.getQueryingDescendantsForContainer.params", "commandParams", { method: "DOM.getQueryingDescendantsForContainer" }); -const DOM_GetQueryingDescendantsForContainerResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "DOM.getQueryingDescendantsForContainer.result", "commandResult", { method: "DOM.getQueryingDescendantsForContainer" }); -const DOM_GetAnchorElementParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "anchorSpecifier": z.string().optional() }).passthrough(), "DOM.getAnchorElement.params", "commandParams", { method: "DOM.getAnchorElement" }); -const DOM_GetAnchorElementResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.getAnchorElement.result", "commandResult", { method: "DOM.getAnchorElement" }); -const DOM_ForceShowPopoverParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "enable": z.boolean() }).passthrough(), "DOM.forceShowPopover.params", "commandParams", { method: "DOM.forceShowPopover" }); -const DOM_ForceShowPopoverResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "DOM.forceShowPopover.result", "commandResult", { method: "DOM.forceShowPopover" }); -const DOM_AttributeModifiedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "name": z.string(), "value": z.string() }).passthrough(), "DOM.attributeModified", "event", { phase: "event" }); -const DOM_AdoptedStyleSheetsModifiedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "adoptedStyleSheets": z.array(z.lazy(() => DOM_StyleSheetId)) }).passthrough(), "DOM.adoptedStyleSheetsModified", "event", { phase: "event" }); -const DOM_AttributeRemovedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "name": z.string() }).passthrough(), "DOM.attributeRemoved", "event", { phase: "event" }); -const DOM_CharacterDataModifiedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "characterData": z.string() }).passthrough(), "DOM.characterDataModified", "event", { phase: "event" }); -const DOM_ChildNodeCountUpdatedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "childNodeCount": z.number().int() }).passthrough(), "DOM.childNodeCountUpdated", "event", { phase: "event" }); -const DOM_ChildNodeInsertedEvent = withCdpMeta(z.object({ "parentNodeId": z.lazy(() => DOM_NodeId), "previousNodeId": z.lazy(() => DOM_NodeId), "node": z.lazy(() => DOM_Node) }).passthrough(), "DOM.childNodeInserted", "event", { phase: "event" }); -const DOM_ChildNodeRemovedEvent = withCdpMeta(z.object({ "parentNodeId": z.lazy(() => DOM_NodeId), "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.childNodeRemoved", "event", { phase: "event" }); -const DOM_DistributedNodesUpdatedEvent = withCdpMeta(z.object({ "insertionPointId": z.lazy(() => DOM_NodeId), "distributedNodes": z.array(z.lazy(() => DOM_BackendNode)) }).passthrough(), "DOM.distributedNodesUpdated", "event", { phase: "event" }); -const DOM_DocumentUpdatedEvent = withCdpMeta(z.object({ }).passthrough(), "DOM.documentUpdated", "event", { phase: "event" }); -const DOM_InlineStyleInvalidatedEvent = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "DOM.inlineStyleInvalidated", "event", { phase: "event" }); -const DOM_PseudoElementAddedEvent = withCdpMeta(z.object({ "parentId": z.lazy(() => DOM_NodeId), "pseudoElement": z.lazy(() => DOM_Node) }).passthrough(), "DOM.pseudoElementAdded", "event", { phase: "event" }); -const DOM_TopLayerElementsUpdatedEvent = withCdpMeta(z.object({ }).passthrough(), "DOM.topLayerElementsUpdated", "event", { phase: "event" }); -const DOM_ScrollableFlagUpdatedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "isScrollable": z.boolean() }).passthrough(), "DOM.scrollableFlagUpdated", "event", { phase: "event" }); -const DOM_AdRelatedStateUpdatedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "adProvenance": z.lazy(() => Network_AdProvenance).optional() }).passthrough(), "DOM.adRelatedStateUpdated", "event", { phase: "event" }); -const DOM_AffectedByStartingStylesFlagUpdatedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "affectedByStartingStyles": z.boolean() }).passthrough(), "DOM.affectedByStartingStylesFlagUpdated", "event", { phase: "event" }); -const DOM_PseudoElementRemovedEvent = withCdpMeta(z.object({ "parentId": z.lazy(() => DOM_NodeId), "pseudoElementId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.pseudoElementRemoved", "event", { phase: "event" }); -const DOM_SetChildNodesEvent = withCdpMeta(z.object({ "parentId": z.lazy(() => DOM_NodeId), "nodes": z.array(z.lazy(() => DOM_Node)) }).passthrough(), "DOM.setChildNodes", "event", { phase: "event" }); -const DOM_ShadowRootPoppedEvent = withCdpMeta(z.object({ "hostId": z.lazy(() => DOM_NodeId), "rootId": z.lazy(() => DOM_NodeId) }).passthrough(), "DOM.shadowRootPopped", "event", { phase: "event" }); -const DOM_ShadowRootPushedEvent = withCdpMeta(z.object({ "hostId": z.lazy(() => DOM_NodeId), "root": z.lazy(() => DOM_Node) }).passthrough(), "DOM.shadowRootPushed", "event", { phase: "event" }); -const DOMDebugger_DOMBreakpointType = withCdpMeta(z.enum(["subtree-modified", "attribute-modified", "node-removed"]), "DOMDebugger.DOMBreakpointType", "type"); -const DOMDebugger_CSPViolationType = withCdpMeta(z.enum(["trustedtype-sink-violation", "trustedtype-policy-violation"]), "DOMDebugger.CSPViolationType", "type"); -const DOMDebugger_EventListener = withCdpMeta(z.object({ "type": z.string(), "useCapture": z.boolean(), "passive": z.boolean(), "once": z.boolean(), "scriptId": z.lazy(() => Runtime_ScriptId), "lineNumber": z.number().int(), "columnNumber": z.number().int(), "handler": z.lazy(() => Runtime_RemoteObject).optional(), "originalHandler": z.lazy(() => Runtime_RemoteObject).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional() }).passthrough(), "DOMDebugger.EventListener", "type"); -const DOMDebugger_GetEventListenersParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime_RemoteObjectId), "depth": z.number().int().optional(), "pierce": z.boolean().optional() }).passthrough(), "DOMDebugger.getEventListeners.params", "commandParams", { method: "DOMDebugger.getEventListeners" }); -const DOMDebugger_GetEventListenersResult = withCdpMeta(z.object({ "listeners": z.array(z.lazy(() => DOMDebugger_EventListener)) }).passthrough(), "DOMDebugger.getEventListeners.result", "commandResult", { method: "DOMDebugger.getEventListeners" }); -const DOMDebugger_RemoveDOMBreakpointParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "type": z.lazy(() => DOMDebugger_DOMBreakpointType) }).passthrough(), "DOMDebugger.removeDOMBreakpoint.params", "commandParams", { method: "DOMDebugger.removeDOMBreakpoint" }); -const DOMDebugger_RemoveDOMBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.removeDOMBreakpoint.result", "commandResult", { method: "DOMDebugger.removeDOMBreakpoint" }); -const DOMDebugger_RemoveEventListenerBreakpointParams = withCdpMeta(z.object({ "eventName": z.string(), "targetName": z.string().optional() }).passthrough(), "DOMDebugger.removeEventListenerBreakpoint.params", "commandParams", { method: "DOMDebugger.removeEventListenerBreakpoint" }); -const DOMDebugger_RemoveEventListenerBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.removeEventListenerBreakpoint.result", "commandResult", { method: "DOMDebugger.removeEventListenerBreakpoint" }); -const DOMDebugger_RemoveInstrumentationBreakpointParams = withCdpMeta(z.object({ "eventName": z.string() }).passthrough(), "DOMDebugger.removeInstrumentationBreakpoint.params", "commandParams", { method: "DOMDebugger.removeInstrumentationBreakpoint" }); -const DOMDebugger_RemoveInstrumentationBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.removeInstrumentationBreakpoint.result", "commandResult", { method: "DOMDebugger.removeInstrumentationBreakpoint" }); -const DOMDebugger_RemoveXHRBreakpointParams = withCdpMeta(z.object({ "url": z.string() }).passthrough(), "DOMDebugger.removeXHRBreakpoint.params", "commandParams", { method: "DOMDebugger.removeXHRBreakpoint" }); -const DOMDebugger_RemoveXHRBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.removeXHRBreakpoint.result", "commandResult", { method: "DOMDebugger.removeXHRBreakpoint" }); -const DOMDebugger_SetBreakOnCSPViolationParams = withCdpMeta(z.object({ "violationTypes": z.array(z.lazy(() => DOMDebugger_CSPViolationType)) }).passthrough(), "DOMDebugger.setBreakOnCSPViolation.params", "commandParams", { method: "DOMDebugger.setBreakOnCSPViolation" }); -const DOMDebugger_SetBreakOnCSPViolationResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.setBreakOnCSPViolation.result", "commandResult", { method: "DOMDebugger.setBreakOnCSPViolation" }); -const DOMDebugger_SetDOMBreakpointParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "type": z.lazy(() => DOMDebugger_DOMBreakpointType) }).passthrough(), "DOMDebugger.setDOMBreakpoint.params", "commandParams", { method: "DOMDebugger.setDOMBreakpoint" }); -const DOMDebugger_SetDOMBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.setDOMBreakpoint.result", "commandResult", { method: "DOMDebugger.setDOMBreakpoint" }); -const DOMDebugger_SetEventListenerBreakpointParams = withCdpMeta(z.object({ "eventName": z.string(), "targetName": z.string().optional() }).passthrough(), "DOMDebugger.setEventListenerBreakpoint.params", "commandParams", { method: "DOMDebugger.setEventListenerBreakpoint" }); -const DOMDebugger_SetEventListenerBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.setEventListenerBreakpoint.result", "commandResult", { method: "DOMDebugger.setEventListenerBreakpoint" }); -const DOMDebugger_SetInstrumentationBreakpointParams = withCdpMeta(z.object({ "eventName": z.string() }).passthrough(), "DOMDebugger.setInstrumentationBreakpoint.params", "commandParams", { method: "DOMDebugger.setInstrumentationBreakpoint" }); -const DOMDebugger_SetInstrumentationBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.setInstrumentationBreakpoint.result", "commandResult", { method: "DOMDebugger.setInstrumentationBreakpoint" }); -const DOMDebugger_SetXHRBreakpointParams = withCdpMeta(z.object({ "url": z.string() }).passthrough(), "DOMDebugger.setXHRBreakpoint.params", "commandParams", { method: "DOMDebugger.setXHRBreakpoint" }); -const DOMDebugger_SetXHRBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.setXHRBreakpoint.result", "commandResult", { method: "DOMDebugger.setXHRBreakpoint" }); -const DOMSnapshot_DOMNode = withCdpMeta(z.object({ "nodeType": z.number().int(), "nodeName": z.string(), "nodeValue": z.string(), "textValue": z.string().optional(), "inputValue": z.string().optional(), "inputChecked": z.boolean().optional(), "optionSelected": z.boolean().optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId), "childNodeIndexes": z.array(z.number().int()).optional(), "attributes": z.array(z.lazy(() => DOMSnapshot_NameValue)).optional(), "pseudoElementIndexes": z.array(z.number().int()).optional(), "layoutNodeIndex": z.number().int().optional(), "documentURL": z.string().optional(), "baseURL": z.string().optional(), "contentLanguage": z.string().optional(), "documentEncoding": z.string().optional(), "publicId": z.string().optional(), "systemId": z.string().optional(), "frameId": z.lazy(() => Page_FrameId).optional(), "contentDocumentIndex": z.number().int().optional(), "pseudoType": z.lazy(() => DOM_PseudoType).optional(), "shadowRootType": z.lazy(() => DOM_ShadowRootType).optional(), "isClickable": z.boolean().optional(), "eventListeners": z.array(z.lazy(() => DOMDebugger_EventListener)).optional(), "currentSourceURL": z.string().optional(), "originURL": z.string().optional(), "scrollOffsetX": z.number().optional(), "scrollOffsetY": z.number().optional() }).passthrough(), "DOMSnapshot.DOMNode", "type"); -const DOMSnapshot_InlineTextBox = withCdpMeta(z.object({ "boundingBox": z.lazy(() => DOM_Rect), "startCharacterIndex": z.number().int(), "numCharacters": z.number().int() }).passthrough(), "DOMSnapshot.InlineTextBox", "type"); -const DOMSnapshot_LayoutTreeNode = withCdpMeta(z.object({ "domNodeIndex": z.number().int(), "boundingBox": z.lazy(() => DOM_Rect), "layoutText": z.string().optional(), "inlineTextNodes": z.array(z.lazy(() => DOMSnapshot_InlineTextBox)).optional(), "styleIndex": z.number().int().optional(), "paintOrder": z.number().int().optional(), "isStackingContext": z.boolean().optional() }).passthrough(), "DOMSnapshot.LayoutTreeNode", "type"); -const DOMSnapshot_ComputedStyle = withCdpMeta(z.object({ "properties": z.array(z.lazy(() => DOMSnapshot_NameValue)) }).passthrough(), "DOMSnapshot.ComputedStyle", "type"); -const DOMSnapshot_NameValue = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "DOMSnapshot.NameValue", "type"); -const DOMSnapshot_StringIndex = withCdpMeta(z.number().int(), "DOMSnapshot.StringIndex", "type"); -const DOMSnapshot_ArrayOfStrings = withCdpMeta(z.array(z.lazy(() => DOMSnapshot_StringIndex)), "DOMSnapshot.ArrayOfStrings", "type"); -const DOMSnapshot_RareStringData = withCdpMeta(z.object({ "index": z.array(z.number().int()), "value": z.array(z.lazy(() => DOMSnapshot_StringIndex)) }).passthrough(), "DOMSnapshot.RareStringData", "type"); -const DOMSnapshot_RareBooleanData = withCdpMeta(z.object({ "index": z.array(z.number().int()) }).passthrough(), "DOMSnapshot.RareBooleanData", "type"); -const DOMSnapshot_RareIntegerData = withCdpMeta(z.object({ "index": z.array(z.number().int()), "value": z.array(z.number().int()) }).passthrough(), "DOMSnapshot.RareIntegerData", "type"); -const DOMSnapshot_Rectangle = withCdpMeta(z.array(z.number()), "DOMSnapshot.Rectangle", "type"); -const DOMSnapshot_DocumentSnapshot = withCdpMeta(z.object({ "documentURL": z.lazy(() => DOMSnapshot_StringIndex), "title": z.lazy(() => DOMSnapshot_StringIndex), "baseURL": z.lazy(() => DOMSnapshot_StringIndex), "contentLanguage": z.lazy(() => DOMSnapshot_StringIndex), "encodingName": z.lazy(() => DOMSnapshot_StringIndex), "publicId": z.lazy(() => DOMSnapshot_StringIndex), "systemId": z.lazy(() => DOMSnapshot_StringIndex), "frameId": z.lazy(() => DOMSnapshot_StringIndex), "nodes": z.lazy(() => DOMSnapshot_NodeTreeSnapshot), "layout": z.lazy(() => DOMSnapshot_LayoutTreeSnapshot), "textBoxes": z.lazy(() => DOMSnapshot_TextBoxSnapshot), "scrollOffsetX": z.number().optional(), "scrollOffsetY": z.number().optional(), "contentWidth": z.number().optional(), "contentHeight": z.number().optional() }).passthrough(), "DOMSnapshot.DocumentSnapshot", "type"); -const DOMSnapshot_NodeTreeSnapshot = withCdpMeta(z.object({ "parentIndex": z.array(z.number().int()).optional(), "nodeType": z.array(z.number().int()).optional(), "shadowRootType": z.lazy(() => DOMSnapshot_RareStringData).optional(), "nodeName": z.array(z.lazy(() => DOMSnapshot_StringIndex)).optional(), "nodeValue": z.array(z.lazy(() => DOMSnapshot_StringIndex)).optional(), "backendNodeId": z.array(z.lazy(() => DOM_BackendNodeId)).optional(), "attributes": z.array(z.lazy(() => DOMSnapshot_ArrayOfStrings)).optional(), "textValue": z.lazy(() => DOMSnapshot_RareStringData).optional(), "inputValue": z.lazy(() => DOMSnapshot_RareStringData).optional(), "inputChecked": z.lazy(() => DOMSnapshot_RareBooleanData).optional(), "optionSelected": z.lazy(() => DOMSnapshot_RareBooleanData).optional(), "contentDocumentIndex": z.lazy(() => DOMSnapshot_RareIntegerData).optional(), "pseudoType": z.lazy(() => DOMSnapshot_RareStringData).optional(), "pseudoIdentifier": z.lazy(() => DOMSnapshot_RareStringData).optional(), "isClickable": z.lazy(() => DOMSnapshot_RareBooleanData).optional(), "currentSourceURL": z.lazy(() => DOMSnapshot_RareStringData).optional(), "originURL": z.lazy(() => DOMSnapshot_RareStringData).optional() }).passthrough(), "DOMSnapshot.NodeTreeSnapshot", "type"); -const DOMSnapshot_LayoutTreeSnapshot = withCdpMeta(z.object({ "nodeIndex": z.array(z.number().int()), "styles": z.array(z.lazy(() => DOMSnapshot_ArrayOfStrings)), "bounds": z.array(z.lazy(() => DOMSnapshot_Rectangle)), "text": z.array(z.lazy(() => DOMSnapshot_StringIndex)), "stackingContexts": z.lazy(() => DOMSnapshot_RareBooleanData), "paintOrders": z.array(z.number().int()).optional(), "offsetRects": z.array(z.lazy(() => DOMSnapshot_Rectangle)).optional(), "scrollRects": z.array(z.lazy(() => DOMSnapshot_Rectangle)).optional(), "clientRects": z.array(z.lazy(() => DOMSnapshot_Rectangle)).optional(), "blendedBackgroundColors": z.array(z.lazy(() => DOMSnapshot_StringIndex)).optional(), "textColorOpacities": z.array(z.number()).optional() }).passthrough(), "DOMSnapshot.LayoutTreeSnapshot", "type"); -const DOMSnapshot_TextBoxSnapshot = withCdpMeta(z.object({ "layoutIndex": z.array(z.number().int()), "bounds": z.array(z.lazy(() => DOMSnapshot_Rectangle)), "start": z.array(z.number().int()), "length": z.array(z.number().int()) }).passthrough(), "DOMSnapshot.TextBoxSnapshot", "type"); -const DOMSnapshot_DisableParams = withCdpMeta(z.object({ }).passthrough(), "DOMSnapshot.disable.params", "commandParams", { method: "DOMSnapshot.disable" }); -const DOMSnapshot_DisableResult = withCdpMeta(z.object({ }).passthrough(), "DOMSnapshot.disable.result", "commandResult", { method: "DOMSnapshot.disable" }); -const DOMSnapshot_EnableParams = withCdpMeta(z.object({ }).passthrough(), "DOMSnapshot.enable.params", "commandParams", { method: "DOMSnapshot.enable" }); -const DOMSnapshot_EnableResult = withCdpMeta(z.object({ }).passthrough(), "DOMSnapshot.enable.result", "commandResult", { method: "DOMSnapshot.enable" }); -const DOMSnapshot_GetSnapshotParams = withCdpMeta(z.object({ "computedStyleWhitelist": z.array(z.string()), "includeEventListeners": z.boolean().optional(), "includePaintOrder": z.boolean().optional(), "includeUserAgentShadowTree": z.boolean().optional() }).passthrough(), "DOMSnapshot.getSnapshot.params", "commandParams", { method: "DOMSnapshot.getSnapshot" }); -const DOMSnapshot_GetSnapshotResult = withCdpMeta(z.object({ "domNodes": z.array(z.lazy(() => DOMSnapshot_DOMNode)), "layoutTreeNodes": z.array(z.lazy(() => DOMSnapshot_LayoutTreeNode)), "computedStyles": z.array(z.lazy(() => DOMSnapshot_ComputedStyle)) }).passthrough(), "DOMSnapshot.getSnapshot.result", "commandResult", { method: "DOMSnapshot.getSnapshot" }); -const DOMSnapshot_CaptureSnapshotParams = withCdpMeta(z.object({ "computedStyles": z.array(z.string()), "includePaintOrder": z.boolean().optional(), "includeDOMRects": z.boolean().optional(), "includeBlendedBackgroundColors": z.boolean().optional(), "includeTextColorOpacities": z.boolean().optional() }).passthrough(), "DOMSnapshot.captureSnapshot.params", "commandParams", { method: "DOMSnapshot.captureSnapshot" }); -const DOMSnapshot_CaptureSnapshotResult = withCdpMeta(z.object({ "documents": z.array(z.lazy(() => DOMSnapshot_DocumentSnapshot)), "strings": z.array(z.string()) }).passthrough(), "DOMSnapshot.captureSnapshot.result", "commandResult", { method: "DOMSnapshot.captureSnapshot" }); -const DOMStorage_SerializedStorageKey = withCdpMeta(z.string(), "DOMStorage.SerializedStorageKey", "type"); -const DOMStorage_StorageId = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.lazy(() => DOMStorage_SerializedStorageKey).optional(), "isLocalStorage": z.boolean() }).passthrough(), "DOMStorage.StorageId", "type"); -const DOMStorage_Item = withCdpMeta(z.array(z.string()), "DOMStorage.Item", "type"); -const DOMStorage_ClearParams = withCdpMeta(z.object({ "storageId": z.lazy(() => DOMStorage_StorageId) }).passthrough(), "DOMStorage.clear.params", "commandParams", { method: "DOMStorage.clear" }); -const DOMStorage_ClearResult = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.clear.result", "commandResult", { method: "DOMStorage.clear" }); -const DOMStorage_DisableParams = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.disable.params", "commandParams", { method: "DOMStorage.disable" }); -const DOMStorage_DisableResult = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.disable.result", "commandResult", { method: "DOMStorage.disable" }); -const DOMStorage_EnableParams = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.enable.params", "commandParams", { method: "DOMStorage.enable" }); -const DOMStorage_EnableResult = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.enable.result", "commandResult", { method: "DOMStorage.enable" }); -const DOMStorage_GetDOMStorageItemsParams = withCdpMeta(z.object({ "storageId": z.lazy(() => DOMStorage_StorageId) }).passthrough(), "DOMStorage.getDOMStorageItems.params", "commandParams", { method: "DOMStorage.getDOMStorageItems" }); -const DOMStorage_GetDOMStorageItemsResult = withCdpMeta(z.object({ "entries": z.array(z.lazy(() => DOMStorage_Item)) }).passthrough(), "DOMStorage.getDOMStorageItems.result", "commandResult", { method: "DOMStorage.getDOMStorageItems" }); -const DOMStorage_RemoveDOMStorageItemParams = withCdpMeta(z.object({ "storageId": z.lazy(() => DOMStorage_StorageId), "key": z.string() }).passthrough(), "DOMStorage.removeDOMStorageItem.params", "commandParams", { method: "DOMStorage.removeDOMStorageItem" }); -const DOMStorage_RemoveDOMStorageItemResult = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.removeDOMStorageItem.result", "commandResult", { method: "DOMStorage.removeDOMStorageItem" }); -const DOMStorage_SetDOMStorageItemParams = withCdpMeta(z.object({ "storageId": z.lazy(() => DOMStorage_StorageId), "key": z.string(), "value": z.string() }).passthrough(), "DOMStorage.setDOMStorageItem.params", "commandParams", { method: "DOMStorage.setDOMStorageItem" }); -const DOMStorage_SetDOMStorageItemResult = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.setDOMStorageItem.result", "commandResult", { method: "DOMStorage.setDOMStorageItem" }); -const DOMStorage_DomStorageItemAddedEvent = withCdpMeta(z.object({ "storageId": z.lazy(() => DOMStorage_StorageId), "key": z.string(), "newValue": z.string() }).passthrough(), "DOMStorage.domStorageItemAdded", "event", { phase: "event" }); -const DOMStorage_DomStorageItemRemovedEvent = withCdpMeta(z.object({ "storageId": z.lazy(() => DOMStorage_StorageId), "key": z.string() }).passthrough(), "DOMStorage.domStorageItemRemoved", "event", { phase: "event" }); -const DOMStorage_DomStorageItemUpdatedEvent = withCdpMeta(z.object({ "storageId": z.lazy(() => DOMStorage_StorageId), "key": z.string(), "oldValue": z.string(), "newValue": z.string() }).passthrough(), "DOMStorage.domStorageItemUpdated", "event", { phase: "event" }); -const DOMStorage_DomStorageItemsClearedEvent = withCdpMeta(z.object({ "storageId": z.lazy(() => DOMStorage_StorageId) }).passthrough(), "DOMStorage.domStorageItemsCleared", "event", { phase: "event" }); -const Emulation_SafeAreaInsets = withCdpMeta(z.object({ "top": z.number().int().optional(), "topMax": z.number().int().optional(), "left": z.number().int().optional(), "leftMax": z.number().int().optional(), "bottom": z.number().int().optional(), "bottomMax": z.number().int().optional(), "right": z.number().int().optional(), "rightMax": z.number().int().optional() }).passthrough(), "Emulation.SafeAreaInsets", "type"); -const Emulation_ScreenOrientation = withCdpMeta(z.object({ "type": z.enum(["portraitPrimary", "portraitSecondary", "landscapePrimary", "landscapeSecondary"]), "angle": z.number().int() }).passthrough(), "Emulation.ScreenOrientation", "type"); -const Emulation_DisplayFeature = withCdpMeta(z.object({ "orientation": z.enum(["vertical", "horizontal"]), "offset": z.number().int(), "maskLength": z.number().int() }).passthrough(), "Emulation.DisplayFeature", "type"); -const Emulation_DevicePosture = withCdpMeta(z.object({ "type": z.enum(["continuous", "folded"]) }).passthrough(), "Emulation.DevicePosture", "type"); -const Emulation_MediaFeature = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "Emulation.MediaFeature", "type"); -const Emulation_VirtualTimePolicy = withCdpMeta(z.enum(["advance", "pause", "pauseIfNetworkFetchesPending"]), "Emulation.VirtualTimePolicy", "type"); -const Emulation_UserAgentBrandVersion = withCdpMeta(z.object({ "brand": z.string(), "version": z.string() }).passthrough(), "Emulation.UserAgentBrandVersion", "type"); -const Emulation_UserAgentMetadata = withCdpMeta(z.object({ "brands": z.array(z.lazy(() => Emulation_UserAgentBrandVersion)).optional(), "fullVersionList": z.array(z.lazy(() => Emulation_UserAgentBrandVersion)).optional(), "fullVersion": z.string().optional(), "platform": z.string(), "platformVersion": z.string(), "architecture": z.string(), "model": z.string(), "mobile": z.boolean(), "bitness": z.string().optional(), "wow64": z.boolean().optional(), "formFactors": z.array(z.string()).optional() }).passthrough(), "Emulation.UserAgentMetadata", "type"); -const Emulation_SensorType = withCdpMeta(z.enum(["absolute-orientation", "accelerometer", "ambient-light", "gravity", "gyroscope", "linear-acceleration", "magnetometer", "relative-orientation"]), "Emulation.SensorType", "type"); -const Emulation_SensorMetadata = withCdpMeta(z.object({ "available": z.boolean().optional(), "minimumFrequency": z.number().optional(), "maximumFrequency": z.number().optional() }).passthrough(), "Emulation.SensorMetadata", "type"); -const Emulation_SensorReadingSingle = withCdpMeta(z.object({ "value": z.number() }).passthrough(), "Emulation.SensorReadingSingle", "type"); -const Emulation_SensorReadingXYZ = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "z": z.number() }).passthrough(), "Emulation.SensorReadingXYZ", "type"); -const Emulation_SensorReadingQuaternion = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "z": z.number(), "w": z.number() }).passthrough(), "Emulation.SensorReadingQuaternion", "type"); -const Emulation_SensorReading = withCdpMeta(z.object({ "single": z.lazy(() => Emulation_SensorReadingSingle).optional(), "xyz": z.lazy(() => Emulation_SensorReadingXYZ).optional(), "quaternion": z.lazy(() => Emulation_SensorReadingQuaternion).optional() }).passthrough(), "Emulation.SensorReading", "type"); -const Emulation_PressureSource = withCdpMeta(z.enum(["cpu"]), "Emulation.PressureSource", "type"); -const Emulation_PressureState = withCdpMeta(z.enum(["nominal", "fair", "serious", "critical"]), "Emulation.PressureState", "type"); -const Emulation_PressureMetadata = withCdpMeta(z.object({ "available": z.boolean().optional() }).passthrough(), "Emulation.PressureMetadata", "type"); -const Emulation_WorkAreaInsets = withCdpMeta(z.object({ "top": z.number().int().optional(), "left": z.number().int().optional(), "bottom": z.number().int().optional(), "right": z.number().int().optional() }).passthrough(), "Emulation.WorkAreaInsets", "type"); -const Emulation_ScreenId = withCdpMeta(z.string(), "Emulation.ScreenId", "type"); -const Emulation_ScreenInfo = withCdpMeta(z.object({ "left": z.number().int(), "top": z.number().int(), "width": z.number().int(), "height": z.number().int(), "availLeft": z.number().int(), "availTop": z.number().int(), "availWidth": z.number().int(), "availHeight": z.number().int(), "devicePixelRatio": z.number(), "orientation": z.lazy(() => Emulation_ScreenOrientation), "colorDepth": z.number().int(), "isExtended": z.boolean(), "isInternal": z.boolean(), "isPrimary": z.boolean(), "label": z.string(), "id": z.lazy(() => Emulation_ScreenId) }).passthrough(), "Emulation.ScreenInfo", "type"); -const Emulation_DisabledImageType = withCdpMeta(z.enum(["avif", "jxl", "webp"]), "Emulation.DisabledImageType", "type"); -const Emulation_CanEmulateParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.canEmulate.params", "commandParams", { method: "Emulation.canEmulate" }); -const Emulation_CanEmulateResult = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Emulation.canEmulate.result", "commandResult", { method: "Emulation.canEmulate" }); -const Emulation_ClearDeviceMetricsOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDeviceMetricsOverride.params", "commandParams", { method: "Emulation.clearDeviceMetricsOverride" }); -const Emulation_ClearDeviceMetricsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDeviceMetricsOverride.result", "commandResult", { method: "Emulation.clearDeviceMetricsOverride" }); -const Emulation_ClearGeolocationOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearGeolocationOverride.params", "commandParams", { method: "Emulation.clearGeolocationOverride" }); -const Emulation_ClearGeolocationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearGeolocationOverride.result", "commandResult", { method: "Emulation.clearGeolocationOverride" }); -const Emulation_ResetPageScaleFactorParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.resetPageScaleFactor.params", "commandParams", { method: "Emulation.resetPageScaleFactor" }); -const Emulation_ResetPageScaleFactorResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.resetPageScaleFactor.result", "commandResult", { method: "Emulation.resetPageScaleFactor" }); -const Emulation_SetFocusEmulationEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Emulation.setFocusEmulationEnabled.params", "commandParams", { method: "Emulation.setFocusEmulationEnabled" }); -const Emulation_SetFocusEmulationEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setFocusEmulationEnabled.result", "commandResult", { method: "Emulation.setFocusEmulationEnabled" }); -const Emulation_SetAutoDarkModeOverrideParams = withCdpMeta(z.object({ "enabled": z.boolean().optional() }).passthrough(), "Emulation.setAutoDarkModeOverride.params", "commandParams", { method: "Emulation.setAutoDarkModeOverride" }); -const Emulation_SetAutoDarkModeOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setAutoDarkModeOverride.result", "commandResult", { method: "Emulation.setAutoDarkModeOverride" }); -const Emulation_SetCPUThrottlingRateParams = withCdpMeta(z.object({ "rate": z.number() }).passthrough(), "Emulation.setCPUThrottlingRate.params", "commandParams", { method: "Emulation.setCPUThrottlingRate" }); -const Emulation_SetCPUThrottlingRateResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setCPUThrottlingRate.result", "commandResult", { method: "Emulation.setCPUThrottlingRate" }); -const Emulation_SetDefaultBackgroundColorOverrideParams = withCdpMeta(z.object({ "color": z.lazy(() => DOM_RGBA).optional() }).passthrough(), "Emulation.setDefaultBackgroundColorOverride.params", "commandParams", { method: "Emulation.setDefaultBackgroundColorOverride" }); -const Emulation_SetDefaultBackgroundColorOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDefaultBackgroundColorOverride.result", "commandResult", { method: "Emulation.setDefaultBackgroundColorOverride" }); -const Emulation_SetSafeAreaInsetsOverrideParams = withCdpMeta(z.object({ "insets": z.lazy(() => Emulation_SafeAreaInsets) }).passthrough(), "Emulation.setSafeAreaInsetsOverride.params", "commandParams", { method: "Emulation.setSafeAreaInsetsOverride" }); -const Emulation_SetSafeAreaInsetsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setSafeAreaInsetsOverride.result", "commandResult", { method: "Emulation.setSafeAreaInsetsOverride" }); -const Emulation_SetDeviceMetricsOverrideParams = withCdpMeta(z.object({ "width": z.number().int(), "height": z.number().int(), "deviceScaleFactor": z.number(), "mobile": z.boolean(), "scale": z.number().optional(), "screenWidth": z.number().int().optional(), "screenHeight": z.number().int().optional(), "positionX": z.number().int().optional(), "positionY": z.number().int().optional(), "dontSetVisibleSize": z.boolean().optional(), "screenOrientation": z.lazy(() => Emulation_ScreenOrientation).optional(), "viewport": z.lazy(() => Page_Viewport).optional(), "displayFeature": z.lazy(() => Emulation_DisplayFeature).optional(), "devicePosture": z.lazy(() => Emulation_DevicePosture).optional(), "scrollbarType": z.enum(["overlay", "default"]).optional(), "screenOrientationLockEmulation": z.boolean().optional() }).passthrough(), "Emulation.setDeviceMetricsOverride.params", "commandParams", { method: "Emulation.setDeviceMetricsOverride" }); -const Emulation_SetDeviceMetricsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDeviceMetricsOverride.result", "commandResult", { method: "Emulation.setDeviceMetricsOverride" }); -const Emulation_SetDevicePostureOverrideParams = withCdpMeta(z.object({ "posture": z.lazy(() => Emulation_DevicePosture) }).passthrough(), "Emulation.setDevicePostureOverride.params", "commandParams", { method: "Emulation.setDevicePostureOverride" }); -const Emulation_SetDevicePostureOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDevicePostureOverride.result", "commandResult", { method: "Emulation.setDevicePostureOverride" }); -const Emulation_ClearDevicePostureOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDevicePostureOverride.params", "commandParams", { method: "Emulation.clearDevicePostureOverride" }); -const Emulation_ClearDevicePostureOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDevicePostureOverride.result", "commandResult", { method: "Emulation.clearDevicePostureOverride" }); -const Emulation_SetDisplayFeaturesOverrideParams = withCdpMeta(z.object({ "features": z.array(z.lazy(() => Emulation_DisplayFeature)) }).passthrough(), "Emulation.setDisplayFeaturesOverride.params", "commandParams", { method: "Emulation.setDisplayFeaturesOverride" }); -const Emulation_SetDisplayFeaturesOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDisplayFeaturesOverride.result", "commandResult", { method: "Emulation.setDisplayFeaturesOverride" }); -const Emulation_ClearDisplayFeaturesOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDisplayFeaturesOverride.params", "commandParams", { method: "Emulation.clearDisplayFeaturesOverride" }); -const Emulation_ClearDisplayFeaturesOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDisplayFeaturesOverride.result", "commandResult", { method: "Emulation.clearDisplayFeaturesOverride" }); -const Emulation_SetScrollbarsHiddenParams = withCdpMeta(z.object({ "hidden": z.boolean() }).passthrough(), "Emulation.setScrollbarsHidden.params", "commandParams", { method: "Emulation.setScrollbarsHidden" }); -const Emulation_SetScrollbarsHiddenResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setScrollbarsHidden.result", "commandResult", { method: "Emulation.setScrollbarsHidden" }); -const Emulation_SetDocumentCookieDisabledParams = withCdpMeta(z.object({ "disabled": z.boolean() }).passthrough(), "Emulation.setDocumentCookieDisabled.params", "commandParams", { method: "Emulation.setDocumentCookieDisabled" }); -const Emulation_SetDocumentCookieDisabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDocumentCookieDisabled.result", "commandResult", { method: "Emulation.setDocumentCookieDisabled" }); -const Emulation_SetEmitTouchEventsForMouseParams = withCdpMeta(z.object({ "enabled": z.boolean(), "configuration": z.enum(["mobile", "desktop"]).optional() }).passthrough(), "Emulation.setEmitTouchEventsForMouse.params", "commandParams", { method: "Emulation.setEmitTouchEventsForMouse" }); -const Emulation_SetEmitTouchEventsForMouseResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setEmitTouchEventsForMouse.result", "commandResult", { method: "Emulation.setEmitTouchEventsForMouse" }); -const Emulation_SetEmulatedMediaParams = withCdpMeta(z.object({ "media": z.string().optional(), "features": z.array(z.lazy(() => Emulation_MediaFeature)).optional() }).passthrough(), "Emulation.setEmulatedMedia.params", "commandParams", { method: "Emulation.setEmulatedMedia" }); -const Emulation_SetEmulatedMediaResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setEmulatedMedia.result", "commandResult", { method: "Emulation.setEmulatedMedia" }); -const Emulation_SetEmulatedVisionDeficiencyParams = withCdpMeta(z.object({ "type": z.enum(["none", "blurredVision", "reducedContrast", "achromatopsia", "deuteranopia", "protanopia", "tritanopia"]) }).passthrough(), "Emulation.setEmulatedVisionDeficiency.params", "commandParams", { method: "Emulation.setEmulatedVisionDeficiency" }); -const Emulation_SetEmulatedVisionDeficiencyResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setEmulatedVisionDeficiency.result", "commandResult", { method: "Emulation.setEmulatedVisionDeficiency" }); -const Emulation_SetEmulatedOSTextScaleParams = withCdpMeta(z.object({ "scale": z.number().optional() }).passthrough(), "Emulation.setEmulatedOSTextScale.params", "commandParams", { method: "Emulation.setEmulatedOSTextScale" }); -const Emulation_SetEmulatedOSTextScaleResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setEmulatedOSTextScale.result", "commandResult", { method: "Emulation.setEmulatedOSTextScale" }); -const Emulation_SetGeolocationOverrideParams = withCdpMeta(z.object({ "latitude": z.number().optional(), "longitude": z.number().optional(), "accuracy": z.number().optional(), "altitude": z.number().optional(), "altitudeAccuracy": z.number().optional(), "heading": z.number().optional(), "speed": z.number().optional() }).passthrough(), "Emulation.setGeolocationOverride.params", "commandParams", { method: "Emulation.setGeolocationOverride" }); -const Emulation_SetGeolocationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setGeolocationOverride.result", "commandResult", { method: "Emulation.setGeolocationOverride" }); -const Emulation_GetOverriddenSensorInformationParams = withCdpMeta(z.object({ "type": z.lazy(() => Emulation_SensorType) }).passthrough(), "Emulation.getOverriddenSensorInformation.params", "commandParams", { method: "Emulation.getOverriddenSensorInformation" }); -const Emulation_GetOverriddenSensorInformationResult = withCdpMeta(z.object({ "requestedSamplingFrequency": z.number() }).passthrough(), "Emulation.getOverriddenSensorInformation.result", "commandResult", { method: "Emulation.getOverriddenSensorInformation" }); -const Emulation_SetSensorOverrideEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean(), "type": z.lazy(() => Emulation_SensorType), "metadata": z.lazy(() => Emulation_SensorMetadata).optional() }).passthrough(), "Emulation.setSensorOverrideEnabled.params", "commandParams", { method: "Emulation.setSensorOverrideEnabled" }); -const Emulation_SetSensorOverrideEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setSensorOverrideEnabled.result", "commandResult", { method: "Emulation.setSensorOverrideEnabled" }); -const Emulation_SetSensorOverrideReadingsParams = withCdpMeta(z.object({ "type": z.lazy(() => Emulation_SensorType), "reading": z.lazy(() => Emulation_SensorReading) }).passthrough(), "Emulation.setSensorOverrideReadings.params", "commandParams", { method: "Emulation.setSensorOverrideReadings" }); -const Emulation_SetSensorOverrideReadingsResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setSensorOverrideReadings.result", "commandResult", { method: "Emulation.setSensorOverrideReadings" }); -const Emulation_SetPressureSourceOverrideEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean(), "source": z.lazy(() => Emulation_PressureSource), "metadata": z.lazy(() => Emulation_PressureMetadata).optional() }).passthrough(), "Emulation.setPressureSourceOverrideEnabled.params", "commandParams", { method: "Emulation.setPressureSourceOverrideEnabled" }); -const Emulation_SetPressureSourceOverrideEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setPressureSourceOverrideEnabled.result", "commandResult", { method: "Emulation.setPressureSourceOverrideEnabled" }); -const Emulation_SetPressureStateOverrideParams = withCdpMeta(z.object({ "source": z.lazy(() => Emulation_PressureSource), "state": z.lazy(() => Emulation_PressureState) }).passthrough(), "Emulation.setPressureStateOverride.params", "commandParams", { method: "Emulation.setPressureStateOverride" }); -const Emulation_SetPressureStateOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setPressureStateOverride.result", "commandResult", { method: "Emulation.setPressureStateOverride" }); -const Emulation_SetPressureDataOverrideParams = withCdpMeta(z.object({ "source": z.lazy(() => Emulation_PressureSource), "state": z.lazy(() => Emulation_PressureState), "ownContributionEstimate": z.number().optional() }).passthrough(), "Emulation.setPressureDataOverride.params", "commandParams", { method: "Emulation.setPressureDataOverride" }); -const Emulation_SetPressureDataOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setPressureDataOverride.result", "commandResult", { method: "Emulation.setPressureDataOverride" }); -const Emulation_SetIdleOverrideParams = withCdpMeta(z.object({ "isUserActive": z.boolean(), "isScreenUnlocked": z.boolean() }).passthrough(), "Emulation.setIdleOverride.params", "commandParams", { method: "Emulation.setIdleOverride" }); -const Emulation_SetIdleOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setIdleOverride.result", "commandResult", { method: "Emulation.setIdleOverride" }); -const Emulation_ClearIdleOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearIdleOverride.params", "commandParams", { method: "Emulation.clearIdleOverride" }); -const Emulation_ClearIdleOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearIdleOverride.result", "commandResult", { method: "Emulation.clearIdleOverride" }); -const Emulation_SetNavigatorOverridesParams = withCdpMeta(z.object({ "platform": z.string() }).passthrough(), "Emulation.setNavigatorOverrides.params", "commandParams", { method: "Emulation.setNavigatorOverrides" }); -const Emulation_SetNavigatorOverridesResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setNavigatorOverrides.result", "commandResult", { method: "Emulation.setNavigatorOverrides" }); -const Emulation_SetPageScaleFactorParams = withCdpMeta(z.object({ "pageScaleFactor": z.number() }).passthrough(), "Emulation.setPageScaleFactor.params", "commandParams", { method: "Emulation.setPageScaleFactor" }); -const Emulation_SetPageScaleFactorResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setPageScaleFactor.result", "commandResult", { method: "Emulation.setPageScaleFactor" }); -const Emulation_SetScriptExecutionDisabledParams = withCdpMeta(z.object({ "value": z.boolean() }).passthrough(), "Emulation.setScriptExecutionDisabled.params", "commandParams", { method: "Emulation.setScriptExecutionDisabled" }); -const Emulation_SetScriptExecutionDisabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setScriptExecutionDisabled.result", "commandResult", { method: "Emulation.setScriptExecutionDisabled" }); -const Emulation_SetTouchEmulationEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean(), "maxTouchPoints": z.number().int().optional() }).passthrough(), "Emulation.setTouchEmulationEnabled.params", "commandParams", { method: "Emulation.setTouchEmulationEnabled" }); -const Emulation_SetTouchEmulationEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setTouchEmulationEnabled.result", "commandResult", { method: "Emulation.setTouchEmulationEnabled" }); -const Emulation_SetVirtualTimePolicyParams = withCdpMeta(z.object({ "policy": z.lazy(() => Emulation_VirtualTimePolicy), "budget": z.number().optional(), "maxVirtualTimeTaskStarvationCount": z.number().int().optional(), "initialVirtualTime": z.lazy(() => Network_TimeSinceEpoch).optional() }).passthrough(), "Emulation.setVirtualTimePolicy.params", "commandParams", { method: "Emulation.setVirtualTimePolicy" }); -const Emulation_SetVirtualTimePolicyResult = withCdpMeta(z.object({ "virtualTimeTicksBase": z.number() }).passthrough(), "Emulation.setVirtualTimePolicy.result", "commandResult", { method: "Emulation.setVirtualTimePolicy" }); -const Emulation_SetLocaleOverrideParams = withCdpMeta(z.object({ "locale": z.string().optional() }).passthrough(), "Emulation.setLocaleOverride.params", "commandParams", { method: "Emulation.setLocaleOverride" }); -const Emulation_SetLocaleOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setLocaleOverride.result", "commandResult", { method: "Emulation.setLocaleOverride" }); -const Emulation_SetTimezoneOverrideParams = withCdpMeta(z.object({ "timezoneId": z.string() }).passthrough(), "Emulation.setTimezoneOverride.params", "commandParams", { method: "Emulation.setTimezoneOverride" }); -const Emulation_SetTimezoneOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setTimezoneOverride.result", "commandResult", { method: "Emulation.setTimezoneOverride" }); -const Emulation_SetVisibleSizeParams = withCdpMeta(z.object({ "width": z.number().int(), "height": z.number().int() }).passthrough(), "Emulation.setVisibleSize.params", "commandParams", { method: "Emulation.setVisibleSize" }); -const Emulation_SetVisibleSizeResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setVisibleSize.result", "commandResult", { method: "Emulation.setVisibleSize" }); -const Emulation_SetDisabledImageTypesParams = withCdpMeta(z.object({ "imageTypes": z.array(z.lazy(() => Emulation_DisabledImageType)) }).passthrough(), "Emulation.setDisabledImageTypes.params", "commandParams", { method: "Emulation.setDisabledImageTypes" }); -const Emulation_SetDisabledImageTypesResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDisabledImageTypes.result", "commandResult", { method: "Emulation.setDisabledImageTypes" }); -const Emulation_SetDataSaverOverrideParams = withCdpMeta(z.object({ "dataSaverEnabled": z.boolean().optional() }).passthrough(), "Emulation.setDataSaverOverride.params", "commandParams", { method: "Emulation.setDataSaverOverride" }); -const Emulation_SetDataSaverOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDataSaverOverride.result", "commandResult", { method: "Emulation.setDataSaverOverride" }); -const Emulation_SetHardwareConcurrencyOverrideParams = withCdpMeta(z.object({ "hardwareConcurrency": z.number().int() }).passthrough(), "Emulation.setHardwareConcurrencyOverride.params", "commandParams", { method: "Emulation.setHardwareConcurrencyOverride" }); -const Emulation_SetHardwareConcurrencyOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setHardwareConcurrencyOverride.result", "commandResult", { method: "Emulation.setHardwareConcurrencyOverride" }); -const Emulation_SetUserAgentOverrideParams = withCdpMeta(z.object({ "userAgent": z.string(), "acceptLanguage": z.string().optional(), "platform": z.string().optional(), "userAgentMetadata": z.lazy(() => Emulation_UserAgentMetadata).optional() }).passthrough(), "Emulation.setUserAgentOverride.params", "commandParams", { method: "Emulation.setUserAgentOverride" }); -const Emulation_SetUserAgentOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setUserAgentOverride.result", "commandResult", { method: "Emulation.setUserAgentOverride" }); -const Emulation_SetAutomationOverrideParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Emulation.setAutomationOverride.params", "commandParams", { method: "Emulation.setAutomationOverride" }); -const Emulation_SetAutomationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setAutomationOverride.result", "commandResult", { method: "Emulation.setAutomationOverride" }); -const Emulation_SetSmallViewportHeightDifferenceOverrideParams = withCdpMeta(z.object({ "difference": z.number().int() }).passthrough(), "Emulation.setSmallViewportHeightDifferenceOverride.params", "commandParams", { method: "Emulation.setSmallViewportHeightDifferenceOverride" }); -const Emulation_SetSmallViewportHeightDifferenceOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setSmallViewportHeightDifferenceOverride.result", "commandResult", { method: "Emulation.setSmallViewportHeightDifferenceOverride" }); -const Emulation_GetScreenInfosParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.getScreenInfos.params", "commandParams", { method: "Emulation.getScreenInfos" }); -const Emulation_GetScreenInfosResult = withCdpMeta(z.object({ "screenInfos": z.array(z.lazy(() => Emulation_ScreenInfo)) }).passthrough(), "Emulation.getScreenInfos.result", "commandResult", { method: "Emulation.getScreenInfos" }); -const Emulation_AddScreenParams = withCdpMeta(z.object({ "left": z.number().int(), "top": z.number().int(), "width": z.number().int(), "height": z.number().int(), "workAreaInsets": z.lazy(() => Emulation_WorkAreaInsets).optional(), "devicePixelRatio": z.number().optional(), "rotation": z.number().int().optional(), "colorDepth": z.number().int().optional(), "label": z.string().optional(), "isInternal": z.boolean().optional() }).passthrough(), "Emulation.addScreen.params", "commandParams", { method: "Emulation.addScreen" }); -const Emulation_AddScreenResult = withCdpMeta(z.object({ "screenInfo": z.lazy(() => Emulation_ScreenInfo) }).passthrough(), "Emulation.addScreen.result", "commandResult", { method: "Emulation.addScreen" }); -const Emulation_UpdateScreenParams = withCdpMeta(z.object({ "screenId": z.lazy(() => Emulation_ScreenId), "left": z.number().int().optional(), "top": z.number().int().optional(), "width": z.number().int().optional(), "height": z.number().int().optional(), "workAreaInsets": z.lazy(() => Emulation_WorkAreaInsets).optional(), "devicePixelRatio": z.number().optional(), "rotation": z.number().int().optional(), "colorDepth": z.number().int().optional(), "label": z.string().optional(), "isInternal": z.boolean().optional() }).passthrough(), "Emulation.updateScreen.params", "commandParams", { method: "Emulation.updateScreen" }); -const Emulation_UpdateScreenResult = withCdpMeta(z.object({ "screenInfo": z.lazy(() => Emulation_ScreenInfo) }).passthrough(), "Emulation.updateScreen.result", "commandResult", { method: "Emulation.updateScreen" }); -const Emulation_RemoveScreenParams = withCdpMeta(z.object({ "screenId": z.lazy(() => Emulation_ScreenId) }).passthrough(), "Emulation.removeScreen.params", "commandParams", { method: "Emulation.removeScreen" }); -const Emulation_RemoveScreenResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.removeScreen.result", "commandResult", { method: "Emulation.removeScreen" }); -const Emulation_SetPrimaryScreenParams = withCdpMeta(z.object({ "screenId": z.lazy(() => Emulation_ScreenId) }).passthrough(), "Emulation.setPrimaryScreen.params", "commandParams", { method: "Emulation.setPrimaryScreen" }); -const Emulation_SetPrimaryScreenResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setPrimaryScreen.result", "commandResult", { method: "Emulation.setPrimaryScreen" }); -const Emulation_VirtualTimeBudgetExpiredEvent = withCdpMeta(z.object({ }).passthrough(), "Emulation.virtualTimeBudgetExpired", "event", { phase: "event" }); -const Emulation_ScreenOrientationLockChangedEvent = withCdpMeta(z.object({ "locked": z.boolean(), "orientation": z.lazy(() => Emulation_ScreenOrientation).optional() }).passthrough(), "Emulation.screenOrientationLockChanged", "event", { phase: "event" }); -const EventBreakpoints_SetInstrumentationBreakpointParams = withCdpMeta(z.object({ "eventName": z.string() }).passthrough(), "EventBreakpoints.setInstrumentationBreakpoint.params", "commandParams", { method: "EventBreakpoints.setInstrumentationBreakpoint" }); -const EventBreakpoints_SetInstrumentationBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "EventBreakpoints.setInstrumentationBreakpoint.result", "commandResult", { method: "EventBreakpoints.setInstrumentationBreakpoint" }); -const EventBreakpoints_RemoveInstrumentationBreakpointParams = withCdpMeta(z.object({ "eventName": z.string() }).passthrough(), "EventBreakpoints.removeInstrumentationBreakpoint.params", "commandParams", { method: "EventBreakpoints.removeInstrumentationBreakpoint" }); -const EventBreakpoints_RemoveInstrumentationBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "EventBreakpoints.removeInstrumentationBreakpoint.result", "commandResult", { method: "EventBreakpoints.removeInstrumentationBreakpoint" }); -const EventBreakpoints_DisableParams = withCdpMeta(z.object({ }).passthrough(), "EventBreakpoints.disable.params", "commandParams", { method: "EventBreakpoints.disable" }); -const EventBreakpoints_DisableResult = withCdpMeta(z.object({ }).passthrough(), "EventBreakpoints.disable.result", "commandResult", { method: "EventBreakpoints.disable" }); -const Extensions_StorageArea = withCdpMeta(z.enum(["session", "local", "sync", "managed"]), "Extensions.StorageArea", "type"); -const Extensions_ExtensionInfo = withCdpMeta(z.object({ "id": z.string(), "name": z.string(), "version": z.string(), "path": z.string(), "enabled": z.boolean() }).passthrough(), "Extensions.ExtensionInfo", "type"); -const Extensions_TriggerActionParams = withCdpMeta(z.object({ "id": z.string(), "targetId": z.string() }).passthrough(), "Extensions.triggerAction.params", "commandParams", { method: "Extensions.triggerAction" }); -const Extensions_TriggerActionResult = withCdpMeta(z.object({ }).passthrough(), "Extensions.triggerAction.result", "commandResult", { method: "Extensions.triggerAction" }); -const Extensions_LoadUnpackedParams = withCdpMeta(z.object({ "path": z.string(), "enableInIncognito": z.boolean().optional() }).passthrough(), "Extensions.loadUnpacked.params", "commandParams", { method: "Extensions.loadUnpacked" }); -const Extensions_LoadUnpackedResult = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Extensions.loadUnpacked.result", "commandResult", { method: "Extensions.loadUnpacked" }); -const Extensions_GetExtensionsParams = withCdpMeta(z.object({ }).passthrough(), "Extensions.getExtensions.params", "commandParams", { method: "Extensions.getExtensions" }); -const Extensions_GetExtensionsResult = withCdpMeta(z.object({ "extensions": z.array(z.lazy(() => Extensions_ExtensionInfo)) }).passthrough(), "Extensions.getExtensions.result", "commandResult", { method: "Extensions.getExtensions" }); -const Extensions_UninstallParams = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Extensions.uninstall.params", "commandParams", { method: "Extensions.uninstall" }); -const Extensions_UninstallResult = withCdpMeta(z.object({ }).passthrough(), "Extensions.uninstall.result", "commandResult", { method: "Extensions.uninstall" }); -const Extensions_GetStorageItemsParams = withCdpMeta(z.object({ "id": z.string(), "storageArea": z.lazy(() => Extensions_StorageArea), "keys": z.array(z.string()).optional() }).passthrough(), "Extensions.getStorageItems.params", "commandParams", { method: "Extensions.getStorageItems" }); -const Extensions_GetStorageItemsResult = withCdpMeta(z.object({ "data": z.record(z.string(), z.unknown()) }).passthrough(), "Extensions.getStorageItems.result", "commandResult", { method: "Extensions.getStorageItems" }); -const Extensions_RemoveStorageItemsParams = withCdpMeta(z.object({ "id": z.string(), "storageArea": z.lazy(() => Extensions_StorageArea), "keys": z.array(z.string()) }).passthrough(), "Extensions.removeStorageItems.params", "commandParams", { method: "Extensions.removeStorageItems" }); -const Extensions_RemoveStorageItemsResult = withCdpMeta(z.object({ }).passthrough(), "Extensions.removeStorageItems.result", "commandResult", { method: "Extensions.removeStorageItems" }); -const Extensions_ClearStorageItemsParams = withCdpMeta(z.object({ "id": z.string(), "storageArea": z.lazy(() => Extensions_StorageArea) }).passthrough(), "Extensions.clearStorageItems.params", "commandParams", { method: "Extensions.clearStorageItems" }); -const Extensions_ClearStorageItemsResult = withCdpMeta(z.object({ }).passthrough(), "Extensions.clearStorageItems.result", "commandResult", { method: "Extensions.clearStorageItems" }); -const Extensions_SetStorageItemsParams = withCdpMeta(z.object({ "id": z.string(), "storageArea": z.lazy(() => Extensions_StorageArea), "values": z.record(z.string(), z.unknown()) }).passthrough(), "Extensions.setStorageItems.params", "commandParams", { method: "Extensions.setStorageItems" }); -const Extensions_SetStorageItemsResult = withCdpMeta(z.object({ }).passthrough(), "Extensions.setStorageItems.result", "commandResult", { method: "Extensions.setStorageItems" }); -const FedCm_LoginState = withCdpMeta(z.enum(["SignIn", "SignUp"]), "FedCm.LoginState", "type"); -const FedCm_DialogType = withCdpMeta(z.enum(["AccountChooser", "AutoReauthn", "ConfirmIdpLogin", "Error"]), "FedCm.DialogType", "type"); -const FedCm_DialogButton = withCdpMeta(z.enum(["ConfirmIdpLoginContinue", "ErrorGotIt", "ErrorMoreDetails"]), "FedCm.DialogButton", "type"); -const FedCm_AccountUrlType = withCdpMeta(z.enum(["TermsOfService", "PrivacyPolicy"]), "FedCm.AccountUrlType", "type"); -const FedCm_Account = withCdpMeta(z.object({ "accountId": z.string(), "email": z.string(), "name": z.string(), "givenName": z.string(), "pictureUrl": z.string(), "idpConfigUrl": z.string(), "idpLoginUrl": z.string(), "loginState": z.lazy(() => FedCm_LoginState), "termsOfServiceUrl": z.string().optional(), "privacyPolicyUrl": z.string().optional() }).passthrough(), "FedCm.Account", "type"); -const FedCm_EnableParams = withCdpMeta(z.object({ "disableRejectionDelay": z.boolean().optional() }).passthrough(), "FedCm.enable.params", "commandParams", { method: "FedCm.enable" }); -const FedCm_EnableResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.enable.result", "commandResult", { method: "FedCm.enable" }); -const FedCm_DisableParams = withCdpMeta(z.object({ }).passthrough(), "FedCm.disable.params", "commandParams", { method: "FedCm.disable" }); -const FedCm_DisableResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.disable.result", "commandResult", { method: "FedCm.disable" }); -const FedCm_SelectAccountParams = withCdpMeta(z.object({ "dialogId": z.string(), "accountIndex": z.number().int() }).passthrough(), "FedCm.selectAccount.params", "commandParams", { method: "FedCm.selectAccount" }); -const FedCm_SelectAccountResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.selectAccount.result", "commandResult", { method: "FedCm.selectAccount" }); -const FedCm_ClickDialogButtonParams = withCdpMeta(z.object({ "dialogId": z.string(), "dialogButton": z.lazy(() => FedCm_DialogButton) }).passthrough(), "FedCm.clickDialogButton.params", "commandParams", { method: "FedCm.clickDialogButton" }); -const FedCm_ClickDialogButtonResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.clickDialogButton.result", "commandResult", { method: "FedCm.clickDialogButton" }); -const FedCm_OpenUrlParams = withCdpMeta(z.object({ "dialogId": z.string(), "accountIndex": z.number().int(), "accountUrlType": z.lazy(() => FedCm_AccountUrlType) }).passthrough(), "FedCm.openUrl.params", "commandParams", { method: "FedCm.openUrl" }); -const FedCm_OpenUrlResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.openUrl.result", "commandResult", { method: "FedCm.openUrl" }); -const FedCm_DismissDialogParams = withCdpMeta(z.object({ "dialogId": z.string(), "triggerCooldown": z.boolean().optional() }).passthrough(), "FedCm.dismissDialog.params", "commandParams", { method: "FedCm.dismissDialog" }); -const FedCm_DismissDialogResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.dismissDialog.result", "commandResult", { method: "FedCm.dismissDialog" }); -const FedCm_ResetCooldownParams = withCdpMeta(z.object({ }).passthrough(), "FedCm.resetCooldown.params", "commandParams", { method: "FedCm.resetCooldown" }); -const FedCm_ResetCooldownResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.resetCooldown.result", "commandResult", { method: "FedCm.resetCooldown" }); -const FedCm_DialogShownEvent = withCdpMeta(z.object({ "dialogId": z.string(), "dialogType": z.lazy(() => FedCm_DialogType), "accounts": z.array(z.lazy(() => FedCm_Account)), "title": z.string(), "subtitle": z.string().optional() }).passthrough(), "FedCm.dialogShown", "event", { phase: "event" }); -const FedCm_DialogClosedEvent = withCdpMeta(z.object({ "dialogId": z.string() }).passthrough(), "FedCm.dialogClosed", "event", { phase: "event" }); -const Fetch_RequestId = withCdpMeta(z.string(), "Fetch.RequestId", "type"); -const Fetch_RequestStage = withCdpMeta(z.enum(["Request", "Response"]), "Fetch.RequestStage", "type"); -const Fetch_RequestPattern = withCdpMeta(z.object({ "urlPattern": z.string().optional(), "resourceType": z.lazy(() => Network_ResourceType).optional(), "requestStage": z.lazy(() => Fetch_RequestStage).optional() }).passthrough(), "Fetch.RequestPattern", "type"); -const Fetch_HeaderEntry = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "Fetch.HeaderEntry", "type"); -const Fetch_AuthChallenge = withCdpMeta(z.object({ "source": z.enum(["Server", "Proxy"]).optional(), "origin": z.string(), "scheme": z.string(), "realm": z.string() }).passthrough(), "Fetch.AuthChallenge", "type"); -const Fetch_AuthChallengeResponse = withCdpMeta(z.object({ "response": z.enum(["Default", "CancelAuth", "ProvideCredentials"]), "username": z.string().optional(), "password": z.string().optional() }).passthrough(), "Fetch.AuthChallengeResponse", "type"); -const Fetch_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Fetch.disable.params", "commandParams", { method: "Fetch.disable" }); -const Fetch_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.disable.result", "commandResult", { method: "Fetch.disable" }); -const Fetch_EnableParams = withCdpMeta(z.object({ "patterns": z.array(z.lazy(() => Fetch_RequestPattern)).optional(), "handleAuthRequests": z.boolean().optional() }).passthrough(), "Fetch.enable.params", "commandParams", { method: "Fetch.enable" }); -const Fetch_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.enable.result", "commandResult", { method: "Fetch.enable" }); -const Fetch_FailRequestParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Fetch_RequestId), "errorReason": z.lazy(() => Network_ErrorReason) }).passthrough(), "Fetch.failRequest.params", "commandParams", { method: "Fetch.failRequest" }); -const Fetch_FailRequestResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.failRequest.result", "commandResult", { method: "Fetch.failRequest" }); -const Fetch_FulfillRequestParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Fetch_RequestId), "responseCode": z.number().int(), "responseHeaders": z.array(z.lazy(() => Fetch_HeaderEntry)).optional(), "binaryResponseHeaders": z.string().optional(), "body": z.string().optional(), "responsePhrase": z.string().optional() }).passthrough(), "Fetch.fulfillRequest.params", "commandParams", { method: "Fetch.fulfillRequest" }); -const Fetch_FulfillRequestResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.fulfillRequest.result", "commandResult", { method: "Fetch.fulfillRequest" }); -const Fetch_ContinueRequestParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Fetch_RequestId), "url": z.string().optional(), "method": z.string().optional(), "postData": z.string().optional(), "headers": z.array(z.lazy(() => Fetch_HeaderEntry)).optional(), "interceptResponse": z.boolean().optional() }).passthrough(), "Fetch.continueRequest.params", "commandParams", { method: "Fetch.continueRequest" }); -const Fetch_ContinueRequestResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.continueRequest.result", "commandResult", { method: "Fetch.continueRequest" }); -const Fetch_ContinueWithAuthParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Fetch_RequestId), "authChallengeResponse": z.lazy(() => Fetch_AuthChallengeResponse) }).passthrough(), "Fetch.continueWithAuth.params", "commandParams", { method: "Fetch.continueWithAuth" }); -const Fetch_ContinueWithAuthResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.continueWithAuth.result", "commandResult", { method: "Fetch.continueWithAuth" }); -const Fetch_ContinueResponseParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Fetch_RequestId), "responseCode": z.number().int().optional(), "responsePhrase": z.string().optional(), "responseHeaders": z.array(z.lazy(() => Fetch_HeaderEntry)).optional(), "binaryResponseHeaders": z.string().optional() }).passthrough(), "Fetch.continueResponse.params", "commandParams", { method: "Fetch.continueResponse" }); -const Fetch_ContinueResponseResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.continueResponse.result", "commandResult", { method: "Fetch.continueResponse" }); -const Fetch_GetResponseBodyParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Fetch_RequestId) }).passthrough(), "Fetch.getResponseBody.params", "commandParams", { method: "Fetch.getResponseBody" }); -const Fetch_GetResponseBodyResult = withCdpMeta(z.object({ "body": z.string(), "base64Encoded": z.boolean() }).passthrough(), "Fetch.getResponseBody.result", "commandResult", { method: "Fetch.getResponseBody" }); -const Fetch_TakeResponseBodyAsStreamParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Fetch_RequestId) }).passthrough(), "Fetch.takeResponseBodyAsStream.params", "commandParams", { method: "Fetch.takeResponseBodyAsStream" }); -const Fetch_TakeResponseBodyAsStreamResult = withCdpMeta(z.object({ "stream": z.lazy(() => IO_StreamHandle) }).passthrough(), "Fetch.takeResponseBodyAsStream.result", "commandResult", { method: "Fetch.takeResponseBodyAsStream" }); -const Fetch_RequestPausedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Fetch_RequestId), "request": z.lazy(() => Network_Request), "frameId": z.lazy(() => Page_FrameId), "resourceType": z.lazy(() => Network_ResourceType), "responseErrorReason": z.lazy(() => Network_ErrorReason).optional(), "responseStatusCode": z.number().int().optional(), "responseStatusText": z.string().optional(), "responseHeaders": z.array(z.lazy(() => Fetch_HeaderEntry)).optional(), "networkId": z.lazy(() => Network_RequestId).optional(), "redirectedRequestId": z.lazy(() => Fetch_RequestId).optional() }).passthrough(), "Fetch.requestPaused", "event", { phase: "event" }); -const Fetch_AuthRequiredEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Fetch_RequestId), "request": z.lazy(() => Network_Request), "frameId": z.lazy(() => Page_FrameId), "resourceType": z.lazy(() => Network_ResourceType), "authChallenge": z.lazy(() => Fetch_AuthChallenge) }).passthrough(), "Fetch.authRequired", "event", { phase: "event" }); -const FileSystem_File = withCdpMeta(z.object({ "name": z.string(), "lastModified": z.lazy(() => Network_TimeSinceEpoch), "size": z.number(), "type": z.string() }).passthrough(), "FileSystem.File", "type"); -const FileSystem_Directory = withCdpMeta(z.object({ "name": z.string(), "nestedDirectories": z.array(z.string()), "nestedFiles": z.array(z.lazy(() => FileSystem_File)) }).passthrough(), "FileSystem.Directory", "type"); -const FileSystem_BucketFileSystemLocator = withCdpMeta(z.object({ "storageKey": z.lazy(() => Storage_SerializedStorageKey), "bucketName": z.string().optional(), "pathComponents": z.array(z.string()) }).passthrough(), "FileSystem.BucketFileSystemLocator", "type"); -const FileSystem_GetDirectoryParams = withCdpMeta(z.object({ "bucketFileSystemLocator": z.lazy(() => FileSystem_BucketFileSystemLocator) }).passthrough(), "FileSystem.getDirectory.params", "commandParams", { method: "FileSystem.getDirectory" }); -const FileSystem_GetDirectoryResult = withCdpMeta(z.object({ "directory": z.lazy(() => FileSystem_Directory) }).passthrough(), "FileSystem.getDirectory.result", "commandResult", { method: "FileSystem.getDirectory" }); -const HeadlessExperimental_ScreenshotParams = withCdpMeta(z.object({ "format": z.enum(["jpeg", "png", "webp"]).optional(), "quality": z.number().int().optional(), "optimizeForSpeed": z.boolean().optional() }).passthrough(), "HeadlessExperimental.ScreenshotParams", "type"); -const HeadlessExperimental_BeginFrameParams = withCdpMeta(z.object({ "frameTimeTicks": z.number().optional(), "interval": z.number().optional(), "noDisplayUpdates": z.boolean().optional(), "screenshot": z.lazy(() => HeadlessExperimental_ScreenshotParams).optional() }).passthrough(), "HeadlessExperimental.beginFrame.params", "commandParams", { method: "HeadlessExperimental.beginFrame" }); -const HeadlessExperimental_BeginFrameResult = withCdpMeta(z.object({ "hasDamage": z.boolean(), "screenshotData": z.string().optional() }).passthrough(), "HeadlessExperimental.beginFrame.result", "commandResult", { method: "HeadlessExperimental.beginFrame" }); -const HeadlessExperimental_DisableParams = withCdpMeta(z.object({ }).passthrough(), "HeadlessExperimental.disable.params", "commandParams", { method: "HeadlessExperimental.disable" }); -const HeadlessExperimental_DisableResult = withCdpMeta(z.object({ }).passthrough(), "HeadlessExperimental.disable.result", "commandResult", { method: "HeadlessExperimental.disable" }); -const HeadlessExperimental_EnableParams = withCdpMeta(z.object({ }).passthrough(), "HeadlessExperimental.enable.params", "commandParams", { method: "HeadlessExperimental.enable" }); -const HeadlessExperimental_EnableResult = withCdpMeta(z.object({ }).passthrough(), "HeadlessExperimental.enable.result", "commandResult", { method: "HeadlessExperimental.enable" }); -const HeapProfiler_HeapSnapshotObjectId = withCdpMeta(z.string(), "HeapProfiler.HeapSnapshotObjectId", "type"); -const HeapProfiler_SamplingHeapProfileNode = withCdpMeta(z.object({ "callFrame": z.lazy(() => Runtime_CallFrame), "selfSize": z.number(), "id": z.number().int(), "children": z.array(z.lazy(() => HeapProfiler_SamplingHeapProfileNode)) }).passthrough(), "HeapProfiler.SamplingHeapProfileNode", "type"); -const HeapProfiler_SamplingHeapProfileSample = withCdpMeta(z.object({ "size": z.number(), "nodeId": z.number().int(), "ordinal": z.number() }).passthrough(), "HeapProfiler.SamplingHeapProfileSample", "type"); -const HeapProfiler_SamplingHeapProfile = withCdpMeta(z.object({ "head": z.lazy(() => HeapProfiler_SamplingHeapProfileNode), "samples": z.array(z.lazy(() => HeapProfiler_SamplingHeapProfileSample)) }).passthrough(), "HeapProfiler.SamplingHeapProfile", "type"); -const HeapProfiler_AddInspectedHeapObjectParams = withCdpMeta(z.object({ "heapObjectId": z.lazy(() => HeapProfiler_HeapSnapshotObjectId) }).passthrough(), "HeapProfiler.addInspectedHeapObject.params", "commandParams", { method: "HeapProfiler.addInspectedHeapObject" }); -const HeapProfiler_AddInspectedHeapObjectResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.addInspectedHeapObject.result", "commandResult", { method: "HeapProfiler.addInspectedHeapObject" }); -const HeapProfiler_CollectGarbageParams = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.collectGarbage.params", "commandParams", { method: "HeapProfiler.collectGarbage" }); -const HeapProfiler_CollectGarbageResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.collectGarbage.result", "commandResult", { method: "HeapProfiler.collectGarbage" }); -const HeapProfiler_DisableParams = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.disable.params", "commandParams", { method: "HeapProfiler.disable" }); -const HeapProfiler_DisableResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.disable.result", "commandResult", { method: "HeapProfiler.disable" }); -const HeapProfiler_EnableParams = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.enable.params", "commandParams", { method: "HeapProfiler.enable" }); -const HeapProfiler_EnableResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.enable.result", "commandResult", { method: "HeapProfiler.enable" }); -const HeapProfiler_GetHeapObjectIdParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime_RemoteObjectId) }).passthrough(), "HeapProfiler.getHeapObjectId.params", "commandParams", { method: "HeapProfiler.getHeapObjectId" }); -const HeapProfiler_GetHeapObjectIdResult = withCdpMeta(z.object({ "heapSnapshotObjectId": z.lazy(() => HeapProfiler_HeapSnapshotObjectId) }).passthrough(), "HeapProfiler.getHeapObjectId.result", "commandResult", { method: "HeapProfiler.getHeapObjectId" }); -const HeapProfiler_GetObjectByHeapObjectIdParams = withCdpMeta(z.object({ "objectId": z.lazy(() => HeapProfiler_HeapSnapshotObjectId), "objectGroup": z.string().optional() }).passthrough(), "HeapProfiler.getObjectByHeapObjectId.params", "commandParams", { method: "HeapProfiler.getObjectByHeapObjectId" }); -const HeapProfiler_GetObjectByHeapObjectIdResult = withCdpMeta(z.object({ "result": z.lazy(() => Runtime_RemoteObject) }).passthrough(), "HeapProfiler.getObjectByHeapObjectId.result", "commandResult", { method: "HeapProfiler.getObjectByHeapObjectId" }); -const HeapProfiler_GetSamplingProfileParams = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.getSamplingProfile.params", "commandParams", { method: "HeapProfiler.getSamplingProfile" }); -const HeapProfiler_GetSamplingProfileResult = withCdpMeta(z.object({ "profile": z.lazy(() => HeapProfiler_SamplingHeapProfile) }).passthrough(), "HeapProfiler.getSamplingProfile.result", "commandResult", { method: "HeapProfiler.getSamplingProfile" }); -const HeapProfiler_StartSamplingParams = withCdpMeta(z.object({ "samplingInterval": z.number().optional(), "stackDepth": z.number().optional(), "includeObjectsCollectedByMajorGC": z.boolean().optional(), "includeObjectsCollectedByMinorGC": z.boolean().optional() }).passthrough(), "HeapProfiler.startSampling.params", "commandParams", { method: "HeapProfiler.startSampling" }); -const HeapProfiler_StartSamplingResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.startSampling.result", "commandResult", { method: "HeapProfiler.startSampling" }); -const HeapProfiler_StartTrackingHeapObjectsParams = withCdpMeta(z.object({ "trackAllocations": z.boolean().optional() }).passthrough(), "HeapProfiler.startTrackingHeapObjects.params", "commandParams", { method: "HeapProfiler.startTrackingHeapObjects" }); -const HeapProfiler_StartTrackingHeapObjectsResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.startTrackingHeapObjects.result", "commandResult", { method: "HeapProfiler.startTrackingHeapObjects" }); -const HeapProfiler_StopSamplingParams = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.stopSampling.params", "commandParams", { method: "HeapProfiler.stopSampling" }); -const HeapProfiler_StopSamplingResult = withCdpMeta(z.object({ "profile": z.lazy(() => HeapProfiler_SamplingHeapProfile) }).passthrough(), "HeapProfiler.stopSampling.result", "commandResult", { method: "HeapProfiler.stopSampling" }); -const HeapProfiler_StopTrackingHeapObjectsParams = withCdpMeta(z.object({ "reportProgress": z.boolean().optional(), "treatGlobalObjectsAsRoots": z.boolean().optional(), "captureNumericValue": z.boolean().optional(), "exposeInternals": z.boolean().optional() }).passthrough(), "HeapProfiler.stopTrackingHeapObjects.params", "commandParams", { method: "HeapProfiler.stopTrackingHeapObjects" }); -const HeapProfiler_StopTrackingHeapObjectsResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.stopTrackingHeapObjects.result", "commandResult", { method: "HeapProfiler.stopTrackingHeapObjects" }); -const HeapProfiler_TakeHeapSnapshotParams = withCdpMeta(z.object({ "reportProgress": z.boolean().optional(), "treatGlobalObjectsAsRoots": z.boolean().optional(), "captureNumericValue": z.boolean().optional(), "exposeInternals": z.boolean().optional() }).passthrough(), "HeapProfiler.takeHeapSnapshot.params", "commandParams", { method: "HeapProfiler.takeHeapSnapshot" }); -const HeapProfiler_TakeHeapSnapshotResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.takeHeapSnapshot.result", "commandResult", { method: "HeapProfiler.takeHeapSnapshot" }); -const HeapProfiler_AddHeapSnapshotChunkEvent = withCdpMeta(z.object({ "chunk": z.string() }).passthrough(), "HeapProfiler.addHeapSnapshotChunk", "event", { phase: "event" }); -const HeapProfiler_HeapStatsUpdateEvent = withCdpMeta(z.object({ "statsUpdate": z.array(z.number().int()) }).passthrough(), "HeapProfiler.heapStatsUpdate", "event", { phase: "event" }); -const HeapProfiler_LastSeenObjectIdEvent = withCdpMeta(z.object({ "lastSeenObjectId": z.number().int(), "timestamp": z.number() }).passthrough(), "HeapProfiler.lastSeenObjectId", "event", { phase: "event" }); -const HeapProfiler_ReportHeapSnapshotProgressEvent = withCdpMeta(z.object({ "done": z.number().int(), "total": z.number().int(), "finished": z.boolean().optional() }).passthrough(), "HeapProfiler.reportHeapSnapshotProgress", "event", { phase: "event" }); -const HeapProfiler_ResetProfilesEvent = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.resetProfiles", "event", { phase: "event" }); -const IndexedDB_DatabaseWithObjectStores = withCdpMeta(z.object({ "name": z.string(), "version": z.number(), "objectStores": z.array(z.lazy(() => IndexedDB_ObjectStore)) }).passthrough(), "IndexedDB.DatabaseWithObjectStores", "type"); -const IndexedDB_ObjectStore = withCdpMeta(z.object({ "name": z.string(), "keyPath": z.lazy(() => IndexedDB_KeyPath), "autoIncrement": z.boolean(), "indexes": z.array(z.lazy(() => IndexedDB_ObjectStoreIndex)) }).passthrough(), "IndexedDB.ObjectStore", "type"); -const IndexedDB_ObjectStoreIndex = withCdpMeta(z.object({ "name": z.string(), "keyPath": z.lazy(() => IndexedDB_KeyPath), "unique": z.boolean(), "multiEntry": z.boolean() }).passthrough(), "IndexedDB.ObjectStoreIndex", "type"); -const IndexedDB_Key = withCdpMeta(z.object({ "type": z.enum(["number", "string", "date", "array"]), "number": z.number().optional(), "string": z.string().optional(), "date": z.number().optional(), "array": z.array(z.lazy(() => IndexedDB_Key)).optional() }).passthrough(), "IndexedDB.Key", "type"); -const IndexedDB_KeyRange = withCdpMeta(z.object({ "lower": z.lazy(() => IndexedDB_Key).optional(), "upper": z.lazy(() => IndexedDB_Key).optional(), "lowerOpen": z.boolean(), "upperOpen": z.boolean() }).passthrough(), "IndexedDB.KeyRange", "type"); -const IndexedDB_DataEntry = withCdpMeta(z.object({ "key": z.lazy(() => Runtime_RemoteObject), "primaryKey": z.lazy(() => Runtime_RemoteObject), "value": z.lazy(() => Runtime_RemoteObject) }).passthrough(), "IndexedDB.DataEntry", "type"); -const IndexedDB_KeyPath = withCdpMeta(z.object({ "type": z.enum(["null", "string", "array"]), "string": z.string().optional(), "array": z.array(z.string()).optional() }).passthrough(), "IndexedDB.KeyPath", "type"); -const IndexedDB_ClearObjectStoreParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage_StorageBucket).optional(), "databaseName": z.string(), "objectStoreName": z.string() }).passthrough(), "IndexedDB.clearObjectStore.params", "commandParams", { method: "IndexedDB.clearObjectStore" }); -const IndexedDB_ClearObjectStoreResult = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.clearObjectStore.result", "commandResult", { method: "IndexedDB.clearObjectStore" }); -const IndexedDB_DeleteDatabaseParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage_StorageBucket).optional(), "databaseName": z.string() }).passthrough(), "IndexedDB.deleteDatabase.params", "commandParams", { method: "IndexedDB.deleteDatabase" }); -const IndexedDB_DeleteDatabaseResult = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.deleteDatabase.result", "commandResult", { method: "IndexedDB.deleteDatabase" }); -const IndexedDB_DeleteObjectStoreEntriesParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage_StorageBucket).optional(), "databaseName": z.string(), "objectStoreName": z.string(), "keyRange": z.lazy(() => IndexedDB_KeyRange) }).passthrough(), "IndexedDB.deleteObjectStoreEntries.params", "commandParams", { method: "IndexedDB.deleteObjectStoreEntries" }); -const IndexedDB_DeleteObjectStoreEntriesResult = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.deleteObjectStoreEntries.result", "commandResult", { method: "IndexedDB.deleteObjectStoreEntries" }); -const IndexedDB_DisableParams = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.disable.params", "commandParams", { method: "IndexedDB.disable" }); -const IndexedDB_DisableResult = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.disable.result", "commandResult", { method: "IndexedDB.disable" }); -const IndexedDB_EnableParams = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.enable.params", "commandParams", { method: "IndexedDB.enable" }); -const IndexedDB_EnableResult = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.enable.result", "commandResult", { method: "IndexedDB.enable" }); -const IndexedDB_RequestDataParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage_StorageBucket).optional(), "databaseName": z.string(), "objectStoreName": z.string(), "indexName": z.string().optional(), "skipCount": z.number().int(), "pageSize": z.number().int(), "keyRange": z.lazy(() => IndexedDB_KeyRange).optional() }).passthrough(), "IndexedDB.requestData.params", "commandParams", { method: "IndexedDB.requestData" }); -const IndexedDB_RequestDataResult = withCdpMeta(z.object({ "objectStoreDataEntries": z.array(z.lazy(() => IndexedDB_DataEntry)), "hasMore": z.boolean() }).passthrough(), "IndexedDB.requestData.result", "commandResult", { method: "IndexedDB.requestData" }); -const IndexedDB_GetMetadataParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage_StorageBucket).optional(), "databaseName": z.string(), "objectStoreName": z.string() }).passthrough(), "IndexedDB.getMetadata.params", "commandParams", { method: "IndexedDB.getMetadata" }); -const IndexedDB_GetMetadataResult = withCdpMeta(z.object({ "entriesCount": z.number(), "keyGeneratorValue": z.number() }).passthrough(), "IndexedDB.getMetadata.result", "commandResult", { method: "IndexedDB.getMetadata" }); -const IndexedDB_RequestDatabaseParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage_StorageBucket).optional(), "databaseName": z.string() }).passthrough(), "IndexedDB.requestDatabase.params", "commandParams", { method: "IndexedDB.requestDatabase" }); -const IndexedDB_RequestDatabaseResult = withCdpMeta(z.object({ "databaseWithObjectStores": z.lazy(() => IndexedDB_DatabaseWithObjectStores) }).passthrough(), "IndexedDB.requestDatabase.result", "commandResult", { method: "IndexedDB.requestDatabase" }); -const IndexedDB_RequestDatabaseNamesParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage_StorageBucket).optional() }).passthrough(), "IndexedDB.requestDatabaseNames.params", "commandParams", { method: "IndexedDB.requestDatabaseNames" }); -const IndexedDB_RequestDatabaseNamesResult = withCdpMeta(z.object({ "databaseNames": z.array(z.string()) }).passthrough(), "IndexedDB.requestDatabaseNames.result", "commandResult", { method: "IndexedDB.requestDatabaseNames" }); -const Input_TouchPoint = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "radiusX": z.number().optional(), "radiusY": z.number().optional(), "rotationAngle": z.number().optional(), "force": z.number().optional(), "tangentialPressure": z.number().optional(), "tiltX": z.number().optional(), "tiltY": z.number().optional(), "twist": z.number().int().optional(), "id": z.number().optional() }).passthrough(), "Input.TouchPoint", "type"); -const Input_GestureSourceType = withCdpMeta(z.enum(["default", "touch", "mouse"]), "Input.GestureSourceType", "type"); -const Input_MouseButton = withCdpMeta(z.enum(["none", "left", "middle", "right", "back", "forward"]), "Input.MouseButton", "type"); -const Input_TimeSinceEpoch = withCdpMeta(z.number(), "Input.TimeSinceEpoch", "type"); -const Input_DragDataItem = withCdpMeta(z.object({ "mimeType": z.string(), "data": z.string(), "title": z.string().optional(), "baseURL": z.string().optional() }).passthrough(), "Input.DragDataItem", "type"); -const Input_DragData = withCdpMeta(z.object({ "items": z.array(z.lazy(() => Input_DragDataItem)), "files": z.array(z.string()).optional(), "dragOperationsMask": z.number().int() }).passthrough(), "Input.DragData", "type"); -const Input_DispatchDragEventParams = withCdpMeta(z.object({ "type": z.enum(["dragEnter", "dragOver", "drop", "dragCancel"]), "x": z.number(), "y": z.number(), "data": z.lazy(() => Input_DragData), "modifiers": z.number().int().optional() }).passthrough(), "Input.dispatchDragEvent.params", "commandParams", { method: "Input.dispatchDragEvent" }); -const Input_DispatchDragEventResult = withCdpMeta(z.object({ }).passthrough(), "Input.dispatchDragEvent.result", "commandResult", { method: "Input.dispatchDragEvent" }); -const Input_DispatchKeyEventParams = withCdpMeta(z.object({ "type": z.enum(["keyDown", "keyUp", "rawKeyDown", "char"]), "modifiers": z.number().int().optional(), "timestamp": z.lazy(() => Input_TimeSinceEpoch).optional(), "text": z.string().optional(), "unmodifiedText": z.string().optional(), "keyIdentifier": z.string().optional(), "code": z.string().optional(), "key": z.string().optional(), "windowsVirtualKeyCode": z.number().int().optional(), "nativeVirtualKeyCode": z.number().int().optional(), "autoRepeat": z.boolean().optional(), "isKeypad": z.boolean().optional(), "isSystemKey": z.boolean().optional(), "location": z.number().int().optional(), "commands": z.array(z.string()).optional() }).passthrough(), "Input.dispatchKeyEvent.params", "commandParams", { method: "Input.dispatchKeyEvent" }); -const Input_DispatchKeyEventResult = withCdpMeta(z.object({ }).passthrough(), "Input.dispatchKeyEvent.result", "commandResult", { method: "Input.dispatchKeyEvent" }); -const Input_InsertTextParams = withCdpMeta(z.object({ "text": z.string() }).passthrough(), "Input.insertText.params", "commandParams", { method: "Input.insertText" }); -const Input_InsertTextResult = withCdpMeta(z.object({ }).passthrough(), "Input.insertText.result", "commandResult", { method: "Input.insertText" }); -const Input_ImeSetCompositionParams = withCdpMeta(z.object({ "text": z.string(), "selectionStart": z.number().int(), "selectionEnd": z.number().int(), "replacementStart": z.number().int().optional(), "replacementEnd": z.number().int().optional() }).passthrough(), "Input.imeSetComposition.params", "commandParams", { method: "Input.imeSetComposition" }); -const Input_ImeSetCompositionResult = withCdpMeta(z.object({ }).passthrough(), "Input.imeSetComposition.result", "commandResult", { method: "Input.imeSetComposition" }); -const Input_DispatchMouseEventParams = withCdpMeta(z.object({ "type": z.enum(["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"]), "x": z.number(), "y": z.number(), "modifiers": z.number().int().optional(), "timestamp": z.lazy(() => Input_TimeSinceEpoch).optional(), "button": z.lazy(() => Input_MouseButton).optional(), "buttons": z.number().int().optional(), "clickCount": z.number().int().optional(), "force": z.number().optional(), "tangentialPressure": z.number().optional(), "tiltX": z.number().optional(), "tiltY": z.number().optional(), "twist": z.number().int().optional(), "deltaX": z.number().optional(), "deltaY": z.number().optional(), "pointerType": z.enum(["mouse", "pen"]).optional() }).passthrough(), "Input.dispatchMouseEvent.params", "commandParams", { method: "Input.dispatchMouseEvent" }); -const Input_DispatchMouseEventResult = withCdpMeta(z.object({ }).passthrough(), "Input.dispatchMouseEvent.result", "commandResult", { method: "Input.dispatchMouseEvent" }); -const Input_DispatchTouchEventParams = withCdpMeta(z.object({ "type": z.enum(["touchStart", "touchEnd", "touchMove", "touchCancel"]), "touchPoints": z.array(z.lazy(() => Input_TouchPoint)), "modifiers": z.number().int().optional(), "timestamp": z.lazy(() => Input_TimeSinceEpoch).optional() }).passthrough(), "Input.dispatchTouchEvent.params", "commandParams", { method: "Input.dispatchTouchEvent" }); -const Input_DispatchTouchEventResult = withCdpMeta(z.object({ }).passthrough(), "Input.dispatchTouchEvent.result", "commandResult", { method: "Input.dispatchTouchEvent" }); -const Input_CancelDraggingParams = withCdpMeta(z.object({ }).passthrough(), "Input.cancelDragging.params", "commandParams", { method: "Input.cancelDragging" }); -const Input_CancelDraggingResult = withCdpMeta(z.object({ }).passthrough(), "Input.cancelDragging.result", "commandResult", { method: "Input.cancelDragging" }); -const Input_EmulateTouchFromMouseEventParams = withCdpMeta(z.object({ "type": z.enum(["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"]), "x": z.number().int(), "y": z.number().int(), "button": z.lazy(() => Input_MouseButton), "timestamp": z.lazy(() => Input_TimeSinceEpoch).optional(), "deltaX": z.number().optional(), "deltaY": z.number().optional(), "modifiers": z.number().int().optional(), "clickCount": z.number().int().optional() }).passthrough(), "Input.emulateTouchFromMouseEvent.params", "commandParams", { method: "Input.emulateTouchFromMouseEvent" }); -const Input_EmulateTouchFromMouseEventResult = withCdpMeta(z.object({ }).passthrough(), "Input.emulateTouchFromMouseEvent.result", "commandResult", { method: "Input.emulateTouchFromMouseEvent" }); -const Input_SetIgnoreInputEventsParams = withCdpMeta(z.object({ "ignore": z.boolean() }).passthrough(), "Input.setIgnoreInputEvents.params", "commandParams", { method: "Input.setIgnoreInputEvents" }); -const Input_SetIgnoreInputEventsResult = withCdpMeta(z.object({ }).passthrough(), "Input.setIgnoreInputEvents.result", "commandResult", { method: "Input.setIgnoreInputEvents" }); -const Input_SetInterceptDragsParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Input.setInterceptDrags.params", "commandParams", { method: "Input.setInterceptDrags" }); -const Input_SetInterceptDragsResult = withCdpMeta(z.object({ }).passthrough(), "Input.setInterceptDrags.result", "commandResult", { method: "Input.setInterceptDrags" }); -const Input_SynthesizePinchGestureParams = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "scaleFactor": z.number(), "relativeSpeed": z.number().int().optional(), "gestureSourceType": z.lazy(() => Input_GestureSourceType).optional() }).passthrough(), "Input.synthesizePinchGesture.params", "commandParams", { method: "Input.synthesizePinchGesture" }); -const Input_SynthesizePinchGestureResult = withCdpMeta(z.object({ }).passthrough(), "Input.synthesizePinchGesture.result", "commandResult", { method: "Input.synthesizePinchGesture" }); -const Input_SynthesizeScrollGestureParams = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "xDistance": z.number().optional(), "yDistance": z.number().optional(), "xOverscroll": z.number().optional(), "yOverscroll": z.number().optional(), "preventFling": z.boolean().optional(), "speed": z.number().int().optional(), "gestureSourceType": z.lazy(() => Input_GestureSourceType).optional(), "repeatCount": z.number().int().optional(), "repeatDelayMs": z.number().int().optional(), "interactionMarkerName": z.string().optional() }).passthrough(), "Input.synthesizeScrollGesture.params", "commandParams", { method: "Input.synthesizeScrollGesture" }); -const Input_SynthesizeScrollGestureResult = withCdpMeta(z.object({ }).passthrough(), "Input.synthesizeScrollGesture.result", "commandResult", { method: "Input.synthesizeScrollGesture" }); -const Input_SynthesizeTapGestureParams = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "duration": z.number().int().optional(), "tapCount": z.number().int().optional(), "gestureSourceType": z.lazy(() => Input_GestureSourceType).optional() }).passthrough(), "Input.synthesizeTapGesture.params", "commandParams", { method: "Input.synthesizeTapGesture" }); -const Input_SynthesizeTapGestureResult = withCdpMeta(z.object({ }).passthrough(), "Input.synthesizeTapGesture.result", "commandResult", { method: "Input.synthesizeTapGesture" }); -const Input_DragInterceptedEvent = withCdpMeta(z.object({ "data": z.lazy(() => Input_DragData) }).passthrough(), "Input.dragIntercepted", "event", { phase: "event" }); -const Inspector_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Inspector.disable.params", "commandParams", { method: "Inspector.disable" }); -const Inspector_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Inspector.disable.result", "commandResult", { method: "Inspector.disable" }); -const Inspector_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Inspector.enable.params", "commandParams", { method: "Inspector.enable" }); -const Inspector_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Inspector.enable.result", "commandResult", { method: "Inspector.enable" }); -const Inspector_DetachedEvent = withCdpMeta(z.object({ "reason": z.string() }).passthrough(), "Inspector.detached", "event", { phase: "event" }); -const Inspector_TargetCrashedEvent = withCdpMeta(z.object({ }).passthrough(), "Inspector.targetCrashed", "event", { phase: "event" }); -const Inspector_TargetReloadedAfterCrashEvent = withCdpMeta(z.object({ }).passthrough(), "Inspector.targetReloadedAfterCrash", "event", { phase: "event" }); -const Inspector_WorkerScriptLoadedEvent = withCdpMeta(z.object({ }).passthrough(), "Inspector.workerScriptLoaded", "event", { phase: "event" }); -const IO_StreamHandle = withCdpMeta(z.string(), "IO.StreamHandle", "type"); -const IO_CloseParams = withCdpMeta(z.object({ "handle": z.lazy(() => IO_StreamHandle) }).passthrough(), "IO.close.params", "commandParams", { method: "IO.close" }); -const IO_CloseResult = withCdpMeta(z.object({ }).passthrough(), "IO.close.result", "commandResult", { method: "IO.close" }); -const IO_ReadParams = withCdpMeta(z.object({ "handle": z.lazy(() => IO_StreamHandle), "offset": z.number().int().optional(), "size": z.number().int().optional() }).passthrough(), "IO.read.params", "commandParams", { method: "IO.read" }); -const IO_ReadResult = withCdpMeta(z.object({ "base64Encoded": z.boolean().optional(), "data": z.string(), "eof": z.boolean() }).passthrough(), "IO.read.result", "commandResult", { method: "IO.read" }); -const IO_ResolveBlobParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime_RemoteObjectId) }).passthrough(), "IO.resolveBlob.params", "commandParams", { method: "IO.resolveBlob" }); -const IO_ResolveBlobResult = withCdpMeta(z.object({ "uuid": z.string() }).passthrough(), "IO.resolveBlob.result", "commandResult", { method: "IO.resolveBlob" }); -const LayerTree_LayerId = withCdpMeta(z.string(), "LayerTree.LayerId", "type"); -const LayerTree_SnapshotId = withCdpMeta(z.string(), "LayerTree.SnapshotId", "type"); -const LayerTree_ScrollRect = withCdpMeta(z.object({ "rect": z.lazy(() => DOM_Rect), "type": z.enum(["RepaintsOnScroll", "TouchEventHandler", "WheelEventHandler"]) }).passthrough(), "LayerTree.ScrollRect", "type"); -const LayerTree_StickyPositionConstraint = withCdpMeta(z.object({ "stickyBoxRect": z.lazy(() => DOM_Rect), "containingBlockRect": z.lazy(() => DOM_Rect), "nearestLayerShiftingStickyBox": z.lazy(() => LayerTree_LayerId).optional(), "nearestLayerShiftingContainingBlock": z.lazy(() => LayerTree_LayerId).optional() }).passthrough(), "LayerTree.StickyPositionConstraint", "type"); -const LayerTree_PictureTile = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "picture": z.string() }).passthrough(), "LayerTree.PictureTile", "type"); -const LayerTree_Layer = withCdpMeta(z.object({ "layerId": z.lazy(() => LayerTree_LayerId), "parentLayerId": z.lazy(() => LayerTree_LayerId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "offsetX": z.number(), "offsetY": z.number(), "width": z.number(), "height": z.number(), "transform": z.array(z.number()).optional(), "anchorX": z.number().optional(), "anchorY": z.number().optional(), "anchorZ": z.number().optional(), "paintCount": z.number().int(), "drawsContent": z.boolean(), "invisible": z.boolean().optional(), "scrollRects": z.array(z.lazy(() => LayerTree_ScrollRect)).optional(), "stickyPositionConstraint": z.lazy(() => LayerTree_StickyPositionConstraint).optional() }).passthrough(), "LayerTree.Layer", "type"); -const LayerTree_PaintProfile = withCdpMeta(z.array(z.number()), "LayerTree.PaintProfile", "type"); -const LayerTree_CompositingReasonsParams = withCdpMeta(z.object({ "layerId": z.lazy(() => LayerTree_LayerId) }).passthrough(), "LayerTree.compositingReasons.params", "commandParams", { method: "LayerTree.compositingReasons" }); -const LayerTree_CompositingReasonsResult = withCdpMeta(z.object({ "compositingReasons": z.array(z.string()), "compositingReasonIds": z.array(z.string()) }).passthrough(), "LayerTree.compositingReasons.result", "commandResult", { method: "LayerTree.compositingReasons" }); -const LayerTree_DisableParams = withCdpMeta(z.object({ }).passthrough(), "LayerTree.disable.params", "commandParams", { method: "LayerTree.disable" }); -const LayerTree_DisableResult = withCdpMeta(z.object({ }).passthrough(), "LayerTree.disable.result", "commandResult", { method: "LayerTree.disable" }); -const LayerTree_EnableParams = withCdpMeta(z.object({ }).passthrough(), "LayerTree.enable.params", "commandParams", { method: "LayerTree.enable" }); -const LayerTree_EnableResult = withCdpMeta(z.object({ }).passthrough(), "LayerTree.enable.result", "commandResult", { method: "LayerTree.enable" }); -const LayerTree_LoadSnapshotParams = withCdpMeta(z.object({ "tiles": z.array(z.lazy(() => LayerTree_PictureTile)) }).passthrough(), "LayerTree.loadSnapshot.params", "commandParams", { method: "LayerTree.loadSnapshot" }); -const LayerTree_LoadSnapshotResult = withCdpMeta(z.object({ "snapshotId": z.lazy(() => LayerTree_SnapshotId) }).passthrough(), "LayerTree.loadSnapshot.result", "commandResult", { method: "LayerTree.loadSnapshot" }); -const LayerTree_MakeSnapshotParams = withCdpMeta(z.object({ "layerId": z.lazy(() => LayerTree_LayerId) }).passthrough(), "LayerTree.makeSnapshot.params", "commandParams", { method: "LayerTree.makeSnapshot" }); -const LayerTree_MakeSnapshotResult = withCdpMeta(z.object({ "snapshotId": z.lazy(() => LayerTree_SnapshotId) }).passthrough(), "LayerTree.makeSnapshot.result", "commandResult", { method: "LayerTree.makeSnapshot" }); -const LayerTree_ProfileSnapshotParams = withCdpMeta(z.object({ "snapshotId": z.lazy(() => LayerTree_SnapshotId), "minRepeatCount": z.number().int().optional(), "minDuration": z.number().optional(), "clipRect": z.lazy(() => DOM_Rect).optional() }).passthrough(), "LayerTree.profileSnapshot.params", "commandParams", { method: "LayerTree.profileSnapshot" }); -const LayerTree_ProfileSnapshotResult = withCdpMeta(z.object({ "timings": z.array(z.lazy(() => LayerTree_PaintProfile)) }).passthrough(), "LayerTree.profileSnapshot.result", "commandResult", { method: "LayerTree.profileSnapshot" }); -const LayerTree_ReleaseSnapshotParams = withCdpMeta(z.object({ "snapshotId": z.lazy(() => LayerTree_SnapshotId) }).passthrough(), "LayerTree.releaseSnapshot.params", "commandParams", { method: "LayerTree.releaseSnapshot" }); -const LayerTree_ReleaseSnapshotResult = withCdpMeta(z.object({ }).passthrough(), "LayerTree.releaseSnapshot.result", "commandResult", { method: "LayerTree.releaseSnapshot" }); -const LayerTree_ReplaySnapshotParams = withCdpMeta(z.object({ "snapshotId": z.lazy(() => LayerTree_SnapshotId), "fromStep": z.number().int().optional(), "toStep": z.number().int().optional(), "scale": z.number().optional() }).passthrough(), "LayerTree.replaySnapshot.params", "commandParams", { method: "LayerTree.replaySnapshot" }); -const LayerTree_ReplaySnapshotResult = withCdpMeta(z.object({ "dataURL": z.string() }).passthrough(), "LayerTree.replaySnapshot.result", "commandResult", { method: "LayerTree.replaySnapshot" }); -const LayerTree_SnapshotCommandLogParams = withCdpMeta(z.object({ "snapshotId": z.lazy(() => LayerTree_SnapshotId) }).passthrough(), "LayerTree.snapshotCommandLog.params", "commandParams", { method: "LayerTree.snapshotCommandLog" }); -const LayerTree_SnapshotCommandLogResult = withCdpMeta(z.object({ "commandLog": z.array(z.record(z.string(), z.unknown())) }).passthrough(), "LayerTree.snapshotCommandLog.result", "commandResult", { method: "LayerTree.snapshotCommandLog" }); -const LayerTree_LayerPaintedEvent = withCdpMeta(z.object({ "layerId": z.lazy(() => LayerTree_LayerId), "clip": z.lazy(() => DOM_Rect) }).passthrough(), "LayerTree.layerPainted", "event", { phase: "event" }); -const LayerTree_LayerTreeDidChangeEvent = withCdpMeta(z.object({ "layers": z.array(z.lazy(() => LayerTree_Layer)).optional() }).passthrough(), "LayerTree.layerTreeDidChange", "event", { phase: "event" }); -const Log_LogEntry = withCdpMeta(z.object({ "source": z.enum(["xml", "javascript", "network", "storage", "appcache", "rendering", "security", "deprecation", "worker", "violation", "intervention", "recommendation", "other"]), "level": z.enum(["verbose", "info", "warning", "error"]), "text": z.string(), "category": z.enum(["cors"]).optional(), "timestamp": z.lazy(() => Runtime_Timestamp), "url": z.string().optional(), "lineNumber": z.number().int().optional(), "stackTrace": z.lazy(() => Runtime_StackTrace).optional(), "networkRequestId": z.lazy(() => Network_RequestId).optional(), "workerId": z.string().optional(), "args": z.array(z.lazy(() => Runtime_RemoteObject)).optional() }).passthrough(), "Log.LogEntry", "type"); -const Log_ViolationSetting = withCdpMeta(z.object({ "name": z.enum(["longTask", "longLayout", "blockedEvent", "blockedParser", "discouragedAPIUse", "handler", "recurringHandler"]), "threshold": z.number() }).passthrough(), "Log.ViolationSetting", "type"); -const Log_ClearParams = withCdpMeta(z.object({ }).passthrough(), "Log.clear.params", "commandParams", { method: "Log.clear" }); -const Log_ClearResult = withCdpMeta(z.object({ }).passthrough(), "Log.clear.result", "commandResult", { method: "Log.clear" }); -const Log_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Log.disable.params", "commandParams", { method: "Log.disable" }); -const Log_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Log.disable.result", "commandResult", { method: "Log.disable" }); -const Log_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Log.enable.params", "commandParams", { method: "Log.enable" }); -const Log_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Log.enable.result", "commandResult", { method: "Log.enable" }); -const Log_StartViolationsReportParams = withCdpMeta(z.object({ "config": z.array(z.lazy(() => Log_ViolationSetting)) }).passthrough(), "Log.startViolationsReport.params", "commandParams", { method: "Log.startViolationsReport" }); -const Log_StartViolationsReportResult = withCdpMeta(z.object({ }).passthrough(), "Log.startViolationsReport.result", "commandResult", { method: "Log.startViolationsReport" }); -const Log_StopViolationsReportParams = withCdpMeta(z.object({ }).passthrough(), "Log.stopViolationsReport.params", "commandParams", { method: "Log.stopViolationsReport" }); -const Log_StopViolationsReportResult = withCdpMeta(z.object({ }).passthrough(), "Log.stopViolationsReport.result", "commandResult", { method: "Log.stopViolationsReport" }); -const Log_EntryAddedEvent = withCdpMeta(z.object({ "entry": z.lazy(() => Log_LogEntry) }).passthrough(), "Log.entryAdded", "event", { phase: "event" }); -const Media_PlayerId = withCdpMeta(z.string(), "Media.PlayerId", "type"); -const Media_Timestamp = withCdpMeta(z.number(), "Media.Timestamp", "type"); -const Media_PlayerMessage = withCdpMeta(z.object({ "level": z.enum(["error", "warning", "info", "debug"]), "message": z.string() }).passthrough(), "Media.PlayerMessage", "type"); -const Media_PlayerProperty = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "Media.PlayerProperty", "type"); -const Media_PlayerEvent = withCdpMeta(z.object({ "timestamp": z.lazy(() => Media_Timestamp), "value": z.string() }).passthrough(), "Media.PlayerEvent", "type"); -const Media_PlayerErrorSourceLocation = withCdpMeta(z.object({ "file": z.string(), "line": z.number().int() }).passthrough(), "Media.PlayerErrorSourceLocation", "type"); -const Media_PlayerError = withCdpMeta(z.object({ "errorType": z.string(), "code": z.number().int(), "stack": z.array(z.lazy(() => Media_PlayerErrorSourceLocation)), "cause": z.array(z.lazy(() => Media_PlayerError)), "data": z.record(z.string(), z.unknown()) }).passthrough(), "Media.PlayerError", "type"); -const Media_Player = withCdpMeta(z.object({ "playerId": z.lazy(() => Media_PlayerId), "domNodeId": z.lazy(() => DOM_BackendNodeId).optional() }).passthrough(), "Media.Player", "type"); -const Media_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Media.enable.params", "commandParams", { method: "Media.enable" }); -const Media_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Media.enable.result", "commandResult", { method: "Media.enable" }); -const Media_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Media.disable.params", "commandParams", { method: "Media.disable" }); -const Media_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Media.disable.result", "commandResult", { method: "Media.disable" }); -const Media_PlayerPropertiesChangedEvent = withCdpMeta(z.object({ "playerId": z.lazy(() => Media_PlayerId), "properties": z.array(z.lazy(() => Media_PlayerProperty)) }).passthrough(), "Media.playerPropertiesChanged", "event", { phase: "event" }); -const Media_PlayerEventsAddedEvent = withCdpMeta(z.object({ "playerId": z.lazy(() => Media_PlayerId), "events": z.array(z.lazy(() => Media_PlayerEvent)) }).passthrough(), "Media.playerEventsAdded", "event", { phase: "event" }); -const Media_PlayerMessagesLoggedEvent = withCdpMeta(z.object({ "playerId": z.lazy(() => Media_PlayerId), "messages": z.array(z.lazy(() => Media_PlayerMessage)) }).passthrough(), "Media.playerMessagesLogged", "event", { phase: "event" }); -const Media_PlayerErrorsRaisedEvent = withCdpMeta(z.object({ "playerId": z.lazy(() => Media_PlayerId), "errors": z.array(z.lazy(() => Media_PlayerError)) }).passthrough(), "Media.playerErrorsRaised", "event", { phase: "event" }); -const Media_PlayerCreatedEvent = withCdpMeta(z.object({ "player": z.lazy(() => Media_Player) }).passthrough(), "Media.playerCreated", "event", { phase: "event" }); -const Memory_PressureLevel = withCdpMeta(z.enum(["moderate", "critical"]), "Memory.PressureLevel", "type"); -const Memory_SamplingProfileNode = withCdpMeta(z.object({ "size": z.number(), "total": z.number(), "stack": z.array(z.string()) }).passthrough(), "Memory.SamplingProfileNode", "type"); -const Memory_SamplingProfile = withCdpMeta(z.object({ "samples": z.array(z.lazy(() => Memory_SamplingProfileNode)), "modules": z.array(z.lazy(() => Memory_Module)) }).passthrough(), "Memory.SamplingProfile", "type"); -const Memory_Module = withCdpMeta(z.object({ "name": z.string(), "uuid": z.string(), "baseAddress": z.string(), "size": z.number() }).passthrough(), "Memory.Module", "type"); -const Memory_DOMCounter = withCdpMeta(z.object({ "name": z.string(), "count": z.number().int() }).passthrough(), "Memory.DOMCounter", "type"); -const Memory_GetDOMCountersParams = withCdpMeta(z.object({ }).passthrough(), "Memory.getDOMCounters.params", "commandParams", { method: "Memory.getDOMCounters" }); -const Memory_GetDOMCountersResult = withCdpMeta(z.object({ "documents": z.number().int(), "nodes": z.number().int(), "jsEventListeners": z.number().int() }).passthrough(), "Memory.getDOMCounters.result", "commandResult", { method: "Memory.getDOMCounters" }); -const Memory_GetDOMCountersForLeakDetectionParams = withCdpMeta(z.object({ }).passthrough(), "Memory.getDOMCountersForLeakDetection.params", "commandParams", { method: "Memory.getDOMCountersForLeakDetection" }); -const Memory_GetDOMCountersForLeakDetectionResult = withCdpMeta(z.object({ "counters": z.array(z.lazy(() => Memory_DOMCounter)) }).passthrough(), "Memory.getDOMCountersForLeakDetection.result", "commandResult", { method: "Memory.getDOMCountersForLeakDetection" }); -const Memory_PrepareForLeakDetectionParams = withCdpMeta(z.object({ }).passthrough(), "Memory.prepareForLeakDetection.params", "commandParams", { method: "Memory.prepareForLeakDetection" }); -const Memory_PrepareForLeakDetectionResult = withCdpMeta(z.object({ }).passthrough(), "Memory.prepareForLeakDetection.result", "commandResult", { method: "Memory.prepareForLeakDetection" }); -const Memory_ForciblyPurgeJavaScriptMemoryParams = withCdpMeta(z.object({ }).passthrough(), "Memory.forciblyPurgeJavaScriptMemory.params", "commandParams", { method: "Memory.forciblyPurgeJavaScriptMemory" }); -const Memory_ForciblyPurgeJavaScriptMemoryResult = withCdpMeta(z.object({ }).passthrough(), "Memory.forciblyPurgeJavaScriptMemory.result", "commandResult", { method: "Memory.forciblyPurgeJavaScriptMemory" }); -const Memory_SetPressureNotificationsSuppressedParams = withCdpMeta(z.object({ "suppressed": z.boolean() }).passthrough(), "Memory.setPressureNotificationsSuppressed.params", "commandParams", { method: "Memory.setPressureNotificationsSuppressed" }); -const Memory_SetPressureNotificationsSuppressedResult = withCdpMeta(z.object({ }).passthrough(), "Memory.setPressureNotificationsSuppressed.result", "commandResult", { method: "Memory.setPressureNotificationsSuppressed" }); -const Memory_SimulatePressureNotificationParams = withCdpMeta(z.object({ "level": z.lazy(() => Memory_PressureLevel) }).passthrough(), "Memory.simulatePressureNotification.params", "commandParams", { method: "Memory.simulatePressureNotification" }); -const Memory_SimulatePressureNotificationResult = withCdpMeta(z.object({ }).passthrough(), "Memory.simulatePressureNotification.result", "commandResult", { method: "Memory.simulatePressureNotification" }); -const Memory_StartSamplingParams = withCdpMeta(z.object({ "samplingInterval": z.number().int().optional(), "suppressRandomness": z.boolean().optional() }).passthrough(), "Memory.startSampling.params", "commandParams", { method: "Memory.startSampling" }); -const Memory_StartSamplingResult = withCdpMeta(z.object({ }).passthrough(), "Memory.startSampling.result", "commandResult", { method: "Memory.startSampling" }); -const Memory_StopSamplingParams = withCdpMeta(z.object({ }).passthrough(), "Memory.stopSampling.params", "commandParams", { method: "Memory.stopSampling" }); -const Memory_StopSamplingResult = withCdpMeta(z.object({ }).passthrough(), "Memory.stopSampling.result", "commandResult", { method: "Memory.stopSampling" }); -const Memory_GetAllTimeSamplingProfileParams = withCdpMeta(z.object({ }).passthrough(), "Memory.getAllTimeSamplingProfile.params", "commandParams", { method: "Memory.getAllTimeSamplingProfile" }); -const Memory_GetAllTimeSamplingProfileResult = withCdpMeta(z.object({ "profile": z.lazy(() => Memory_SamplingProfile) }).passthrough(), "Memory.getAllTimeSamplingProfile.result", "commandResult", { method: "Memory.getAllTimeSamplingProfile" }); -const Memory_GetBrowserSamplingProfileParams = withCdpMeta(z.object({ }).passthrough(), "Memory.getBrowserSamplingProfile.params", "commandParams", { method: "Memory.getBrowserSamplingProfile" }); -const Memory_GetBrowserSamplingProfileResult = withCdpMeta(z.object({ "profile": z.lazy(() => Memory_SamplingProfile) }).passthrough(), "Memory.getBrowserSamplingProfile.result", "commandResult", { method: "Memory.getBrowserSamplingProfile" }); -const Memory_GetSamplingProfileParams = withCdpMeta(z.object({ }).passthrough(), "Memory.getSamplingProfile.params", "commandParams", { method: "Memory.getSamplingProfile" }); -const Memory_GetSamplingProfileResult = withCdpMeta(z.object({ "profile": z.lazy(() => Memory_SamplingProfile) }).passthrough(), "Memory.getSamplingProfile.result", "commandResult", { method: "Memory.getSamplingProfile" }); -const Network_ResourceType = withCdpMeta(z.enum(["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "Fetch", "Prefetch", "EventSource", "WebSocket", "Manifest", "SignedExchange", "Ping", "CSPViolationReport", "Preflight", "FedCM", "Other"]), "Network.ResourceType", "type"); -const Network_LoaderId = withCdpMeta(z.string(), "Network.LoaderId", "type"); -const Network_RequestId = withCdpMeta(z.string(), "Network.RequestId", "type"); -const Network_InterceptionId = withCdpMeta(z.string(), "Network.InterceptionId", "type"); -const Network_ErrorReason = withCdpMeta(z.enum(["Failed", "Aborted", "TimedOut", "AccessDenied", "ConnectionClosed", "ConnectionReset", "ConnectionRefused", "ConnectionAborted", "ConnectionFailed", "NameNotResolved", "InternetDisconnected", "AddressUnreachable", "BlockedByClient", "BlockedByResponse"]), "Network.ErrorReason", "type"); -const Network_TimeSinceEpoch = withCdpMeta(z.number(), "Network.TimeSinceEpoch", "type"); -const Network_MonotonicTime = withCdpMeta(z.number(), "Network.MonotonicTime", "type"); -const Network_Headers = withCdpMeta(z.record(z.string(), z.unknown()), "Network.Headers", "type"); -const Network_ConnectionType = withCdpMeta(z.enum(["none", "cellular2g", "cellular3g", "cellular4g", "bluetooth", "ethernet", "wifi", "wimax", "other"]), "Network.ConnectionType", "type"); -const Network_CookieSameSite = withCdpMeta(z.enum(["Strict", "Lax", "None"]), "Network.CookieSameSite", "type"); -const Network_CookiePriority = withCdpMeta(z.enum(["Low", "Medium", "High"]), "Network.CookiePriority", "type"); -const Network_CookieSourceScheme = withCdpMeta(z.enum(["Unset", "NonSecure", "Secure"]), "Network.CookieSourceScheme", "type"); -const Network_ResourceTiming = withCdpMeta(z.object({ "requestTime": z.number(), "proxyStart": z.number(), "proxyEnd": z.number(), "dnsStart": z.number(), "dnsEnd": z.number(), "connectStart": z.number(), "connectEnd": z.number(), "sslStart": z.number(), "sslEnd": z.number(), "workerStart": z.number(), "workerReady": z.number(), "workerFetchStart": z.number(), "workerRespondWithSettled": z.number(), "workerRouterEvaluationStart": z.number().optional(), "workerCacheLookupStart": z.number().optional(), "sendStart": z.number(), "sendEnd": z.number(), "pushStart": z.number(), "pushEnd": z.number(), "receiveHeadersStart": z.number(), "receiveHeadersEnd": z.number() }).passthrough(), "Network.ResourceTiming", "type"); -const Network_ResourcePriority = withCdpMeta(z.enum(["VeryLow", "Low", "Medium", "High", "VeryHigh"]), "Network.ResourcePriority", "type"); -const Network_RenderBlockingBehavior = withCdpMeta(z.enum(["Blocking", "InBodyParserBlocking", "NonBlocking", "NonBlockingDynamic", "PotentiallyBlocking"]), "Network.RenderBlockingBehavior", "type"); -const Network_PostDataEntry = withCdpMeta(z.object({ "bytes": z.string().optional() }).passthrough(), "Network.PostDataEntry", "type"); -const Network_Request = withCdpMeta(z.object({ "url": z.string(), "urlFragment": z.string().optional(), "method": z.string(), "headers": z.lazy(() => Network_Headers), "postData": z.string().optional(), "hasPostData": z.boolean().optional(), "postDataEntries": z.array(z.lazy(() => Network_PostDataEntry)).optional(), "mixedContentType": z.lazy(() => Security_MixedContentType).optional(), "initialPriority": z.lazy(() => Network_ResourcePriority), "referrerPolicy": z.enum(["unsafe-url", "no-referrer-when-downgrade", "no-referrer", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin"]), "isLinkPreload": z.boolean().optional(), "trustTokenParams": z.lazy(() => Network_TrustTokenParams).optional(), "isSameSite": z.boolean().optional(), "isAdRelated": z.boolean().optional() }).passthrough(), "Network.Request", "type"); -const Network_SignedCertificateTimestamp = withCdpMeta(z.object({ "status": z.string(), "origin": z.string(), "logDescription": z.string(), "logId": z.string(), "timestamp": z.number(), "hashAlgorithm": z.string(), "signatureAlgorithm": z.string(), "signatureData": z.string() }).passthrough(), "Network.SignedCertificateTimestamp", "type"); -const Network_SecurityDetails = withCdpMeta(z.object({ "protocol": z.string(), "keyExchange": z.string(), "keyExchangeGroup": z.string().optional(), "cipher": z.string(), "mac": z.string().optional(), "certificateId": z.lazy(() => Security_CertificateId), "subjectName": z.string(), "sanList": z.array(z.string()), "issuer": z.string(), "validFrom": z.lazy(() => Network_TimeSinceEpoch), "validTo": z.lazy(() => Network_TimeSinceEpoch), "signedCertificateTimestampList": z.array(z.lazy(() => Network_SignedCertificateTimestamp)), "certificateTransparencyCompliance": z.lazy(() => Network_CertificateTransparencyCompliance), "serverSignatureAlgorithm": z.number().int().optional(), "encryptedClientHello": z.boolean() }).passthrough(), "Network.SecurityDetails", "type"); -const Network_CertificateTransparencyCompliance = withCdpMeta(z.enum(["unknown", "not-compliant", "compliant"]), "Network.CertificateTransparencyCompliance", "type"); -const Network_BlockedReason = withCdpMeta(z.enum(["other", "csp", "mixed-content", "origin", "inspector", "integrity", "subresource-filter", "content-type", "coep-frame-resource-needs-coep-header", "coop-sandboxed-iframe-cannot-navigate-to-coop-page", "corp-not-same-origin", "corp-not-same-origin-after-defaulted-to-same-origin-by-coep", "corp-not-same-origin-after-defaulted-to-same-origin-by-dip", "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip", "corp-not-same-site", "sri-message-signature-mismatch"]), "Network.BlockedReason", "type"); -const Network_CorsError = withCdpMeta(z.enum(["DisallowedByMode", "InvalidResponse", "WildcardOriginNotAllowed", "MissingAllowOriginHeader", "MultipleAllowOriginValues", "InvalidAllowOriginValue", "AllowOriginMismatch", "InvalidAllowCredentials", "CorsDisabledScheme", "PreflightInvalidStatus", "PreflightDisallowedRedirect", "PreflightWildcardOriginNotAllowed", "PreflightMissingAllowOriginHeader", "PreflightMultipleAllowOriginValues", "PreflightInvalidAllowOriginValue", "PreflightAllowOriginMismatch", "PreflightInvalidAllowCredentials", "PreflightMissingAllowExternal", "PreflightInvalidAllowExternal", "InvalidAllowMethodsPreflightResponse", "InvalidAllowHeadersPreflightResponse", "MethodDisallowedByPreflightResponse", "HeaderDisallowedByPreflightResponse", "RedirectContainsCredentials", "InsecureLocalNetwork", "InvalidLocalNetworkAccess", "NoCorsRedirectModeNotFollow", "LocalNetworkAccessPermissionDenied"]), "Network.CorsError", "type"); -const Network_CorsErrorStatus = withCdpMeta(z.object({ "corsError": z.lazy(() => Network_CorsError), "failedParameter": z.string() }).passthrough(), "Network.CorsErrorStatus", "type"); -const Network_ServiceWorkerResponseSource = withCdpMeta(z.enum(["cache-storage", "http-cache", "fallback-code", "network"]), "Network.ServiceWorkerResponseSource", "type"); -const Network_TrustTokenParams = withCdpMeta(z.object({ "operation": z.lazy(() => Network_TrustTokenOperationType), "refreshPolicy": z.enum(["UseCached", "Refresh"]), "issuers": z.array(z.string()).optional() }).passthrough(), "Network.TrustTokenParams", "type"); -const Network_TrustTokenOperationType = withCdpMeta(z.enum(["Issuance", "Redemption", "Signing"]), "Network.TrustTokenOperationType", "type"); -const Network_AlternateProtocolUsage = withCdpMeta(z.enum(["alternativeJobWonWithoutRace", "alternativeJobWonRace", "mainJobWonRace", "mappingMissing", "broken", "dnsAlpnH3JobWonWithoutRace", "dnsAlpnH3JobWonRace", "unspecifiedReason"]), "Network.AlternateProtocolUsage", "type"); -const Network_ServiceWorkerRouterSource = withCdpMeta(z.enum(["network", "cache", "fetch-event", "race-network-and-fetch-handler", "race-network-and-cache"]), "Network.ServiceWorkerRouterSource", "type"); -const Network_ServiceWorkerRouterInfo = withCdpMeta(z.object({ "ruleIdMatched": z.number().int().optional(), "matchedSourceType": z.lazy(() => Network_ServiceWorkerRouterSource).optional(), "actualSourceType": z.lazy(() => Network_ServiceWorkerRouterSource).optional() }).passthrough(), "Network.ServiceWorkerRouterInfo", "type"); -const Network_Response = withCdpMeta(z.object({ "url": z.string(), "status": z.number().int(), "statusText": z.string(), "headers": z.lazy(() => Network_Headers), "headersText": z.string().optional(), "mimeType": z.string(), "charset": z.string(), "requestHeaders": z.lazy(() => Network_Headers).optional(), "requestHeadersText": z.string().optional(), "connectionReused": z.boolean(), "connectionId": z.number(), "remoteIPAddress": z.string().optional(), "remotePort": z.number().int().optional(), "fromDiskCache": z.boolean().optional(), "fromServiceWorker": z.boolean().optional(), "fromPrefetchCache": z.boolean().optional(), "fromEarlyHints": z.boolean().optional(), "serviceWorkerRouterInfo": z.lazy(() => Network_ServiceWorkerRouterInfo).optional(), "encodedDataLength": z.number(), "timing": z.lazy(() => Network_ResourceTiming).optional(), "serviceWorkerResponseSource": z.lazy(() => Network_ServiceWorkerResponseSource).optional(), "responseTime": z.lazy(() => Network_TimeSinceEpoch).optional(), "cacheStorageCacheName": z.string().optional(), "protocol": z.string().optional(), "alternateProtocolUsage": z.lazy(() => Network_AlternateProtocolUsage).optional(), "securityState": z.lazy(() => Security_SecurityState), "securityDetails": z.lazy(() => Network_SecurityDetails).optional() }).passthrough(), "Network.Response", "type"); -const Network_WebSocketRequest = withCdpMeta(z.object({ "headers": z.lazy(() => Network_Headers) }).passthrough(), "Network.WebSocketRequest", "type"); -const Network_WebSocketResponse = withCdpMeta(z.object({ "status": z.number().int(), "statusText": z.string(), "headers": z.lazy(() => Network_Headers), "headersText": z.string().optional(), "requestHeaders": z.lazy(() => Network_Headers).optional(), "requestHeadersText": z.string().optional() }).passthrough(), "Network.WebSocketResponse", "type"); -const Network_WebSocketFrame = withCdpMeta(z.object({ "opcode": z.number(), "mask": z.boolean(), "payloadData": z.string() }).passthrough(), "Network.WebSocketFrame", "type"); -const Network_CachedResource = withCdpMeta(z.object({ "url": z.string(), "type": z.lazy(() => Network_ResourceType), "response": z.lazy(() => Network_Response).optional(), "bodySize": z.number() }).passthrough(), "Network.CachedResource", "type"); -const Network_Initiator = withCdpMeta(z.object({ "type": z.enum(["parser", "script", "preload", "SignedExchange", "preflight", "FedCM", "other"]), "stack": z.lazy(() => Runtime_StackTrace).optional(), "url": z.string().optional(), "lineNumber": z.number().optional(), "columnNumber": z.number().optional(), "requestId": z.lazy(() => Network_RequestId).optional() }).passthrough(), "Network.Initiator", "type"); -const Network_CookiePartitionKey = withCdpMeta(z.object({ "topLevelSite": z.string(), "hasCrossSiteAncestor": z.boolean() }).passthrough(), "Network.CookiePartitionKey", "type"); -const Network_Cookie = withCdpMeta(z.object({ "name": z.string(), "value": z.string(), "domain": z.string(), "path": z.string(), "expires": z.number(), "size": z.number().int(), "httpOnly": z.boolean(), "secure": z.boolean(), "session": z.boolean(), "sameSite": z.lazy(() => Network_CookieSameSite).optional(), "priority": z.lazy(() => Network_CookiePriority), "sourceScheme": z.lazy(() => Network_CookieSourceScheme), "sourcePort": z.number().int(), "partitionKey": z.lazy(() => Network_CookiePartitionKey).optional(), "partitionKeyOpaque": z.boolean().optional() }).passthrough(), "Network.Cookie", "type"); -const Network_SetCookieBlockedReason = withCdpMeta(z.enum(["SecureOnly", "SameSiteStrict", "SameSiteLax", "SameSiteUnspecifiedTreatedAsLax", "SameSiteNoneInsecure", "UserPreferences", "ThirdPartyPhaseout", "ThirdPartyBlockedInFirstPartySet", "SyntaxError", "SchemeNotSupported", "OverwriteSecure", "InvalidDomain", "InvalidPrefix", "UnknownError", "SchemefulSameSiteStrict", "SchemefulSameSiteLax", "SchemefulSameSiteUnspecifiedTreatedAsLax", "NameValuePairExceedsMaxSize", "DisallowedCharacter", "NoCookieContent"]), "Network.SetCookieBlockedReason", "type"); -const Network_CookieBlockedReason = withCdpMeta(z.enum(["SecureOnly", "NotOnPath", "DomainMismatch", "SameSiteStrict", "SameSiteLax", "SameSiteUnspecifiedTreatedAsLax", "SameSiteNoneInsecure", "UserPreferences", "ThirdPartyPhaseout", "ThirdPartyBlockedInFirstPartySet", "UnknownError", "SchemefulSameSiteStrict", "SchemefulSameSiteLax", "SchemefulSameSiteUnspecifiedTreatedAsLax", "NameValuePairExceedsMaxSize", "PortMismatch", "SchemeMismatch", "AnonymousContext"]), "Network.CookieBlockedReason", "type"); -const Network_CookieExemptionReason = withCdpMeta(z.enum(["None", "UserSetting", "TPCDMetadata", "TPCDDeprecationTrial", "TopLevelTPCDDeprecationTrial", "TPCDHeuristics", "EnterprisePolicy", "StorageAccess", "TopLevelStorageAccess", "Scheme", "SameSiteNoneCookiesInSandbox"]), "Network.CookieExemptionReason", "type"); -const Network_BlockedSetCookieWithReason = withCdpMeta(z.object({ "blockedReasons": z.array(z.lazy(() => Network_SetCookieBlockedReason)), "cookieLine": z.string(), "cookie": z.lazy(() => Network_Cookie).optional() }).passthrough(), "Network.BlockedSetCookieWithReason", "type"); -const Network_ExemptedSetCookieWithReason = withCdpMeta(z.object({ "exemptionReason": z.lazy(() => Network_CookieExemptionReason), "cookieLine": z.string(), "cookie": z.lazy(() => Network_Cookie) }).passthrough(), "Network.ExemptedSetCookieWithReason", "type"); -const Network_AssociatedCookie = withCdpMeta(z.object({ "cookie": z.lazy(() => Network_Cookie), "blockedReasons": z.array(z.lazy(() => Network_CookieBlockedReason)), "exemptionReason": z.lazy(() => Network_CookieExemptionReason).optional() }).passthrough(), "Network.AssociatedCookie", "type"); -const Network_CookieParam = withCdpMeta(z.object({ "name": z.string(), "value": z.string(), "url": z.string().optional(), "domain": z.string().optional(), "path": z.string().optional(), "secure": z.boolean().optional(), "httpOnly": z.boolean().optional(), "sameSite": z.lazy(() => Network_CookieSameSite).optional(), "expires": z.lazy(() => Network_TimeSinceEpoch).optional(), "priority": z.lazy(() => Network_CookiePriority).optional(), "sourceScheme": z.lazy(() => Network_CookieSourceScheme).optional(), "sourcePort": z.number().int().optional(), "partitionKey": z.lazy(() => Network_CookiePartitionKey).optional() }).passthrough(), "Network.CookieParam", "type"); -const Network_AuthChallenge = withCdpMeta(z.object({ "source": z.enum(["Server", "Proxy"]).optional(), "origin": z.string(), "scheme": z.string(), "realm": z.string() }).passthrough(), "Network.AuthChallenge", "type"); -const Network_AuthChallengeResponse = withCdpMeta(z.object({ "response": z.enum(["Default", "CancelAuth", "ProvideCredentials"]), "username": z.string().optional(), "password": z.string().optional() }).passthrough(), "Network.AuthChallengeResponse", "type"); -const Network_InterceptionStage = withCdpMeta(z.enum(["Request", "HeadersReceived"]), "Network.InterceptionStage", "type"); -const Network_RequestPattern = withCdpMeta(z.object({ "urlPattern": z.string().optional(), "resourceType": z.lazy(() => Network_ResourceType).optional(), "interceptionStage": z.lazy(() => Network_InterceptionStage).optional() }).passthrough(), "Network.RequestPattern", "type"); -const Network_SignedExchangeSignature = withCdpMeta(z.object({ "label": z.string(), "signature": z.string(), "integrity": z.string(), "certUrl": z.string().optional(), "certSha256": z.string().optional(), "validityUrl": z.string(), "date": z.number().int(), "expires": z.number().int(), "certificates": z.array(z.string()).optional() }).passthrough(), "Network.SignedExchangeSignature", "type"); -const Network_SignedExchangeHeader = withCdpMeta(z.object({ "requestUrl": z.string(), "responseCode": z.number().int(), "responseHeaders": z.lazy(() => Network_Headers), "signatures": z.array(z.lazy(() => Network_SignedExchangeSignature)), "headerIntegrity": z.string() }).passthrough(), "Network.SignedExchangeHeader", "type"); -const Network_SignedExchangeErrorField = withCdpMeta(z.enum(["signatureSig", "signatureIntegrity", "signatureCertUrl", "signatureCertSha256", "signatureValidityUrl", "signatureTimestamps"]), "Network.SignedExchangeErrorField", "type"); -const Network_SignedExchangeError = withCdpMeta(z.object({ "message": z.string(), "signatureIndex": z.number().int().optional(), "errorField": z.lazy(() => Network_SignedExchangeErrorField).optional() }).passthrough(), "Network.SignedExchangeError", "type"); -const Network_SignedExchangeInfo = withCdpMeta(z.object({ "outerResponse": z.lazy(() => Network_Response), "hasExtraInfo": z.boolean(), "header": z.lazy(() => Network_SignedExchangeHeader).optional(), "securityDetails": z.lazy(() => Network_SecurityDetails).optional(), "errors": z.array(z.lazy(() => Network_SignedExchangeError)).optional() }).passthrough(), "Network.SignedExchangeInfo", "type"); -const Network_ContentEncoding = withCdpMeta(z.enum(["deflate", "gzip", "br", "zstd"]), "Network.ContentEncoding", "type"); -const Network_NetworkConditions = withCdpMeta(z.object({ "urlPattern": z.string(), "latency": z.number(), "downloadThroughput": z.number(), "uploadThroughput": z.number(), "connectionType": z.lazy(() => Network_ConnectionType).optional(), "packetLoss": z.number().optional(), "packetQueueLength": z.number().int().optional(), "packetReordering": z.boolean().optional(), "offline": z.boolean().optional() }).passthrough(), "Network.NetworkConditions", "type"); -const Network_BlockPattern = withCdpMeta(z.object({ "urlPattern": z.string(), "block": z.boolean() }).passthrough(), "Network.BlockPattern", "type"); -const Network_DirectSocketDnsQueryType = withCdpMeta(z.enum(["ipv4", "ipv6"]), "Network.DirectSocketDnsQueryType", "type"); -const Network_DirectTCPSocketOptions = withCdpMeta(z.object({ "noDelay": z.boolean(), "keepAliveDelay": z.number().optional(), "sendBufferSize": z.number().optional(), "receiveBufferSize": z.number().optional(), "dnsQueryType": z.lazy(() => Network_DirectSocketDnsQueryType).optional() }).passthrough(), "Network.DirectTCPSocketOptions", "type"); -const Network_DirectUDPSocketOptions = withCdpMeta(z.object({ "remoteAddr": z.string().optional(), "remotePort": z.number().int().optional(), "localAddr": z.string().optional(), "localPort": z.number().int().optional(), "dnsQueryType": z.lazy(() => Network_DirectSocketDnsQueryType).optional(), "sendBufferSize": z.number().optional(), "receiveBufferSize": z.number().optional(), "multicastLoopback": z.boolean().optional(), "multicastTimeToLive": z.number().int().optional(), "multicastAllowAddressSharing": z.boolean().optional() }).passthrough(), "Network.DirectUDPSocketOptions", "type"); -const Network_DirectUDPMessage = withCdpMeta(z.object({ "data": z.string(), "remoteAddr": z.string().optional(), "remotePort": z.number().int().optional() }).passthrough(), "Network.DirectUDPMessage", "type"); -const Network_LocalNetworkAccessRequestPolicy = withCdpMeta(z.enum(["Allow", "BlockFromInsecureToMorePrivate", "WarnFromInsecureToMorePrivate", "PermissionBlock", "PermissionWarn"]), "Network.LocalNetworkAccessRequestPolicy", "type"); -const Network_IPAddressSpace = withCdpMeta(z.enum(["Loopback", "Local", "Public", "Unknown"]), "Network.IPAddressSpace", "type"); -const Network_ConnectTiming = withCdpMeta(z.object({ "requestTime": z.number() }).passthrough(), "Network.ConnectTiming", "type"); -const Network_ClientSecurityState = withCdpMeta(z.object({ "initiatorIsSecureContext": z.boolean(), "initiatorIPAddressSpace": z.lazy(() => Network_IPAddressSpace), "localNetworkAccessRequestPolicy": z.lazy(() => Network_LocalNetworkAccessRequestPolicy) }).passthrough(), "Network.ClientSecurityState", "type"); -const Network_AdScriptIdentifier = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "debuggerId": z.lazy(() => Runtime_UniqueDebuggerId), "name": z.string() }).passthrough(), "Network.AdScriptIdentifier", "type"); -const Network_AdAncestry = withCdpMeta(z.object({ "ancestryChain": z.array(z.lazy(() => Network_AdScriptIdentifier)), "rootScriptFilterlistRule": z.string().optional() }).passthrough(), "Network.AdAncestry", "type"); -const Network_AdProvenance = withCdpMeta(z.object({ "filterlistRule": z.string().optional(), "adScriptAncestry": z.lazy(() => Network_AdAncestry).optional() }).passthrough(), "Network.AdProvenance", "type"); -const Network_CrossOriginOpenerPolicyValue = withCdpMeta(z.enum(["SameOrigin", "SameOriginAllowPopups", "RestrictProperties", "UnsafeNone", "SameOriginPlusCoep", "RestrictPropertiesPlusCoep", "NoopenerAllowPopups"]), "Network.CrossOriginOpenerPolicyValue", "type"); -const Network_CrossOriginOpenerPolicyStatus = withCdpMeta(z.object({ "value": z.lazy(() => Network_CrossOriginOpenerPolicyValue), "reportOnlyValue": z.lazy(() => Network_CrossOriginOpenerPolicyValue), "reportingEndpoint": z.string().optional(), "reportOnlyReportingEndpoint": z.string().optional() }).passthrough(), "Network.CrossOriginOpenerPolicyStatus", "type"); -const Network_CrossOriginEmbedderPolicyValue = withCdpMeta(z.enum(["None", "Credentialless", "RequireCorp"]), "Network.CrossOriginEmbedderPolicyValue", "type"); -const Network_CrossOriginEmbedderPolicyStatus = withCdpMeta(z.object({ "value": z.lazy(() => Network_CrossOriginEmbedderPolicyValue), "reportOnlyValue": z.lazy(() => Network_CrossOriginEmbedderPolicyValue), "reportingEndpoint": z.string().optional(), "reportOnlyReportingEndpoint": z.string().optional() }).passthrough(), "Network.CrossOriginEmbedderPolicyStatus", "type"); -const Network_ContentSecurityPolicySource = withCdpMeta(z.enum(["HTTP", "Meta"]), "Network.ContentSecurityPolicySource", "type"); -const Network_ContentSecurityPolicyStatus = withCdpMeta(z.object({ "effectiveDirectives": z.string(), "isEnforced": z.boolean(), "source": z.lazy(() => Network_ContentSecurityPolicySource) }).passthrough(), "Network.ContentSecurityPolicyStatus", "type"); -const Network_SecurityIsolationStatus = withCdpMeta(z.object({ "coop": z.lazy(() => Network_CrossOriginOpenerPolicyStatus).optional(), "coep": z.lazy(() => Network_CrossOriginEmbedderPolicyStatus).optional(), "csp": z.array(z.lazy(() => Network_ContentSecurityPolicyStatus)).optional() }).passthrough(), "Network.SecurityIsolationStatus", "type"); -const Network_ReportStatus = withCdpMeta(z.enum(["Queued", "Pending", "MarkedForRemoval", "Success"]), "Network.ReportStatus", "type"); -const Network_ReportId = withCdpMeta(z.string(), "Network.ReportId", "type"); -const Network_ReportingApiReport = withCdpMeta(z.object({ "id": z.lazy(() => Network_ReportId), "initiatorUrl": z.string(), "destination": z.string(), "type": z.string(), "timestamp": z.lazy(() => Network_TimeSinceEpoch), "depth": z.number().int(), "completedAttempts": z.number().int(), "body": z.record(z.string(), z.unknown()), "status": z.lazy(() => Network_ReportStatus) }).passthrough(), "Network.ReportingApiReport", "type"); -const Network_ReportingApiEndpoint = withCdpMeta(z.object({ "url": z.string(), "groupName": z.string() }).passthrough(), "Network.ReportingApiEndpoint", "type"); -const Network_DeviceBoundSessionKey = withCdpMeta(z.object({ "site": z.string(), "id": z.string() }).passthrough(), "Network.DeviceBoundSessionKey", "type"); -const Network_DeviceBoundSessionWithUsage = withCdpMeta(z.object({ "sessionKey": z.lazy(() => Network_DeviceBoundSessionKey), "usage": z.enum(["NotInScope", "InScopeRefreshNotYetNeeded", "InScopeRefreshNotAllowed", "ProactiveRefreshNotPossible", "ProactiveRefreshAttempted", "Deferred"]) }).passthrough(), "Network.DeviceBoundSessionWithUsage", "type"); -const Network_DeviceBoundSessionCookieCraving = withCdpMeta(z.object({ "name": z.string(), "domain": z.string(), "path": z.string(), "secure": z.boolean(), "httpOnly": z.boolean(), "sameSite": z.lazy(() => Network_CookieSameSite).optional() }).passthrough(), "Network.DeviceBoundSessionCookieCraving", "type"); -const Network_DeviceBoundSessionUrlRule = withCdpMeta(z.object({ "ruleType": z.enum(["Exclude", "Include"]), "hostPattern": z.string(), "pathPrefix": z.string() }).passthrough(), "Network.DeviceBoundSessionUrlRule", "type"); -const Network_DeviceBoundSessionInclusionRules = withCdpMeta(z.object({ "origin": z.string(), "includeSite": z.boolean(), "urlRules": z.array(z.lazy(() => Network_DeviceBoundSessionUrlRule)) }).passthrough(), "Network.DeviceBoundSessionInclusionRules", "type"); -const Network_DeviceBoundSession = withCdpMeta(z.object({ "key": z.lazy(() => Network_DeviceBoundSessionKey), "refreshUrl": z.string(), "inclusionRules": z.lazy(() => Network_DeviceBoundSessionInclusionRules), "cookieCravings": z.array(z.lazy(() => Network_DeviceBoundSessionCookieCraving)), "expiryDate": z.lazy(() => Network_TimeSinceEpoch), "cachedChallenge": z.string().optional(), "allowedRefreshInitiators": z.array(z.string()) }).passthrough(), "Network.DeviceBoundSession", "type"); -const Network_DeviceBoundSessionEventId = withCdpMeta(z.string(), "Network.DeviceBoundSessionEventId", "type"); -const Network_DeviceBoundSessionFetchResult = withCdpMeta(z.enum(["Success", "KeyError", "SigningError", "ServerRequestedTermination", "InvalidSessionId", "InvalidChallenge", "TooManyChallenges", "InvalidFetcherUrl", "InvalidRefreshUrl", "TransientHttpError", "ScopeOriginSameSiteMismatch", "RefreshUrlSameSiteMismatch", "MismatchedSessionId", "MissingScope", "NoCredentials", "SubdomainRegistrationWellKnownUnavailable", "SubdomainRegistrationUnauthorized", "SubdomainRegistrationWellKnownMalformed", "SessionProviderWellKnownUnavailable", "RelyingPartyWellKnownUnavailable", "FederatedKeyThumbprintMismatch", "InvalidFederatedSessionUrl", "InvalidFederatedKey", "TooManyRelyingOriginLabels", "BoundCookieSetForbidden", "NetError", "ProxyError", "EmptySessionConfig", "InvalidCredentialsConfig", "InvalidCredentialsType", "InvalidCredentialsEmptyName", "InvalidCredentialsCookie", "PersistentHttpError", "RegistrationAttemptedChallenge", "InvalidScopeOrigin", "ScopeOriginContainsPath", "RefreshInitiatorNotString", "RefreshInitiatorInvalidHostPattern", "InvalidScopeSpecification", "MissingScopeSpecificationType", "EmptyScopeSpecificationDomain", "EmptyScopeSpecificationPath", "InvalidScopeSpecificationType", "InvalidScopeIncludeSite", "MissingScopeIncludeSite", "FederatedNotAuthorizedByProvider", "FederatedNotAuthorizedByRelyingParty", "SessionProviderWellKnownMalformed", "SessionProviderWellKnownHasProviderOrigin", "RelyingPartyWellKnownMalformed", "RelyingPartyWellKnownHasRelyingOrigins", "InvalidFederatedSessionProviderSessionMissing", "InvalidFederatedSessionWrongProviderOrigin", "InvalidCredentialsCookieCreationTime", "InvalidCredentialsCookieName", "InvalidCredentialsCookieParsing", "InvalidCredentialsCookieUnpermittedAttribute", "InvalidCredentialsCookieInvalidDomain", "InvalidCredentialsCookiePrefix", "InvalidScopeRulePath", "InvalidScopeRuleHostPattern", "ScopeRuleOriginScopedHostPatternMismatch", "ScopeRuleSiteScopedHostPatternMismatch", "SigningQuotaExceeded", "InvalidConfigJson", "InvalidFederatedSessionProviderFailedToRestoreKey", "FailedToUnwrapKey", "SessionDeletedDuringRefresh"]), "Network.DeviceBoundSessionFetchResult", "type"); -const Network_DeviceBoundSessionFailedRequest = withCdpMeta(z.object({ "requestUrl": z.string(), "netError": z.string().optional(), "responseError": z.number().int().optional(), "responseErrorBody": z.string().optional() }).passthrough(), "Network.DeviceBoundSessionFailedRequest", "type"); -const Network_CreationEventDetails = withCdpMeta(z.object({ "fetchResult": z.lazy(() => Network_DeviceBoundSessionFetchResult), "newSession": z.lazy(() => Network_DeviceBoundSession).optional(), "failedRequest": z.lazy(() => Network_DeviceBoundSessionFailedRequest).optional() }).passthrough(), "Network.CreationEventDetails", "type"); -const Network_RefreshEventDetails = withCdpMeta(z.object({ "refreshResult": z.enum(["Refreshed", "RefreshedAsWaiter", "InitializedService", "Unreachable", "ServerError", "RefreshQuotaExceeded", "FatalError", "SigningQuotaExceeded"]), "fetchResult": z.lazy(() => Network_DeviceBoundSessionFetchResult).optional(), "newSession": z.lazy(() => Network_DeviceBoundSession).optional(), "wasFullyProactiveRefresh": z.boolean(), "failedRequest": z.lazy(() => Network_DeviceBoundSessionFailedRequest).optional() }).passthrough(), "Network.RefreshEventDetails", "type"); -const Network_TerminationEventDetails = withCdpMeta(z.object({ "deletionReason": z.enum(["Expired", "FailedToRestoreKey", "FailedToUnwrapKey", "StoragePartitionCleared", "ClearBrowsingData", "ServerRequested", "InvalidSessionParams", "RefreshFatalError", "DevTools"]) }).passthrough(), "Network.TerminationEventDetails", "type"); -const Network_ChallengeEventDetails = withCdpMeta(z.object({ "challengeResult": z.enum(["Success", "NoSessionId", "NoSessionMatch", "CantSetBoundCookie"]), "challenge": z.string() }).passthrough(), "Network.ChallengeEventDetails", "type"); -const Network_LoadNetworkResourcePageResult = withCdpMeta(z.object({ "success": z.boolean(), "netError": z.number().optional(), "netErrorName": z.string().optional(), "httpStatusCode": z.number().optional(), "stream": z.lazy(() => IO_StreamHandle).optional(), "headers": z.lazy(() => Network_Headers).optional() }).passthrough(), "Network.LoadNetworkResourcePageResult", "type"); -const Network_LoadNetworkResourceOptions = withCdpMeta(z.object({ "disableCache": z.boolean(), "includeCredentials": z.boolean() }).passthrough(), "Network.LoadNetworkResourceOptions", "type"); -const Network_SetAcceptedEncodingsParams = withCdpMeta(z.object({ "encodings": z.array(z.lazy(() => Network_ContentEncoding)) }).passthrough(), "Network.setAcceptedEncodings.params", "commandParams", { method: "Network.setAcceptedEncodings" }); -const Network_SetAcceptedEncodingsResult = withCdpMeta(z.object({ }).passthrough(), "Network.setAcceptedEncodings.result", "commandResult", { method: "Network.setAcceptedEncodings" }); -const Network_ClearAcceptedEncodingsOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Network.clearAcceptedEncodingsOverride.params", "commandParams", { method: "Network.clearAcceptedEncodingsOverride" }); -const Network_ClearAcceptedEncodingsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Network.clearAcceptedEncodingsOverride.result", "commandResult", { method: "Network.clearAcceptedEncodingsOverride" }); -const Network_CanClearBrowserCacheParams = withCdpMeta(z.object({ }).passthrough(), "Network.canClearBrowserCache.params", "commandParams", { method: "Network.canClearBrowserCache" }); -const Network_CanClearBrowserCacheResult = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Network.canClearBrowserCache.result", "commandResult", { method: "Network.canClearBrowserCache" }); -const Network_CanClearBrowserCookiesParams = withCdpMeta(z.object({ }).passthrough(), "Network.canClearBrowserCookies.params", "commandParams", { method: "Network.canClearBrowserCookies" }); -const Network_CanClearBrowserCookiesResult = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Network.canClearBrowserCookies.result", "commandResult", { method: "Network.canClearBrowserCookies" }); -const Network_CanEmulateNetworkConditionsParams = withCdpMeta(z.object({ }).passthrough(), "Network.canEmulateNetworkConditions.params", "commandParams", { method: "Network.canEmulateNetworkConditions" }); -const Network_CanEmulateNetworkConditionsResult = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Network.canEmulateNetworkConditions.result", "commandResult", { method: "Network.canEmulateNetworkConditions" }); -const Network_ClearBrowserCacheParams = withCdpMeta(z.object({ }).passthrough(), "Network.clearBrowserCache.params", "commandParams", { method: "Network.clearBrowserCache" }); -const Network_ClearBrowserCacheResult = withCdpMeta(z.object({ }).passthrough(), "Network.clearBrowserCache.result", "commandResult", { method: "Network.clearBrowserCache" }); -const Network_ClearBrowserCookiesParams = withCdpMeta(z.object({ }).passthrough(), "Network.clearBrowserCookies.params", "commandParams", { method: "Network.clearBrowserCookies" }); -const Network_ClearBrowserCookiesResult = withCdpMeta(z.object({ }).passthrough(), "Network.clearBrowserCookies.result", "commandResult", { method: "Network.clearBrowserCookies" }); -const Network_ContinueInterceptedRequestParams = withCdpMeta(z.object({ "interceptionId": z.lazy(() => Network_InterceptionId), "errorReason": z.lazy(() => Network_ErrorReason).optional(), "rawResponse": z.string().optional(), "url": z.string().optional(), "method": z.string().optional(), "postData": z.string().optional(), "headers": z.lazy(() => Network_Headers).optional(), "authChallengeResponse": z.lazy(() => Network_AuthChallengeResponse).optional() }).passthrough(), "Network.continueInterceptedRequest.params", "commandParams", { method: "Network.continueInterceptedRequest" }); -const Network_ContinueInterceptedRequestResult = withCdpMeta(z.object({ }).passthrough(), "Network.continueInterceptedRequest.result", "commandResult", { method: "Network.continueInterceptedRequest" }); -const Network_DeleteCookiesParams = withCdpMeta(z.object({ "name": z.string(), "url": z.string().optional(), "domain": z.string().optional(), "path": z.string().optional(), "partitionKey": z.lazy(() => Network_CookiePartitionKey).optional() }).passthrough(), "Network.deleteCookies.params", "commandParams", { method: "Network.deleteCookies" }); -const Network_DeleteCookiesResult = withCdpMeta(z.object({ }).passthrough(), "Network.deleteCookies.result", "commandResult", { method: "Network.deleteCookies" }); -const Network_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Network.disable.params", "commandParams", { method: "Network.disable" }); -const Network_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Network.disable.result", "commandResult", { method: "Network.disable" }); -const Network_EmulateNetworkConditionsParams = withCdpMeta(z.object({ "offline": z.boolean(), "latency": z.number(), "downloadThroughput": z.number(), "uploadThroughput": z.number(), "connectionType": z.lazy(() => Network_ConnectionType).optional(), "packetLoss": z.number().optional(), "packetQueueLength": z.number().int().optional(), "packetReordering": z.boolean().optional() }).passthrough(), "Network.emulateNetworkConditions.params", "commandParams", { method: "Network.emulateNetworkConditions" }); -const Network_EmulateNetworkConditionsResult = withCdpMeta(z.object({ }).passthrough(), "Network.emulateNetworkConditions.result", "commandResult", { method: "Network.emulateNetworkConditions" }); -const Network_EmulateNetworkConditionsByRuleParams = withCdpMeta(z.object({ "offline": z.boolean().optional(), "emulateOfflineServiceWorker": z.boolean().optional(), "matchedNetworkConditions": z.array(z.lazy(() => Network_NetworkConditions)) }).passthrough(), "Network.emulateNetworkConditionsByRule.params", "commandParams", { method: "Network.emulateNetworkConditionsByRule" }); -const Network_EmulateNetworkConditionsByRuleResult = withCdpMeta(z.object({ "ruleIds": z.array(z.string()) }).passthrough(), "Network.emulateNetworkConditionsByRule.result", "commandResult", { method: "Network.emulateNetworkConditionsByRule" }); -const Network_OverrideNetworkStateParams = withCdpMeta(z.object({ "offline": z.boolean(), "latency": z.number(), "downloadThroughput": z.number(), "uploadThroughput": z.number(), "connectionType": z.lazy(() => Network_ConnectionType).optional() }).passthrough(), "Network.overrideNetworkState.params", "commandParams", { method: "Network.overrideNetworkState" }); -const Network_OverrideNetworkStateResult = withCdpMeta(z.object({ }).passthrough(), "Network.overrideNetworkState.result", "commandResult", { method: "Network.overrideNetworkState" }); -const Network_EnableParams = withCdpMeta(z.object({ "maxTotalBufferSize": z.number().int().optional(), "maxResourceBufferSize": z.number().int().optional(), "maxPostDataSize": z.number().int().optional(), "reportDirectSocketTraffic": z.boolean().optional(), "enableDurableMessages": z.boolean().optional() }).passthrough(), "Network.enable.params", "commandParams", { method: "Network.enable" }); -const Network_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Network.enable.result", "commandResult", { method: "Network.enable" }); -const Network_ConfigureDurableMessagesParams = withCdpMeta(z.object({ "maxTotalBufferSize": z.number().int().optional(), "maxResourceBufferSize": z.number().int().optional() }).passthrough(), "Network.configureDurableMessages.params", "commandParams", { method: "Network.configureDurableMessages" }); -const Network_ConfigureDurableMessagesResult = withCdpMeta(z.object({ }).passthrough(), "Network.configureDurableMessages.result", "commandResult", { method: "Network.configureDurableMessages" }); -const Network_GetAllCookiesParams = withCdpMeta(z.object({ }).passthrough(), "Network.getAllCookies.params", "commandParams", { method: "Network.getAllCookies" }); -const Network_GetAllCookiesResult = withCdpMeta(z.object({ "cookies": z.array(z.lazy(() => Network_Cookie)) }).passthrough(), "Network.getAllCookies.result", "commandResult", { method: "Network.getAllCookies" }); -const Network_GetCertificateParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Network.getCertificate.params", "commandParams", { method: "Network.getCertificate" }); -const Network_GetCertificateResult = withCdpMeta(z.object({ "tableNames": z.array(z.string()) }).passthrough(), "Network.getCertificate.result", "commandResult", { method: "Network.getCertificate" }); -const Network_GetCookiesParams = withCdpMeta(z.object({ "urls": z.array(z.string()).optional() }).passthrough(), "Network.getCookies.params", "commandParams", { method: "Network.getCookies" }); -const Network_GetCookiesResult = withCdpMeta(z.object({ "cookies": z.array(z.lazy(() => Network_Cookie)) }).passthrough(), "Network.getCookies.result", "commandResult", { method: "Network.getCookies" }); -const Network_GetResponseBodyParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId) }).passthrough(), "Network.getResponseBody.params", "commandParams", { method: "Network.getResponseBody" }); -const Network_GetResponseBodyResult = withCdpMeta(z.object({ "body": z.string(), "base64Encoded": z.boolean() }).passthrough(), "Network.getResponseBody.result", "commandResult", { method: "Network.getResponseBody" }); -const Network_GetRequestPostDataParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId) }).passthrough(), "Network.getRequestPostData.params", "commandParams", { method: "Network.getRequestPostData" }); -const Network_GetRequestPostDataResult = withCdpMeta(z.object({ "postData": z.string(), "base64Encoded": z.boolean() }).passthrough(), "Network.getRequestPostData.result", "commandResult", { method: "Network.getRequestPostData" }); -const Network_GetResponseBodyForInterceptionParams = withCdpMeta(z.object({ "interceptionId": z.lazy(() => Network_InterceptionId) }).passthrough(), "Network.getResponseBodyForInterception.params", "commandParams", { method: "Network.getResponseBodyForInterception" }); -const Network_GetResponseBodyForInterceptionResult = withCdpMeta(z.object({ "body": z.string(), "base64Encoded": z.boolean() }).passthrough(), "Network.getResponseBodyForInterception.result", "commandResult", { method: "Network.getResponseBodyForInterception" }); -const Network_TakeResponseBodyForInterceptionAsStreamParams = withCdpMeta(z.object({ "interceptionId": z.lazy(() => Network_InterceptionId) }).passthrough(), "Network.takeResponseBodyForInterceptionAsStream.params", "commandParams", { method: "Network.takeResponseBodyForInterceptionAsStream" }); -const Network_TakeResponseBodyForInterceptionAsStreamResult = withCdpMeta(z.object({ "stream": z.lazy(() => IO_StreamHandle) }).passthrough(), "Network.takeResponseBodyForInterceptionAsStream.result", "commandResult", { method: "Network.takeResponseBodyForInterceptionAsStream" }); -const Network_ReplayXHRParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId) }).passthrough(), "Network.replayXHR.params", "commandParams", { method: "Network.replayXHR" }); -const Network_ReplayXHRResult = withCdpMeta(z.object({ }).passthrough(), "Network.replayXHR.result", "commandResult", { method: "Network.replayXHR" }); -const Network_SearchInResponseBodyParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "query": z.string(), "caseSensitive": z.boolean().optional(), "isRegex": z.boolean().optional() }).passthrough(), "Network.searchInResponseBody.params", "commandParams", { method: "Network.searchInResponseBody" }); -const Network_SearchInResponseBodyResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => Debugger_SearchMatch)) }).passthrough(), "Network.searchInResponseBody.result", "commandResult", { method: "Network.searchInResponseBody" }); -const Network_SetBlockedURLsParams = withCdpMeta(z.object({ "urlPatterns": z.array(z.lazy(() => Network_BlockPattern)).optional(), "urls": z.array(z.string()).optional() }).passthrough(), "Network.setBlockedURLs.params", "commandParams", { method: "Network.setBlockedURLs" }); -const Network_SetBlockedURLsResult = withCdpMeta(z.object({ }).passthrough(), "Network.setBlockedURLs.result", "commandResult", { method: "Network.setBlockedURLs" }); -const Network_SetBypassServiceWorkerParams = withCdpMeta(z.object({ "bypass": z.boolean() }).passthrough(), "Network.setBypassServiceWorker.params", "commandParams", { method: "Network.setBypassServiceWorker" }); -const Network_SetBypassServiceWorkerResult = withCdpMeta(z.object({ }).passthrough(), "Network.setBypassServiceWorker.result", "commandResult", { method: "Network.setBypassServiceWorker" }); -const Network_SetCacheDisabledParams = withCdpMeta(z.object({ "cacheDisabled": z.boolean() }).passthrough(), "Network.setCacheDisabled.params", "commandParams", { method: "Network.setCacheDisabled" }); -const Network_SetCacheDisabledResult = withCdpMeta(z.object({ }).passthrough(), "Network.setCacheDisabled.result", "commandResult", { method: "Network.setCacheDisabled" }); -const Network_SetCookieParams = withCdpMeta(z.object({ "name": z.string(), "value": z.string(), "url": z.string().optional(), "domain": z.string().optional(), "path": z.string().optional(), "secure": z.boolean().optional(), "httpOnly": z.boolean().optional(), "sameSite": z.lazy(() => Network_CookieSameSite).optional(), "expires": z.lazy(() => Network_TimeSinceEpoch).optional(), "priority": z.lazy(() => Network_CookiePriority).optional(), "sourceScheme": z.lazy(() => Network_CookieSourceScheme).optional(), "sourcePort": z.number().int().optional(), "partitionKey": z.lazy(() => Network_CookiePartitionKey).optional() }).passthrough(), "Network.setCookie.params", "commandParams", { method: "Network.setCookie" }); -const Network_SetCookieResult = withCdpMeta(z.object({ "success": z.boolean() }).passthrough(), "Network.setCookie.result", "commandResult", { method: "Network.setCookie" }); -const Network_SetCookiesParams = withCdpMeta(z.object({ "cookies": z.array(z.lazy(() => Network_CookieParam)) }).passthrough(), "Network.setCookies.params", "commandParams", { method: "Network.setCookies" }); -const Network_SetCookiesResult = withCdpMeta(z.object({ }).passthrough(), "Network.setCookies.result", "commandResult", { method: "Network.setCookies" }); -const Network_SetExtraHTTPHeadersParams = withCdpMeta(z.object({ "headers": z.lazy(() => Network_Headers) }).passthrough(), "Network.setExtraHTTPHeaders.params", "commandParams", { method: "Network.setExtraHTTPHeaders" }); -const Network_SetExtraHTTPHeadersResult = withCdpMeta(z.object({ }).passthrough(), "Network.setExtraHTTPHeaders.result", "commandResult", { method: "Network.setExtraHTTPHeaders" }); -const Network_SetAttachDebugStackParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Network.setAttachDebugStack.params", "commandParams", { method: "Network.setAttachDebugStack" }); -const Network_SetAttachDebugStackResult = withCdpMeta(z.object({ }).passthrough(), "Network.setAttachDebugStack.result", "commandResult", { method: "Network.setAttachDebugStack" }); -const Network_SetRequestInterceptionParams = withCdpMeta(z.object({ "patterns": z.array(z.lazy(() => Network_RequestPattern)) }).passthrough(), "Network.setRequestInterception.params", "commandParams", { method: "Network.setRequestInterception" }); -const Network_SetRequestInterceptionResult = withCdpMeta(z.object({ }).passthrough(), "Network.setRequestInterception.result", "commandResult", { method: "Network.setRequestInterception" }); -const Network_SetUserAgentOverrideParams = withCdpMeta(z.object({ "userAgent": z.string(), "acceptLanguage": z.string().optional(), "platform": z.string().optional(), "userAgentMetadata": z.lazy(() => Emulation_UserAgentMetadata).optional() }).passthrough(), "Network.setUserAgentOverride.params", "commandParams", { method: "Network.setUserAgentOverride" }); -const Network_SetUserAgentOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Network.setUserAgentOverride.result", "commandResult", { method: "Network.setUserAgentOverride" }); -const Network_StreamResourceContentParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId) }).passthrough(), "Network.streamResourceContent.params", "commandParams", { method: "Network.streamResourceContent" }); -const Network_StreamResourceContentResult = withCdpMeta(z.object({ "bufferedData": z.string() }).passthrough(), "Network.streamResourceContent.result", "commandResult", { method: "Network.streamResourceContent" }); -const Network_GetSecurityIsolationStatusParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId).optional() }).passthrough(), "Network.getSecurityIsolationStatus.params", "commandParams", { method: "Network.getSecurityIsolationStatus" }); -const Network_GetSecurityIsolationStatusResult = withCdpMeta(z.object({ "status": z.lazy(() => Network_SecurityIsolationStatus) }).passthrough(), "Network.getSecurityIsolationStatus.result", "commandResult", { method: "Network.getSecurityIsolationStatus" }); -const Network_EnableReportingApiParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "Network.enableReportingApi.params", "commandParams", { method: "Network.enableReportingApi" }); -const Network_EnableReportingApiResult = withCdpMeta(z.object({ }).passthrough(), "Network.enableReportingApi.result", "commandResult", { method: "Network.enableReportingApi" }); -const Network_EnableDeviceBoundSessionsParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "Network.enableDeviceBoundSessions.params", "commandParams", { method: "Network.enableDeviceBoundSessions" }); -const Network_EnableDeviceBoundSessionsResult = withCdpMeta(z.object({ }).passthrough(), "Network.enableDeviceBoundSessions.result", "commandResult", { method: "Network.enableDeviceBoundSessions" }); -const Network_DeleteDeviceBoundSessionParams = withCdpMeta(z.object({ "key": z.lazy(() => Network_DeviceBoundSessionKey) }).passthrough(), "Network.deleteDeviceBoundSession.params", "commandParams", { method: "Network.deleteDeviceBoundSession" }); -const Network_DeleteDeviceBoundSessionResult = withCdpMeta(z.object({ }).passthrough(), "Network.deleteDeviceBoundSession.result", "commandResult", { method: "Network.deleteDeviceBoundSession" }); -const Network_FetchSchemefulSiteParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Network.fetchSchemefulSite.params", "commandParams", { method: "Network.fetchSchemefulSite" }); -const Network_FetchSchemefulSiteResult = withCdpMeta(z.object({ "schemefulSite": z.string() }).passthrough(), "Network.fetchSchemefulSite.result", "commandResult", { method: "Network.fetchSchemefulSite" }); -const Network_LoadNetworkResourceParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId).optional(), "url": z.string(), "options": z.lazy(() => Network_LoadNetworkResourceOptions) }).passthrough(), "Network.loadNetworkResource.params", "commandParams", { method: "Network.loadNetworkResource" }); -const Network_LoadNetworkResourceResult = withCdpMeta(z.object({ "resource": z.lazy(() => Network_LoadNetworkResourcePageResult) }).passthrough(), "Network.loadNetworkResource.result", "commandResult", { method: "Network.loadNetworkResource" }); -const Network_SetCookieControlsParams = withCdpMeta(z.object({ "enableThirdPartyCookieRestriction": z.boolean() }).passthrough(), "Network.setCookieControls.params", "commandParams", { method: "Network.setCookieControls" }); -const Network_SetCookieControlsResult = withCdpMeta(z.object({ }).passthrough(), "Network.setCookieControls.result", "commandResult", { method: "Network.setCookieControls" }); -const Network_DataReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime), "dataLength": z.number().int(), "encodedDataLength": z.number().int(), "data": z.string().optional() }).passthrough(), "Network.dataReceived", "event", { phase: "event" }); -const Network_EventSourceMessageReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime), "eventName": z.string(), "eventId": z.string(), "data": z.string() }).passthrough(), "Network.eventSourceMessageReceived", "event", { phase: "event" }); -const Network_LoadingFailedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime), "type": z.lazy(() => Network_ResourceType), "errorText": z.string(), "canceled": z.boolean().optional(), "blockedReason": z.lazy(() => Network_BlockedReason).optional(), "corsErrorStatus": z.lazy(() => Network_CorsErrorStatus).optional() }).passthrough(), "Network.loadingFailed", "event", { phase: "event" }); -const Network_LoadingFinishedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime), "encodedDataLength": z.number() }).passthrough(), "Network.loadingFinished", "event", { phase: "event" }); -const Network_RequestInterceptedEvent = withCdpMeta(z.object({ "interceptionId": z.lazy(() => Network_InterceptionId), "request": z.lazy(() => Network_Request), "frameId": z.lazy(() => Page_FrameId), "resourceType": z.lazy(() => Network_ResourceType), "isNavigationRequest": z.boolean(), "isDownload": z.boolean().optional(), "redirectUrl": z.string().optional(), "authChallenge": z.lazy(() => Network_AuthChallenge).optional(), "responseErrorReason": z.lazy(() => Network_ErrorReason).optional(), "responseStatusCode": z.number().int().optional(), "responseHeaders": z.lazy(() => Network_Headers).optional(), "requestId": z.lazy(() => Network_RequestId).optional() }).passthrough(), "Network.requestIntercepted", "event", { phase: "event" }); -const Network_RequestServedFromCacheEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId) }).passthrough(), "Network.requestServedFromCache", "event", { phase: "event" }); -const Network_RequestWillBeSentEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "loaderId": z.lazy(() => Network_LoaderId), "documentURL": z.string(), "request": z.lazy(() => Network_Request), "timestamp": z.lazy(() => Network_MonotonicTime), "wallTime": z.lazy(() => Network_TimeSinceEpoch), "initiator": z.lazy(() => Network_Initiator), "redirectHasExtraInfo": z.boolean(), "redirectResponse": z.lazy(() => Network_Response).optional(), "type": z.lazy(() => Network_ResourceType).optional(), "frameId": z.lazy(() => Page_FrameId).optional(), "hasUserGesture": z.boolean().optional(), "renderBlockingBehavior": z.lazy(() => Network_RenderBlockingBehavior).optional() }).passthrough(), "Network.requestWillBeSent", "event", { phase: "event" }); -const Network_ResourceChangedPriorityEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "newPriority": z.lazy(() => Network_ResourcePriority), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.resourceChangedPriority", "event", { phase: "event" }); -const Network_SignedExchangeReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "info": z.lazy(() => Network_SignedExchangeInfo) }).passthrough(), "Network.signedExchangeReceived", "event", { phase: "event" }); -const Network_ResponseReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "loaderId": z.lazy(() => Network_LoaderId), "timestamp": z.lazy(() => Network_MonotonicTime), "type": z.lazy(() => Network_ResourceType), "response": z.lazy(() => Network_Response), "hasExtraInfo": z.boolean(), "frameId": z.lazy(() => Page_FrameId).optional() }).passthrough(), "Network.responseReceived", "event", { phase: "event" }); -const Network_WebSocketClosedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.webSocketClosed", "event", { phase: "event" }); -const Network_WebSocketCreatedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "url": z.string(), "initiator": z.lazy(() => Network_Initiator).optional() }).passthrough(), "Network.webSocketCreated", "event", { phase: "event" }); -const Network_WebSocketFrameErrorEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime), "errorMessage": z.string() }).passthrough(), "Network.webSocketFrameError", "event", { phase: "event" }); -const Network_WebSocketFrameReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime), "response": z.lazy(() => Network_WebSocketFrame) }).passthrough(), "Network.webSocketFrameReceived", "event", { phase: "event" }); -const Network_WebSocketFrameSentEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime), "response": z.lazy(() => Network_WebSocketFrame) }).passthrough(), "Network.webSocketFrameSent", "event", { phase: "event" }); -const Network_WebSocketHandshakeResponseReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime), "response": z.lazy(() => Network_WebSocketResponse) }).passthrough(), "Network.webSocketHandshakeResponseReceived", "event", { phase: "event" }); -const Network_WebSocketWillSendHandshakeRequestEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime), "wallTime": z.lazy(() => Network_TimeSinceEpoch), "request": z.lazy(() => Network_WebSocketRequest) }).passthrough(), "Network.webSocketWillSendHandshakeRequest", "event", { phase: "event" }); -const Network_WebTransportCreatedEvent = withCdpMeta(z.object({ "transportId": z.lazy(() => Network_RequestId), "url": z.string(), "timestamp": z.lazy(() => Network_MonotonicTime), "initiator": z.lazy(() => Network_Initiator).optional() }).passthrough(), "Network.webTransportCreated", "event", { phase: "event" }); -const Network_WebTransportConnectionEstablishedEvent = withCdpMeta(z.object({ "transportId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.webTransportConnectionEstablished", "event", { phase: "event" }); -const Network_WebTransportClosedEvent = withCdpMeta(z.object({ "transportId": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.webTransportClosed", "event", { phase: "event" }); -const Network_DirectTCPSocketCreatedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "remoteAddr": z.string(), "remotePort": z.number().int(), "options": z.lazy(() => Network_DirectTCPSocketOptions), "timestamp": z.lazy(() => Network_MonotonicTime), "initiator": z.lazy(() => Network_Initiator).optional() }).passthrough(), "Network.directTCPSocketCreated", "event", { phase: "event" }); -const Network_DirectTCPSocketOpenedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "remoteAddr": z.string(), "remotePort": z.number().int(), "timestamp": z.lazy(() => Network_MonotonicTime), "localAddr": z.string().optional(), "localPort": z.number().int().optional() }).passthrough(), "Network.directTCPSocketOpened", "event", { phase: "event" }); -const Network_DirectTCPSocketAbortedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "errorMessage": z.string(), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.directTCPSocketAborted", "event", { phase: "event" }); -const Network_DirectTCPSocketClosedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.directTCPSocketClosed", "event", { phase: "event" }); -const Network_DirectTCPSocketChunkSentEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "data": z.string(), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.directTCPSocketChunkSent", "event", { phase: "event" }); -const Network_DirectTCPSocketChunkReceivedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "data": z.string(), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.directTCPSocketChunkReceived", "event", { phase: "event" }); -const Network_DirectUDPSocketJoinedMulticastGroupEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "IPAddress": z.string() }).passthrough(), "Network.directUDPSocketJoinedMulticastGroup", "event", { phase: "event" }); -const Network_DirectUDPSocketLeftMulticastGroupEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "IPAddress": z.string() }).passthrough(), "Network.directUDPSocketLeftMulticastGroup", "event", { phase: "event" }); -const Network_DirectUDPSocketCreatedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "options": z.lazy(() => Network_DirectUDPSocketOptions), "timestamp": z.lazy(() => Network_MonotonicTime), "initiator": z.lazy(() => Network_Initiator).optional() }).passthrough(), "Network.directUDPSocketCreated", "event", { phase: "event" }); -const Network_DirectUDPSocketOpenedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "localAddr": z.string(), "localPort": z.number().int(), "timestamp": z.lazy(() => Network_MonotonicTime), "remoteAddr": z.string().optional(), "remotePort": z.number().int().optional() }).passthrough(), "Network.directUDPSocketOpened", "event", { phase: "event" }); -const Network_DirectUDPSocketAbortedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "errorMessage": z.string(), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.directUDPSocketAborted", "event", { phase: "event" }); -const Network_DirectUDPSocketClosedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.directUDPSocketClosed", "event", { phase: "event" }); -const Network_DirectUDPSocketChunkSentEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "message": z.lazy(() => Network_DirectUDPMessage), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.directUDPSocketChunkSent", "event", { phase: "event" }); -const Network_DirectUDPSocketChunkReceivedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => Network_RequestId), "message": z.lazy(() => Network_DirectUDPMessage), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Network.directUDPSocketChunkReceived", "event", { phase: "event" }); -const Network_RequestWillBeSentExtraInfoEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "associatedCookies": z.array(z.lazy(() => Network_AssociatedCookie)), "headers": z.lazy(() => Network_Headers), "connectTiming": z.lazy(() => Network_ConnectTiming), "deviceBoundSessionUsages": z.array(z.lazy(() => Network_DeviceBoundSessionWithUsage)).optional(), "clientSecurityState": z.lazy(() => Network_ClientSecurityState).optional(), "siteHasCookieInOtherPartition": z.boolean().optional(), "appliedNetworkConditionsId": z.string().optional() }).passthrough(), "Network.requestWillBeSentExtraInfo", "event", { phase: "event" }); -const Network_ResponseReceivedExtraInfoEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "blockedCookies": z.array(z.lazy(() => Network_BlockedSetCookieWithReason)), "headers": z.lazy(() => Network_Headers), "resourceIPAddressSpace": z.lazy(() => Network_IPAddressSpace), "statusCode": z.number().int(), "headersText": z.string().optional(), "cookiePartitionKey": z.lazy(() => Network_CookiePartitionKey).optional(), "cookiePartitionKeyOpaque": z.boolean().optional(), "exemptedCookies": z.array(z.lazy(() => Network_ExemptedSetCookieWithReason)).optional() }).passthrough(), "Network.responseReceivedExtraInfo", "event", { phase: "event" }); -const Network_ResponseReceivedEarlyHintsEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => Network_RequestId), "headers": z.lazy(() => Network_Headers) }).passthrough(), "Network.responseReceivedEarlyHints", "event", { phase: "event" }); -const Network_TrustTokenOperationDoneEvent = withCdpMeta(z.object({ "status": z.enum(["Ok", "InvalidArgument", "MissingIssuerKeys", "FailedPrecondition", "ResourceExhausted", "AlreadyExists", "ResourceLimited", "Unauthorized", "BadResponse", "InternalError", "UnknownError", "FulfilledLocally", "SiteIssuerLimit"]), "type": z.lazy(() => Network_TrustTokenOperationType), "requestId": z.lazy(() => Network_RequestId), "topLevelOrigin": z.string().optional(), "issuerOrigin": z.string().optional(), "issuedTokenCount": z.number().int().optional() }).passthrough(), "Network.trustTokenOperationDone", "event", { phase: "event" }); -const Network_PolicyUpdatedEvent = withCdpMeta(z.object({ }).passthrough(), "Network.policyUpdated", "event", { phase: "event" }); -const Network_ReportingApiReportAddedEvent = withCdpMeta(z.object({ "report": z.lazy(() => Network_ReportingApiReport) }).passthrough(), "Network.reportingApiReportAdded", "event", { phase: "event" }); -const Network_ReportingApiReportUpdatedEvent = withCdpMeta(z.object({ "report": z.lazy(() => Network_ReportingApiReport) }).passthrough(), "Network.reportingApiReportUpdated", "event", { phase: "event" }); -const Network_ReportingApiEndpointsChangedForOriginEvent = withCdpMeta(z.object({ "origin": z.string(), "endpoints": z.array(z.lazy(() => Network_ReportingApiEndpoint)) }).passthrough(), "Network.reportingApiEndpointsChangedForOrigin", "event", { phase: "event" }); -const Network_DeviceBoundSessionsAddedEvent = withCdpMeta(z.object({ "sessions": z.array(z.lazy(() => Network_DeviceBoundSession)) }).passthrough(), "Network.deviceBoundSessionsAdded", "event", { phase: "event" }); -const Network_DeviceBoundSessionEventOccurredEvent = withCdpMeta(z.object({ "eventId": z.lazy(() => Network_DeviceBoundSessionEventId), "site": z.string(), "succeeded": z.boolean(), "sessionId": z.string().optional(), "creationEventDetails": z.lazy(() => Network_CreationEventDetails).optional(), "refreshEventDetails": z.lazy(() => Network_RefreshEventDetails).optional(), "terminationEventDetails": z.lazy(() => Network_TerminationEventDetails).optional(), "challengeEventDetails": z.lazy(() => Network_ChallengeEventDetails).optional() }).passthrough(), "Network.deviceBoundSessionEventOccurred", "event", { phase: "event" }); -const Overlay_SourceOrderConfig = withCdpMeta(z.object({ "parentOutlineColor": z.lazy(() => DOM_RGBA), "childOutlineColor": z.lazy(() => DOM_RGBA) }).passthrough(), "Overlay.SourceOrderConfig", "type"); -const Overlay_GridHighlightConfig = withCdpMeta(z.object({ "showGridExtensionLines": z.boolean().optional(), "showPositiveLineNumbers": z.boolean().optional(), "showNegativeLineNumbers": z.boolean().optional(), "showAreaNames": z.boolean().optional(), "showLineNames": z.boolean().optional(), "showTrackSizes": z.boolean().optional(), "gridBorderColor": z.lazy(() => DOM_RGBA).optional(), "cellBorderColor": z.lazy(() => DOM_RGBA).optional(), "rowLineColor": z.lazy(() => DOM_RGBA).optional(), "columnLineColor": z.lazy(() => DOM_RGBA).optional(), "gridBorderDash": z.boolean().optional(), "cellBorderDash": z.boolean().optional(), "rowLineDash": z.boolean().optional(), "columnLineDash": z.boolean().optional(), "rowGapColor": z.lazy(() => DOM_RGBA).optional(), "rowHatchColor": z.lazy(() => DOM_RGBA).optional(), "columnGapColor": z.lazy(() => DOM_RGBA).optional(), "columnHatchColor": z.lazy(() => DOM_RGBA).optional(), "areaBorderColor": z.lazy(() => DOM_RGBA).optional(), "gridBackgroundColor": z.lazy(() => DOM_RGBA).optional() }).passthrough(), "Overlay.GridHighlightConfig", "type"); -const Overlay_FlexContainerHighlightConfig = withCdpMeta(z.object({ "containerBorder": z.lazy(() => Overlay_LineStyle).optional(), "lineSeparator": z.lazy(() => Overlay_LineStyle).optional(), "itemSeparator": z.lazy(() => Overlay_LineStyle).optional(), "mainDistributedSpace": z.lazy(() => Overlay_BoxStyle).optional(), "crossDistributedSpace": z.lazy(() => Overlay_BoxStyle).optional(), "rowGapSpace": z.lazy(() => Overlay_BoxStyle).optional(), "columnGapSpace": z.lazy(() => Overlay_BoxStyle).optional(), "crossAlignment": z.lazy(() => Overlay_LineStyle).optional() }).passthrough(), "Overlay.FlexContainerHighlightConfig", "type"); -const Overlay_FlexItemHighlightConfig = withCdpMeta(z.object({ "baseSizeBox": z.lazy(() => Overlay_BoxStyle).optional(), "baseSizeBorder": z.lazy(() => Overlay_LineStyle).optional(), "flexibilityArrow": z.lazy(() => Overlay_LineStyle).optional() }).passthrough(), "Overlay.FlexItemHighlightConfig", "type"); -const Overlay_LineStyle = withCdpMeta(z.object({ "color": z.lazy(() => DOM_RGBA).optional(), "pattern": z.enum(["dashed", "dotted"]).optional() }).passthrough(), "Overlay.LineStyle", "type"); -const Overlay_BoxStyle = withCdpMeta(z.object({ "fillColor": z.lazy(() => DOM_RGBA).optional(), "hatchColor": z.lazy(() => DOM_RGBA).optional() }).passthrough(), "Overlay.BoxStyle", "type"); -const Overlay_ContrastAlgorithm = withCdpMeta(z.enum(["aa", "aaa", "apca"]), "Overlay.ContrastAlgorithm", "type"); -const Overlay_HighlightConfig = withCdpMeta(z.object({ "showInfo": z.boolean().optional(), "showStyles": z.boolean().optional(), "showRulers": z.boolean().optional(), "showAccessibilityInfo": z.boolean().optional(), "showExtensionLines": z.boolean().optional(), "contentColor": z.lazy(() => DOM_RGBA).optional(), "paddingColor": z.lazy(() => DOM_RGBA).optional(), "borderColor": z.lazy(() => DOM_RGBA).optional(), "marginColor": z.lazy(() => DOM_RGBA).optional(), "eventTargetColor": z.lazy(() => DOM_RGBA).optional(), "shapeColor": z.lazy(() => DOM_RGBA).optional(), "shapeMarginColor": z.lazy(() => DOM_RGBA).optional(), "cssGridColor": z.lazy(() => DOM_RGBA).optional(), "colorFormat": z.lazy(() => Overlay_ColorFormat).optional(), "gridHighlightConfig": z.lazy(() => Overlay_GridHighlightConfig).optional(), "flexContainerHighlightConfig": z.lazy(() => Overlay_FlexContainerHighlightConfig).optional(), "flexItemHighlightConfig": z.lazy(() => Overlay_FlexItemHighlightConfig).optional(), "contrastAlgorithm": z.lazy(() => Overlay_ContrastAlgorithm).optional(), "containerQueryContainerHighlightConfig": z.lazy(() => Overlay_ContainerQueryContainerHighlightConfig).optional() }).passthrough(), "Overlay.HighlightConfig", "type"); -const Overlay_ColorFormat = withCdpMeta(z.enum(["rgb", "hsl", "hwb", "hex"]), "Overlay.ColorFormat", "type"); -const Overlay_GridNodeHighlightConfig = withCdpMeta(z.object({ "gridHighlightConfig": z.lazy(() => Overlay_GridHighlightConfig), "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "Overlay.GridNodeHighlightConfig", "type"); -const Overlay_FlexNodeHighlightConfig = withCdpMeta(z.object({ "flexContainerHighlightConfig": z.lazy(() => Overlay_FlexContainerHighlightConfig), "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "Overlay.FlexNodeHighlightConfig", "type"); -const Overlay_ScrollSnapContainerHighlightConfig = withCdpMeta(z.object({ "snapportBorder": z.lazy(() => Overlay_LineStyle).optional(), "snapAreaBorder": z.lazy(() => Overlay_LineStyle).optional(), "scrollMarginColor": z.lazy(() => DOM_RGBA).optional(), "scrollPaddingColor": z.lazy(() => DOM_RGBA).optional() }).passthrough(), "Overlay.ScrollSnapContainerHighlightConfig", "type"); -const Overlay_ScrollSnapHighlightConfig = withCdpMeta(z.object({ "scrollSnapContainerHighlightConfig": z.lazy(() => Overlay_ScrollSnapContainerHighlightConfig), "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "Overlay.ScrollSnapHighlightConfig", "type"); -const Overlay_HingeConfig = withCdpMeta(z.object({ "rect": z.lazy(() => DOM_Rect), "contentColor": z.lazy(() => DOM_RGBA).optional(), "outlineColor": z.lazy(() => DOM_RGBA).optional() }).passthrough(), "Overlay.HingeConfig", "type"); -const Overlay_WindowControlsOverlayConfig = withCdpMeta(z.object({ "showCSS": z.boolean(), "selectedPlatform": z.string(), "themeColor": z.string() }).passthrough(), "Overlay.WindowControlsOverlayConfig", "type"); -const Overlay_ContainerQueryHighlightConfig = withCdpMeta(z.object({ "containerQueryContainerHighlightConfig": z.lazy(() => Overlay_ContainerQueryContainerHighlightConfig), "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "Overlay.ContainerQueryHighlightConfig", "type"); -const Overlay_ContainerQueryContainerHighlightConfig = withCdpMeta(z.object({ "containerBorder": z.lazy(() => Overlay_LineStyle).optional(), "descendantBorder": z.lazy(() => Overlay_LineStyle).optional() }).passthrough(), "Overlay.ContainerQueryContainerHighlightConfig", "type"); -const Overlay_IsolatedElementHighlightConfig = withCdpMeta(z.object({ "isolationModeHighlightConfig": z.lazy(() => Overlay_IsolationModeHighlightConfig), "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "Overlay.IsolatedElementHighlightConfig", "type"); -const Overlay_IsolationModeHighlightConfig = withCdpMeta(z.object({ "resizerColor": z.lazy(() => DOM_RGBA).optional(), "resizerHandleColor": z.lazy(() => DOM_RGBA).optional(), "maskColor": z.lazy(() => DOM_RGBA).optional() }).passthrough(), "Overlay.IsolationModeHighlightConfig", "type"); -const Overlay_InspectMode = withCdpMeta(z.enum(["searchForNode", "searchForUAShadowDOM", "captureAreaScreenshot", "none"]), "Overlay.InspectMode", "type"); -const Overlay_InspectedElementAnchorConfig = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional() }).passthrough(), "Overlay.InspectedElementAnchorConfig", "type"); -const Overlay_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Overlay.disable.params", "commandParams", { method: "Overlay.disable" }); -const Overlay_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.disable.result", "commandResult", { method: "Overlay.disable" }); -const Overlay_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Overlay.enable.params", "commandParams", { method: "Overlay.enable" }); -const Overlay_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.enable.result", "commandResult", { method: "Overlay.enable" }); -const Overlay_GetHighlightObjectForTestParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId), "includeDistance": z.boolean().optional(), "includeStyle": z.boolean().optional(), "colorFormat": z.lazy(() => Overlay_ColorFormat).optional(), "showAccessibilityInfo": z.boolean().optional() }).passthrough(), "Overlay.getHighlightObjectForTest.params", "commandParams", { method: "Overlay.getHighlightObjectForTest" }); -const Overlay_GetHighlightObjectForTestResult = withCdpMeta(z.object({ "highlight": z.record(z.string(), z.unknown()) }).passthrough(), "Overlay.getHighlightObjectForTest.result", "commandResult", { method: "Overlay.getHighlightObjectForTest" }); -const Overlay_GetGridHighlightObjectsForTestParams = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM_NodeId)) }).passthrough(), "Overlay.getGridHighlightObjectsForTest.params", "commandParams", { method: "Overlay.getGridHighlightObjectsForTest" }); -const Overlay_GetGridHighlightObjectsForTestResult = withCdpMeta(z.object({ "highlights": z.record(z.string(), z.unknown()) }).passthrough(), "Overlay.getGridHighlightObjectsForTest.result", "commandResult", { method: "Overlay.getGridHighlightObjectsForTest" }); -const Overlay_GetSourceOrderHighlightObjectForTestParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "Overlay.getSourceOrderHighlightObjectForTest.params", "commandParams", { method: "Overlay.getSourceOrderHighlightObjectForTest" }); -const Overlay_GetSourceOrderHighlightObjectForTestResult = withCdpMeta(z.object({ "highlight": z.record(z.string(), z.unknown()) }).passthrough(), "Overlay.getSourceOrderHighlightObjectForTest.result", "commandResult", { method: "Overlay.getSourceOrderHighlightObjectForTest" }); -const Overlay_HideHighlightParams = withCdpMeta(z.object({ }).passthrough(), "Overlay.hideHighlight.params", "commandParams", { method: "Overlay.hideHighlight" }); -const Overlay_HideHighlightResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.hideHighlight.result", "commandResult", { method: "Overlay.hideHighlight" }); -const Overlay_HighlightFrameParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "contentColor": z.lazy(() => DOM_RGBA).optional(), "contentOutlineColor": z.lazy(() => DOM_RGBA).optional() }).passthrough(), "Overlay.highlightFrame.params", "commandParams", { method: "Overlay.highlightFrame" }); -const Overlay_HighlightFrameResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.highlightFrame.result", "commandResult", { method: "Overlay.highlightFrame" }); -const Overlay_HighlightNodeParams = withCdpMeta(z.object({ "highlightConfig": z.lazy(() => Overlay_HighlightConfig), "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional(), "selector": z.string().optional() }).passthrough(), "Overlay.highlightNode.params", "commandParams", { method: "Overlay.highlightNode" }); -const Overlay_HighlightNodeResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.highlightNode.result", "commandResult", { method: "Overlay.highlightNode" }); -const Overlay_HighlightQuadParams = withCdpMeta(z.object({ "quad": z.lazy(() => DOM_Quad), "color": z.lazy(() => DOM_RGBA).optional(), "outlineColor": z.lazy(() => DOM_RGBA).optional() }).passthrough(), "Overlay.highlightQuad.params", "commandParams", { method: "Overlay.highlightQuad" }); -const Overlay_HighlightQuadResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.highlightQuad.result", "commandResult", { method: "Overlay.highlightQuad" }); -const Overlay_HighlightRectParams = withCdpMeta(z.object({ "x": z.number().int(), "y": z.number().int(), "width": z.number().int(), "height": z.number().int(), "color": z.lazy(() => DOM_RGBA).optional(), "outlineColor": z.lazy(() => DOM_RGBA).optional() }).passthrough(), "Overlay.highlightRect.params", "commandParams", { method: "Overlay.highlightRect" }); -const Overlay_HighlightRectResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.highlightRect.result", "commandResult", { method: "Overlay.highlightRect" }); -const Overlay_HighlightSourceOrderParams = withCdpMeta(z.object({ "sourceOrderConfig": z.lazy(() => Overlay_SourceOrderConfig), "nodeId": z.lazy(() => DOM_NodeId).optional(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional() }).passthrough(), "Overlay.highlightSourceOrder.params", "commandParams", { method: "Overlay.highlightSourceOrder" }); -const Overlay_HighlightSourceOrderResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.highlightSourceOrder.result", "commandResult", { method: "Overlay.highlightSourceOrder" }); -const Overlay_SetInspectModeParams = withCdpMeta(z.object({ "mode": z.lazy(() => Overlay_InspectMode), "highlightConfig": z.lazy(() => Overlay_HighlightConfig).optional() }).passthrough(), "Overlay.setInspectMode.params", "commandParams", { method: "Overlay.setInspectMode" }); -const Overlay_SetInspectModeResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setInspectMode.result", "commandResult", { method: "Overlay.setInspectMode" }); -const Overlay_SetShowAdHighlightsParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowAdHighlights.params", "commandParams", { method: "Overlay.setShowAdHighlights" }); -const Overlay_SetShowAdHighlightsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowAdHighlights.result", "commandResult", { method: "Overlay.setShowAdHighlights" }); -const Overlay_SetPausedInDebuggerMessageParams = withCdpMeta(z.object({ "message": z.string().optional() }).passthrough(), "Overlay.setPausedInDebuggerMessage.params", "commandParams", { method: "Overlay.setPausedInDebuggerMessage" }); -const Overlay_SetPausedInDebuggerMessageResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setPausedInDebuggerMessage.result", "commandResult", { method: "Overlay.setPausedInDebuggerMessage" }); -const Overlay_SetShowDebugBordersParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowDebugBorders.params", "commandParams", { method: "Overlay.setShowDebugBorders" }); -const Overlay_SetShowDebugBordersResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowDebugBorders.result", "commandResult", { method: "Overlay.setShowDebugBorders" }); -const Overlay_SetShowFPSCounterParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowFPSCounter.params", "commandParams", { method: "Overlay.setShowFPSCounter" }); -const Overlay_SetShowFPSCounterResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowFPSCounter.result", "commandResult", { method: "Overlay.setShowFPSCounter" }); -const Overlay_SetShowGridOverlaysParams = withCdpMeta(z.object({ "gridNodeHighlightConfigs": z.array(z.lazy(() => Overlay_GridNodeHighlightConfig)) }).passthrough(), "Overlay.setShowGridOverlays.params", "commandParams", { method: "Overlay.setShowGridOverlays" }); -const Overlay_SetShowGridOverlaysResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowGridOverlays.result", "commandResult", { method: "Overlay.setShowGridOverlays" }); -const Overlay_SetShowFlexOverlaysParams = withCdpMeta(z.object({ "flexNodeHighlightConfigs": z.array(z.lazy(() => Overlay_FlexNodeHighlightConfig)) }).passthrough(), "Overlay.setShowFlexOverlays.params", "commandParams", { method: "Overlay.setShowFlexOverlays" }); -const Overlay_SetShowFlexOverlaysResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowFlexOverlays.result", "commandResult", { method: "Overlay.setShowFlexOverlays" }); -const Overlay_SetShowScrollSnapOverlaysParams = withCdpMeta(z.object({ "scrollSnapHighlightConfigs": z.array(z.lazy(() => Overlay_ScrollSnapHighlightConfig)) }).passthrough(), "Overlay.setShowScrollSnapOverlays.params", "commandParams", { method: "Overlay.setShowScrollSnapOverlays" }); -const Overlay_SetShowScrollSnapOverlaysResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowScrollSnapOverlays.result", "commandResult", { method: "Overlay.setShowScrollSnapOverlays" }); -const Overlay_SetShowContainerQueryOverlaysParams = withCdpMeta(z.object({ "containerQueryHighlightConfigs": z.array(z.lazy(() => Overlay_ContainerQueryHighlightConfig)) }).passthrough(), "Overlay.setShowContainerQueryOverlays.params", "commandParams", { method: "Overlay.setShowContainerQueryOverlays" }); -const Overlay_SetShowContainerQueryOverlaysResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowContainerQueryOverlays.result", "commandResult", { method: "Overlay.setShowContainerQueryOverlays" }); -const Overlay_SetShowInspectedElementAnchorParams = withCdpMeta(z.object({ "inspectedElementAnchorConfig": z.lazy(() => Overlay_InspectedElementAnchorConfig) }).passthrough(), "Overlay.setShowInspectedElementAnchor.params", "commandParams", { method: "Overlay.setShowInspectedElementAnchor" }); -const Overlay_SetShowInspectedElementAnchorResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowInspectedElementAnchor.result", "commandResult", { method: "Overlay.setShowInspectedElementAnchor" }); -const Overlay_SetShowPaintRectsParams = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Overlay.setShowPaintRects.params", "commandParams", { method: "Overlay.setShowPaintRects" }); -const Overlay_SetShowPaintRectsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowPaintRects.result", "commandResult", { method: "Overlay.setShowPaintRects" }); -const Overlay_SetShowLayoutShiftRegionsParams = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Overlay.setShowLayoutShiftRegions.params", "commandParams", { method: "Overlay.setShowLayoutShiftRegions" }); -const Overlay_SetShowLayoutShiftRegionsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowLayoutShiftRegions.result", "commandResult", { method: "Overlay.setShowLayoutShiftRegions" }); -const Overlay_SetShowScrollBottleneckRectsParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowScrollBottleneckRects.params", "commandParams", { method: "Overlay.setShowScrollBottleneckRects" }); -const Overlay_SetShowScrollBottleneckRectsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowScrollBottleneckRects.result", "commandResult", { method: "Overlay.setShowScrollBottleneckRects" }); -const Overlay_SetShowHitTestBordersParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowHitTestBorders.params", "commandParams", { method: "Overlay.setShowHitTestBorders" }); -const Overlay_SetShowHitTestBordersResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowHitTestBorders.result", "commandResult", { method: "Overlay.setShowHitTestBorders" }); -const Overlay_SetShowWebVitalsParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowWebVitals.params", "commandParams", { method: "Overlay.setShowWebVitals" }); -const Overlay_SetShowWebVitalsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowWebVitals.result", "commandResult", { method: "Overlay.setShowWebVitals" }); -const Overlay_SetShowViewportSizeOnResizeParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowViewportSizeOnResize.params", "commandParams", { method: "Overlay.setShowViewportSizeOnResize" }); -const Overlay_SetShowViewportSizeOnResizeResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowViewportSizeOnResize.result", "commandResult", { method: "Overlay.setShowViewportSizeOnResize" }); -const Overlay_SetShowHingeParams = withCdpMeta(z.object({ "hingeConfig": z.lazy(() => Overlay_HingeConfig).optional() }).passthrough(), "Overlay.setShowHinge.params", "commandParams", { method: "Overlay.setShowHinge" }); -const Overlay_SetShowHingeResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowHinge.result", "commandResult", { method: "Overlay.setShowHinge" }); -const Overlay_SetShowIsolatedElementsParams = withCdpMeta(z.object({ "isolatedElementHighlightConfigs": z.array(z.lazy(() => Overlay_IsolatedElementHighlightConfig)) }).passthrough(), "Overlay.setShowIsolatedElements.params", "commandParams", { method: "Overlay.setShowIsolatedElements" }); -const Overlay_SetShowIsolatedElementsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowIsolatedElements.result", "commandResult", { method: "Overlay.setShowIsolatedElements" }); -const Overlay_SetShowWindowControlsOverlayParams = withCdpMeta(z.object({ "windowControlsOverlayConfig": z.lazy(() => Overlay_WindowControlsOverlayConfig).optional() }).passthrough(), "Overlay.setShowWindowControlsOverlay.params", "commandParams", { method: "Overlay.setShowWindowControlsOverlay" }); -const Overlay_SetShowWindowControlsOverlayResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowWindowControlsOverlay.result", "commandResult", { method: "Overlay.setShowWindowControlsOverlay" }); -const Overlay_InspectNodeRequestedEvent = withCdpMeta(z.object({ "backendNodeId": z.lazy(() => DOM_BackendNodeId) }).passthrough(), "Overlay.inspectNodeRequested", "event", { phase: "event" }); -const Overlay_NodeHighlightRequestedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM_NodeId) }).passthrough(), "Overlay.nodeHighlightRequested", "event", { phase: "event" }); -const Overlay_ScreenshotRequestedEvent = withCdpMeta(z.object({ "viewport": z.lazy(() => Page_Viewport) }).passthrough(), "Overlay.screenshotRequested", "event", { phase: "event" }); -const Overlay_InspectPanelShowRequestedEvent = withCdpMeta(z.object({ "backendNodeId": z.lazy(() => DOM_BackendNodeId) }).passthrough(), "Overlay.inspectPanelShowRequested", "event", { phase: "event" }); -const Overlay_InspectedElementWindowRestoredEvent = withCdpMeta(z.object({ "backendNodeId": z.lazy(() => DOM_BackendNodeId) }).passthrough(), "Overlay.inspectedElementWindowRestored", "event", { phase: "event" }); -const Overlay_InspectModeCanceledEvent = withCdpMeta(z.object({ }).passthrough(), "Overlay.inspectModeCanceled", "event", { phase: "event" }); -const Page_FrameId = withCdpMeta(z.string(), "Page.FrameId", "type"); -const Page_AdFrameType = withCdpMeta(z.enum(["none", "child", "root"]), "Page.AdFrameType", "type"); -const Page_AdFrameExplanation = withCdpMeta(z.enum(["ParentIsAd", "CreatedByAdScript", "MatchedBlockingRule"]), "Page.AdFrameExplanation", "type"); -const Page_AdFrameStatus = withCdpMeta(z.object({ "adFrameType": z.lazy(() => Page_AdFrameType), "explanations": z.array(z.lazy(() => Page_AdFrameExplanation)).optional() }).passthrough(), "Page.AdFrameStatus", "type"); -const Page_SecureContextType = withCdpMeta(z.enum(["Secure", "SecureLocalhost", "InsecureScheme", "InsecureAncestor"]), "Page.SecureContextType", "type"); -const Page_CrossOriginIsolatedContextType = withCdpMeta(z.enum(["Isolated", "NotIsolated", "NotIsolatedFeatureDisabled"]), "Page.CrossOriginIsolatedContextType", "type"); -const Page_GatedAPIFeatures = withCdpMeta(z.enum(["SharedArrayBuffers", "SharedArrayBuffersTransferAllowed", "PerformanceMeasureMemory", "PerformanceProfile"]), "Page.GatedAPIFeatures", "type"); -const Page_PermissionsPolicyFeature = withCdpMeta(z.enum(["accelerometer", "all-screens-capture", "ambient-light-sensor", "aria-notify", "attribution-reporting", "autofill", "autoplay", "bluetooth", "browsing-topics", "camera", "captured-surface-control", "ch-dpr", "ch-device-memory", "ch-downlink", "ch-ect", "ch-prefers-color-scheme", "ch-prefers-reduced-motion", "ch-prefers-reduced-transparency", "ch-rtt", "ch-save-data", "ch-ua", "ch-ua-arch", "ch-ua-bitness", "ch-ua-high-entropy-values", "ch-ua-platform", "ch-ua-model", "ch-ua-mobile", "ch-ua-form-factors", "ch-ua-full-version", "ch-ua-full-version-list", "ch-ua-platform-version", "ch-ua-wow64", "ch-viewport-height", "ch-viewport-width", "ch-width", "clipboard-read", "clipboard-write", "compute-pressure", "controlled-frame", "cross-origin-isolated", "deferred-fetch", "deferred-fetch-minimal", "device-attributes", "digital-credentials-create", "digital-credentials-get", "direct-sockets", "direct-sockets-multicast", "direct-sockets-private", "display-capture", "document-domain", "encrypted-media", "execution-while-out-of-viewport", "execution-while-not-rendered", "focus-without-user-activation", "fullscreen", "frobulate", "gamepad", "geolocation", "gyroscope", "hid", "identity-credentials-get", "idle-detection", "interest-cohort", "join-ad-interest-group", "keyboard-map", "language-detector", "language-model", "local-fonts", "local-network", "local-network-access", "loopback-network", "magnetometer", "manual-text", "media-playback-while-not-visible", "microphone", "midi", "on-device-speech-recognition", "otp-credentials", "payment", "picture-in-picture", "private-aggregation", "private-state-token-issuance", "private-state-token-redemption", "publickey-credentials-create", "publickey-credentials-get", "record-ad-auction-events", "rewriter", "run-ad-auction", "screen-wake-lock", "serial", "shared-storage", "shared-storage-select-url", "smart-card", "speaker-selection", "storage-access", "sub-apps", "summarizer", "sync-xhr", "translator", "unload", "usb", "usb-unrestricted", "vertical-scroll", "web-app-installation", "web-printing", "web-share", "window-management", "writer", "xr-spatial-tracking"]), "Page.PermissionsPolicyFeature", "type"); -const Page_PermissionsPolicyBlockReason = withCdpMeta(z.enum(["Header", "IframeAttribute", "InFencedFrameTree", "InIsolatedApp"]), "Page.PermissionsPolicyBlockReason", "type"); -const Page_PermissionsPolicyBlockLocator = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "blockReason": z.lazy(() => Page_PermissionsPolicyBlockReason) }).passthrough(), "Page.PermissionsPolicyBlockLocator", "type"); -const Page_PermissionsPolicyFeatureState = withCdpMeta(z.object({ "feature": z.lazy(() => Page_PermissionsPolicyFeature), "allowed": z.boolean(), "locator": z.lazy(() => Page_PermissionsPolicyBlockLocator).optional() }).passthrough(), "Page.PermissionsPolicyFeatureState", "type"); -const Page_OriginTrialTokenStatus = withCdpMeta(z.enum(["Success", "NotSupported", "Insecure", "Expired", "WrongOrigin", "InvalidSignature", "Malformed", "WrongVersion", "FeatureDisabled", "TokenDisabled", "FeatureDisabledForUser", "UnknownTrial"]), "Page.OriginTrialTokenStatus", "type"); -const Page_OriginTrialStatus = withCdpMeta(z.enum(["Enabled", "ValidTokenNotProvided", "OSNotSupported", "TrialNotAllowed"]), "Page.OriginTrialStatus", "type"); -const Page_OriginTrialUsageRestriction = withCdpMeta(z.enum(["None", "Subset"]), "Page.OriginTrialUsageRestriction", "type"); -const Page_OriginTrialToken = withCdpMeta(z.object({ "origin": z.string(), "matchSubDomains": z.boolean(), "trialName": z.string(), "expiryTime": z.lazy(() => Network_TimeSinceEpoch), "isThirdParty": z.boolean(), "usageRestriction": z.lazy(() => Page_OriginTrialUsageRestriction) }).passthrough(), "Page.OriginTrialToken", "type"); -const Page_OriginTrialTokenWithStatus = withCdpMeta(z.object({ "rawTokenText": z.string(), "parsedToken": z.lazy(() => Page_OriginTrialToken).optional(), "status": z.lazy(() => Page_OriginTrialTokenStatus) }).passthrough(), "Page.OriginTrialTokenWithStatus", "type"); -const Page_OriginTrial = withCdpMeta(z.object({ "trialName": z.string(), "status": z.lazy(() => Page_OriginTrialStatus), "tokensWithStatus": z.array(z.lazy(() => Page_OriginTrialTokenWithStatus)) }).passthrough(), "Page.OriginTrial", "type"); -const Page_SecurityOriginDetails = withCdpMeta(z.object({ "isLocalhost": z.boolean() }).passthrough(), "Page.SecurityOriginDetails", "type"); -const Page_Frame = withCdpMeta(z.object({ "id": z.lazy(() => Page_FrameId), "parentId": z.lazy(() => Page_FrameId).optional(), "loaderId": z.lazy(() => Network_LoaderId), "name": z.string().optional(), "url": z.string(), "urlFragment": z.string().optional(), "domainAndRegistry": z.string(), "securityOrigin": z.string(), "securityOriginDetails": z.lazy(() => Page_SecurityOriginDetails).optional(), "mimeType": z.string(), "unreachableUrl": z.string().optional(), "adFrameStatus": z.lazy(() => Page_AdFrameStatus).optional(), "secureContextType": z.lazy(() => Page_SecureContextType), "crossOriginIsolatedContextType": z.lazy(() => Page_CrossOriginIsolatedContextType), "gatedAPIFeatures": z.array(z.lazy(() => Page_GatedAPIFeatures)) }).passthrough(), "Page.Frame", "type"); -const Page_FrameResource = withCdpMeta(z.object({ "url": z.string(), "type": z.lazy(() => Network_ResourceType), "mimeType": z.string(), "lastModified": z.lazy(() => Network_TimeSinceEpoch).optional(), "contentSize": z.number().optional(), "failed": z.boolean().optional(), "canceled": z.boolean().optional() }).passthrough(), "Page.FrameResource", "type"); -const Page_FrameResourceTree = withCdpMeta(z.object({ "frame": z.lazy(() => Page_Frame), "childFrames": z.array(z.lazy(() => Page_FrameResourceTree)).optional(), "resources": z.array(z.lazy(() => Page_FrameResource)) }).passthrough(), "Page.FrameResourceTree", "type"); -const Page_FrameTree = withCdpMeta(z.object({ "frame": z.lazy(() => Page_Frame), "childFrames": z.array(z.lazy(() => Page_FrameTree)).optional() }).passthrough(), "Page.FrameTree", "type"); -const Page_ScriptIdentifier = withCdpMeta(z.string(), "Page.ScriptIdentifier", "type"); -const Page_TransitionType = withCdpMeta(z.enum(["link", "typed", "address_bar", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated", "other"]), "Page.TransitionType", "type"); -const Page_NavigationEntry = withCdpMeta(z.object({ "id": z.number().int(), "url": z.string(), "userTypedURL": z.string(), "title": z.string(), "transitionType": z.lazy(() => Page_TransitionType) }).passthrough(), "Page.NavigationEntry", "type"); -const Page_ScreencastFrameMetadata = withCdpMeta(z.object({ "offsetTop": z.number(), "pageScaleFactor": z.number(), "deviceWidth": z.number(), "deviceHeight": z.number(), "scrollOffsetX": z.number(), "scrollOffsetY": z.number(), "timestamp": z.lazy(() => Network_TimeSinceEpoch).optional() }).passthrough(), "Page.ScreencastFrameMetadata", "type"); -const Page_DialogType = withCdpMeta(z.enum(["alert", "confirm", "prompt", "beforeunload"]), "Page.DialogType", "type"); -const Page_AppManifestError = withCdpMeta(z.object({ "message": z.string(), "critical": z.number().int(), "line": z.number().int(), "column": z.number().int() }).passthrough(), "Page.AppManifestError", "type"); -const Page_AppManifestParsedProperties = withCdpMeta(z.object({ "scope": z.string() }).passthrough(), "Page.AppManifestParsedProperties", "type"); -const Page_LayoutViewport = withCdpMeta(z.object({ "pageX": z.number().int(), "pageY": z.number().int(), "clientWidth": z.number().int(), "clientHeight": z.number().int() }).passthrough(), "Page.LayoutViewport", "type"); -const Page_VisualViewport = withCdpMeta(z.object({ "offsetX": z.number(), "offsetY": z.number(), "pageX": z.number(), "pageY": z.number(), "clientWidth": z.number(), "clientHeight": z.number(), "scale": z.number(), "zoom": z.number().optional() }).passthrough(), "Page.VisualViewport", "type"); -const Page_Viewport = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "width": z.number(), "height": z.number(), "scale": z.number() }).passthrough(), "Page.Viewport", "type"); -const Page_FontFamilies = withCdpMeta(z.object({ "standard": z.string().optional(), "fixed": z.string().optional(), "serif": z.string().optional(), "sansSerif": z.string().optional(), "cursive": z.string().optional(), "fantasy": z.string().optional(), "math": z.string().optional() }).passthrough(), "Page.FontFamilies", "type"); -const Page_ScriptFontFamilies = withCdpMeta(z.object({ "script": z.string(), "fontFamilies": z.lazy(() => Page_FontFamilies) }).passthrough(), "Page.ScriptFontFamilies", "type"); -const Page_FontSizes = withCdpMeta(z.object({ "standard": z.number().int().optional(), "fixed": z.number().int().optional() }).passthrough(), "Page.FontSizes", "type"); -const Page_ClientNavigationReason = withCdpMeta(z.enum(["anchorClick", "formSubmissionGet", "formSubmissionPost", "httpHeaderRefresh", "initialFrameNavigation", "metaTagRefresh", "other", "pageBlockInterstitial", "reload", "scriptInitiated"]), "Page.ClientNavigationReason", "type"); -const Page_ClientNavigationDisposition = withCdpMeta(z.enum(["currentTab", "newTab", "newWindow", "download"]), "Page.ClientNavigationDisposition", "type"); -const Page_InstallabilityErrorArgument = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "Page.InstallabilityErrorArgument", "type"); -const Page_InstallabilityError = withCdpMeta(z.object({ "errorId": z.string(), "errorArguments": z.array(z.lazy(() => Page_InstallabilityErrorArgument)) }).passthrough(), "Page.InstallabilityError", "type"); -const Page_ReferrerPolicy = withCdpMeta(z.enum(["noReferrer", "noReferrerWhenDowngrade", "origin", "originWhenCrossOrigin", "sameOrigin", "strictOrigin", "strictOriginWhenCrossOrigin", "unsafeUrl"]), "Page.ReferrerPolicy", "type"); -const Page_CompilationCacheParams = withCdpMeta(z.object({ "url": z.string(), "eager": z.boolean().optional() }).passthrough(), "Page.CompilationCacheParams", "type"); -const Page_FileFilter = withCdpMeta(z.object({ "name": z.string().optional(), "accepts": z.array(z.string()).optional() }).passthrough(), "Page.FileFilter", "type"); -const Page_FileHandler = withCdpMeta(z.object({ "action": z.string(), "name": z.string(), "icons": z.array(z.lazy(() => Page_ImageResource)).optional(), "accepts": z.array(z.lazy(() => Page_FileFilter)).optional(), "launchType": z.string() }).passthrough(), "Page.FileHandler", "type"); -const Page_ImageResource = withCdpMeta(z.object({ "url": z.string(), "sizes": z.string().optional(), "type": z.string().optional() }).passthrough(), "Page.ImageResource", "type"); -const Page_LaunchHandler = withCdpMeta(z.object({ "clientMode": z.string() }).passthrough(), "Page.LaunchHandler", "type"); -const Page_ProtocolHandler = withCdpMeta(z.object({ "protocol": z.string(), "url": z.string() }).passthrough(), "Page.ProtocolHandler", "type"); -const Page_RelatedApplication = withCdpMeta(z.object({ "id": z.string().optional(), "url": z.string() }).passthrough(), "Page.RelatedApplication", "type"); -const Page_ScopeExtension = withCdpMeta(z.object({ "origin": z.string(), "hasOriginWildcard": z.boolean() }).passthrough(), "Page.ScopeExtension", "type"); -const Page_Screenshot = withCdpMeta(z.object({ "image": z.lazy(() => Page_ImageResource), "formFactor": z.string(), "label": z.string().optional() }).passthrough(), "Page.Screenshot", "type"); -const Page_ShareTarget = withCdpMeta(z.object({ "action": z.string(), "method": z.string(), "enctype": z.string(), "title": z.string().optional(), "text": z.string().optional(), "url": z.string().optional(), "files": z.array(z.lazy(() => Page_FileFilter)).optional() }).passthrough(), "Page.ShareTarget", "type"); -const Page_Shortcut = withCdpMeta(z.object({ "name": z.string(), "url": z.string() }).passthrough(), "Page.Shortcut", "type"); -const Page_WebAppManifest = withCdpMeta(z.object({ "backgroundColor": z.string().optional(), "description": z.string().optional(), "dir": z.string().optional(), "display": z.string().optional(), "displayOverrides": z.array(z.string()).optional(), "fileHandlers": z.array(z.lazy(() => Page_FileHandler)).optional(), "icons": z.array(z.lazy(() => Page_ImageResource)).optional(), "id": z.string().optional(), "lang": z.string().optional(), "launchHandler": z.lazy(() => Page_LaunchHandler).optional(), "name": z.string().optional(), "orientation": z.string().optional(), "preferRelatedApplications": z.boolean().optional(), "protocolHandlers": z.array(z.lazy(() => Page_ProtocolHandler)).optional(), "relatedApplications": z.array(z.lazy(() => Page_RelatedApplication)).optional(), "scope": z.string().optional(), "scopeExtensions": z.array(z.lazy(() => Page_ScopeExtension)).optional(), "screenshots": z.array(z.lazy(() => Page_Screenshot)).optional(), "shareTarget": z.lazy(() => Page_ShareTarget).optional(), "shortName": z.string().optional(), "shortcuts": z.array(z.lazy(() => Page_Shortcut)).optional(), "startUrl": z.string().optional(), "themeColor": z.string().optional() }).passthrough(), "Page.WebAppManifest", "type"); -const Page_NavigationType = withCdpMeta(z.enum(["Navigation", "BackForwardCacheRestore"]), "Page.NavigationType", "type"); -const Page_BackForwardCacheNotRestoredReason = withCdpMeta(z.enum(["NotPrimaryMainFrame", "BackForwardCacheDisabled", "RelatedActiveContentsExist", "HTTPStatusNotOK", "SchemeNotHTTPOrHTTPS", "Loading", "WasGrantedMediaAccess", "DisableForRenderFrameHostCalled", "DomainNotAllowed", "HTTPMethodNotGET", "SubframeIsNavigating", "Timeout", "CacheLimit", "JavaScriptExecution", "RendererProcessKilled", "RendererProcessCrashed", "SchedulerTrackedFeatureUsed", "ConflictingBrowsingInstance", "CacheFlushed", "ServiceWorkerVersionActivation", "SessionRestored", "ServiceWorkerPostMessage", "EnteredBackForwardCacheBeforeServiceWorkerHostAdded", "RenderFrameHostReused_SameSite", "RenderFrameHostReused_CrossSite", "ServiceWorkerClaim", "IgnoreEventAndEvict", "HaveInnerContents", "TimeoutPuttingInCache", "BackForwardCacheDisabledByLowMemory", "BackForwardCacheDisabledByCommandLine", "NetworkRequestDatapipeDrainedAsBytesConsumer", "NetworkRequestRedirected", "NetworkRequestTimeout", "NetworkExceedsBufferLimit", "NavigationCancelledWhileRestoring", "NotMostRecentNavigationEntry", "BackForwardCacheDisabledForPrerender", "UserAgentOverrideDiffers", "ForegroundCacheLimit", "ForwardCacheDisabled", "BrowsingInstanceNotSwapped", "BackForwardCacheDisabledForDelegate", "UnloadHandlerExistsInMainFrame", "UnloadHandlerExistsInSubFrame", "ServiceWorkerUnregistration", "CacheControlNoStore", "CacheControlNoStoreCookieModified", "CacheControlNoStoreHTTPOnlyCookieModified", "NoResponseHead", "Unknown", "ActivationNavigationsDisallowedForBug1234857", "ErrorDocument", "FencedFramesEmbedder", "CookieDisabled", "HTTPAuthRequired", "CookieFlushed", "BroadcastChannelOnMessage", "WebViewSettingsChanged", "WebViewJavaScriptObjectChanged", "WebViewMessageListenerInjected", "WebViewSafeBrowsingAllowlistChanged", "WebViewDocumentStartJavascriptChanged", "WebSocket", "WebTransport", "WebRTC", "MainResourceHasCacheControlNoStore", "MainResourceHasCacheControlNoCache", "SubresourceHasCacheControlNoStore", "SubresourceHasCacheControlNoCache", "ContainsPlugins", "DocumentLoaded", "OutstandingNetworkRequestOthers", "RequestedMIDIPermission", "RequestedAudioCapturePermission", "RequestedVideoCapturePermission", "RequestedBackForwardCacheBlockedSensors", "RequestedBackgroundWorkPermission", "BroadcastChannel", "WebXR", "SharedWorker", "SharedWorkerMessage", "SharedWorkerWithNoActiveClient", "WebLocks", "WebLocksContention", "WebHID", "WebBluetooth", "WebShare", "RequestedStorageAccessGrant", "WebNfc", "OutstandingNetworkRequestFetch", "OutstandingNetworkRequestXHR", "AppBanner", "Printing", "WebDatabase", "PictureInPicture", "SpeechRecognizer", "IdleManager", "PaymentManager", "SpeechSynthesis", "KeyboardLock", "WebOTPService", "OutstandingNetworkRequestDirectSocket", "InjectedJavascript", "InjectedStyleSheet", "KeepaliveRequest", "IndexedDBEvent", "Dummy", "JsNetworkRequestReceivedCacheControlNoStoreResource", "WebRTCUsedWithCCNS", "WebTransportUsedWithCCNS", "WebSocketUsedWithCCNS", "SmartCard", "LiveMediaStreamTrack", "UnloadHandler", "ParserAborted", "ContentSecurityHandler", "ContentWebAuthenticationAPI", "ContentFileChooser", "ContentSerial", "ContentFileSystemAccess", "ContentMediaDevicesDispatcherHost", "ContentWebBluetooth", "ContentWebUSB", "ContentMediaSessionService", "ContentScreenReader", "ContentDiscarded", "EmbedderPopupBlockerTabHelper", "EmbedderSafeBrowsingTriggeredPopupBlocker", "EmbedderSafeBrowsingThreatDetails", "EmbedderAppBannerManager", "EmbedderDomDistillerViewerSource", "EmbedderDomDistillerSelfDeletingRequestDelegate", "EmbedderOomInterventionTabHelper", "EmbedderOfflinePage", "EmbedderChromePasswordManagerClientBindCredentialManager", "EmbedderPermissionRequestManager", "EmbedderModalDialog", "EmbedderExtensions", "EmbedderExtensionMessaging", "EmbedderExtensionMessagingForOpenPort", "EmbedderExtensionSentMessageToCachedFrame", "EmbedderExtensionFrame", "RequestedByWebViewClient", "PostMessageByWebViewClient", "CacheControlNoStoreDeviceBoundSessionTerminated", "CacheLimitPrunedOnModerateMemoryPressure", "CacheLimitPrunedOnCriticalMemoryPressure"]), "Page.BackForwardCacheNotRestoredReason", "type"); -const Page_BackForwardCacheNotRestoredReasonType = withCdpMeta(z.enum(["SupportPending", "PageSupportNeeded", "Circumstantial"]), "Page.BackForwardCacheNotRestoredReasonType", "type"); -const Page_BackForwardCacheBlockingDetails = withCdpMeta(z.object({ "url": z.string().optional(), "function": z.string().optional(), "lineNumber": z.number().int(), "columnNumber": z.number().int() }).passthrough(), "Page.BackForwardCacheBlockingDetails", "type"); -const Page_BackForwardCacheNotRestoredExplanation = withCdpMeta(z.object({ "type": z.lazy(() => Page_BackForwardCacheNotRestoredReasonType), "reason": z.lazy(() => Page_BackForwardCacheNotRestoredReason), "context": z.string().optional(), "details": z.array(z.lazy(() => Page_BackForwardCacheBlockingDetails)).optional() }).passthrough(), "Page.BackForwardCacheNotRestoredExplanation", "type"); -const Page_BackForwardCacheNotRestoredExplanationTree = withCdpMeta(z.object({ "url": z.string(), "explanations": z.array(z.lazy(() => Page_BackForwardCacheNotRestoredExplanation)), "children": z.array(z.lazy(() => Page_BackForwardCacheNotRestoredExplanationTree)) }).passthrough(), "Page.BackForwardCacheNotRestoredExplanationTree", "type"); -const Page_AddScriptToEvaluateOnLoadParams = withCdpMeta(z.object({ "scriptSource": z.string() }).passthrough(), "Page.addScriptToEvaluateOnLoad.params", "commandParams", { method: "Page.addScriptToEvaluateOnLoad" }); -const Page_AddScriptToEvaluateOnLoadResult = withCdpMeta(z.object({ "identifier": z.lazy(() => Page_ScriptIdentifier) }).passthrough(), "Page.addScriptToEvaluateOnLoad.result", "commandResult", { method: "Page.addScriptToEvaluateOnLoad" }); -const Page_AddScriptToEvaluateOnNewDocumentParams = withCdpMeta(z.object({ "source": z.string(), "worldName": z.string().optional(), "includeCommandLineAPI": z.boolean().optional(), "runImmediately": z.boolean().optional() }).passthrough(), "Page.addScriptToEvaluateOnNewDocument.params", "commandParams", { method: "Page.addScriptToEvaluateOnNewDocument" }); -const Page_AddScriptToEvaluateOnNewDocumentResult = withCdpMeta(z.object({ "identifier": z.lazy(() => Page_ScriptIdentifier) }).passthrough(), "Page.addScriptToEvaluateOnNewDocument.result", "commandResult", { method: "Page.addScriptToEvaluateOnNewDocument" }); -const Page_BringToFrontParams = withCdpMeta(z.object({ }).passthrough(), "Page.bringToFront.params", "commandParams", { method: "Page.bringToFront" }); -const Page_BringToFrontResult = withCdpMeta(z.object({ }).passthrough(), "Page.bringToFront.result", "commandResult", { method: "Page.bringToFront" }); -const Page_CaptureScreenshotParams = withCdpMeta(z.object({ "format": z.enum(["jpeg", "png", "webp"]).optional(), "quality": z.number().int().optional(), "clip": z.lazy(() => Page_Viewport).optional(), "fromSurface": z.boolean().optional(), "captureBeyondViewport": z.boolean().optional(), "optimizeForSpeed": z.boolean().optional() }).passthrough(), "Page.captureScreenshot.params", "commandParams", { method: "Page.captureScreenshot" }); -const Page_CaptureScreenshotResult = withCdpMeta(z.object({ "data": z.string() }).passthrough(), "Page.captureScreenshot.result", "commandResult", { method: "Page.captureScreenshot" }); -const Page_CaptureSnapshotParams = withCdpMeta(z.object({ "format": z.enum(["mhtml"]).optional() }).passthrough(), "Page.captureSnapshot.params", "commandParams", { method: "Page.captureSnapshot" }); -const Page_CaptureSnapshotResult = withCdpMeta(z.object({ "data": z.string() }).passthrough(), "Page.captureSnapshot.result", "commandResult", { method: "Page.captureSnapshot" }); -const Page_ClearDeviceMetricsOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Page.clearDeviceMetricsOverride.params", "commandParams", { method: "Page.clearDeviceMetricsOverride" }); -const Page_ClearDeviceMetricsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.clearDeviceMetricsOverride.result", "commandResult", { method: "Page.clearDeviceMetricsOverride" }); -const Page_ClearDeviceOrientationOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Page.clearDeviceOrientationOverride.params", "commandParams", { method: "Page.clearDeviceOrientationOverride" }); -const Page_ClearDeviceOrientationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.clearDeviceOrientationOverride.result", "commandResult", { method: "Page.clearDeviceOrientationOverride" }); -const Page_ClearGeolocationOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Page.clearGeolocationOverride.params", "commandParams", { method: "Page.clearGeolocationOverride" }); -const Page_ClearGeolocationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.clearGeolocationOverride.result", "commandResult", { method: "Page.clearGeolocationOverride" }); -const Page_CreateIsolatedWorldParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "worldName": z.string().optional(), "grantUniveralAccess": z.boolean().optional() }).passthrough(), "Page.createIsolatedWorld.params", "commandParams", { method: "Page.createIsolatedWorld" }); -const Page_CreateIsolatedWorldResult = withCdpMeta(z.object({ "executionContextId": z.lazy(() => Runtime_ExecutionContextId) }).passthrough(), "Page.createIsolatedWorld.result", "commandResult", { method: "Page.createIsolatedWorld" }); -const Page_DeleteCookieParams = withCdpMeta(z.object({ "cookieName": z.string(), "url": z.string() }).passthrough(), "Page.deleteCookie.params", "commandParams", { method: "Page.deleteCookie" }); -const Page_DeleteCookieResult = withCdpMeta(z.object({ }).passthrough(), "Page.deleteCookie.result", "commandResult", { method: "Page.deleteCookie" }); -const Page_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Page.disable.params", "commandParams", { method: "Page.disable" }); -const Page_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Page.disable.result", "commandResult", { method: "Page.disable" }); -const Page_EnableParams = withCdpMeta(z.object({ "enableFileChooserOpenedEvent": z.boolean().optional() }).passthrough(), "Page.enable.params", "commandParams", { method: "Page.enable" }); -const Page_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Page.enable.result", "commandResult", { method: "Page.enable" }); -const Page_GetAppManifestParams = withCdpMeta(z.object({ "manifestId": z.string().optional() }).passthrough(), "Page.getAppManifest.params", "commandParams", { method: "Page.getAppManifest" }); -const Page_GetAppManifestResult = withCdpMeta(z.object({ "url": z.string(), "errors": z.array(z.lazy(() => Page_AppManifestError)), "data": z.string().optional(), "parsed": z.lazy(() => Page_AppManifestParsedProperties).optional(), "manifest": z.lazy(() => Page_WebAppManifest) }).passthrough(), "Page.getAppManifest.result", "commandResult", { method: "Page.getAppManifest" }); -const Page_GetInstallabilityErrorsParams = withCdpMeta(z.object({ }).passthrough(), "Page.getInstallabilityErrors.params", "commandParams", { method: "Page.getInstallabilityErrors" }); -const Page_GetInstallabilityErrorsResult = withCdpMeta(z.object({ "installabilityErrors": z.array(z.lazy(() => Page_InstallabilityError)) }).passthrough(), "Page.getInstallabilityErrors.result", "commandResult", { method: "Page.getInstallabilityErrors" }); -const Page_GetManifestIconsParams = withCdpMeta(z.object({ }).passthrough(), "Page.getManifestIcons.params", "commandParams", { method: "Page.getManifestIcons" }); -const Page_GetManifestIconsResult = withCdpMeta(z.object({ "primaryIcon": z.string().optional() }).passthrough(), "Page.getManifestIcons.result", "commandResult", { method: "Page.getManifestIcons" }); -const Page_GetAppIdParams = withCdpMeta(z.object({ }).passthrough(), "Page.getAppId.params", "commandParams", { method: "Page.getAppId" }); -const Page_GetAppIdResult = withCdpMeta(z.object({ "appId": z.string().optional(), "recommendedId": z.string().optional() }).passthrough(), "Page.getAppId.result", "commandResult", { method: "Page.getAppId" }); -const Page_GetAdScriptAncestryParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "Page.getAdScriptAncestry.params", "commandParams", { method: "Page.getAdScriptAncestry" }); -const Page_GetAdScriptAncestryResult = withCdpMeta(z.object({ "adScriptAncestry": z.lazy(() => Network_AdAncestry).optional() }).passthrough(), "Page.getAdScriptAncestry.result", "commandResult", { method: "Page.getAdScriptAncestry" }); -const Page_GetFrameTreeParams = withCdpMeta(z.object({ }).passthrough(), "Page.getFrameTree.params", "commandParams", { method: "Page.getFrameTree" }); -const Page_GetFrameTreeResult = withCdpMeta(z.object({ "frameTree": z.lazy(() => Page_FrameTree) }).passthrough(), "Page.getFrameTree.result", "commandResult", { method: "Page.getFrameTree" }); -const Page_GetLayoutMetricsParams = withCdpMeta(z.object({ }).passthrough(), "Page.getLayoutMetrics.params", "commandParams", { method: "Page.getLayoutMetrics" }); -const Page_GetLayoutMetricsResult = withCdpMeta(z.object({ "layoutViewport": z.lazy(() => Page_LayoutViewport), "visualViewport": z.lazy(() => Page_VisualViewport), "contentSize": z.lazy(() => DOM_Rect), "cssLayoutViewport": z.lazy(() => Page_LayoutViewport), "cssVisualViewport": z.lazy(() => Page_VisualViewport), "cssContentSize": z.lazy(() => DOM_Rect) }).passthrough(), "Page.getLayoutMetrics.result", "commandResult", { method: "Page.getLayoutMetrics" }); -const Page_GetNavigationHistoryParams = withCdpMeta(z.object({ }).passthrough(), "Page.getNavigationHistory.params", "commandParams", { method: "Page.getNavigationHistory" }); -const Page_GetNavigationHistoryResult = withCdpMeta(z.object({ "currentIndex": z.number().int(), "entries": z.array(z.lazy(() => Page_NavigationEntry)) }).passthrough(), "Page.getNavigationHistory.result", "commandResult", { method: "Page.getNavigationHistory" }); -const Page_ResetNavigationHistoryParams = withCdpMeta(z.object({ }).passthrough(), "Page.resetNavigationHistory.params", "commandParams", { method: "Page.resetNavigationHistory" }); -const Page_ResetNavigationHistoryResult = withCdpMeta(z.object({ }).passthrough(), "Page.resetNavigationHistory.result", "commandResult", { method: "Page.resetNavigationHistory" }); -const Page_GetResourceContentParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "url": z.string() }).passthrough(), "Page.getResourceContent.params", "commandParams", { method: "Page.getResourceContent" }); -const Page_GetResourceContentResult = withCdpMeta(z.object({ "content": z.string(), "base64Encoded": z.boolean() }).passthrough(), "Page.getResourceContent.result", "commandResult", { method: "Page.getResourceContent" }); -const Page_GetResourceTreeParams = withCdpMeta(z.object({ }).passthrough(), "Page.getResourceTree.params", "commandParams", { method: "Page.getResourceTree" }); -const Page_GetResourceTreeResult = withCdpMeta(z.object({ "frameTree": z.lazy(() => Page_FrameResourceTree) }).passthrough(), "Page.getResourceTree.result", "commandResult", { method: "Page.getResourceTree" }); -const Page_HandleJavaScriptDialogParams = withCdpMeta(z.object({ "accept": z.boolean(), "promptText": z.string().optional() }).passthrough(), "Page.handleJavaScriptDialog.params", "commandParams", { method: "Page.handleJavaScriptDialog" }); -const Page_HandleJavaScriptDialogResult = withCdpMeta(z.object({ }).passthrough(), "Page.handleJavaScriptDialog.result", "commandResult", { method: "Page.handleJavaScriptDialog" }); -const Page_NavigateParams = withCdpMeta(z.object({ "url": z.string(), "referrer": z.string().optional(), "transitionType": z.lazy(() => Page_TransitionType).optional(), "frameId": z.lazy(() => Page_FrameId).optional(), "referrerPolicy": z.lazy(() => Page_ReferrerPolicy).optional() }).passthrough(), "Page.navigate.params", "commandParams", { method: "Page.navigate" }); -const Page_NavigateResult = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "loaderId": z.lazy(() => Network_LoaderId).optional(), "errorText": z.string().optional(), "isDownload": z.boolean().optional() }).passthrough(), "Page.navigate.result", "commandResult", { method: "Page.navigate" }); -const Page_NavigateToHistoryEntryParams = withCdpMeta(z.object({ "entryId": z.number().int() }).passthrough(), "Page.navigateToHistoryEntry.params", "commandParams", { method: "Page.navigateToHistoryEntry" }); -const Page_NavigateToHistoryEntryResult = withCdpMeta(z.object({ }).passthrough(), "Page.navigateToHistoryEntry.result", "commandResult", { method: "Page.navigateToHistoryEntry" }); -const Page_PrintToPDFParams = withCdpMeta(z.object({ "landscape": z.boolean().optional(), "displayHeaderFooter": z.boolean().optional(), "printBackground": z.boolean().optional(), "scale": z.number().optional(), "paperWidth": z.number().optional(), "paperHeight": z.number().optional(), "marginTop": z.number().optional(), "marginBottom": z.number().optional(), "marginLeft": z.number().optional(), "marginRight": z.number().optional(), "pageRanges": z.string().optional(), "headerTemplate": z.string().optional(), "footerTemplate": z.string().optional(), "preferCSSPageSize": z.boolean().optional(), "transferMode": z.enum(["ReturnAsBase64", "ReturnAsStream"]).optional(), "generateTaggedPDF": z.boolean().optional(), "generateDocumentOutline": z.boolean().optional() }).passthrough(), "Page.printToPDF.params", "commandParams", { method: "Page.printToPDF" }); -const Page_PrintToPDFResult = withCdpMeta(z.object({ "data": z.string(), "stream": z.lazy(() => IO_StreamHandle).optional() }).passthrough(), "Page.printToPDF.result", "commandResult", { method: "Page.printToPDF" }); -const Page_ReloadParams = withCdpMeta(z.object({ "ignoreCache": z.boolean().optional(), "scriptToEvaluateOnLoad": z.string().optional(), "loaderId": z.lazy(() => Network_LoaderId).optional() }).passthrough(), "Page.reload.params", "commandParams", { method: "Page.reload" }); -const Page_ReloadResult = withCdpMeta(z.object({ }).passthrough(), "Page.reload.result", "commandResult", { method: "Page.reload" }); -const Page_RemoveScriptToEvaluateOnLoadParams = withCdpMeta(z.object({ "identifier": z.lazy(() => Page_ScriptIdentifier) }).passthrough(), "Page.removeScriptToEvaluateOnLoad.params", "commandParams", { method: "Page.removeScriptToEvaluateOnLoad" }); -const Page_RemoveScriptToEvaluateOnLoadResult = withCdpMeta(z.object({ }).passthrough(), "Page.removeScriptToEvaluateOnLoad.result", "commandResult", { method: "Page.removeScriptToEvaluateOnLoad" }); -const Page_RemoveScriptToEvaluateOnNewDocumentParams = withCdpMeta(z.object({ "identifier": z.lazy(() => Page_ScriptIdentifier) }).passthrough(), "Page.removeScriptToEvaluateOnNewDocument.params", "commandParams", { method: "Page.removeScriptToEvaluateOnNewDocument" }); -const Page_RemoveScriptToEvaluateOnNewDocumentResult = withCdpMeta(z.object({ }).passthrough(), "Page.removeScriptToEvaluateOnNewDocument.result", "commandResult", { method: "Page.removeScriptToEvaluateOnNewDocument" }); -const Page_ScreencastFrameAckParams = withCdpMeta(z.object({ "sessionId": z.number().int() }).passthrough(), "Page.screencastFrameAck.params", "commandParams", { method: "Page.screencastFrameAck" }); -const Page_ScreencastFrameAckResult = withCdpMeta(z.object({ }).passthrough(), "Page.screencastFrameAck.result", "commandResult", { method: "Page.screencastFrameAck" }); -const Page_SearchInResourceParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "url": z.string(), "query": z.string(), "caseSensitive": z.boolean().optional(), "isRegex": z.boolean().optional() }).passthrough(), "Page.searchInResource.params", "commandParams", { method: "Page.searchInResource" }); -const Page_SearchInResourceResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => Debugger_SearchMatch)) }).passthrough(), "Page.searchInResource.result", "commandResult", { method: "Page.searchInResource" }); -const Page_SetAdBlockingEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Page.setAdBlockingEnabled.params", "commandParams", { method: "Page.setAdBlockingEnabled" }); -const Page_SetAdBlockingEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Page.setAdBlockingEnabled.result", "commandResult", { method: "Page.setAdBlockingEnabled" }); -const Page_SetBypassCSPParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Page.setBypassCSP.params", "commandParams", { method: "Page.setBypassCSP" }); -const Page_SetBypassCSPResult = withCdpMeta(z.object({ }).passthrough(), "Page.setBypassCSP.result", "commandResult", { method: "Page.setBypassCSP" }); -const Page_GetPermissionsPolicyStateParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "Page.getPermissionsPolicyState.params", "commandParams", { method: "Page.getPermissionsPolicyState" }); -const Page_GetPermissionsPolicyStateResult = withCdpMeta(z.object({ "states": z.array(z.lazy(() => Page_PermissionsPolicyFeatureState)) }).passthrough(), "Page.getPermissionsPolicyState.result", "commandResult", { method: "Page.getPermissionsPolicyState" }); -const Page_GetOriginTrialsParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "Page.getOriginTrials.params", "commandParams", { method: "Page.getOriginTrials" }); -const Page_GetOriginTrialsResult = withCdpMeta(z.object({ "originTrials": z.array(z.lazy(() => Page_OriginTrial)) }).passthrough(), "Page.getOriginTrials.result", "commandResult", { method: "Page.getOriginTrials" }); -const Page_SetDeviceMetricsOverrideParams = withCdpMeta(z.object({ "width": z.number().int(), "height": z.number().int(), "deviceScaleFactor": z.number(), "mobile": z.boolean(), "scale": z.number().optional(), "screenWidth": z.number().int().optional(), "screenHeight": z.number().int().optional(), "positionX": z.number().int().optional(), "positionY": z.number().int().optional(), "dontSetVisibleSize": z.boolean().optional(), "screenOrientation": z.lazy(() => Emulation_ScreenOrientation).optional(), "viewport": z.lazy(() => Page_Viewport).optional() }).passthrough(), "Page.setDeviceMetricsOverride.params", "commandParams", { method: "Page.setDeviceMetricsOverride" }); -const Page_SetDeviceMetricsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.setDeviceMetricsOverride.result", "commandResult", { method: "Page.setDeviceMetricsOverride" }); -const Page_SetDeviceOrientationOverrideParams = withCdpMeta(z.object({ "alpha": z.number(), "beta": z.number(), "gamma": z.number() }).passthrough(), "Page.setDeviceOrientationOverride.params", "commandParams", { method: "Page.setDeviceOrientationOverride" }); -const Page_SetDeviceOrientationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.setDeviceOrientationOverride.result", "commandResult", { method: "Page.setDeviceOrientationOverride" }); -const Page_SetFontFamiliesParams = withCdpMeta(z.object({ "fontFamilies": z.lazy(() => Page_FontFamilies), "forScripts": z.array(z.lazy(() => Page_ScriptFontFamilies)).optional() }).passthrough(), "Page.setFontFamilies.params", "commandParams", { method: "Page.setFontFamilies" }); -const Page_SetFontFamiliesResult = withCdpMeta(z.object({ }).passthrough(), "Page.setFontFamilies.result", "commandResult", { method: "Page.setFontFamilies" }); -const Page_SetFontSizesParams = withCdpMeta(z.object({ "fontSizes": z.lazy(() => Page_FontSizes) }).passthrough(), "Page.setFontSizes.params", "commandParams", { method: "Page.setFontSizes" }); -const Page_SetFontSizesResult = withCdpMeta(z.object({ }).passthrough(), "Page.setFontSizes.result", "commandResult", { method: "Page.setFontSizes" }); -const Page_SetDocumentContentParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "html": z.string() }).passthrough(), "Page.setDocumentContent.params", "commandParams", { method: "Page.setDocumentContent" }); -const Page_SetDocumentContentResult = withCdpMeta(z.object({ }).passthrough(), "Page.setDocumentContent.result", "commandResult", { method: "Page.setDocumentContent" }); -const Page_SetDownloadBehaviorParams = withCdpMeta(z.object({ "behavior": z.enum(["deny", "allow", "default"]), "downloadPath": z.string().optional() }).passthrough(), "Page.setDownloadBehavior.params", "commandParams", { method: "Page.setDownloadBehavior" }); -const Page_SetDownloadBehaviorResult = withCdpMeta(z.object({ }).passthrough(), "Page.setDownloadBehavior.result", "commandResult", { method: "Page.setDownloadBehavior" }); -const Page_SetGeolocationOverrideParams = withCdpMeta(z.object({ "latitude": z.number().optional(), "longitude": z.number().optional(), "accuracy": z.number().optional() }).passthrough(), "Page.setGeolocationOverride.params", "commandParams", { method: "Page.setGeolocationOverride" }); -const Page_SetGeolocationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.setGeolocationOverride.result", "commandResult", { method: "Page.setGeolocationOverride" }); -const Page_SetLifecycleEventsEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Page.setLifecycleEventsEnabled.params", "commandParams", { method: "Page.setLifecycleEventsEnabled" }); -const Page_SetLifecycleEventsEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Page.setLifecycleEventsEnabled.result", "commandResult", { method: "Page.setLifecycleEventsEnabled" }); -const Page_SetTouchEmulationEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean(), "configuration": z.enum(["mobile", "desktop"]).optional() }).passthrough(), "Page.setTouchEmulationEnabled.params", "commandParams", { method: "Page.setTouchEmulationEnabled" }); -const Page_SetTouchEmulationEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Page.setTouchEmulationEnabled.result", "commandResult", { method: "Page.setTouchEmulationEnabled" }); -const Page_StartScreencastParams = withCdpMeta(z.object({ "format": z.enum(["jpeg", "png"]).optional(), "quality": z.number().int().optional(), "maxWidth": z.number().int().optional(), "maxHeight": z.number().int().optional(), "everyNthFrame": z.number().int().optional() }).passthrough(), "Page.startScreencast.params", "commandParams", { method: "Page.startScreencast" }); -const Page_StartScreencastResult = withCdpMeta(z.object({ }).passthrough(), "Page.startScreencast.result", "commandResult", { method: "Page.startScreencast" }); -const Page_StopLoadingParams = withCdpMeta(z.object({ }).passthrough(), "Page.stopLoading.params", "commandParams", { method: "Page.stopLoading" }); -const Page_StopLoadingResult = withCdpMeta(z.object({ }).passthrough(), "Page.stopLoading.result", "commandResult", { method: "Page.stopLoading" }); -const Page_CrashParams = withCdpMeta(z.object({ }).passthrough(), "Page.crash.params", "commandParams", { method: "Page.crash" }); -const Page_CrashResult = withCdpMeta(z.object({ }).passthrough(), "Page.crash.result", "commandResult", { method: "Page.crash" }); -const Page_CloseParams = withCdpMeta(z.object({ }).passthrough(), "Page.close.params", "commandParams", { method: "Page.close" }); -const Page_CloseResult = withCdpMeta(z.object({ }).passthrough(), "Page.close.result", "commandResult", { method: "Page.close" }); -const Page_SetWebLifecycleStateParams = withCdpMeta(z.object({ "state": z.enum(["frozen", "active"]) }).passthrough(), "Page.setWebLifecycleState.params", "commandParams", { method: "Page.setWebLifecycleState" }); -const Page_SetWebLifecycleStateResult = withCdpMeta(z.object({ }).passthrough(), "Page.setWebLifecycleState.result", "commandResult", { method: "Page.setWebLifecycleState" }); -const Page_StopScreencastParams = withCdpMeta(z.object({ }).passthrough(), "Page.stopScreencast.params", "commandParams", { method: "Page.stopScreencast" }); -const Page_StopScreencastResult = withCdpMeta(z.object({ }).passthrough(), "Page.stopScreencast.result", "commandResult", { method: "Page.stopScreencast" }); -const Page_ProduceCompilationCacheParams = withCdpMeta(z.object({ "scripts": z.array(z.lazy(() => Page_CompilationCacheParams)) }).passthrough(), "Page.produceCompilationCache.params", "commandParams", { method: "Page.produceCompilationCache" }); -const Page_ProduceCompilationCacheResult = withCdpMeta(z.object({ }).passthrough(), "Page.produceCompilationCache.result", "commandResult", { method: "Page.produceCompilationCache" }); -const Page_AddCompilationCacheParams = withCdpMeta(z.object({ "url": z.string(), "data": z.string() }).passthrough(), "Page.addCompilationCache.params", "commandParams", { method: "Page.addCompilationCache" }); -const Page_AddCompilationCacheResult = withCdpMeta(z.object({ }).passthrough(), "Page.addCompilationCache.result", "commandResult", { method: "Page.addCompilationCache" }); -const Page_ClearCompilationCacheParams = withCdpMeta(z.object({ }).passthrough(), "Page.clearCompilationCache.params", "commandParams", { method: "Page.clearCompilationCache" }); -const Page_ClearCompilationCacheResult = withCdpMeta(z.object({ }).passthrough(), "Page.clearCompilationCache.result", "commandResult", { method: "Page.clearCompilationCache" }); -const Page_SetSPCTransactionModeParams = withCdpMeta(z.object({ "mode": z.enum(["none", "autoAccept", "autoChooseToAuthAnotherWay", "autoReject", "autoOptOut"]) }).passthrough(), "Page.setSPCTransactionMode.params", "commandParams", { method: "Page.setSPCTransactionMode" }); -const Page_SetSPCTransactionModeResult = withCdpMeta(z.object({ }).passthrough(), "Page.setSPCTransactionMode.result", "commandResult", { method: "Page.setSPCTransactionMode" }); -const Page_SetRPHRegistrationModeParams = withCdpMeta(z.object({ "mode": z.enum(["none", "autoAccept", "autoReject"]) }).passthrough(), "Page.setRPHRegistrationMode.params", "commandParams", { method: "Page.setRPHRegistrationMode" }); -const Page_SetRPHRegistrationModeResult = withCdpMeta(z.object({ }).passthrough(), "Page.setRPHRegistrationMode.result", "commandResult", { method: "Page.setRPHRegistrationMode" }); -const Page_GenerateTestReportParams = withCdpMeta(z.object({ "message": z.string(), "group": z.string().optional() }).passthrough(), "Page.generateTestReport.params", "commandParams", { method: "Page.generateTestReport" }); -const Page_GenerateTestReportResult = withCdpMeta(z.object({ }).passthrough(), "Page.generateTestReport.result", "commandResult", { method: "Page.generateTestReport" }); -const Page_WaitForDebuggerParams = withCdpMeta(z.object({ }).passthrough(), "Page.waitForDebugger.params", "commandParams", { method: "Page.waitForDebugger" }); -const Page_WaitForDebuggerResult = withCdpMeta(z.object({ }).passthrough(), "Page.waitForDebugger.result", "commandResult", { method: "Page.waitForDebugger" }); -const Page_SetInterceptFileChooserDialogParams = withCdpMeta(z.object({ "enabled": z.boolean(), "cancel": z.boolean().optional() }).passthrough(), "Page.setInterceptFileChooserDialog.params", "commandParams", { method: "Page.setInterceptFileChooserDialog" }); -const Page_SetInterceptFileChooserDialogResult = withCdpMeta(z.object({ }).passthrough(), "Page.setInterceptFileChooserDialog.result", "commandResult", { method: "Page.setInterceptFileChooserDialog" }); -const Page_SetPrerenderingAllowedParams = withCdpMeta(z.object({ "isAllowed": z.boolean() }).passthrough(), "Page.setPrerenderingAllowed.params", "commandParams", { method: "Page.setPrerenderingAllowed" }); -const Page_SetPrerenderingAllowedResult = withCdpMeta(z.object({ }).passthrough(), "Page.setPrerenderingAllowed.result", "commandResult", { method: "Page.setPrerenderingAllowed" }); -const Page_GetAnnotatedPageContentParams = withCdpMeta(z.object({ "includeActionableInformation": z.boolean().optional() }).passthrough(), "Page.getAnnotatedPageContent.params", "commandParams", { method: "Page.getAnnotatedPageContent" }); -const Page_GetAnnotatedPageContentResult = withCdpMeta(z.object({ "content": z.string() }).passthrough(), "Page.getAnnotatedPageContent.result", "commandResult", { method: "Page.getAnnotatedPageContent" }); -const Page_DomContentEventFiredEvent = withCdpMeta(z.object({ "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Page.domContentEventFired", "event", { phase: "event" }); -const Page_FileChooserOpenedEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "mode": z.enum(["selectSingle", "selectMultiple"]), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional() }).passthrough(), "Page.fileChooserOpened", "event", { phase: "event" }); -const Page_FrameAttachedEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "parentFrameId": z.lazy(() => Page_FrameId), "stack": z.lazy(() => Runtime_StackTrace).optional() }).passthrough(), "Page.frameAttached", "event", { phase: "event" }); -const Page_FrameClearedScheduledNavigationEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "Page.frameClearedScheduledNavigation", "event", { phase: "event" }); -const Page_FrameDetachedEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "reason": z.enum(["remove", "swap"]) }).passthrough(), "Page.frameDetached", "event", { phase: "event" }); -const Page_FrameSubtreeWillBeDetachedEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "Page.frameSubtreeWillBeDetached", "event", { phase: "event" }); -const Page_FrameNavigatedEvent = withCdpMeta(z.object({ "frame": z.lazy(() => Page_Frame), "type": z.lazy(() => Page_NavigationType) }).passthrough(), "Page.frameNavigated", "event", { phase: "event" }); -const Page_DocumentOpenedEvent = withCdpMeta(z.object({ "frame": z.lazy(() => Page_Frame) }).passthrough(), "Page.documentOpened", "event", { phase: "event" }); -const Page_FrameResizedEvent = withCdpMeta(z.object({ }).passthrough(), "Page.frameResized", "event", { phase: "event" }); -const Page_FrameStartedNavigatingEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "url": z.string(), "loaderId": z.lazy(() => Network_LoaderId), "navigationType": z.enum(["reload", "reloadBypassingCache", "restore", "restoreWithPost", "historySameDocument", "historyDifferentDocument", "sameDocument", "differentDocument"]) }).passthrough(), "Page.frameStartedNavigating", "event", { phase: "event" }); -const Page_FrameRequestedNavigationEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "reason": z.lazy(() => Page_ClientNavigationReason), "url": z.string(), "disposition": z.lazy(() => Page_ClientNavigationDisposition) }).passthrough(), "Page.frameRequestedNavigation", "event", { phase: "event" }); -const Page_FrameScheduledNavigationEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "delay": z.number(), "reason": z.lazy(() => Page_ClientNavigationReason), "url": z.string() }).passthrough(), "Page.frameScheduledNavigation", "event", { phase: "event" }); -const Page_FrameStartedLoadingEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "Page.frameStartedLoading", "event", { phase: "event" }); -const Page_FrameStoppedLoadingEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "Page.frameStoppedLoading", "event", { phase: "event" }); -const Page_DownloadWillBeginEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "guid": z.string(), "url": z.string(), "suggestedFilename": z.string() }).passthrough(), "Page.downloadWillBegin", "event", { phase: "event" }); -const Page_DownloadProgressEvent = withCdpMeta(z.object({ "guid": z.string(), "totalBytes": z.number(), "receivedBytes": z.number(), "state": z.enum(["inProgress", "completed", "canceled"]) }).passthrough(), "Page.downloadProgress", "event", { phase: "event" }); -const Page_InterstitialHiddenEvent = withCdpMeta(z.object({ }).passthrough(), "Page.interstitialHidden", "event", { phase: "event" }); -const Page_InterstitialShownEvent = withCdpMeta(z.object({ }).passthrough(), "Page.interstitialShown", "event", { phase: "event" }); -const Page_JavascriptDialogClosedEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "result": z.boolean(), "userInput": z.string() }).passthrough(), "Page.javascriptDialogClosed", "event", { phase: "event" }); -const Page_JavascriptDialogOpeningEvent = withCdpMeta(z.object({ "url": z.string(), "frameId": z.lazy(() => Page_FrameId), "message": z.string(), "type": z.lazy(() => Page_DialogType), "hasBrowserHandler": z.boolean(), "defaultPrompt": z.string().optional() }).passthrough(), "Page.javascriptDialogOpening", "event", { phase: "event" }); -const Page_LifecycleEventEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "loaderId": z.lazy(() => Network_LoaderId), "name": z.string(), "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Page.lifecycleEvent", "event", { phase: "event" }); -const Page_BackForwardCacheNotUsedEvent = withCdpMeta(z.object({ "loaderId": z.lazy(() => Network_LoaderId), "frameId": z.lazy(() => Page_FrameId), "notRestoredExplanations": z.array(z.lazy(() => Page_BackForwardCacheNotRestoredExplanation)), "notRestoredExplanationsTree": z.lazy(() => Page_BackForwardCacheNotRestoredExplanationTree).optional() }).passthrough(), "Page.backForwardCacheNotUsed", "event", { phase: "event" }); -const Page_LoadEventFiredEvent = withCdpMeta(z.object({ "timestamp": z.lazy(() => Network_MonotonicTime) }).passthrough(), "Page.loadEventFired", "event", { phase: "event" }); -const Page_NavigatedWithinDocumentEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "url": z.string(), "navigationType": z.enum(["fragment", "historyApi", "other"]) }).passthrough(), "Page.navigatedWithinDocument", "event", { phase: "event" }); -const Page_ScreencastFrameEvent = withCdpMeta(z.object({ "data": z.string(), "metadata": z.lazy(() => Page_ScreencastFrameMetadata), "sessionId": z.number().int() }).passthrough(), "Page.screencastFrame", "event", { phase: "event" }); -const Page_ScreencastVisibilityChangedEvent = withCdpMeta(z.object({ "visible": z.boolean() }).passthrough(), "Page.screencastVisibilityChanged", "event", { phase: "event" }); -const Page_WindowOpenEvent = withCdpMeta(z.object({ "url": z.string(), "windowName": z.string(), "windowFeatures": z.array(z.string()), "userGesture": z.boolean() }).passthrough(), "Page.windowOpen", "event", { phase: "event" }); -const Page_CompilationCacheProducedEvent = withCdpMeta(z.object({ "url": z.string(), "data": z.string() }).passthrough(), "Page.compilationCacheProduced", "event", { phase: "event" }); -const Performance_Metric = withCdpMeta(z.object({ "name": z.string(), "value": z.number() }).passthrough(), "Performance.Metric", "type"); -const Performance_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Performance.disable.params", "commandParams", { method: "Performance.disable" }); -const Performance_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Performance.disable.result", "commandResult", { method: "Performance.disable" }); -const Performance_EnableParams = withCdpMeta(z.object({ "timeDomain": z.enum(["timeTicks", "threadTicks"]).optional() }).passthrough(), "Performance.enable.params", "commandParams", { method: "Performance.enable" }); -const Performance_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Performance.enable.result", "commandResult", { method: "Performance.enable" }); -const Performance_SetTimeDomainParams = withCdpMeta(z.object({ "timeDomain": z.enum(["timeTicks", "threadTicks"]) }).passthrough(), "Performance.setTimeDomain.params", "commandParams", { method: "Performance.setTimeDomain" }); -const Performance_SetTimeDomainResult = withCdpMeta(z.object({ }).passthrough(), "Performance.setTimeDomain.result", "commandResult", { method: "Performance.setTimeDomain" }); -const Performance_GetMetricsParams = withCdpMeta(z.object({ }).passthrough(), "Performance.getMetrics.params", "commandParams", { method: "Performance.getMetrics" }); -const Performance_GetMetricsResult = withCdpMeta(z.object({ "metrics": z.array(z.lazy(() => Performance_Metric)) }).passthrough(), "Performance.getMetrics.result", "commandResult", { method: "Performance.getMetrics" }); -const Performance_MetricsEvent = withCdpMeta(z.object({ "metrics": z.array(z.lazy(() => Performance_Metric)), "title": z.string() }).passthrough(), "Performance.metrics", "event", { phase: "event" }); -const PerformanceTimeline_LargestContentfulPaint = withCdpMeta(z.object({ "renderTime": z.lazy(() => Network_TimeSinceEpoch), "loadTime": z.lazy(() => Network_TimeSinceEpoch), "size": z.number(), "elementId": z.string().optional(), "url": z.string().optional(), "nodeId": z.lazy(() => DOM_BackendNodeId).optional() }).passthrough(), "PerformanceTimeline.LargestContentfulPaint", "type"); -const PerformanceTimeline_LayoutShiftAttribution = withCdpMeta(z.object({ "previousRect": z.lazy(() => DOM_Rect), "currentRect": z.lazy(() => DOM_Rect), "nodeId": z.lazy(() => DOM_BackendNodeId).optional() }).passthrough(), "PerformanceTimeline.LayoutShiftAttribution", "type"); -const PerformanceTimeline_LayoutShift = withCdpMeta(z.object({ "value": z.number(), "hadRecentInput": z.boolean(), "lastInputTime": z.lazy(() => Network_TimeSinceEpoch), "sources": z.array(z.lazy(() => PerformanceTimeline_LayoutShiftAttribution)) }).passthrough(), "PerformanceTimeline.LayoutShift", "type"); -const PerformanceTimeline_TimelineEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "type": z.string(), "name": z.string(), "time": z.lazy(() => Network_TimeSinceEpoch), "duration": z.number().optional(), "lcpDetails": z.lazy(() => PerformanceTimeline_LargestContentfulPaint).optional(), "layoutShiftDetails": z.lazy(() => PerformanceTimeline_LayoutShift).optional() }).passthrough(), "PerformanceTimeline.TimelineEvent", "type"); -const PerformanceTimeline_EnableParams = withCdpMeta(z.object({ "eventTypes": z.array(z.string()) }).passthrough(), "PerformanceTimeline.enable.params", "commandParams", { method: "PerformanceTimeline.enable" }); -const PerformanceTimeline_EnableResult = withCdpMeta(z.object({ }).passthrough(), "PerformanceTimeline.enable.result", "commandResult", { method: "PerformanceTimeline.enable" }); -const PerformanceTimeline_TimelineEventAddedEvent = withCdpMeta(z.object({ "event": z.lazy(() => PerformanceTimeline_TimelineEvent) }).passthrough(), "PerformanceTimeline.timelineEventAdded", "event", { phase: "event" }); -const Preload_RuleSetId = withCdpMeta(z.string(), "Preload.RuleSetId", "type"); -const Preload_RuleSet = withCdpMeta(z.object({ "id": z.lazy(() => Preload_RuleSetId), "loaderId": z.lazy(() => Network_LoaderId), "sourceText": z.string(), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "url": z.string().optional(), "requestId": z.lazy(() => Network_RequestId).optional(), "errorType": z.lazy(() => Preload_RuleSetErrorType).optional(), "errorMessage": z.string().optional(), "tag": z.string().optional() }).passthrough(), "Preload.RuleSet", "type"); -const Preload_RuleSetErrorType = withCdpMeta(z.enum(["SourceIsNotJsonObject", "InvalidRulesSkipped", "InvalidRulesetLevelTag"]), "Preload.RuleSetErrorType", "type"); -const Preload_SpeculationAction = withCdpMeta(z.enum(["Prefetch", "Prerender", "PrerenderUntilScript"]), "Preload.SpeculationAction", "type"); -const Preload_SpeculationTargetHint = withCdpMeta(z.enum(["Blank", "Self"]), "Preload.SpeculationTargetHint", "type"); -const Preload_PreloadingAttemptKey = withCdpMeta(z.object({ "loaderId": z.lazy(() => Network_LoaderId), "action": z.lazy(() => Preload_SpeculationAction), "url": z.string(), "formSubmission": z.boolean().optional(), "targetHint": z.lazy(() => Preload_SpeculationTargetHint).optional() }).passthrough(), "Preload.PreloadingAttemptKey", "type"); -const Preload_PreloadingAttemptSource = withCdpMeta(z.object({ "key": z.lazy(() => Preload_PreloadingAttemptKey), "ruleSetIds": z.array(z.lazy(() => Preload_RuleSetId)), "nodeIds": z.array(z.lazy(() => DOM_BackendNodeId)) }).passthrough(), "Preload.PreloadingAttemptSource", "type"); -const Preload_PreloadPipelineId = withCdpMeta(z.string(), "Preload.PreloadPipelineId", "type"); -const Preload_PrerenderFinalStatus = withCdpMeta(z.enum(["Activated", "Destroyed", "LowEndDevice", "InvalidSchemeRedirect", "InvalidSchemeNavigation", "NavigationRequestBlockedByCsp", "MojoBinderPolicy", "RendererProcessCrashed", "RendererProcessKilled", "Download", "TriggerDestroyed", "NavigationNotCommitted", "NavigationBadHttpStatus", "ClientCertRequested", "NavigationRequestNetworkError", "CancelAllHostsForTesting", "DidFailLoad", "Stop", "SslCertificateError", "LoginAuthRequested", "UaChangeRequiresReload", "BlockedByClient", "AudioOutputDeviceRequested", "MixedContent", "TriggerBackgrounded", "MemoryLimitExceeded", "DataSaverEnabled", "TriggerUrlHasEffectiveUrl", "ActivatedBeforeStarted", "InactivePageRestriction", "StartFailed", "TimeoutBackgrounded", "CrossSiteRedirectInInitialNavigation", "CrossSiteNavigationInInitialNavigation", "SameSiteCrossOriginRedirectNotOptInInInitialNavigation", "SameSiteCrossOriginNavigationNotOptInInInitialNavigation", "ActivationNavigationParameterMismatch", "ActivatedInBackground", "EmbedderHostDisallowed", "ActivationNavigationDestroyedBeforeSuccess", "TabClosedByUserGesture", "TabClosedWithoutUserGesture", "PrimaryMainFrameRendererProcessCrashed", "PrimaryMainFrameRendererProcessKilled", "ActivationFramePolicyNotCompatible", "PreloadingDisabled", "BatterySaverEnabled", "ActivatedDuringMainFrameNavigation", "PreloadingUnsupportedByWebContents", "CrossSiteRedirectInMainFrameNavigation", "CrossSiteNavigationInMainFrameNavigation", "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation", "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation", "MemoryPressureOnTrigger", "MemoryPressureAfterTriggered", "PrerenderingDisabledByDevTools", "SpeculationRuleRemoved", "ActivatedWithAuxiliaryBrowsingContexts", "MaxNumOfRunningEagerPrerendersExceeded", "MaxNumOfRunningNonEagerPrerendersExceeded", "MaxNumOfRunningEmbedderPrerendersExceeded", "PrerenderingUrlHasEffectiveUrl", "RedirectedPrerenderingUrlHasEffectiveUrl", "ActivationUrlHasEffectiveUrl", "JavaScriptInterfaceAdded", "JavaScriptInterfaceRemoved", "AllPrerenderingCanceled", "WindowClosed", "SlowNetwork", "OtherPrerenderedPageActivated", "V8OptimizerDisabled", "PrerenderFailedDuringPrefetch", "BrowsingDataRemoved", "PrerenderHostReused", "FormSubmitWhenPrerendering"]), "Preload.PrerenderFinalStatus", "type"); -const Preload_PreloadingStatus = withCdpMeta(z.enum(["Pending", "Running", "Ready", "Success", "Failure", "NotSupported"]), "Preload.PreloadingStatus", "type"); -const Preload_PrefetchStatus = withCdpMeta(z.enum(["PrefetchAllowed", "PrefetchFailedIneligibleRedirect", "PrefetchFailedInvalidRedirect", "PrefetchFailedMIMENotSupported", "PrefetchFailedNetError", "PrefetchFailedNon2XX", "PrefetchEvictedAfterBrowsingDataRemoved", "PrefetchEvictedAfterCandidateRemoved", "PrefetchEvictedForNewerPrefetch", "PrefetchHeldback", "PrefetchIneligibleRetryAfter", "PrefetchIsPrivacyDecoy", "PrefetchIsStale", "PrefetchNotEligibleBrowserContextOffTheRecord", "PrefetchNotEligibleDataSaverEnabled", "PrefetchNotEligibleExistingProxy", "PrefetchNotEligibleHostIsNonUnique", "PrefetchNotEligibleNonDefaultStoragePartition", "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy", "PrefetchNotEligibleSchemeIsNotHttps", "PrefetchNotEligibleUserHasCookies", "PrefetchNotEligibleUserHasServiceWorker", "PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler", "PrefetchNotEligibleRedirectFromServiceWorker", "PrefetchNotEligibleRedirectToServiceWorker", "PrefetchNotEligibleBatterySaverEnabled", "PrefetchNotEligiblePreloadingDisabled", "PrefetchNotFinishedInTime", "PrefetchNotStarted", "PrefetchNotUsedCookiesChanged", "PrefetchProxyNotAvailable", "PrefetchResponseUsed", "PrefetchSuccessfulButNotUsed", "PrefetchNotUsedProbeFailed"]), "Preload.PrefetchStatus", "type"); -const Preload_PrerenderMismatchedHeaders = withCdpMeta(z.object({ "headerName": z.string(), "initialValue": z.string().optional(), "activationValue": z.string().optional() }).passthrough(), "Preload.PrerenderMismatchedHeaders", "type"); -const Preload_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Preload.enable.params", "commandParams", { method: "Preload.enable" }); -const Preload_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Preload.enable.result", "commandResult", { method: "Preload.enable" }); -const Preload_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Preload.disable.params", "commandParams", { method: "Preload.disable" }); -const Preload_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Preload.disable.result", "commandResult", { method: "Preload.disable" }); -const Preload_RuleSetUpdatedEvent = withCdpMeta(z.object({ "ruleSet": z.lazy(() => Preload_RuleSet) }).passthrough(), "Preload.ruleSetUpdated", "event", { phase: "event" }); -const Preload_RuleSetRemovedEvent = withCdpMeta(z.object({ "id": z.lazy(() => Preload_RuleSetId) }).passthrough(), "Preload.ruleSetRemoved", "event", { phase: "event" }); -const Preload_PreloadEnabledStateUpdatedEvent = withCdpMeta(z.object({ "disabledByPreference": z.boolean(), "disabledByDataSaver": z.boolean(), "disabledByBatterySaver": z.boolean(), "disabledByHoldbackPrefetchSpeculationRules": z.boolean(), "disabledByHoldbackPrerenderSpeculationRules": z.boolean() }).passthrough(), "Preload.preloadEnabledStateUpdated", "event", { phase: "event" }); -const Preload_PrefetchStatusUpdatedEvent = withCdpMeta(z.object({ "key": z.lazy(() => Preload_PreloadingAttemptKey), "pipelineId": z.lazy(() => Preload_PreloadPipelineId), "initiatingFrameId": z.lazy(() => Page_FrameId), "prefetchUrl": z.string(), "status": z.lazy(() => Preload_PreloadingStatus), "prefetchStatus": z.lazy(() => Preload_PrefetchStatus), "requestId": z.lazy(() => Network_RequestId) }).passthrough(), "Preload.prefetchStatusUpdated", "event", { phase: "event" }); -const Preload_PrerenderStatusUpdatedEvent = withCdpMeta(z.object({ "key": z.lazy(() => Preload_PreloadingAttemptKey), "pipelineId": z.lazy(() => Preload_PreloadPipelineId), "status": z.lazy(() => Preload_PreloadingStatus), "prerenderStatus": z.lazy(() => Preload_PrerenderFinalStatus).optional(), "disallowedMojoInterface": z.string().optional(), "mismatchedHeaders": z.array(z.lazy(() => Preload_PrerenderMismatchedHeaders)).optional() }).passthrough(), "Preload.prerenderStatusUpdated", "event", { phase: "event" }); -const Preload_PreloadingAttemptSourcesUpdatedEvent = withCdpMeta(z.object({ "loaderId": z.lazy(() => Network_LoaderId), "preloadingAttemptSources": z.array(z.lazy(() => Preload_PreloadingAttemptSource)) }).passthrough(), "Preload.preloadingAttemptSourcesUpdated", "event", { phase: "event" }); -const Profiler_ProfileNode = withCdpMeta(z.object({ "id": z.number().int(), "callFrame": z.lazy(() => Runtime_CallFrame), "hitCount": z.number().int().optional(), "children": z.array(z.number().int()).optional(), "deoptReason": z.string().optional(), "positionTicks": z.array(z.lazy(() => Profiler_PositionTickInfo)).optional() }).passthrough(), "Profiler.ProfileNode", "type"); -const Profiler_Profile = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => Profiler_ProfileNode)), "startTime": z.number(), "endTime": z.number(), "samples": z.array(z.number().int()).optional(), "timeDeltas": z.array(z.number().int()).optional() }).passthrough(), "Profiler.Profile", "type"); -const Profiler_PositionTickInfo = withCdpMeta(z.object({ "line": z.number().int(), "ticks": z.number().int() }).passthrough(), "Profiler.PositionTickInfo", "type"); -const Profiler_CoverageRange = withCdpMeta(z.object({ "startOffset": z.number().int(), "endOffset": z.number().int(), "count": z.number().int() }).passthrough(), "Profiler.CoverageRange", "type"); -const Profiler_FunctionCoverage = withCdpMeta(z.object({ "functionName": z.string(), "ranges": z.array(z.lazy(() => Profiler_CoverageRange)), "isBlockCoverage": z.boolean() }).passthrough(), "Profiler.FunctionCoverage", "type"); -const Profiler_ScriptCoverage = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "url": z.string(), "functions": z.array(z.lazy(() => Profiler_FunctionCoverage)) }).passthrough(), "Profiler.ScriptCoverage", "type"); -const Profiler_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.disable.params", "commandParams", { method: "Profiler.disable" }); -const Profiler_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Profiler.disable.result", "commandResult", { method: "Profiler.disable" }); -const Profiler_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.enable.params", "commandParams", { method: "Profiler.enable" }); -const Profiler_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Profiler.enable.result", "commandResult", { method: "Profiler.enable" }); -const Profiler_GetBestEffortCoverageParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.getBestEffortCoverage.params", "commandParams", { method: "Profiler.getBestEffortCoverage" }); -const Profiler_GetBestEffortCoverageResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => Profiler_ScriptCoverage)) }).passthrough(), "Profiler.getBestEffortCoverage.result", "commandResult", { method: "Profiler.getBestEffortCoverage" }); -const Profiler_SetSamplingIntervalParams = withCdpMeta(z.object({ "interval": z.number().int() }).passthrough(), "Profiler.setSamplingInterval.params", "commandParams", { method: "Profiler.setSamplingInterval" }); -const Profiler_SetSamplingIntervalResult = withCdpMeta(z.object({ }).passthrough(), "Profiler.setSamplingInterval.result", "commandResult", { method: "Profiler.setSamplingInterval" }); -const Profiler_StartParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.start.params", "commandParams", { method: "Profiler.start" }); -const Profiler_StartResult = withCdpMeta(z.object({ }).passthrough(), "Profiler.start.result", "commandResult", { method: "Profiler.start" }); -const Profiler_StartPreciseCoverageParams = withCdpMeta(z.object({ "callCount": z.boolean().optional(), "detailed": z.boolean().optional(), "allowTriggeredUpdates": z.boolean().optional() }).passthrough(), "Profiler.startPreciseCoverage.params", "commandParams", { method: "Profiler.startPreciseCoverage" }); -const Profiler_StartPreciseCoverageResult = withCdpMeta(z.object({ "timestamp": z.number() }).passthrough(), "Profiler.startPreciseCoverage.result", "commandResult", { method: "Profiler.startPreciseCoverage" }); -const Profiler_StopParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.stop.params", "commandParams", { method: "Profiler.stop" }); -const Profiler_StopResult = withCdpMeta(z.object({ "profile": z.lazy(() => Profiler_Profile) }).passthrough(), "Profiler.stop.result", "commandResult", { method: "Profiler.stop" }); -const Profiler_StopPreciseCoverageParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.stopPreciseCoverage.params", "commandParams", { method: "Profiler.stopPreciseCoverage" }); -const Profiler_StopPreciseCoverageResult = withCdpMeta(z.object({ }).passthrough(), "Profiler.stopPreciseCoverage.result", "commandResult", { method: "Profiler.stopPreciseCoverage" }); -const Profiler_TakePreciseCoverageParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.takePreciseCoverage.params", "commandParams", { method: "Profiler.takePreciseCoverage" }); -const Profiler_TakePreciseCoverageResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => Profiler_ScriptCoverage)), "timestamp": z.number() }).passthrough(), "Profiler.takePreciseCoverage.result", "commandResult", { method: "Profiler.takePreciseCoverage" }); -const Profiler_ConsoleProfileFinishedEvent = withCdpMeta(z.object({ "id": z.string(), "location": z.lazy(() => Debugger_Location), "profile": z.lazy(() => Profiler_Profile), "title": z.string().optional() }).passthrough(), "Profiler.consoleProfileFinished", "event", { phase: "event" }); -const Profiler_ConsoleProfileStartedEvent = withCdpMeta(z.object({ "id": z.string(), "location": z.lazy(() => Debugger_Location), "title": z.string().optional() }).passthrough(), "Profiler.consoleProfileStarted", "event", { phase: "event" }); -const Profiler_PreciseCoverageDeltaUpdateEvent = withCdpMeta(z.object({ "timestamp": z.number(), "occasion": z.string(), "result": z.array(z.lazy(() => Profiler_ScriptCoverage)) }).passthrough(), "Profiler.preciseCoverageDeltaUpdate", "event", { phase: "event" }); -const PWA_FileHandlerAccept = withCdpMeta(z.object({ "mediaType": z.string(), "fileExtensions": z.array(z.string()) }).passthrough(), "PWA.FileHandlerAccept", "type"); -const PWA_FileHandler = withCdpMeta(z.object({ "action": z.string(), "accepts": z.array(z.lazy(() => PWA_FileHandlerAccept)), "displayName": z.string() }).passthrough(), "PWA.FileHandler", "type"); -const PWA_DisplayMode = withCdpMeta(z.enum(["standalone", "browser"]), "PWA.DisplayMode", "type"); -const PWA_GetOsAppStateParams = withCdpMeta(z.object({ "manifestId": z.string() }).passthrough(), "PWA.getOsAppState.params", "commandParams", { method: "PWA.getOsAppState" }); -const PWA_GetOsAppStateResult = withCdpMeta(z.object({ "badgeCount": z.number().int(), "fileHandlers": z.array(z.lazy(() => PWA_FileHandler)) }).passthrough(), "PWA.getOsAppState.result", "commandResult", { method: "PWA.getOsAppState" }); -const PWA_InstallParams = withCdpMeta(z.object({ "manifestId": z.string(), "installUrlOrBundleUrl": z.string().optional() }).passthrough(), "PWA.install.params", "commandParams", { method: "PWA.install" }); -const PWA_InstallResult = withCdpMeta(z.object({ }).passthrough(), "PWA.install.result", "commandResult", { method: "PWA.install" }); -const PWA_UninstallParams = withCdpMeta(z.object({ "manifestId": z.string() }).passthrough(), "PWA.uninstall.params", "commandParams", { method: "PWA.uninstall" }); -const PWA_UninstallResult = withCdpMeta(z.object({ }).passthrough(), "PWA.uninstall.result", "commandResult", { method: "PWA.uninstall" }); -const PWA_LaunchParams = withCdpMeta(z.object({ "manifestId": z.string(), "url": z.string().optional() }).passthrough(), "PWA.launch.params", "commandParams", { method: "PWA.launch" }); -const PWA_LaunchResult = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID) }).passthrough(), "PWA.launch.result", "commandResult", { method: "PWA.launch" }); -const PWA_LaunchFilesInAppParams = withCdpMeta(z.object({ "manifestId": z.string(), "files": z.array(z.string()) }).passthrough(), "PWA.launchFilesInApp.params", "commandParams", { method: "PWA.launchFilesInApp" }); -const PWA_LaunchFilesInAppResult = withCdpMeta(z.object({ "targetIds": z.array(z.lazy(() => Target_TargetID)) }).passthrough(), "PWA.launchFilesInApp.result", "commandResult", { method: "PWA.launchFilesInApp" }); -const PWA_OpenCurrentPageInAppParams = withCdpMeta(z.object({ "manifestId": z.string() }).passthrough(), "PWA.openCurrentPageInApp.params", "commandParams", { method: "PWA.openCurrentPageInApp" }); -const PWA_OpenCurrentPageInAppResult = withCdpMeta(z.object({ }).passthrough(), "PWA.openCurrentPageInApp.result", "commandResult", { method: "PWA.openCurrentPageInApp" }); -const PWA_ChangeAppUserSettingsParams = withCdpMeta(z.object({ "manifestId": z.string(), "linkCapturing": z.boolean().optional(), "displayMode": z.lazy(() => PWA_DisplayMode).optional() }).passthrough(), "PWA.changeAppUserSettings.params", "commandParams", { method: "PWA.changeAppUserSettings" }); -const PWA_ChangeAppUserSettingsResult = withCdpMeta(z.object({ }).passthrough(), "PWA.changeAppUserSettings.result", "commandResult", { method: "PWA.changeAppUserSettings" }); -const Runtime_ScriptId = withCdpMeta(z.string(), "Runtime.ScriptId", "type"); -const Runtime_SerializationOptions = withCdpMeta(z.object({ "serialization": z.enum(["deep", "json", "idOnly"]), "maxDepth": z.number().int().optional(), "additionalParameters": z.record(z.string(), z.unknown()).optional() }).passthrough(), "Runtime.SerializationOptions", "type"); -const Runtime_DeepSerializedValue = withCdpMeta(z.object({ "type": z.enum(["undefined", "null", "string", "number", "boolean", "bigint", "regexp", "date", "symbol", "array", "object", "function", "map", "set", "weakmap", "weakset", "error", "proxy", "promise", "typedarray", "arraybuffer", "node", "window", "generator"]), "value": z.any().optional(), "objectId": z.string().optional(), "weakLocalObjectReference": z.number().int().optional() }).passthrough(), "Runtime.DeepSerializedValue", "type"); -const Runtime_RemoteObjectId = withCdpMeta(z.string(), "Runtime.RemoteObjectId", "type"); -const Runtime_UnserializableValue = withCdpMeta(z.string(), "Runtime.UnserializableValue", "type"); -const Runtime_RemoteObject = withCdpMeta(z.object({ "type": z.enum(["object", "function", "undefined", "string", "number", "boolean", "symbol", "bigint"]), "subtype": z.enum(["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray", "arraybuffer", "dataview", "webassemblymemory", "wasmvalue", "trustedtype"]).optional(), "className": z.string().optional(), "value": z.any().optional(), "unserializableValue": z.lazy(() => Runtime_UnserializableValue).optional(), "description": z.string().optional(), "deepSerializedValue": z.lazy(() => Runtime_DeepSerializedValue).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional(), "preview": z.lazy(() => Runtime_ObjectPreview).optional(), "customPreview": z.lazy(() => Runtime_CustomPreview).optional() }).passthrough(), "Runtime.RemoteObject", "type"); -const Runtime_CustomPreview = withCdpMeta(z.object({ "header": z.string(), "bodyGetterId": z.lazy(() => Runtime_RemoteObjectId).optional() }).passthrough(), "Runtime.CustomPreview", "type"); -const Runtime_ObjectPreview = withCdpMeta(z.object({ "type": z.enum(["object", "function", "undefined", "string", "number", "boolean", "symbol", "bigint"]), "subtype": z.enum(["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray", "arraybuffer", "dataview", "webassemblymemory", "wasmvalue", "trustedtype"]).optional(), "description": z.string().optional(), "overflow": z.boolean(), "properties": z.array(z.lazy(() => Runtime_PropertyPreview)), "entries": z.array(z.lazy(() => Runtime_EntryPreview)).optional() }).passthrough(), "Runtime.ObjectPreview", "type"); -const Runtime_PropertyPreview = withCdpMeta(z.object({ "name": z.string(), "type": z.enum(["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor", "bigint"]), "value": z.string().optional(), "valuePreview": z.lazy(() => Runtime_ObjectPreview).optional(), "subtype": z.enum(["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray", "arraybuffer", "dataview", "webassemblymemory", "wasmvalue", "trustedtype"]).optional() }).passthrough(), "Runtime.PropertyPreview", "type"); -const Runtime_EntryPreview = withCdpMeta(z.object({ "key": z.lazy(() => Runtime_ObjectPreview).optional(), "value": z.lazy(() => Runtime_ObjectPreview) }).passthrough(), "Runtime.EntryPreview", "type"); -const Runtime_PropertyDescriptor = withCdpMeta(z.object({ "name": z.string(), "value": z.lazy(() => Runtime_RemoteObject).optional(), "writable": z.boolean().optional(), "get": z.lazy(() => Runtime_RemoteObject).optional(), "set": z.lazy(() => Runtime_RemoteObject).optional(), "configurable": z.boolean(), "enumerable": z.boolean(), "wasThrown": z.boolean().optional(), "isOwn": z.boolean().optional(), "symbol": z.lazy(() => Runtime_RemoteObject).optional() }).passthrough(), "Runtime.PropertyDescriptor", "type"); -const Runtime_InternalPropertyDescriptor = withCdpMeta(z.object({ "name": z.string(), "value": z.lazy(() => Runtime_RemoteObject).optional() }).passthrough(), "Runtime.InternalPropertyDescriptor", "type"); -const Runtime_PrivatePropertyDescriptor = withCdpMeta(z.object({ "name": z.string(), "value": z.lazy(() => Runtime_RemoteObject).optional(), "get": z.lazy(() => Runtime_RemoteObject).optional(), "set": z.lazy(() => Runtime_RemoteObject).optional() }).passthrough(), "Runtime.PrivatePropertyDescriptor", "type"); -const Runtime_CallArgument = withCdpMeta(z.object({ "value": z.any().optional(), "unserializableValue": z.lazy(() => Runtime_UnserializableValue).optional(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional() }).passthrough(), "Runtime.CallArgument", "type"); -const Runtime_ExecutionContextId = withCdpMeta(z.number().int(), "Runtime.ExecutionContextId", "type"); -const Runtime_ExecutionContextDescription = withCdpMeta(z.object({ "id": z.lazy(() => Runtime_ExecutionContextId), "origin": z.string(), "name": z.string(), "uniqueId": z.string(), "auxData": z.record(z.string(), z.unknown()).optional() }).passthrough(), "Runtime.ExecutionContextDescription", "type"); -const Runtime_ExceptionDetails = withCdpMeta(z.object({ "exceptionId": z.number().int(), "text": z.string(), "lineNumber": z.number().int(), "columnNumber": z.number().int(), "scriptId": z.lazy(() => Runtime_ScriptId).optional(), "url": z.string().optional(), "stackTrace": z.lazy(() => Runtime_StackTrace).optional(), "exception": z.lazy(() => Runtime_RemoteObject).optional(), "executionContextId": z.lazy(() => Runtime_ExecutionContextId).optional(), "exceptionMetaData": z.record(z.string(), z.unknown()).optional() }).passthrough(), "Runtime.ExceptionDetails", "type"); -const Runtime_Timestamp = withCdpMeta(z.number(), "Runtime.Timestamp", "type"); -const Runtime_TimeDelta = withCdpMeta(z.number(), "Runtime.TimeDelta", "type"); -const Runtime_CallFrame = withCdpMeta(z.object({ "functionName": z.string(), "scriptId": z.lazy(() => Runtime_ScriptId), "url": z.string(), "lineNumber": z.number().int(), "columnNumber": z.number().int() }).passthrough(), "Runtime.CallFrame", "type"); -const Runtime_StackTrace = withCdpMeta(z.object({ "description": z.string().optional(), "callFrames": z.array(z.lazy(() => Runtime_CallFrame)), "parent": z.lazy(() => Runtime_StackTrace).optional(), "parentId": z.lazy(() => Runtime_StackTraceId).optional() }).passthrough(), "Runtime.StackTrace", "type"); -const Runtime_UniqueDebuggerId = withCdpMeta(z.string(), "Runtime.UniqueDebuggerId", "type"); -const Runtime_StackTraceId = withCdpMeta(z.object({ "id": z.string(), "debuggerId": z.lazy(() => Runtime_UniqueDebuggerId).optional() }).passthrough(), "Runtime.StackTraceId", "type"); -const Runtime_AwaitPromiseParams = withCdpMeta(z.object({ "promiseObjectId": z.lazy(() => Runtime_RemoteObjectId), "returnByValue": z.boolean().optional(), "generatePreview": z.boolean().optional() }).passthrough(), "Runtime.awaitPromise.params", "commandParams", { method: "Runtime.awaitPromise" }); -const Runtime_AwaitPromiseResult = withCdpMeta(z.object({ "result": z.lazy(() => Runtime_RemoteObject), "exceptionDetails": z.lazy(() => Runtime_ExceptionDetails).optional() }).passthrough(), "Runtime.awaitPromise.result", "commandResult", { method: "Runtime.awaitPromise" }); -const Runtime_CallFunctionOnParams = withCdpMeta(z.object({ "functionDeclaration": z.string(), "objectId": z.lazy(() => Runtime_RemoteObjectId).optional(), "arguments": z.array(z.lazy(() => Runtime_CallArgument)).optional(), "silent": z.boolean().optional(), "returnByValue": z.boolean().optional(), "generatePreview": z.boolean().optional(), "userGesture": z.boolean().optional(), "awaitPromise": z.boolean().optional(), "executionContextId": z.lazy(() => Runtime_ExecutionContextId).optional(), "objectGroup": z.string().optional(), "throwOnSideEffect": z.boolean().optional(), "uniqueContextId": z.string().optional(), "serializationOptions": z.lazy(() => Runtime_SerializationOptions).optional() }).passthrough(), "Runtime.callFunctionOn.params", "commandParams", { method: "Runtime.callFunctionOn" }); -const Runtime_CallFunctionOnResult = withCdpMeta(z.object({ "result": z.lazy(() => Runtime_RemoteObject), "exceptionDetails": z.lazy(() => Runtime_ExceptionDetails).optional() }).passthrough(), "Runtime.callFunctionOn.result", "commandResult", { method: "Runtime.callFunctionOn" }); -const Runtime_CompileScriptParams = withCdpMeta(z.object({ "expression": z.string(), "sourceURL": z.string(), "persistScript": z.boolean(), "executionContextId": z.lazy(() => Runtime_ExecutionContextId).optional() }).passthrough(), "Runtime.compileScript.params", "commandParams", { method: "Runtime.compileScript" }); -const Runtime_CompileScriptResult = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId).optional(), "exceptionDetails": z.lazy(() => Runtime_ExceptionDetails).optional() }).passthrough(), "Runtime.compileScript.result", "commandResult", { method: "Runtime.compileScript" }); -const Runtime_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.disable.params", "commandParams", { method: "Runtime.disable" }); -const Runtime_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.disable.result", "commandResult", { method: "Runtime.disable" }); -const Runtime_DiscardConsoleEntriesParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.discardConsoleEntries.params", "commandParams", { method: "Runtime.discardConsoleEntries" }); -const Runtime_DiscardConsoleEntriesResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.discardConsoleEntries.result", "commandResult", { method: "Runtime.discardConsoleEntries" }); -const Runtime_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.enable.params", "commandParams", { method: "Runtime.enable" }); -const Runtime_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.enable.result", "commandResult", { method: "Runtime.enable" }); -const Runtime_EvaluateParams = withCdpMeta(z.object({ "expression": z.string(), "objectGroup": z.string().optional(), "includeCommandLineAPI": z.boolean().optional(), "silent": z.boolean().optional(), "contextId": z.lazy(() => Runtime_ExecutionContextId).optional(), "returnByValue": z.boolean().optional(), "generatePreview": z.boolean().optional(), "userGesture": z.boolean().optional(), "awaitPromise": z.boolean().optional(), "throwOnSideEffect": z.boolean().optional(), "timeout": z.lazy(() => Runtime_TimeDelta).optional(), "disableBreaks": z.boolean().optional(), "replMode": z.boolean().optional(), "allowUnsafeEvalBlockedByCSP": z.boolean().optional(), "uniqueContextId": z.string().optional(), "serializationOptions": z.lazy(() => Runtime_SerializationOptions).optional() }).passthrough(), "Runtime.evaluate.params", "commandParams", { method: "Runtime.evaluate" }); -const Runtime_EvaluateResult = withCdpMeta(z.object({ "result": z.lazy(() => Runtime_RemoteObject), "exceptionDetails": z.lazy(() => Runtime_ExceptionDetails).optional() }).passthrough(), "Runtime.evaluate.result", "commandResult", { method: "Runtime.evaluate" }); -const Runtime_GetIsolateIdParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.getIsolateId.params", "commandParams", { method: "Runtime.getIsolateId" }); -const Runtime_GetIsolateIdResult = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Runtime.getIsolateId.result", "commandResult", { method: "Runtime.getIsolateId" }); -const Runtime_GetHeapUsageParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.getHeapUsage.params", "commandParams", { method: "Runtime.getHeapUsage" }); -const Runtime_GetHeapUsageResult = withCdpMeta(z.object({ "usedSize": z.number(), "totalSize": z.number(), "embedderHeapUsedSize": z.number(), "backingStorageSize": z.number() }).passthrough(), "Runtime.getHeapUsage.result", "commandResult", { method: "Runtime.getHeapUsage" }); -const Runtime_GetPropertiesParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime_RemoteObjectId), "ownProperties": z.boolean().optional(), "accessorPropertiesOnly": z.boolean().optional(), "generatePreview": z.boolean().optional(), "nonIndexedPropertiesOnly": z.boolean().optional() }).passthrough(), "Runtime.getProperties.params", "commandParams", { method: "Runtime.getProperties" }); -const Runtime_GetPropertiesResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => Runtime_PropertyDescriptor)), "internalProperties": z.array(z.lazy(() => Runtime_InternalPropertyDescriptor)).optional(), "privateProperties": z.array(z.lazy(() => Runtime_PrivatePropertyDescriptor)).optional(), "exceptionDetails": z.lazy(() => Runtime_ExceptionDetails).optional() }).passthrough(), "Runtime.getProperties.result", "commandResult", { method: "Runtime.getProperties" }); -const Runtime_GlobalLexicalScopeNamesParams = withCdpMeta(z.object({ "executionContextId": z.lazy(() => Runtime_ExecutionContextId).optional() }).passthrough(), "Runtime.globalLexicalScopeNames.params", "commandParams", { method: "Runtime.globalLexicalScopeNames" }); -const Runtime_GlobalLexicalScopeNamesResult = withCdpMeta(z.object({ "names": z.array(z.string()) }).passthrough(), "Runtime.globalLexicalScopeNames.result", "commandResult", { method: "Runtime.globalLexicalScopeNames" }); -const Runtime_QueryObjectsParams = withCdpMeta(z.object({ "prototypeObjectId": z.lazy(() => Runtime_RemoteObjectId), "objectGroup": z.string().optional() }).passthrough(), "Runtime.queryObjects.params", "commandParams", { method: "Runtime.queryObjects" }); -const Runtime_QueryObjectsResult = withCdpMeta(z.object({ "objects": z.lazy(() => Runtime_RemoteObject) }).passthrough(), "Runtime.queryObjects.result", "commandResult", { method: "Runtime.queryObjects" }); -const Runtime_ReleaseObjectParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime_RemoteObjectId) }).passthrough(), "Runtime.releaseObject.params", "commandParams", { method: "Runtime.releaseObject" }); -const Runtime_ReleaseObjectResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.releaseObject.result", "commandResult", { method: "Runtime.releaseObject" }); -const Runtime_ReleaseObjectGroupParams = withCdpMeta(z.object({ "objectGroup": z.string() }).passthrough(), "Runtime.releaseObjectGroup.params", "commandParams", { method: "Runtime.releaseObjectGroup" }); -const Runtime_ReleaseObjectGroupResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.releaseObjectGroup.result", "commandResult", { method: "Runtime.releaseObjectGroup" }); -const Runtime_RunIfWaitingForDebuggerParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.runIfWaitingForDebugger.params", "commandParams", { method: "Runtime.runIfWaitingForDebugger" }); -const Runtime_RunIfWaitingForDebuggerResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.runIfWaitingForDebugger.result", "commandResult", { method: "Runtime.runIfWaitingForDebugger" }); -const Runtime_RunScriptParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime_ScriptId), "executionContextId": z.lazy(() => Runtime_ExecutionContextId).optional(), "objectGroup": z.string().optional(), "silent": z.boolean().optional(), "includeCommandLineAPI": z.boolean().optional(), "returnByValue": z.boolean().optional(), "generatePreview": z.boolean().optional(), "awaitPromise": z.boolean().optional() }).passthrough(), "Runtime.runScript.params", "commandParams", { method: "Runtime.runScript" }); -const Runtime_RunScriptResult = withCdpMeta(z.object({ "result": z.lazy(() => Runtime_RemoteObject), "exceptionDetails": z.lazy(() => Runtime_ExceptionDetails).optional() }).passthrough(), "Runtime.runScript.result", "commandResult", { method: "Runtime.runScript" }); -const Runtime_SetAsyncCallStackDepthParams = withCdpMeta(z.object({ "maxDepth": z.number().int() }).passthrough(), "Runtime.setAsyncCallStackDepth.params", "commandParams", { method: "Runtime.setAsyncCallStackDepth" }); -const Runtime_SetAsyncCallStackDepthResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.setAsyncCallStackDepth.result", "commandResult", { method: "Runtime.setAsyncCallStackDepth" }); -const Runtime_SetCustomObjectFormatterEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Runtime.setCustomObjectFormatterEnabled.params", "commandParams", { method: "Runtime.setCustomObjectFormatterEnabled" }); -const Runtime_SetCustomObjectFormatterEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.setCustomObjectFormatterEnabled.result", "commandResult", { method: "Runtime.setCustomObjectFormatterEnabled" }); -const Runtime_SetMaxCallStackSizeToCaptureParams = withCdpMeta(z.object({ "size": z.number().int() }).passthrough(), "Runtime.setMaxCallStackSizeToCapture.params", "commandParams", { method: "Runtime.setMaxCallStackSizeToCapture" }); -const Runtime_SetMaxCallStackSizeToCaptureResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.setMaxCallStackSizeToCapture.result", "commandResult", { method: "Runtime.setMaxCallStackSizeToCapture" }); -const Runtime_TerminateExecutionParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.terminateExecution.params", "commandParams", { method: "Runtime.terminateExecution" }); -const Runtime_TerminateExecutionResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.terminateExecution.result", "commandResult", { method: "Runtime.terminateExecution" }); -const Runtime_AddBindingParams = withCdpMeta(z.object({ "name": z.string(), "executionContextId": z.lazy(() => Runtime_ExecutionContextId).optional(), "executionContextName": z.string().optional() }).passthrough(), "Runtime.addBinding.params", "commandParams", { method: "Runtime.addBinding" }); -const Runtime_AddBindingResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.addBinding.result", "commandResult", { method: "Runtime.addBinding" }); -const Runtime_RemoveBindingParams = withCdpMeta(z.object({ "name": z.string() }).passthrough(), "Runtime.removeBinding.params", "commandParams", { method: "Runtime.removeBinding" }); -const Runtime_RemoveBindingResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.removeBinding.result", "commandResult", { method: "Runtime.removeBinding" }); -const Runtime_GetExceptionDetailsParams = withCdpMeta(z.object({ "errorObjectId": z.lazy(() => Runtime_RemoteObjectId) }).passthrough(), "Runtime.getExceptionDetails.params", "commandParams", { method: "Runtime.getExceptionDetails" }); -const Runtime_GetExceptionDetailsResult = withCdpMeta(z.object({ "exceptionDetails": z.lazy(() => Runtime_ExceptionDetails).optional() }).passthrough(), "Runtime.getExceptionDetails.result", "commandResult", { method: "Runtime.getExceptionDetails" }); -const Runtime_BindingCalledEvent = withCdpMeta(z.object({ "name": z.string(), "payload": z.string(), "executionContextId": z.lazy(() => Runtime_ExecutionContextId) }).passthrough(), "Runtime.bindingCalled", "event", { phase: "event" }); -const Runtime_ConsoleAPICalledEvent = withCdpMeta(z.object({ "type": z.enum(["log", "debug", "info", "error", "warning", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd", "count", "timeEnd"]), "args": z.array(z.lazy(() => Runtime_RemoteObject)), "executionContextId": z.lazy(() => Runtime_ExecutionContextId), "timestamp": z.lazy(() => Runtime_Timestamp), "stackTrace": z.lazy(() => Runtime_StackTrace).optional(), "context": z.string().optional() }).passthrough(), "Runtime.consoleAPICalled", "event", { phase: "event" }); -const Runtime_ExceptionRevokedEvent = withCdpMeta(z.object({ "reason": z.string(), "exceptionId": z.number().int() }).passthrough(), "Runtime.exceptionRevoked", "event", { phase: "event" }); -const Runtime_ExceptionThrownEvent = withCdpMeta(z.object({ "timestamp": z.lazy(() => Runtime_Timestamp), "exceptionDetails": z.lazy(() => Runtime_ExceptionDetails) }).passthrough(), "Runtime.exceptionThrown", "event", { phase: "event" }); -const Runtime_ExecutionContextCreatedEvent = withCdpMeta(z.object({ "context": z.lazy(() => Runtime_ExecutionContextDescription) }).passthrough(), "Runtime.executionContextCreated", "event", { phase: "event" }); -const Runtime_ExecutionContextDestroyedEvent = withCdpMeta(z.object({ "executionContextId": z.lazy(() => Runtime_ExecutionContextId), "executionContextUniqueId": z.string() }).passthrough(), "Runtime.executionContextDestroyed", "event", { phase: "event" }); -const Runtime_ExecutionContextsClearedEvent = withCdpMeta(z.object({ }).passthrough(), "Runtime.executionContextsCleared", "event", { phase: "event" }); -const Runtime_InspectRequestedEvent = withCdpMeta(z.object({ "object": z.lazy(() => Runtime_RemoteObject), "hints": z.record(z.string(), z.unknown()), "executionContextId": z.lazy(() => Runtime_ExecutionContextId).optional() }).passthrough(), "Runtime.inspectRequested", "event", { phase: "event" }); -const Schema_Domain = withCdpMeta(z.object({ "name": z.string(), "version": z.string() }).passthrough(), "Schema.Domain", "type"); -const Schema_GetDomainsParams = withCdpMeta(z.object({ }).passthrough(), "Schema.getDomains.params", "commandParams", { method: "Schema.getDomains" }); -const Schema_GetDomainsResult = withCdpMeta(z.object({ "domains": z.array(z.lazy(() => Schema_Domain)) }).passthrough(), "Schema.getDomains.result", "commandResult", { method: "Schema.getDomains" }); -const Security_CertificateId = withCdpMeta(z.number().int(), "Security.CertificateId", "type"); -const Security_MixedContentType = withCdpMeta(z.enum(["blockable", "optionally-blockable", "none"]), "Security.MixedContentType", "type"); -const Security_SecurityState = withCdpMeta(z.enum(["unknown", "neutral", "insecure", "secure", "info", "insecure-broken"]), "Security.SecurityState", "type"); -const Security_CertificateSecurityState = withCdpMeta(z.object({ "protocol": z.string(), "keyExchange": z.string(), "keyExchangeGroup": z.string().optional(), "cipher": z.string(), "mac": z.string().optional(), "certificate": z.array(z.string()), "subjectName": z.string(), "issuer": z.string(), "validFrom": z.lazy(() => Network_TimeSinceEpoch), "validTo": z.lazy(() => Network_TimeSinceEpoch), "certificateNetworkError": z.string().optional(), "certificateHasWeakSignature": z.boolean(), "certificateHasSha1Signature": z.boolean(), "modernSSL": z.boolean(), "obsoleteSslProtocol": z.boolean(), "obsoleteSslKeyExchange": z.boolean(), "obsoleteSslCipher": z.boolean(), "obsoleteSslSignature": z.boolean() }).passthrough(), "Security.CertificateSecurityState", "type"); -const Security_SafetyTipStatus = withCdpMeta(z.enum(["badReputation", "lookalike"]), "Security.SafetyTipStatus", "type"); -const Security_SafetyTipInfo = withCdpMeta(z.object({ "safetyTipStatus": z.lazy(() => Security_SafetyTipStatus), "safeUrl": z.string().optional() }).passthrough(), "Security.SafetyTipInfo", "type"); -const Security_VisibleSecurityState = withCdpMeta(z.object({ "securityState": z.lazy(() => Security_SecurityState), "certificateSecurityState": z.lazy(() => Security_CertificateSecurityState).optional(), "safetyTipInfo": z.lazy(() => Security_SafetyTipInfo).optional(), "securityStateIssueIds": z.array(z.string()) }).passthrough(), "Security.VisibleSecurityState", "type"); -const Security_SecurityStateExplanation = withCdpMeta(z.object({ "securityState": z.lazy(() => Security_SecurityState), "title": z.string(), "summary": z.string(), "description": z.string(), "mixedContentType": z.lazy(() => Security_MixedContentType), "certificate": z.array(z.string()), "recommendations": z.array(z.string()).optional() }).passthrough(), "Security.SecurityStateExplanation", "type"); -const Security_InsecureContentStatus = withCdpMeta(z.object({ "ranMixedContent": z.boolean(), "displayedMixedContent": z.boolean(), "containedMixedForm": z.boolean(), "ranContentWithCertErrors": z.boolean(), "displayedContentWithCertErrors": z.boolean(), "ranInsecureContentStyle": z.lazy(() => Security_SecurityState), "displayedInsecureContentStyle": z.lazy(() => Security_SecurityState) }).passthrough(), "Security.InsecureContentStatus", "type"); -const Security_CertificateErrorAction = withCdpMeta(z.enum(["continue", "cancel"]), "Security.CertificateErrorAction", "type"); -const Security_DisableParams = withCdpMeta(z.object({ }).passthrough(), "Security.disable.params", "commandParams", { method: "Security.disable" }); -const Security_DisableResult = withCdpMeta(z.object({ }).passthrough(), "Security.disable.result", "commandResult", { method: "Security.disable" }); -const Security_EnableParams = withCdpMeta(z.object({ }).passthrough(), "Security.enable.params", "commandParams", { method: "Security.enable" }); -const Security_EnableResult = withCdpMeta(z.object({ }).passthrough(), "Security.enable.result", "commandResult", { method: "Security.enable" }); -const Security_SetIgnoreCertificateErrorsParams = withCdpMeta(z.object({ "ignore": z.boolean() }).passthrough(), "Security.setIgnoreCertificateErrors.params", "commandParams", { method: "Security.setIgnoreCertificateErrors" }); -const Security_SetIgnoreCertificateErrorsResult = withCdpMeta(z.object({ }).passthrough(), "Security.setIgnoreCertificateErrors.result", "commandResult", { method: "Security.setIgnoreCertificateErrors" }); -const Security_HandleCertificateErrorParams = withCdpMeta(z.object({ "eventId": z.number().int(), "action": z.lazy(() => Security_CertificateErrorAction) }).passthrough(), "Security.handleCertificateError.params", "commandParams", { method: "Security.handleCertificateError" }); -const Security_HandleCertificateErrorResult = withCdpMeta(z.object({ }).passthrough(), "Security.handleCertificateError.result", "commandResult", { method: "Security.handleCertificateError" }); -const Security_SetOverrideCertificateErrorsParams = withCdpMeta(z.object({ "override": z.boolean() }).passthrough(), "Security.setOverrideCertificateErrors.params", "commandParams", { method: "Security.setOverrideCertificateErrors" }); -const Security_SetOverrideCertificateErrorsResult = withCdpMeta(z.object({ }).passthrough(), "Security.setOverrideCertificateErrors.result", "commandResult", { method: "Security.setOverrideCertificateErrors" }); -const Security_CertificateErrorEvent = withCdpMeta(z.object({ "eventId": z.number().int(), "errorType": z.string(), "requestURL": z.string() }).passthrough(), "Security.certificateError", "event", { phase: "event" }); -const Security_VisibleSecurityStateChangedEvent = withCdpMeta(z.object({ "visibleSecurityState": z.lazy(() => Security_VisibleSecurityState) }).passthrough(), "Security.visibleSecurityStateChanged", "event", { phase: "event" }); -const Security_SecurityStateChangedEvent = withCdpMeta(z.object({ "securityState": z.lazy(() => Security_SecurityState), "schemeIsCryptographic": z.boolean(), "explanations": z.array(z.lazy(() => Security_SecurityStateExplanation)), "insecureContentStatus": z.lazy(() => Security_InsecureContentStatus), "summary": z.string().optional() }).passthrough(), "Security.securityStateChanged", "event", { phase: "event" }); -const ServiceWorker_RegistrationID = withCdpMeta(z.string(), "ServiceWorker.RegistrationID", "type"); -const ServiceWorker_ServiceWorkerRegistration = withCdpMeta(z.object({ "registrationId": z.lazy(() => ServiceWorker_RegistrationID), "scopeURL": z.string(), "isDeleted": z.boolean() }).passthrough(), "ServiceWorker.ServiceWorkerRegistration", "type"); -const ServiceWorker_ServiceWorkerVersionRunningStatus = withCdpMeta(z.enum(["stopped", "starting", "running", "stopping"]), "ServiceWorker.ServiceWorkerVersionRunningStatus", "type"); -const ServiceWorker_ServiceWorkerVersionStatus = withCdpMeta(z.enum(["new", "installing", "installed", "activating", "activated", "redundant"]), "ServiceWorker.ServiceWorkerVersionStatus", "type"); -const ServiceWorker_ServiceWorkerVersion = withCdpMeta(z.object({ "versionId": z.string(), "registrationId": z.lazy(() => ServiceWorker_RegistrationID), "scriptURL": z.string(), "runningStatus": z.lazy(() => ServiceWorker_ServiceWorkerVersionRunningStatus), "status": z.lazy(() => ServiceWorker_ServiceWorkerVersionStatus), "scriptLastModified": z.number().optional(), "scriptResponseTime": z.number().optional(), "controlledClients": z.array(z.lazy(() => Target_TargetID)).optional(), "targetId": z.lazy(() => Target_TargetID).optional(), "routerRules": z.string().optional() }).passthrough(), "ServiceWorker.ServiceWorkerVersion", "type"); -const ServiceWorker_ServiceWorkerErrorMessage = withCdpMeta(z.object({ "errorMessage": z.string(), "registrationId": z.lazy(() => ServiceWorker_RegistrationID), "versionId": z.string(), "sourceURL": z.string(), "lineNumber": z.number().int(), "columnNumber": z.number().int() }).passthrough(), "ServiceWorker.ServiceWorkerErrorMessage", "type"); -const ServiceWorker_DeliverPushMessageParams = withCdpMeta(z.object({ "origin": z.string(), "registrationId": z.lazy(() => ServiceWorker_RegistrationID), "data": z.string() }).passthrough(), "ServiceWorker.deliverPushMessage.params", "commandParams", { method: "ServiceWorker.deliverPushMessage" }); -const ServiceWorker_DeliverPushMessageResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.deliverPushMessage.result", "commandResult", { method: "ServiceWorker.deliverPushMessage" }); -const ServiceWorker_DisableParams = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.disable.params", "commandParams", { method: "ServiceWorker.disable" }); -const ServiceWorker_DisableResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.disable.result", "commandResult", { method: "ServiceWorker.disable" }); -const ServiceWorker_DispatchSyncEventParams = withCdpMeta(z.object({ "origin": z.string(), "registrationId": z.lazy(() => ServiceWorker_RegistrationID), "tag": z.string(), "lastChance": z.boolean() }).passthrough(), "ServiceWorker.dispatchSyncEvent.params", "commandParams", { method: "ServiceWorker.dispatchSyncEvent" }); -const ServiceWorker_DispatchSyncEventResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.dispatchSyncEvent.result", "commandResult", { method: "ServiceWorker.dispatchSyncEvent" }); -const ServiceWorker_DispatchPeriodicSyncEventParams = withCdpMeta(z.object({ "origin": z.string(), "registrationId": z.lazy(() => ServiceWorker_RegistrationID), "tag": z.string() }).passthrough(), "ServiceWorker.dispatchPeriodicSyncEvent.params", "commandParams", { method: "ServiceWorker.dispatchPeriodicSyncEvent" }); -const ServiceWorker_DispatchPeriodicSyncEventResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.dispatchPeriodicSyncEvent.result", "commandResult", { method: "ServiceWorker.dispatchPeriodicSyncEvent" }); -const ServiceWorker_EnableParams = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.enable.params", "commandParams", { method: "ServiceWorker.enable" }); -const ServiceWorker_EnableResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.enable.result", "commandResult", { method: "ServiceWorker.enable" }); -const ServiceWorker_SetForceUpdateOnPageLoadParams = withCdpMeta(z.object({ "forceUpdateOnPageLoad": z.boolean() }).passthrough(), "ServiceWorker.setForceUpdateOnPageLoad.params", "commandParams", { method: "ServiceWorker.setForceUpdateOnPageLoad" }); -const ServiceWorker_SetForceUpdateOnPageLoadResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.setForceUpdateOnPageLoad.result", "commandResult", { method: "ServiceWorker.setForceUpdateOnPageLoad" }); -const ServiceWorker_SkipWaitingParams = withCdpMeta(z.object({ "scopeURL": z.string() }).passthrough(), "ServiceWorker.skipWaiting.params", "commandParams", { method: "ServiceWorker.skipWaiting" }); -const ServiceWorker_SkipWaitingResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.skipWaiting.result", "commandResult", { method: "ServiceWorker.skipWaiting" }); -const ServiceWorker_StartWorkerParams = withCdpMeta(z.object({ "scopeURL": z.string() }).passthrough(), "ServiceWorker.startWorker.params", "commandParams", { method: "ServiceWorker.startWorker" }); -const ServiceWorker_StartWorkerResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.startWorker.result", "commandResult", { method: "ServiceWorker.startWorker" }); -const ServiceWorker_StopAllWorkersParams = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.stopAllWorkers.params", "commandParams", { method: "ServiceWorker.stopAllWorkers" }); -const ServiceWorker_StopAllWorkersResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.stopAllWorkers.result", "commandResult", { method: "ServiceWorker.stopAllWorkers" }); -const ServiceWorker_StopWorkerParams = withCdpMeta(z.object({ "versionId": z.string() }).passthrough(), "ServiceWorker.stopWorker.params", "commandParams", { method: "ServiceWorker.stopWorker" }); -const ServiceWorker_StopWorkerResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.stopWorker.result", "commandResult", { method: "ServiceWorker.stopWorker" }); -const ServiceWorker_UnregisterParams = withCdpMeta(z.object({ "scopeURL": z.string() }).passthrough(), "ServiceWorker.unregister.params", "commandParams", { method: "ServiceWorker.unregister" }); -const ServiceWorker_UnregisterResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.unregister.result", "commandResult", { method: "ServiceWorker.unregister" }); -const ServiceWorker_UpdateRegistrationParams = withCdpMeta(z.object({ "scopeURL": z.string() }).passthrough(), "ServiceWorker.updateRegistration.params", "commandParams", { method: "ServiceWorker.updateRegistration" }); -const ServiceWorker_UpdateRegistrationResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.updateRegistration.result", "commandResult", { method: "ServiceWorker.updateRegistration" }); -const ServiceWorker_WorkerErrorReportedEvent = withCdpMeta(z.object({ "errorMessage": z.lazy(() => ServiceWorker_ServiceWorkerErrorMessage) }).passthrough(), "ServiceWorker.workerErrorReported", "event", { phase: "event" }); -const ServiceWorker_WorkerRegistrationUpdatedEvent = withCdpMeta(z.object({ "registrations": z.array(z.lazy(() => ServiceWorker_ServiceWorkerRegistration)) }).passthrough(), "ServiceWorker.workerRegistrationUpdated", "event", { phase: "event" }); -const ServiceWorker_WorkerVersionUpdatedEvent = withCdpMeta(z.object({ "versions": z.array(z.lazy(() => ServiceWorker_ServiceWorkerVersion)) }).passthrough(), "ServiceWorker.workerVersionUpdated", "event", { phase: "event" }); -const SmartCardEmulation_ResultCode = withCdpMeta(z.enum(["success", "removed-card", "reset-card", "unpowered-card", "unresponsive-card", "unsupported-card", "reader-unavailable", "sharing-violation", "not-transacted", "no-smartcard", "proto-mismatch", "system-cancelled", "not-ready", "cancelled", "insufficient-buffer", "invalid-handle", "invalid-parameter", "invalid-value", "no-memory", "timeout", "unknown-reader", "unsupported-feature", "no-readers-available", "service-stopped", "no-service", "comm-error", "internal-error", "server-too-busy", "unexpected", "shutdown", "unknown-card", "unknown"]), "SmartCardEmulation.ResultCode", "type"); -const SmartCardEmulation_ShareMode = withCdpMeta(z.enum(["shared", "exclusive", "direct"]), "SmartCardEmulation.ShareMode", "type"); -const SmartCardEmulation_Disposition = withCdpMeta(z.enum(["leave-card", "reset-card", "unpower-card", "eject-card"]), "SmartCardEmulation.Disposition", "type"); -const SmartCardEmulation_ConnectionState = withCdpMeta(z.enum(["absent", "present", "swallowed", "powered", "negotiable", "specific"]), "SmartCardEmulation.ConnectionState", "type"); -const SmartCardEmulation_ReaderStateFlags = withCdpMeta(z.object({ "unaware": z.boolean().optional(), "ignore": z.boolean().optional(), "changed": z.boolean().optional(), "unknown": z.boolean().optional(), "unavailable": z.boolean().optional(), "empty": z.boolean().optional(), "present": z.boolean().optional(), "exclusive": z.boolean().optional(), "inuse": z.boolean().optional(), "mute": z.boolean().optional(), "unpowered": z.boolean().optional() }).passthrough(), "SmartCardEmulation.ReaderStateFlags", "type"); -const SmartCardEmulation_ProtocolSet = withCdpMeta(z.object({ "t0": z.boolean().optional(), "t1": z.boolean().optional(), "raw": z.boolean().optional() }).passthrough(), "SmartCardEmulation.ProtocolSet", "type"); -const SmartCardEmulation_Protocol = withCdpMeta(z.enum(["t0", "t1", "raw"]), "SmartCardEmulation.Protocol", "type"); -const SmartCardEmulation_ReaderStateIn = withCdpMeta(z.object({ "reader": z.string(), "currentState": z.lazy(() => SmartCardEmulation_ReaderStateFlags), "currentInsertionCount": z.number().int() }).passthrough(), "SmartCardEmulation.ReaderStateIn", "type"); -const SmartCardEmulation_ReaderStateOut = withCdpMeta(z.object({ "reader": z.string(), "eventState": z.lazy(() => SmartCardEmulation_ReaderStateFlags), "eventCount": z.number().int(), "atr": z.string() }).passthrough(), "SmartCardEmulation.ReaderStateOut", "type"); -const SmartCardEmulation_EnableParams = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.enable.params", "commandParams", { method: "SmartCardEmulation.enable" }); -const SmartCardEmulation_EnableResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.enable.result", "commandResult", { method: "SmartCardEmulation.enable" }); -const SmartCardEmulation_DisableParams = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.disable.params", "commandParams", { method: "SmartCardEmulation.disable" }); -const SmartCardEmulation_DisableResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.disable.result", "commandResult", { method: "SmartCardEmulation.disable" }); -const SmartCardEmulation_ReportEstablishContextResultParams = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int() }).passthrough(), "SmartCardEmulation.reportEstablishContextResult.params", "commandParams", { method: "SmartCardEmulation.reportEstablishContextResult" }); -const SmartCardEmulation_ReportEstablishContextResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportEstablishContextResult.result", "commandResult", { method: "SmartCardEmulation.reportEstablishContextResult" }); -const SmartCardEmulation_ReportReleaseContextResultParams = withCdpMeta(z.object({ "requestId": z.string() }).passthrough(), "SmartCardEmulation.reportReleaseContextResult.params", "commandParams", { method: "SmartCardEmulation.reportReleaseContextResult" }); -const SmartCardEmulation_ReportReleaseContextResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportReleaseContextResult.result", "commandResult", { method: "SmartCardEmulation.reportReleaseContextResult" }); -const SmartCardEmulation_ReportListReadersResultParams = withCdpMeta(z.object({ "requestId": z.string(), "readers": z.array(z.string()) }).passthrough(), "SmartCardEmulation.reportListReadersResult.params", "commandParams", { method: "SmartCardEmulation.reportListReadersResult" }); -const SmartCardEmulation_ReportListReadersResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportListReadersResult.result", "commandResult", { method: "SmartCardEmulation.reportListReadersResult" }); -const SmartCardEmulation_ReportGetStatusChangeResultParams = withCdpMeta(z.object({ "requestId": z.string(), "readerStates": z.array(z.lazy(() => SmartCardEmulation_ReaderStateOut)) }).passthrough(), "SmartCardEmulation.reportGetStatusChangeResult.params", "commandParams", { method: "SmartCardEmulation.reportGetStatusChangeResult" }); -const SmartCardEmulation_ReportGetStatusChangeResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportGetStatusChangeResult.result", "commandResult", { method: "SmartCardEmulation.reportGetStatusChangeResult" }); -const SmartCardEmulation_ReportBeginTransactionResultParams = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int() }).passthrough(), "SmartCardEmulation.reportBeginTransactionResult.params", "commandParams", { method: "SmartCardEmulation.reportBeginTransactionResult" }); -const SmartCardEmulation_ReportBeginTransactionResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportBeginTransactionResult.result", "commandResult", { method: "SmartCardEmulation.reportBeginTransactionResult" }); -const SmartCardEmulation_ReportPlainResultParams = withCdpMeta(z.object({ "requestId": z.string() }).passthrough(), "SmartCardEmulation.reportPlainResult.params", "commandParams", { method: "SmartCardEmulation.reportPlainResult" }); -const SmartCardEmulation_ReportPlainResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportPlainResult.result", "commandResult", { method: "SmartCardEmulation.reportPlainResult" }); -const SmartCardEmulation_ReportConnectResultParams = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "activeProtocol": z.lazy(() => SmartCardEmulation_Protocol).optional() }).passthrough(), "SmartCardEmulation.reportConnectResult.params", "commandParams", { method: "SmartCardEmulation.reportConnectResult" }); -const SmartCardEmulation_ReportConnectResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportConnectResult.result", "commandResult", { method: "SmartCardEmulation.reportConnectResult" }); -const SmartCardEmulation_ReportDataResultParams = withCdpMeta(z.object({ "requestId": z.string(), "data": z.string() }).passthrough(), "SmartCardEmulation.reportDataResult.params", "commandParams", { method: "SmartCardEmulation.reportDataResult" }); -const SmartCardEmulation_ReportDataResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportDataResult.result", "commandResult", { method: "SmartCardEmulation.reportDataResult" }); -const SmartCardEmulation_ReportStatusResultParams = withCdpMeta(z.object({ "requestId": z.string(), "readerName": z.string(), "state": z.lazy(() => SmartCardEmulation_ConnectionState), "atr": z.string(), "protocol": z.lazy(() => SmartCardEmulation_Protocol).optional() }).passthrough(), "SmartCardEmulation.reportStatusResult.params", "commandParams", { method: "SmartCardEmulation.reportStatusResult" }); -const SmartCardEmulation_ReportStatusResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportStatusResult.result", "commandResult", { method: "SmartCardEmulation.reportStatusResult" }); -const SmartCardEmulation_ReportErrorParams = withCdpMeta(z.object({ "requestId": z.string(), "resultCode": z.lazy(() => SmartCardEmulation_ResultCode) }).passthrough(), "SmartCardEmulation.reportError.params", "commandParams", { method: "SmartCardEmulation.reportError" }); -const SmartCardEmulation_ReportErrorResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportError.result", "commandResult", { method: "SmartCardEmulation.reportError" }); -const SmartCardEmulation_EstablishContextRequestedEvent = withCdpMeta(z.object({ "requestId": z.string() }).passthrough(), "SmartCardEmulation.establishContextRequested", "event", { phase: "event" }); -const SmartCardEmulation_ReleaseContextRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int() }).passthrough(), "SmartCardEmulation.releaseContextRequested", "event", { phase: "event" }); -const SmartCardEmulation_ListReadersRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int() }).passthrough(), "SmartCardEmulation.listReadersRequested", "event", { phase: "event" }); -const SmartCardEmulation_GetStatusChangeRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int(), "readerStates": z.array(z.lazy(() => SmartCardEmulation_ReaderStateIn)), "timeout": z.number().int().optional() }).passthrough(), "SmartCardEmulation.getStatusChangeRequested", "event", { phase: "event" }); -const SmartCardEmulation_CancelRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int() }).passthrough(), "SmartCardEmulation.cancelRequested", "event", { phase: "event" }); -const SmartCardEmulation_ConnectRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int(), "reader": z.string(), "shareMode": z.lazy(() => SmartCardEmulation_ShareMode), "preferredProtocols": z.lazy(() => SmartCardEmulation_ProtocolSet) }).passthrough(), "SmartCardEmulation.connectRequested", "event", { phase: "event" }); -const SmartCardEmulation_DisconnectRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "disposition": z.lazy(() => SmartCardEmulation_Disposition) }).passthrough(), "SmartCardEmulation.disconnectRequested", "event", { phase: "event" }); -const SmartCardEmulation_TransmitRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "data": z.string(), "protocol": z.lazy(() => SmartCardEmulation_Protocol).optional() }).passthrough(), "SmartCardEmulation.transmitRequested", "event", { phase: "event" }); -const SmartCardEmulation_ControlRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "controlCode": z.number().int(), "data": z.string() }).passthrough(), "SmartCardEmulation.controlRequested", "event", { phase: "event" }); -const SmartCardEmulation_GetAttribRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "attribId": z.number().int() }).passthrough(), "SmartCardEmulation.getAttribRequested", "event", { phase: "event" }); -const SmartCardEmulation_SetAttribRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "attribId": z.number().int(), "data": z.string() }).passthrough(), "SmartCardEmulation.setAttribRequested", "event", { phase: "event" }); -const SmartCardEmulation_StatusRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int() }).passthrough(), "SmartCardEmulation.statusRequested", "event", { phase: "event" }); -const SmartCardEmulation_BeginTransactionRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int() }).passthrough(), "SmartCardEmulation.beginTransactionRequested", "event", { phase: "event" }); -const SmartCardEmulation_EndTransactionRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "disposition": z.lazy(() => SmartCardEmulation_Disposition) }).passthrough(), "SmartCardEmulation.endTransactionRequested", "event", { phase: "event" }); -const Storage_SerializedStorageKey = withCdpMeta(z.string(), "Storage.SerializedStorageKey", "type"); -const Storage_StorageType = withCdpMeta(z.enum(["cookies", "file_systems", "indexeddb", "local_storage", "shader_cache", "websql", "service_workers", "cache_storage", "interest_groups", "shared_storage", "storage_buckets", "all", "other"]), "Storage.StorageType", "type"); -const Storage_UsageForType = withCdpMeta(z.object({ "storageType": z.lazy(() => Storage_StorageType), "usage": z.number() }).passthrough(), "Storage.UsageForType", "type"); -const Storage_TrustTokens = withCdpMeta(z.object({ "issuerOrigin": z.string(), "count": z.number() }).passthrough(), "Storage.TrustTokens", "type"); -const Storage_InterestGroupAuctionId = withCdpMeta(z.string(), "Storage.InterestGroupAuctionId", "type"); -const Storage_InterestGroupAccessType = withCdpMeta(z.enum(["join", "leave", "update", "loaded", "bid", "win", "additionalBid", "additionalBidWin", "topLevelBid", "topLevelAdditionalBid", "clear"]), "Storage.InterestGroupAccessType", "type"); -const Storage_InterestGroupAuctionEventType = withCdpMeta(z.enum(["started", "configResolved"]), "Storage.InterestGroupAuctionEventType", "type"); -const Storage_InterestGroupAuctionFetchType = withCdpMeta(z.enum(["bidderJs", "bidderWasm", "sellerJs", "bidderTrustedSignals", "sellerTrustedSignals"]), "Storage.InterestGroupAuctionFetchType", "type"); -const Storage_SharedStorageAccessScope = withCdpMeta(z.enum(["window", "sharedStorageWorklet", "protectedAudienceWorklet", "header"]), "Storage.SharedStorageAccessScope", "type"); -const Storage_SharedStorageAccessMethod = withCdpMeta(z.enum(["addModule", "createWorklet", "selectURL", "run", "batchUpdate", "set", "append", "delete", "clear", "get", "keys", "values", "entries", "length", "remainingBudget"]), "Storage.SharedStorageAccessMethod", "type"); -const Storage_SharedStorageEntry = withCdpMeta(z.object({ "key": z.string(), "value": z.string() }).passthrough(), "Storage.SharedStorageEntry", "type"); -const Storage_SharedStorageMetadata = withCdpMeta(z.object({ "creationTime": z.lazy(() => Network_TimeSinceEpoch), "length": z.number().int(), "remainingBudget": z.number(), "bytesUsed": z.number().int() }).passthrough(), "Storage.SharedStorageMetadata", "type"); -const Storage_SharedStoragePrivateAggregationConfig = withCdpMeta(z.object({ "aggregationCoordinatorOrigin": z.string().optional(), "contextId": z.string().optional(), "filteringIdMaxBytes": z.number().int(), "maxContributions": z.number().int().optional() }).passthrough(), "Storage.SharedStoragePrivateAggregationConfig", "type"); -const Storage_SharedStorageReportingMetadata = withCdpMeta(z.object({ "eventType": z.string(), "reportingUrl": z.string() }).passthrough(), "Storage.SharedStorageReportingMetadata", "type"); -const Storage_SharedStorageUrlWithMetadata = withCdpMeta(z.object({ "url": z.string(), "reportingMetadata": z.array(z.lazy(() => Storage_SharedStorageReportingMetadata)) }).passthrough(), "Storage.SharedStorageUrlWithMetadata", "type"); -const Storage_SharedStorageAccessParams = withCdpMeta(z.object({ "scriptSourceUrl": z.string().optional(), "dataOrigin": z.string().optional(), "operationName": z.string().optional(), "operationId": z.string().optional(), "keepAlive": z.boolean().optional(), "privateAggregationConfig": z.lazy(() => Storage_SharedStoragePrivateAggregationConfig).optional(), "serializedData": z.string().optional(), "urlsWithMetadata": z.array(z.lazy(() => Storage_SharedStorageUrlWithMetadata)).optional(), "urnUuid": z.string().optional(), "key": z.string().optional(), "value": z.string().optional(), "ignoreIfPresent": z.boolean().optional(), "workletOrdinal": z.number().int().optional(), "workletTargetId": z.lazy(() => Target_TargetID).optional(), "withLock": z.string().optional(), "batchUpdateId": z.string().optional(), "batchSize": z.number().int().optional() }).passthrough(), "Storage.SharedStorageAccessParams", "type"); -const Storage_StorageBucketsDurability = withCdpMeta(z.enum(["relaxed", "strict"]), "Storage.StorageBucketsDurability", "type"); -const Storage_StorageBucket = withCdpMeta(z.object({ "storageKey": z.lazy(() => Storage_SerializedStorageKey), "name": z.string().optional() }).passthrough(), "Storage.StorageBucket", "type"); -const Storage_StorageBucketInfo = withCdpMeta(z.object({ "bucket": z.lazy(() => Storage_StorageBucket), "id": z.string(), "expiration": z.lazy(() => Network_TimeSinceEpoch), "quota": z.number(), "persistent": z.boolean(), "durability": z.lazy(() => Storage_StorageBucketsDurability) }).passthrough(), "Storage.StorageBucketInfo", "type"); -const Storage_RelatedWebsiteSet = withCdpMeta(z.object({ "primarySites": z.array(z.string()), "associatedSites": z.array(z.string()), "serviceSites": z.array(z.string()) }).passthrough(), "Storage.RelatedWebsiteSet", "type"); -const Storage_GetStorageKeyForFrameParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "Storage.getStorageKeyForFrame.params", "commandParams", { method: "Storage.getStorageKeyForFrame" }); -const Storage_GetStorageKeyForFrameResult = withCdpMeta(z.object({ "storageKey": z.lazy(() => Storage_SerializedStorageKey) }).passthrough(), "Storage.getStorageKeyForFrame.result", "commandResult", { method: "Storage.getStorageKeyForFrame" }); -const Storage_GetStorageKeyParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId).optional() }).passthrough(), "Storage.getStorageKey.params", "commandParams", { method: "Storage.getStorageKey" }); -const Storage_GetStorageKeyResult = withCdpMeta(z.object({ "storageKey": z.lazy(() => Storage_SerializedStorageKey) }).passthrough(), "Storage.getStorageKey.result", "commandResult", { method: "Storage.getStorageKey" }); -const Storage_ClearDataForOriginParams = withCdpMeta(z.object({ "origin": z.string(), "storageTypes": z.string() }).passthrough(), "Storage.clearDataForOrigin.params", "commandParams", { method: "Storage.clearDataForOrigin" }); -const Storage_ClearDataForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.clearDataForOrigin.result", "commandResult", { method: "Storage.clearDataForOrigin" }); -const Storage_ClearDataForStorageKeyParams = withCdpMeta(z.object({ "storageKey": z.string(), "storageTypes": z.string() }).passthrough(), "Storage.clearDataForStorageKey.params", "commandParams", { method: "Storage.clearDataForStorageKey" }); -const Storage_ClearDataForStorageKeyResult = withCdpMeta(z.object({ }).passthrough(), "Storage.clearDataForStorageKey.result", "commandResult", { method: "Storage.clearDataForStorageKey" }); -const Storage_GetCookiesParams = withCdpMeta(z.object({ "browserContextId": z.lazy(() => Browser_BrowserContextID).optional() }).passthrough(), "Storage.getCookies.params", "commandParams", { method: "Storage.getCookies" }); -const Storage_GetCookiesResult = withCdpMeta(z.object({ "cookies": z.array(z.lazy(() => Network_Cookie)) }).passthrough(), "Storage.getCookies.result", "commandResult", { method: "Storage.getCookies" }); -const Storage_SetCookiesParams = withCdpMeta(z.object({ "cookies": z.array(z.lazy(() => Network_CookieParam)), "browserContextId": z.lazy(() => Browser_BrowserContextID).optional() }).passthrough(), "Storage.setCookies.params", "commandParams", { method: "Storage.setCookies" }); -const Storage_SetCookiesResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setCookies.result", "commandResult", { method: "Storage.setCookies" }); -const Storage_ClearCookiesParams = withCdpMeta(z.object({ "browserContextId": z.lazy(() => Browser_BrowserContextID).optional() }).passthrough(), "Storage.clearCookies.params", "commandParams", { method: "Storage.clearCookies" }); -const Storage_ClearCookiesResult = withCdpMeta(z.object({ }).passthrough(), "Storage.clearCookies.result", "commandResult", { method: "Storage.clearCookies" }); -const Storage_GetUsageAndQuotaParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Storage.getUsageAndQuota.params", "commandParams", { method: "Storage.getUsageAndQuota" }); -const Storage_GetUsageAndQuotaResult = withCdpMeta(z.object({ "usage": z.number(), "quota": z.number(), "overrideActive": z.boolean(), "usageBreakdown": z.array(z.lazy(() => Storage_UsageForType)) }).passthrough(), "Storage.getUsageAndQuota.result", "commandResult", { method: "Storage.getUsageAndQuota" }); -const Storage_OverrideQuotaForOriginParams = withCdpMeta(z.object({ "origin": z.string(), "quotaSize": z.number().optional() }).passthrough(), "Storage.overrideQuotaForOrigin.params", "commandParams", { method: "Storage.overrideQuotaForOrigin" }); -const Storage_OverrideQuotaForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.overrideQuotaForOrigin.result", "commandResult", { method: "Storage.overrideQuotaForOrigin" }); -const Storage_TrackCacheStorageForOriginParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Storage.trackCacheStorageForOrigin.params", "commandParams", { method: "Storage.trackCacheStorageForOrigin" }); -const Storage_TrackCacheStorageForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.trackCacheStorageForOrigin.result", "commandResult", { method: "Storage.trackCacheStorageForOrigin" }); -const Storage_TrackCacheStorageForStorageKeyParams = withCdpMeta(z.object({ "storageKey": z.string() }).passthrough(), "Storage.trackCacheStorageForStorageKey.params", "commandParams", { method: "Storage.trackCacheStorageForStorageKey" }); -const Storage_TrackCacheStorageForStorageKeyResult = withCdpMeta(z.object({ }).passthrough(), "Storage.trackCacheStorageForStorageKey.result", "commandResult", { method: "Storage.trackCacheStorageForStorageKey" }); -const Storage_TrackIndexedDBForOriginParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Storage.trackIndexedDBForOrigin.params", "commandParams", { method: "Storage.trackIndexedDBForOrigin" }); -const Storage_TrackIndexedDBForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.trackIndexedDBForOrigin.result", "commandResult", { method: "Storage.trackIndexedDBForOrigin" }); -const Storage_TrackIndexedDBForStorageKeyParams = withCdpMeta(z.object({ "storageKey": z.string() }).passthrough(), "Storage.trackIndexedDBForStorageKey.params", "commandParams", { method: "Storage.trackIndexedDBForStorageKey" }); -const Storage_TrackIndexedDBForStorageKeyResult = withCdpMeta(z.object({ }).passthrough(), "Storage.trackIndexedDBForStorageKey.result", "commandResult", { method: "Storage.trackIndexedDBForStorageKey" }); -const Storage_UntrackCacheStorageForOriginParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Storage.untrackCacheStorageForOrigin.params", "commandParams", { method: "Storage.untrackCacheStorageForOrigin" }); -const Storage_UntrackCacheStorageForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.untrackCacheStorageForOrigin.result", "commandResult", { method: "Storage.untrackCacheStorageForOrigin" }); -const Storage_UntrackCacheStorageForStorageKeyParams = withCdpMeta(z.object({ "storageKey": z.string() }).passthrough(), "Storage.untrackCacheStorageForStorageKey.params", "commandParams", { method: "Storage.untrackCacheStorageForStorageKey" }); -const Storage_UntrackCacheStorageForStorageKeyResult = withCdpMeta(z.object({ }).passthrough(), "Storage.untrackCacheStorageForStorageKey.result", "commandResult", { method: "Storage.untrackCacheStorageForStorageKey" }); -const Storage_UntrackIndexedDBForOriginParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Storage.untrackIndexedDBForOrigin.params", "commandParams", { method: "Storage.untrackIndexedDBForOrigin" }); -const Storage_UntrackIndexedDBForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.untrackIndexedDBForOrigin.result", "commandResult", { method: "Storage.untrackIndexedDBForOrigin" }); -const Storage_UntrackIndexedDBForStorageKeyParams = withCdpMeta(z.object({ "storageKey": z.string() }).passthrough(), "Storage.untrackIndexedDBForStorageKey.params", "commandParams", { method: "Storage.untrackIndexedDBForStorageKey" }); -const Storage_UntrackIndexedDBForStorageKeyResult = withCdpMeta(z.object({ }).passthrough(), "Storage.untrackIndexedDBForStorageKey.result", "commandResult", { method: "Storage.untrackIndexedDBForStorageKey" }); -const Storage_GetTrustTokensParams = withCdpMeta(z.object({ }).passthrough(), "Storage.getTrustTokens.params", "commandParams", { method: "Storage.getTrustTokens" }); -const Storage_GetTrustTokensResult = withCdpMeta(z.object({ "tokens": z.array(z.lazy(() => Storage_TrustTokens)) }).passthrough(), "Storage.getTrustTokens.result", "commandResult", { method: "Storage.getTrustTokens" }); -const Storage_ClearTrustTokensParams = withCdpMeta(z.object({ "issuerOrigin": z.string() }).passthrough(), "Storage.clearTrustTokens.params", "commandParams", { method: "Storage.clearTrustTokens" }); -const Storage_ClearTrustTokensResult = withCdpMeta(z.object({ "didDeleteTokens": z.boolean() }).passthrough(), "Storage.clearTrustTokens.result", "commandResult", { method: "Storage.clearTrustTokens" }); -const Storage_GetInterestGroupDetailsParams = withCdpMeta(z.object({ "ownerOrigin": z.string(), "name": z.string() }).passthrough(), "Storage.getInterestGroupDetails.params", "commandParams", { method: "Storage.getInterestGroupDetails" }); -const Storage_GetInterestGroupDetailsResult = withCdpMeta(z.object({ "details": z.record(z.string(), z.unknown()) }).passthrough(), "Storage.getInterestGroupDetails.result", "commandResult", { method: "Storage.getInterestGroupDetails" }); -const Storage_SetInterestGroupTrackingParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "Storage.setInterestGroupTracking.params", "commandParams", { method: "Storage.setInterestGroupTracking" }); -const Storage_SetInterestGroupTrackingResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setInterestGroupTracking.result", "commandResult", { method: "Storage.setInterestGroupTracking" }); -const Storage_SetInterestGroupAuctionTrackingParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "Storage.setInterestGroupAuctionTracking.params", "commandParams", { method: "Storage.setInterestGroupAuctionTracking" }); -const Storage_SetInterestGroupAuctionTrackingResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setInterestGroupAuctionTracking.result", "commandResult", { method: "Storage.setInterestGroupAuctionTracking" }); -const Storage_GetSharedStorageMetadataParams = withCdpMeta(z.object({ "ownerOrigin": z.string() }).passthrough(), "Storage.getSharedStorageMetadata.params", "commandParams", { method: "Storage.getSharedStorageMetadata" }); -const Storage_GetSharedStorageMetadataResult = withCdpMeta(z.object({ "metadata": z.lazy(() => Storage_SharedStorageMetadata) }).passthrough(), "Storage.getSharedStorageMetadata.result", "commandResult", { method: "Storage.getSharedStorageMetadata" }); -const Storage_GetSharedStorageEntriesParams = withCdpMeta(z.object({ "ownerOrigin": z.string() }).passthrough(), "Storage.getSharedStorageEntries.params", "commandParams", { method: "Storage.getSharedStorageEntries" }); -const Storage_GetSharedStorageEntriesResult = withCdpMeta(z.object({ "entries": z.array(z.lazy(() => Storage_SharedStorageEntry)) }).passthrough(), "Storage.getSharedStorageEntries.result", "commandResult", { method: "Storage.getSharedStorageEntries" }); -const Storage_SetSharedStorageEntryParams = withCdpMeta(z.object({ "ownerOrigin": z.string(), "key": z.string(), "value": z.string(), "ignoreIfPresent": z.boolean().optional() }).passthrough(), "Storage.setSharedStorageEntry.params", "commandParams", { method: "Storage.setSharedStorageEntry" }); -const Storage_SetSharedStorageEntryResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setSharedStorageEntry.result", "commandResult", { method: "Storage.setSharedStorageEntry" }); -const Storage_DeleteSharedStorageEntryParams = withCdpMeta(z.object({ "ownerOrigin": z.string(), "key": z.string() }).passthrough(), "Storage.deleteSharedStorageEntry.params", "commandParams", { method: "Storage.deleteSharedStorageEntry" }); -const Storage_DeleteSharedStorageEntryResult = withCdpMeta(z.object({ }).passthrough(), "Storage.deleteSharedStorageEntry.result", "commandResult", { method: "Storage.deleteSharedStorageEntry" }); -const Storage_ClearSharedStorageEntriesParams = withCdpMeta(z.object({ "ownerOrigin": z.string() }).passthrough(), "Storage.clearSharedStorageEntries.params", "commandParams", { method: "Storage.clearSharedStorageEntries" }); -const Storage_ClearSharedStorageEntriesResult = withCdpMeta(z.object({ }).passthrough(), "Storage.clearSharedStorageEntries.result", "commandResult", { method: "Storage.clearSharedStorageEntries" }); -const Storage_ResetSharedStorageBudgetParams = withCdpMeta(z.object({ "ownerOrigin": z.string() }).passthrough(), "Storage.resetSharedStorageBudget.params", "commandParams", { method: "Storage.resetSharedStorageBudget" }); -const Storage_ResetSharedStorageBudgetResult = withCdpMeta(z.object({ }).passthrough(), "Storage.resetSharedStorageBudget.result", "commandResult", { method: "Storage.resetSharedStorageBudget" }); -const Storage_SetSharedStorageTrackingParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "Storage.setSharedStorageTracking.params", "commandParams", { method: "Storage.setSharedStorageTracking" }); -const Storage_SetSharedStorageTrackingResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setSharedStorageTracking.result", "commandResult", { method: "Storage.setSharedStorageTracking" }); -const Storage_SetStorageBucketTrackingParams = withCdpMeta(z.object({ "storageKey": z.string(), "enable": z.boolean() }).passthrough(), "Storage.setStorageBucketTracking.params", "commandParams", { method: "Storage.setStorageBucketTracking" }); -const Storage_SetStorageBucketTrackingResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setStorageBucketTracking.result", "commandResult", { method: "Storage.setStorageBucketTracking" }); -const Storage_DeleteStorageBucketParams = withCdpMeta(z.object({ "bucket": z.lazy(() => Storage_StorageBucket) }).passthrough(), "Storage.deleteStorageBucket.params", "commandParams", { method: "Storage.deleteStorageBucket" }); -const Storage_DeleteStorageBucketResult = withCdpMeta(z.object({ }).passthrough(), "Storage.deleteStorageBucket.result", "commandResult", { method: "Storage.deleteStorageBucket" }); -const Storage_RunBounceTrackingMitigationsParams = withCdpMeta(z.object({ }).passthrough(), "Storage.runBounceTrackingMitigations.params", "commandParams", { method: "Storage.runBounceTrackingMitigations" }); -const Storage_RunBounceTrackingMitigationsResult = withCdpMeta(z.object({ "deletedSites": z.array(z.string()) }).passthrough(), "Storage.runBounceTrackingMitigations.result", "commandResult", { method: "Storage.runBounceTrackingMitigations" }); -const Storage_GetRelatedWebsiteSetsParams = withCdpMeta(z.object({ }).passthrough(), "Storage.getRelatedWebsiteSets.params", "commandParams", { method: "Storage.getRelatedWebsiteSets" }); -const Storage_GetRelatedWebsiteSetsResult = withCdpMeta(z.object({ "sets": z.array(z.lazy(() => Storage_RelatedWebsiteSet)) }).passthrough(), "Storage.getRelatedWebsiteSets.result", "commandResult", { method: "Storage.getRelatedWebsiteSets" }); -const Storage_SetProtectedAudienceKAnonymityParams = withCdpMeta(z.object({ "owner": z.string(), "name": z.string(), "hashes": z.array(z.string()) }).passthrough(), "Storage.setProtectedAudienceKAnonymity.params", "commandParams", { method: "Storage.setProtectedAudienceKAnonymity" }); -const Storage_SetProtectedAudienceKAnonymityResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setProtectedAudienceKAnonymity.result", "commandResult", { method: "Storage.setProtectedAudienceKAnonymity" }); -const Storage_CacheStorageContentUpdatedEvent = withCdpMeta(z.object({ "origin": z.string(), "storageKey": z.string(), "bucketId": z.string(), "cacheName": z.string() }).passthrough(), "Storage.cacheStorageContentUpdated", "event", { phase: "event" }); -const Storage_CacheStorageListUpdatedEvent = withCdpMeta(z.object({ "origin": z.string(), "storageKey": z.string(), "bucketId": z.string() }).passthrough(), "Storage.cacheStorageListUpdated", "event", { phase: "event" }); -const Storage_IndexedDBContentUpdatedEvent = withCdpMeta(z.object({ "origin": z.string(), "storageKey": z.string(), "bucketId": z.string(), "databaseName": z.string(), "objectStoreName": z.string() }).passthrough(), "Storage.indexedDBContentUpdated", "event", { phase: "event" }); -const Storage_IndexedDBListUpdatedEvent = withCdpMeta(z.object({ "origin": z.string(), "storageKey": z.string(), "bucketId": z.string() }).passthrough(), "Storage.indexedDBListUpdated", "event", { phase: "event" }); -const Storage_InterestGroupAccessedEvent = withCdpMeta(z.object({ "accessTime": z.lazy(() => Network_TimeSinceEpoch), "type": z.lazy(() => Storage_InterestGroupAccessType), "ownerOrigin": z.string(), "name": z.string(), "componentSellerOrigin": z.string().optional(), "bid": z.number().optional(), "bidCurrency": z.string().optional(), "uniqueAuctionId": z.lazy(() => Storage_InterestGroupAuctionId).optional() }).passthrough(), "Storage.interestGroupAccessed", "event", { phase: "event" }); -const Storage_InterestGroupAuctionEventOccurredEvent = withCdpMeta(z.object({ "eventTime": z.lazy(() => Network_TimeSinceEpoch), "type": z.lazy(() => Storage_InterestGroupAuctionEventType), "uniqueAuctionId": z.lazy(() => Storage_InterestGroupAuctionId), "parentAuctionId": z.lazy(() => Storage_InterestGroupAuctionId).optional(), "auctionConfig": z.record(z.string(), z.unknown()).optional() }).passthrough(), "Storage.interestGroupAuctionEventOccurred", "event", { phase: "event" }); -const Storage_InterestGroupAuctionNetworkRequestCreatedEvent = withCdpMeta(z.object({ "type": z.lazy(() => Storage_InterestGroupAuctionFetchType), "requestId": z.lazy(() => Network_RequestId), "auctions": z.array(z.lazy(() => Storage_InterestGroupAuctionId)) }).passthrough(), "Storage.interestGroupAuctionNetworkRequestCreated", "event", { phase: "event" }); -const Storage_SharedStorageAccessedEvent = withCdpMeta(z.object({ "accessTime": z.lazy(() => Network_TimeSinceEpoch), "scope": z.lazy(() => Storage_SharedStorageAccessScope), "method": z.lazy(() => Storage_SharedStorageAccessMethod), "mainFrameId": z.lazy(() => Page_FrameId), "ownerOrigin": z.string(), "ownerSite": z.string(), "params": z.lazy(() => Storage_SharedStorageAccessParams) }).passthrough(), "Storage.sharedStorageAccessed", "event", { phase: "event" }); -const Storage_SharedStorageWorkletOperationExecutionFinishedEvent = withCdpMeta(z.object({ "finishedTime": z.lazy(() => Network_TimeSinceEpoch), "executionTime": z.number().int(), "method": z.lazy(() => Storage_SharedStorageAccessMethod), "operationId": z.string(), "workletTargetId": z.lazy(() => Target_TargetID), "mainFrameId": z.lazy(() => Page_FrameId), "ownerOrigin": z.string() }).passthrough(), "Storage.sharedStorageWorkletOperationExecutionFinished", "event", { phase: "event" }); -const Storage_StorageBucketCreatedOrUpdatedEvent = withCdpMeta(z.object({ "bucketInfo": z.lazy(() => Storage_StorageBucketInfo) }).passthrough(), "Storage.storageBucketCreatedOrUpdated", "event", { phase: "event" }); -const Storage_StorageBucketDeletedEvent = withCdpMeta(z.object({ "bucketId": z.string() }).passthrough(), "Storage.storageBucketDeleted", "event", { phase: "event" }); -const SystemInfo_GPUDevice = withCdpMeta(z.object({ "vendorId": z.number(), "deviceId": z.number(), "subSysId": z.number().optional(), "revision": z.number().optional(), "vendorString": z.string(), "deviceString": z.string(), "driverVendor": z.string(), "driverVersion": z.string() }).passthrough(), "SystemInfo.GPUDevice", "type"); -const SystemInfo_Size = withCdpMeta(z.object({ "width": z.number().int(), "height": z.number().int() }).passthrough(), "SystemInfo.Size", "type"); -const SystemInfo_VideoDecodeAcceleratorCapability = withCdpMeta(z.object({ "profile": z.string(), "maxResolution": z.lazy(() => SystemInfo_Size), "minResolution": z.lazy(() => SystemInfo_Size) }).passthrough(), "SystemInfo.VideoDecodeAcceleratorCapability", "type"); -const SystemInfo_VideoEncodeAcceleratorCapability = withCdpMeta(z.object({ "profile": z.string(), "maxResolution": z.lazy(() => SystemInfo_Size), "maxFramerateNumerator": z.number().int(), "maxFramerateDenominator": z.number().int() }).passthrough(), "SystemInfo.VideoEncodeAcceleratorCapability", "type"); -const SystemInfo_SubsamplingFormat = withCdpMeta(z.enum(["yuv420", "yuv422", "yuv444"]), "SystemInfo.SubsamplingFormat", "type"); -const SystemInfo_ImageType = withCdpMeta(z.enum(["jpeg", "webp", "unknown"]), "SystemInfo.ImageType", "type"); -const SystemInfo_GPUInfo = withCdpMeta(z.object({ "devices": z.array(z.lazy(() => SystemInfo_GPUDevice)), "auxAttributes": z.record(z.string(), z.unknown()).optional(), "featureStatus": z.record(z.string(), z.unknown()).optional(), "driverBugWorkarounds": z.array(z.string()), "videoDecoding": z.array(z.lazy(() => SystemInfo_VideoDecodeAcceleratorCapability)), "videoEncoding": z.array(z.lazy(() => SystemInfo_VideoEncodeAcceleratorCapability)) }).passthrough(), "SystemInfo.GPUInfo", "type"); -const SystemInfo_ProcessInfo = withCdpMeta(z.object({ "type": z.string(), "id": z.number().int(), "cpuTime": z.number() }).passthrough(), "SystemInfo.ProcessInfo", "type"); -const SystemInfo_GetInfoParams = withCdpMeta(z.object({ }).passthrough(), "SystemInfo.getInfo.params", "commandParams", { method: "SystemInfo.getInfo" }); -const SystemInfo_GetInfoResult = withCdpMeta(z.object({ "gpu": z.lazy(() => SystemInfo_GPUInfo), "modelName": z.string(), "modelVersion": z.string(), "commandLine": z.string() }).passthrough(), "SystemInfo.getInfo.result", "commandResult", { method: "SystemInfo.getInfo" }); -const SystemInfo_GetFeatureStateParams = withCdpMeta(z.object({ "featureState": z.string() }).passthrough(), "SystemInfo.getFeatureState.params", "commandParams", { method: "SystemInfo.getFeatureState" }); -const SystemInfo_GetFeatureStateResult = withCdpMeta(z.object({ "featureEnabled": z.boolean() }).passthrough(), "SystemInfo.getFeatureState.result", "commandResult", { method: "SystemInfo.getFeatureState" }); -const SystemInfo_GetProcessInfoParams = withCdpMeta(z.object({ }).passthrough(), "SystemInfo.getProcessInfo.params", "commandParams", { method: "SystemInfo.getProcessInfo" }); -const SystemInfo_GetProcessInfoResult = withCdpMeta(z.object({ "processInfo": z.array(z.lazy(() => SystemInfo_ProcessInfo)) }).passthrough(), "SystemInfo.getProcessInfo.result", "commandResult", { method: "SystemInfo.getProcessInfo" }); -const Target_TargetID = withCdpMeta(z.string(), "Target.TargetID", "type"); -const Target_SessionID = withCdpMeta(z.string(), "Target.SessionID", "type"); -const Target_TargetInfo = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID), "type": z.string(), "title": z.string(), "url": z.string(), "attached": z.boolean(), "parentId": z.lazy(() => Target_TargetID).optional(), "openerId": z.lazy(() => Target_TargetID).optional(), "canAccessOpener": z.boolean(), "openerFrameId": z.lazy(() => Page_FrameId).optional(), "parentFrameId": z.lazy(() => Page_FrameId).optional(), "browserContextId": z.lazy(() => Browser_BrowserContextID).optional(), "subtype": z.string().optional() }).passthrough(), "Target.TargetInfo", "type"); -const Target_FilterEntry = withCdpMeta(z.object({ "exclude": z.boolean().optional(), "type": z.string().optional() }).passthrough(), "Target.FilterEntry", "type"); -const Target_TargetFilter = withCdpMeta(z.array(z.lazy(() => Target_FilterEntry)), "Target.TargetFilter", "type"); -const Target_RemoteLocation = withCdpMeta(z.object({ "host": z.string(), "port": z.number().int() }).passthrough(), "Target.RemoteLocation", "type"); -const Target_WindowState = withCdpMeta(z.enum(["normal", "minimized", "maximized", "fullscreen"]), "Target.WindowState", "type"); -const Target_ActivateTargetParams = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID) }).passthrough(), "Target.activateTarget.params", "commandParams", { method: "Target.activateTarget" }); -const Target_ActivateTargetResult = withCdpMeta(z.object({ }).passthrough(), "Target.activateTarget.result", "commandResult", { method: "Target.activateTarget" }); -const Target_AttachToTargetParams = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID), "flatten": z.boolean().optional() }).passthrough(), "Target.attachToTarget.params", "commandParams", { method: "Target.attachToTarget" }); -const Target_AttachToTargetResult = withCdpMeta(z.object({ "sessionId": z.lazy(() => Target_SessionID) }).passthrough(), "Target.attachToTarget.result", "commandResult", { method: "Target.attachToTarget" }); -const Target_AttachToBrowserTargetParams = withCdpMeta(z.object({ }).passthrough(), "Target.attachToBrowserTarget.params", "commandParams", { method: "Target.attachToBrowserTarget" }); -const Target_AttachToBrowserTargetResult = withCdpMeta(z.object({ "sessionId": z.lazy(() => Target_SessionID) }).passthrough(), "Target.attachToBrowserTarget.result", "commandResult", { method: "Target.attachToBrowserTarget" }); -const Target_CloseTargetParams = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID) }).passthrough(), "Target.closeTarget.params", "commandParams", { method: "Target.closeTarget" }); -const Target_CloseTargetResult = withCdpMeta(z.object({ "success": z.boolean() }).passthrough(), "Target.closeTarget.result", "commandResult", { method: "Target.closeTarget" }); -const Target_ExposeDevToolsProtocolParams = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID), "bindingName": z.string().optional(), "inheritPermissions": z.boolean().optional() }).passthrough(), "Target.exposeDevToolsProtocol.params", "commandParams", { method: "Target.exposeDevToolsProtocol" }); -const Target_ExposeDevToolsProtocolResult = withCdpMeta(z.object({ }).passthrough(), "Target.exposeDevToolsProtocol.result", "commandResult", { method: "Target.exposeDevToolsProtocol" }); -const Target_CreateBrowserContextParams = withCdpMeta(z.object({ "disposeOnDetach": z.boolean().optional(), "proxyServer": z.string().optional(), "proxyBypassList": z.string().optional(), "originsWithUniversalNetworkAccess": z.array(z.string()).optional() }).passthrough(), "Target.createBrowserContext.params", "commandParams", { method: "Target.createBrowserContext" }); -const Target_CreateBrowserContextResult = withCdpMeta(z.object({ "browserContextId": z.lazy(() => Browser_BrowserContextID) }).passthrough(), "Target.createBrowserContext.result", "commandResult", { method: "Target.createBrowserContext" }); -const Target_GetBrowserContextsParams = withCdpMeta(z.object({ }).passthrough(), "Target.getBrowserContexts.params", "commandParams", { method: "Target.getBrowserContexts" }); -const Target_GetBrowserContextsResult = withCdpMeta(z.object({ "browserContextIds": z.array(z.lazy(() => Browser_BrowserContextID)), "defaultBrowserContextId": z.lazy(() => Browser_BrowserContextID).optional() }).passthrough(), "Target.getBrowserContexts.result", "commandResult", { method: "Target.getBrowserContexts" }); -const Target_CreateTargetParams = withCdpMeta(z.object({ "url": z.string(), "left": z.number().int().optional(), "top": z.number().int().optional(), "width": z.number().int().optional(), "height": z.number().int().optional(), "windowState": z.lazy(() => Target_WindowState).optional(), "browserContextId": z.lazy(() => Browser_BrowserContextID).optional(), "enableBeginFrameControl": z.boolean().optional(), "newWindow": z.boolean().optional(), "background": z.boolean().optional(), "forTab": z.boolean().optional(), "hidden": z.boolean().optional(), "focus": z.boolean().optional() }).passthrough(), "Target.createTarget.params", "commandParams", { method: "Target.createTarget" }); -const Target_CreateTargetResult = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID) }).passthrough(), "Target.createTarget.result", "commandResult", { method: "Target.createTarget" }); -const Target_DetachFromTargetParams = withCdpMeta(z.object({ "sessionId": z.lazy(() => Target_SessionID).optional(), "targetId": z.lazy(() => Target_TargetID).optional() }).passthrough(), "Target.detachFromTarget.params", "commandParams", { method: "Target.detachFromTarget" }); -const Target_DetachFromTargetResult = withCdpMeta(z.object({ }).passthrough(), "Target.detachFromTarget.result", "commandResult", { method: "Target.detachFromTarget" }); -const Target_DisposeBrowserContextParams = withCdpMeta(z.object({ "browserContextId": z.lazy(() => Browser_BrowserContextID) }).passthrough(), "Target.disposeBrowserContext.params", "commandParams", { method: "Target.disposeBrowserContext" }); -const Target_DisposeBrowserContextResult = withCdpMeta(z.object({ }).passthrough(), "Target.disposeBrowserContext.result", "commandResult", { method: "Target.disposeBrowserContext" }); -const Target_GetTargetInfoParams = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID).optional() }).passthrough(), "Target.getTargetInfo.params", "commandParams", { method: "Target.getTargetInfo" }); -const Target_GetTargetInfoResult = withCdpMeta(z.object({ "targetInfo": z.lazy(() => Target_TargetInfo) }).passthrough(), "Target.getTargetInfo.result", "commandResult", { method: "Target.getTargetInfo" }); -const Target_GetTargetsParams = withCdpMeta(z.object({ "filter": z.lazy(() => Target_TargetFilter).optional() }).passthrough(), "Target.getTargets.params", "commandParams", { method: "Target.getTargets" }); -const Target_GetTargetsResult = withCdpMeta(z.object({ "targetInfos": z.array(z.lazy(() => Target_TargetInfo)) }).passthrough(), "Target.getTargets.result", "commandResult", { method: "Target.getTargets" }); -const Target_SendMessageToTargetParams = withCdpMeta(z.object({ "message": z.string(), "sessionId": z.lazy(() => Target_SessionID).optional(), "targetId": z.lazy(() => Target_TargetID).optional() }).passthrough(), "Target.sendMessageToTarget.params", "commandParams", { method: "Target.sendMessageToTarget" }); -const Target_SendMessageToTargetResult = withCdpMeta(z.object({ }).passthrough(), "Target.sendMessageToTarget.result", "commandResult", { method: "Target.sendMessageToTarget" }); -const Target_SetAutoAttachParams = withCdpMeta(z.object({ "autoAttach": z.boolean(), "waitForDebuggerOnStart": z.boolean(), "flatten": z.boolean().optional(), "filter": z.lazy(() => Target_TargetFilter).optional() }).passthrough(), "Target.setAutoAttach.params", "commandParams", { method: "Target.setAutoAttach" }); -const Target_SetAutoAttachResult = withCdpMeta(z.object({ }).passthrough(), "Target.setAutoAttach.result", "commandResult", { method: "Target.setAutoAttach" }); -const Target_AutoAttachRelatedParams = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID), "waitForDebuggerOnStart": z.boolean(), "filter": z.lazy(() => Target_TargetFilter).optional() }).passthrough(), "Target.autoAttachRelated.params", "commandParams", { method: "Target.autoAttachRelated" }); -const Target_AutoAttachRelatedResult = withCdpMeta(z.object({ }).passthrough(), "Target.autoAttachRelated.result", "commandResult", { method: "Target.autoAttachRelated" }); -const Target_SetDiscoverTargetsParams = withCdpMeta(z.object({ "discover": z.boolean(), "filter": z.lazy(() => Target_TargetFilter).optional() }).passthrough(), "Target.setDiscoverTargets.params", "commandParams", { method: "Target.setDiscoverTargets" }); -const Target_SetDiscoverTargetsResult = withCdpMeta(z.object({ }).passthrough(), "Target.setDiscoverTargets.result", "commandResult", { method: "Target.setDiscoverTargets" }); -const Target_SetRemoteLocationsParams = withCdpMeta(z.object({ "locations": z.array(z.lazy(() => Target_RemoteLocation)) }).passthrough(), "Target.setRemoteLocations.params", "commandParams", { method: "Target.setRemoteLocations" }); -const Target_SetRemoteLocationsResult = withCdpMeta(z.object({ }).passthrough(), "Target.setRemoteLocations.result", "commandResult", { method: "Target.setRemoteLocations" }); -const Target_GetDevToolsTargetParams = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID) }).passthrough(), "Target.getDevToolsTarget.params", "commandParams", { method: "Target.getDevToolsTarget" }); -const Target_GetDevToolsTargetResult = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID).optional() }).passthrough(), "Target.getDevToolsTarget.result", "commandResult", { method: "Target.getDevToolsTarget" }); -const Target_OpenDevToolsParams = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID), "panelId": z.string().optional() }).passthrough(), "Target.openDevTools.params", "commandParams", { method: "Target.openDevTools" }); -const Target_OpenDevToolsResult = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID) }).passthrough(), "Target.openDevTools.result", "commandResult", { method: "Target.openDevTools" }); -const Target_AttachedToTargetEvent = withCdpMeta(z.object({ "sessionId": z.lazy(() => Target_SessionID), "targetInfo": z.lazy(() => Target_TargetInfo), "waitingForDebugger": z.boolean() }).passthrough(), "Target.attachedToTarget", "event", { phase: "event" }); -const Target_DetachedFromTargetEvent = withCdpMeta(z.object({ "sessionId": z.lazy(() => Target_SessionID), "targetId": z.lazy(() => Target_TargetID).optional() }).passthrough(), "Target.detachedFromTarget", "event", { phase: "event" }); -const Target_ReceivedMessageFromTargetEvent = withCdpMeta(z.object({ "sessionId": z.lazy(() => Target_SessionID), "message": z.string(), "targetId": z.lazy(() => Target_TargetID).optional() }).passthrough(), "Target.receivedMessageFromTarget", "event", { phase: "event" }); -const Target_TargetCreatedEvent = withCdpMeta(z.object({ "targetInfo": z.lazy(() => Target_TargetInfo) }).passthrough(), "Target.targetCreated", "event", { phase: "event" }); -const Target_TargetDestroyedEvent = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID) }).passthrough(), "Target.targetDestroyed", "event", { phase: "event" }); -const Target_TargetCrashedEvent = withCdpMeta(z.object({ "targetId": z.lazy(() => Target_TargetID), "status": z.string(), "errorCode": z.number().int() }).passthrough(), "Target.targetCrashed", "event", { phase: "event" }); -const Target_TargetInfoChangedEvent = withCdpMeta(z.object({ "targetInfo": z.lazy(() => Target_TargetInfo) }).passthrough(), "Target.targetInfoChanged", "event", { phase: "event" }); -const Tethering_BindParams = withCdpMeta(z.object({ "port": z.number().int() }).passthrough(), "Tethering.bind.params", "commandParams", { method: "Tethering.bind" }); -const Tethering_BindResult = withCdpMeta(z.object({ }).passthrough(), "Tethering.bind.result", "commandResult", { method: "Tethering.bind" }); -const Tethering_UnbindParams = withCdpMeta(z.object({ "port": z.number().int() }).passthrough(), "Tethering.unbind.params", "commandParams", { method: "Tethering.unbind" }); -const Tethering_UnbindResult = withCdpMeta(z.object({ }).passthrough(), "Tethering.unbind.result", "commandResult", { method: "Tethering.unbind" }); -const Tethering_AcceptedEvent = withCdpMeta(z.object({ "port": z.number().int(), "connectionId": z.string() }).passthrough(), "Tethering.accepted", "event", { phase: "event" }); -const Tracing_MemoryDumpConfig = withCdpMeta(z.record(z.string(), z.unknown()), "Tracing.MemoryDumpConfig", "type"); -const Tracing_TraceConfig = withCdpMeta(z.object({ "recordMode": z.enum(["recordUntilFull", "recordContinuously", "recordAsMuchAsPossible", "echoToConsole"]).optional(), "traceBufferSizeInKb": z.number().optional(), "enableSampling": z.boolean().optional(), "enableSystrace": z.boolean().optional(), "enableArgumentFilter": z.boolean().optional(), "includedCategories": z.array(z.string()).optional(), "excludedCategories": z.array(z.string()).optional(), "syntheticDelays": z.array(z.string()).optional(), "memoryDumpConfig": z.lazy(() => Tracing_MemoryDumpConfig).optional() }).passthrough(), "Tracing.TraceConfig", "type"); -const Tracing_StreamFormat = withCdpMeta(z.enum(["json", "proto"]), "Tracing.StreamFormat", "type"); -const Tracing_StreamCompression = withCdpMeta(z.enum(["none", "gzip"]), "Tracing.StreamCompression", "type"); -const Tracing_MemoryDumpLevelOfDetail = withCdpMeta(z.enum(["background", "light", "detailed"]), "Tracing.MemoryDumpLevelOfDetail", "type"); -const Tracing_TracingBackend = withCdpMeta(z.enum(["auto", "chrome", "system"]), "Tracing.TracingBackend", "type"); -const Tracing_EndParams = withCdpMeta(z.object({ }).passthrough(), "Tracing.end.params", "commandParams", { method: "Tracing.end" }); -const Tracing_EndResult = withCdpMeta(z.object({ }).passthrough(), "Tracing.end.result", "commandResult", { method: "Tracing.end" }); -const Tracing_GetCategoriesParams = withCdpMeta(z.object({ }).passthrough(), "Tracing.getCategories.params", "commandParams", { method: "Tracing.getCategories" }); -const Tracing_GetCategoriesResult = withCdpMeta(z.object({ "categories": z.array(z.string()) }).passthrough(), "Tracing.getCategories.result", "commandResult", { method: "Tracing.getCategories" }); -const Tracing_GetTrackEventDescriptorParams = withCdpMeta(z.object({ }).passthrough(), "Tracing.getTrackEventDescriptor.params", "commandParams", { method: "Tracing.getTrackEventDescriptor" }); -const Tracing_GetTrackEventDescriptorResult = withCdpMeta(z.object({ "descriptor": z.string() }).passthrough(), "Tracing.getTrackEventDescriptor.result", "commandResult", { method: "Tracing.getTrackEventDescriptor" }); -const Tracing_RecordClockSyncMarkerParams = withCdpMeta(z.object({ "syncId": z.string() }).passthrough(), "Tracing.recordClockSyncMarker.params", "commandParams", { method: "Tracing.recordClockSyncMarker" }); -const Tracing_RecordClockSyncMarkerResult = withCdpMeta(z.object({ }).passthrough(), "Tracing.recordClockSyncMarker.result", "commandResult", { method: "Tracing.recordClockSyncMarker" }); -const Tracing_RequestMemoryDumpParams = withCdpMeta(z.object({ "deterministic": z.boolean().optional(), "levelOfDetail": z.lazy(() => Tracing_MemoryDumpLevelOfDetail).optional() }).passthrough(), "Tracing.requestMemoryDump.params", "commandParams", { method: "Tracing.requestMemoryDump" }); -const Tracing_RequestMemoryDumpResult = withCdpMeta(z.object({ "dumpGuid": z.string(), "success": z.boolean() }).passthrough(), "Tracing.requestMemoryDump.result", "commandResult", { method: "Tracing.requestMemoryDump" }); -const Tracing_StartParams = withCdpMeta(z.object({ "categories": z.string().optional(), "options": z.string().optional(), "bufferUsageReportingInterval": z.number().optional(), "transferMode": z.enum(["ReportEvents", "ReturnAsStream"]).optional(), "streamFormat": z.lazy(() => Tracing_StreamFormat).optional(), "streamCompression": z.lazy(() => Tracing_StreamCompression).optional(), "traceConfig": z.lazy(() => Tracing_TraceConfig).optional(), "perfettoConfig": z.string().optional(), "tracingBackend": z.lazy(() => Tracing_TracingBackend).optional() }).passthrough(), "Tracing.start.params", "commandParams", { method: "Tracing.start" }); -const Tracing_StartResult = withCdpMeta(z.object({ }).passthrough(), "Tracing.start.result", "commandResult", { method: "Tracing.start" }); -const Tracing_BufferUsageEvent = withCdpMeta(z.object({ "percentFull": z.number().optional(), "eventCount": z.number().optional(), "value": z.number().optional() }).passthrough(), "Tracing.bufferUsage", "event", { phase: "event" }); -const Tracing_DataCollectedEvent = withCdpMeta(z.object({ "value": z.array(z.record(z.string(), z.unknown())) }).passthrough(), "Tracing.dataCollected", "event", { phase: "event" }); -const Tracing_TracingCompleteEvent = withCdpMeta(z.object({ "dataLossOccurred": z.boolean(), "stream": z.lazy(() => IO_StreamHandle).optional(), "traceFormat": z.lazy(() => Tracing_StreamFormat).optional(), "streamCompression": z.lazy(() => Tracing_StreamCompression).optional() }).passthrough(), "Tracing.tracingComplete", "event", { phase: "event" }); -const WebAudio_GraphObjectId = withCdpMeta(z.string(), "WebAudio.GraphObjectId", "type"); -const WebAudio_ContextType = withCdpMeta(z.enum(["realtime", "offline"]), "WebAudio.ContextType", "type"); -const WebAudio_ContextState = withCdpMeta(z.enum(["suspended", "running", "closed", "interrupted"]), "WebAudio.ContextState", "type"); -const WebAudio_NodeType = withCdpMeta(z.string(), "WebAudio.NodeType", "type"); -const WebAudio_ChannelCountMode = withCdpMeta(z.enum(["clamped-max", "explicit", "max"]), "WebAudio.ChannelCountMode", "type"); -const WebAudio_ChannelInterpretation = withCdpMeta(z.enum(["discrete", "speakers"]), "WebAudio.ChannelInterpretation", "type"); -const WebAudio_ParamType = withCdpMeta(z.string(), "WebAudio.ParamType", "type"); -const WebAudio_AutomationRate = withCdpMeta(z.enum(["a-rate", "k-rate"]), "WebAudio.AutomationRate", "type"); -const WebAudio_ContextRealtimeData = withCdpMeta(z.object({ "currentTime": z.number(), "renderCapacity": z.number(), "callbackIntervalMean": z.number(), "callbackIntervalVariance": z.number() }).passthrough(), "WebAudio.ContextRealtimeData", "type"); -const WebAudio_BaseAudioContext = withCdpMeta(z.object({ "contextId": z.lazy(() => WebAudio_GraphObjectId), "contextType": z.lazy(() => WebAudio_ContextType), "contextState": z.lazy(() => WebAudio_ContextState), "realtimeData": z.lazy(() => WebAudio_ContextRealtimeData).optional(), "callbackBufferSize": z.number(), "maxOutputChannelCount": z.number(), "sampleRate": z.number() }).passthrough(), "WebAudio.BaseAudioContext", "type"); -const WebAudio_AudioListener = withCdpMeta(z.object({ "listenerId": z.lazy(() => WebAudio_GraphObjectId), "contextId": z.lazy(() => WebAudio_GraphObjectId) }).passthrough(), "WebAudio.AudioListener", "type"); -const WebAudio_AudioNode = withCdpMeta(z.object({ "nodeId": z.lazy(() => WebAudio_GraphObjectId), "contextId": z.lazy(() => WebAudio_GraphObjectId), "nodeType": z.lazy(() => WebAudio_NodeType), "numberOfInputs": z.number(), "numberOfOutputs": z.number(), "channelCount": z.number(), "channelCountMode": z.lazy(() => WebAudio_ChannelCountMode), "channelInterpretation": z.lazy(() => WebAudio_ChannelInterpretation) }).passthrough(), "WebAudio.AudioNode", "type"); -const WebAudio_AudioParam = withCdpMeta(z.object({ "paramId": z.lazy(() => WebAudio_GraphObjectId), "nodeId": z.lazy(() => WebAudio_GraphObjectId), "contextId": z.lazy(() => WebAudio_GraphObjectId), "paramType": z.lazy(() => WebAudio_ParamType), "rate": z.lazy(() => WebAudio_AutomationRate), "defaultValue": z.number(), "minValue": z.number(), "maxValue": z.number() }).passthrough(), "WebAudio.AudioParam", "type"); -const WebAudio_EnableParams = withCdpMeta(z.object({ }).passthrough(), "WebAudio.enable.params", "commandParams", { method: "WebAudio.enable" }); -const WebAudio_EnableResult = withCdpMeta(z.object({ }).passthrough(), "WebAudio.enable.result", "commandResult", { method: "WebAudio.enable" }); -const WebAudio_DisableParams = withCdpMeta(z.object({ }).passthrough(), "WebAudio.disable.params", "commandParams", { method: "WebAudio.disable" }); -const WebAudio_DisableResult = withCdpMeta(z.object({ }).passthrough(), "WebAudio.disable.result", "commandResult", { method: "WebAudio.disable" }); -const WebAudio_GetRealtimeDataParams = withCdpMeta(z.object({ "contextId": z.lazy(() => WebAudio_GraphObjectId) }).passthrough(), "WebAudio.getRealtimeData.params", "commandParams", { method: "WebAudio.getRealtimeData" }); -const WebAudio_GetRealtimeDataResult = withCdpMeta(z.object({ "realtimeData": z.lazy(() => WebAudio_ContextRealtimeData) }).passthrough(), "WebAudio.getRealtimeData.result", "commandResult", { method: "WebAudio.getRealtimeData" }); -const WebAudio_ContextCreatedEvent = withCdpMeta(z.object({ "context": z.lazy(() => WebAudio_BaseAudioContext) }).passthrough(), "WebAudio.contextCreated", "event", { phase: "event" }); -const WebAudio_ContextWillBeDestroyedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => WebAudio_GraphObjectId) }).passthrough(), "WebAudio.contextWillBeDestroyed", "event", { phase: "event" }); -const WebAudio_ContextChangedEvent = withCdpMeta(z.object({ "context": z.lazy(() => WebAudio_BaseAudioContext) }).passthrough(), "WebAudio.contextChanged", "event", { phase: "event" }); -const WebAudio_AudioListenerCreatedEvent = withCdpMeta(z.object({ "listener": z.lazy(() => WebAudio_AudioListener) }).passthrough(), "WebAudio.audioListenerCreated", "event", { phase: "event" }); -const WebAudio_AudioListenerWillBeDestroyedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => WebAudio_GraphObjectId), "listenerId": z.lazy(() => WebAudio_GraphObjectId) }).passthrough(), "WebAudio.audioListenerWillBeDestroyed", "event", { phase: "event" }); -const WebAudio_AudioNodeCreatedEvent = withCdpMeta(z.object({ "node": z.lazy(() => WebAudio_AudioNode) }).passthrough(), "WebAudio.audioNodeCreated", "event", { phase: "event" }); -const WebAudio_AudioNodeWillBeDestroyedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => WebAudio_GraphObjectId), "nodeId": z.lazy(() => WebAudio_GraphObjectId) }).passthrough(), "WebAudio.audioNodeWillBeDestroyed", "event", { phase: "event" }); -const WebAudio_AudioParamCreatedEvent = withCdpMeta(z.object({ "param": z.lazy(() => WebAudio_AudioParam) }).passthrough(), "WebAudio.audioParamCreated", "event", { phase: "event" }); -const WebAudio_AudioParamWillBeDestroyedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => WebAudio_GraphObjectId), "nodeId": z.lazy(() => WebAudio_GraphObjectId), "paramId": z.lazy(() => WebAudio_GraphObjectId) }).passthrough(), "WebAudio.audioParamWillBeDestroyed", "event", { phase: "event" }); -const WebAudio_NodesConnectedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => WebAudio_GraphObjectId), "sourceId": z.lazy(() => WebAudio_GraphObjectId), "destinationId": z.lazy(() => WebAudio_GraphObjectId), "sourceOutputIndex": z.number().optional(), "destinationInputIndex": z.number().optional() }).passthrough(), "WebAudio.nodesConnected", "event", { phase: "event" }); -const WebAudio_NodesDisconnectedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => WebAudio_GraphObjectId), "sourceId": z.lazy(() => WebAudio_GraphObjectId), "destinationId": z.lazy(() => WebAudio_GraphObjectId), "sourceOutputIndex": z.number().optional(), "destinationInputIndex": z.number().optional() }).passthrough(), "WebAudio.nodesDisconnected", "event", { phase: "event" }); -const WebAudio_NodeParamConnectedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => WebAudio_GraphObjectId), "sourceId": z.lazy(() => WebAudio_GraphObjectId), "destinationId": z.lazy(() => WebAudio_GraphObjectId), "sourceOutputIndex": z.number().optional() }).passthrough(), "WebAudio.nodeParamConnected", "event", { phase: "event" }); -const WebAudio_NodeParamDisconnectedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => WebAudio_GraphObjectId), "sourceId": z.lazy(() => WebAudio_GraphObjectId), "destinationId": z.lazy(() => WebAudio_GraphObjectId), "sourceOutputIndex": z.number().optional() }).passthrough(), "WebAudio.nodeParamDisconnected", "event", { phase: "event" }); -const WebAuthn_AuthenticatorId = withCdpMeta(z.string(), "WebAuthn.AuthenticatorId", "type"); -const WebAuthn_AuthenticatorProtocol = withCdpMeta(z.enum(["u2f", "ctap2"]), "WebAuthn.AuthenticatorProtocol", "type"); -const WebAuthn_Ctap2Version = withCdpMeta(z.enum(["ctap2_0", "ctap2_1", "ctap2_2"]), "WebAuthn.Ctap2Version", "type"); -const WebAuthn_AuthenticatorTransport = withCdpMeta(z.enum(["usb", "nfc", "ble", "cable", "internal"]), "WebAuthn.AuthenticatorTransport", "type"); -const WebAuthn_VirtualAuthenticatorOptions = withCdpMeta(z.object({ "protocol": z.lazy(() => WebAuthn_AuthenticatorProtocol), "ctap2Version": z.lazy(() => WebAuthn_Ctap2Version).optional(), "transport": z.lazy(() => WebAuthn_AuthenticatorTransport), "hasResidentKey": z.boolean().optional(), "hasUserVerification": z.boolean().optional(), "hasLargeBlob": z.boolean().optional(), "hasCredBlob": z.boolean().optional(), "hasMinPinLength": z.boolean().optional(), "hasPrf": z.boolean().optional(), "hasHmacSecret": z.boolean().optional(), "hasHmacSecretMc": z.boolean().optional(), "automaticPresenceSimulation": z.boolean().optional(), "isUserVerified": z.boolean().optional(), "defaultBackupEligibility": z.boolean().optional(), "defaultBackupState": z.boolean().optional() }).passthrough(), "WebAuthn.VirtualAuthenticatorOptions", "type"); -const WebAuthn_Credential = withCdpMeta(z.object({ "credentialId": z.string(), "isResidentCredential": z.boolean(), "rpId": z.string().optional(), "privateKey": z.string(), "userHandle": z.string().optional(), "signCount": z.number().int(), "largeBlob": z.string().optional(), "backupEligibility": z.boolean().optional(), "backupState": z.boolean().optional(), "userName": z.string().optional(), "userDisplayName": z.string().optional() }).passthrough(), "WebAuthn.Credential", "type"); -const WebAuthn_EnableParams = withCdpMeta(z.object({ "enableUI": z.boolean().optional() }).passthrough(), "WebAuthn.enable.params", "commandParams", { method: "WebAuthn.enable" }); -const WebAuthn_EnableResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.enable.result", "commandResult", { method: "WebAuthn.enable" }); -const WebAuthn_DisableParams = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.disable.params", "commandParams", { method: "WebAuthn.disable" }); -const WebAuthn_DisableResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.disable.result", "commandResult", { method: "WebAuthn.disable" }); -const WebAuthn_AddVirtualAuthenticatorParams = withCdpMeta(z.object({ "options": z.lazy(() => WebAuthn_VirtualAuthenticatorOptions) }).passthrough(), "WebAuthn.addVirtualAuthenticator.params", "commandParams", { method: "WebAuthn.addVirtualAuthenticator" }); -const WebAuthn_AddVirtualAuthenticatorResult = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId) }).passthrough(), "WebAuthn.addVirtualAuthenticator.result", "commandResult", { method: "WebAuthn.addVirtualAuthenticator" }); -const WebAuthn_SetResponseOverrideBitsParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "isBogusSignature": z.boolean().optional(), "isBadUV": z.boolean().optional(), "isBadUP": z.boolean().optional() }).passthrough(), "WebAuthn.setResponseOverrideBits.params", "commandParams", { method: "WebAuthn.setResponseOverrideBits" }); -const WebAuthn_SetResponseOverrideBitsResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.setResponseOverrideBits.result", "commandResult", { method: "WebAuthn.setResponseOverrideBits" }); -const WebAuthn_RemoveVirtualAuthenticatorParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId) }).passthrough(), "WebAuthn.removeVirtualAuthenticator.params", "commandParams", { method: "WebAuthn.removeVirtualAuthenticator" }); -const WebAuthn_RemoveVirtualAuthenticatorResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.removeVirtualAuthenticator.result", "commandResult", { method: "WebAuthn.removeVirtualAuthenticator" }); -const WebAuthn_AddCredentialParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "credential": z.lazy(() => WebAuthn_Credential) }).passthrough(), "WebAuthn.addCredential.params", "commandParams", { method: "WebAuthn.addCredential" }); -const WebAuthn_AddCredentialResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.addCredential.result", "commandResult", { method: "WebAuthn.addCredential" }); -const WebAuthn_GetCredentialParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "credentialId": z.string() }).passthrough(), "WebAuthn.getCredential.params", "commandParams", { method: "WebAuthn.getCredential" }); -const WebAuthn_GetCredentialResult = withCdpMeta(z.object({ "credential": z.lazy(() => WebAuthn_Credential) }).passthrough(), "WebAuthn.getCredential.result", "commandResult", { method: "WebAuthn.getCredential" }); -const WebAuthn_GetCredentialsParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId) }).passthrough(), "WebAuthn.getCredentials.params", "commandParams", { method: "WebAuthn.getCredentials" }); -const WebAuthn_GetCredentialsResult = withCdpMeta(z.object({ "credentials": z.array(z.lazy(() => WebAuthn_Credential)) }).passthrough(), "WebAuthn.getCredentials.result", "commandResult", { method: "WebAuthn.getCredentials" }); -const WebAuthn_RemoveCredentialParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "credentialId": z.string() }).passthrough(), "WebAuthn.removeCredential.params", "commandParams", { method: "WebAuthn.removeCredential" }); -const WebAuthn_RemoveCredentialResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.removeCredential.result", "commandResult", { method: "WebAuthn.removeCredential" }); -const WebAuthn_ClearCredentialsParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId) }).passthrough(), "WebAuthn.clearCredentials.params", "commandParams", { method: "WebAuthn.clearCredentials" }); -const WebAuthn_ClearCredentialsResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.clearCredentials.result", "commandResult", { method: "WebAuthn.clearCredentials" }); -const WebAuthn_SetUserVerifiedParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "isUserVerified": z.boolean() }).passthrough(), "WebAuthn.setUserVerified.params", "commandParams", { method: "WebAuthn.setUserVerified" }); -const WebAuthn_SetUserVerifiedResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.setUserVerified.result", "commandResult", { method: "WebAuthn.setUserVerified" }); -const WebAuthn_SetAutomaticPresenceSimulationParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "enabled": z.boolean() }).passthrough(), "WebAuthn.setAutomaticPresenceSimulation.params", "commandParams", { method: "WebAuthn.setAutomaticPresenceSimulation" }); -const WebAuthn_SetAutomaticPresenceSimulationResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.setAutomaticPresenceSimulation.result", "commandResult", { method: "WebAuthn.setAutomaticPresenceSimulation" }); -const WebAuthn_SetCredentialPropertiesParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "credentialId": z.string(), "backupEligibility": z.boolean().optional(), "backupState": z.boolean().optional() }).passthrough(), "WebAuthn.setCredentialProperties.params", "commandParams", { method: "WebAuthn.setCredentialProperties" }); -const WebAuthn_SetCredentialPropertiesResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.setCredentialProperties.result", "commandResult", { method: "WebAuthn.setCredentialProperties" }); -const WebAuthn_CredentialAddedEvent = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "credential": z.lazy(() => WebAuthn_Credential) }).passthrough(), "WebAuthn.credentialAdded", "event", { phase: "event" }); -const WebAuthn_CredentialDeletedEvent = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "credentialId": z.string() }).passthrough(), "WebAuthn.credentialDeleted", "event", { phase: "event" }); -const WebAuthn_CredentialUpdatedEvent = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "credential": z.lazy(() => WebAuthn_Credential) }).passthrough(), "WebAuthn.credentialUpdated", "event", { phase: "event" }); -const WebAuthn_CredentialAssertedEvent = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => WebAuthn_AuthenticatorId), "credential": z.lazy(() => WebAuthn_Credential) }).passthrough(), "WebAuthn.credentialAsserted", "event", { phase: "event" }); -const WebMCP_Annotation = withCdpMeta(z.object({ "readOnly": z.boolean().optional(), "untrustedContent": z.boolean().optional(), "autosubmit": z.boolean().optional() }).passthrough(), "WebMCP.Annotation", "type"); -const WebMCP_InvocationStatus = withCdpMeta(z.enum(["Completed", "Canceled", "Error"]), "WebMCP.InvocationStatus", "type"); -const WebMCP_Tool = withCdpMeta(z.object({ "name": z.string(), "description": z.string(), "inputSchema": z.record(z.string(), z.unknown()).optional(), "annotations": z.lazy(() => WebMCP_Annotation).optional(), "frameId": z.lazy(() => Page_FrameId), "backendNodeId": z.lazy(() => DOM_BackendNodeId).optional(), "stackTrace": z.lazy(() => Runtime_StackTrace).optional() }).passthrough(), "WebMCP.Tool", "type"); -const WebMCP_RemovedTool = withCdpMeta(z.object({ "name": z.string(), "frameId": z.lazy(() => Page_FrameId) }).passthrough(), "WebMCP.RemovedTool", "type"); -const WebMCP_EnableParams = withCdpMeta(z.object({ }).passthrough(), "WebMCP.enable.params", "commandParams", { method: "WebMCP.enable" }); -const WebMCP_EnableResult = withCdpMeta(z.object({ }).passthrough(), "WebMCP.enable.result", "commandResult", { method: "WebMCP.enable" }); -const WebMCP_DisableParams = withCdpMeta(z.object({ }).passthrough(), "WebMCP.disable.params", "commandParams", { method: "WebMCP.disable" }); -const WebMCP_DisableResult = withCdpMeta(z.object({ }).passthrough(), "WebMCP.disable.result", "commandResult", { method: "WebMCP.disable" }); -const WebMCP_InvokeToolParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page_FrameId), "toolName": z.string(), "input": z.record(z.string(), z.unknown()) }).passthrough(), "WebMCP.invokeTool.params", "commandParams", { method: "WebMCP.invokeTool" }); -const WebMCP_InvokeToolResult = withCdpMeta(z.object({ "invocationId": z.string() }).passthrough(), "WebMCP.invokeTool.result", "commandResult", { method: "WebMCP.invokeTool" }); -const WebMCP_CancelInvocationParams = withCdpMeta(z.object({ "invocationId": z.string() }).passthrough(), "WebMCP.cancelInvocation.params", "commandParams", { method: "WebMCP.cancelInvocation" }); -const WebMCP_CancelInvocationResult = withCdpMeta(z.object({ }).passthrough(), "WebMCP.cancelInvocation.result", "commandResult", { method: "WebMCP.cancelInvocation" }); -const WebMCP_ToolsAddedEvent = withCdpMeta(z.object({ "tools": z.array(z.lazy(() => WebMCP_Tool)) }).passthrough(), "WebMCP.toolsAdded", "event", { phase: "event" }); -const WebMCP_ToolsRemovedEvent = withCdpMeta(z.object({ "tools": z.array(z.lazy(() => WebMCP_RemovedTool)) }).passthrough(), "WebMCP.toolsRemoved", "event", { phase: "event" }); -const WebMCP_ToolInvokedEvent = withCdpMeta(z.object({ "toolName": z.string(), "frameId": z.lazy(() => Page_FrameId), "invocationId": z.string(), "input": z.string() }).passthrough(), "WebMCP.toolInvoked", "event", { phase: "event" }); -const WebMCP_ToolRespondedEvent = withCdpMeta(z.object({ "invocationId": z.string(), "status": z.lazy(() => WebMCP_InvocationStatus), "output": z.any().optional(), "errorText": z.string().optional(), "exception": z.lazy(() => Runtime_RemoteObject).optional() }).passthrough(), "WebMCP.toolResponded", "event", { phase: "event" }); +import { Mod } from "./cdpmod.js"; +import * as Accessibility from "./zod/Accessibility.js"; +import * as Animation from "./zod/Animation.js"; +import * as Audits from "./zod/Audits.js"; +import * as Autofill from "./zod/Autofill.js"; +import * as BackgroundService from "./zod/BackgroundService.js"; +import * as BluetoothEmulation from "./zod/BluetoothEmulation.js"; +import * as Browser from "./zod/Browser.js"; +import * as CacheStorage from "./zod/CacheStorage.js"; +import * as Cast from "./zod/Cast.js"; +import * as Console from "./zod/Console.js"; +import * as CrashReportContext from "./zod/CrashReportContext.js"; +import * as CSS from "./zod/CSS.js"; +import * as Debugger from "./zod/Debugger.js"; +import * as DeviceAccess from "./zod/DeviceAccess.js"; +import * as DeviceOrientation from "./zod/DeviceOrientation.js"; +import * as DOM from "./zod/DOM.js"; +import * as DOMDebugger from "./zod/DOMDebugger.js"; +import * as DOMSnapshot from "./zod/DOMSnapshot.js"; +import * as DOMStorage from "./zod/DOMStorage.js"; +import * as Emulation from "./zod/Emulation.js"; +import * as EventBreakpoints from "./zod/EventBreakpoints.js"; +import * as Extensions from "./zod/Extensions.js"; +import * as FedCm from "./zod/FedCm.js"; +import * as Fetch from "./zod/Fetch.js"; +import * as FileSystem from "./zod/FileSystem.js"; +import * as HeadlessExperimental from "./zod/HeadlessExperimental.js"; +import * as HeapProfiler from "./zod/HeapProfiler.js"; +import * as IndexedDB from "./zod/IndexedDB.js"; +import * as Input from "./zod/Input.js"; +import * as Inspector from "./zod/Inspector.js"; +import * as IO from "./zod/IO.js"; +import * as LayerTree from "./zod/LayerTree.js"; +import * as Log from "./zod/Log.js"; +import * as Media from "./zod/Media.js"; +import * as Memory from "./zod/Memory.js"; +import * as Network from "./zod/Network.js"; +import * as Overlay from "./zod/Overlay.js"; +import * as Page from "./zod/Page.js"; +import * as Performance from "./zod/Performance.js"; +import * as PerformanceTimeline from "./zod/PerformanceTimeline.js"; +import * as Preload from "./zod/Preload.js"; +import * as Profiler from "./zod/Profiler.js"; +import * as PWA from "./zod/PWA.js"; +import * as Runtime from "./zod/Runtime.js"; +import * as Schema from "./zod/Schema.js"; +import * as Security from "./zod/Security.js"; +import * as ServiceWorker from "./zod/ServiceWorker.js"; +import * as SmartCardEmulation from "./zod/SmartCardEmulation.js"; +import * as Storage from "./zod/Storage.js"; +import * as SystemInfo from "./zod/SystemInfo.js"; +import * as Target from "./zod/Target.js"; +import * as Tethering from "./zod/Tethering.js"; +import * as Tracing from "./zod/Tracing.js"; +import * as WebAudio from "./zod/WebAudio.js"; +import * as WebAuthn from "./zod/WebAuthn.js"; +import * as WebMCP from "./zod/WebMCP.js"; export const zod = { - Magic, - Accessibility: { - AXNodeId: Accessibility_AXNodeId, - AXValueType: Accessibility_AXValueType, - AXValueSourceType: Accessibility_AXValueSourceType, - AXValueNativeSourceType: Accessibility_AXValueNativeSourceType, - AXValueSource: Accessibility_AXValueSource, - AXRelatedNode: Accessibility_AXRelatedNode, - AXProperty: Accessibility_AXProperty, - AXValue: Accessibility_AXValue, - AXPropertyName: Accessibility_AXPropertyName, - AXNode: Accessibility_AXNode, - DisableParams: Accessibility_DisableParams, - DisableResult: Accessibility_DisableResult, - EnableParams: Accessibility_EnableParams, - EnableResult: Accessibility_EnableResult, - GetPartialAXTreeParams: Accessibility_GetPartialAXTreeParams, - GetPartialAXTreeResult: Accessibility_GetPartialAXTreeResult, - GetFullAXTreeParams: Accessibility_GetFullAXTreeParams, - GetFullAXTreeResult: Accessibility_GetFullAXTreeResult, - GetRootAXNodeParams: Accessibility_GetRootAXNodeParams, - GetRootAXNodeResult: Accessibility_GetRootAXNodeResult, - GetAXNodeAndAncestorsParams: Accessibility_GetAXNodeAndAncestorsParams, - GetAXNodeAndAncestorsResult: Accessibility_GetAXNodeAndAncestorsResult, - GetChildAXNodesParams: Accessibility_GetChildAXNodesParams, - GetChildAXNodesResult: Accessibility_GetChildAXNodesResult, - QueryAXTreeParams: Accessibility_QueryAXTreeParams, - QueryAXTreeResult: Accessibility_QueryAXTreeResult, - LoadCompleteEvent: Accessibility_LoadCompleteEvent, - NodesUpdatedEvent: Accessibility_NodesUpdatedEvent, - }, - Animation: { - Animation: Animation_Animation, - ViewOrScrollTimeline: Animation_ViewOrScrollTimeline, - AnimationEffect: Animation_AnimationEffect, - KeyframesRule: Animation_KeyframesRule, - KeyframeStyle: Animation_KeyframeStyle, - DisableParams: Animation_DisableParams, - DisableResult: Animation_DisableResult, - EnableParams: Animation_EnableParams, - EnableResult: Animation_EnableResult, - GetCurrentTimeParams: Animation_GetCurrentTimeParams, - GetCurrentTimeResult: Animation_GetCurrentTimeResult, - GetPlaybackRateParams: Animation_GetPlaybackRateParams, - GetPlaybackRateResult: Animation_GetPlaybackRateResult, - ReleaseAnimationsParams: Animation_ReleaseAnimationsParams, - ReleaseAnimationsResult: Animation_ReleaseAnimationsResult, - ResolveAnimationParams: Animation_ResolveAnimationParams, - ResolveAnimationResult: Animation_ResolveAnimationResult, - SeekAnimationsParams: Animation_SeekAnimationsParams, - SeekAnimationsResult: Animation_SeekAnimationsResult, - SetPausedParams: Animation_SetPausedParams, - SetPausedResult: Animation_SetPausedResult, - SetPlaybackRateParams: Animation_SetPlaybackRateParams, - SetPlaybackRateResult: Animation_SetPlaybackRateResult, - SetTimingParams: Animation_SetTimingParams, - SetTimingResult: Animation_SetTimingResult, - AnimationCanceledEvent: Animation_AnimationCanceledEvent, - AnimationCreatedEvent: Animation_AnimationCreatedEvent, - AnimationStartedEvent: Animation_AnimationStartedEvent, - AnimationUpdatedEvent: Animation_AnimationUpdatedEvent, - }, - Audits: { - AffectedCookie: Audits_AffectedCookie, - AffectedRequest: Audits_AffectedRequest, - AffectedFrame: Audits_AffectedFrame, - CookieExclusionReason: Audits_CookieExclusionReason, - CookieWarningReason: Audits_CookieWarningReason, - CookieOperation: Audits_CookieOperation, - InsightType: Audits_InsightType, - CookieIssueInsight: Audits_CookieIssueInsight, - CookieIssueDetails: Audits_CookieIssueDetails, - PerformanceIssueType: Audits_PerformanceIssueType, - PerformanceIssueDetails: Audits_PerformanceIssueDetails, - MixedContentResolutionStatus: Audits_MixedContentResolutionStatus, - MixedContentResourceType: Audits_MixedContentResourceType, - MixedContentIssueDetails: Audits_MixedContentIssueDetails, - BlockedByResponseReason: Audits_BlockedByResponseReason, - BlockedByResponseIssueDetails: Audits_BlockedByResponseIssueDetails, - HeavyAdResolutionStatus: Audits_HeavyAdResolutionStatus, - HeavyAdReason: Audits_HeavyAdReason, - HeavyAdIssueDetails: Audits_HeavyAdIssueDetails, - ContentSecurityPolicyViolationType: Audits_ContentSecurityPolicyViolationType, - SourceCodeLocation: Audits_SourceCodeLocation, - ContentSecurityPolicyIssueDetails: Audits_ContentSecurityPolicyIssueDetails, - SharedArrayBufferIssueType: Audits_SharedArrayBufferIssueType, - SharedArrayBufferIssueDetails: Audits_SharedArrayBufferIssueDetails, - CorsIssueDetails: Audits_CorsIssueDetails, - AttributionReportingIssueType: Audits_AttributionReportingIssueType, - SharedDictionaryError: Audits_SharedDictionaryError, - SRIMessageSignatureError: Audits_SRIMessageSignatureError, - UnencodedDigestError: Audits_UnencodedDigestError, - ConnectionAllowlistError: Audits_ConnectionAllowlistError, - AttributionReportingIssueDetails: Audits_AttributionReportingIssueDetails, - QuirksModeIssueDetails: Audits_QuirksModeIssueDetails, - NavigatorUserAgentIssueDetails: Audits_NavigatorUserAgentIssueDetails, - SharedDictionaryIssueDetails: Audits_SharedDictionaryIssueDetails, - SRIMessageSignatureIssueDetails: Audits_SRIMessageSignatureIssueDetails, - UnencodedDigestIssueDetails: Audits_UnencodedDigestIssueDetails, - ConnectionAllowlistIssueDetails: Audits_ConnectionAllowlistIssueDetails, - GenericIssueErrorType: Audits_GenericIssueErrorType, - GenericIssueDetails: Audits_GenericIssueDetails, - DeprecationIssueDetails: Audits_DeprecationIssueDetails, - BounceTrackingIssueDetails: Audits_BounceTrackingIssueDetails, - CookieDeprecationMetadataIssueDetails: Audits_CookieDeprecationMetadataIssueDetails, - ClientHintIssueReason: Audits_ClientHintIssueReason, - FederatedAuthRequestIssueDetails: Audits_FederatedAuthRequestIssueDetails, - FederatedAuthRequestIssueReason: Audits_FederatedAuthRequestIssueReason, - FederatedAuthUserInfoRequestIssueDetails: Audits_FederatedAuthUserInfoRequestIssueDetails, - FederatedAuthUserInfoRequestIssueReason: Audits_FederatedAuthUserInfoRequestIssueReason, - ClientHintIssueDetails: Audits_ClientHintIssueDetails, - FailedRequestInfo: Audits_FailedRequestInfo, - PartitioningBlobURLInfo: Audits_PartitioningBlobURLInfo, - PartitioningBlobURLIssueDetails: Audits_PartitioningBlobURLIssueDetails, - ElementAccessibilityIssueReason: Audits_ElementAccessibilityIssueReason, - ElementAccessibilityIssueDetails: Audits_ElementAccessibilityIssueDetails, - StyleSheetLoadingIssueReason: Audits_StyleSheetLoadingIssueReason, - StylesheetLoadingIssueDetails: Audits_StylesheetLoadingIssueDetails, - PropertyRuleIssueReason: Audits_PropertyRuleIssueReason, - PropertyRuleIssueDetails: Audits_PropertyRuleIssueDetails, - UserReidentificationIssueType: Audits_UserReidentificationIssueType, - UserReidentificationIssueDetails: Audits_UserReidentificationIssueDetails, - PermissionElementIssueType: Audits_PermissionElementIssueType, - PermissionElementIssueDetails: Audits_PermissionElementIssueDetails, - SelectivePermissionsInterventionIssueDetails: Audits_SelectivePermissionsInterventionIssueDetails, - InspectorIssueCode: Audits_InspectorIssueCode, - InspectorIssueDetails: Audits_InspectorIssueDetails, - IssueId: Audits_IssueId, - InspectorIssue: Audits_InspectorIssue, - GetEncodedResponseParams: Audits_GetEncodedResponseParams, - GetEncodedResponseResult: Audits_GetEncodedResponseResult, - DisableParams: Audits_DisableParams, - DisableResult: Audits_DisableResult, - EnableParams: Audits_EnableParams, - EnableResult: Audits_EnableResult, - CheckFormsIssuesParams: Audits_CheckFormsIssuesParams, - CheckFormsIssuesResult: Audits_CheckFormsIssuesResult, - IssueAddedEvent: Audits_IssueAddedEvent, - }, - Autofill: { - CreditCard: Autofill_CreditCard, - AddressField: Autofill_AddressField, - AddressFields: Autofill_AddressFields, - Address: Autofill_Address, - AddressUI: Autofill_AddressUI, - FillingStrategy: Autofill_FillingStrategy, - FilledField: Autofill_FilledField, - TriggerParams: Autofill_TriggerParams, - TriggerResult: Autofill_TriggerResult, - SetAddressesParams: Autofill_SetAddressesParams, - SetAddressesResult: Autofill_SetAddressesResult, - DisableParams: Autofill_DisableParams, - DisableResult: Autofill_DisableResult, - EnableParams: Autofill_EnableParams, - EnableResult: Autofill_EnableResult, - AddressFormFilledEvent: Autofill_AddressFormFilledEvent, - }, - BackgroundService: { - ServiceName: BackgroundService_ServiceName, - EventMetadata: BackgroundService_EventMetadata, - BackgroundServiceEvent: BackgroundService_BackgroundServiceEvent, - StartObservingParams: BackgroundService_StartObservingParams, - StartObservingResult: BackgroundService_StartObservingResult, - StopObservingParams: BackgroundService_StopObservingParams, - StopObservingResult: BackgroundService_StopObservingResult, - SetRecordingParams: BackgroundService_SetRecordingParams, - SetRecordingResult: BackgroundService_SetRecordingResult, - ClearEventsParams: BackgroundService_ClearEventsParams, - ClearEventsResult: BackgroundService_ClearEventsResult, - RecordingStateChangedEvent: BackgroundService_RecordingStateChangedEvent, - BackgroundServiceEventReceivedEvent: BackgroundService_BackgroundServiceEventReceivedEvent, - }, - BluetoothEmulation: { - CentralState: BluetoothEmulation_CentralState, - GATTOperationType: BluetoothEmulation_GATTOperationType, - CharacteristicWriteType: BluetoothEmulation_CharacteristicWriteType, - CharacteristicOperationType: BluetoothEmulation_CharacteristicOperationType, - DescriptorOperationType: BluetoothEmulation_DescriptorOperationType, - ManufacturerData: BluetoothEmulation_ManufacturerData, - ScanRecord: BluetoothEmulation_ScanRecord, - ScanEntry: BluetoothEmulation_ScanEntry, - CharacteristicProperties: BluetoothEmulation_CharacteristicProperties, - EnableParams: BluetoothEmulation_EnableParams, - EnableResult: BluetoothEmulation_EnableResult, - SetSimulatedCentralStateParams: BluetoothEmulation_SetSimulatedCentralStateParams, - SetSimulatedCentralStateResult: BluetoothEmulation_SetSimulatedCentralStateResult, - DisableParams: BluetoothEmulation_DisableParams, - DisableResult: BluetoothEmulation_DisableResult, - SimulatePreconnectedPeripheralParams: BluetoothEmulation_SimulatePreconnectedPeripheralParams, - SimulatePreconnectedPeripheralResult: BluetoothEmulation_SimulatePreconnectedPeripheralResult, - SimulateAdvertisementParams: BluetoothEmulation_SimulateAdvertisementParams, - SimulateAdvertisementResult: BluetoothEmulation_SimulateAdvertisementResult, - SimulateGATTOperationResponseParams: BluetoothEmulation_SimulateGATTOperationResponseParams, - SimulateGATTOperationResponseResult: BluetoothEmulation_SimulateGATTOperationResponseResult, - SimulateCharacteristicOperationResponseParams: BluetoothEmulation_SimulateCharacteristicOperationResponseParams, - SimulateCharacteristicOperationResponseResult: BluetoothEmulation_SimulateCharacteristicOperationResponseResult, - SimulateDescriptorOperationResponseParams: BluetoothEmulation_SimulateDescriptorOperationResponseParams, - SimulateDescriptorOperationResponseResult: BluetoothEmulation_SimulateDescriptorOperationResponseResult, - AddServiceParams: BluetoothEmulation_AddServiceParams, - AddServiceResult: BluetoothEmulation_AddServiceResult, - RemoveServiceParams: BluetoothEmulation_RemoveServiceParams, - RemoveServiceResult: BluetoothEmulation_RemoveServiceResult, - AddCharacteristicParams: BluetoothEmulation_AddCharacteristicParams, - AddCharacteristicResult: BluetoothEmulation_AddCharacteristicResult, - RemoveCharacteristicParams: BluetoothEmulation_RemoveCharacteristicParams, - RemoveCharacteristicResult: BluetoothEmulation_RemoveCharacteristicResult, - AddDescriptorParams: BluetoothEmulation_AddDescriptorParams, - AddDescriptorResult: BluetoothEmulation_AddDescriptorResult, - RemoveDescriptorParams: BluetoothEmulation_RemoveDescriptorParams, - RemoveDescriptorResult: BluetoothEmulation_RemoveDescriptorResult, - SimulateGATTDisconnectionParams: BluetoothEmulation_SimulateGATTDisconnectionParams, - SimulateGATTDisconnectionResult: BluetoothEmulation_SimulateGATTDisconnectionResult, - GattOperationReceivedEvent: BluetoothEmulation_GattOperationReceivedEvent, - CharacteristicOperationReceivedEvent: BluetoothEmulation_CharacteristicOperationReceivedEvent, - DescriptorOperationReceivedEvent: BluetoothEmulation_DescriptorOperationReceivedEvent, - }, - Browser: { - BrowserContextID: Browser_BrowserContextID, - WindowID: Browser_WindowID, - WindowState: Browser_WindowState, - Bounds: Browser_Bounds, - PermissionType: Browser_PermissionType, - PermissionSetting: Browser_PermissionSetting, - PermissionDescriptor: Browser_PermissionDescriptor, - BrowserCommandId: Browser_BrowserCommandId, - Bucket: Browser_Bucket, - Histogram: Browser_Histogram, - PrivacySandboxAPI: Browser_PrivacySandboxAPI, - SetPermissionParams: Browser_SetPermissionParams, - SetPermissionResult: Browser_SetPermissionResult, - GrantPermissionsParams: Browser_GrantPermissionsParams, - GrantPermissionsResult: Browser_GrantPermissionsResult, - ResetPermissionsParams: Browser_ResetPermissionsParams, - ResetPermissionsResult: Browser_ResetPermissionsResult, - SetDownloadBehaviorParams: Browser_SetDownloadBehaviorParams, - SetDownloadBehaviorResult: Browser_SetDownloadBehaviorResult, - CancelDownloadParams: Browser_CancelDownloadParams, - CancelDownloadResult: Browser_CancelDownloadResult, - CloseParams: Browser_CloseParams, - CloseResult: Browser_CloseResult, - CrashParams: Browser_CrashParams, - CrashResult: Browser_CrashResult, - CrashGpuProcessParams: Browser_CrashGpuProcessParams, - CrashGpuProcessResult: Browser_CrashGpuProcessResult, - GetVersionParams: Browser_GetVersionParams, - GetVersionResult: Browser_GetVersionResult, - GetBrowserCommandLineParams: Browser_GetBrowserCommandLineParams, - GetBrowserCommandLineResult: Browser_GetBrowserCommandLineResult, - GetHistogramsParams: Browser_GetHistogramsParams, - GetHistogramsResult: Browser_GetHistogramsResult, - GetHistogramParams: Browser_GetHistogramParams, - GetHistogramResult: Browser_GetHistogramResult, - GetWindowBoundsParams: Browser_GetWindowBoundsParams, - GetWindowBoundsResult: Browser_GetWindowBoundsResult, - GetWindowForTargetParams: Browser_GetWindowForTargetParams, - GetWindowForTargetResult: Browser_GetWindowForTargetResult, - SetWindowBoundsParams: Browser_SetWindowBoundsParams, - SetWindowBoundsResult: Browser_SetWindowBoundsResult, - SetContentsSizeParams: Browser_SetContentsSizeParams, - SetContentsSizeResult: Browser_SetContentsSizeResult, - SetDockTileParams: Browser_SetDockTileParams, - SetDockTileResult: Browser_SetDockTileResult, - ExecuteBrowserCommandParams: Browser_ExecuteBrowserCommandParams, - ExecuteBrowserCommandResult: Browser_ExecuteBrowserCommandResult, - AddPrivacySandboxEnrollmentOverrideParams: Browser_AddPrivacySandboxEnrollmentOverrideParams, - AddPrivacySandboxEnrollmentOverrideResult: Browser_AddPrivacySandboxEnrollmentOverrideResult, - AddPrivacySandboxCoordinatorKeyConfigParams: Browser_AddPrivacySandboxCoordinatorKeyConfigParams, - AddPrivacySandboxCoordinatorKeyConfigResult: Browser_AddPrivacySandboxCoordinatorKeyConfigResult, - DownloadWillBeginEvent: Browser_DownloadWillBeginEvent, - DownloadProgressEvent: Browser_DownloadProgressEvent, - }, - CacheStorage: { - CacheId: CacheStorage_CacheId, - CachedResponseType: CacheStorage_CachedResponseType, - DataEntry: CacheStorage_DataEntry, - Cache: CacheStorage_Cache, - Header: CacheStorage_Header, - CachedResponse: CacheStorage_CachedResponse, - DeleteCacheParams: CacheStorage_DeleteCacheParams, - DeleteCacheResult: CacheStorage_DeleteCacheResult, - DeleteEntryParams: CacheStorage_DeleteEntryParams, - DeleteEntryResult: CacheStorage_DeleteEntryResult, - RequestCacheNamesParams: CacheStorage_RequestCacheNamesParams, - RequestCacheNamesResult: CacheStorage_RequestCacheNamesResult, - RequestCachedResponseParams: CacheStorage_RequestCachedResponseParams, - RequestCachedResponseResult: CacheStorage_RequestCachedResponseResult, - RequestEntriesParams: CacheStorage_RequestEntriesParams, - RequestEntriesResult: CacheStorage_RequestEntriesResult, - }, - Cast: { - Sink: Cast_Sink, - EnableParams: Cast_EnableParams, - EnableResult: Cast_EnableResult, - DisableParams: Cast_DisableParams, - DisableResult: Cast_DisableResult, - SetSinkToUseParams: Cast_SetSinkToUseParams, - SetSinkToUseResult: Cast_SetSinkToUseResult, - StartDesktopMirroringParams: Cast_StartDesktopMirroringParams, - StartDesktopMirroringResult: Cast_StartDesktopMirroringResult, - StartTabMirroringParams: Cast_StartTabMirroringParams, - StartTabMirroringResult: Cast_StartTabMirroringResult, - StopCastingParams: Cast_StopCastingParams, - StopCastingResult: Cast_StopCastingResult, - SinksUpdatedEvent: Cast_SinksUpdatedEvent, - IssueUpdatedEvent: Cast_IssueUpdatedEvent, - }, - Console: { - ConsoleMessage: Console_ConsoleMessage, - ClearMessagesParams: Console_ClearMessagesParams, - ClearMessagesResult: Console_ClearMessagesResult, - DisableParams: Console_DisableParams, - DisableResult: Console_DisableResult, - EnableParams: Console_EnableParams, - EnableResult: Console_EnableResult, - MessageAddedEvent: Console_MessageAddedEvent, - }, - CrashReportContext: { - CrashReportContextEntry: CrashReportContext_CrashReportContextEntry, - GetEntriesParams: CrashReportContext_GetEntriesParams, - GetEntriesResult: CrashReportContext_GetEntriesResult, - }, - CSS: { - StyleSheetOrigin: CSS_StyleSheetOrigin, - PseudoElementMatches: CSS_PseudoElementMatches, - CSSAnimationStyle: CSS_CSSAnimationStyle, - InheritedStyleEntry: CSS_InheritedStyleEntry, - InheritedAnimatedStyleEntry: CSS_InheritedAnimatedStyleEntry, - InheritedPseudoElementMatches: CSS_InheritedPseudoElementMatches, - RuleMatch: CSS_RuleMatch, - Value: CSS_Value, - Specificity: CSS_Specificity, - SelectorList: CSS_SelectorList, - CSSStyleSheetHeader: CSS_CSSStyleSheetHeader, - CSSRule: CSS_CSSRule, - CSSRuleType: CSS_CSSRuleType, - RuleUsage: CSS_RuleUsage, - SourceRange: CSS_SourceRange, - ShorthandEntry: CSS_ShorthandEntry, - CSSComputedStyleProperty: CSS_CSSComputedStyleProperty, - ComputedStyleExtraFields: CSS_ComputedStyleExtraFields, - CSSStyle: CSS_CSSStyle, - CSSProperty: CSS_CSSProperty, - CSSMedia: CSS_CSSMedia, - MediaQuery: CSS_MediaQuery, - MediaQueryExpression: CSS_MediaQueryExpression, - CSSContainerQuery: CSS_CSSContainerQuery, - CSSSupports: CSS_CSSSupports, - CSSNavigation: CSS_CSSNavigation, - CSSScope: CSS_CSSScope, - CSSLayer: CSS_CSSLayer, - CSSStartingStyle: CSS_CSSStartingStyle, - CSSLayerData: CSS_CSSLayerData, - PlatformFontUsage: CSS_PlatformFontUsage, - FontVariationAxis: CSS_FontVariationAxis, - FontFace: CSS_FontFace, - CSSTryRule: CSS_CSSTryRule, - CSSPositionTryRule: CSS_CSSPositionTryRule, - CSSKeyframesRule: CSS_CSSKeyframesRule, - CSSPropertyRegistration: CSS_CSSPropertyRegistration, - CSSAtRule: CSS_CSSAtRule, - CSSPropertyRule: CSS_CSSPropertyRule, - CSSFunctionParameter: CSS_CSSFunctionParameter, - CSSFunctionConditionNode: CSS_CSSFunctionConditionNode, - CSSFunctionNode: CSS_CSSFunctionNode, - CSSFunctionRule: CSS_CSSFunctionRule, - CSSKeyframeRule: CSS_CSSKeyframeRule, - StyleDeclarationEdit: CSS_StyleDeclarationEdit, - AddRuleParams: CSS_AddRuleParams, - AddRuleResult: CSS_AddRuleResult, - CollectClassNamesParams: CSS_CollectClassNamesParams, - CollectClassNamesResult: CSS_CollectClassNamesResult, - CreateStyleSheetParams: CSS_CreateStyleSheetParams, - CreateStyleSheetResult: CSS_CreateStyleSheetResult, - DisableParams: CSS_DisableParams, - DisableResult: CSS_DisableResult, - EnableParams: CSS_EnableParams, - EnableResult: CSS_EnableResult, - ForcePseudoStateParams: CSS_ForcePseudoStateParams, - ForcePseudoStateResult: CSS_ForcePseudoStateResult, - ForceStartingStyleParams: CSS_ForceStartingStyleParams, - ForceStartingStyleResult: CSS_ForceStartingStyleResult, - GetBackgroundColorsParams: CSS_GetBackgroundColorsParams, - GetBackgroundColorsResult: CSS_GetBackgroundColorsResult, - GetComputedStyleForNodeParams: CSS_GetComputedStyleForNodeParams, - GetComputedStyleForNodeResult: CSS_GetComputedStyleForNodeResult, - ResolveValuesParams: CSS_ResolveValuesParams, - ResolveValuesResult: CSS_ResolveValuesResult, - GetLonghandPropertiesParams: CSS_GetLonghandPropertiesParams, - GetLonghandPropertiesResult: CSS_GetLonghandPropertiesResult, - GetInlineStylesForNodeParams: CSS_GetInlineStylesForNodeParams, - GetInlineStylesForNodeResult: CSS_GetInlineStylesForNodeResult, - GetAnimatedStylesForNodeParams: CSS_GetAnimatedStylesForNodeParams, - GetAnimatedStylesForNodeResult: CSS_GetAnimatedStylesForNodeResult, - GetMatchedStylesForNodeParams: CSS_GetMatchedStylesForNodeParams, - GetMatchedStylesForNodeResult: CSS_GetMatchedStylesForNodeResult, - GetEnvironmentVariablesParams: CSS_GetEnvironmentVariablesParams, - GetEnvironmentVariablesResult: CSS_GetEnvironmentVariablesResult, - GetMediaQueriesParams: CSS_GetMediaQueriesParams, - GetMediaQueriesResult: CSS_GetMediaQueriesResult, - GetPlatformFontsForNodeParams: CSS_GetPlatformFontsForNodeParams, - GetPlatformFontsForNodeResult: CSS_GetPlatformFontsForNodeResult, - GetStyleSheetTextParams: CSS_GetStyleSheetTextParams, - GetStyleSheetTextResult: CSS_GetStyleSheetTextResult, - GetLayersForNodeParams: CSS_GetLayersForNodeParams, - GetLayersForNodeResult: CSS_GetLayersForNodeResult, - GetLocationForSelectorParams: CSS_GetLocationForSelectorParams, - GetLocationForSelectorResult: CSS_GetLocationForSelectorResult, - TrackComputedStyleUpdatesForNodeParams: CSS_TrackComputedStyleUpdatesForNodeParams, - TrackComputedStyleUpdatesForNodeResult: CSS_TrackComputedStyleUpdatesForNodeResult, - TrackComputedStyleUpdatesParams: CSS_TrackComputedStyleUpdatesParams, - TrackComputedStyleUpdatesResult: CSS_TrackComputedStyleUpdatesResult, - TakeComputedStyleUpdatesParams: CSS_TakeComputedStyleUpdatesParams, - TakeComputedStyleUpdatesResult: CSS_TakeComputedStyleUpdatesResult, - SetEffectivePropertyValueForNodeParams: CSS_SetEffectivePropertyValueForNodeParams, - SetEffectivePropertyValueForNodeResult: CSS_SetEffectivePropertyValueForNodeResult, - SetPropertyRulePropertyNameParams: CSS_SetPropertyRulePropertyNameParams, - SetPropertyRulePropertyNameResult: CSS_SetPropertyRulePropertyNameResult, - SetKeyframeKeyParams: CSS_SetKeyframeKeyParams, - SetKeyframeKeyResult: CSS_SetKeyframeKeyResult, - SetMediaTextParams: CSS_SetMediaTextParams, - SetMediaTextResult: CSS_SetMediaTextResult, - SetContainerQueryTextParams: CSS_SetContainerQueryTextParams, - SetContainerQueryTextResult: CSS_SetContainerQueryTextResult, - SetSupportsTextParams: CSS_SetSupportsTextParams, - SetSupportsTextResult: CSS_SetSupportsTextResult, - SetNavigationTextParams: CSS_SetNavigationTextParams, - SetNavigationTextResult: CSS_SetNavigationTextResult, - SetScopeTextParams: CSS_SetScopeTextParams, - SetScopeTextResult: CSS_SetScopeTextResult, - SetRuleSelectorParams: CSS_SetRuleSelectorParams, - SetRuleSelectorResult: CSS_SetRuleSelectorResult, - SetStyleSheetTextParams: CSS_SetStyleSheetTextParams, - SetStyleSheetTextResult: CSS_SetStyleSheetTextResult, - SetStyleTextsParams: CSS_SetStyleTextsParams, - SetStyleTextsResult: CSS_SetStyleTextsResult, - StartRuleUsageTrackingParams: CSS_StartRuleUsageTrackingParams, - StartRuleUsageTrackingResult: CSS_StartRuleUsageTrackingResult, - StopRuleUsageTrackingParams: CSS_StopRuleUsageTrackingParams, - StopRuleUsageTrackingResult: CSS_StopRuleUsageTrackingResult, - TakeCoverageDeltaParams: CSS_TakeCoverageDeltaParams, - TakeCoverageDeltaResult: CSS_TakeCoverageDeltaResult, - SetLocalFontsEnabledParams: CSS_SetLocalFontsEnabledParams, - SetLocalFontsEnabledResult: CSS_SetLocalFontsEnabledResult, - FontsUpdatedEvent: CSS_FontsUpdatedEvent, - MediaQueryResultChangedEvent: CSS_MediaQueryResultChangedEvent, - StyleSheetAddedEvent: CSS_StyleSheetAddedEvent, - StyleSheetChangedEvent: CSS_StyleSheetChangedEvent, - StyleSheetRemovedEvent: CSS_StyleSheetRemovedEvent, - ComputedStyleUpdatedEvent: CSS_ComputedStyleUpdatedEvent, - }, - Debugger: { - BreakpointId: Debugger_BreakpointId, - CallFrameId: Debugger_CallFrameId, - Location: Debugger_Location, - ScriptPosition: Debugger_ScriptPosition, - LocationRange: Debugger_LocationRange, - CallFrame: Debugger_CallFrame, - Scope: Debugger_Scope, - SearchMatch: Debugger_SearchMatch, - BreakLocation: Debugger_BreakLocation, - WasmDisassemblyChunk: Debugger_WasmDisassemblyChunk, - ScriptLanguage: Debugger_ScriptLanguage, - DebugSymbols: Debugger_DebugSymbols, - ResolvedBreakpoint: Debugger_ResolvedBreakpoint, - ContinueToLocationParams: Debugger_ContinueToLocationParams, - ContinueToLocationResult: Debugger_ContinueToLocationResult, - DisableParams: Debugger_DisableParams, - DisableResult: Debugger_DisableResult, - EnableParams: Debugger_EnableParams, - EnableResult: Debugger_EnableResult, - EvaluateOnCallFrameParams: Debugger_EvaluateOnCallFrameParams, - EvaluateOnCallFrameResult: Debugger_EvaluateOnCallFrameResult, - GetPossibleBreakpointsParams: Debugger_GetPossibleBreakpointsParams, - GetPossibleBreakpointsResult: Debugger_GetPossibleBreakpointsResult, - GetScriptSourceParams: Debugger_GetScriptSourceParams, - GetScriptSourceResult: Debugger_GetScriptSourceResult, - DisassembleWasmModuleParams: Debugger_DisassembleWasmModuleParams, - DisassembleWasmModuleResult: Debugger_DisassembleWasmModuleResult, - NextWasmDisassemblyChunkParams: Debugger_NextWasmDisassemblyChunkParams, - NextWasmDisassemblyChunkResult: Debugger_NextWasmDisassemblyChunkResult, - GetWasmBytecodeParams: Debugger_GetWasmBytecodeParams, - GetWasmBytecodeResult: Debugger_GetWasmBytecodeResult, - GetStackTraceParams: Debugger_GetStackTraceParams, - GetStackTraceResult: Debugger_GetStackTraceResult, - PauseParams: Debugger_PauseParams, - PauseResult: Debugger_PauseResult, - PauseOnAsyncCallParams: Debugger_PauseOnAsyncCallParams, - PauseOnAsyncCallResult: Debugger_PauseOnAsyncCallResult, - RemoveBreakpointParams: Debugger_RemoveBreakpointParams, - RemoveBreakpointResult: Debugger_RemoveBreakpointResult, - RestartFrameParams: Debugger_RestartFrameParams, - RestartFrameResult: Debugger_RestartFrameResult, - ResumeParams: Debugger_ResumeParams, - ResumeResult: Debugger_ResumeResult, - SearchInContentParams: Debugger_SearchInContentParams, - SearchInContentResult: Debugger_SearchInContentResult, - SetAsyncCallStackDepthParams: Debugger_SetAsyncCallStackDepthParams, - SetAsyncCallStackDepthResult: Debugger_SetAsyncCallStackDepthResult, - SetBlackboxExecutionContextsParams: Debugger_SetBlackboxExecutionContextsParams, - SetBlackboxExecutionContextsResult: Debugger_SetBlackboxExecutionContextsResult, - SetBlackboxPatternsParams: Debugger_SetBlackboxPatternsParams, - SetBlackboxPatternsResult: Debugger_SetBlackboxPatternsResult, - SetBlackboxedRangesParams: Debugger_SetBlackboxedRangesParams, - SetBlackboxedRangesResult: Debugger_SetBlackboxedRangesResult, - SetBreakpointParams: Debugger_SetBreakpointParams, - SetBreakpointResult: Debugger_SetBreakpointResult, - SetInstrumentationBreakpointParams: Debugger_SetInstrumentationBreakpointParams, - SetInstrumentationBreakpointResult: Debugger_SetInstrumentationBreakpointResult, - SetBreakpointByUrlParams: Debugger_SetBreakpointByUrlParams, - SetBreakpointByUrlResult: Debugger_SetBreakpointByUrlResult, - SetBreakpointOnFunctionCallParams: Debugger_SetBreakpointOnFunctionCallParams, - SetBreakpointOnFunctionCallResult: Debugger_SetBreakpointOnFunctionCallResult, - SetBreakpointsActiveParams: Debugger_SetBreakpointsActiveParams, - SetBreakpointsActiveResult: Debugger_SetBreakpointsActiveResult, - SetPauseOnExceptionsParams: Debugger_SetPauseOnExceptionsParams, - SetPauseOnExceptionsResult: Debugger_SetPauseOnExceptionsResult, - SetReturnValueParams: Debugger_SetReturnValueParams, - SetReturnValueResult: Debugger_SetReturnValueResult, - SetScriptSourceParams: Debugger_SetScriptSourceParams, - SetScriptSourceResult: Debugger_SetScriptSourceResult, - SetSkipAllPausesParams: Debugger_SetSkipAllPausesParams, - SetSkipAllPausesResult: Debugger_SetSkipAllPausesResult, - SetVariableValueParams: Debugger_SetVariableValueParams, - SetVariableValueResult: Debugger_SetVariableValueResult, - StepIntoParams: Debugger_StepIntoParams, - StepIntoResult: Debugger_StepIntoResult, - StepOutParams: Debugger_StepOutParams, - StepOutResult: Debugger_StepOutResult, - StepOverParams: Debugger_StepOverParams, - StepOverResult: Debugger_StepOverResult, - BreakpointResolvedEvent: Debugger_BreakpointResolvedEvent, - PausedEvent: Debugger_PausedEvent, - ResumedEvent: Debugger_ResumedEvent, - ScriptFailedToParseEvent: Debugger_ScriptFailedToParseEvent, - ScriptParsedEvent: Debugger_ScriptParsedEvent, - }, - DeviceAccess: { - RequestId: DeviceAccess_RequestId, - DeviceId: DeviceAccess_DeviceId, - PromptDevice: DeviceAccess_PromptDevice, - EnableParams: DeviceAccess_EnableParams, - EnableResult: DeviceAccess_EnableResult, - DisableParams: DeviceAccess_DisableParams, - DisableResult: DeviceAccess_DisableResult, - SelectPromptParams: DeviceAccess_SelectPromptParams, - SelectPromptResult: DeviceAccess_SelectPromptResult, - CancelPromptParams: DeviceAccess_CancelPromptParams, - CancelPromptResult: DeviceAccess_CancelPromptResult, - DeviceRequestPromptedEvent: DeviceAccess_DeviceRequestPromptedEvent, - }, - DeviceOrientation: { - ClearDeviceOrientationOverrideParams: DeviceOrientation_ClearDeviceOrientationOverrideParams, - ClearDeviceOrientationOverrideResult: DeviceOrientation_ClearDeviceOrientationOverrideResult, - SetDeviceOrientationOverrideParams: DeviceOrientation_SetDeviceOrientationOverrideParams, - SetDeviceOrientationOverrideResult: DeviceOrientation_SetDeviceOrientationOverrideResult, - }, - DOM: { - NodeId: DOM_NodeId, - BackendNodeId: DOM_BackendNodeId, - StyleSheetId: DOM_StyleSheetId, - BackendNode: DOM_BackendNode, - PseudoType: DOM_PseudoType, - ShadowRootType: DOM_ShadowRootType, - CompatibilityMode: DOM_CompatibilityMode, - PhysicalAxes: DOM_PhysicalAxes, - LogicalAxes: DOM_LogicalAxes, - ScrollOrientation: DOM_ScrollOrientation, - Node: DOM_Node, - DetachedElementInfo: DOM_DetachedElementInfo, - RGBA: DOM_RGBA, - Quad: DOM_Quad, - BoxModel: DOM_BoxModel, - ShapeOutsideInfo: DOM_ShapeOutsideInfo, - Rect: DOM_Rect, - CSSComputedStyleProperty: DOM_CSSComputedStyleProperty, - CollectClassNamesFromSubtreeParams: DOM_CollectClassNamesFromSubtreeParams, - CollectClassNamesFromSubtreeResult: DOM_CollectClassNamesFromSubtreeResult, - CopyToParams: DOM_CopyToParams, - CopyToResult: DOM_CopyToResult, - DescribeNodeParams: DOM_DescribeNodeParams, - DescribeNodeResult: DOM_DescribeNodeResult, - ScrollIntoViewIfNeededParams: DOM_ScrollIntoViewIfNeededParams, - ScrollIntoViewIfNeededResult: DOM_ScrollIntoViewIfNeededResult, - DisableParams: DOM_DisableParams, - DisableResult: DOM_DisableResult, - DiscardSearchResultsParams: DOM_DiscardSearchResultsParams, - DiscardSearchResultsResult: DOM_DiscardSearchResultsResult, - EnableParams: DOM_EnableParams, - EnableResult: DOM_EnableResult, - FocusParams: DOM_FocusParams, - FocusResult: DOM_FocusResult, - GetAttributesParams: DOM_GetAttributesParams, - GetAttributesResult: DOM_GetAttributesResult, - GetBoxModelParams: DOM_GetBoxModelParams, - GetBoxModelResult: DOM_GetBoxModelResult, - GetContentQuadsParams: DOM_GetContentQuadsParams, - GetContentQuadsResult: DOM_GetContentQuadsResult, - GetDocumentParams: DOM_GetDocumentParams, - GetDocumentResult: DOM_GetDocumentResult, - GetFlattenedDocumentParams: DOM_GetFlattenedDocumentParams, - GetFlattenedDocumentResult: DOM_GetFlattenedDocumentResult, - GetNodesForSubtreeByStyleParams: DOM_GetNodesForSubtreeByStyleParams, - GetNodesForSubtreeByStyleResult: DOM_GetNodesForSubtreeByStyleResult, - GetNodeForLocationParams: DOM_GetNodeForLocationParams, - GetNodeForLocationResult: DOM_GetNodeForLocationResult, - GetOuterHTMLParams: DOM_GetOuterHTMLParams, - GetOuterHTMLResult: DOM_GetOuterHTMLResult, - GetRelayoutBoundaryParams: DOM_GetRelayoutBoundaryParams, - GetRelayoutBoundaryResult: DOM_GetRelayoutBoundaryResult, - GetSearchResultsParams: DOM_GetSearchResultsParams, - GetSearchResultsResult: DOM_GetSearchResultsResult, - HideHighlightParams: DOM_HideHighlightParams, - HideHighlightResult: DOM_HideHighlightResult, - HighlightNodeParams: DOM_HighlightNodeParams, - HighlightNodeResult: DOM_HighlightNodeResult, - HighlightRectParams: DOM_HighlightRectParams, - HighlightRectResult: DOM_HighlightRectResult, - MarkUndoableStateParams: DOM_MarkUndoableStateParams, - MarkUndoableStateResult: DOM_MarkUndoableStateResult, - MoveToParams: DOM_MoveToParams, - MoveToResult: DOM_MoveToResult, - PerformSearchParams: DOM_PerformSearchParams, - PerformSearchResult: DOM_PerformSearchResult, - PushNodeByPathToFrontendParams: DOM_PushNodeByPathToFrontendParams, - PushNodeByPathToFrontendResult: DOM_PushNodeByPathToFrontendResult, - PushNodesByBackendIdsToFrontendParams: DOM_PushNodesByBackendIdsToFrontendParams, - PushNodesByBackendIdsToFrontendResult: DOM_PushNodesByBackendIdsToFrontendResult, - QuerySelectorParams: DOM_QuerySelectorParams, - QuerySelectorResult: DOM_QuerySelectorResult, - QuerySelectorAllParams: DOM_QuerySelectorAllParams, - QuerySelectorAllResult: DOM_QuerySelectorAllResult, - GetTopLayerElementsParams: DOM_GetTopLayerElementsParams, - GetTopLayerElementsResult: DOM_GetTopLayerElementsResult, - GetElementByRelationParams: DOM_GetElementByRelationParams, - GetElementByRelationResult: DOM_GetElementByRelationResult, - RedoParams: DOM_RedoParams, - RedoResult: DOM_RedoResult, - RemoveAttributeParams: DOM_RemoveAttributeParams, - RemoveAttributeResult: DOM_RemoveAttributeResult, - RemoveNodeParams: DOM_RemoveNodeParams, - RemoveNodeResult: DOM_RemoveNodeResult, - RequestChildNodesParams: DOM_RequestChildNodesParams, - RequestChildNodesResult: DOM_RequestChildNodesResult, - RequestNodeParams: DOM_RequestNodeParams, - RequestNodeResult: DOM_RequestNodeResult, - ResolveNodeParams: DOM_ResolveNodeParams, - ResolveNodeResult: DOM_ResolveNodeResult, - SetAttributeValueParams: DOM_SetAttributeValueParams, - SetAttributeValueResult: DOM_SetAttributeValueResult, - SetAttributesAsTextParams: DOM_SetAttributesAsTextParams, - SetAttributesAsTextResult: DOM_SetAttributesAsTextResult, - SetFileInputFilesParams: DOM_SetFileInputFilesParams, - SetFileInputFilesResult: DOM_SetFileInputFilesResult, - SetNodeStackTracesEnabledParams: DOM_SetNodeStackTracesEnabledParams, - SetNodeStackTracesEnabledResult: DOM_SetNodeStackTracesEnabledResult, - GetNodeStackTracesParams: DOM_GetNodeStackTracesParams, - GetNodeStackTracesResult: DOM_GetNodeStackTracesResult, - GetFileInfoParams: DOM_GetFileInfoParams, - GetFileInfoResult: DOM_GetFileInfoResult, - GetDetachedDomNodesParams: DOM_GetDetachedDomNodesParams, - GetDetachedDomNodesResult: DOM_GetDetachedDomNodesResult, - SetInspectedNodeParams: DOM_SetInspectedNodeParams, - SetInspectedNodeResult: DOM_SetInspectedNodeResult, - SetNodeNameParams: DOM_SetNodeNameParams, - SetNodeNameResult: DOM_SetNodeNameResult, - SetNodeValueParams: DOM_SetNodeValueParams, - SetNodeValueResult: DOM_SetNodeValueResult, - SetOuterHTMLParams: DOM_SetOuterHTMLParams, - SetOuterHTMLResult: DOM_SetOuterHTMLResult, - UndoParams: DOM_UndoParams, - UndoResult: DOM_UndoResult, - GetFrameOwnerParams: DOM_GetFrameOwnerParams, - GetFrameOwnerResult: DOM_GetFrameOwnerResult, - GetContainerForNodeParams: DOM_GetContainerForNodeParams, - GetContainerForNodeResult: DOM_GetContainerForNodeResult, - GetQueryingDescendantsForContainerParams: DOM_GetQueryingDescendantsForContainerParams, - GetQueryingDescendantsForContainerResult: DOM_GetQueryingDescendantsForContainerResult, - GetAnchorElementParams: DOM_GetAnchorElementParams, - GetAnchorElementResult: DOM_GetAnchorElementResult, - ForceShowPopoverParams: DOM_ForceShowPopoverParams, - ForceShowPopoverResult: DOM_ForceShowPopoverResult, - AttributeModifiedEvent: DOM_AttributeModifiedEvent, - AdoptedStyleSheetsModifiedEvent: DOM_AdoptedStyleSheetsModifiedEvent, - AttributeRemovedEvent: DOM_AttributeRemovedEvent, - CharacterDataModifiedEvent: DOM_CharacterDataModifiedEvent, - ChildNodeCountUpdatedEvent: DOM_ChildNodeCountUpdatedEvent, - ChildNodeInsertedEvent: DOM_ChildNodeInsertedEvent, - ChildNodeRemovedEvent: DOM_ChildNodeRemovedEvent, - DistributedNodesUpdatedEvent: DOM_DistributedNodesUpdatedEvent, - DocumentUpdatedEvent: DOM_DocumentUpdatedEvent, - InlineStyleInvalidatedEvent: DOM_InlineStyleInvalidatedEvent, - PseudoElementAddedEvent: DOM_PseudoElementAddedEvent, - TopLayerElementsUpdatedEvent: DOM_TopLayerElementsUpdatedEvent, - ScrollableFlagUpdatedEvent: DOM_ScrollableFlagUpdatedEvent, - AdRelatedStateUpdatedEvent: DOM_AdRelatedStateUpdatedEvent, - AffectedByStartingStylesFlagUpdatedEvent: DOM_AffectedByStartingStylesFlagUpdatedEvent, - PseudoElementRemovedEvent: DOM_PseudoElementRemovedEvent, - SetChildNodesEvent: DOM_SetChildNodesEvent, - ShadowRootPoppedEvent: DOM_ShadowRootPoppedEvent, - ShadowRootPushedEvent: DOM_ShadowRootPushedEvent, - }, - DOMDebugger: { - DOMBreakpointType: DOMDebugger_DOMBreakpointType, - CSPViolationType: DOMDebugger_CSPViolationType, - EventListener: DOMDebugger_EventListener, - GetEventListenersParams: DOMDebugger_GetEventListenersParams, - GetEventListenersResult: DOMDebugger_GetEventListenersResult, - RemoveDOMBreakpointParams: DOMDebugger_RemoveDOMBreakpointParams, - RemoveDOMBreakpointResult: DOMDebugger_RemoveDOMBreakpointResult, - RemoveEventListenerBreakpointParams: DOMDebugger_RemoveEventListenerBreakpointParams, - RemoveEventListenerBreakpointResult: DOMDebugger_RemoveEventListenerBreakpointResult, - RemoveInstrumentationBreakpointParams: DOMDebugger_RemoveInstrumentationBreakpointParams, - RemoveInstrumentationBreakpointResult: DOMDebugger_RemoveInstrumentationBreakpointResult, - RemoveXHRBreakpointParams: DOMDebugger_RemoveXHRBreakpointParams, - RemoveXHRBreakpointResult: DOMDebugger_RemoveXHRBreakpointResult, - SetBreakOnCSPViolationParams: DOMDebugger_SetBreakOnCSPViolationParams, - SetBreakOnCSPViolationResult: DOMDebugger_SetBreakOnCSPViolationResult, - SetDOMBreakpointParams: DOMDebugger_SetDOMBreakpointParams, - SetDOMBreakpointResult: DOMDebugger_SetDOMBreakpointResult, - SetEventListenerBreakpointParams: DOMDebugger_SetEventListenerBreakpointParams, - SetEventListenerBreakpointResult: DOMDebugger_SetEventListenerBreakpointResult, - SetInstrumentationBreakpointParams: DOMDebugger_SetInstrumentationBreakpointParams, - SetInstrumentationBreakpointResult: DOMDebugger_SetInstrumentationBreakpointResult, - SetXHRBreakpointParams: DOMDebugger_SetXHRBreakpointParams, - SetXHRBreakpointResult: DOMDebugger_SetXHRBreakpointResult, - }, - DOMSnapshot: { - DOMNode: DOMSnapshot_DOMNode, - InlineTextBox: DOMSnapshot_InlineTextBox, - LayoutTreeNode: DOMSnapshot_LayoutTreeNode, - ComputedStyle: DOMSnapshot_ComputedStyle, - NameValue: DOMSnapshot_NameValue, - StringIndex: DOMSnapshot_StringIndex, - ArrayOfStrings: DOMSnapshot_ArrayOfStrings, - RareStringData: DOMSnapshot_RareStringData, - RareBooleanData: DOMSnapshot_RareBooleanData, - RareIntegerData: DOMSnapshot_RareIntegerData, - Rectangle: DOMSnapshot_Rectangle, - DocumentSnapshot: DOMSnapshot_DocumentSnapshot, - NodeTreeSnapshot: DOMSnapshot_NodeTreeSnapshot, - LayoutTreeSnapshot: DOMSnapshot_LayoutTreeSnapshot, - TextBoxSnapshot: DOMSnapshot_TextBoxSnapshot, - DisableParams: DOMSnapshot_DisableParams, - DisableResult: DOMSnapshot_DisableResult, - EnableParams: DOMSnapshot_EnableParams, - EnableResult: DOMSnapshot_EnableResult, - GetSnapshotParams: DOMSnapshot_GetSnapshotParams, - GetSnapshotResult: DOMSnapshot_GetSnapshotResult, - CaptureSnapshotParams: DOMSnapshot_CaptureSnapshotParams, - CaptureSnapshotResult: DOMSnapshot_CaptureSnapshotResult, - }, - DOMStorage: { - SerializedStorageKey: DOMStorage_SerializedStorageKey, - StorageId: DOMStorage_StorageId, - Item: DOMStorage_Item, - ClearParams: DOMStorage_ClearParams, - ClearResult: DOMStorage_ClearResult, - DisableParams: DOMStorage_DisableParams, - DisableResult: DOMStorage_DisableResult, - EnableParams: DOMStorage_EnableParams, - EnableResult: DOMStorage_EnableResult, - GetDOMStorageItemsParams: DOMStorage_GetDOMStorageItemsParams, - GetDOMStorageItemsResult: DOMStorage_GetDOMStorageItemsResult, - RemoveDOMStorageItemParams: DOMStorage_RemoveDOMStorageItemParams, - RemoveDOMStorageItemResult: DOMStorage_RemoveDOMStorageItemResult, - SetDOMStorageItemParams: DOMStorage_SetDOMStorageItemParams, - SetDOMStorageItemResult: DOMStorage_SetDOMStorageItemResult, - DomStorageItemAddedEvent: DOMStorage_DomStorageItemAddedEvent, - DomStorageItemRemovedEvent: DOMStorage_DomStorageItemRemovedEvent, - DomStorageItemUpdatedEvent: DOMStorage_DomStorageItemUpdatedEvent, - DomStorageItemsClearedEvent: DOMStorage_DomStorageItemsClearedEvent, - }, - Emulation: { - SafeAreaInsets: Emulation_SafeAreaInsets, - ScreenOrientation: Emulation_ScreenOrientation, - DisplayFeature: Emulation_DisplayFeature, - DevicePosture: Emulation_DevicePosture, - MediaFeature: Emulation_MediaFeature, - VirtualTimePolicy: Emulation_VirtualTimePolicy, - UserAgentBrandVersion: Emulation_UserAgentBrandVersion, - UserAgentMetadata: Emulation_UserAgentMetadata, - SensorType: Emulation_SensorType, - SensorMetadata: Emulation_SensorMetadata, - SensorReadingSingle: Emulation_SensorReadingSingle, - SensorReadingXYZ: Emulation_SensorReadingXYZ, - SensorReadingQuaternion: Emulation_SensorReadingQuaternion, - SensorReading: Emulation_SensorReading, - PressureSource: Emulation_PressureSource, - PressureState: Emulation_PressureState, - PressureMetadata: Emulation_PressureMetadata, - WorkAreaInsets: Emulation_WorkAreaInsets, - ScreenId: Emulation_ScreenId, - ScreenInfo: Emulation_ScreenInfo, - DisabledImageType: Emulation_DisabledImageType, - CanEmulateParams: Emulation_CanEmulateParams, - CanEmulateResult: Emulation_CanEmulateResult, - ClearDeviceMetricsOverrideParams: Emulation_ClearDeviceMetricsOverrideParams, - ClearDeviceMetricsOverrideResult: Emulation_ClearDeviceMetricsOverrideResult, - ClearGeolocationOverrideParams: Emulation_ClearGeolocationOverrideParams, - ClearGeolocationOverrideResult: Emulation_ClearGeolocationOverrideResult, - ResetPageScaleFactorParams: Emulation_ResetPageScaleFactorParams, - ResetPageScaleFactorResult: Emulation_ResetPageScaleFactorResult, - SetFocusEmulationEnabledParams: Emulation_SetFocusEmulationEnabledParams, - SetFocusEmulationEnabledResult: Emulation_SetFocusEmulationEnabledResult, - SetAutoDarkModeOverrideParams: Emulation_SetAutoDarkModeOverrideParams, - SetAutoDarkModeOverrideResult: Emulation_SetAutoDarkModeOverrideResult, - SetCPUThrottlingRateParams: Emulation_SetCPUThrottlingRateParams, - SetCPUThrottlingRateResult: Emulation_SetCPUThrottlingRateResult, - SetDefaultBackgroundColorOverrideParams: Emulation_SetDefaultBackgroundColorOverrideParams, - SetDefaultBackgroundColorOverrideResult: Emulation_SetDefaultBackgroundColorOverrideResult, - SetSafeAreaInsetsOverrideParams: Emulation_SetSafeAreaInsetsOverrideParams, - SetSafeAreaInsetsOverrideResult: Emulation_SetSafeAreaInsetsOverrideResult, - SetDeviceMetricsOverrideParams: Emulation_SetDeviceMetricsOverrideParams, - SetDeviceMetricsOverrideResult: Emulation_SetDeviceMetricsOverrideResult, - SetDevicePostureOverrideParams: Emulation_SetDevicePostureOverrideParams, - SetDevicePostureOverrideResult: Emulation_SetDevicePostureOverrideResult, - ClearDevicePostureOverrideParams: Emulation_ClearDevicePostureOverrideParams, - ClearDevicePostureOverrideResult: Emulation_ClearDevicePostureOverrideResult, - SetDisplayFeaturesOverrideParams: Emulation_SetDisplayFeaturesOverrideParams, - SetDisplayFeaturesOverrideResult: Emulation_SetDisplayFeaturesOverrideResult, - ClearDisplayFeaturesOverrideParams: Emulation_ClearDisplayFeaturesOverrideParams, - ClearDisplayFeaturesOverrideResult: Emulation_ClearDisplayFeaturesOverrideResult, - SetScrollbarsHiddenParams: Emulation_SetScrollbarsHiddenParams, - SetScrollbarsHiddenResult: Emulation_SetScrollbarsHiddenResult, - SetDocumentCookieDisabledParams: Emulation_SetDocumentCookieDisabledParams, - SetDocumentCookieDisabledResult: Emulation_SetDocumentCookieDisabledResult, - SetEmitTouchEventsForMouseParams: Emulation_SetEmitTouchEventsForMouseParams, - SetEmitTouchEventsForMouseResult: Emulation_SetEmitTouchEventsForMouseResult, - SetEmulatedMediaParams: Emulation_SetEmulatedMediaParams, - SetEmulatedMediaResult: Emulation_SetEmulatedMediaResult, - SetEmulatedVisionDeficiencyParams: Emulation_SetEmulatedVisionDeficiencyParams, - SetEmulatedVisionDeficiencyResult: Emulation_SetEmulatedVisionDeficiencyResult, - SetEmulatedOSTextScaleParams: Emulation_SetEmulatedOSTextScaleParams, - SetEmulatedOSTextScaleResult: Emulation_SetEmulatedOSTextScaleResult, - SetGeolocationOverrideParams: Emulation_SetGeolocationOverrideParams, - SetGeolocationOverrideResult: Emulation_SetGeolocationOverrideResult, - GetOverriddenSensorInformationParams: Emulation_GetOverriddenSensorInformationParams, - GetOverriddenSensorInformationResult: Emulation_GetOverriddenSensorInformationResult, - SetSensorOverrideEnabledParams: Emulation_SetSensorOverrideEnabledParams, - SetSensorOverrideEnabledResult: Emulation_SetSensorOverrideEnabledResult, - SetSensorOverrideReadingsParams: Emulation_SetSensorOverrideReadingsParams, - SetSensorOverrideReadingsResult: Emulation_SetSensorOverrideReadingsResult, - SetPressureSourceOverrideEnabledParams: Emulation_SetPressureSourceOverrideEnabledParams, - SetPressureSourceOverrideEnabledResult: Emulation_SetPressureSourceOverrideEnabledResult, - SetPressureStateOverrideParams: Emulation_SetPressureStateOverrideParams, - SetPressureStateOverrideResult: Emulation_SetPressureStateOverrideResult, - SetPressureDataOverrideParams: Emulation_SetPressureDataOverrideParams, - SetPressureDataOverrideResult: Emulation_SetPressureDataOverrideResult, - SetIdleOverrideParams: Emulation_SetIdleOverrideParams, - SetIdleOverrideResult: Emulation_SetIdleOverrideResult, - ClearIdleOverrideParams: Emulation_ClearIdleOverrideParams, - ClearIdleOverrideResult: Emulation_ClearIdleOverrideResult, - SetNavigatorOverridesParams: Emulation_SetNavigatorOverridesParams, - SetNavigatorOverridesResult: Emulation_SetNavigatorOverridesResult, - SetPageScaleFactorParams: Emulation_SetPageScaleFactorParams, - SetPageScaleFactorResult: Emulation_SetPageScaleFactorResult, - SetScriptExecutionDisabledParams: Emulation_SetScriptExecutionDisabledParams, - SetScriptExecutionDisabledResult: Emulation_SetScriptExecutionDisabledResult, - SetTouchEmulationEnabledParams: Emulation_SetTouchEmulationEnabledParams, - SetTouchEmulationEnabledResult: Emulation_SetTouchEmulationEnabledResult, - SetVirtualTimePolicyParams: Emulation_SetVirtualTimePolicyParams, - SetVirtualTimePolicyResult: Emulation_SetVirtualTimePolicyResult, - SetLocaleOverrideParams: Emulation_SetLocaleOverrideParams, - SetLocaleOverrideResult: Emulation_SetLocaleOverrideResult, - SetTimezoneOverrideParams: Emulation_SetTimezoneOverrideParams, - SetTimezoneOverrideResult: Emulation_SetTimezoneOverrideResult, - SetVisibleSizeParams: Emulation_SetVisibleSizeParams, - SetVisibleSizeResult: Emulation_SetVisibleSizeResult, - SetDisabledImageTypesParams: Emulation_SetDisabledImageTypesParams, - SetDisabledImageTypesResult: Emulation_SetDisabledImageTypesResult, - SetDataSaverOverrideParams: Emulation_SetDataSaverOverrideParams, - SetDataSaverOverrideResult: Emulation_SetDataSaverOverrideResult, - SetHardwareConcurrencyOverrideParams: Emulation_SetHardwareConcurrencyOverrideParams, - SetHardwareConcurrencyOverrideResult: Emulation_SetHardwareConcurrencyOverrideResult, - SetUserAgentOverrideParams: Emulation_SetUserAgentOverrideParams, - SetUserAgentOverrideResult: Emulation_SetUserAgentOverrideResult, - SetAutomationOverrideParams: Emulation_SetAutomationOverrideParams, - SetAutomationOverrideResult: Emulation_SetAutomationOverrideResult, - SetSmallViewportHeightDifferenceOverrideParams: Emulation_SetSmallViewportHeightDifferenceOverrideParams, - SetSmallViewportHeightDifferenceOverrideResult: Emulation_SetSmallViewportHeightDifferenceOverrideResult, - GetScreenInfosParams: Emulation_GetScreenInfosParams, - GetScreenInfosResult: Emulation_GetScreenInfosResult, - AddScreenParams: Emulation_AddScreenParams, - AddScreenResult: Emulation_AddScreenResult, - UpdateScreenParams: Emulation_UpdateScreenParams, - UpdateScreenResult: Emulation_UpdateScreenResult, - RemoveScreenParams: Emulation_RemoveScreenParams, - RemoveScreenResult: Emulation_RemoveScreenResult, - SetPrimaryScreenParams: Emulation_SetPrimaryScreenParams, - SetPrimaryScreenResult: Emulation_SetPrimaryScreenResult, - VirtualTimeBudgetExpiredEvent: Emulation_VirtualTimeBudgetExpiredEvent, - ScreenOrientationLockChangedEvent: Emulation_ScreenOrientationLockChangedEvent, - }, - EventBreakpoints: { - SetInstrumentationBreakpointParams: EventBreakpoints_SetInstrumentationBreakpointParams, - SetInstrumentationBreakpointResult: EventBreakpoints_SetInstrumentationBreakpointResult, - RemoveInstrumentationBreakpointParams: EventBreakpoints_RemoveInstrumentationBreakpointParams, - RemoveInstrumentationBreakpointResult: EventBreakpoints_RemoveInstrumentationBreakpointResult, - DisableParams: EventBreakpoints_DisableParams, - DisableResult: EventBreakpoints_DisableResult, - }, - Extensions: { - StorageArea: Extensions_StorageArea, - ExtensionInfo: Extensions_ExtensionInfo, - TriggerActionParams: Extensions_TriggerActionParams, - TriggerActionResult: Extensions_TriggerActionResult, - LoadUnpackedParams: Extensions_LoadUnpackedParams, - LoadUnpackedResult: Extensions_LoadUnpackedResult, - GetExtensionsParams: Extensions_GetExtensionsParams, - GetExtensionsResult: Extensions_GetExtensionsResult, - UninstallParams: Extensions_UninstallParams, - UninstallResult: Extensions_UninstallResult, - GetStorageItemsParams: Extensions_GetStorageItemsParams, - GetStorageItemsResult: Extensions_GetStorageItemsResult, - RemoveStorageItemsParams: Extensions_RemoveStorageItemsParams, - RemoveStorageItemsResult: Extensions_RemoveStorageItemsResult, - ClearStorageItemsParams: Extensions_ClearStorageItemsParams, - ClearStorageItemsResult: Extensions_ClearStorageItemsResult, - SetStorageItemsParams: Extensions_SetStorageItemsParams, - SetStorageItemsResult: Extensions_SetStorageItemsResult, - }, - FedCm: { - LoginState: FedCm_LoginState, - DialogType: FedCm_DialogType, - DialogButton: FedCm_DialogButton, - AccountUrlType: FedCm_AccountUrlType, - Account: FedCm_Account, - EnableParams: FedCm_EnableParams, - EnableResult: FedCm_EnableResult, - DisableParams: FedCm_DisableParams, - DisableResult: FedCm_DisableResult, - SelectAccountParams: FedCm_SelectAccountParams, - SelectAccountResult: FedCm_SelectAccountResult, - ClickDialogButtonParams: FedCm_ClickDialogButtonParams, - ClickDialogButtonResult: FedCm_ClickDialogButtonResult, - OpenUrlParams: FedCm_OpenUrlParams, - OpenUrlResult: FedCm_OpenUrlResult, - DismissDialogParams: FedCm_DismissDialogParams, - DismissDialogResult: FedCm_DismissDialogResult, - ResetCooldownParams: FedCm_ResetCooldownParams, - ResetCooldownResult: FedCm_ResetCooldownResult, - DialogShownEvent: FedCm_DialogShownEvent, - DialogClosedEvent: FedCm_DialogClosedEvent, - }, - Fetch: { - RequestId: Fetch_RequestId, - RequestStage: Fetch_RequestStage, - RequestPattern: Fetch_RequestPattern, - HeaderEntry: Fetch_HeaderEntry, - AuthChallenge: Fetch_AuthChallenge, - AuthChallengeResponse: Fetch_AuthChallengeResponse, - DisableParams: Fetch_DisableParams, - DisableResult: Fetch_DisableResult, - EnableParams: Fetch_EnableParams, - EnableResult: Fetch_EnableResult, - FailRequestParams: Fetch_FailRequestParams, - FailRequestResult: Fetch_FailRequestResult, - FulfillRequestParams: Fetch_FulfillRequestParams, - FulfillRequestResult: Fetch_FulfillRequestResult, - ContinueRequestParams: Fetch_ContinueRequestParams, - ContinueRequestResult: Fetch_ContinueRequestResult, - ContinueWithAuthParams: Fetch_ContinueWithAuthParams, - ContinueWithAuthResult: Fetch_ContinueWithAuthResult, - ContinueResponseParams: Fetch_ContinueResponseParams, - ContinueResponseResult: Fetch_ContinueResponseResult, - GetResponseBodyParams: Fetch_GetResponseBodyParams, - GetResponseBodyResult: Fetch_GetResponseBodyResult, - TakeResponseBodyAsStreamParams: Fetch_TakeResponseBodyAsStreamParams, - TakeResponseBodyAsStreamResult: Fetch_TakeResponseBodyAsStreamResult, - RequestPausedEvent: Fetch_RequestPausedEvent, - AuthRequiredEvent: Fetch_AuthRequiredEvent, - }, - FileSystem: { - File: FileSystem_File, - Directory: FileSystem_Directory, - BucketFileSystemLocator: FileSystem_BucketFileSystemLocator, - GetDirectoryParams: FileSystem_GetDirectoryParams, - GetDirectoryResult: FileSystem_GetDirectoryResult, - }, - HeadlessExperimental: { - ScreenshotParams: HeadlessExperimental_ScreenshotParams, - BeginFrameParams: HeadlessExperimental_BeginFrameParams, - BeginFrameResult: HeadlessExperimental_BeginFrameResult, - DisableParams: HeadlessExperimental_DisableParams, - DisableResult: HeadlessExperimental_DisableResult, - EnableParams: HeadlessExperimental_EnableParams, - EnableResult: HeadlessExperimental_EnableResult, - }, - HeapProfiler: { - HeapSnapshotObjectId: HeapProfiler_HeapSnapshotObjectId, - SamplingHeapProfileNode: HeapProfiler_SamplingHeapProfileNode, - SamplingHeapProfileSample: HeapProfiler_SamplingHeapProfileSample, - SamplingHeapProfile: HeapProfiler_SamplingHeapProfile, - AddInspectedHeapObjectParams: HeapProfiler_AddInspectedHeapObjectParams, - AddInspectedHeapObjectResult: HeapProfiler_AddInspectedHeapObjectResult, - CollectGarbageParams: HeapProfiler_CollectGarbageParams, - CollectGarbageResult: HeapProfiler_CollectGarbageResult, - DisableParams: HeapProfiler_DisableParams, - DisableResult: HeapProfiler_DisableResult, - EnableParams: HeapProfiler_EnableParams, - EnableResult: HeapProfiler_EnableResult, - GetHeapObjectIdParams: HeapProfiler_GetHeapObjectIdParams, - GetHeapObjectIdResult: HeapProfiler_GetHeapObjectIdResult, - GetObjectByHeapObjectIdParams: HeapProfiler_GetObjectByHeapObjectIdParams, - GetObjectByHeapObjectIdResult: HeapProfiler_GetObjectByHeapObjectIdResult, - GetSamplingProfileParams: HeapProfiler_GetSamplingProfileParams, - GetSamplingProfileResult: HeapProfiler_GetSamplingProfileResult, - StartSamplingParams: HeapProfiler_StartSamplingParams, - StartSamplingResult: HeapProfiler_StartSamplingResult, - StartTrackingHeapObjectsParams: HeapProfiler_StartTrackingHeapObjectsParams, - StartTrackingHeapObjectsResult: HeapProfiler_StartTrackingHeapObjectsResult, - StopSamplingParams: HeapProfiler_StopSamplingParams, - StopSamplingResult: HeapProfiler_StopSamplingResult, - StopTrackingHeapObjectsParams: HeapProfiler_StopTrackingHeapObjectsParams, - StopTrackingHeapObjectsResult: HeapProfiler_StopTrackingHeapObjectsResult, - TakeHeapSnapshotParams: HeapProfiler_TakeHeapSnapshotParams, - TakeHeapSnapshotResult: HeapProfiler_TakeHeapSnapshotResult, - AddHeapSnapshotChunkEvent: HeapProfiler_AddHeapSnapshotChunkEvent, - HeapStatsUpdateEvent: HeapProfiler_HeapStatsUpdateEvent, - LastSeenObjectIdEvent: HeapProfiler_LastSeenObjectIdEvent, - ReportHeapSnapshotProgressEvent: HeapProfiler_ReportHeapSnapshotProgressEvent, - ResetProfilesEvent: HeapProfiler_ResetProfilesEvent, - }, - IndexedDB: { - DatabaseWithObjectStores: IndexedDB_DatabaseWithObjectStores, - ObjectStore: IndexedDB_ObjectStore, - ObjectStoreIndex: IndexedDB_ObjectStoreIndex, - Key: IndexedDB_Key, - KeyRange: IndexedDB_KeyRange, - DataEntry: IndexedDB_DataEntry, - KeyPath: IndexedDB_KeyPath, - ClearObjectStoreParams: IndexedDB_ClearObjectStoreParams, - ClearObjectStoreResult: IndexedDB_ClearObjectStoreResult, - DeleteDatabaseParams: IndexedDB_DeleteDatabaseParams, - DeleteDatabaseResult: IndexedDB_DeleteDatabaseResult, - DeleteObjectStoreEntriesParams: IndexedDB_DeleteObjectStoreEntriesParams, - DeleteObjectStoreEntriesResult: IndexedDB_DeleteObjectStoreEntriesResult, - DisableParams: IndexedDB_DisableParams, - DisableResult: IndexedDB_DisableResult, - EnableParams: IndexedDB_EnableParams, - EnableResult: IndexedDB_EnableResult, - RequestDataParams: IndexedDB_RequestDataParams, - RequestDataResult: IndexedDB_RequestDataResult, - GetMetadataParams: IndexedDB_GetMetadataParams, - GetMetadataResult: IndexedDB_GetMetadataResult, - RequestDatabaseParams: IndexedDB_RequestDatabaseParams, - RequestDatabaseResult: IndexedDB_RequestDatabaseResult, - RequestDatabaseNamesParams: IndexedDB_RequestDatabaseNamesParams, - RequestDatabaseNamesResult: IndexedDB_RequestDatabaseNamesResult, - }, - Input: { - TouchPoint: Input_TouchPoint, - GestureSourceType: Input_GestureSourceType, - MouseButton: Input_MouseButton, - TimeSinceEpoch: Input_TimeSinceEpoch, - DragDataItem: Input_DragDataItem, - DragData: Input_DragData, - DispatchDragEventParams: Input_DispatchDragEventParams, - DispatchDragEventResult: Input_DispatchDragEventResult, - DispatchKeyEventParams: Input_DispatchKeyEventParams, - DispatchKeyEventResult: Input_DispatchKeyEventResult, - InsertTextParams: Input_InsertTextParams, - InsertTextResult: Input_InsertTextResult, - ImeSetCompositionParams: Input_ImeSetCompositionParams, - ImeSetCompositionResult: Input_ImeSetCompositionResult, - DispatchMouseEventParams: Input_DispatchMouseEventParams, - DispatchMouseEventResult: Input_DispatchMouseEventResult, - DispatchTouchEventParams: Input_DispatchTouchEventParams, - DispatchTouchEventResult: Input_DispatchTouchEventResult, - CancelDraggingParams: Input_CancelDraggingParams, - CancelDraggingResult: Input_CancelDraggingResult, - EmulateTouchFromMouseEventParams: Input_EmulateTouchFromMouseEventParams, - EmulateTouchFromMouseEventResult: Input_EmulateTouchFromMouseEventResult, - SetIgnoreInputEventsParams: Input_SetIgnoreInputEventsParams, - SetIgnoreInputEventsResult: Input_SetIgnoreInputEventsResult, - SetInterceptDragsParams: Input_SetInterceptDragsParams, - SetInterceptDragsResult: Input_SetInterceptDragsResult, - SynthesizePinchGestureParams: Input_SynthesizePinchGestureParams, - SynthesizePinchGestureResult: Input_SynthesizePinchGestureResult, - SynthesizeScrollGestureParams: Input_SynthesizeScrollGestureParams, - SynthesizeScrollGestureResult: Input_SynthesizeScrollGestureResult, - SynthesizeTapGestureParams: Input_SynthesizeTapGestureParams, - SynthesizeTapGestureResult: Input_SynthesizeTapGestureResult, - DragInterceptedEvent: Input_DragInterceptedEvent, - }, - Inspector: { - DisableParams: Inspector_DisableParams, - DisableResult: Inspector_DisableResult, - EnableParams: Inspector_EnableParams, - EnableResult: Inspector_EnableResult, - DetachedEvent: Inspector_DetachedEvent, - TargetCrashedEvent: Inspector_TargetCrashedEvent, - TargetReloadedAfterCrashEvent: Inspector_TargetReloadedAfterCrashEvent, - WorkerScriptLoadedEvent: Inspector_WorkerScriptLoadedEvent, - }, - IO: { - StreamHandle: IO_StreamHandle, - CloseParams: IO_CloseParams, - CloseResult: IO_CloseResult, - ReadParams: IO_ReadParams, - ReadResult: IO_ReadResult, - ResolveBlobParams: IO_ResolveBlobParams, - ResolveBlobResult: IO_ResolveBlobResult, - }, - LayerTree: { - LayerId: LayerTree_LayerId, - SnapshotId: LayerTree_SnapshotId, - ScrollRect: LayerTree_ScrollRect, - StickyPositionConstraint: LayerTree_StickyPositionConstraint, - PictureTile: LayerTree_PictureTile, - Layer: LayerTree_Layer, - PaintProfile: LayerTree_PaintProfile, - CompositingReasonsParams: LayerTree_CompositingReasonsParams, - CompositingReasonsResult: LayerTree_CompositingReasonsResult, - DisableParams: LayerTree_DisableParams, - DisableResult: LayerTree_DisableResult, - EnableParams: LayerTree_EnableParams, - EnableResult: LayerTree_EnableResult, - LoadSnapshotParams: LayerTree_LoadSnapshotParams, - LoadSnapshotResult: LayerTree_LoadSnapshotResult, - MakeSnapshotParams: LayerTree_MakeSnapshotParams, - MakeSnapshotResult: LayerTree_MakeSnapshotResult, - ProfileSnapshotParams: LayerTree_ProfileSnapshotParams, - ProfileSnapshotResult: LayerTree_ProfileSnapshotResult, - ReleaseSnapshotParams: LayerTree_ReleaseSnapshotParams, - ReleaseSnapshotResult: LayerTree_ReleaseSnapshotResult, - ReplaySnapshotParams: LayerTree_ReplaySnapshotParams, - ReplaySnapshotResult: LayerTree_ReplaySnapshotResult, - SnapshotCommandLogParams: LayerTree_SnapshotCommandLogParams, - SnapshotCommandLogResult: LayerTree_SnapshotCommandLogResult, - LayerPaintedEvent: LayerTree_LayerPaintedEvent, - LayerTreeDidChangeEvent: LayerTree_LayerTreeDidChangeEvent, - }, - Log: { - LogEntry: Log_LogEntry, - ViolationSetting: Log_ViolationSetting, - ClearParams: Log_ClearParams, - ClearResult: Log_ClearResult, - DisableParams: Log_DisableParams, - DisableResult: Log_DisableResult, - EnableParams: Log_EnableParams, - EnableResult: Log_EnableResult, - StartViolationsReportParams: Log_StartViolationsReportParams, - StartViolationsReportResult: Log_StartViolationsReportResult, - StopViolationsReportParams: Log_StopViolationsReportParams, - StopViolationsReportResult: Log_StopViolationsReportResult, - EntryAddedEvent: Log_EntryAddedEvent, - }, - Media: { - PlayerId: Media_PlayerId, - Timestamp: Media_Timestamp, - PlayerMessage: Media_PlayerMessage, - PlayerProperty: Media_PlayerProperty, - PlayerEvent: Media_PlayerEvent, - PlayerErrorSourceLocation: Media_PlayerErrorSourceLocation, - PlayerError: Media_PlayerError, - Player: Media_Player, - EnableParams: Media_EnableParams, - EnableResult: Media_EnableResult, - DisableParams: Media_DisableParams, - DisableResult: Media_DisableResult, - PlayerPropertiesChangedEvent: Media_PlayerPropertiesChangedEvent, - PlayerEventsAddedEvent: Media_PlayerEventsAddedEvent, - PlayerMessagesLoggedEvent: Media_PlayerMessagesLoggedEvent, - PlayerErrorsRaisedEvent: Media_PlayerErrorsRaisedEvent, - PlayerCreatedEvent: Media_PlayerCreatedEvent, - }, - Memory: { - PressureLevel: Memory_PressureLevel, - SamplingProfileNode: Memory_SamplingProfileNode, - SamplingProfile: Memory_SamplingProfile, - Module: Memory_Module, - DOMCounter: Memory_DOMCounter, - GetDOMCountersParams: Memory_GetDOMCountersParams, - GetDOMCountersResult: Memory_GetDOMCountersResult, - GetDOMCountersForLeakDetectionParams: Memory_GetDOMCountersForLeakDetectionParams, - GetDOMCountersForLeakDetectionResult: Memory_GetDOMCountersForLeakDetectionResult, - PrepareForLeakDetectionParams: Memory_PrepareForLeakDetectionParams, - PrepareForLeakDetectionResult: Memory_PrepareForLeakDetectionResult, - ForciblyPurgeJavaScriptMemoryParams: Memory_ForciblyPurgeJavaScriptMemoryParams, - ForciblyPurgeJavaScriptMemoryResult: Memory_ForciblyPurgeJavaScriptMemoryResult, - SetPressureNotificationsSuppressedParams: Memory_SetPressureNotificationsSuppressedParams, - SetPressureNotificationsSuppressedResult: Memory_SetPressureNotificationsSuppressedResult, - SimulatePressureNotificationParams: Memory_SimulatePressureNotificationParams, - SimulatePressureNotificationResult: Memory_SimulatePressureNotificationResult, - StartSamplingParams: Memory_StartSamplingParams, - StartSamplingResult: Memory_StartSamplingResult, - StopSamplingParams: Memory_StopSamplingParams, - StopSamplingResult: Memory_StopSamplingResult, - GetAllTimeSamplingProfileParams: Memory_GetAllTimeSamplingProfileParams, - GetAllTimeSamplingProfileResult: Memory_GetAllTimeSamplingProfileResult, - GetBrowserSamplingProfileParams: Memory_GetBrowserSamplingProfileParams, - GetBrowserSamplingProfileResult: Memory_GetBrowserSamplingProfileResult, - GetSamplingProfileParams: Memory_GetSamplingProfileParams, - GetSamplingProfileResult: Memory_GetSamplingProfileResult, - }, - Network: { - ResourceType: Network_ResourceType, - LoaderId: Network_LoaderId, - RequestId: Network_RequestId, - InterceptionId: Network_InterceptionId, - ErrorReason: Network_ErrorReason, - TimeSinceEpoch: Network_TimeSinceEpoch, - MonotonicTime: Network_MonotonicTime, - Headers: Network_Headers, - ConnectionType: Network_ConnectionType, - CookieSameSite: Network_CookieSameSite, - CookiePriority: Network_CookiePriority, - CookieSourceScheme: Network_CookieSourceScheme, - ResourceTiming: Network_ResourceTiming, - ResourcePriority: Network_ResourcePriority, - RenderBlockingBehavior: Network_RenderBlockingBehavior, - PostDataEntry: Network_PostDataEntry, - Request: Network_Request, - SignedCertificateTimestamp: Network_SignedCertificateTimestamp, - SecurityDetails: Network_SecurityDetails, - CertificateTransparencyCompliance: Network_CertificateTransparencyCompliance, - BlockedReason: Network_BlockedReason, - CorsError: Network_CorsError, - CorsErrorStatus: Network_CorsErrorStatus, - ServiceWorkerResponseSource: Network_ServiceWorkerResponseSource, - TrustTokenParams: Network_TrustTokenParams, - TrustTokenOperationType: Network_TrustTokenOperationType, - AlternateProtocolUsage: Network_AlternateProtocolUsage, - ServiceWorkerRouterSource: Network_ServiceWorkerRouterSource, - ServiceWorkerRouterInfo: Network_ServiceWorkerRouterInfo, - Response: Network_Response, - WebSocketRequest: Network_WebSocketRequest, - WebSocketResponse: Network_WebSocketResponse, - WebSocketFrame: Network_WebSocketFrame, - CachedResource: Network_CachedResource, - Initiator: Network_Initiator, - CookiePartitionKey: Network_CookiePartitionKey, - Cookie: Network_Cookie, - SetCookieBlockedReason: Network_SetCookieBlockedReason, - CookieBlockedReason: Network_CookieBlockedReason, - CookieExemptionReason: Network_CookieExemptionReason, - BlockedSetCookieWithReason: Network_BlockedSetCookieWithReason, - ExemptedSetCookieWithReason: Network_ExemptedSetCookieWithReason, - AssociatedCookie: Network_AssociatedCookie, - CookieParam: Network_CookieParam, - AuthChallenge: Network_AuthChallenge, - AuthChallengeResponse: Network_AuthChallengeResponse, - InterceptionStage: Network_InterceptionStage, - RequestPattern: Network_RequestPattern, - SignedExchangeSignature: Network_SignedExchangeSignature, - SignedExchangeHeader: Network_SignedExchangeHeader, - SignedExchangeErrorField: Network_SignedExchangeErrorField, - SignedExchangeError: Network_SignedExchangeError, - SignedExchangeInfo: Network_SignedExchangeInfo, - ContentEncoding: Network_ContentEncoding, - NetworkConditions: Network_NetworkConditions, - BlockPattern: Network_BlockPattern, - DirectSocketDnsQueryType: Network_DirectSocketDnsQueryType, - DirectTCPSocketOptions: Network_DirectTCPSocketOptions, - DirectUDPSocketOptions: Network_DirectUDPSocketOptions, - DirectUDPMessage: Network_DirectUDPMessage, - LocalNetworkAccessRequestPolicy: Network_LocalNetworkAccessRequestPolicy, - IPAddressSpace: Network_IPAddressSpace, - ConnectTiming: Network_ConnectTiming, - ClientSecurityState: Network_ClientSecurityState, - AdScriptIdentifier: Network_AdScriptIdentifier, - AdAncestry: Network_AdAncestry, - AdProvenance: Network_AdProvenance, - CrossOriginOpenerPolicyValue: Network_CrossOriginOpenerPolicyValue, - CrossOriginOpenerPolicyStatus: Network_CrossOriginOpenerPolicyStatus, - CrossOriginEmbedderPolicyValue: Network_CrossOriginEmbedderPolicyValue, - CrossOriginEmbedderPolicyStatus: Network_CrossOriginEmbedderPolicyStatus, - ContentSecurityPolicySource: Network_ContentSecurityPolicySource, - ContentSecurityPolicyStatus: Network_ContentSecurityPolicyStatus, - SecurityIsolationStatus: Network_SecurityIsolationStatus, - ReportStatus: Network_ReportStatus, - ReportId: Network_ReportId, - ReportingApiReport: Network_ReportingApiReport, - ReportingApiEndpoint: Network_ReportingApiEndpoint, - DeviceBoundSessionKey: Network_DeviceBoundSessionKey, - DeviceBoundSessionWithUsage: Network_DeviceBoundSessionWithUsage, - DeviceBoundSessionCookieCraving: Network_DeviceBoundSessionCookieCraving, - DeviceBoundSessionUrlRule: Network_DeviceBoundSessionUrlRule, - DeviceBoundSessionInclusionRules: Network_DeviceBoundSessionInclusionRules, - DeviceBoundSession: Network_DeviceBoundSession, - DeviceBoundSessionEventId: Network_DeviceBoundSessionEventId, - DeviceBoundSessionFetchResult: Network_DeviceBoundSessionFetchResult, - DeviceBoundSessionFailedRequest: Network_DeviceBoundSessionFailedRequest, - CreationEventDetails: Network_CreationEventDetails, - RefreshEventDetails: Network_RefreshEventDetails, - TerminationEventDetails: Network_TerminationEventDetails, - ChallengeEventDetails: Network_ChallengeEventDetails, - LoadNetworkResourcePageResult: Network_LoadNetworkResourcePageResult, - LoadNetworkResourceOptions: Network_LoadNetworkResourceOptions, - SetAcceptedEncodingsParams: Network_SetAcceptedEncodingsParams, - SetAcceptedEncodingsResult: Network_SetAcceptedEncodingsResult, - ClearAcceptedEncodingsOverrideParams: Network_ClearAcceptedEncodingsOverrideParams, - ClearAcceptedEncodingsOverrideResult: Network_ClearAcceptedEncodingsOverrideResult, - CanClearBrowserCacheParams: Network_CanClearBrowserCacheParams, - CanClearBrowserCacheResult: Network_CanClearBrowserCacheResult, - CanClearBrowserCookiesParams: Network_CanClearBrowserCookiesParams, - CanClearBrowserCookiesResult: Network_CanClearBrowserCookiesResult, - CanEmulateNetworkConditionsParams: Network_CanEmulateNetworkConditionsParams, - CanEmulateNetworkConditionsResult: Network_CanEmulateNetworkConditionsResult, - ClearBrowserCacheParams: Network_ClearBrowserCacheParams, - ClearBrowserCacheResult: Network_ClearBrowserCacheResult, - ClearBrowserCookiesParams: Network_ClearBrowserCookiesParams, - ClearBrowserCookiesResult: Network_ClearBrowserCookiesResult, - ContinueInterceptedRequestParams: Network_ContinueInterceptedRequestParams, - ContinueInterceptedRequestResult: Network_ContinueInterceptedRequestResult, - DeleteCookiesParams: Network_DeleteCookiesParams, - DeleteCookiesResult: Network_DeleteCookiesResult, - DisableParams: Network_DisableParams, - DisableResult: Network_DisableResult, - EmulateNetworkConditionsParams: Network_EmulateNetworkConditionsParams, - EmulateNetworkConditionsResult: Network_EmulateNetworkConditionsResult, - EmulateNetworkConditionsByRuleParams: Network_EmulateNetworkConditionsByRuleParams, - EmulateNetworkConditionsByRuleResult: Network_EmulateNetworkConditionsByRuleResult, - OverrideNetworkStateParams: Network_OverrideNetworkStateParams, - OverrideNetworkStateResult: Network_OverrideNetworkStateResult, - EnableParams: Network_EnableParams, - EnableResult: Network_EnableResult, - ConfigureDurableMessagesParams: Network_ConfigureDurableMessagesParams, - ConfigureDurableMessagesResult: Network_ConfigureDurableMessagesResult, - GetAllCookiesParams: Network_GetAllCookiesParams, - GetAllCookiesResult: Network_GetAllCookiesResult, - GetCertificateParams: Network_GetCertificateParams, - GetCertificateResult: Network_GetCertificateResult, - GetCookiesParams: Network_GetCookiesParams, - GetCookiesResult: Network_GetCookiesResult, - GetResponseBodyParams: Network_GetResponseBodyParams, - GetResponseBodyResult: Network_GetResponseBodyResult, - GetRequestPostDataParams: Network_GetRequestPostDataParams, - GetRequestPostDataResult: Network_GetRequestPostDataResult, - GetResponseBodyForInterceptionParams: Network_GetResponseBodyForInterceptionParams, - GetResponseBodyForInterceptionResult: Network_GetResponseBodyForInterceptionResult, - TakeResponseBodyForInterceptionAsStreamParams: Network_TakeResponseBodyForInterceptionAsStreamParams, - TakeResponseBodyForInterceptionAsStreamResult: Network_TakeResponseBodyForInterceptionAsStreamResult, - ReplayXHRParams: Network_ReplayXHRParams, - ReplayXHRResult: Network_ReplayXHRResult, - SearchInResponseBodyParams: Network_SearchInResponseBodyParams, - SearchInResponseBodyResult: Network_SearchInResponseBodyResult, - SetBlockedURLsParams: Network_SetBlockedURLsParams, - SetBlockedURLsResult: Network_SetBlockedURLsResult, - SetBypassServiceWorkerParams: Network_SetBypassServiceWorkerParams, - SetBypassServiceWorkerResult: Network_SetBypassServiceWorkerResult, - SetCacheDisabledParams: Network_SetCacheDisabledParams, - SetCacheDisabledResult: Network_SetCacheDisabledResult, - SetCookieParams: Network_SetCookieParams, - SetCookieResult: Network_SetCookieResult, - SetCookiesParams: Network_SetCookiesParams, - SetCookiesResult: Network_SetCookiesResult, - SetExtraHTTPHeadersParams: Network_SetExtraHTTPHeadersParams, - SetExtraHTTPHeadersResult: Network_SetExtraHTTPHeadersResult, - SetAttachDebugStackParams: Network_SetAttachDebugStackParams, - SetAttachDebugStackResult: Network_SetAttachDebugStackResult, - SetRequestInterceptionParams: Network_SetRequestInterceptionParams, - SetRequestInterceptionResult: Network_SetRequestInterceptionResult, - SetUserAgentOverrideParams: Network_SetUserAgentOverrideParams, - SetUserAgentOverrideResult: Network_SetUserAgentOverrideResult, - StreamResourceContentParams: Network_StreamResourceContentParams, - StreamResourceContentResult: Network_StreamResourceContentResult, - GetSecurityIsolationStatusParams: Network_GetSecurityIsolationStatusParams, - GetSecurityIsolationStatusResult: Network_GetSecurityIsolationStatusResult, - EnableReportingApiParams: Network_EnableReportingApiParams, - EnableReportingApiResult: Network_EnableReportingApiResult, - EnableDeviceBoundSessionsParams: Network_EnableDeviceBoundSessionsParams, - EnableDeviceBoundSessionsResult: Network_EnableDeviceBoundSessionsResult, - DeleteDeviceBoundSessionParams: Network_DeleteDeviceBoundSessionParams, - DeleteDeviceBoundSessionResult: Network_DeleteDeviceBoundSessionResult, - FetchSchemefulSiteParams: Network_FetchSchemefulSiteParams, - FetchSchemefulSiteResult: Network_FetchSchemefulSiteResult, - LoadNetworkResourceParams: Network_LoadNetworkResourceParams, - LoadNetworkResourceResult: Network_LoadNetworkResourceResult, - SetCookieControlsParams: Network_SetCookieControlsParams, - SetCookieControlsResult: Network_SetCookieControlsResult, - DataReceivedEvent: Network_DataReceivedEvent, - EventSourceMessageReceivedEvent: Network_EventSourceMessageReceivedEvent, - LoadingFailedEvent: Network_LoadingFailedEvent, - LoadingFinishedEvent: Network_LoadingFinishedEvent, - RequestInterceptedEvent: Network_RequestInterceptedEvent, - RequestServedFromCacheEvent: Network_RequestServedFromCacheEvent, - RequestWillBeSentEvent: Network_RequestWillBeSentEvent, - ResourceChangedPriorityEvent: Network_ResourceChangedPriorityEvent, - SignedExchangeReceivedEvent: Network_SignedExchangeReceivedEvent, - ResponseReceivedEvent: Network_ResponseReceivedEvent, - WebSocketClosedEvent: Network_WebSocketClosedEvent, - WebSocketCreatedEvent: Network_WebSocketCreatedEvent, - WebSocketFrameErrorEvent: Network_WebSocketFrameErrorEvent, - WebSocketFrameReceivedEvent: Network_WebSocketFrameReceivedEvent, - WebSocketFrameSentEvent: Network_WebSocketFrameSentEvent, - WebSocketHandshakeResponseReceivedEvent: Network_WebSocketHandshakeResponseReceivedEvent, - WebSocketWillSendHandshakeRequestEvent: Network_WebSocketWillSendHandshakeRequestEvent, - WebTransportCreatedEvent: Network_WebTransportCreatedEvent, - WebTransportConnectionEstablishedEvent: Network_WebTransportConnectionEstablishedEvent, - WebTransportClosedEvent: Network_WebTransportClosedEvent, - DirectTCPSocketCreatedEvent: Network_DirectTCPSocketCreatedEvent, - DirectTCPSocketOpenedEvent: Network_DirectTCPSocketOpenedEvent, - DirectTCPSocketAbortedEvent: Network_DirectTCPSocketAbortedEvent, - DirectTCPSocketClosedEvent: Network_DirectTCPSocketClosedEvent, - DirectTCPSocketChunkSentEvent: Network_DirectTCPSocketChunkSentEvent, - DirectTCPSocketChunkReceivedEvent: Network_DirectTCPSocketChunkReceivedEvent, - DirectUDPSocketJoinedMulticastGroupEvent: Network_DirectUDPSocketJoinedMulticastGroupEvent, - DirectUDPSocketLeftMulticastGroupEvent: Network_DirectUDPSocketLeftMulticastGroupEvent, - DirectUDPSocketCreatedEvent: Network_DirectUDPSocketCreatedEvent, - DirectUDPSocketOpenedEvent: Network_DirectUDPSocketOpenedEvent, - DirectUDPSocketAbortedEvent: Network_DirectUDPSocketAbortedEvent, - DirectUDPSocketClosedEvent: Network_DirectUDPSocketClosedEvent, - DirectUDPSocketChunkSentEvent: Network_DirectUDPSocketChunkSentEvent, - DirectUDPSocketChunkReceivedEvent: Network_DirectUDPSocketChunkReceivedEvent, - RequestWillBeSentExtraInfoEvent: Network_RequestWillBeSentExtraInfoEvent, - ResponseReceivedExtraInfoEvent: Network_ResponseReceivedExtraInfoEvent, - ResponseReceivedEarlyHintsEvent: Network_ResponseReceivedEarlyHintsEvent, - TrustTokenOperationDoneEvent: Network_TrustTokenOperationDoneEvent, - PolicyUpdatedEvent: Network_PolicyUpdatedEvent, - ReportingApiReportAddedEvent: Network_ReportingApiReportAddedEvent, - ReportingApiReportUpdatedEvent: Network_ReportingApiReportUpdatedEvent, - ReportingApiEndpointsChangedForOriginEvent: Network_ReportingApiEndpointsChangedForOriginEvent, - DeviceBoundSessionsAddedEvent: Network_DeviceBoundSessionsAddedEvent, - DeviceBoundSessionEventOccurredEvent: Network_DeviceBoundSessionEventOccurredEvent, - }, - Overlay: { - SourceOrderConfig: Overlay_SourceOrderConfig, - GridHighlightConfig: Overlay_GridHighlightConfig, - FlexContainerHighlightConfig: Overlay_FlexContainerHighlightConfig, - FlexItemHighlightConfig: Overlay_FlexItemHighlightConfig, - LineStyle: Overlay_LineStyle, - BoxStyle: Overlay_BoxStyle, - ContrastAlgorithm: Overlay_ContrastAlgorithm, - HighlightConfig: Overlay_HighlightConfig, - ColorFormat: Overlay_ColorFormat, - GridNodeHighlightConfig: Overlay_GridNodeHighlightConfig, - FlexNodeHighlightConfig: Overlay_FlexNodeHighlightConfig, - ScrollSnapContainerHighlightConfig: Overlay_ScrollSnapContainerHighlightConfig, - ScrollSnapHighlightConfig: Overlay_ScrollSnapHighlightConfig, - HingeConfig: Overlay_HingeConfig, - WindowControlsOverlayConfig: Overlay_WindowControlsOverlayConfig, - ContainerQueryHighlightConfig: Overlay_ContainerQueryHighlightConfig, - ContainerQueryContainerHighlightConfig: Overlay_ContainerQueryContainerHighlightConfig, - IsolatedElementHighlightConfig: Overlay_IsolatedElementHighlightConfig, - IsolationModeHighlightConfig: Overlay_IsolationModeHighlightConfig, - InspectMode: Overlay_InspectMode, - InspectedElementAnchorConfig: Overlay_InspectedElementAnchorConfig, - DisableParams: Overlay_DisableParams, - DisableResult: Overlay_DisableResult, - EnableParams: Overlay_EnableParams, - EnableResult: Overlay_EnableResult, - GetHighlightObjectForTestParams: Overlay_GetHighlightObjectForTestParams, - GetHighlightObjectForTestResult: Overlay_GetHighlightObjectForTestResult, - GetGridHighlightObjectsForTestParams: Overlay_GetGridHighlightObjectsForTestParams, - GetGridHighlightObjectsForTestResult: Overlay_GetGridHighlightObjectsForTestResult, - GetSourceOrderHighlightObjectForTestParams: Overlay_GetSourceOrderHighlightObjectForTestParams, - GetSourceOrderHighlightObjectForTestResult: Overlay_GetSourceOrderHighlightObjectForTestResult, - HideHighlightParams: Overlay_HideHighlightParams, - HideHighlightResult: Overlay_HideHighlightResult, - HighlightFrameParams: Overlay_HighlightFrameParams, - HighlightFrameResult: Overlay_HighlightFrameResult, - HighlightNodeParams: Overlay_HighlightNodeParams, - HighlightNodeResult: Overlay_HighlightNodeResult, - HighlightQuadParams: Overlay_HighlightQuadParams, - HighlightQuadResult: Overlay_HighlightQuadResult, - HighlightRectParams: Overlay_HighlightRectParams, - HighlightRectResult: Overlay_HighlightRectResult, - HighlightSourceOrderParams: Overlay_HighlightSourceOrderParams, - HighlightSourceOrderResult: Overlay_HighlightSourceOrderResult, - SetInspectModeParams: Overlay_SetInspectModeParams, - SetInspectModeResult: Overlay_SetInspectModeResult, - SetShowAdHighlightsParams: Overlay_SetShowAdHighlightsParams, - SetShowAdHighlightsResult: Overlay_SetShowAdHighlightsResult, - SetPausedInDebuggerMessageParams: Overlay_SetPausedInDebuggerMessageParams, - SetPausedInDebuggerMessageResult: Overlay_SetPausedInDebuggerMessageResult, - SetShowDebugBordersParams: Overlay_SetShowDebugBordersParams, - SetShowDebugBordersResult: Overlay_SetShowDebugBordersResult, - SetShowFPSCounterParams: Overlay_SetShowFPSCounterParams, - SetShowFPSCounterResult: Overlay_SetShowFPSCounterResult, - SetShowGridOverlaysParams: Overlay_SetShowGridOverlaysParams, - SetShowGridOverlaysResult: Overlay_SetShowGridOverlaysResult, - SetShowFlexOverlaysParams: Overlay_SetShowFlexOverlaysParams, - SetShowFlexOverlaysResult: Overlay_SetShowFlexOverlaysResult, - SetShowScrollSnapOverlaysParams: Overlay_SetShowScrollSnapOverlaysParams, - SetShowScrollSnapOverlaysResult: Overlay_SetShowScrollSnapOverlaysResult, - SetShowContainerQueryOverlaysParams: Overlay_SetShowContainerQueryOverlaysParams, - SetShowContainerQueryOverlaysResult: Overlay_SetShowContainerQueryOverlaysResult, - SetShowInspectedElementAnchorParams: Overlay_SetShowInspectedElementAnchorParams, - SetShowInspectedElementAnchorResult: Overlay_SetShowInspectedElementAnchorResult, - SetShowPaintRectsParams: Overlay_SetShowPaintRectsParams, - SetShowPaintRectsResult: Overlay_SetShowPaintRectsResult, - SetShowLayoutShiftRegionsParams: Overlay_SetShowLayoutShiftRegionsParams, - SetShowLayoutShiftRegionsResult: Overlay_SetShowLayoutShiftRegionsResult, - SetShowScrollBottleneckRectsParams: Overlay_SetShowScrollBottleneckRectsParams, - SetShowScrollBottleneckRectsResult: Overlay_SetShowScrollBottleneckRectsResult, - SetShowHitTestBordersParams: Overlay_SetShowHitTestBordersParams, - SetShowHitTestBordersResult: Overlay_SetShowHitTestBordersResult, - SetShowWebVitalsParams: Overlay_SetShowWebVitalsParams, - SetShowWebVitalsResult: Overlay_SetShowWebVitalsResult, - SetShowViewportSizeOnResizeParams: Overlay_SetShowViewportSizeOnResizeParams, - SetShowViewportSizeOnResizeResult: Overlay_SetShowViewportSizeOnResizeResult, - SetShowHingeParams: Overlay_SetShowHingeParams, - SetShowHingeResult: Overlay_SetShowHingeResult, - SetShowIsolatedElementsParams: Overlay_SetShowIsolatedElementsParams, - SetShowIsolatedElementsResult: Overlay_SetShowIsolatedElementsResult, - SetShowWindowControlsOverlayParams: Overlay_SetShowWindowControlsOverlayParams, - SetShowWindowControlsOverlayResult: Overlay_SetShowWindowControlsOverlayResult, - InspectNodeRequestedEvent: Overlay_InspectNodeRequestedEvent, - NodeHighlightRequestedEvent: Overlay_NodeHighlightRequestedEvent, - ScreenshotRequestedEvent: Overlay_ScreenshotRequestedEvent, - InspectPanelShowRequestedEvent: Overlay_InspectPanelShowRequestedEvent, - InspectedElementWindowRestoredEvent: Overlay_InspectedElementWindowRestoredEvent, - InspectModeCanceledEvent: Overlay_InspectModeCanceledEvent, - }, - Page: { - FrameId: Page_FrameId, - AdFrameType: Page_AdFrameType, - AdFrameExplanation: Page_AdFrameExplanation, - AdFrameStatus: Page_AdFrameStatus, - SecureContextType: Page_SecureContextType, - CrossOriginIsolatedContextType: Page_CrossOriginIsolatedContextType, - GatedAPIFeatures: Page_GatedAPIFeatures, - PermissionsPolicyFeature: Page_PermissionsPolicyFeature, - PermissionsPolicyBlockReason: Page_PermissionsPolicyBlockReason, - PermissionsPolicyBlockLocator: Page_PermissionsPolicyBlockLocator, - PermissionsPolicyFeatureState: Page_PermissionsPolicyFeatureState, - OriginTrialTokenStatus: Page_OriginTrialTokenStatus, - OriginTrialStatus: Page_OriginTrialStatus, - OriginTrialUsageRestriction: Page_OriginTrialUsageRestriction, - OriginTrialToken: Page_OriginTrialToken, - OriginTrialTokenWithStatus: Page_OriginTrialTokenWithStatus, - OriginTrial: Page_OriginTrial, - SecurityOriginDetails: Page_SecurityOriginDetails, - Frame: Page_Frame, - FrameResource: Page_FrameResource, - FrameResourceTree: Page_FrameResourceTree, - FrameTree: Page_FrameTree, - ScriptIdentifier: Page_ScriptIdentifier, - TransitionType: Page_TransitionType, - NavigationEntry: Page_NavigationEntry, - ScreencastFrameMetadata: Page_ScreencastFrameMetadata, - DialogType: Page_DialogType, - AppManifestError: Page_AppManifestError, - AppManifestParsedProperties: Page_AppManifestParsedProperties, - LayoutViewport: Page_LayoutViewport, - VisualViewport: Page_VisualViewport, - Viewport: Page_Viewport, - FontFamilies: Page_FontFamilies, - ScriptFontFamilies: Page_ScriptFontFamilies, - FontSizes: Page_FontSizes, - ClientNavigationReason: Page_ClientNavigationReason, - ClientNavigationDisposition: Page_ClientNavigationDisposition, - InstallabilityErrorArgument: Page_InstallabilityErrorArgument, - InstallabilityError: Page_InstallabilityError, - ReferrerPolicy: Page_ReferrerPolicy, - CompilationCacheParams: Page_CompilationCacheParams, - FileFilter: Page_FileFilter, - FileHandler: Page_FileHandler, - ImageResource: Page_ImageResource, - LaunchHandler: Page_LaunchHandler, - ProtocolHandler: Page_ProtocolHandler, - RelatedApplication: Page_RelatedApplication, - ScopeExtension: Page_ScopeExtension, - Screenshot: Page_Screenshot, - ShareTarget: Page_ShareTarget, - Shortcut: Page_Shortcut, - WebAppManifest: Page_WebAppManifest, - NavigationType: Page_NavigationType, - BackForwardCacheNotRestoredReason: Page_BackForwardCacheNotRestoredReason, - BackForwardCacheNotRestoredReasonType: Page_BackForwardCacheNotRestoredReasonType, - BackForwardCacheBlockingDetails: Page_BackForwardCacheBlockingDetails, - BackForwardCacheNotRestoredExplanation: Page_BackForwardCacheNotRestoredExplanation, - BackForwardCacheNotRestoredExplanationTree: Page_BackForwardCacheNotRestoredExplanationTree, - AddScriptToEvaluateOnLoadParams: Page_AddScriptToEvaluateOnLoadParams, - AddScriptToEvaluateOnLoadResult: Page_AddScriptToEvaluateOnLoadResult, - AddScriptToEvaluateOnNewDocumentParams: Page_AddScriptToEvaluateOnNewDocumentParams, - AddScriptToEvaluateOnNewDocumentResult: Page_AddScriptToEvaluateOnNewDocumentResult, - BringToFrontParams: Page_BringToFrontParams, - BringToFrontResult: Page_BringToFrontResult, - CaptureScreenshotParams: Page_CaptureScreenshotParams, - CaptureScreenshotResult: Page_CaptureScreenshotResult, - CaptureSnapshotParams: Page_CaptureSnapshotParams, - CaptureSnapshotResult: Page_CaptureSnapshotResult, - ClearDeviceMetricsOverrideParams: Page_ClearDeviceMetricsOverrideParams, - ClearDeviceMetricsOverrideResult: Page_ClearDeviceMetricsOverrideResult, - ClearDeviceOrientationOverrideParams: Page_ClearDeviceOrientationOverrideParams, - ClearDeviceOrientationOverrideResult: Page_ClearDeviceOrientationOverrideResult, - ClearGeolocationOverrideParams: Page_ClearGeolocationOverrideParams, - ClearGeolocationOverrideResult: Page_ClearGeolocationOverrideResult, - CreateIsolatedWorldParams: Page_CreateIsolatedWorldParams, - CreateIsolatedWorldResult: Page_CreateIsolatedWorldResult, - DeleteCookieParams: Page_DeleteCookieParams, - DeleteCookieResult: Page_DeleteCookieResult, - DisableParams: Page_DisableParams, - DisableResult: Page_DisableResult, - EnableParams: Page_EnableParams, - EnableResult: Page_EnableResult, - GetAppManifestParams: Page_GetAppManifestParams, - GetAppManifestResult: Page_GetAppManifestResult, - GetInstallabilityErrorsParams: Page_GetInstallabilityErrorsParams, - GetInstallabilityErrorsResult: Page_GetInstallabilityErrorsResult, - GetManifestIconsParams: Page_GetManifestIconsParams, - GetManifestIconsResult: Page_GetManifestIconsResult, - GetAppIdParams: Page_GetAppIdParams, - GetAppIdResult: Page_GetAppIdResult, - GetAdScriptAncestryParams: Page_GetAdScriptAncestryParams, - GetAdScriptAncestryResult: Page_GetAdScriptAncestryResult, - GetFrameTreeParams: Page_GetFrameTreeParams, - GetFrameTreeResult: Page_GetFrameTreeResult, - GetLayoutMetricsParams: Page_GetLayoutMetricsParams, - GetLayoutMetricsResult: Page_GetLayoutMetricsResult, - GetNavigationHistoryParams: Page_GetNavigationHistoryParams, - GetNavigationHistoryResult: Page_GetNavigationHistoryResult, - ResetNavigationHistoryParams: Page_ResetNavigationHistoryParams, - ResetNavigationHistoryResult: Page_ResetNavigationHistoryResult, - GetResourceContentParams: Page_GetResourceContentParams, - GetResourceContentResult: Page_GetResourceContentResult, - GetResourceTreeParams: Page_GetResourceTreeParams, - GetResourceTreeResult: Page_GetResourceTreeResult, - HandleJavaScriptDialogParams: Page_HandleJavaScriptDialogParams, - HandleJavaScriptDialogResult: Page_HandleJavaScriptDialogResult, - NavigateParams: Page_NavigateParams, - NavigateResult: Page_NavigateResult, - NavigateToHistoryEntryParams: Page_NavigateToHistoryEntryParams, - NavigateToHistoryEntryResult: Page_NavigateToHistoryEntryResult, - PrintToPDFParams: Page_PrintToPDFParams, - PrintToPDFResult: Page_PrintToPDFResult, - ReloadParams: Page_ReloadParams, - ReloadResult: Page_ReloadResult, - RemoveScriptToEvaluateOnLoadParams: Page_RemoveScriptToEvaluateOnLoadParams, - RemoveScriptToEvaluateOnLoadResult: Page_RemoveScriptToEvaluateOnLoadResult, - RemoveScriptToEvaluateOnNewDocumentParams: Page_RemoveScriptToEvaluateOnNewDocumentParams, - RemoveScriptToEvaluateOnNewDocumentResult: Page_RemoveScriptToEvaluateOnNewDocumentResult, - ScreencastFrameAckParams: Page_ScreencastFrameAckParams, - ScreencastFrameAckResult: Page_ScreencastFrameAckResult, - SearchInResourceParams: Page_SearchInResourceParams, - SearchInResourceResult: Page_SearchInResourceResult, - SetAdBlockingEnabledParams: Page_SetAdBlockingEnabledParams, - SetAdBlockingEnabledResult: Page_SetAdBlockingEnabledResult, - SetBypassCSPParams: Page_SetBypassCSPParams, - SetBypassCSPResult: Page_SetBypassCSPResult, - GetPermissionsPolicyStateParams: Page_GetPermissionsPolicyStateParams, - GetPermissionsPolicyStateResult: Page_GetPermissionsPolicyStateResult, - GetOriginTrialsParams: Page_GetOriginTrialsParams, - GetOriginTrialsResult: Page_GetOriginTrialsResult, - SetDeviceMetricsOverrideParams: Page_SetDeviceMetricsOverrideParams, - SetDeviceMetricsOverrideResult: Page_SetDeviceMetricsOverrideResult, - SetDeviceOrientationOverrideParams: Page_SetDeviceOrientationOverrideParams, - SetDeviceOrientationOverrideResult: Page_SetDeviceOrientationOverrideResult, - SetFontFamiliesParams: Page_SetFontFamiliesParams, - SetFontFamiliesResult: Page_SetFontFamiliesResult, - SetFontSizesParams: Page_SetFontSizesParams, - SetFontSizesResult: Page_SetFontSizesResult, - SetDocumentContentParams: Page_SetDocumentContentParams, - SetDocumentContentResult: Page_SetDocumentContentResult, - SetDownloadBehaviorParams: Page_SetDownloadBehaviorParams, - SetDownloadBehaviorResult: Page_SetDownloadBehaviorResult, - SetGeolocationOverrideParams: Page_SetGeolocationOverrideParams, - SetGeolocationOverrideResult: Page_SetGeolocationOverrideResult, - SetLifecycleEventsEnabledParams: Page_SetLifecycleEventsEnabledParams, - SetLifecycleEventsEnabledResult: Page_SetLifecycleEventsEnabledResult, - SetTouchEmulationEnabledParams: Page_SetTouchEmulationEnabledParams, - SetTouchEmulationEnabledResult: Page_SetTouchEmulationEnabledResult, - StartScreencastParams: Page_StartScreencastParams, - StartScreencastResult: Page_StartScreencastResult, - StopLoadingParams: Page_StopLoadingParams, - StopLoadingResult: Page_StopLoadingResult, - CrashParams: Page_CrashParams, - CrashResult: Page_CrashResult, - CloseParams: Page_CloseParams, - CloseResult: Page_CloseResult, - SetWebLifecycleStateParams: Page_SetWebLifecycleStateParams, - SetWebLifecycleStateResult: Page_SetWebLifecycleStateResult, - StopScreencastParams: Page_StopScreencastParams, - StopScreencastResult: Page_StopScreencastResult, - ProduceCompilationCacheParams: Page_ProduceCompilationCacheParams, - ProduceCompilationCacheResult: Page_ProduceCompilationCacheResult, - AddCompilationCacheParams: Page_AddCompilationCacheParams, - AddCompilationCacheResult: Page_AddCompilationCacheResult, - ClearCompilationCacheParams: Page_ClearCompilationCacheParams, - ClearCompilationCacheResult: Page_ClearCompilationCacheResult, - SetSPCTransactionModeParams: Page_SetSPCTransactionModeParams, - SetSPCTransactionModeResult: Page_SetSPCTransactionModeResult, - SetRPHRegistrationModeParams: Page_SetRPHRegistrationModeParams, - SetRPHRegistrationModeResult: Page_SetRPHRegistrationModeResult, - GenerateTestReportParams: Page_GenerateTestReportParams, - GenerateTestReportResult: Page_GenerateTestReportResult, - WaitForDebuggerParams: Page_WaitForDebuggerParams, - WaitForDebuggerResult: Page_WaitForDebuggerResult, - SetInterceptFileChooserDialogParams: Page_SetInterceptFileChooserDialogParams, - SetInterceptFileChooserDialogResult: Page_SetInterceptFileChooserDialogResult, - SetPrerenderingAllowedParams: Page_SetPrerenderingAllowedParams, - SetPrerenderingAllowedResult: Page_SetPrerenderingAllowedResult, - GetAnnotatedPageContentParams: Page_GetAnnotatedPageContentParams, - GetAnnotatedPageContentResult: Page_GetAnnotatedPageContentResult, - DomContentEventFiredEvent: Page_DomContentEventFiredEvent, - FileChooserOpenedEvent: Page_FileChooserOpenedEvent, - FrameAttachedEvent: Page_FrameAttachedEvent, - FrameClearedScheduledNavigationEvent: Page_FrameClearedScheduledNavigationEvent, - FrameDetachedEvent: Page_FrameDetachedEvent, - FrameSubtreeWillBeDetachedEvent: Page_FrameSubtreeWillBeDetachedEvent, - FrameNavigatedEvent: Page_FrameNavigatedEvent, - DocumentOpenedEvent: Page_DocumentOpenedEvent, - FrameResizedEvent: Page_FrameResizedEvent, - FrameStartedNavigatingEvent: Page_FrameStartedNavigatingEvent, - FrameRequestedNavigationEvent: Page_FrameRequestedNavigationEvent, - FrameScheduledNavigationEvent: Page_FrameScheduledNavigationEvent, - FrameStartedLoadingEvent: Page_FrameStartedLoadingEvent, - FrameStoppedLoadingEvent: Page_FrameStoppedLoadingEvent, - DownloadWillBeginEvent: Page_DownloadWillBeginEvent, - DownloadProgressEvent: Page_DownloadProgressEvent, - InterstitialHiddenEvent: Page_InterstitialHiddenEvent, - InterstitialShownEvent: Page_InterstitialShownEvent, - JavascriptDialogClosedEvent: Page_JavascriptDialogClosedEvent, - JavascriptDialogOpeningEvent: Page_JavascriptDialogOpeningEvent, - LifecycleEventEvent: Page_LifecycleEventEvent, - BackForwardCacheNotUsedEvent: Page_BackForwardCacheNotUsedEvent, - LoadEventFiredEvent: Page_LoadEventFiredEvent, - NavigatedWithinDocumentEvent: Page_NavigatedWithinDocumentEvent, - ScreencastFrameEvent: Page_ScreencastFrameEvent, - ScreencastVisibilityChangedEvent: Page_ScreencastVisibilityChangedEvent, - WindowOpenEvent: Page_WindowOpenEvent, - CompilationCacheProducedEvent: Page_CompilationCacheProducedEvent, - }, - Performance: { - Metric: Performance_Metric, - DisableParams: Performance_DisableParams, - DisableResult: Performance_DisableResult, - EnableParams: Performance_EnableParams, - EnableResult: Performance_EnableResult, - SetTimeDomainParams: Performance_SetTimeDomainParams, - SetTimeDomainResult: Performance_SetTimeDomainResult, - GetMetricsParams: Performance_GetMetricsParams, - GetMetricsResult: Performance_GetMetricsResult, - MetricsEvent: Performance_MetricsEvent, - }, - PerformanceTimeline: { - LargestContentfulPaint: PerformanceTimeline_LargestContentfulPaint, - LayoutShiftAttribution: PerformanceTimeline_LayoutShiftAttribution, - LayoutShift: PerformanceTimeline_LayoutShift, - TimelineEvent: PerformanceTimeline_TimelineEvent, - EnableParams: PerformanceTimeline_EnableParams, - EnableResult: PerformanceTimeline_EnableResult, - TimelineEventAddedEvent: PerformanceTimeline_TimelineEventAddedEvent, - }, - Preload: { - RuleSetId: Preload_RuleSetId, - RuleSet: Preload_RuleSet, - RuleSetErrorType: Preload_RuleSetErrorType, - SpeculationAction: Preload_SpeculationAction, - SpeculationTargetHint: Preload_SpeculationTargetHint, - PreloadingAttemptKey: Preload_PreloadingAttemptKey, - PreloadingAttemptSource: Preload_PreloadingAttemptSource, - PreloadPipelineId: Preload_PreloadPipelineId, - PrerenderFinalStatus: Preload_PrerenderFinalStatus, - PreloadingStatus: Preload_PreloadingStatus, - PrefetchStatus: Preload_PrefetchStatus, - PrerenderMismatchedHeaders: Preload_PrerenderMismatchedHeaders, - EnableParams: Preload_EnableParams, - EnableResult: Preload_EnableResult, - DisableParams: Preload_DisableParams, - DisableResult: Preload_DisableResult, - RuleSetUpdatedEvent: Preload_RuleSetUpdatedEvent, - RuleSetRemovedEvent: Preload_RuleSetRemovedEvent, - PreloadEnabledStateUpdatedEvent: Preload_PreloadEnabledStateUpdatedEvent, - PrefetchStatusUpdatedEvent: Preload_PrefetchStatusUpdatedEvent, - PrerenderStatusUpdatedEvent: Preload_PrerenderStatusUpdatedEvent, - PreloadingAttemptSourcesUpdatedEvent: Preload_PreloadingAttemptSourcesUpdatedEvent, - }, - Profiler: { - ProfileNode: Profiler_ProfileNode, - Profile: Profiler_Profile, - PositionTickInfo: Profiler_PositionTickInfo, - CoverageRange: Profiler_CoverageRange, - FunctionCoverage: Profiler_FunctionCoverage, - ScriptCoverage: Profiler_ScriptCoverage, - DisableParams: Profiler_DisableParams, - DisableResult: Profiler_DisableResult, - EnableParams: Profiler_EnableParams, - EnableResult: Profiler_EnableResult, - GetBestEffortCoverageParams: Profiler_GetBestEffortCoverageParams, - GetBestEffortCoverageResult: Profiler_GetBestEffortCoverageResult, - SetSamplingIntervalParams: Profiler_SetSamplingIntervalParams, - SetSamplingIntervalResult: Profiler_SetSamplingIntervalResult, - StartParams: Profiler_StartParams, - StartResult: Profiler_StartResult, - StartPreciseCoverageParams: Profiler_StartPreciseCoverageParams, - StartPreciseCoverageResult: Profiler_StartPreciseCoverageResult, - StopParams: Profiler_StopParams, - StopResult: Profiler_StopResult, - StopPreciseCoverageParams: Profiler_StopPreciseCoverageParams, - StopPreciseCoverageResult: Profiler_StopPreciseCoverageResult, - TakePreciseCoverageParams: Profiler_TakePreciseCoverageParams, - TakePreciseCoverageResult: Profiler_TakePreciseCoverageResult, - ConsoleProfileFinishedEvent: Profiler_ConsoleProfileFinishedEvent, - ConsoleProfileStartedEvent: Profiler_ConsoleProfileStartedEvent, - PreciseCoverageDeltaUpdateEvent: Profiler_PreciseCoverageDeltaUpdateEvent, - }, - PWA: { - FileHandlerAccept: PWA_FileHandlerAccept, - FileHandler: PWA_FileHandler, - DisplayMode: PWA_DisplayMode, - GetOsAppStateParams: PWA_GetOsAppStateParams, - GetOsAppStateResult: PWA_GetOsAppStateResult, - InstallParams: PWA_InstallParams, - InstallResult: PWA_InstallResult, - UninstallParams: PWA_UninstallParams, - UninstallResult: PWA_UninstallResult, - LaunchParams: PWA_LaunchParams, - LaunchResult: PWA_LaunchResult, - LaunchFilesInAppParams: PWA_LaunchFilesInAppParams, - LaunchFilesInAppResult: PWA_LaunchFilesInAppResult, - OpenCurrentPageInAppParams: PWA_OpenCurrentPageInAppParams, - OpenCurrentPageInAppResult: PWA_OpenCurrentPageInAppResult, - ChangeAppUserSettingsParams: PWA_ChangeAppUserSettingsParams, - ChangeAppUserSettingsResult: PWA_ChangeAppUserSettingsResult, - }, - Runtime: { - ScriptId: Runtime_ScriptId, - SerializationOptions: Runtime_SerializationOptions, - DeepSerializedValue: Runtime_DeepSerializedValue, - RemoteObjectId: Runtime_RemoteObjectId, - UnserializableValue: Runtime_UnserializableValue, - RemoteObject: Runtime_RemoteObject, - CustomPreview: Runtime_CustomPreview, - ObjectPreview: Runtime_ObjectPreview, - PropertyPreview: Runtime_PropertyPreview, - EntryPreview: Runtime_EntryPreview, - PropertyDescriptor: Runtime_PropertyDescriptor, - InternalPropertyDescriptor: Runtime_InternalPropertyDescriptor, - PrivatePropertyDescriptor: Runtime_PrivatePropertyDescriptor, - CallArgument: Runtime_CallArgument, - ExecutionContextId: Runtime_ExecutionContextId, - ExecutionContextDescription: Runtime_ExecutionContextDescription, - ExceptionDetails: Runtime_ExceptionDetails, - Timestamp: Runtime_Timestamp, - TimeDelta: Runtime_TimeDelta, - CallFrame: Runtime_CallFrame, - StackTrace: Runtime_StackTrace, - UniqueDebuggerId: Runtime_UniqueDebuggerId, - StackTraceId: Runtime_StackTraceId, - AwaitPromiseParams: Runtime_AwaitPromiseParams, - AwaitPromiseResult: Runtime_AwaitPromiseResult, - CallFunctionOnParams: Runtime_CallFunctionOnParams, - CallFunctionOnResult: Runtime_CallFunctionOnResult, - CompileScriptParams: Runtime_CompileScriptParams, - CompileScriptResult: Runtime_CompileScriptResult, - DisableParams: Runtime_DisableParams, - DisableResult: Runtime_DisableResult, - DiscardConsoleEntriesParams: Runtime_DiscardConsoleEntriesParams, - DiscardConsoleEntriesResult: Runtime_DiscardConsoleEntriesResult, - EnableParams: Runtime_EnableParams, - EnableResult: Runtime_EnableResult, - EvaluateParams: Runtime_EvaluateParams, - EvaluateResult: Runtime_EvaluateResult, - GetIsolateIdParams: Runtime_GetIsolateIdParams, - GetIsolateIdResult: Runtime_GetIsolateIdResult, - GetHeapUsageParams: Runtime_GetHeapUsageParams, - GetHeapUsageResult: Runtime_GetHeapUsageResult, - GetPropertiesParams: Runtime_GetPropertiesParams, - GetPropertiesResult: Runtime_GetPropertiesResult, - GlobalLexicalScopeNamesParams: Runtime_GlobalLexicalScopeNamesParams, - GlobalLexicalScopeNamesResult: Runtime_GlobalLexicalScopeNamesResult, - QueryObjectsParams: Runtime_QueryObjectsParams, - QueryObjectsResult: Runtime_QueryObjectsResult, - ReleaseObjectParams: Runtime_ReleaseObjectParams, - ReleaseObjectResult: Runtime_ReleaseObjectResult, - ReleaseObjectGroupParams: Runtime_ReleaseObjectGroupParams, - ReleaseObjectGroupResult: Runtime_ReleaseObjectGroupResult, - RunIfWaitingForDebuggerParams: Runtime_RunIfWaitingForDebuggerParams, - RunIfWaitingForDebuggerResult: Runtime_RunIfWaitingForDebuggerResult, - RunScriptParams: Runtime_RunScriptParams, - RunScriptResult: Runtime_RunScriptResult, - SetAsyncCallStackDepthParams: Runtime_SetAsyncCallStackDepthParams, - SetAsyncCallStackDepthResult: Runtime_SetAsyncCallStackDepthResult, - SetCustomObjectFormatterEnabledParams: Runtime_SetCustomObjectFormatterEnabledParams, - SetCustomObjectFormatterEnabledResult: Runtime_SetCustomObjectFormatterEnabledResult, - SetMaxCallStackSizeToCaptureParams: Runtime_SetMaxCallStackSizeToCaptureParams, - SetMaxCallStackSizeToCaptureResult: Runtime_SetMaxCallStackSizeToCaptureResult, - TerminateExecutionParams: Runtime_TerminateExecutionParams, - TerminateExecutionResult: Runtime_TerminateExecutionResult, - AddBindingParams: Runtime_AddBindingParams, - AddBindingResult: Runtime_AddBindingResult, - RemoveBindingParams: Runtime_RemoveBindingParams, - RemoveBindingResult: Runtime_RemoveBindingResult, - GetExceptionDetailsParams: Runtime_GetExceptionDetailsParams, - GetExceptionDetailsResult: Runtime_GetExceptionDetailsResult, - BindingCalledEvent: Runtime_BindingCalledEvent, - ConsoleAPICalledEvent: Runtime_ConsoleAPICalledEvent, - ExceptionRevokedEvent: Runtime_ExceptionRevokedEvent, - ExceptionThrownEvent: Runtime_ExceptionThrownEvent, - ExecutionContextCreatedEvent: Runtime_ExecutionContextCreatedEvent, - ExecutionContextDestroyedEvent: Runtime_ExecutionContextDestroyedEvent, - ExecutionContextsClearedEvent: Runtime_ExecutionContextsClearedEvent, - InspectRequestedEvent: Runtime_InspectRequestedEvent, - }, - Schema: { - Domain: Schema_Domain, - GetDomainsParams: Schema_GetDomainsParams, - GetDomainsResult: Schema_GetDomainsResult, - }, - Security: { - CertificateId: Security_CertificateId, - MixedContentType: Security_MixedContentType, - SecurityState: Security_SecurityState, - CertificateSecurityState: Security_CertificateSecurityState, - SafetyTipStatus: Security_SafetyTipStatus, - SafetyTipInfo: Security_SafetyTipInfo, - VisibleSecurityState: Security_VisibleSecurityState, - SecurityStateExplanation: Security_SecurityStateExplanation, - InsecureContentStatus: Security_InsecureContentStatus, - CertificateErrorAction: Security_CertificateErrorAction, - DisableParams: Security_DisableParams, - DisableResult: Security_DisableResult, - EnableParams: Security_EnableParams, - EnableResult: Security_EnableResult, - SetIgnoreCertificateErrorsParams: Security_SetIgnoreCertificateErrorsParams, - SetIgnoreCertificateErrorsResult: Security_SetIgnoreCertificateErrorsResult, - HandleCertificateErrorParams: Security_HandleCertificateErrorParams, - HandleCertificateErrorResult: Security_HandleCertificateErrorResult, - SetOverrideCertificateErrorsParams: Security_SetOverrideCertificateErrorsParams, - SetOverrideCertificateErrorsResult: Security_SetOverrideCertificateErrorsResult, - CertificateErrorEvent: Security_CertificateErrorEvent, - VisibleSecurityStateChangedEvent: Security_VisibleSecurityStateChangedEvent, - SecurityStateChangedEvent: Security_SecurityStateChangedEvent, - }, - ServiceWorker: { - RegistrationID: ServiceWorker_RegistrationID, - ServiceWorkerRegistration: ServiceWorker_ServiceWorkerRegistration, - ServiceWorkerVersionRunningStatus: ServiceWorker_ServiceWorkerVersionRunningStatus, - ServiceWorkerVersionStatus: ServiceWorker_ServiceWorkerVersionStatus, - ServiceWorkerVersion: ServiceWorker_ServiceWorkerVersion, - ServiceWorkerErrorMessage: ServiceWorker_ServiceWorkerErrorMessage, - DeliverPushMessageParams: ServiceWorker_DeliverPushMessageParams, - DeliverPushMessageResult: ServiceWorker_DeliverPushMessageResult, - DisableParams: ServiceWorker_DisableParams, - DisableResult: ServiceWorker_DisableResult, - DispatchSyncEventParams: ServiceWorker_DispatchSyncEventParams, - DispatchSyncEventResult: ServiceWorker_DispatchSyncEventResult, - DispatchPeriodicSyncEventParams: ServiceWorker_DispatchPeriodicSyncEventParams, - DispatchPeriodicSyncEventResult: ServiceWorker_DispatchPeriodicSyncEventResult, - EnableParams: ServiceWorker_EnableParams, - EnableResult: ServiceWorker_EnableResult, - SetForceUpdateOnPageLoadParams: ServiceWorker_SetForceUpdateOnPageLoadParams, - SetForceUpdateOnPageLoadResult: ServiceWorker_SetForceUpdateOnPageLoadResult, - SkipWaitingParams: ServiceWorker_SkipWaitingParams, - SkipWaitingResult: ServiceWorker_SkipWaitingResult, - StartWorkerParams: ServiceWorker_StartWorkerParams, - StartWorkerResult: ServiceWorker_StartWorkerResult, - StopAllWorkersParams: ServiceWorker_StopAllWorkersParams, - StopAllWorkersResult: ServiceWorker_StopAllWorkersResult, - StopWorkerParams: ServiceWorker_StopWorkerParams, - StopWorkerResult: ServiceWorker_StopWorkerResult, - UnregisterParams: ServiceWorker_UnregisterParams, - UnregisterResult: ServiceWorker_UnregisterResult, - UpdateRegistrationParams: ServiceWorker_UpdateRegistrationParams, - UpdateRegistrationResult: ServiceWorker_UpdateRegistrationResult, - WorkerErrorReportedEvent: ServiceWorker_WorkerErrorReportedEvent, - WorkerRegistrationUpdatedEvent: ServiceWorker_WorkerRegistrationUpdatedEvent, - WorkerVersionUpdatedEvent: ServiceWorker_WorkerVersionUpdatedEvent, - }, - SmartCardEmulation: { - ResultCode: SmartCardEmulation_ResultCode, - ShareMode: SmartCardEmulation_ShareMode, - Disposition: SmartCardEmulation_Disposition, - ConnectionState: SmartCardEmulation_ConnectionState, - ReaderStateFlags: SmartCardEmulation_ReaderStateFlags, - ProtocolSet: SmartCardEmulation_ProtocolSet, - Protocol: SmartCardEmulation_Protocol, - ReaderStateIn: SmartCardEmulation_ReaderStateIn, - ReaderStateOut: SmartCardEmulation_ReaderStateOut, - EnableParams: SmartCardEmulation_EnableParams, - EnableResult: SmartCardEmulation_EnableResult, - DisableParams: SmartCardEmulation_DisableParams, - DisableResult: SmartCardEmulation_DisableResult, - ReportEstablishContextResultParams: SmartCardEmulation_ReportEstablishContextResultParams, - ReportEstablishContextResultResult: SmartCardEmulation_ReportEstablishContextResultResult, - ReportReleaseContextResultParams: SmartCardEmulation_ReportReleaseContextResultParams, - ReportReleaseContextResultResult: SmartCardEmulation_ReportReleaseContextResultResult, - ReportListReadersResultParams: SmartCardEmulation_ReportListReadersResultParams, - ReportListReadersResultResult: SmartCardEmulation_ReportListReadersResultResult, - ReportGetStatusChangeResultParams: SmartCardEmulation_ReportGetStatusChangeResultParams, - ReportGetStatusChangeResultResult: SmartCardEmulation_ReportGetStatusChangeResultResult, - ReportBeginTransactionResultParams: SmartCardEmulation_ReportBeginTransactionResultParams, - ReportBeginTransactionResultResult: SmartCardEmulation_ReportBeginTransactionResultResult, - ReportPlainResultParams: SmartCardEmulation_ReportPlainResultParams, - ReportPlainResultResult: SmartCardEmulation_ReportPlainResultResult, - ReportConnectResultParams: SmartCardEmulation_ReportConnectResultParams, - ReportConnectResultResult: SmartCardEmulation_ReportConnectResultResult, - ReportDataResultParams: SmartCardEmulation_ReportDataResultParams, - ReportDataResultResult: SmartCardEmulation_ReportDataResultResult, - ReportStatusResultParams: SmartCardEmulation_ReportStatusResultParams, - ReportStatusResultResult: SmartCardEmulation_ReportStatusResultResult, - ReportErrorParams: SmartCardEmulation_ReportErrorParams, - ReportErrorResult: SmartCardEmulation_ReportErrorResult, - EstablishContextRequestedEvent: SmartCardEmulation_EstablishContextRequestedEvent, - ReleaseContextRequestedEvent: SmartCardEmulation_ReleaseContextRequestedEvent, - ListReadersRequestedEvent: SmartCardEmulation_ListReadersRequestedEvent, - GetStatusChangeRequestedEvent: SmartCardEmulation_GetStatusChangeRequestedEvent, - CancelRequestedEvent: SmartCardEmulation_CancelRequestedEvent, - ConnectRequestedEvent: SmartCardEmulation_ConnectRequestedEvent, - DisconnectRequestedEvent: SmartCardEmulation_DisconnectRequestedEvent, - TransmitRequestedEvent: SmartCardEmulation_TransmitRequestedEvent, - ControlRequestedEvent: SmartCardEmulation_ControlRequestedEvent, - GetAttribRequestedEvent: SmartCardEmulation_GetAttribRequestedEvent, - SetAttribRequestedEvent: SmartCardEmulation_SetAttribRequestedEvent, - StatusRequestedEvent: SmartCardEmulation_StatusRequestedEvent, - BeginTransactionRequestedEvent: SmartCardEmulation_BeginTransactionRequestedEvent, - EndTransactionRequestedEvent: SmartCardEmulation_EndTransactionRequestedEvent, - }, - Storage: { - SerializedStorageKey: Storage_SerializedStorageKey, - StorageType: Storage_StorageType, - UsageForType: Storage_UsageForType, - TrustTokens: Storage_TrustTokens, - InterestGroupAuctionId: Storage_InterestGroupAuctionId, - InterestGroupAccessType: Storage_InterestGroupAccessType, - InterestGroupAuctionEventType: Storage_InterestGroupAuctionEventType, - InterestGroupAuctionFetchType: Storage_InterestGroupAuctionFetchType, - SharedStorageAccessScope: Storage_SharedStorageAccessScope, - SharedStorageAccessMethod: Storage_SharedStorageAccessMethod, - SharedStorageEntry: Storage_SharedStorageEntry, - SharedStorageMetadata: Storage_SharedStorageMetadata, - SharedStoragePrivateAggregationConfig: Storage_SharedStoragePrivateAggregationConfig, - SharedStorageReportingMetadata: Storage_SharedStorageReportingMetadata, - SharedStorageUrlWithMetadata: Storage_SharedStorageUrlWithMetadata, - SharedStorageAccessParams: Storage_SharedStorageAccessParams, - StorageBucketsDurability: Storage_StorageBucketsDurability, - StorageBucket: Storage_StorageBucket, - StorageBucketInfo: Storage_StorageBucketInfo, - RelatedWebsiteSet: Storage_RelatedWebsiteSet, - GetStorageKeyForFrameParams: Storage_GetStorageKeyForFrameParams, - GetStorageKeyForFrameResult: Storage_GetStorageKeyForFrameResult, - GetStorageKeyParams: Storage_GetStorageKeyParams, - GetStorageKeyResult: Storage_GetStorageKeyResult, - ClearDataForOriginParams: Storage_ClearDataForOriginParams, - ClearDataForOriginResult: Storage_ClearDataForOriginResult, - ClearDataForStorageKeyParams: Storage_ClearDataForStorageKeyParams, - ClearDataForStorageKeyResult: Storage_ClearDataForStorageKeyResult, - GetCookiesParams: Storage_GetCookiesParams, - GetCookiesResult: Storage_GetCookiesResult, - SetCookiesParams: Storage_SetCookiesParams, - SetCookiesResult: Storage_SetCookiesResult, - ClearCookiesParams: Storage_ClearCookiesParams, - ClearCookiesResult: Storage_ClearCookiesResult, - GetUsageAndQuotaParams: Storage_GetUsageAndQuotaParams, - GetUsageAndQuotaResult: Storage_GetUsageAndQuotaResult, - OverrideQuotaForOriginParams: Storage_OverrideQuotaForOriginParams, - OverrideQuotaForOriginResult: Storage_OverrideQuotaForOriginResult, - TrackCacheStorageForOriginParams: Storage_TrackCacheStorageForOriginParams, - TrackCacheStorageForOriginResult: Storage_TrackCacheStorageForOriginResult, - TrackCacheStorageForStorageKeyParams: Storage_TrackCacheStorageForStorageKeyParams, - TrackCacheStorageForStorageKeyResult: Storage_TrackCacheStorageForStorageKeyResult, - TrackIndexedDBForOriginParams: Storage_TrackIndexedDBForOriginParams, - TrackIndexedDBForOriginResult: Storage_TrackIndexedDBForOriginResult, - TrackIndexedDBForStorageKeyParams: Storage_TrackIndexedDBForStorageKeyParams, - TrackIndexedDBForStorageKeyResult: Storage_TrackIndexedDBForStorageKeyResult, - UntrackCacheStorageForOriginParams: Storage_UntrackCacheStorageForOriginParams, - UntrackCacheStorageForOriginResult: Storage_UntrackCacheStorageForOriginResult, - UntrackCacheStorageForStorageKeyParams: Storage_UntrackCacheStorageForStorageKeyParams, - UntrackCacheStorageForStorageKeyResult: Storage_UntrackCacheStorageForStorageKeyResult, - UntrackIndexedDBForOriginParams: Storage_UntrackIndexedDBForOriginParams, - UntrackIndexedDBForOriginResult: Storage_UntrackIndexedDBForOriginResult, - UntrackIndexedDBForStorageKeyParams: Storage_UntrackIndexedDBForStorageKeyParams, - UntrackIndexedDBForStorageKeyResult: Storage_UntrackIndexedDBForStorageKeyResult, - GetTrustTokensParams: Storage_GetTrustTokensParams, - GetTrustTokensResult: Storage_GetTrustTokensResult, - ClearTrustTokensParams: Storage_ClearTrustTokensParams, - ClearTrustTokensResult: Storage_ClearTrustTokensResult, - GetInterestGroupDetailsParams: Storage_GetInterestGroupDetailsParams, - GetInterestGroupDetailsResult: Storage_GetInterestGroupDetailsResult, - SetInterestGroupTrackingParams: Storage_SetInterestGroupTrackingParams, - SetInterestGroupTrackingResult: Storage_SetInterestGroupTrackingResult, - SetInterestGroupAuctionTrackingParams: Storage_SetInterestGroupAuctionTrackingParams, - SetInterestGroupAuctionTrackingResult: Storage_SetInterestGroupAuctionTrackingResult, - GetSharedStorageMetadataParams: Storage_GetSharedStorageMetadataParams, - GetSharedStorageMetadataResult: Storage_GetSharedStorageMetadataResult, - GetSharedStorageEntriesParams: Storage_GetSharedStorageEntriesParams, - GetSharedStorageEntriesResult: Storage_GetSharedStorageEntriesResult, - SetSharedStorageEntryParams: Storage_SetSharedStorageEntryParams, - SetSharedStorageEntryResult: Storage_SetSharedStorageEntryResult, - DeleteSharedStorageEntryParams: Storage_DeleteSharedStorageEntryParams, - DeleteSharedStorageEntryResult: Storage_DeleteSharedStorageEntryResult, - ClearSharedStorageEntriesParams: Storage_ClearSharedStorageEntriesParams, - ClearSharedStorageEntriesResult: Storage_ClearSharedStorageEntriesResult, - ResetSharedStorageBudgetParams: Storage_ResetSharedStorageBudgetParams, - ResetSharedStorageBudgetResult: Storage_ResetSharedStorageBudgetResult, - SetSharedStorageTrackingParams: Storage_SetSharedStorageTrackingParams, - SetSharedStorageTrackingResult: Storage_SetSharedStorageTrackingResult, - SetStorageBucketTrackingParams: Storage_SetStorageBucketTrackingParams, - SetStorageBucketTrackingResult: Storage_SetStorageBucketTrackingResult, - DeleteStorageBucketParams: Storage_DeleteStorageBucketParams, - DeleteStorageBucketResult: Storage_DeleteStorageBucketResult, - RunBounceTrackingMitigationsParams: Storage_RunBounceTrackingMitigationsParams, - RunBounceTrackingMitigationsResult: Storage_RunBounceTrackingMitigationsResult, - GetRelatedWebsiteSetsParams: Storage_GetRelatedWebsiteSetsParams, - GetRelatedWebsiteSetsResult: Storage_GetRelatedWebsiteSetsResult, - SetProtectedAudienceKAnonymityParams: Storage_SetProtectedAudienceKAnonymityParams, - SetProtectedAudienceKAnonymityResult: Storage_SetProtectedAudienceKAnonymityResult, - CacheStorageContentUpdatedEvent: Storage_CacheStorageContentUpdatedEvent, - CacheStorageListUpdatedEvent: Storage_CacheStorageListUpdatedEvent, - IndexedDBContentUpdatedEvent: Storage_IndexedDBContentUpdatedEvent, - IndexedDBListUpdatedEvent: Storage_IndexedDBListUpdatedEvent, - InterestGroupAccessedEvent: Storage_InterestGroupAccessedEvent, - InterestGroupAuctionEventOccurredEvent: Storage_InterestGroupAuctionEventOccurredEvent, - InterestGroupAuctionNetworkRequestCreatedEvent: Storage_InterestGroupAuctionNetworkRequestCreatedEvent, - SharedStorageAccessedEvent: Storage_SharedStorageAccessedEvent, - SharedStorageWorkletOperationExecutionFinishedEvent: Storage_SharedStorageWorkletOperationExecutionFinishedEvent, - StorageBucketCreatedOrUpdatedEvent: Storage_StorageBucketCreatedOrUpdatedEvent, - StorageBucketDeletedEvent: Storage_StorageBucketDeletedEvent, - }, - SystemInfo: { - GPUDevice: SystemInfo_GPUDevice, - Size: SystemInfo_Size, - VideoDecodeAcceleratorCapability: SystemInfo_VideoDecodeAcceleratorCapability, - VideoEncodeAcceleratorCapability: SystemInfo_VideoEncodeAcceleratorCapability, - SubsamplingFormat: SystemInfo_SubsamplingFormat, - ImageType: SystemInfo_ImageType, - GPUInfo: SystemInfo_GPUInfo, - ProcessInfo: SystemInfo_ProcessInfo, - GetInfoParams: SystemInfo_GetInfoParams, - GetInfoResult: SystemInfo_GetInfoResult, - GetFeatureStateParams: SystemInfo_GetFeatureStateParams, - GetFeatureStateResult: SystemInfo_GetFeatureStateResult, - GetProcessInfoParams: SystemInfo_GetProcessInfoParams, - GetProcessInfoResult: SystemInfo_GetProcessInfoResult, - }, - Target: { - TargetID: Target_TargetID, - SessionID: Target_SessionID, - TargetInfo: Target_TargetInfo, - FilterEntry: Target_FilterEntry, - TargetFilter: Target_TargetFilter, - RemoteLocation: Target_RemoteLocation, - WindowState: Target_WindowState, - ActivateTargetParams: Target_ActivateTargetParams, - ActivateTargetResult: Target_ActivateTargetResult, - AttachToTargetParams: Target_AttachToTargetParams, - AttachToTargetResult: Target_AttachToTargetResult, - AttachToBrowserTargetParams: Target_AttachToBrowserTargetParams, - AttachToBrowserTargetResult: Target_AttachToBrowserTargetResult, - CloseTargetParams: Target_CloseTargetParams, - CloseTargetResult: Target_CloseTargetResult, - ExposeDevToolsProtocolParams: Target_ExposeDevToolsProtocolParams, - ExposeDevToolsProtocolResult: Target_ExposeDevToolsProtocolResult, - CreateBrowserContextParams: Target_CreateBrowserContextParams, - CreateBrowserContextResult: Target_CreateBrowserContextResult, - GetBrowserContextsParams: Target_GetBrowserContextsParams, - GetBrowserContextsResult: Target_GetBrowserContextsResult, - CreateTargetParams: Target_CreateTargetParams, - CreateTargetResult: Target_CreateTargetResult, - DetachFromTargetParams: Target_DetachFromTargetParams, - DetachFromTargetResult: Target_DetachFromTargetResult, - DisposeBrowserContextParams: Target_DisposeBrowserContextParams, - DisposeBrowserContextResult: Target_DisposeBrowserContextResult, - GetTargetInfoParams: Target_GetTargetInfoParams, - GetTargetInfoResult: Target_GetTargetInfoResult, - GetTargetsParams: Target_GetTargetsParams, - GetTargetsResult: Target_GetTargetsResult, - SendMessageToTargetParams: Target_SendMessageToTargetParams, - SendMessageToTargetResult: Target_SendMessageToTargetResult, - SetAutoAttachParams: Target_SetAutoAttachParams, - SetAutoAttachResult: Target_SetAutoAttachResult, - AutoAttachRelatedParams: Target_AutoAttachRelatedParams, - AutoAttachRelatedResult: Target_AutoAttachRelatedResult, - SetDiscoverTargetsParams: Target_SetDiscoverTargetsParams, - SetDiscoverTargetsResult: Target_SetDiscoverTargetsResult, - SetRemoteLocationsParams: Target_SetRemoteLocationsParams, - SetRemoteLocationsResult: Target_SetRemoteLocationsResult, - GetDevToolsTargetParams: Target_GetDevToolsTargetParams, - GetDevToolsTargetResult: Target_GetDevToolsTargetResult, - OpenDevToolsParams: Target_OpenDevToolsParams, - OpenDevToolsResult: Target_OpenDevToolsResult, - AttachedToTargetEvent: Target_AttachedToTargetEvent, - DetachedFromTargetEvent: Target_DetachedFromTargetEvent, - ReceivedMessageFromTargetEvent: Target_ReceivedMessageFromTargetEvent, - TargetCreatedEvent: Target_TargetCreatedEvent, - TargetDestroyedEvent: Target_TargetDestroyedEvent, - TargetCrashedEvent: Target_TargetCrashedEvent, - TargetInfoChangedEvent: Target_TargetInfoChangedEvent, - }, - Tethering: { - BindParams: Tethering_BindParams, - BindResult: Tethering_BindResult, - UnbindParams: Tethering_UnbindParams, - UnbindResult: Tethering_UnbindResult, - AcceptedEvent: Tethering_AcceptedEvent, - }, - Tracing: { - MemoryDumpConfig: Tracing_MemoryDumpConfig, - TraceConfig: Tracing_TraceConfig, - StreamFormat: Tracing_StreamFormat, - StreamCompression: Tracing_StreamCompression, - MemoryDumpLevelOfDetail: Tracing_MemoryDumpLevelOfDetail, - TracingBackend: Tracing_TracingBackend, - EndParams: Tracing_EndParams, - EndResult: Tracing_EndResult, - GetCategoriesParams: Tracing_GetCategoriesParams, - GetCategoriesResult: Tracing_GetCategoriesResult, - GetTrackEventDescriptorParams: Tracing_GetTrackEventDescriptorParams, - GetTrackEventDescriptorResult: Tracing_GetTrackEventDescriptorResult, - RecordClockSyncMarkerParams: Tracing_RecordClockSyncMarkerParams, - RecordClockSyncMarkerResult: Tracing_RecordClockSyncMarkerResult, - RequestMemoryDumpParams: Tracing_RequestMemoryDumpParams, - RequestMemoryDumpResult: Tracing_RequestMemoryDumpResult, - StartParams: Tracing_StartParams, - StartResult: Tracing_StartResult, - BufferUsageEvent: Tracing_BufferUsageEvent, - DataCollectedEvent: Tracing_DataCollectedEvent, - TracingCompleteEvent: Tracing_TracingCompleteEvent, - }, - WebAudio: { - GraphObjectId: WebAudio_GraphObjectId, - ContextType: WebAudio_ContextType, - ContextState: WebAudio_ContextState, - NodeType: WebAudio_NodeType, - ChannelCountMode: WebAudio_ChannelCountMode, - ChannelInterpretation: WebAudio_ChannelInterpretation, - ParamType: WebAudio_ParamType, - AutomationRate: WebAudio_AutomationRate, - ContextRealtimeData: WebAudio_ContextRealtimeData, - BaseAudioContext: WebAudio_BaseAudioContext, - AudioListener: WebAudio_AudioListener, - AudioNode: WebAudio_AudioNode, - AudioParam: WebAudio_AudioParam, - EnableParams: WebAudio_EnableParams, - EnableResult: WebAudio_EnableResult, - DisableParams: WebAudio_DisableParams, - DisableResult: WebAudio_DisableResult, - GetRealtimeDataParams: WebAudio_GetRealtimeDataParams, - GetRealtimeDataResult: WebAudio_GetRealtimeDataResult, - ContextCreatedEvent: WebAudio_ContextCreatedEvent, - ContextWillBeDestroyedEvent: WebAudio_ContextWillBeDestroyedEvent, - ContextChangedEvent: WebAudio_ContextChangedEvent, - AudioListenerCreatedEvent: WebAudio_AudioListenerCreatedEvent, - AudioListenerWillBeDestroyedEvent: WebAudio_AudioListenerWillBeDestroyedEvent, - AudioNodeCreatedEvent: WebAudio_AudioNodeCreatedEvent, - AudioNodeWillBeDestroyedEvent: WebAudio_AudioNodeWillBeDestroyedEvent, - AudioParamCreatedEvent: WebAudio_AudioParamCreatedEvent, - AudioParamWillBeDestroyedEvent: WebAudio_AudioParamWillBeDestroyedEvent, - NodesConnectedEvent: WebAudio_NodesConnectedEvent, - NodesDisconnectedEvent: WebAudio_NodesDisconnectedEvent, - NodeParamConnectedEvent: WebAudio_NodeParamConnectedEvent, - NodeParamDisconnectedEvent: WebAudio_NodeParamDisconnectedEvent, - }, - WebAuthn: { - AuthenticatorId: WebAuthn_AuthenticatorId, - AuthenticatorProtocol: WebAuthn_AuthenticatorProtocol, - Ctap2Version: WebAuthn_Ctap2Version, - AuthenticatorTransport: WebAuthn_AuthenticatorTransport, - VirtualAuthenticatorOptions: WebAuthn_VirtualAuthenticatorOptions, - Credential: WebAuthn_Credential, - EnableParams: WebAuthn_EnableParams, - EnableResult: WebAuthn_EnableResult, - DisableParams: WebAuthn_DisableParams, - DisableResult: WebAuthn_DisableResult, - AddVirtualAuthenticatorParams: WebAuthn_AddVirtualAuthenticatorParams, - AddVirtualAuthenticatorResult: WebAuthn_AddVirtualAuthenticatorResult, - SetResponseOverrideBitsParams: WebAuthn_SetResponseOverrideBitsParams, - SetResponseOverrideBitsResult: WebAuthn_SetResponseOverrideBitsResult, - RemoveVirtualAuthenticatorParams: WebAuthn_RemoveVirtualAuthenticatorParams, - RemoveVirtualAuthenticatorResult: WebAuthn_RemoveVirtualAuthenticatorResult, - AddCredentialParams: WebAuthn_AddCredentialParams, - AddCredentialResult: WebAuthn_AddCredentialResult, - GetCredentialParams: WebAuthn_GetCredentialParams, - GetCredentialResult: WebAuthn_GetCredentialResult, - GetCredentialsParams: WebAuthn_GetCredentialsParams, - GetCredentialsResult: WebAuthn_GetCredentialsResult, - RemoveCredentialParams: WebAuthn_RemoveCredentialParams, - RemoveCredentialResult: WebAuthn_RemoveCredentialResult, - ClearCredentialsParams: WebAuthn_ClearCredentialsParams, - ClearCredentialsResult: WebAuthn_ClearCredentialsResult, - SetUserVerifiedParams: WebAuthn_SetUserVerifiedParams, - SetUserVerifiedResult: WebAuthn_SetUserVerifiedResult, - SetAutomaticPresenceSimulationParams: WebAuthn_SetAutomaticPresenceSimulationParams, - SetAutomaticPresenceSimulationResult: WebAuthn_SetAutomaticPresenceSimulationResult, - SetCredentialPropertiesParams: WebAuthn_SetCredentialPropertiesParams, - SetCredentialPropertiesResult: WebAuthn_SetCredentialPropertiesResult, - CredentialAddedEvent: WebAuthn_CredentialAddedEvent, - CredentialDeletedEvent: WebAuthn_CredentialDeletedEvent, - CredentialUpdatedEvent: WebAuthn_CredentialUpdatedEvent, - CredentialAssertedEvent: WebAuthn_CredentialAssertedEvent, - }, - WebMCP: { - Annotation: WebMCP_Annotation, - InvocationStatus: WebMCP_InvocationStatus, - Tool: WebMCP_Tool, - RemovedTool: WebMCP_RemovedTool, - EnableParams: WebMCP_EnableParams, - EnableResult: WebMCP_EnableResult, - DisableParams: WebMCP_DisableParams, - DisableResult: WebMCP_DisableResult, - InvokeToolParams: WebMCP_InvokeToolParams, - InvokeToolResult: WebMCP_InvokeToolResult, - CancelInvocationParams: WebMCP_CancelInvocationParams, - CancelInvocationResult: WebMCP_CancelInvocationResult, - ToolsAddedEvent: WebMCP_ToolsAddedEvent, - ToolsRemovedEvent: WebMCP_ToolsRemovedEvent, - ToolInvokedEvent: WebMCP_ToolInvokedEvent, - ToolRespondedEvent: WebMCP_ToolRespondedEvent, - }, + Mod, + Accessibility: Accessibility.zod, + Animation: Animation.zod, + Audits: Audits.zod, + Autofill: Autofill.zod, + BackgroundService: BackgroundService.zod, + BluetoothEmulation: BluetoothEmulation.zod, + Browser: Browser.zod, + CacheStorage: CacheStorage.zod, + Cast: Cast.zod, + Console: Console.zod, + CrashReportContext: CrashReportContext.zod, + CSS: CSS.zod, + Debugger: Debugger.zod, + DeviceAccess: DeviceAccess.zod, + DeviceOrientation: DeviceOrientation.zod, + DOM: DOM.zod, + DOMDebugger: DOMDebugger.zod, + DOMSnapshot: DOMSnapshot.zod, + DOMStorage: DOMStorage.zod, + Emulation: Emulation.zod, + EventBreakpoints: EventBreakpoints.zod, + Extensions: Extensions.zod, + FedCm: FedCm.zod, + Fetch: Fetch.zod, + FileSystem: FileSystem.zod, + HeadlessExperimental: HeadlessExperimental.zod, + HeapProfiler: HeapProfiler.zod, + IndexedDB: IndexedDB.zod, + Input: Input.zod, + Inspector: Inspector.zod, + IO: IO.zod, + LayerTree: LayerTree.zod, + Log: Log.zod, + Media: Media.zod, + Memory: Memory.zod, + Network: Network.zod, + Overlay: Overlay.zod, + Page: Page.zod, + Performance: Performance.zod, + PerformanceTimeline: PerformanceTimeline.zod, + Preload: Preload.zod, + Profiler: Profiler.zod, + PWA: PWA.zod, + Runtime: Runtime.zod, + Schema: Schema.zod, + Security: Security.zod, + ServiceWorker: ServiceWorker.zod, + SmartCardEmulation: SmartCardEmulation.zod, + Storage: Storage.zod, + SystemInfo: SystemInfo.zod, + Target: Target.zod, + Tethering: Tethering.zod, + Tracing: Tracing.zod, + WebAudio: WebAudio.zod, + WebAuthn: WebAuthn.zod, + WebMCP: WebMCP.zod, } as const; export const commands = { - "Accessibility.disable": { params: Accessibility_DisableParams, result: Accessibility_DisableResult }, - "Accessibility.enable": { params: Accessibility_EnableParams, result: Accessibility_EnableResult }, - "Accessibility.getPartialAXTree": { params: Accessibility_GetPartialAXTreeParams, result: Accessibility_GetPartialAXTreeResult }, - "Accessibility.getFullAXTree": { params: Accessibility_GetFullAXTreeParams, result: Accessibility_GetFullAXTreeResult }, - "Accessibility.getRootAXNode": { params: Accessibility_GetRootAXNodeParams, result: Accessibility_GetRootAXNodeResult }, - "Accessibility.getAXNodeAndAncestors": { params: Accessibility_GetAXNodeAndAncestorsParams, result: Accessibility_GetAXNodeAndAncestorsResult }, - "Accessibility.getChildAXNodes": { params: Accessibility_GetChildAXNodesParams, result: Accessibility_GetChildAXNodesResult }, - "Accessibility.queryAXTree": { params: Accessibility_QueryAXTreeParams, result: Accessibility_QueryAXTreeResult }, - "Animation.disable": { params: Animation_DisableParams, result: Animation_DisableResult }, - "Animation.enable": { params: Animation_EnableParams, result: Animation_EnableResult }, - "Animation.getCurrentTime": { params: Animation_GetCurrentTimeParams, result: Animation_GetCurrentTimeResult }, - "Animation.getPlaybackRate": { params: Animation_GetPlaybackRateParams, result: Animation_GetPlaybackRateResult }, - "Animation.releaseAnimations": { params: Animation_ReleaseAnimationsParams, result: Animation_ReleaseAnimationsResult }, - "Animation.resolveAnimation": { params: Animation_ResolveAnimationParams, result: Animation_ResolveAnimationResult }, - "Animation.seekAnimations": { params: Animation_SeekAnimationsParams, result: Animation_SeekAnimationsResult }, - "Animation.setPaused": { params: Animation_SetPausedParams, result: Animation_SetPausedResult }, - "Animation.setPlaybackRate": { params: Animation_SetPlaybackRateParams, result: Animation_SetPlaybackRateResult }, - "Animation.setTiming": { params: Animation_SetTimingParams, result: Animation_SetTimingResult }, - "Audits.getEncodedResponse": { params: Audits_GetEncodedResponseParams, result: Audits_GetEncodedResponseResult }, - "Audits.disable": { params: Audits_DisableParams, result: Audits_DisableResult }, - "Audits.enable": { params: Audits_EnableParams, result: Audits_EnableResult }, - "Audits.checkFormsIssues": { params: Audits_CheckFormsIssuesParams, result: Audits_CheckFormsIssuesResult }, - "Autofill.trigger": { params: Autofill_TriggerParams, result: Autofill_TriggerResult }, - "Autofill.setAddresses": { params: Autofill_SetAddressesParams, result: Autofill_SetAddressesResult }, - "Autofill.disable": { params: Autofill_DisableParams, result: Autofill_DisableResult }, - "Autofill.enable": { params: Autofill_EnableParams, result: Autofill_EnableResult }, - "BackgroundService.startObserving": { params: BackgroundService_StartObservingParams, result: BackgroundService_StartObservingResult }, - "BackgroundService.stopObserving": { params: BackgroundService_StopObservingParams, result: BackgroundService_StopObservingResult }, - "BackgroundService.setRecording": { params: BackgroundService_SetRecordingParams, result: BackgroundService_SetRecordingResult }, - "BackgroundService.clearEvents": { params: BackgroundService_ClearEventsParams, result: BackgroundService_ClearEventsResult }, - "BluetoothEmulation.enable": { params: BluetoothEmulation_EnableParams, result: BluetoothEmulation_EnableResult }, - "BluetoothEmulation.setSimulatedCentralState": { params: BluetoothEmulation_SetSimulatedCentralStateParams, result: BluetoothEmulation_SetSimulatedCentralStateResult }, - "BluetoothEmulation.disable": { params: BluetoothEmulation_DisableParams, result: BluetoothEmulation_DisableResult }, - "BluetoothEmulation.simulatePreconnectedPeripheral": { params: BluetoothEmulation_SimulatePreconnectedPeripheralParams, result: BluetoothEmulation_SimulatePreconnectedPeripheralResult }, - "BluetoothEmulation.simulateAdvertisement": { params: BluetoothEmulation_SimulateAdvertisementParams, result: BluetoothEmulation_SimulateAdvertisementResult }, - "BluetoothEmulation.simulateGATTOperationResponse": { params: BluetoothEmulation_SimulateGATTOperationResponseParams, result: BluetoothEmulation_SimulateGATTOperationResponseResult }, - "BluetoothEmulation.simulateCharacteristicOperationResponse": { params: BluetoothEmulation_SimulateCharacteristicOperationResponseParams, result: BluetoothEmulation_SimulateCharacteristicOperationResponseResult }, - "BluetoothEmulation.simulateDescriptorOperationResponse": { params: BluetoothEmulation_SimulateDescriptorOperationResponseParams, result: BluetoothEmulation_SimulateDescriptorOperationResponseResult }, - "BluetoothEmulation.addService": { params: BluetoothEmulation_AddServiceParams, result: BluetoothEmulation_AddServiceResult }, - "BluetoothEmulation.removeService": { params: BluetoothEmulation_RemoveServiceParams, result: BluetoothEmulation_RemoveServiceResult }, - "BluetoothEmulation.addCharacteristic": { params: BluetoothEmulation_AddCharacteristicParams, result: BluetoothEmulation_AddCharacteristicResult }, - "BluetoothEmulation.removeCharacteristic": { params: BluetoothEmulation_RemoveCharacteristicParams, result: BluetoothEmulation_RemoveCharacteristicResult }, - "BluetoothEmulation.addDescriptor": { params: BluetoothEmulation_AddDescriptorParams, result: BluetoothEmulation_AddDescriptorResult }, - "BluetoothEmulation.removeDescriptor": { params: BluetoothEmulation_RemoveDescriptorParams, result: BluetoothEmulation_RemoveDescriptorResult }, - "BluetoothEmulation.simulateGATTDisconnection": { params: BluetoothEmulation_SimulateGATTDisconnectionParams, result: BluetoothEmulation_SimulateGATTDisconnectionResult }, - "Browser.setPermission": { params: Browser_SetPermissionParams, result: Browser_SetPermissionResult }, - "Browser.grantPermissions": { params: Browser_GrantPermissionsParams, result: Browser_GrantPermissionsResult }, - "Browser.resetPermissions": { params: Browser_ResetPermissionsParams, result: Browser_ResetPermissionsResult }, - "Browser.setDownloadBehavior": { params: Browser_SetDownloadBehaviorParams, result: Browser_SetDownloadBehaviorResult }, - "Browser.cancelDownload": { params: Browser_CancelDownloadParams, result: Browser_CancelDownloadResult }, - "Browser.close": { params: Browser_CloseParams, result: Browser_CloseResult }, - "Browser.crash": { params: Browser_CrashParams, result: Browser_CrashResult }, - "Browser.crashGpuProcess": { params: Browser_CrashGpuProcessParams, result: Browser_CrashGpuProcessResult }, - "Browser.getVersion": { params: Browser_GetVersionParams, result: Browser_GetVersionResult }, - "Browser.getBrowserCommandLine": { params: Browser_GetBrowserCommandLineParams, result: Browser_GetBrowserCommandLineResult }, - "Browser.getHistograms": { params: Browser_GetHistogramsParams, result: Browser_GetHistogramsResult }, - "Browser.getHistogram": { params: Browser_GetHistogramParams, result: Browser_GetHistogramResult }, - "Browser.getWindowBounds": { params: Browser_GetWindowBoundsParams, result: Browser_GetWindowBoundsResult }, - "Browser.getWindowForTarget": { params: Browser_GetWindowForTargetParams, result: Browser_GetWindowForTargetResult }, - "Browser.setWindowBounds": { params: Browser_SetWindowBoundsParams, result: Browser_SetWindowBoundsResult }, - "Browser.setContentsSize": { params: Browser_SetContentsSizeParams, result: Browser_SetContentsSizeResult }, - "Browser.setDockTile": { params: Browser_SetDockTileParams, result: Browser_SetDockTileResult }, - "Browser.executeBrowserCommand": { params: Browser_ExecuteBrowserCommandParams, result: Browser_ExecuteBrowserCommandResult }, - "Browser.addPrivacySandboxEnrollmentOverride": { params: Browser_AddPrivacySandboxEnrollmentOverrideParams, result: Browser_AddPrivacySandboxEnrollmentOverrideResult }, - "Browser.addPrivacySandboxCoordinatorKeyConfig": { params: Browser_AddPrivacySandboxCoordinatorKeyConfigParams, result: Browser_AddPrivacySandboxCoordinatorKeyConfigResult }, - "CacheStorage.deleteCache": { params: CacheStorage_DeleteCacheParams, result: CacheStorage_DeleteCacheResult }, - "CacheStorage.deleteEntry": { params: CacheStorage_DeleteEntryParams, result: CacheStorage_DeleteEntryResult }, - "CacheStorage.requestCacheNames": { params: CacheStorage_RequestCacheNamesParams, result: CacheStorage_RequestCacheNamesResult }, - "CacheStorage.requestCachedResponse": { params: CacheStorage_RequestCachedResponseParams, result: CacheStorage_RequestCachedResponseResult }, - "CacheStorage.requestEntries": { params: CacheStorage_RequestEntriesParams, result: CacheStorage_RequestEntriesResult }, - "Cast.enable": { params: Cast_EnableParams, result: Cast_EnableResult }, - "Cast.disable": { params: Cast_DisableParams, result: Cast_DisableResult }, - "Cast.setSinkToUse": { params: Cast_SetSinkToUseParams, result: Cast_SetSinkToUseResult }, - "Cast.startDesktopMirroring": { params: Cast_StartDesktopMirroringParams, result: Cast_StartDesktopMirroringResult }, - "Cast.startTabMirroring": { params: Cast_StartTabMirroringParams, result: Cast_StartTabMirroringResult }, - "Cast.stopCasting": { params: Cast_StopCastingParams, result: Cast_StopCastingResult }, - "Console.clearMessages": { params: Console_ClearMessagesParams, result: Console_ClearMessagesResult }, - "Console.disable": { params: Console_DisableParams, result: Console_DisableResult }, - "Console.enable": { params: Console_EnableParams, result: Console_EnableResult }, - "CrashReportContext.getEntries": { params: CrashReportContext_GetEntriesParams, result: CrashReportContext_GetEntriesResult }, - "CSS.addRule": { params: CSS_AddRuleParams, result: CSS_AddRuleResult }, - "CSS.collectClassNames": { params: CSS_CollectClassNamesParams, result: CSS_CollectClassNamesResult }, - "CSS.createStyleSheet": { params: CSS_CreateStyleSheetParams, result: CSS_CreateStyleSheetResult }, - "CSS.disable": { params: CSS_DisableParams, result: CSS_DisableResult }, - "CSS.enable": { params: CSS_EnableParams, result: CSS_EnableResult }, - "CSS.forcePseudoState": { params: CSS_ForcePseudoStateParams, result: CSS_ForcePseudoStateResult }, - "CSS.forceStartingStyle": { params: CSS_ForceStartingStyleParams, result: CSS_ForceStartingStyleResult }, - "CSS.getBackgroundColors": { params: CSS_GetBackgroundColorsParams, result: CSS_GetBackgroundColorsResult }, - "CSS.getComputedStyleForNode": { params: CSS_GetComputedStyleForNodeParams, result: CSS_GetComputedStyleForNodeResult }, - "CSS.resolveValues": { params: CSS_ResolveValuesParams, result: CSS_ResolveValuesResult }, - "CSS.getLonghandProperties": { params: CSS_GetLonghandPropertiesParams, result: CSS_GetLonghandPropertiesResult }, - "CSS.getInlineStylesForNode": { params: CSS_GetInlineStylesForNodeParams, result: CSS_GetInlineStylesForNodeResult }, - "CSS.getAnimatedStylesForNode": { params: CSS_GetAnimatedStylesForNodeParams, result: CSS_GetAnimatedStylesForNodeResult }, - "CSS.getMatchedStylesForNode": { params: CSS_GetMatchedStylesForNodeParams, result: CSS_GetMatchedStylesForNodeResult }, - "CSS.getEnvironmentVariables": { params: CSS_GetEnvironmentVariablesParams, result: CSS_GetEnvironmentVariablesResult }, - "CSS.getMediaQueries": { params: CSS_GetMediaQueriesParams, result: CSS_GetMediaQueriesResult }, - "CSS.getPlatformFontsForNode": { params: CSS_GetPlatformFontsForNodeParams, result: CSS_GetPlatformFontsForNodeResult }, - "CSS.getStyleSheetText": { params: CSS_GetStyleSheetTextParams, result: CSS_GetStyleSheetTextResult }, - "CSS.getLayersForNode": { params: CSS_GetLayersForNodeParams, result: CSS_GetLayersForNodeResult }, - "CSS.getLocationForSelector": { params: CSS_GetLocationForSelectorParams, result: CSS_GetLocationForSelectorResult }, - "CSS.trackComputedStyleUpdatesForNode": { params: CSS_TrackComputedStyleUpdatesForNodeParams, result: CSS_TrackComputedStyleUpdatesForNodeResult }, - "CSS.trackComputedStyleUpdates": { params: CSS_TrackComputedStyleUpdatesParams, result: CSS_TrackComputedStyleUpdatesResult }, - "CSS.takeComputedStyleUpdates": { params: CSS_TakeComputedStyleUpdatesParams, result: CSS_TakeComputedStyleUpdatesResult }, - "CSS.setEffectivePropertyValueForNode": { params: CSS_SetEffectivePropertyValueForNodeParams, result: CSS_SetEffectivePropertyValueForNodeResult }, - "CSS.setPropertyRulePropertyName": { params: CSS_SetPropertyRulePropertyNameParams, result: CSS_SetPropertyRulePropertyNameResult }, - "CSS.setKeyframeKey": { params: CSS_SetKeyframeKeyParams, result: CSS_SetKeyframeKeyResult }, - "CSS.setMediaText": { params: CSS_SetMediaTextParams, result: CSS_SetMediaTextResult }, - "CSS.setContainerQueryText": { params: CSS_SetContainerQueryTextParams, result: CSS_SetContainerQueryTextResult }, - "CSS.setSupportsText": { params: CSS_SetSupportsTextParams, result: CSS_SetSupportsTextResult }, - "CSS.setNavigationText": { params: CSS_SetNavigationTextParams, result: CSS_SetNavigationTextResult }, - "CSS.setScopeText": { params: CSS_SetScopeTextParams, result: CSS_SetScopeTextResult }, - "CSS.setRuleSelector": { params: CSS_SetRuleSelectorParams, result: CSS_SetRuleSelectorResult }, - "CSS.setStyleSheetText": { params: CSS_SetStyleSheetTextParams, result: CSS_SetStyleSheetTextResult }, - "CSS.setStyleTexts": { params: CSS_SetStyleTextsParams, result: CSS_SetStyleTextsResult }, - "CSS.startRuleUsageTracking": { params: CSS_StartRuleUsageTrackingParams, result: CSS_StartRuleUsageTrackingResult }, - "CSS.stopRuleUsageTracking": { params: CSS_StopRuleUsageTrackingParams, result: CSS_StopRuleUsageTrackingResult }, - "CSS.takeCoverageDelta": { params: CSS_TakeCoverageDeltaParams, result: CSS_TakeCoverageDeltaResult }, - "CSS.setLocalFontsEnabled": { params: CSS_SetLocalFontsEnabledParams, result: CSS_SetLocalFontsEnabledResult }, - "Debugger.continueToLocation": { params: Debugger_ContinueToLocationParams, result: Debugger_ContinueToLocationResult }, - "Debugger.disable": { params: Debugger_DisableParams, result: Debugger_DisableResult }, - "Debugger.enable": { params: Debugger_EnableParams, result: Debugger_EnableResult }, - "Debugger.evaluateOnCallFrame": { params: Debugger_EvaluateOnCallFrameParams, result: Debugger_EvaluateOnCallFrameResult }, - "Debugger.getPossibleBreakpoints": { params: Debugger_GetPossibleBreakpointsParams, result: Debugger_GetPossibleBreakpointsResult }, - "Debugger.getScriptSource": { params: Debugger_GetScriptSourceParams, result: Debugger_GetScriptSourceResult }, - "Debugger.disassembleWasmModule": { params: Debugger_DisassembleWasmModuleParams, result: Debugger_DisassembleWasmModuleResult }, - "Debugger.nextWasmDisassemblyChunk": { params: Debugger_NextWasmDisassemblyChunkParams, result: Debugger_NextWasmDisassemblyChunkResult }, - "Debugger.getWasmBytecode": { params: Debugger_GetWasmBytecodeParams, result: Debugger_GetWasmBytecodeResult }, - "Debugger.getStackTrace": { params: Debugger_GetStackTraceParams, result: Debugger_GetStackTraceResult }, - "Debugger.pause": { params: Debugger_PauseParams, result: Debugger_PauseResult }, - "Debugger.pauseOnAsyncCall": { params: Debugger_PauseOnAsyncCallParams, result: Debugger_PauseOnAsyncCallResult }, - "Debugger.removeBreakpoint": { params: Debugger_RemoveBreakpointParams, result: Debugger_RemoveBreakpointResult }, - "Debugger.restartFrame": { params: Debugger_RestartFrameParams, result: Debugger_RestartFrameResult }, - "Debugger.resume": { params: Debugger_ResumeParams, result: Debugger_ResumeResult }, - "Debugger.searchInContent": { params: Debugger_SearchInContentParams, result: Debugger_SearchInContentResult }, - "Debugger.setAsyncCallStackDepth": { params: Debugger_SetAsyncCallStackDepthParams, result: Debugger_SetAsyncCallStackDepthResult }, - "Debugger.setBlackboxExecutionContexts": { params: Debugger_SetBlackboxExecutionContextsParams, result: Debugger_SetBlackboxExecutionContextsResult }, - "Debugger.setBlackboxPatterns": { params: Debugger_SetBlackboxPatternsParams, result: Debugger_SetBlackboxPatternsResult }, - "Debugger.setBlackboxedRanges": { params: Debugger_SetBlackboxedRangesParams, result: Debugger_SetBlackboxedRangesResult }, - "Debugger.setBreakpoint": { params: Debugger_SetBreakpointParams, result: Debugger_SetBreakpointResult }, - "Debugger.setInstrumentationBreakpoint": { params: Debugger_SetInstrumentationBreakpointParams, result: Debugger_SetInstrumentationBreakpointResult }, - "Debugger.setBreakpointByUrl": { params: Debugger_SetBreakpointByUrlParams, result: Debugger_SetBreakpointByUrlResult }, - "Debugger.setBreakpointOnFunctionCall": { params: Debugger_SetBreakpointOnFunctionCallParams, result: Debugger_SetBreakpointOnFunctionCallResult }, - "Debugger.setBreakpointsActive": { params: Debugger_SetBreakpointsActiveParams, result: Debugger_SetBreakpointsActiveResult }, - "Debugger.setPauseOnExceptions": { params: Debugger_SetPauseOnExceptionsParams, result: Debugger_SetPauseOnExceptionsResult }, - "Debugger.setReturnValue": { params: Debugger_SetReturnValueParams, result: Debugger_SetReturnValueResult }, - "Debugger.setScriptSource": { params: Debugger_SetScriptSourceParams, result: Debugger_SetScriptSourceResult }, - "Debugger.setSkipAllPauses": { params: Debugger_SetSkipAllPausesParams, result: Debugger_SetSkipAllPausesResult }, - "Debugger.setVariableValue": { params: Debugger_SetVariableValueParams, result: Debugger_SetVariableValueResult }, - "Debugger.stepInto": { params: Debugger_StepIntoParams, result: Debugger_StepIntoResult }, - "Debugger.stepOut": { params: Debugger_StepOutParams, result: Debugger_StepOutResult }, - "Debugger.stepOver": { params: Debugger_StepOverParams, result: Debugger_StepOverResult }, - "DeviceAccess.enable": { params: DeviceAccess_EnableParams, result: DeviceAccess_EnableResult }, - "DeviceAccess.disable": { params: DeviceAccess_DisableParams, result: DeviceAccess_DisableResult }, - "DeviceAccess.selectPrompt": { params: DeviceAccess_SelectPromptParams, result: DeviceAccess_SelectPromptResult }, - "DeviceAccess.cancelPrompt": { params: DeviceAccess_CancelPromptParams, result: DeviceAccess_CancelPromptResult }, - "DeviceOrientation.clearDeviceOrientationOverride": { params: DeviceOrientation_ClearDeviceOrientationOverrideParams, result: DeviceOrientation_ClearDeviceOrientationOverrideResult }, - "DeviceOrientation.setDeviceOrientationOverride": { params: DeviceOrientation_SetDeviceOrientationOverrideParams, result: DeviceOrientation_SetDeviceOrientationOverrideResult }, - "DOM.collectClassNamesFromSubtree": { params: DOM_CollectClassNamesFromSubtreeParams, result: DOM_CollectClassNamesFromSubtreeResult }, - "DOM.copyTo": { params: DOM_CopyToParams, result: DOM_CopyToResult }, - "DOM.describeNode": { params: DOM_DescribeNodeParams, result: DOM_DescribeNodeResult }, - "DOM.scrollIntoViewIfNeeded": { params: DOM_ScrollIntoViewIfNeededParams, result: DOM_ScrollIntoViewIfNeededResult }, - "DOM.disable": { params: DOM_DisableParams, result: DOM_DisableResult }, - "DOM.discardSearchResults": { params: DOM_DiscardSearchResultsParams, result: DOM_DiscardSearchResultsResult }, - "DOM.enable": { params: DOM_EnableParams, result: DOM_EnableResult }, - "DOM.focus": { params: DOM_FocusParams, result: DOM_FocusResult }, - "DOM.getAttributes": { params: DOM_GetAttributesParams, result: DOM_GetAttributesResult }, - "DOM.getBoxModel": { params: DOM_GetBoxModelParams, result: DOM_GetBoxModelResult }, - "DOM.getContentQuads": { params: DOM_GetContentQuadsParams, result: DOM_GetContentQuadsResult }, - "DOM.getDocument": { params: DOM_GetDocumentParams, result: DOM_GetDocumentResult }, - "DOM.getFlattenedDocument": { params: DOM_GetFlattenedDocumentParams, result: DOM_GetFlattenedDocumentResult }, - "DOM.getNodesForSubtreeByStyle": { params: DOM_GetNodesForSubtreeByStyleParams, result: DOM_GetNodesForSubtreeByStyleResult }, - "DOM.getNodeForLocation": { params: DOM_GetNodeForLocationParams, result: DOM_GetNodeForLocationResult }, - "DOM.getOuterHTML": { params: DOM_GetOuterHTMLParams, result: DOM_GetOuterHTMLResult }, - "DOM.getRelayoutBoundary": { params: DOM_GetRelayoutBoundaryParams, result: DOM_GetRelayoutBoundaryResult }, - "DOM.getSearchResults": { params: DOM_GetSearchResultsParams, result: DOM_GetSearchResultsResult }, - "DOM.hideHighlight": { params: DOM_HideHighlightParams, result: DOM_HideHighlightResult }, - "DOM.highlightNode": { params: DOM_HighlightNodeParams, result: DOM_HighlightNodeResult }, - "DOM.highlightRect": { params: DOM_HighlightRectParams, result: DOM_HighlightRectResult }, - "DOM.markUndoableState": { params: DOM_MarkUndoableStateParams, result: DOM_MarkUndoableStateResult }, - "DOM.moveTo": { params: DOM_MoveToParams, result: DOM_MoveToResult }, - "DOM.performSearch": { params: DOM_PerformSearchParams, result: DOM_PerformSearchResult }, - "DOM.pushNodeByPathToFrontend": { params: DOM_PushNodeByPathToFrontendParams, result: DOM_PushNodeByPathToFrontendResult }, - "DOM.pushNodesByBackendIdsToFrontend": { params: DOM_PushNodesByBackendIdsToFrontendParams, result: DOM_PushNodesByBackendIdsToFrontendResult }, - "DOM.querySelector": { params: DOM_QuerySelectorParams, result: DOM_QuerySelectorResult }, - "DOM.querySelectorAll": { params: DOM_QuerySelectorAllParams, result: DOM_QuerySelectorAllResult }, - "DOM.getTopLayerElements": { params: DOM_GetTopLayerElementsParams, result: DOM_GetTopLayerElementsResult }, - "DOM.getElementByRelation": { params: DOM_GetElementByRelationParams, result: DOM_GetElementByRelationResult }, - "DOM.redo": { params: DOM_RedoParams, result: DOM_RedoResult }, - "DOM.removeAttribute": { params: DOM_RemoveAttributeParams, result: DOM_RemoveAttributeResult }, - "DOM.removeNode": { params: DOM_RemoveNodeParams, result: DOM_RemoveNodeResult }, - "DOM.requestChildNodes": { params: DOM_RequestChildNodesParams, result: DOM_RequestChildNodesResult }, - "DOM.requestNode": { params: DOM_RequestNodeParams, result: DOM_RequestNodeResult }, - "DOM.resolveNode": { params: DOM_ResolveNodeParams, result: DOM_ResolveNodeResult }, - "DOM.setAttributeValue": { params: DOM_SetAttributeValueParams, result: DOM_SetAttributeValueResult }, - "DOM.setAttributesAsText": { params: DOM_SetAttributesAsTextParams, result: DOM_SetAttributesAsTextResult }, - "DOM.setFileInputFiles": { params: DOM_SetFileInputFilesParams, result: DOM_SetFileInputFilesResult }, - "DOM.setNodeStackTracesEnabled": { params: DOM_SetNodeStackTracesEnabledParams, result: DOM_SetNodeStackTracesEnabledResult }, - "DOM.getNodeStackTraces": { params: DOM_GetNodeStackTracesParams, result: DOM_GetNodeStackTracesResult }, - "DOM.getFileInfo": { params: DOM_GetFileInfoParams, result: DOM_GetFileInfoResult }, - "DOM.getDetachedDomNodes": { params: DOM_GetDetachedDomNodesParams, result: DOM_GetDetachedDomNodesResult }, - "DOM.setInspectedNode": { params: DOM_SetInspectedNodeParams, result: DOM_SetInspectedNodeResult }, - "DOM.setNodeName": { params: DOM_SetNodeNameParams, result: DOM_SetNodeNameResult }, - "DOM.setNodeValue": { params: DOM_SetNodeValueParams, result: DOM_SetNodeValueResult }, - "DOM.setOuterHTML": { params: DOM_SetOuterHTMLParams, result: DOM_SetOuterHTMLResult }, - "DOM.undo": { params: DOM_UndoParams, result: DOM_UndoResult }, - "DOM.getFrameOwner": { params: DOM_GetFrameOwnerParams, result: DOM_GetFrameOwnerResult }, - "DOM.getContainerForNode": { params: DOM_GetContainerForNodeParams, result: DOM_GetContainerForNodeResult }, - "DOM.getQueryingDescendantsForContainer": { params: DOM_GetQueryingDescendantsForContainerParams, result: DOM_GetQueryingDescendantsForContainerResult }, - "DOM.getAnchorElement": { params: DOM_GetAnchorElementParams, result: DOM_GetAnchorElementResult }, - "DOM.forceShowPopover": { params: DOM_ForceShowPopoverParams, result: DOM_ForceShowPopoverResult }, - "DOMDebugger.getEventListeners": { params: DOMDebugger_GetEventListenersParams, result: DOMDebugger_GetEventListenersResult }, - "DOMDebugger.removeDOMBreakpoint": { params: DOMDebugger_RemoveDOMBreakpointParams, result: DOMDebugger_RemoveDOMBreakpointResult }, - "DOMDebugger.removeEventListenerBreakpoint": { params: DOMDebugger_RemoveEventListenerBreakpointParams, result: DOMDebugger_RemoveEventListenerBreakpointResult }, - "DOMDebugger.removeInstrumentationBreakpoint": { params: DOMDebugger_RemoveInstrumentationBreakpointParams, result: DOMDebugger_RemoveInstrumentationBreakpointResult }, - "DOMDebugger.removeXHRBreakpoint": { params: DOMDebugger_RemoveXHRBreakpointParams, result: DOMDebugger_RemoveXHRBreakpointResult }, - "DOMDebugger.setBreakOnCSPViolation": { params: DOMDebugger_SetBreakOnCSPViolationParams, result: DOMDebugger_SetBreakOnCSPViolationResult }, - "DOMDebugger.setDOMBreakpoint": { params: DOMDebugger_SetDOMBreakpointParams, result: DOMDebugger_SetDOMBreakpointResult }, - "DOMDebugger.setEventListenerBreakpoint": { params: DOMDebugger_SetEventListenerBreakpointParams, result: DOMDebugger_SetEventListenerBreakpointResult }, - "DOMDebugger.setInstrumentationBreakpoint": { params: DOMDebugger_SetInstrumentationBreakpointParams, result: DOMDebugger_SetInstrumentationBreakpointResult }, - "DOMDebugger.setXHRBreakpoint": { params: DOMDebugger_SetXHRBreakpointParams, result: DOMDebugger_SetXHRBreakpointResult }, - "DOMSnapshot.disable": { params: DOMSnapshot_DisableParams, result: DOMSnapshot_DisableResult }, - "DOMSnapshot.enable": { params: DOMSnapshot_EnableParams, result: DOMSnapshot_EnableResult }, - "DOMSnapshot.getSnapshot": { params: DOMSnapshot_GetSnapshotParams, result: DOMSnapshot_GetSnapshotResult }, - "DOMSnapshot.captureSnapshot": { params: DOMSnapshot_CaptureSnapshotParams, result: DOMSnapshot_CaptureSnapshotResult }, - "DOMStorage.clear": { params: DOMStorage_ClearParams, result: DOMStorage_ClearResult }, - "DOMStorage.disable": { params: DOMStorage_DisableParams, result: DOMStorage_DisableResult }, - "DOMStorage.enable": { params: DOMStorage_EnableParams, result: DOMStorage_EnableResult }, - "DOMStorage.getDOMStorageItems": { params: DOMStorage_GetDOMStorageItemsParams, result: DOMStorage_GetDOMStorageItemsResult }, - "DOMStorage.removeDOMStorageItem": { params: DOMStorage_RemoveDOMStorageItemParams, result: DOMStorage_RemoveDOMStorageItemResult }, - "DOMStorage.setDOMStorageItem": { params: DOMStorage_SetDOMStorageItemParams, result: DOMStorage_SetDOMStorageItemResult }, - "Emulation.canEmulate": { params: Emulation_CanEmulateParams, result: Emulation_CanEmulateResult }, - "Emulation.clearDeviceMetricsOverride": { params: Emulation_ClearDeviceMetricsOverrideParams, result: Emulation_ClearDeviceMetricsOverrideResult }, - "Emulation.clearGeolocationOverride": { params: Emulation_ClearGeolocationOverrideParams, result: Emulation_ClearGeolocationOverrideResult }, - "Emulation.resetPageScaleFactor": { params: Emulation_ResetPageScaleFactorParams, result: Emulation_ResetPageScaleFactorResult }, - "Emulation.setFocusEmulationEnabled": { params: Emulation_SetFocusEmulationEnabledParams, result: Emulation_SetFocusEmulationEnabledResult }, - "Emulation.setAutoDarkModeOverride": { params: Emulation_SetAutoDarkModeOverrideParams, result: Emulation_SetAutoDarkModeOverrideResult }, - "Emulation.setCPUThrottlingRate": { params: Emulation_SetCPUThrottlingRateParams, result: Emulation_SetCPUThrottlingRateResult }, - "Emulation.setDefaultBackgroundColorOverride": { params: Emulation_SetDefaultBackgroundColorOverrideParams, result: Emulation_SetDefaultBackgroundColorOverrideResult }, - "Emulation.setSafeAreaInsetsOverride": { params: Emulation_SetSafeAreaInsetsOverrideParams, result: Emulation_SetSafeAreaInsetsOverrideResult }, - "Emulation.setDeviceMetricsOverride": { params: Emulation_SetDeviceMetricsOverrideParams, result: Emulation_SetDeviceMetricsOverrideResult }, - "Emulation.setDevicePostureOverride": { params: Emulation_SetDevicePostureOverrideParams, result: Emulation_SetDevicePostureOverrideResult }, - "Emulation.clearDevicePostureOverride": { params: Emulation_ClearDevicePostureOverrideParams, result: Emulation_ClearDevicePostureOverrideResult }, - "Emulation.setDisplayFeaturesOverride": { params: Emulation_SetDisplayFeaturesOverrideParams, result: Emulation_SetDisplayFeaturesOverrideResult }, - "Emulation.clearDisplayFeaturesOverride": { params: Emulation_ClearDisplayFeaturesOverrideParams, result: Emulation_ClearDisplayFeaturesOverrideResult }, - "Emulation.setScrollbarsHidden": { params: Emulation_SetScrollbarsHiddenParams, result: Emulation_SetScrollbarsHiddenResult }, - "Emulation.setDocumentCookieDisabled": { params: Emulation_SetDocumentCookieDisabledParams, result: Emulation_SetDocumentCookieDisabledResult }, - "Emulation.setEmitTouchEventsForMouse": { params: Emulation_SetEmitTouchEventsForMouseParams, result: Emulation_SetEmitTouchEventsForMouseResult }, - "Emulation.setEmulatedMedia": { params: Emulation_SetEmulatedMediaParams, result: Emulation_SetEmulatedMediaResult }, - "Emulation.setEmulatedVisionDeficiency": { params: Emulation_SetEmulatedVisionDeficiencyParams, result: Emulation_SetEmulatedVisionDeficiencyResult }, - "Emulation.setEmulatedOSTextScale": { params: Emulation_SetEmulatedOSTextScaleParams, result: Emulation_SetEmulatedOSTextScaleResult }, - "Emulation.setGeolocationOverride": { params: Emulation_SetGeolocationOverrideParams, result: Emulation_SetGeolocationOverrideResult }, - "Emulation.getOverriddenSensorInformation": { params: Emulation_GetOverriddenSensorInformationParams, result: Emulation_GetOverriddenSensorInformationResult }, - "Emulation.setSensorOverrideEnabled": { params: Emulation_SetSensorOverrideEnabledParams, result: Emulation_SetSensorOverrideEnabledResult }, - "Emulation.setSensorOverrideReadings": { params: Emulation_SetSensorOverrideReadingsParams, result: Emulation_SetSensorOverrideReadingsResult }, - "Emulation.setPressureSourceOverrideEnabled": { params: Emulation_SetPressureSourceOverrideEnabledParams, result: Emulation_SetPressureSourceOverrideEnabledResult }, - "Emulation.setPressureStateOverride": { params: Emulation_SetPressureStateOverrideParams, result: Emulation_SetPressureStateOverrideResult }, - "Emulation.setPressureDataOverride": { params: Emulation_SetPressureDataOverrideParams, result: Emulation_SetPressureDataOverrideResult }, - "Emulation.setIdleOverride": { params: Emulation_SetIdleOverrideParams, result: Emulation_SetIdleOverrideResult }, - "Emulation.clearIdleOverride": { params: Emulation_ClearIdleOverrideParams, result: Emulation_ClearIdleOverrideResult }, - "Emulation.setNavigatorOverrides": { params: Emulation_SetNavigatorOverridesParams, result: Emulation_SetNavigatorOverridesResult }, - "Emulation.setPageScaleFactor": { params: Emulation_SetPageScaleFactorParams, result: Emulation_SetPageScaleFactorResult }, - "Emulation.setScriptExecutionDisabled": { params: Emulation_SetScriptExecutionDisabledParams, result: Emulation_SetScriptExecutionDisabledResult }, - "Emulation.setTouchEmulationEnabled": { params: Emulation_SetTouchEmulationEnabledParams, result: Emulation_SetTouchEmulationEnabledResult }, - "Emulation.setVirtualTimePolicy": { params: Emulation_SetVirtualTimePolicyParams, result: Emulation_SetVirtualTimePolicyResult }, - "Emulation.setLocaleOverride": { params: Emulation_SetLocaleOverrideParams, result: Emulation_SetLocaleOverrideResult }, - "Emulation.setTimezoneOverride": { params: Emulation_SetTimezoneOverrideParams, result: Emulation_SetTimezoneOverrideResult }, - "Emulation.setVisibleSize": { params: Emulation_SetVisibleSizeParams, result: Emulation_SetVisibleSizeResult }, - "Emulation.setDisabledImageTypes": { params: Emulation_SetDisabledImageTypesParams, result: Emulation_SetDisabledImageTypesResult }, - "Emulation.setDataSaverOverride": { params: Emulation_SetDataSaverOverrideParams, result: Emulation_SetDataSaverOverrideResult }, - "Emulation.setHardwareConcurrencyOverride": { params: Emulation_SetHardwareConcurrencyOverrideParams, result: Emulation_SetHardwareConcurrencyOverrideResult }, - "Emulation.setUserAgentOverride": { params: Emulation_SetUserAgentOverrideParams, result: Emulation_SetUserAgentOverrideResult }, - "Emulation.setAutomationOverride": { params: Emulation_SetAutomationOverrideParams, result: Emulation_SetAutomationOverrideResult }, - "Emulation.setSmallViewportHeightDifferenceOverride": { params: Emulation_SetSmallViewportHeightDifferenceOverrideParams, result: Emulation_SetSmallViewportHeightDifferenceOverrideResult }, - "Emulation.getScreenInfos": { params: Emulation_GetScreenInfosParams, result: Emulation_GetScreenInfosResult }, - "Emulation.addScreen": { params: Emulation_AddScreenParams, result: Emulation_AddScreenResult }, - "Emulation.updateScreen": { params: Emulation_UpdateScreenParams, result: Emulation_UpdateScreenResult }, - "Emulation.removeScreen": { params: Emulation_RemoveScreenParams, result: Emulation_RemoveScreenResult }, - "Emulation.setPrimaryScreen": { params: Emulation_SetPrimaryScreenParams, result: Emulation_SetPrimaryScreenResult }, - "EventBreakpoints.setInstrumentationBreakpoint": { params: EventBreakpoints_SetInstrumentationBreakpointParams, result: EventBreakpoints_SetInstrumentationBreakpointResult }, - "EventBreakpoints.removeInstrumentationBreakpoint": { params: EventBreakpoints_RemoveInstrumentationBreakpointParams, result: EventBreakpoints_RemoveInstrumentationBreakpointResult }, - "EventBreakpoints.disable": { params: EventBreakpoints_DisableParams, result: EventBreakpoints_DisableResult }, - "Extensions.triggerAction": { params: Extensions_TriggerActionParams, result: Extensions_TriggerActionResult }, - "Extensions.loadUnpacked": { params: Extensions_LoadUnpackedParams, result: Extensions_LoadUnpackedResult }, - "Extensions.getExtensions": { params: Extensions_GetExtensionsParams, result: Extensions_GetExtensionsResult }, - "Extensions.uninstall": { params: Extensions_UninstallParams, result: Extensions_UninstallResult }, - "Extensions.getStorageItems": { params: Extensions_GetStorageItemsParams, result: Extensions_GetStorageItemsResult }, - "Extensions.removeStorageItems": { params: Extensions_RemoveStorageItemsParams, result: Extensions_RemoveStorageItemsResult }, - "Extensions.clearStorageItems": { params: Extensions_ClearStorageItemsParams, result: Extensions_ClearStorageItemsResult }, - "Extensions.setStorageItems": { params: Extensions_SetStorageItemsParams, result: Extensions_SetStorageItemsResult }, - "FedCm.enable": { params: FedCm_EnableParams, result: FedCm_EnableResult }, - "FedCm.disable": { params: FedCm_DisableParams, result: FedCm_DisableResult }, - "FedCm.selectAccount": { params: FedCm_SelectAccountParams, result: FedCm_SelectAccountResult }, - "FedCm.clickDialogButton": { params: FedCm_ClickDialogButtonParams, result: FedCm_ClickDialogButtonResult }, - "FedCm.openUrl": { params: FedCm_OpenUrlParams, result: FedCm_OpenUrlResult }, - "FedCm.dismissDialog": { params: FedCm_DismissDialogParams, result: FedCm_DismissDialogResult }, - "FedCm.resetCooldown": { params: FedCm_ResetCooldownParams, result: FedCm_ResetCooldownResult }, - "Fetch.disable": { params: Fetch_DisableParams, result: Fetch_DisableResult }, - "Fetch.enable": { params: Fetch_EnableParams, result: Fetch_EnableResult }, - "Fetch.failRequest": { params: Fetch_FailRequestParams, result: Fetch_FailRequestResult }, - "Fetch.fulfillRequest": { params: Fetch_FulfillRequestParams, result: Fetch_FulfillRequestResult }, - "Fetch.continueRequest": { params: Fetch_ContinueRequestParams, result: Fetch_ContinueRequestResult }, - "Fetch.continueWithAuth": { params: Fetch_ContinueWithAuthParams, result: Fetch_ContinueWithAuthResult }, - "Fetch.continueResponse": { params: Fetch_ContinueResponseParams, result: Fetch_ContinueResponseResult }, - "Fetch.getResponseBody": { params: Fetch_GetResponseBodyParams, result: Fetch_GetResponseBodyResult }, - "Fetch.takeResponseBodyAsStream": { params: Fetch_TakeResponseBodyAsStreamParams, result: Fetch_TakeResponseBodyAsStreamResult }, - "FileSystem.getDirectory": { params: FileSystem_GetDirectoryParams, result: FileSystem_GetDirectoryResult }, - "HeadlessExperimental.beginFrame": { params: HeadlessExperimental_BeginFrameParams, result: HeadlessExperimental_BeginFrameResult }, - "HeadlessExperimental.disable": { params: HeadlessExperimental_DisableParams, result: HeadlessExperimental_DisableResult }, - "HeadlessExperimental.enable": { params: HeadlessExperimental_EnableParams, result: HeadlessExperimental_EnableResult }, - "HeapProfiler.addInspectedHeapObject": { params: HeapProfiler_AddInspectedHeapObjectParams, result: HeapProfiler_AddInspectedHeapObjectResult }, - "HeapProfiler.collectGarbage": { params: HeapProfiler_CollectGarbageParams, result: HeapProfiler_CollectGarbageResult }, - "HeapProfiler.disable": { params: HeapProfiler_DisableParams, result: HeapProfiler_DisableResult }, - "HeapProfiler.enable": { params: HeapProfiler_EnableParams, result: HeapProfiler_EnableResult }, - "HeapProfiler.getHeapObjectId": { params: HeapProfiler_GetHeapObjectIdParams, result: HeapProfiler_GetHeapObjectIdResult }, - "HeapProfiler.getObjectByHeapObjectId": { params: HeapProfiler_GetObjectByHeapObjectIdParams, result: HeapProfiler_GetObjectByHeapObjectIdResult }, - "HeapProfiler.getSamplingProfile": { params: HeapProfiler_GetSamplingProfileParams, result: HeapProfiler_GetSamplingProfileResult }, - "HeapProfiler.startSampling": { params: HeapProfiler_StartSamplingParams, result: HeapProfiler_StartSamplingResult }, - "HeapProfiler.startTrackingHeapObjects": { params: HeapProfiler_StartTrackingHeapObjectsParams, result: HeapProfiler_StartTrackingHeapObjectsResult }, - "HeapProfiler.stopSampling": { params: HeapProfiler_StopSamplingParams, result: HeapProfiler_StopSamplingResult }, - "HeapProfiler.stopTrackingHeapObjects": { params: HeapProfiler_StopTrackingHeapObjectsParams, result: HeapProfiler_StopTrackingHeapObjectsResult }, - "HeapProfiler.takeHeapSnapshot": { params: HeapProfiler_TakeHeapSnapshotParams, result: HeapProfiler_TakeHeapSnapshotResult }, - "IndexedDB.clearObjectStore": { params: IndexedDB_ClearObjectStoreParams, result: IndexedDB_ClearObjectStoreResult }, - "IndexedDB.deleteDatabase": { params: IndexedDB_DeleteDatabaseParams, result: IndexedDB_DeleteDatabaseResult }, - "IndexedDB.deleteObjectStoreEntries": { params: IndexedDB_DeleteObjectStoreEntriesParams, result: IndexedDB_DeleteObjectStoreEntriesResult }, - "IndexedDB.disable": { params: IndexedDB_DisableParams, result: IndexedDB_DisableResult }, - "IndexedDB.enable": { params: IndexedDB_EnableParams, result: IndexedDB_EnableResult }, - "IndexedDB.requestData": { params: IndexedDB_RequestDataParams, result: IndexedDB_RequestDataResult }, - "IndexedDB.getMetadata": { params: IndexedDB_GetMetadataParams, result: IndexedDB_GetMetadataResult }, - "IndexedDB.requestDatabase": { params: IndexedDB_RequestDatabaseParams, result: IndexedDB_RequestDatabaseResult }, - "IndexedDB.requestDatabaseNames": { params: IndexedDB_RequestDatabaseNamesParams, result: IndexedDB_RequestDatabaseNamesResult }, - "Input.dispatchDragEvent": { params: Input_DispatchDragEventParams, result: Input_DispatchDragEventResult }, - "Input.dispatchKeyEvent": { params: Input_DispatchKeyEventParams, result: Input_DispatchKeyEventResult }, - "Input.insertText": { params: Input_InsertTextParams, result: Input_InsertTextResult }, - "Input.imeSetComposition": { params: Input_ImeSetCompositionParams, result: Input_ImeSetCompositionResult }, - "Input.dispatchMouseEvent": { params: Input_DispatchMouseEventParams, result: Input_DispatchMouseEventResult }, - "Input.dispatchTouchEvent": { params: Input_DispatchTouchEventParams, result: Input_DispatchTouchEventResult }, - "Input.cancelDragging": { params: Input_CancelDraggingParams, result: Input_CancelDraggingResult }, - "Input.emulateTouchFromMouseEvent": { params: Input_EmulateTouchFromMouseEventParams, result: Input_EmulateTouchFromMouseEventResult }, - "Input.setIgnoreInputEvents": { params: Input_SetIgnoreInputEventsParams, result: Input_SetIgnoreInputEventsResult }, - "Input.setInterceptDrags": { params: Input_SetInterceptDragsParams, result: Input_SetInterceptDragsResult }, - "Input.synthesizePinchGesture": { params: Input_SynthesizePinchGestureParams, result: Input_SynthesizePinchGestureResult }, - "Input.synthesizeScrollGesture": { params: Input_SynthesizeScrollGestureParams, result: Input_SynthesizeScrollGestureResult }, - "Input.synthesizeTapGesture": { params: Input_SynthesizeTapGestureParams, result: Input_SynthesizeTapGestureResult }, - "Inspector.disable": { params: Inspector_DisableParams, result: Inspector_DisableResult }, - "Inspector.enable": { params: Inspector_EnableParams, result: Inspector_EnableResult }, - "IO.close": { params: IO_CloseParams, result: IO_CloseResult }, - "IO.read": { params: IO_ReadParams, result: IO_ReadResult }, - "IO.resolveBlob": { params: IO_ResolveBlobParams, result: IO_ResolveBlobResult }, - "LayerTree.compositingReasons": { params: LayerTree_CompositingReasonsParams, result: LayerTree_CompositingReasonsResult }, - "LayerTree.disable": { params: LayerTree_DisableParams, result: LayerTree_DisableResult }, - "LayerTree.enable": { params: LayerTree_EnableParams, result: LayerTree_EnableResult }, - "LayerTree.loadSnapshot": { params: LayerTree_LoadSnapshotParams, result: LayerTree_LoadSnapshotResult }, - "LayerTree.makeSnapshot": { params: LayerTree_MakeSnapshotParams, result: LayerTree_MakeSnapshotResult }, - "LayerTree.profileSnapshot": { params: LayerTree_ProfileSnapshotParams, result: LayerTree_ProfileSnapshotResult }, - "LayerTree.releaseSnapshot": { params: LayerTree_ReleaseSnapshotParams, result: LayerTree_ReleaseSnapshotResult }, - "LayerTree.replaySnapshot": { params: LayerTree_ReplaySnapshotParams, result: LayerTree_ReplaySnapshotResult }, - "LayerTree.snapshotCommandLog": { params: LayerTree_SnapshotCommandLogParams, result: LayerTree_SnapshotCommandLogResult }, - "Log.clear": { params: Log_ClearParams, result: Log_ClearResult }, - "Log.disable": { params: Log_DisableParams, result: Log_DisableResult }, - "Log.enable": { params: Log_EnableParams, result: Log_EnableResult }, - "Log.startViolationsReport": { params: Log_StartViolationsReportParams, result: Log_StartViolationsReportResult }, - "Log.stopViolationsReport": { params: Log_StopViolationsReportParams, result: Log_StopViolationsReportResult }, - "Media.enable": { params: Media_EnableParams, result: Media_EnableResult }, - "Media.disable": { params: Media_DisableParams, result: Media_DisableResult }, - "Memory.getDOMCounters": { params: Memory_GetDOMCountersParams, result: Memory_GetDOMCountersResult }, - "Memory.getDOMCountersForLeakDetection": { params: Memory_GetDOMCountersForLeakDetectionParams, result: Memory_GetDOMCountersForLeakDetectionResult }, - "Memory.prepareForLeakDetection": { params: Memory_PrepareForLeakDetectionParams, result: Memory_PrepareForLeakDetectionResult }, - "Memory.forciblyPurgeJavaScriptMemory": { params: Memory_ForciblyPurgeJavaScriptMemoryParams, result: Memory_ForciblyPurgeJavaScriptMemoryResult }, - "Memory.setPressureNotificationsSuppressed": { params: Memory_SetPressureNotificationsSuppressedParams, result: Memory_SetPressureNotificationsSuppressedResult }, - "Memory.simulatePressureNotification": { params: Memory_SimulatePressureNotificationParams, result: Memory_SimulatePressureNotificationResult }, - "Memory.startSampling": { params: Memory_StartSamplingParams, result: Memory_StartSamplingResult }, - "Memory.stopSampling": { params: Memory_StopSamplingParams, result: Memory_StopSamplingResult }, - "Memory.getAllTimeSamplingProfile": { params: Memory_GetAllTimeSamplingProfileParams, result: Memory_GetAllTimeSamplingProfileResult }, - "Memory.getBrowserSamplingProfile": { params: Memory_GetBrowserSamplingProfileParams, result: Memory_GetBrowserSamplingProfileResult }, - "Memory.getSamplingProfile": { params: Memory_GetSamplingProfileParams, result: Memory_GetSamplingProfileResult }, - "Network.setAcceptedEncodings": { params: Network_SetAcceptedEncodingsParams, result: Network_SetAcceptedEncodingsResult }, - "Network.clearAcceptedEncodingsOverride": { params: Network_ClearAcceptedEncodingsOverrideParams, result: Network_ClearAcceptedEncodingsOverrideResult }, - "Network.canClearBrowserCache": { params: Network_CanClearBrowserCacheParams, result: Network_CanClearBrowserCacheResult }, - "Network.canClearBrowserCookies": { params: Network_CanClearBrowserCookiesParams, result: Network_CanClearBrowserCookiesResult }, - "Network.canEmulateNetworkConditions": { params: Network_CanEmulateNetworkConditionsParams, result: Network_CanEmulateNetworkConditionsResult }, - "Network.clearBrowserCache": { params: Network_ClearBrowserCacheParams, result: Network_ClearBrowserCacheResult }, - "Network.clearBrowserCookies": { params: Network_ClearBrowserCookiesParams, result: Network_ClearBrowserCookiesResult }, - "Network.continueInterceptedRequest": { params: Network_ContinueInterceptedRequestParams, result: Network_ContinueInterceptedRequestResult }, - "Network.deleteCookies": { params: Network_DeleteCookiesParams, result: Network_DeleteCookiesResult }, - "Network.disable": { params: Network_DisableParams, result: Network_DisableResult }, - "Network.emulateNetworkConditions": { params: Network_EmulateNetworkConditionsParams, result: Network_EmulateNetworkConditionsResult }, - "Network.emulateNetworkConditionsByRule": { params: Network_EmulateNetworkConditionsByRuleParams, result: Network_EmulateNetworkConditionsByRuleResult }, - "Network.overrideNetworkState": { params: Network_OverrideNetworkStateParams, result: Network_OverrideNetworkStateResult }, - "Network.enable": { params: Network_EnableParams, result: Network_EnableResult }, - "Network.configureDurableMessages": { params: Network_ConfigureDurableMessagesParams, result: Network_ConfigureDurableMessagesResult }, - "Network.getAllCookies": { params: Network_GetAllCookiesParams, result: Network_GetAllCookiesResult }, - "Network.getCertificate": { params: Network_GetCertificateParams, result: Network_GetCertificateResult }, - "Network.getCookies": { params: Network_GetCookiesParams, result: Network_GetCookiesResult }, - "Network.getResponseBody": { params: Network_GetResponseBodyParams, result: Network_GetResponseBodyResult }, - "Network.getRequestPostData": { params: Network_GetRequestPostDataParams, result: Network_GetRequestPostDataResult }, - "Network.getResponseBodyForInterception": { params: Network_GetResponseBodyForInterceptionParams, result: Network_GetResponseBodyForInterceptionResult }, - "Network.takeResponseBodyForInterceptionAsStream": { params: Network_TakeResponseBodyForInterceptionAsStreamParams, result: Network_TakeResponseBodyForInterceptionAsStreamResult }, - "Network.replayXHR": { params: Network_ReplayXHRParams, result: Network_ReplayXHRResult }, - "Network.searchInResponseBody": { params: Network_SearchInResponseBodyParams, result: Network_SearchInResponseBodyResult }, - "Network.setBlockedURLs": { params: Network_SetBlockedURLsParams, result: Network_SetBlockedURLsResult }, - "Network.setBypassServiceWorker": { params: Network_SetBypassServiceWorkerParams, result: Network_SetBypassServiceWorkerResult }, - "Network.setCacheDisabled": { params: Network_SetCacheDisabledParams, result: Network_SetCacheDisabledResult }, - "Network.setCookie": { params: Network_SetCookieParams, result: Network_SetCookieResult }, - "Network.setCookies": { params: Network_SetCookiesParams, result: Network_SetCookiesResult }, - "Network.setExtraHTTPHeaders": { params: Network_SetExtraHTTPHeadersParams, result: Network_SetExtraHTTPHeadersResult }, - "Network.setAttachDebugStack": { params: Network_SetAttachDebugStackParams, result: Network_SetAttachDebugStackResult }, - "Network.setRequestInterception": { params: Network_SetRequestInterceptionParams, result: Network_SetRequestInterceptionResult }, - "Network.setUserAgentOverride": { params: Network_SetUserAgentOverrideParams, result: Network_SetUserAgentOverrideResult }, - "Network.streamResourceContent": { params: Network_StreamResourceContentParams, result: Network_StreamResourceContentResult }, - "Network.getSecurityIsolationStatus": { params: Network_GetSecurityIsolationStatusParams, result: Network_GetSecurityIsolationStatusResult }, - "Network.enableReportingApi": { params: Network_EnableReportingApiParams, result: Network_EnableReportingApiResult }, - "Network.enableDeviceBoundSessions": { params: Network_EnableDeviceBoundSessionsParams, result: Network_EnableDeviceBoundSessionsResult }, - "Network.deleteDeviceBoundSession": { params: Network_DeleteDeviceBoundSessionParams, result: Network_DeleteDeviceBoundSessionResult }, - "Network.fetchSchemefulSite": { params: Network_FetchSchemefulSiteParams, result: Network_FetchSchemefulSiteResult }, - "Network.loadNetworkResource": { params: Network_LoadNetworkResourceParams, result: Network_LoadNetworkResourceResult }, - "Network.setCookieControls": { params: Network_SetCookieControlsParams, result: Network_SetCookieControlsResult }, - "Overlay.disable": { params: Overlay_DisableParams, result: Overlay_DisableResult }, - "Overlay.enable": { params: Overlay_EnableParams, result: Overlay_EnableResult }, - "Overlay.getHighlightObjectForTest": { params: Overlay_GetHighlightObjectForTestParams, result: Overlay_GetHighlightObjectForTestResult }, - "Overlay.getGridHighlightObjectsForTest": { params: Overlay_GetGridHighlightObjectsForTestParams, result: Overlay_GetGridHighlightObjectsForTestResult }, - "Overlay.getSourceOrderHighlightObjectForTest": { params: Overlay_GetSourceOrderHighlightObjectForTestParams, result: Overlay_GetSourceOrderHighlightObjectForTestResult }, - "Overlay.hideHighlight": { params: Overlay_HideHighlightParams, result: Overlay_HideHighlightResult }, - "Overlay.highlightFrame": { params: Overlay_HighlightFrameParams, result: Overlay_HighlightFrameResult }, - "Overlay.highlightNode": { params: Overlay_HighlightNodeParams, result: Overlay_HighlightNodeResult }, - "Overlay.highlightQuad": { params: Overlay_HighlightQuadParams, result: Overlay_HighlightQuadResult }, - "Overlay.highlightRect": { params: Overlay_HighlightRectParams, result: Overlay_HighlightRectResult }, - "Overlay.highlightSourceOrder": { params: Overlay_HighlightSourceOrderParams, result: Overlay_HighlightSourceOrderResult }, - "Overlay.setInspectMode": { params: Overlay_SetInspectModeParams, result: Overlay_SetInspectModeResult }, - "Overlay.setShowAdHighlights": { params: Overlay_SetShowAdHighlightsParams, result: Overlay_SetShowAdHighlightsResult }, - "Overlay.setPausedInDebuggerMessage": { params: Overlay_SetPausedInDebuggerMessageParams, result: Overlay_SetPausedInDebuggerMessageResult }, - "Overlay.setShowDebugBorders": { params: Overlay_SetShowDebugBordersParams, result: Overlay_SetShowDebugBordersResult }, - "Overlay.setShowFPSCounter": { params: Overlay_SetShowFPSCounterParams, result: Overlay_SetShowFPSCounterResult }, - "Overlay.setShowGridOverlays": { params: Overlay_SetShowGridOverlaysParams, result: Overlay_SetShowGridOverlaysResult }, - "Overlay.setShowFlexOverlays": { params: Overlay_SetShowFlexOverlaysParams, result: Overlay_SetShowFlexOverlaysResult }, - "Overlay.setShowScrollSnapOverlays": { params: Overlay_SetShowScrollSnapOverlaysParams, result: Overlay_SetShowScrollSnapOverlaysResult }, - "Overlay.setShowContainerQueryOverlays": { params: Overlay_SetShowContainerQueryOverlaysParams, result: Overlay_SetShowContainerQueryOverlaysResult }, - "Overlay.setShowInspectedElementAnchor": { params: Overlay_SetShowInspectedElementAnchorParams, result: Overlay_SetShowInspectedElementAnchorResult }, - "Overlay.setShowPaintRects": { params: Overlay_SetShowPaintRectsParams, result: Overlay_SetShowPaintRectsResult }, - "Overlay.setShowLayoutShiftRegions": { params: Overlay_SetShowLayoutShiftRegionsParams, result: Overlay_SetShowLayoutShiftRegionsResult }, - "Overlay.setShowScrollBottleneckRects": { params: Overlay_SetShowScrollBottleneckRectsParams, result: Overlay_SetShowScrollBottleneckRectsResult }, - "Overlay.setShowHitTestBorders": { params: Overlay_SetShowHitTestBordersParams, result: Overlay_SetShowHitTestBordersResult }, - "Overlay.setShowWebVitals": { params: Overlay_SetShowWebVitalsParams, result: Overlay_SetShowWebVitalsResult }, - "Overlay.setShowViewportSizeOnResize": { params: Overlay_SetShowViewportSizeOnResizeParams, result: Overlay_SetShowViewportSizeOnResizeResult }, - "Overlay.setShowHinge": { params: Overlay_SetShowHingeParams, result: Overlay_SetShowHingeResult }, - "Overlay.setShowIsolatedElements": { params: Overlay_SetShowIsolatedElementsParams, result: Overlay_SetShowIsolatedElementsResult }, - "Overlay.setShowWindowControlsOverlay": { params: Overlay_SetShowWindowControlsOverlayParams, result: Overlay_SetShowWindowControlsOverlayResult }, - "Page.addScriptToEvaluateOnLoad": { params: Page_AddScriptToEvaluateOnLoadParams, result: Page_AddScriptToEvaluateOnLoadResult }, - "Page.addScriptToEvaluateOnNewDocument": { params: Page_AddScriptToEvaluateOnNewDocumentParams, result: Page_AddScriptToEvaluateOnNewDocumentResult }, - "Page.bringToFront": { params: Page_BringToFrontParams, result: Page_BringToFrontResult }, - "Page.captureScreenshot": { params: Page_CaptureScreenshotParams, result: Page_CaptureScreenshotResult }, - "Page.captureSnapshot": { params: Page_CaptureSnapshotParams, result: Page_CaptureSnapshotResult }, - "Page.clearDeviceMetricsOverride": { params: Page_ClearDeviceMetricsOverrideParams, result: Page_ClearDeviceMetricsOverrideResult }, - "Page.clearDeviceOrientationOverride": { params: Page_ClearDeviceOrientationOverrideParams, result: Page_ClearDeviceOrientationOverrideResult }, - "Page.clearGeolocationOverride": { params: Page_ClearGeolocationOverrideParams, result: Page_ClearGeolocationOverrideResult }, - "Page.createIsolatedWorld": { params: Page_CreateIsolatedWorldParams, result: Page_CreateIsolatedWorldResult }, - "Page.deleteCookie": { params: Page_DeleteCookieParams, result: Page_DeleteCookieResult }, - "Page.disable": { params: Page_DisableParams, result: Page_DisableResult }, - "Page.enable": { params: Page_EnableParams, result: Page_EnableResult }, - "Page.getAppManifest": { params: Page_GetAppManifestParams, result: Page_GetAppManifestResult }, - "Page.getInstallabilityErrors": { params: Page_GetInstallabilityErrorsParams, result: Page_GetInstallabilityErrorsResult }, - "Page.getManifestIcons": { params: Page_GetManifestIconsParams, result: Page_GetManifestIconsResult }, - "Page.getAppId": { params: Page_GetAppIdParams, result: Page_GetAppIdResult }, - "Page.getAdScriptAncestry": { params: Page_GetAdScriptAncestryParams, result: Page_GetAdScriptAncestryResult }, - "Page.getFrameTree": { params: Page_GetFrameTreeParams, result: Page_GetFrameTreeResult }, - "Page.getLayoutMetrics": { params: Page_GetLayoutMetricsParams, result: Page_GetLayoutMetricsResult }, - "Page.getNavigationHistory": { params: Page_GetNavigationHistoryParams, result: Page_GetNavigationHistoryResult }, - "Page.resetNavigationHistory": { params: Page_ResetNavigationHistoryParams, result: Page_ResetNavigationHistoryResult }, - "Page.getResourceContent": { params: Page_GetResourceContentParams, result: Page_GetResourceContentResult }, - "Page.getResourceTree": { params: Page_GetResourceTreeParams, result: Page_GetResourceTreeResult }, - "Page.handleJavaScriptDialog": { params: Page_HandleJavaScriptDialogParams, result: Page_HandleJavaScriptDialogResult }, - "Page.navigate": { params: Page_NavigateParams, result: Page_NavigateResult }, - "Page.navigateToHistoryEntry": { params: Page_NavigateToHistoryEntryParams, result: Page_NavigateToHistoryEntryResult }, - "Page.printToPDF": { params: Page_PrintToPDFParams, result: Page_PrintToPDFResult }, - "Page.reload": { params: Page_ReloadParams, result: Page_ReloadResult }, - "Page.removeScriptToEvaluateOnLoad": { params: Page_RemoveScriptToEvaluateOnLoadParams, result: Page_RemoveScriptToEvaluateOnLoadResult }, - "Page.removeScriptToEvaluateOnNewDocument": { params: Page_RemoveScriptToEvaluateOnNewDocumentParams, result: Page_RemoveScriptToEvaluateOnNewDocumentResult }, - "Page.screencastFrameAck": { params: Page_ScreencastFrameAckParams, result: Page_ScreencastFrameAckResult }, - "Page.searchInResource": { params: Page_SearchInResourceParams, result: Page_SearchInResourceResult }, - "Page.setAdBlockingEnabled": { params: Page_SetAdBlockingEnabledParams, result: Page_SetAdBlockingEnabledResult }, - "Page.setBypassCSP": { params: Page_SetBypassCSPParams, result: Page_SetBypassCSPResult }, - "Page.getPermissionsPolicyState": { params: Page_GetPermissionsPolicyStateParams, result: Page_GetPermissionsPolicyStateResult }, - "Page.getOriginTrials": { params: Page_GetOriginTrialsParams, result: Page_GetOriginTrialsResult }, - "Page.setDeviceMetricsOverride": { params: Page_SetDeviceMetricsOverrideParams, result: Page_SetDeviceMetricsOverrideResult }, - "Page.setDeviceOrientationOverride": { params: Page_SetDeviceOrientationOverrideParams, result: Page_SetDeviceOrientationOverrideResult }, - "Page.setFontFamilies": { params: Page_SetFontFamiliesParams, result: Page_SetFontFamiliesResult }, - "Page.setFontSizes": { params: Page_SetFontSizesParams, result: Page_SetFontSizesResult }, - "Page.setDocumentContent": { params: Page_SetDocumentContentParams, result: Page_SetDocumentContentResult }, - "Page.setDownloadBehavior": { params: Page_SetDownloadBehaviorParams, result: Page_SetDownloadBehaviorResult }, - "Page.setGeolocationOverride": { params: Page_SetGeolocationOverrideParams, result: Page_SetGeolocationOverrideResult }, - "Page.setLifecycleEventsEnabled": { params: Page_SetLifecycleEventsEnabledParams, result: Page_SetLifecycleEventsEnabledResult }, - "Page.setTouchEmulationEnabled": { params: Page_SetTouchEmulationEnabledParams, result: Page_SetTouchEmulationEnabledResult }, - "Page.startScreencast": { params: Page_StartScreencastParams, result: Page_StartScreencastResult }, - "Page.stopLoading": { params: Page_StopLoadingParams, result: Page_StopLoadingResult }, - "Page.crash": { params: Page_CrashParams, result: Page_CrashResult }, - "Page.close": { params: Page_CloseParams, result: Page_CloseResult }, - "Page.setWebLifecycleState": { params: Page_SetWebLifecycleStateParams, result: Page_SetWebLifecycleStateResult }, - "Page.stopScreencast": { params: Page_StopScreencastParams, result: Page_StopScreencastResult }, - "Page.produceCompilationCache": { params: Page_ProduceCompilationCacheParams, result: Page_ProduceCompilationCacheResult }, - "Page.addCompilationCache": { params: Page_AddCompilationCacheParams, result: Page_AddCompilationCacheResult }, - "Page.clearCompilationCache": { params: Page_ClearCompilationCacheParams, result: Page_ClearCompilationCacheResult }, - "Page.setSPCTransactionMode": { params: Page_SetSPCTransactionModeParams, result: Page_SetSPCTransactionModeResult }, - "Page.setRPHRegistrationMode": { params: Page_SetRPHRegistrationModeParams, result: Page_SetRPHRegistrationModeResult }, - "Page.generateTestReport": { params: Page_GenerateTestReportParams, result: Page_GenerateTestReportResult }, - "Page.waitForDebugger": { params: Page_WaitForDebuggerParams, result: Page_WaitForDebuggerResult }, - "Page.setInterceptFileChooserDialog": { params: Page_SetInterceptFileChooserDialogParams, result: Page_SetInterceptFileChooserDialogResult }, - "Page.setPrerenderingAllowed": { params: Page_SetPrerenderingAllowedParams, result: Page_SetPrerenderingAllowedResult }, - "Page.getAnnotatedPageContent": { params: Page_GetAnnotatedPageContentParams, result: Page_GetAnnotatedPageContentResult }, - "Performance.disable": { params: Performance_DisableParams, result: Performance_DisableResult }, - "Performance.enable": { params: Performance_EnableParams, result: Performance_EnableResult }, - "Performance.setTimeDomain": { params: Performance_SetTimeDomainParams, result: Performance_SetTimeDomainResult }, - "Performance.getMetrics": { params: Performance_GetMetricsParams, result: Performance_GetMetricsResult }, - "PerformanceTimeline.enable": { params: PerformanceTimeline_EnableParams, result: PerformanceTimeline_EnableResult }, - "Preload.enable": { params: Preload_EnableParams, result: Preload_EnableResult }, - "Preload.disable": { params: Preload_DisableParams, result: Preload_DisableResult }, - "Profiler.disable": { params: Profiler_DisableParams, result: Profiler_DisableResult }, - "Profiler.enable": { params: Profiler_EnableParams, result: Profiler_EnableResult }, - "Profiler.getBestEffortCoverage": { params: Profiler_GetBestEffortCoverageParams, result: Profiler_GetBestEffortCoverageResult }, - "Profiler.setSamplingInterval": { params: Profiler_SetSamplingIntervalParams, result: Profiler_SetSamplingIntervalResult }, - "Profiler.start": { params: Profiler_StartParams, result: Profiler_StartResult }, - "Profiler.startPreciseCoverage": { params: Profiler_StartPreciseCoverageParams, result: Profiler_StartPreciseCoverageResult }, - "Profiler.stop": { params: Profiler_StopParams, result: Profiler_StopResult }, - "Profiler.stopPreciseCoverage": { params: Profiler_StopPreciseCoverageParams, result: Profiler_StopPreciseCoverageResult }, - "Profiler.takePreciseCoverage": { params: Profiler_TakePreciseCoverageParams, result: Profiler_TakePreciseCoverageResult }, - "PWA.getOsAppState": { params: PWA_GetOsAppStateParams, result: PWA_GetOsAppStateResult }, - "PWA.install": { params: PWA_InstallParams, result: PWA_InstallResult }, - "PWA.uninstall": { params: PWA_UninstallParams, result: PWA_UninstallResult }, - "PWA.launch": { params: PWA_LaunchParams, result: PWA_LaunchResult }, - "PWA.launchFilesInApp": { params: PWA_LaunchFilesInAppParams, result: PWA_LaunchFilesInAppResult }, - "PWA.openCurrentPageInApp": { params: PWA_OpenCurrentPageInAppParams, result: PWA_OpenCurrentPageInAppResult }, - "PWA.changeAppUserSettings": { params: PWA_ChangeAppUserSettingsParams, result: PWA_ChangeAppUserSettingsResult }, - "Runtime.awaitPromise": { params: Runtime_AwaitPromiseParams, result: Runtime_AwaitPromiseResult }, - "Runtime.callFunctionOn": { params: Runtime_CallFunctionOnParams, result: Runtime_CallFunctionOnResult }, - "Runtime.compileScript": { params: Runtime_CompileScriptParams, result: Runtime_CompileScriptResult }, - "Runtime.disable": { params: Runtime_DisableParams, result: Runtime_DisableResult }, - "Runtime.discardConsoleEntries": { params: Runtime_DiscardConsoleEntriesParams, result: Runtime_DiscardConsoleEntriesResult }, - "Runtime.enable": { params: Runtime_EnableParams, result: Runtime_EnableResult }, - "Runtime.evaluate": { params: Runtime_EvaluateParams, result: Runtime_EvaluateResult }, - "Runtime.getIsolateId": { params: Runtime_GetIsolateIdParams, result: Runtime_GetIsolateIdResult }, - "Runtime.getHeapUsage": { params: Runtime_GetHeapUsageParams, result: Runtime_GetHeapUsageResult }, - "Runtime.getProperties": { params: Runtime_GetPropertiesParams, result: Runtime_GetPropertiesResult }, - "Runtime.globalLexicalScopeNames": { params: Runtime_GlobalLexicalScopeNamesParams, result: Runtime_GlobalLexicalScopeNamesResult }, - "Runtime.queryObjects": { params: Runtime_QueryObjectsParams, result: Runtime_QueryObjectsResult }, - "Runtime.releaseObject": { params: Runtime_ReleaseObjectParams, result: Runtime_ReleaseObjectResult }, - "Runtime.releaseObjectGroup": { params: Runtime_ReleaseObjectGroupParams, result: Runtime_ReleaseObjectGroupResult }, - "Runtime.runIfWaitingForDebugger": { params: Runtime_RunIfWaitingForDebuggerParams, result: Runtime_RunIfWaitingForDebuggerResult }, - "Runtime.runScript": { params: Runtime_RunScriptParams, result: Runtime_RunScriptResult }, - "Runtime.setAsyncCallStackDepth": { params: Runtime_SetAsyncCallStackDepthParams, result: Runtime_SetAsyncCallStackDepthResult }, - "Runtime.setCustomObjectFormatterEnabled": { params: Runtime_SetCustomObjectFormatterEnabledParams, result: Runtime_SetCustomObjectFormatterEnabledResult }, - "Runtime.setMaxCallStackSizeToCapture": { params: Runtime_SetMaxCallStackSizeToCaptureParams, result: Runtime_SetMaxCallStackSizeToCaptureResult }, - "Runtime.terminateExecution": { params: Runtime_TerminateExecutionParams, result: Runtime_TerminateExecutionResult }, - "Runtime.addBinding": { params: Runtime_AddBindingParams, result: Runtime_AddBindingResult }, - "Runtime.removeBinding": { params: Runtime_RemoveBindingParams, result: Runtime_RemoveBindingResult }, - "Runtime.getExceptionDetails": { params: Runtime_GetExceptionDetailsParams, result: Runtime_GetExceptionDetailsResult }, - "Schema.getDomains": { params: Schema_GetDomainsParams, result: Schema_GetDomainsResult }, - "Security.disable": { params: Security_DisableParams, result: Security_DisableResult }, - "Security.enable": { params: Security_EnableParams, result: Security_EnableResult }, - "Security.setIgnoreCertificateErrors": { params: Security_SetIgnoreCertificateErrorsParams, result: Security_SetIgnoreCertificateErrorsResult }, - "Security.handleCertificateError": { params: Security_HandleCertificateErrorParams, result: Security_HandleCertificateErrorResult }, - "Security.setOverrideCertificateErrors": { params: Security_SetOverrideCertificateErrorsParams, result: Security_SetOverrideCertificateErrorsResult }, - "ServiceWorker.deliverPushMessage": { params: ServiceWorker_DeliverPushMessageParams, result: ServiceWorker_DeliverPushMessageResult }, - "ServiceWorker.disable": { params: ServiceWorker_DisableParams, result: ServiceWorker_DisableResult }, - "ServiceWorker.dispatchSyncEvent": { params: ServiceWorker_DispatchSyncEventParams, result: ServiceWorker_DispatchSyncEventResult }, - "ServiceWorker.dispatchPeriodicSyncEvent": { params: ServiceWorker_DispatchPeriodicSyncEventParams, result: ServiceWorker_DispatchPeriodicSyncEventResult }, - "ServiceWorker.enable": { params: ServiceWorker_EnableParams, result: ServiceWorker_EnableResult }, - "ServiceWorker.setForceUpdateOnPageLoad": { params: ServiceWorker_SetForceUpdateOnPageLoadParams, result: ServiceWorker_SetForceUpdateOnPageLoadResult }, - "ServiceWorker.skipWaiting": { params: ServiceWorker_SkipWaitingParams, result: ServiceWorker_SkipWaitingResult }, - "ServiceWorker.startWorker": { params: ServiceWorker_StartWorkerParams, result: ServiceWorker_StartWorkerResult }, - "ServiceWorker.stopAllWorkers": { params: ServiceWorker_StopAllWorkersParams, result: ServiceWorker_StopAllWorkersResult }, - "ServiceWorker.stopWorker": { params: ServiceWorker_StopWorkerParams, result: ServiceWorker_StopWorkerResult }, - "ServiceWorker.unregister": { params: ServiceWorker_UnregisterParams, result: ServiceWorker_UnregisterResult }, - "ServiceWorker.updateRegistration": { params: ServiceWorker_UpdateRegistrationParams, result: ServiceWorker_UpdateRegistrationResult }, - "SmartCardEmulation.enable": { params: SmartCardEmulation_EnableParams, result: SmartCardEmulation_EnableResult }, - "SmartCardEmulation.disable": { params: SmartCardEmulation_DisableParams, result: SmartCardEmulation_DisableResult }, - "SmartCardEmulation.reportEstablishContextResult": { params: SmartCardEmulation_ReportEstablishContextResultParams, result: SmartCardEmulation_ReportEstablishContextResultResult }, - "SmartCardEmulation.reportReleaseContextResult": { params: SmartCardEmulation_ReportReleaseContextResultParams, result: SmartCardEmulation_ReportReleaseContextResultResult }, - "SmartCardEmulation.reportListReadersResult": { params: SmartCardEmulation_ReportListReadersResultParams, result: SmartCardEmulation_ReportListReadersResultResult }, - "SmartCardEmulation.reportGetStatusChangeResult": { params: SmartCardEmulation_ReportGetStatusChangeResultParams, result: SmartCardEmulation_ReportGetStatusChangeResultResult }, - "SmartCardEmulation.reportBeginTransactionResult": { params: SmartCardEmulation_ReportBeginTransactionResultParams, result: SmartCardEmulation_ReportBeginTransactionResultResult }, - "SmartCardEmulation.reportPlainResult": { params: SmartCardEmulation_ReportPlainResultParams, result: SmartCardEmulation_ReportPlainResultResult }, - "SmartCardEmulation.reportConnectResult": { params: SmartCardEmulation_ReportConnectResultParams, result: SmartCardEmulation_ReportConnectResultResult }, - "SmartCardEmulation.reportDataResult": { params: SmartCardEmulation_ReportDataResultParams, result: SmartCardEmulation_ReportDataResultResult }, - "SmartCardEmulation.reportStatusResult": { params: SmartCardEmulation_ReportStatusResultParams, result: SmartCardEmulation_ReportStatusResultResult }, - "SmartCardEmulation.reportError": { params: SmartCardEmulation_ReportErrorParams, result: SmartCardEmulation_ReportErrorResult }, - "Storage.getStorageKeyForFrame": { params: Storage_GetStorageKeyForFrameParams, result: Storage_GetStorageKeyForFrameResult }, - "Storage.getStorageKey": { params: Storage_GetStorageKeyParams, result: Storage_GetStorageKeyResult }, - "Storage.clearDataForOrigin": { params: Storage_ClearDataForOriginParams, result: Storage_ClearDataForOriginResult }, - "Storage.clearDataForStorageKey": { params: Storage_ClearDataForStorageKeyParams, result: Storage_ClearDataForStorageKeyResult }, - "Storage.getCookies": { params: Storage_GetCookiesParams, result: Storage_GetCookiesResult }, - "Storage.setCookies": { params: Storage_SetCookiesParams, result: Storage_SetCookiesResult }, - "Storage.clearCookies": { params: Storage_ClearCookiesParams, result: Storage_ClearCookiesResult }, - "Storage.getUsageAndQuota": { params: Storage_GetUsageAndQuotaParams, result: Storage_GetUsageAndQuotaResult }, - "Storage.overrideQuotaForOrigin": { params: Storage_OverrideQuotaForOriginParams, result: Storage_OverrideQuotaForOriginResult }, - "Storage.trackCacheStorageForOrigin": { params: Storage_TrackCacheStorageForOriginParams, result: Storage_TrackCacheStorageForOriginResult }, - "Storage.trackCacheStorageForStorageKey": { params: Storage_TrackCacheStorageForStorageKeyParams, result: Storage_TrackCacheStorageForStorageKeyResult }, - "Storage.trackIndexedDBForOrigin": { params: Storage_TrackIndexedDBForOriginParams, result: Storage_TrackIndexedDBForOriginResult }, - "Storage.trackIndexedDBForStorageKey": { params: Storage_TrackIndexedDBForStorageKeyParams, result: Storage_TrackIndexedDBForStorageKeyResult }, - "Storage.untrackCacheStorageForOrigin": { params: Storage_UntrackCacheStorageForOriginParams, result: Storage_UntrackCacheStorageForOriginResult }, - "Storage.untrackCacheStorageForStorageKey": { params: Storage_UntrackCacheStorageForStorageKeyParams, result: Storage_UntrackCacheStorageForStorageKeyResult }, - "Storage.untrackIndexedDBForOrigin": { params: Storage_UntrackIndexedDBForOriginParams, result: Storage_UntrackIndexedDBForOriginResult }, - "Storage.untrackIndexedDBForStorageKey": { params: Storage_UntrackIndexedDBForStorageKeyParams, result: Storage_UntrackIndexedDBForStorageKeyResult }, - "Storage.getTrustTokens": { params: Storage_GetTrustTokensParams, result: Storage_GetTrustTokensResult }, - "Storage.clearTrustTokens": { params: Storage_ClearTrustTokensParams, result: Storage_ClearTrustTokensResult }, - "Storage.getInterestGroupDetails": { params: Storage_GetInterestGroupDetailsParams, result: Storage_GetInterestGroupDetailsResult }, - "Storage.setInterestGroupTracking": { params: Storage_SetInterestGroupTrackingParams, result: Storage_SetInterestGroupTrackingResult }, - "Storage.setInterestGroupAuctionTracking": { params: Storage_SetInterestGroupAuctionTrackingParams, result: Storage_SetInterestGroupAuctionTrackingResult }, - "Storage.getSharedStorageMetadata": { params: Storage_GetSharedStorageMetadataParams, result: Storage_GetSharedStorageMetadataResult }, - "Storage.getSharedStorageEntries": { params: Storage_GetSharedStorageEntriesParams, result: Storage_GetSharedStorageEntriesResult }, - "Storage.setSharedStorageEntry": { params: Storage_SetSharedStorageEntryParams, result: Storage_SetSharedStorageEntryResult }, - "Storage.deleteSharedStorageEntry": { params: Storage_DeleteSharedStorageEntryParams, result: Storage_DeleteSharedStorageEntryResult }, - "Storage.clearSharedStorageEntries": { params: Storage_ClearSharedStorageEntriesParams, result: Storage_ClearSharedStorageEntriesResult }, - "Storage.resetSharedStorageBudget": { params: Storage_ResetSharedStorageBudgetParams, result: Storage_ResetSharedStorageBudgetResult }, - "Storage.setSharedStorageTracking": { params: Storage_SetSharedStorageTrackingParams, result: Storage_SetSharedStorageTrackingResult }, - "Storage.setStorageBucketTracking": { params: Storage_SetStorageBucketTrackingParams, result: Storage_SetStorageBucketTrackingResult }, - "Storage.deleteStorageBucket": { params: Storage_DeleteStorageBucketParams, result: Storage_DeleteStorageBucketResult }, - "Storage.runBounceTrackingMitigations": { params: Storage_RunBounceTrackingMitigationsParams, result: Storage_RunBounceTrackingMitigationsResult }, - "Storage.getRelatedWebsiteSets": { params: Storage_GetRelatedWebsiteSetsParams, result: Storage_GetRelatedWebsiteSetsResult }, - "Storage.setProtectedAudienceKAnonymity": { params: Storage_SetProtectedAudienceKAnonymityParams, result: Storage_SetProtectedAudienceKAnonymityResult }, - "SystemInfo.getInfo": { params: SystemInfo_GetInfoParams, result: SystemInfo_GetInfoResult }, - "SystemInfo.getFeatureState": { params: SystemInfo_GetFeatureStateParams, result: SystemInfo_GetFeatureStateResult }, - "SystemInfo.getProcessInfo": { params: SystemInfo_GetProcessInfoParams, result: SystemInfo_GetProcessInfoResult }, - "Target.activateTarget": { params: Target_ActivateTargetParams, result: Target_ActivateTargetResult }, - "Target.attachToTarget": { params: Target_AttachToTargetParams, result: Target_AttachToTargetResult }, - "Target.attachToBrowserTarget": { params: Target_AttachToBrowserTargetParams, result: Target_AttachToBrowserTargetResult }, - "Target.closeTarget": { params: Target_CloseTargetParams, result: Target_CloseTargetResult }, - "Target.exposeDevToolsProtocol": { params: Target_ExposeDevToolsProtocolParams, result: Target_ExposeDevToolsProtocolResult }, - "Target.createBrowserContext": { params: Target_CreateBrowserContextParams, result: Target_CreateBrowserContextResult }, - "Target.getBrowserContexts": { params: Target_GetBrowserContextsParams, result: Target_GetBrowserContextsResult }, - "Target.createTarget": { params: Target_CreateTargetParams, result: Target_CreateTargetResult }, - "Target.detachFromTarget": { params: Target_DetachFromTargetParams, result: Target_DetachFromTargetResult }, - "Target.disposeBrowserContext": { params: Target_DisposeBrowserContextParams, result: Target_DisposeBrowserContextResult }, - "Target.getTargetInfo": { params: Target_GetTargetInfoParams, result: Target_GetTargetInfoResult }, - "Target.getTargets": { params: Target_GetTargetsParams, result: Target_GetTargetsResult }, - "Target.sendMessageToTarget": { params: Target_SendMessageToTargetParams, result: Target_SendMessageToTargetResult }, - "Target.setAutoAttach": { params: Target_SetAutoAttachParams, result: Target_SetAutoAttachResult }, - "Target.autoAttachRelated": { params: Target_AutoAttachRelatedParams, result: Target_AutoAttachRelatedResult }, - "Target.setDiscoverTargets": { params: Target_SetDiscoverTargetsParams, result: Target_SetDiscoverTargetsResult }, - "Target.setRemoteLocations": { params: Target_SetRemoteLocationsParams, result: Target_SetRemoteLocationsResult }, - "Target.getDevToolsTarget": { params: Target_GetDevToolsTargetParams, result: Target_GetDevToolsTargetResult }, - "Target.openDevTools": { params: Target_OpenDevToolsParams, result: Target_OpenDevToolsResult }, - "Tethering.bind": { params: Tethering_BindParams, result: Tethering_BindResult }, - "Tethering.unbind": { params: Tethering_UnbindParams, result: Tethering_UnbindResult }, - "Tracing.end": { params: Tracing_EndParams, result: Tracing_EndResult }, - "Tracing.getCategories": { params: Tracing_GetCategoriesParams, result: Tracing_GetCategoriesResult }, - "Tracing.getTrackEventDescriptor": { params: Tracing_GetTrackEventDescriptorParams, result: Tracing_GetTrackEventDescriptorResult }, - "Tracing.recordClockSyncMarker": { params: Tracing_RecordClockSyncMarkerParams, result: Tracing_RecordClockSyncMarkerResult }, - "Tracing.requestMemoryDump": { params: Tracing_RequestMemoryDumpParams, result: Tracing_RequestMemoryDumpResult }, - "Tracing.start": { params: Tracing_StartParams, result: Tracing_StartResult }, - "WebAudio.enable": { params: WebAudio_EnableParams, result: WebAudio_EnableResult }, - "WebAudio.disable": { params: WebAudio_DisableParams, result: WebAudio_DisableResult }, - "WebAudio.getRealtimeData": { params: WebAudio_GetRealtimeDataParams, result: WebAudio_GetRealtimeDataResult }, - "WebAuthn.enable": { params: WebAuthn_EnableParams, result: WebAuthn_EnableResult }, - "WebAuthn.disable": { params: WebAuthn_DisableParams, result: WebAuthn_DisableResult }, - "WebAuthn.addVirtualAuthenticator": { params: WebAuthn_AddVirtualAuthenticatorParams, result: WebAuthn_AddVirtualAuthenticatorResult }, - "WebAuthn.setResponseOverrideBits": { params: WebAuthn_SetResponseOverrideBitsParams, result: WebAuthn_SetResponseOverrideBitsResult }, - "WebAuthn.removeVirtualAuthenticator": { params: WebAuthn_RemoveVirtualAuthenticatorParams, result: WebAuthn_RemoveVirtualAuthenticatorResult }, - "WebAuthn.addCredential": { params: WebAuthn_AddCredentialParams, result: WebAuthn_AddCredentialResult }, - "WebAuthn.getCredential": { params: WebAuthn_GetCredentialParams, result: WebAuthn_GetCredentialResult }, - "WebAuthn.getCredentials": { params: WebAuthn_GetCredentialsParams, result: WebAuthn_GetCredentialsResult }, - "WebAuthn.removeCredential": { params: WebAuthn_RemoveCredentialParams, result: WebAuthn_RemoveCredentialResult }, - "WebAuthn.clearCredentials": { params: WebAuthn_ClearCredentialsParams, result: WebAuthn_ClearCredentialsResult }, - "WebAuthn.setUserVerified": { params: WebAuthn_SetUserVerifiedParams, result: WebAuthn_SetUserVerifiedResult }, - "WebAuthn.setAutomaticPresenceSimulation": { params: WebAuthn_SetAutomaticPresenceSimulationParams, result: WebAuthn_SetAutomaticPresenceSimulationResult }, - "WebAuthn.setCredentialProperties": { params: WebAuthn_SetCredentialPropertiesParams, result: WebAuthn_SetCredentialPropertiesResult }, - "WebMCP.enable": { params: WebMCP_EnableParams, result: WebMCP_EnableResult }, - "WebMCP.disable": { params: WebMCP_DisableParams, result: WebMCP_DisableResult }, - "WebMCP.invokeTool": { params: WebMCP_InvokeToolParams, result: WebMCP_InvokeToolResult }, - "WebMCP.cancelInvocation": { params: WebMCP_CancelInvocationParams, result: WebMCP_CancelInvocationResult }, + ...Accessibility.commands, + ...Animation.commands, + ...Audits.commands, + ...Autofill.commands, + ...BackgroundService.commands, + ...BluetoothEmulation.commands, + ...Browser.commands, + ...CacheStorage.commands, + ...Cast.commands, + ...Console.commands, + ...CrashReportContext.commands, + ...CSS.commands, + ...Debugger.commands, + ...DeviceAccess.commands, + ...DeviceOrientation.commands, + ...DOM.commands, + ...DOMDebugger.commands, + ...DOMSnapshot.commands, + ...DOMStorage.commands, + ...Emulation.commands, + ...EventBreakpoints.commands, + ...Extensions.commands, + ...FedCm.commands, + ...Fetch.commands, + ...FileSystem.commands, + ...HeadlessExperimental.commands, + ...HeapProfiler.commands, + ...IndexedDB.commands, + ...Input.commands, + ...Inspector.commands, + ...IO.commands, + ...LayerTree.commands, + ...Log.commands, + ...Media.commands, + ...Memory.commands, + ...Network.commands, + ...Overlay.commands, + ...Page.commands, + ...Performance.commands, + ...PerformanceTimeline.commands, + ...Preload.commands, + ...Profiler.commands, + ...PWA.commands, + ...Runtime.commands, + ...Schema.commands, + ...Security.commands, + ...ServiceWorker.commands, + ...SmartCardEmulation.commands, + ...Storage.commands, + ...SystemInfo.commands, + ...Target.commands, + ...Tethering.commands, + ...Tracing.commands, + ...WebAudio.commands, + ...WebAuthn.commands, + ...WebMCP.commands, } as const; export const events = { - "Accessibility.loadComplete": Accessibility_LoadCompleteEvent, - "Accessibility.nodesUpdated": Accessibility_NodesUpdatedEvent, - "Animation.animationCanceled": Animation_AnimationCanceledEvent, - "Animation.animationCreated": Animation_AnimationCreatedEvent, - "Animation.animationStarted": Animation_AnimationStartedEvent, - "Animation.animationUpdated": Animation_AnimationUpdatedEvent, - "Audits.issueAdded": Audits_IssueAddedEvent, - "Autofill.addressFormFilled": Autofill_AddressFormFilledEvent, - "BackgroundService.recordingStateChanged": BackgroundService_RecordingStateChangedEvent, - "BackgroundService.backgroundServiceEventReceived": BackgroundService_BackgroundServiceEventReceivedEvent, - "BluetoothEmulation.gattOperationReceived": BluetoothEmulation_GattOperationReceivedEvent, - "BluetoothEmulation.characteristicOperationReceived": BluetoothEmulation_CharacteristicOperationReceivedEvent, - "BluetoothEmulation.descriptorOperationReceived": BluetoothEmulation_DescriptorOperationReceivedEvent, - "Browser.downloadWillBegin": Browser_DownloadWillBeginEvent, - "Browser.downloadProgress": Browser_DownloadProgressEvent, - "Cast.sinksUpdated": Cast_SinksUpdatedEvent, - "Cast.issueUpdated": Cast_IssueUpdatedEvent, - "Console.messageAdded": Console_MessageAddedEvent, - "CSS.fontsUpdated": CSS_FontsUpdatedEvent, - "CSS.mediaQueryResultChanged": CSS_MediaQueryResultChangedEvent, - "CSS.styleSheetAdded": CSS_StyleSheetAddedEvent, - "CSS.styleSheetChanged": CSS_StyleSheetChangedEvent, - "CSS.styleSheetRemoved": CSS_StyleSheetRemovedEvent, - "CSS.computedStyleUpdated": CSS_ComputedStyleUpdatedEvent, - "Debugger.breakpointResolved": Debugger_BreakpointResolvedEvent, - "Debugger.paused": Debugger_PausedEvent, - "Debugger.resumed": Debugger_ResumedEvent, - "Debugger.scriptFailedToParse": Debugger_ScriptFailedToParseEvent, - "Debugger.scriptParsed": Debugger_ScriptParsedEvent, - "DeviceAccess.deviceRequestPrompted": DeviceAccess_DeviceRequestPromptedEvent, - "DOM.attributeModified": DOM_AttributeModifiedEvent, - "DOM.adoptedStyleSheetsModified": DOM_AdoptedStyleSheetsModifiedEvent, - "DOM.attributeRemoved": DOM_AttributeRemovedEvent, - "DOM.characterDataModified": DOM_CharacterDataModifiedEvent, - "DOM.childNodeCountUpdated": DOM_ChildNodeCountUpdatedEvent, - "DOM.childNodeInserted": DOM_ChildNodeInsertedEvent, - "DOM.childNodeRemoved": DOM_ChildNodeRemovedEvent, - "DOM.distributedNodesUpdated": DOM_DistributedNodesUpdatedEvent, - "DOM.documentUpdated": DOM_DocumentUpdatedEvent, - "DOM.inlineStyleInvalidated": DOM_InlineStyleInvalidatedEvent, - "DOM.pseudoElementAdded": DOM_PseudoElementAddedEvent, - "DOM.topLayerElementsUpdated": DOM_TopLayerElementsUpdatedEvent, - "DOM.scrollableFlagUpdated": DOM_ScrollableFlagUpdatedEvent, - "DOM.adRelatedStateUpdated": DOM_AdRelatedStateUpdatedEvent, - "DOM.affectedByStartingStylesFlagUpdated": DOM_AffectedByStartingStylesFlagUpdatedEvent, - "DOM.pseudoElementRemoved": DOM_PseudoElementRemovedEvent, - "DOM.setChildNodes": DOM_SetChildNodesEvent, - "DOM.shadowRootPopped": DOM_ShadowRootPoppedEvent, - "DOM.shadowRootPushed": DOM_ShadowRootPushedEvent, - "DOMStorage.domStorageItemAdded": DOMStorage_DomStorageItemAddedEvent, - "DOMStorage.domStorageItemRemoved": DOMStorage_DomStorageItemRemovedEvent, - "DOMStorage.domStorageItemUpdated": DOMStorage_DomStorageItemUpdatedEvent, - "DOMStorage.domStorageItemsCleared": DOMStorage_DomStorageItemsClearedEvent, - "Emulation.virtualTimeBudgetExpired": Emulation_VirtualTimeBudgetExpiredEvent, - "Emulation.screenOrientationLockChanged": Emulation_ScreenOrientationLockChangedEvent, - "FedCm.dialogShown": FedCm_DialogShownEvent, - "FedCm.dialogClosed": FedCm_DialogClosedEvent, - "Fetch.requestPaused": Fetch_RequestPausedEvent, - "Fetch.authRequired": Fetch_AuthRequiredEvent, - "HeapProfiler.addHeapSnapshotChunk": HeapProfiler_AddHeapSnapshotChunkEvent, - "HeapProfiler.heapStatsUpdate": HeapProfiler_HeapStatsUpdateEvent, - "HeapProfiler.lastSeenObjectId": HeapProfiler_LastSeenObjectIdEvent, - "HeapProfiler.reportHeapSnapshotProgress": HeapProfiler_ReportHeapSnapshotProgressEvent, - "HeapProfiler.resetProfiles": HeapProfiler_ResetProfilesEvent, - "Input.dragIntercepted": Input_DragInterceptedEvent, - "Inspector.detached": Inspector_DetachedEvent, - "Inspector.targetCrashed": Inspector_TargetCrashedEvent, - "Inspector.targetReloadedAfterCrash": Inspector_TargetReloadedAfterCrashEvent, - "Inspector.workerScriptLoaded": Inspector_WorkerScriptLoadedEvent, - "LayerTree.layerPainted": LayerTree_LayerPaintedEvent, - "LayerTree.layerTreeDidChange": LayerTree_LayerTreeDidChangeEvent, - "Log.entryAdded": Log_EntryAddedEvent, - "Media.playerPropertiesChanged": Media_PlayerPropertiesChangedEvent, - "Media.playerEventsAdded": Media_PlayerEventsAddedEvent, - "Media.playerMessagesLogged": Media_PlayerMessagesLoggedEvent, - "Media.playerErrorsRaised": Media_PlayerErrorsRaisedEvent, - "Media.playerCreated": Media_PlayerCreatedEvent, - "Network.dataReceived": Network_DataReceivedEvent, - "Network.eventSourceMessageReceived": Network_EventSourceMessageReceivedEvent, - "Network.loadingFailed": Network_LoadingFailedEvent, - "Network.loadingFinished": Network_LoadingFinishedEvent, - "Network.requestIntercepted": Network_RequestInterceptedEvent, - "Network.requestServedFromCache": Network_RequestServedFromCacheEvent, - "Network.requestWillBeSent": Network_RequestWillBeSentEvent, - "Network.resourceChangedPriority": Network_ResourceChangedPriorityEvent, - "Network.signedExchangeReceived": Network_SignedExchangeReceivedEvent, - "Network.responseReceived": Network_ResponseReceivedEvent, - "Network.webSocketClosed": Network_WebSocketClosedEvent, - "Network.webSocketCreated": Network_WebSocketCreatedEvent, - "Network.webSocketFrameError": Network_WebSocketFrameErrorEvent, - "Network.webSocketFrameReceived": Network_WebSocketFrameReceivedEvent, - "Network.webSocketFrameSent": Network_WebSocketFrameSentEvent, - "Network.webSocketHandshakeResponseReceived": Network_WebSocketHandshakeResponseReceivedEvent, - "Network.webSocketWillSendHandshakeRequest": Network_WebSocketWillSendHandshakeRequestEvent, - "Network.webTransportCreated": Network_WebTransportCreatedEvent, - "Network.webTransportConnectionEstablished": Network_WebTransportConnectionEstablishedEvent, - "Network.webTransportClosed": Network_WebTransportClosedEvent, - "Network.directTCPSocketCreated": Network_DirectTCPSocketCreatedEvent, - "Network.directTCPSocketOpened": Network_DirectTCPSocketOpenedEvent, - "Network.directTCPSocketAborted": Network_DirectTCPSocketAbortedEvent, - "Network.directTCPSocketClosed": Network_DirectTCPSocketClosedEvent, - "Network.directTCPSocketChunkSent": Network_DirectTCPSocketChunkSentEvent, - "Network.directTCPSocketChunkReceived": Network_DirectTCPSocketChunkReceivedEvent, - "Network.directUDPSocketJoinedMulticastGroup": Network_DirectUDPSocketJoinedMulticastGroupEvent, - "Network.directUDPSocketLeftMulticastGroup": Network_DirectUDPSocketLeftMulticastGroupEvent, - "Network.directUDPSocketCreated": Network_DirectUDPSocketCreatedEvent, - "Network.directUDPSocketOpened": Network_DirectUDPSocketOpenedEvent, - "Network.directUDPSocketAborted": Network_DirectUDPSocketAbortedEvent, - "Network.directUDPSocketClosed": Network_DirectUDPSocketClosedEvent, - "Network.directUDPSocketChunkSent": Network_DirectUDPSocketChunkSentEvent, - "Network.directUDPSocketChunkReceived": Network_DirectUDPSocketChunkReceivedEvent, - "Network.requestWillBeSentExtraInfo": Network_RequestWillBeSentExtraInfoEvent, - "Network.responseReceivedExtraInfo": Network_ResponseReceivedExtraInfoEvent, - "Network.responseReceivedEarlyHints": Network_ResponseReceivedEarlyHintsEvent, - "Network.trustTokenOperationDone": Network_TrustTokenOperationDoneEvent, - "Network.policyUpdated": Network_PolicyUpdatedEvent, - "Network.reportingApiReportAdded": Network_ReportingApiReportAddedEvent, - "Network.reportingApiReportUpdated": Network_ReportingApiReportUpdatedEvent, - "Network.reportingApiEndpointsChangedForOrigin": Network_ReportingApiEndpointsChangedForOriginEvent, - "Network.deviceBoundSessionsAdded": Network_DeviceBoundSessionsAddedEvent, - "Network.deviceBoundSessionEventOccurred": Network_DeviceBoundSessionEventOccurredEvent, - "Overlay.inspectNodeRequested": Overlay_InspectNodeRequestedEvent, - "Overlay.nodeHighlightRequested": Overlay_NodeHighlightRequestedEvent, - "Overlay.screenshotRequested": Overlay_ScreenshotRequestedEvent, - "Overlay.inspectPanelShowRequested": Overlay_InspectPanelShowRequestedEvent, - "Overlay.inspectedElementWindowRestored": Overlay_InspectedElementWindowRestoredEvent, - "Overlay.inspectModeCanceled": Overlay_InspectModeCanceledEvent, - "Page.domContentEventFired": Page_DomContentEventFiredEvent, - "Page.fileChooserOpened": Page_FileChooserOpenedEvent, - "Page.frameAttached": Page_FrameAttachedEvent, - "Page.frameClearedScheduledNavigation": Page_FrameClearedScheduledNavigationEvent, - "Page.frameDetached": Page_FrameDetachedEvent, - "Page.frameSubtreeWillBeDetached": Page_FrameSubtreeWillBeDetachedEvent, - "Page.frameNavigated": Page_FrameNavigatedEvent, - "Page.documentOpened": Page_DocumentOpenedEvent, - "Page.frameResized": Page_FrameResizedEvent, - "Page.frameStartedNavigating": Page_FrameStartedNavigatingEvent, - "Page.frameRequestedNavigation": Page_FrameRequestedNavigationEvent, - "Page.frameScheduledNavigation": Page_FrameScheduledNavigationEvent, - "Page.frameStartedLoading": Page_FrameStartedLoadingEvent, - "Page.frameStoppedLoading": Page_FrameStoppedLoadingEvent, - "Page.downloadWillBegin": Page_DownloadWillBeginEvent, - "Page.downloadProgress": Page_DownloadProgressEvent, - "Page.interstitialHidden": Page_InterstitialHiddenEvent, - "Page.interstitialShown": Page_InterstitialShownEvent, - "Page.javascriptDialogClosed": Page_JavascriptDialogClosedEvent, - "Page.javascriptDialogOpening": Page_JavascriptDialogOpeningEvent, - "Page.lifecycleEvent": Page_LifecycleEventEvent, - "Page.backForwardCacheNotUsed": Page_BackForwardCacheNotUsedEvent, - "Page.loadEventFired": Page_LoadEventFiredEvent, - "Page.navigatedWithinDocument": Page_NavigatedWithinDocumentEvent, - "Page.screencastFrame": Page_ScreencastFrameEvent, - "Page.screencastVisibilityChanged": Page_ScreencastVisibilityChangedEvent, - "Page.windowOpen": Page_WindowOpenEvent, - "Page.compilationCacheProduced": Page_CompilationCacheProducedEvent, - "Performance.metrics": Performance_MetricsEvent, - "PerformanceTimeline.timelineEventAdded": PerformanceTimeline_TimelineEventAddedEvent, - "Preload.ruleSetUpdated": Preload_RuleSetUpdatedEvent, - "Preload.ruleSetRemoved": Preload_RuleSetRemovedEvent, - "Preload.preloadEnabledStateUpdated": Preload_PreloadEnabledStateUpdatedEvent, - "Preload.prefetchStatusUpdated": Preload_PrefetchStatusUpdatedEvent, - "Preload.prerenderStatusUpdated": Preload_PrerenderStatusUpdatedEvent, - "Preload.preloadingAttemptSourcesUpdated": Preload_PreloadingAttemptSourcesUpdatedEvent, - "Profiler.consoleProfileFinished": Profiler_ConsoleProfileFinishedEvent, - "Profiler.consoleProfileStarted": Profiler_ConsoleProfileStartedEvent, - "Profiler.preciseCoverageDeltaUpdate": Profiler_PreciseCoverageDeltaUpdateEvent, - "Runtime.bindingCalled": Runtime_BindingCalledEvent, - "Runtime.consoleAPICalled": Runtime_ConsoleAPICalledEvent, - "Runtime.exceptionRevoked": Runtime_ExceptionRevokedEvent, - "Runtime.exceptionThrown": Runtime_ExceptionThrownEvent, - "Runtime.executionContextCreated": Runtime_ExecutionContextCreatedEvent, - "Runtime.executionContextDestroyed": Runtime_ExecutionContextDestroyedEvent, - "Runtime.executionContextsCleared": Runtime_ExecutionContextsClearedEvent, - "Runtime.inspectRequested": Runtime_InspectRequestedEvent, - "Security.certificateError": Security_CertificateErrorEvent, - "Security.visibleSecurityStateChanged": Security_VisibleSecurityStateChangedEvent, - "Security.securityStateChanged": Security_SecurityStateChangedEvent, - "ServiceWorker.workerErrorReported": ServiceWorker_WorkerErrorReportedEvent, - "ServiceWorker.workerRegistrationUpdated": ServiceWorker_WorkerRegistrationUpdatedEvent, - "ServiceWorker.workerVersionUpdated": ServiceWorker_WorkerVersionUpdatedEvent, - "SmartCardEmulation.establishContextRequested": SmartCardEmulation_EstablishContextRequestedEvent, - "SmartCardEmulation.releaseContextRequested": SmartCardEmulation_ReleaseContextRequestedEvent, - "SmartCardEmulation.listReadersRequested": SmartCardEmulation_ListReadersRequestedEvent, - "SmartCardEmulation.getStatusChangeRequested": SmartCardEmulation_GetStatusChangeRequestedEvent, - "SmartCardEmulation.cancelRequested": SmartCardEmulation_CancelRequestedEvent, - "SmartCardEmulation.connectRequested": SmartCardEmulation_ConnectRequestedEvent, - "SmartCardEmulation.disconnectRequested": SmartCardEmulation_DisconnectRequestedEvent, - "SmartCardEmulation.transmitRequested": SmartCardEmulation_TransmitRequestedEvent, - "SmartCardEmulation.controlRequested": SmartCardEmulation_ControlRequestedEvent, - "SmartCardEmulation.getAttribRequested": SmartCardEmulation_GetAttribRequestedEvent, - "SmartCardEmulation.setAttribRequested": SmartCardEmulation_SetAttribRequestedEvent, - "SmartCardEmulation.statusRequested": SmartCardEmulation_StatusRequestedEvent, - "SmartCardEmulation.beginTransactionRequested": SmartCardEmulation_BeginTransactionRequestedEvent, - "SmartCardEmulation.endTransactionRequested": SmartCardEmulation_EndTransactionRequestedEvent, - "Storage.cacheStorageContentUpdated": Storage_CacheStorageContentUpdatedEvent, - "Storage.cacheStorageListUpdated": Storage_CacheStorageListUpdatedEvent, - "Storage.indexedDBContentUpdated": Storage_IndexedDBContentUpdatedEvent, - "Storage.indexedDBListUpdated": Storage_IndexedDBListUpdatedEvent, - "Storage.interestGroupAccessed": Storage_InterestGroupAccessedEvent, - "Storage.interestGroupAuctionEventOccurred": Storage_InterestGroupAuctionEventOccurredEvent, - "Storage.interestGroupAuctionNetworkRequestCreated": Storage_InterestGroupAuctionNetworkRequestCreatedEvent, - "Storage.sharedStorageAccessed": Storage_SharedStorageAccessedEvent, - "Storage.sharedStorageWorkletOperationExecutionFinished": Storage_SharedStorageWorkletOperationExecutionFinishedEvent, - "Storage.storageBucketCreatedOrUpdated": Storage_StorageBucketCreatedOrUpdatedEvent, - "Storage.storageBucketDeleted": Storage_StorageBucketDeletedEvent, - "Target.attachedToTarget": Target_AttachedToTargetEvent, - "Target.detachedFromTarget": Target_DetachedFromTargetEvent, - "Target.receivedMessageFromTarget": Target_ReceivedMessageFromTargetEvent, - "Target.targetCreated": Target_TargetCreatedEvent, - "Target.targetDestroyed": Target_TargetDestroyedEvent, - "Target.targetCrashed": Target_TargetCrashedEvent, - "Target.targetInfoChanged": Target_TargetInfoChangedEvent, - "Tethering.accepted": Tethering_AcceptedEvent, - "Tracing.bufferUsage": Tracing_BufferUsageEvent, - "Tracing.dataCollected": Tracing_DataCollectedEvent, - "Tracing.tracingComplete": Tracing_TracingCompleteEvent, - "WebAudio.contextCreated": WebAudio_ContextCreatedEvent, - "WebAudio.contextWillBeDestroyed": WebAudio_ContextWillBeDestroyedEvent, - "WebAudio.contextChanged": WebAudio_ContextChangedEvent, - "WebAudio.audioListenerCreated": WebAudio_AudioListenerCreatedEvent, - "WebAudio.audioListenerWillBeDestroyed": WebAudio_AudioListenerWillBeDestroyedEvent, - "WebAudio.audioNodeCreated": WebAudio_AudioNodeCreatedEvent, - "WebAudio.audioNodeWillBeDestroyed": WebAudio_AudioNodeWillBeDestroyedEvent, - "WebAudio.audioParamCreated": WebAudio_AudioParamCreatedEvent, - "WebAudio.audioParamWillBeDestroyed": WebAudio_AudioParamWillBeDestroyedEvent, - "WebAudio.nodesConnected": WebAudio_NodesConnectedEvent, - "WebAudio.nodesDisconnected": WebAudio_NodesDisconnectedEvent, - "WebAudio.nodeParamConnected": WebAudio_NodeParamConnectedEvent, - "WebAudio.nodeParamDisconnected": WebAudio_NodeParamDisconnectedEvent, - "WebAuthn.credentialAdded": WebAuthn_CredentialAddedEvent, - "WebAuthn.credentialDeleted": WebAuthn_CredentialDeletedEvent, - "WebAuthn.credentialUpdated": WebAuthn_CredentialUpdatedEvent, - "WebAuthn.credentialAsserted": WebAuthn_CredentialAssertedEvent, - "WebMCP.toolsAdded": WebMCP_ToolsAddedEvent, - "WebMCP.toolsRemoved": WebMCP_ToolsRemovedEvent, - "WebMCP.toolInvoked": WebMCP_ToolInvokedEvent, - "WebMCP.toolResponded": WebMCP_ToolRespondedEvent, + ...Accessibility.events, + ...Animation.events, + ...Audits.events, + ...Autofill.events, + ...BackgroundService.events, + ...BluetoothEmulation.events, + ...Browser.events, + ...CacheStorage.events, + ...Cast.events, + ...Console.events, + ...CrashReportContext.events, + ...CSS.events, + ...Debugger.events, + ...DeviceAccess.events, + ...DeviceOrientation.events, + ...DOM.events, + ...DOMDebugger.events, + ...DOMSnapshot.events, + ...DOMStorage.events, + ...Emulation.events, + ...EventBreakpoints.events, + ...Extensions.events, + ...FedCm.events, + ...Fetch.events, + ...FileSystem.events, + ...HeadlessExperimental.events, + ...HeapProfiler.events, + ...IndexedDB.events, + ...Input.events, + ...Inspector.events, + ...IO.events, + ...LayerTree.events, + ...Log.events, + ...Media.events, + ...Memory.events, + ...Network.events, + ...Overlay.events, + ...Page.events, + ...Performance.events, + ...PerformanceTimeline.events, + ...Preload.events, + ...Profiler.events, + ...PWA.events, + ...Runtime.events, + ...Schema.events, + ...Security.events, + ...ServiceWorker.events, + ...SmartCardEmulation.events, + ...Storage.events, + ...SystemInfo.events, + ...Target.events, + ...Tethering.events, + ...Tracing.events, + ...WebAudio.events, + ...WebAuthn.events, + ...WebMCP.events, } as const; export const types = { zod } as const; export const cdp = { types, commands, events } as const; diff --git a/types/zod/Accessibility.ts b/types/zod/Accessibility.ts new file mode 100644 index 0000000..37f3806 --- /dev/null +++ b/types/zod/Accessibility.ts @@ -0,0 +1,83 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Page from "./Page.js"; +import * as Runtime from "./Runtime.js"; + +export const AXNodeId = withCdpMeta(z.string(), "Accessibility.AXNodeId", "type"); +export const AXValueType = withCdpMeta(z.enum(["boolean", "tristate", "booleanOrUndefined", "idref", "idrefList", "integer", "node", "nodeList", "number", "string", "computedString", "token", "tokenList", "domRelation", "role", "internalRole", "valueUndefined"]), "Accessibility.AXValueType", "type"); +export const AXValueSourceType = withCdpMeta(z.enum(["attribute", "implicit", "style", "contents", "placeholder", "relatedElement"]), "Accessibility.AXValueSourceType", "type"); +export const AXValueNativeSourceType = withCdpMeta(z.enum(["description", "figcaption", "label", "labelfor", "labelwrapped", "legend", "rubyannotation", "tablecaption", "title", "other"]), "Accessibility.AXValueNativeSourceType", "type"); +export const AXValueSource = withCdpMeta(z.object({ "type": z.lazy(() => AXValueSourceType), "value": z.lazy(() => AXValue).optional(), "attribute": z.string().optional(), "attributeValue": z.lazy(() => AXValue).optional(), "superseded": z.boolean().optional(), "nativeSource": z.lazy(() => AXValueNativeSourceType).optional(), "nativeSourceValue": z.lazy(() => AXValue).optional(), "invalid": z.boolean().optional(), "invalidReason": z.string().optional() }).passthrough(), "Accessibility.AXValueSource", "type"); +export const AXRelatedNode = withCdpMeta(z.object({ "backendDOMNodeId": z.lazy(() => DOM.BackendNodeId), "idref": z.string().optional(), "text": z.string().optional() }).passthrough(), "Accessibility.AXRelatedNode", "type"); +export const AXProperty = withCdpMeta(z.object({ "name": z.lazy(() => AXPropertyName), "value": z.lazy(() => AXValue) }).passthrough(), "Accessibility.AXProperty", "type"); +export const AXValue = withCdpMeta(z.object({ "type": z.lazy(() => AXValueType), "value": z.any().optional(), "relatedNodes": z.array(z.lazy(() => AXRelatedNode)).optional(), "sources": z.array(z.lazy(() => AXValueSource)).optional() }).passthrough(), "Accessibility.AXValue", "type"); +export const AXPropertyName = withCdpMeta(z.enum(["actions", "busy", "disabled", "editable", "focusable", "focused", "hidden", "hiddenRoot", "invalid", "keyshortcuts", "settable", "roledescription", "live", "atomic", "relevant", "root", "autocomplete", "hasPopup", "level", "multiselectable", "orientation", "multiline", "readonly", "required", "valuemin", "valuemax", "valuetext", "checked", "expanded", "modal", "pressed", "selected", "activedescendant", "controls", "describedby", "details", "errormessage", "flowto", "labelledby", "owns", "url", "activeFullscreenElement", "activeModalDialog", "activeAriaModalDialog", "ariaHiddenElement", "ariaHiddenSubtree", "emptyAlt", "emptyText", "inertElement", "inertSubtree", "labelContainer", "labelFor", "notRendered", "notVisible", "presentationalRole", "probablyPresentational", "inactiveCarouselTabContent", "uninteresting"]), "Accessibility.AXPropertyName", "type"); +export const AXNode = withCdpMeta(z.object({ "nodeId": z.lazy(() => AXNodeId), "ignored": z.boolean(), "ignoredReasons": z.array(z.lazy(() => AXProperty)).optional(), "role": z.lazy(() => AXValue).optional(), "chromeRole": z.lazy(() => AXValue).optional(), "name": z.lazy(() => AXValue).optional(), "description": z.lazy(() => AXValue).optional(), "value": z.lazy(() => AXValue).optional(), "properties": z.array(z.lazy(() => AXProperty)).optional(), "parentId": z.lazy(() => AXNodeId).optional(), "childIds": z.array(z.lazy(() => AXNodeId)).optional(), "backendDOMNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "frameId": z.lazy(() => Page.FrameId).optional() }).passthrough(), "Accessibility.AXNode", "type"); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Accessibility.disable.params", "commandParams", { method: "Accessibility.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Accessibility.disable.result", "commandResult", { method: "Accessibility.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Accessibility.enable.params", "commandParams", { method: "Accessibility.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Accessibility.enable.result", "commandResult", { method: "Accessibility.enable" }); +export const GetPartialAXTreeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId).optional(), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional(), "fetchRelatives": z.boolean().optional() }).passthrough(), "Accessibility.getPartialAXTree.params", "commandParams", { method: "Accessibility.getPartialAXTree" }); +export const GetPartialAXTreeResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => AXNode)) }).passthrough(), "Accessibility.getPartialAXTree.result", "commandResult", { method: "Accessibility.getPartialAXTree" }); +export const GetFullAXTreeParams = withCdpMeta(z.object({ "depth": z.number().int().optional(), "frameId": z.lazy(() => Page.FrameId).optional() }).passthrough(), "Accessibility.getFullAXTree.params", "commandParams", { method: "Accessibility.getFullAXTree" }); +export const GetFullAXTreeResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => AXNode)) }).passthrough(), "Accessibility.getFullAXTree.result", "commandResult", { method: "Accessibility.getFullAXTree" }); +export const GetRootAXNodeParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId).optional() }).passthrough(), "Accessibility.getRootAXNode.params", "commandParams", { method: "Accessibility.getRootAXNode" }); +export const GetRootAXNodeResult = withCdpMeta(z.object({ "node": z.lazy(() => AXNode) }).passthrough(), "Accessibility.getRootAXNode.result", "commandResult", { method: "Accessibility.getRootAXNode" }); +export const GetAXNodeAndAncestorsParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId).optional(), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional() }).passthrough(), "Accessibility.getAXNodeAndAncestors.params", "commandParams", { method: "Accessibility.getAXNodeAndAncestors" }); +export const GetAXNodeAndAncestorsResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => AXNode)) }).passthrough(), "Accessibility.getAXNodeAndAncestors.result", "commandResult", { method: "Accessibility.getAXNodeAndAncestors" }); +export const GetChildAXNodesParams = withCdpMeta(z.object({ "id": z.lazy(() => AXNodeId), "frameId": z.lazy(() => Page.FrameId).optional() }).passthrough(), "Accessibility.getChildAXNodes.params", "commandParams", { method: "Accessibility.getChildAXNodes" }); +export const GetChildAXNodesResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => AXNode)) }).passthrough(), "Accessibility.getChildAXNodes.result", "commandResult", { method: "Accessibility.getChildAXNodes" }); +export const QueryAXTreeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId).optional(), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional(), "accessibleName": z.string().optional(), "role": z.string().optional() }).passthrough(), "Accessibility.queryAXTree.params", "commandParams", { method: "Accessibility.queryAXTree" }); +export const QueryAXTreeResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => AXNode)) }).passthrough(), "Accessibility.queryAXTree.result", "commandResult", { method: "Accessibility.queryAXTree" }); +export const LoadCompleteEvent = withCdpMeta(z.object({ "root": z.lazy(() => AXNode) }).passthrough(), "Accessibility.loadComplete", "event", { phase: "event" }); +export const NodesUpdatedEvent = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => AXNode)) }).passthrough(), "Accessibility.nodesUpdated", "event", { phase: "event" }); + +export const zod = { + AXNodeId: AXNodeId, + AXValueType: AXValueType, + AXValueSourceType: AXValueSourceType, + AXValueNativeSourceType: AXValueNativeSourceType, + AXValueSource: AXValueSource, + AXRelatedNode: AXRelatedNode, + AXProperty: AXProperty, + AXValue: AXValue, + AXPropertyName: AXPropertyName, + AXNode: AXNode, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + GetPartialAXTreeParams: GetPartialAXTreeParams, + GetPartialAXTreeResult: GetPartialAXTreeResult, + GetFullAXTreeParams: GetFullAXTreeParams, + GetFullAXTreeResult: GetFullAXTreeResult, + GetRootAXNodeParams: GetRootAXNodeParams, + GetRootAXNodeResult: GetRootAXNodeResult, + GetAXNodeAndAncestorsParams: GetAXNodeAndAncestorsParams, + GetAXNodeAndAncestorsResult: GetAXNodeAndAncestorsResult, + GetChildAXNodesParams: GetChildAXNodesParams, + GetChildAXNodesResult: GetChildAXNodesResult, + QueryAXTreeParams: QueryAXTreeParams, + QueryAXTreeResult: QueryAXTreeResult, + LoadCompleteEvent: LoadCompleteEvent, + NodesUpdatedEvent: NodesUpdatedEvent, +} as const; +export const commands = { + "Accessibility.disable": { params: DisableParams, result: DisableResult }, + "Accessibility.enable": { params: EnableParams, result: EnableResult }, + "Accessibility.getPartialAXTree": { params: GetPartialAXTreeParams, result: GetPartialAXTreeResult }, + "Accessibility.getFullAXTree": { params: GetFullAXTreeParams, result: GetFullAXTreeResult }, + "Accessibility.getRootAXNode": { params: GetRootAXNodeParams, result: GetRootAXNodeResult }, + "Accessibility.getAXNodeAndAncestors": { params: GetAXNodeAndAncestorsParams, result: GetAXNodeAndAncestorsResult }, + "Accessibility.getChildAXNodes": { params: GetChildAXNodesParams, result: GetChildAXNodesResult }, + "Accessibility.queryAXTree": { params: QueryAXTreeParams, result: QueryAXTreeResult }, +} as const; +export const events = { + "Accessibility.loadComplete": LoadCompleteEvent, + "Accessibility.nodesUpdated": NodesUpdatedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Animation.ts b/types/zod/Animation.ts new file mode 100644 index 0000000..b1726d7 --- /dev/null +++ b/types/zod/Animation.ts @@ -0,0 +1,88 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Runtime from "./Runtime.js"; + +export const Animation = withCdpMeta(z.object({ "id": z.string(), "name": z.string(), "pausedState": z.boolean(), "playState": z.string(), "playbackRate": z.number(), "startTime": z.number(), "currentTime": z.number(), "type": z.enum(["CSSTransition", "CSSAnimation", "WebAnimation"]), "source": z.lazy(() => AnimationEffect).optional(), "cssId": z.string().optional(), "viewOrScrollTimeline": z.lazy(() => ViewOrScrollTimeline).optional() }).passthrough(), "Animation.Animation", "type"); +export const ViewOrScrollTimeline = withCdpMeta(z.object({ "sourceNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "startOffset": z.number().optional(), "endOffset": z.number().optional(), "subjectNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "axis": z.lazy(() => DOM.ScrollOrientation) }).passthrough(), "Animation.ViewOrScrollTimeline", "type"); +export const AnimationEffect = withCdpMeta(z.object({ "delay": z.number(), "endDelay": z.number(), "iterationStart": z.number(), "iterations": z.number().optional(), "duration": z.number(), "direction": z.string(), "fill": z.string(), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "keyframesRule": z.lazy(() => KeyframesRule).optional(), "easing": z.string() }).passthrough(), "Animation.AnimationEffect", "type"); +export const KeyframesRule = withCdpMeta(z.object({ "name": z.string().optional(), "keyframes": z.array(z.lazy(() => KeyframeStyle)) }).passthrough(), "Animation.KeyframesRule", "type"); +export const KeyframeStyle = withCdpMeta(z.object({ "offset": z.string(), "easing": z.string() }).passthrough(), "Animation.KeyframeStyle", "type"); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Animation.disable.params", "commandParams", { method: "Animation.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Animation.disable.result", "commandResult", { method: "Animation.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Animation.enable.params", "commandParams", { method: "Animation.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Animation.enable.result", "commandResult", { method: "Animation.enable" }); +export const GetCurrentTimeParams = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Animation.getCurrentTime.params", "commandParams", { method: "Animation.getCurrentTime" }); +export const GetCurrentTimeResult = withCdpMeta(z.object({ "currentTime": z.number() }).passthrough(), "Animation.getCurrentTime.result", "commandResult", { method: "Animation.getCurrentTime" }); +export const GetPlaybackRateParams = withCdpMeta(z.object({ }).passthrough(), "Animation.getPlaybackRate.params", "commandParams", { method: "Animation.getPlaybackRate" }); +export const GetPlaybackRateResult = withCdpMeta(z.object({ "playbackRate": z.number() }).passthrough(), "Animation.getPlaybackRate.result", "commandResult", { method: "Animation.getPlaybackRate" }); +export const ReleaseAnimationsParams = withCdpMeta(z.object({ "animations": z.array(z.string()) }).passthrough(), "Animation.releaseAnimations.params", "commandParams", { method: "Animation.releaseAnimations" }); +export const ReleaseAnimationsResult = withCdpMeta(z.object({ }).passthrough(), "Animation.releaseAnimations.result", "commandResult", { method: "Animation.releaseAnimations" }); +export const ResolveAnimationParams = withCdpMeta(z.object({ "animationId": z.string() }).passthrough(), "Animation.resolveAnimation.params", "commandParams", { method: "Animation.resolveAnimation" }); +export const ResolveAnimationResult = withCdpMeta(z.object({ "remoteObject": z.lazy(() => Runtime.RemoteObject) }).passthrough(), "Animation.resolveAnimation.result", "commandResult", { method: "Animation.resolveAnimation" }); +export const SeekAnimationsParams = withCdpMeta(z.object({ "animations": z.array(z.string()), "currentTime": z.number() }).passthrough(), "Animation.seekAnimations.params", "commandParams", { method: "Animation.seekAnimations" }); +export const SeekAnimationsResult = withCdpMeta(z.object({ }).passthrough(), "Animation.seekAnimations.result", "commandResult", { method: "Animation.seekAnimations" }); +export const SetPausedParams = withCdpMeta(z.object({ "animations": z.array(z.string()), "paused": z.boolean() }).passthrough(), "Animation.setPaused.params", "commandParams", { method: "Animation.setPaused" }); +export const SetPausedResult = withCdpMeta(z.object({ }).passthrough(), "Animation.setPaused.result", "commandResult", { method: "Animation.setPaused" }); +export const SetPlaybackRateParams = withCdpMeta(z.object({ "playbackRate": z.number() }).passthrough(), "Animation.setPlaybackRate.params", "commandParams", { method: "Animation.setPlaybackRate" }); +export const SetPlaybackRateResult = withCdpMeta(z.object({ }).passthrough(), "Animation.setPlaybackRate.result", "commandResult", { method: "Animation.setPlaybackRate" }); +export const SetTimingParams = withCdpMeta(z.object({ "animationId": z.string(), "duration": z.number(), "delay": z.number() }).passthrough(), "Animation.setTiming.params", "commandParams", { method: "Animation.setTiming" }); +export const SetTimingResult = withCdpMeta(z.object({ }).passthrough(), "Animation.setTiming.result", "commandResult", { method: "Animation.setTiming" }); +export const AnimationCanceledEvent = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Animation.animationCanceled", "event", { phase: "event" }); +export const AnimationCreatedEvent = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Animation.animationCreated", "event", { phase: "event" }); +export const AnimationStartedEvent = withCdpMeta(z.object({ "animation": z.lazy(() => Animation) }).passthrough(), "Animation.animationStarted", "event", { phase: "event" }); +export const AnimationUpdatedEvent = withCdpMeta(z.object({ "animation": z.lazy(() => Animation) }).passthrough(), "Animation.animationUpdated", "event", { phase: "event" }); + +export const zod = { + Animation: Animation, + ViewOrScrollTimeline: ViewOrScrollTimeline, + AnimationEffect: AnimationEffect, + KeyframesRule: KeyframesRule, + KeyframeStyle: KeyframeStyle, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + GetCurrentTimeParams: GetCurrentTimeParams, + GetCurrentTimeResult: GetCurrentTimeResult, + GetPlaybackRateParams: GetPlaybackRateParams, + GetPlaybackRateResult: GetPlaybackRateResult, + ReleaseAnimationsParams: ReleaseAnimationsParams, + ReleaseAnimationsResult: ReleaseAnimationsResult, + ResolveAnimationParams: ResolveAnimationParams, + ResolveAnimationResult: ResolveAnimationResult, + SeekAnimationsParams: SeekAnimationsParams, + SeekAnimationsResult: SeekAnimationsResult, + SetPausedParams: SetPausedParams, + SetPausedResult: SetPausedResult, + SetPlaybackRateParams: SetPlaybackRateParams, + SetPlaybackRateResult: SetPlaybackRateResult, + SetTimingParams: SetTimingParams, + SetTimingResult: SetTimingResult, + AnimationCanceledEvent: AnimationCanceledEvent, + AnimationCreatedEvent: AnimationCreatedEvent, + AnimationStartedEvent: AnimationStartedEvent, + AnimationUpdatedEvent: AnimationUpdatedEvent, +} as const; +export const commands = { + "Animation.disable": { params: DisableParams, result: DisableResult }, + "Animation.enable": { params: EnableParams, result: EnableResult }, + "Animation.getCurrentTime": { params: GetCurrentTimeParams, result: GetCurrentTimeResult }, + "Animation.getPlaybackRate": { params: GetPlaybackRateParams, result: GetPlaybackRateResult }, + "Animation.releaseAnimations": { params: ReleaseAnimationsParams, result: ReleaseAnimationsResult }, + "Animation.resolveAnimation": { params: ResolveAnimationParams, result: ResolveAnimationResult }, + "Animation.seekAnimations": { params: SeekAnimationsParams, result: SeekAnimationsResult }, + "Animation.setPaused": { params: SetPausedParams, result: SetPausedResult }, + "Animation.setPlaybackRate": { params: SetPlaybackRateParams, result: SetPlaybackRateResult }, + "Animation.setTiming": { params: SetTimingParams, result: SetTimingResult }, +} as const; +export const events = { + "Animation.animationCanceled": AnimationCanceledEvent, + "Animation.animationCreated": AnimationCreatedEvent, + "Animation.animationStarted": AnimationStartedEvent, + "Animation.animationUpdated": AnimationUpdatedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Audits.ts b/types/zod/Audits.ts new file mode 100644 index 0000000..7e41056 --- /dev/null +++ b/types/zod/Audits.ts @@ -0,0 +1,173 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Network from "./Network.js"; +import * as Page from "./Page.js"; +import * as Runtime from "./Runtime.js"; + +export const AffectedCookie = withCdpMeta(z.object({ "name": z.string(), "path": z.string(), "domain": z.string() }).passthrough(), "Audits.AffectedCookie", "type"); +export const AffectedRequest = withCdpMeta(z.object({ "requestId": z.lazy(() => Network.RequestId).optional(), "url": z.string() }).passthrough(), "Audits.AffectedRequest", "type"); +export const AffectedFrame = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId) }).passthrough(), "Audits.AffectedFrame", "type"); +export const CookieExclusionReason = withCdpMeta(z.enum(["ExcludeSameSiteUnspecifiedTreatedAsLax", "ExcludeSameSiteNoneInsecure", "ExcludeSameSiteLax", "ExcludeSameSiteStrict", "ExcludeDomainNonASCII", "ExcludeThirdPartyCookieBlockedInFirstPartySet", "ExcludeThirdPartyPhaseout", "ExcludePortMismatch", "ExcludeSchemeMismatch"]), "Audits.CookieExclusionReason", "type"); +export const CookieWarningReason = withCdpMeta(z.enum(["WarnSameSiteUnspecifiedCrossSiteContext", "WarnSameSiteNoneInsecure", "WarnSameSiteUnspecifiedLaxAllowUnsafe", "WarnSameSiteStrictLaxDowngradeStrict", "WarnSameSiteStrictCrossDowngradeStrict", "WarnSameSiteStrictCrossDowngradeLax", "WarnSameSiteLaxCrossDowngradeStrict", "WarnSameSiteLaxCrossDowngradeLax", "WarnAttributeValueExceedsMaxSize", "WarnDomainNonASCII", "WarnThirdPartyPhaseout", "WarnCrossSiteRedirectDowngradeChangesInclusion", "WarnDeprecationTrialMetadata", "WarnThirdPartyCookieHeuristic"]), "Audits.CookieWarningReason", "type"); +export const CookieOperation = withCdpMeta(z.enum(["SetCookie", "ReadCookie"]), "Audits.CookieOperation", "type"); +export const InsightType = withCdpMeta(z.enum(["GitHubResource", "GracePeriod", "Heuristics"]), "Audits.InsightType", "type"); +export const CookieIssueInsight = withCdpMeta(z.object({ "type": z.lazy(() => InsightType), "tableEntryUrl": z.string().optional() }).passthrough(), "Audits.CookieIssueInsight", "type"); +export const CookieIssueDetails = withCdpMeta(z.object({ "cookie": z.lazy(() => AffectedCookie).optional(), "rawCookieLine": z.string().optional(), "cookieWarningReasons": z.array(z.lazy(() => CookieWarningReason)), "cookieExclusionReasons": z.array(z.lazy(() => CookieExclusionReason)), "operation": z.lazy(() => CookieOperation), "siteForCookies": z.string().optional(), "cookieUrl": z.string().optional(), "request": z.lazy(() => AffectedRequest).optional(), "insight": z.lazy(() => CookieIssueInsight).optional() }).passthrough(), "Audits.CookieIssueDetails", "type"); +export const PerformanceIssueType = withCdpMeta(z.enum(["DocumentCookie"]), "Audits.PerformanceIssueType", "type"); +export const PerformanceIssueDetails = withCdpMeta(z.object({ "performanceIssueType": z.lazy(() => PerformanceIssueType), "sourceCodeLocation": z.lazy(() => SourceCodeLocation).optional() }).passthrough(), "Audits.PerformanceIssueDetails", "type"); +export const MixedContentResolutionStatus = withCdpMeta(z.enum(["MixedContentBlocked", "MixedContentAutomaticallyUpgraded", "MixedContentWarning"]), "Audits.MixedContentResolutionStatus", "type"); +export const MixedContentResourceType = withCdpMeta(z.enum(["AttributionSrc", "Audio", "Beacon", "CSPReport", "Download", "EventSource", "Favicon", "Font", "Form", "Frame", "Image", "Import", "JSON", "Manifest", "Ping", "PluginData", "PluginResource", "Prefetch", "Resource", "Script", "ServiceWorker", "SharedWorker", "SpeculationRules", "Stylesheet", "Track", "Video", "Worker", "XMLHttpRequest", "XSLT"]), "Audits.MixedContentResourceType", "type"); +export const MixedContentIssueDetails = withCdpMeta(z.object({ "resourceType": z.lazy(() => MixedContentResourceType).optional(), "resolutionStatus": z.lazy(() => MixedContentResolutionStatus), "insecureURL": z.string(), "mainResourceURL": z.string(), "request": z.lazy(() => AffectedRequest).optional(), "frame": z.lazy(() => AffectedFrame).optional() }).passthrough(), "Audits.MixedContentIssueDetails", "type"); +export const BlockedByResponseReason = withCdpMeta(z.enum(["CoepFrameResourceNeedsCoepHeader", "CoopSandboxedIFrameCannotNavigateToCoopPage", "CorpNotSameOrigin", "CorpNotSameOriginAfterDefaultedToSameOriginByCoep", "CorpNotSameOriginAfterDefaultedToSameOriginByDip", "CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip", "CorpNotSameSite", "SRIMessageSignatureMismatch"]), "Audits.BlockedByResponseReason", "type"); +export const BlockedByResponseIssueDetails = withCdpMeta(z.object({ "request": z.lazy(() => AffectedRequest), "parentFrame": z.lazy(() => AffectedFrame).optional(), "blockedFrame": z.lazy(() => AffectedFrame).optional(), "reason": z.lazy(() => BlockedByResponseReason) }).passthrough(), "Audits.BlockedByResponseIssueDetails", "type"); +export const HeavyAdResolutionStatus = withCdpMeta(z.enum(["HeavyAdBlocked", "HeavyAdWarning"]), "Audits.HeavyAdResolutionStatus", "type"); +export const HeavyAdReason = withCdpMeta(z.enum(["NetworkTotalLimit", "CpuTotalLimit", "CpuPeakLimit"]), "Audits.HeavyAdReason", "type"); +export const HeavyAdIssueDetails = withCdpMeta(z.object({ "resolution": z.lazy(() => HeavyAdResolutionStatus), "reason": z.lazy(() => HeavyAdReason), "frame": z.lazy(() => AffectedFrame) }).passthrough(), "Audits.HeavyAdIssueDetails", "type"); +export const ContentSecurityPolicyViolationType = withCdpMeta(z.enum(["kInlineViolation", "kEvalViolation", "kURLViolation", "kSRIViolation", "kTrustedTypesSinkViolation", "kTrustedTypesPolicyViolation", "kWasmEvalViolation"]), "Audits.ContentSecurityPolicyViolationType", "type"); +export const SourceCodeLocation = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId).optional(), "url": z.string(), "lineNumber": z.number().int(), "columnNumber": z.number().int() }).passthrough(), "Audits.SourceCodeLocation", "type"); +export const ContentSecurityPolicyIssueDetails = withCdpMeta(z.object({ "blockedURL": z.string().optional(), "violatedDirective": z.string(), "isReportOnly": z.boolean(), "contentSecurityPolicyViolationType": z.lazy(() => ContentSecurityPolicyViolationType), "frameAncestor": z.lazy(() => AffectedFrame).optional(), "sourceCodeLocation": z.lazy(() => SourceCodeLocation).optional(), "violatingNodeId": z.lazy(() => DOM.BackendNodeId).optional() }).passthrough(), "Audits.ContentSecurityPolicyIssueDetails", "type"); +export const SharedArrayBufferIssueType = withCdpMeta(z.enum(["TransferIssue", "CreationIssue"]), "Audits.SharedArrayBufferIssueType", "type"); +export const SharedArrayBufferIssueDetails = withCdpMeta(z.object({ "sourceCodeLocation": z.lazy(() => SourceCodeLocation), "isWarning": z.boolean(), "type": z.lazy(() => SharedArrayBufferIssueType) }).passthrough(), "Audits.SharedArrayBufferIssueDetails", "type"); +export const CorsIssueDetails = withCdpMeta(z.object({ "corsErrorStatus": z.lazy(() => Network.CorsErrorStatus), "isWarning": z.boolean(), "request": z.lazy(() => AffectedRequest), "location": z.lazy(() => SourceCodeLocation).optional(), "initiatorOrigin": z.string().optional(), "resourceIPAddressSpace": z.lazy(() => Network.IPAddressSpace).optional(), "clientSecurityState": z.lazy(() => Network.ClientSecurityState).optional() }).passthrough(), "Audits.CorsIssueDetails", "type"); +export const AttributionReportingIssueType = withCdpMeta(z.enum(["PermissionPolicyDisabled", "UntrustworthyReportingOrigin", "InsecureContext", "InvalidHeader", "InvalidRegisterTriggerHeader", "SourceAndTriggerHeaders", "SourceIgnored", "TriggerIgnored", "OsSourceIgnored", "OsTriggerIgnored", "InvalidRegisterOsSourceHeader", "InvalidRegisterOsTriggerHeader", "WebAndOsHeaders", "NoWebOrOsSupport", "NavigationRegistrationWithoutTransientUserActivation", "InvalidInfoHeader", "NoRegisterSourceHeader", "NoRegisterTriggerHeader", "NoRegisterOsSourceHeader", "NoRegisterOsTriggerHeader", "NavigationRegistrationUniqueScopeAlreadySet"]), "Audits.AttributionReportingIssueType", "type"); +export const SharedDictionaryError = withCdpMeta(z.enum(["UseErrorCrossOriginNoCorsRequest", "UseErrorDictionaryLoadFailure", "UseErrorMatchingDictionaryNotUsed", "UseErrorUnexpectedContentDictionaryHeader", "WriteErrorCossOriginNoCorsRequest", "WriteErrorDisallowedBySettings", "WriteErrorExpiredResponse", "WriteErrorFeatureDisabled", "WriteErrorInsufficientResources", "WriteErrorInvalidMatchField", "WriteErrorInvalidStructuredHeader", "WriteErrorInvalidTTLField", "WriteErrorNavigationRequest", "WriteErrorNoMatchField", "WriteErrorNonIntegerTTLField", "WriteErrorNonListMatchDestField", "WriteErrorNonSecureContext", "WriteErrorNonStringIdField", "WriteErrorNonStringInMatchDestList", "WriteErrorNonStringMatchField", "WriteErrorNonTokenTypeField", "WriteErrorRequestAborted", "WriteErrorShuttingDown", "WriteErrorTooLongIdField", "WriteErrorUnsupportedType"]), "Audits.SharedDictionaryError", "type"); +export const SRIMessageSignatureError = withCdpMeta(z.enum(["MissingSignatureHeader", "MissingSignatureInputHeader", "InvalidSignatureHeader", "InvalidSignatureInputHeader", "SignatureHeaderValueIsNotByteSequence", "SignatureHeaderValueIsParameterized", "SignatureHeaderValueIsIncorrectLength", "SignatureInputHeaderMissingLabel", "SignatureInputHeaderValueNotInnerList", "SignatureInputHeaderValueMissingComponents", "SignatureInputHeaderInvalidComponentType", "SignatureInputHeaderInvalidComponentName", "SignatureInputHeaderInvalidHeaderComponentParameter", "SignatureInputHeaderInvalidDerivedComponentParameter", "SignatureInputHeaderKeyIdLength", "SignatureInputHeaderInvalidParameter", "SignatureInputHeaderMissingRequiredParameters", "ValidationFailedSignatureExpired", "ValidationFailedInvalidLength", "ValidationFailedSignatureMismatch", "ValidationFailedIntegrityMismatch"]), "Audits.SRIMessageSignatureError", "type"); +export const UnencodedDigestError = withCdpMeta(z.enum(["MalformedDictionary", "UnknownAlgorithm", "IncorrectDigestType", "IncorrectDigestLength"]), "Audits.UnencodedDigestError", "type"); +export const ConnectionAllowlistError = withCdpMeta(z.enum(["InvalidHeader", "MoreThanOneList", "ItemNotInnerList", "InvalidAllowlistItemType", "ReportingEndpointNotToken", "InvalidUrlPattern"]), "Audits.ConnectionAllowlistError", "type"); +export const AttributionReportingIssueDetails = withCdpMeta(z.object({ "violationType": z.lazy(() => AttributionReportingIssueType), "request": z.lazy(() => AffectedRequest).optional(), "violatingNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "invalidParameter": z.string().optional() }).passthrough(), "Audits.AttributionReportingIssueDetails", "type"); +export const QuirksModeIssueDetails = withCdpMeta(z.object({ "isLimitedQuirksMode": z.boolean(), "documentNodeId": z.lazy(() => DOM.BackendNodeId), "url": z.string(), "frameId": z.lazy(() => Page.FrameId), "loaderId": z.lazy(() => Network.LoaderId) }).passthrough(), "Audits.QuirksModeIssueDetails", "type"); +export const NavigatorUserAgentIssueDetails = withCdpMeta(z.object({ "url": z.string(), "location": z.lazy(() => SourceCodeLocation).optional() }).passthrough(), "Audits.NavigatorUserAgentIssueDetails", "type"); +export const SharedDictionaryIssueDetails = withCdpMeta(z.object({ "sharedDictionaryError": z.lazy(() => SharedDictionaryError), "request": z.lazy(() => AffectedRequest) }).passthrough(), "Audits.SharedDictionaryIssueDetails", "type"); +export const SRIMessageSignatureIssueDetails = withCdpMeta(z.object({ "error": z.lazy(() => SRIMessageSignatureError), "signatureBase": z.string(), "integrityAssertions": z.array(z.string()), "request": z.lazy(() => AffectedRequest) }).passthrough(), "Audits.SRIMessageSignatureIssueDetails", "type"); +export const UnencodedDigestIssueDetails = withCdpMeta(z.object({ "error": z.lazy(() => UnencodedDigestError), "request": z.lazy(() => AffectedRequest) }).passthrough(), "Audits.UnencodedDigestIssueDetails", "type"); +export const ConnectionAllowlistIssueDetails = withCdpMeta(z.object({ "error": z.lazy(() => ConnectionAllowlistError), "request": z.lazy(() => AffectedRequest) }).passthrough(), "Audits.ConnectionAllowlistIssueDetails", "type"); +export const GenericIssueErrorType = withCdpMeta(z.enum(["FormLabelForNameError", "FormDuplicateIdForInputError", "FormInputWithNoLabelError", "FormAutocompleteAttributeEmptyError", "FormEmptyIdAndNameAttributesForInputError", "FormAriaLabelledByToNonExistingIdError", "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", "FormLabelHasNeitherForNorNestedInputError", "FormLabelForMatchesNonExistingIdError", "FormInputHasWrongButWellIntendedAutocompleteValueError", "ResponseWasBlockedByORB", "NavigationEntryMarkedSkippable", "AutofillAndManualTextPolicyControlledFeaturesInfo", "AutofillPolicyControlledFeatureInfo", "ManualTextPolicyControlledFeatureInfo", "FormModelContextParameterMissingTitleAndDescription", "FormModelContextMissingToolName", "FormModelContextMissingToolDescription", "FormModelContextRequiredParameterMissingName", "FormModelContextParameterMissingName"]), "Audits.GenericIssueErrorType", "type"); +export const GenericIssueDetails = withCdpMeta(z.object({ "errorType": z.lazy(() => GenericIssueErrorType), "frameId": z.lazy(() => Page.FrameId).optional(), "violatingNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "violatingNodeAttribute": z.string().optional(), "request": z.lazy(() => AffectedRequest).optional() }).passthrough(), "Audits.GenericIssueDetails", "type"); +export const DeprecationIssueDetails = withCdpMeta(z.object({ "affectedFrame": z.lazy(() => AffectedFrame).optional(), "sourceCodeLocation": z.lazy(() => SourceCodeLocation), "type": z.string() }).passthrough(), "Audits.DeprecationIssueDetails", "type"); +export const BounceTrackingIssueDetails = withCdpMeta(z.object({ "trackingSites": z.array(z.string()) }).passthrough(), "Audits.BounceTrackingIssueDetails", "type"); +export const CookieDeprecationMetadataIssueDetails = withCdpMeta(z.object({ "allowedSites": z.array(z.string()), "optOutPercentage": z.number(), "isOptOutTopLevel": z.boolean(), "operation": z.lazy(() => CookieOperation) }).passthrough(), "Audits.CookieDeprecationMetadataIssueDetails", "type"); +export const ClientHintIssueReason = withCdpMeta(z.enum(["MetaTagAllowListInvalidOrigin", "MetaTagModifiedHTML"]), "Audits.ClientHintIssueReason", "type"); +export const FederatedAuthRequestIssueDetails = withCdpMeta(z.object({ "federatedAuthRequestIssueReason": z.lazy(() => FederatedAuthRequestIssueReason) }).passthrough(), "Audits.FederatedAuthRequestIssueDetails", "type"); +export const FederatedAuthRequestIssueReason = withCdpMeta(z.enum(["ShouldEmbargo", "TooManyRequests", "WellKnownHttpNotFound", "WellKnownNoResponse", "WellKnownInvalidResponse", "WellKnownListEmpty", "WellKnownInvalidContentType", "ConfigNotInWellKnown", "WellKnownTooBig", "ConfigHttpNotFound", "ConfigNoResponse", "ConfigInvalidResponse", "ConfigInvalidContentType", "IdpNotPotentiallyTrustworthy", "DisabledInSettings", "DisabledInFlags", "ErrorFetchingSignin", "InvalidSigninResponse", "AccountsHttpNotFound", "AccountsNoResponse", "AccountsInvalidResponse", "AccountsListEmpty", "AccountsInvalidContentType", "IdTokenHttpNotFound", "IdTokenNoResponse", "IdTokenInvalidResponse", "IdTokenIdpErrorResponse", "IdTokenCrossSiteIdpErrorResponse", "IdTokenInvalidRequest", "IdTokenInvalidContentType", "ErrorIdToken", "Canceled", "RpPageNotVisible", "SilentMediationFailure", "NotSignedInWithIdp", "MissingTransientUserActivation", "ReplacedByActiveMode", "RelyingPartyOriginIsOpaque", "TypeNotMatching", "UiDismissedNoEmbargo", "CorsError", "SuppressedBySegmentationPlatform"]), "Audits.FederatedAuthRequestIssueReason", "type"); +export const FederatedAuthUserInfoRequestIssueDetails = withCdpMeta(z.object({ "federatedAuthUserInfoRequestIssueReason": z.lazy(() => FederatedAuthUserInfoRequestIssueReason) }).passthrough(), "Audits.FederatedAuthUserInfoRequestIssueDetails", "type"); +export const FederatedAuthUserInfoRequestIssueReason = withCdpMeta(z.enum(["NotSameOrigin", "NotIframe", "NotPotentiallyTrustworthy", "NoApiPermission", "NotSignedInWithIdp", "NoAccountSharingPermission", "InvalidConfigOrWellKnown", "InvalidAccountsResponse", "NoReturningUserFromFetchedAccounts"]), "Audits.FederatedAuthUserInfoRequestIssueReason", "type"); +export const ClientHintIssueDetails = withCdpMeta(z.object({ "sourceCodeLocation": z.lazy(() => SourceCodeLocation), "clientHintIssueReason": z.lazy(() => ClientHintIssueReason) }).passthrough(), "Audits.ClientHintIssueDetails", "type"); +export const FailedRequestInfo = withCdpMeta(z.object({ "url": z.string(), "failureMessage": z.string(), "requestId": z.lazy(() => Network.RequestId).optional() }).passthrough(), "Audits.FailedRequestInfo", "type"); +export const PartitioningBlobURLInfo = withCdpMeta(z.enum(["BlockedCrossPartitionFetching", "EnforceNoopenerForNavigation"]), "Audits.PartitioningBlobURLInfo", "type"); +export const PartitioningBlobURLIssueDetails = withCdpMeta(z.object({ "url": z.string(), "partitioningBlobURLInfo": z.lazy(() => PartitioningBlobURLInfo) }).passthrough(), "Audits.PartitioningBlobURLIssueDetails", "type"); +export const ElementAccessibilityIssueReason = withCdpMeta(z.enum(["DisallowedSelectChild", "DisallowedOptGroupChild", "NonPhrasingContentOptionChild", "InteractiveContentOptionChild", "InteractiveContentLegendChild", "InteractiveContentSummaryDescendant"]), "Audits.ElementAccessibilityIssueReason", "type"); +export const ElementAccessibilityIssueDetails = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.BackendNodeId), "elementAccessibilityIssueReason": z.lazy(() => ElementAccessibilityIssueReason), "hasDisallowedAttributes": z.boolean() }).passthrough(), "Audits.ElementAccessibilityIssueDetails", "type"); +export const StyleSheetLoadingIssueReason = withCdpMeta(z.enum(["LateImportRule", "RequestFailed"]), "Audits.StyleSheetLoadingIssueReason", "type"); +export const StylesheetLoadingIssueDetails = withCdpMeta(z.object({ "sourceCodeLocation": z.lazy(() => SourceCodeLocation), "styleSheetLoadingIssueReason": z.lazy(() => StyleSheetLoadingIssueReason), "failedRequestInfo": z.lazy(() => FailedRequestInfo).optional() }).passthrough(), "Audits.StylesheetLoadingIssueDetails", "type"); +export const PropertyRuleIssueReason = withCdpMeta(z.enum(["InvalidSyntax", "InvalidInitialValue", "InvalidInherits", "InvalidName"]), "Audits.PropertyRuleIssueReason", "type"); +export const PropertyRuleIssueDetails = withCdpMeta(z.object({ "sourceCodeLocation": z.lazy(() => SourceCodeLocation), "propertyRuleIssueReason": z.lazy(() => PropertyRuleIssueReason), "propertyValue": z.string().optional() }).passthrough(), "Audits.PropertyRuleIssueDetails", "type"); +export const UserReidentificationIssueType = withCdpMeta(z.enum(["BlockedFrameNavigation", "BlockedSubresource", "NoisedCanvasReadback"]), "Audits.UserReidentificationIssueType", "type"); +export const UserReidentificationIssueDetails = withCdpMeta(z.object({ "type": z.lazy(() => UserReidentificationIssueType), "request": z.lazy(() => AffectedRequest).optional(), "sourceCodeLocation": z.lazy(() => SourceCodeLocation).optional() }).passthrough(), "Audits.UserReidentificationIssueDetails", "type"); +export const PermissionElementIssueType = withCdpMeta(z.enum(["InvalidType", "FencedFrameDisallowed", "CspFrameAncestorsMissing", "PermissionsPolicyBlocked", "PaddingRightUnsupported", "PaddingBottomUnsupported", "InsetBoxShadowUnsupported", "RequestInProgress", "UntrustedEvent", "RegistrationFailed", "TypeNotSupported", "InvalidTypeActivation", "SecurityChecksFailed", "ActivationDisabled", "GeolocationDeprecated", "InvalidDisplayStyle", "NonOpaqueColor", "LowContrast", "FontSizeTooSmall", "FontSizeTooLarge", "InvalidSizeValue"]), "Audits.PermissionElementIssueType", "type"); +export const PermissionElementIssueDetails = withCdpMeta(z.object({ "issueType": z.lazy(() => PermissionElementIssueType), "type": z.string().optional(), "nodeId": z.lazy(() => DOM.BackendNodeId).optional(), "isWarning": z.boolean().optional(), "permissionName": z.string().optional(), "occluderNodeInfo": z.string().optional(), "occluderParentNodeInfo": z.string().optional(), "disableReason": z.string().optional() }).passthrough(), "Audits.PermissionElementIssueDetails", "type"); +export const SelectivePermissionsInterventionIssueDetails = withCdpMeta(z.object({ "apiName": z.string(), "adAncestry": z.lazy(() => Network.AdAncestry), "stackTrace": z.lazy(() => Runtime.StackTrace).optional() }).passthrough(), "Audits.SelectivePermissionsInterventionIssueDetails", "type"); +export const InspectorIssueCode = withCdpMeta(z.enum(["CookieIssue", "MixedContentIssue", "BlockedByResponseIssue", "HeavyAdIssue", "ContentSecurityPolicyIssue", "SharedArrayBufferIssue", "CorsIssue", "AttributionReportingIssue", "QuirksModeIssue", "PartitioningBlobURLIssue", "NavigatorUserAgentIssue", "GenericIssue", "DeprecationIssue", "ClientHintIssue", "FederatedAuthRequestIssue", "BounceTrackingIssue", "CookieDeprecationMetadataIssue", "StylesheetLoadingIssue", "FederatedAuthUserInfoRequestIssue", "PropertyRuleIssue", "SharedDictionaryIssue", "ElementAccessibilityIssue", "SRIMessageSignatureIssue", "UnencodedDigestIssue", "ConnectionAllowlistIssue", "UserReidentificationIssue", "PermissionElementIssue", "PerformanceIssue", "SelectivePermissionsInterventionIssue"]), "Audits.InspectorIssueCode", "type"); +export const InspectorIssueDetails = withCdpMeta(z.object({ "cookieIssueDetails": z.lazy(() => CookieIssueDetails).optional(), "mixedContentIssueDetails": z.lazy(() => MixedContentIssueDetails).optional(), "blockedByResponseIssueDetails": z.lazy(() => BlockedByResponseIssueDetails).optional(), "heavyAdIssueDetails": z.lazy(() => HeavyAdIssueDetails).optional(), "contentSecurityPolicyIssueDetails": z.lazy(() => ContentSecurityPolicyIssueDetails).optional(), "sharedArrayBufferIssueDetails": z.lazy(() => SharedArrayBufferIssueDetails).optional(), "corsIssueDetails": z.lazy(() => CorsIssueDetails).optional(), "attributionReportingIssueDetails": z.lazy(() => AttributionReportingIssueDetails).optional(), "quirksModeIssueDetails": z.lazy(() => QuirksModeIssueDetails).optional(), "partitioningBlobURLIssueDetails": z.lazy(() => PartitioningBlobURLIssueDetails).optional(), "navigatorUserAgentIssueDetails": z.lazy(() => NavigatorUserAgentIssueDetails).optional(), "genericIssueDetails": z.lazy(() => GenericIssueDetails).optional(), "deprecationIssueDetails": z.lazy(() => DeprecationIssueDetails).optional(), "clientHintIssueDetails": z.lazy(() => ClientHintIssueDetails).optional(), "federatedAuthRequestIssueDetails": z.lazy(() => FederatedAuthRequestIssueDetails).optional(), "bounceTrackingIssueDetails": z.lazy(() => BounceTrackingIssueDetails).optional(), "cookieDeprecationMetadataIssueDetails": z.lazy(() => CookieDeprecationMetadataIssueDetails).optional(), "stylesheetLoadingIssueDetails": z.lazy(() => StylesheetLoadingIssueDetails).optional(), "propertyRuleIssueDetails": z.lazy(() => PropertyRuleIssueDetails).optional(), "federatedAuthUserInfoRequestIssueDetails": z.lazy(() => FederatedAuthUserInfoRequestIssueDetails).optional(), "sharedDictionaryIssueDetails": z.lazy(() => SharedDictionaryIssueDetails).optional(), "elementAccessibilityIssueDetails": z.lazy(() => ElementAccessibilityIssueDetails).optional(), "sriMessageSignatureIssueDetails": z.lazy(() => SRIMessageSignatureIssueDetails).optional(), "unencodedDigestIssueDetails": z.lazy(() => UnencodedDigestIssueDetails).optional(), "connectionAllowlistIssueDetails": z.lazy(() => ConnectionAllowlistIssueDetails).optional(), "userReidentificationIssueDetails": z.lazy(() => UserReidentificationIssueDetails).optional(), "permissionElementIssueDetails": z.lazy(() => PermissionElementIssueDetails).optional(), "performanceIssueDetails": z.lazy(() => PerformanceIssueDetails).optional(), "selectivePermissionsInterventionIssueDetails": z.lazy(() => SelectivePermissionsInterventionIssueDetails).optional() }).passthrough(), "Audits.InspectorIssueDetails", "type"); +export const IssueId = withCdpMeta(z.string(), "Audits.IssueId", "type"); +export const InspectorIssue = withCdpMeta(z.object({ "code": z.lazy(() => InspectorIssueCode), "details": z.lazy(() => InspectorIssueDetails), "issueId": z.lazy(() => IssueId).optional() }).passthrough(), "Audits.InspectorIssue", "type"); +export const GetEncodedResponseParams = withCdpMeta(z.object({ "requestId": z.lazy(() => Network.RequestId), "encoding": z.enum(["webp", "jpeg", "png"]), "quality": z.number().optional(), "sizeOnly": z.boolean().optional() }).passthrough(), "Audits.getEncodedResponse.params", "commandParams", { method: "Audits.getEncodedResponse" }); +export const GetEncodedResponseResult = withCdpMeta(z.object({ "body": z.string().optional(), "originalSize": z.number().int(), "encodedSize": z.number().int() }).passthrough(), "Audits.getEncodedResponse.result", "commandResult", { method: "Audits.getEncodedResponse" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Audits.disable.params", "commandParams", { method: "Audits.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Audits.disable.result", "commandResult", { method: "Audits.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Audits.enable.params", "commandParams", { method: "Audits.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Audits.enable.result", "commandResult", { method: "Audits.enable" }); +export const CheckFormsIssuesParams = withCdpMeta(z.object({ }).passthrough(), "Audits.checkFormsIssues.params", "commandParams", { method: "Audits.checkFormsIssues" }); +export const CheckFormsIssuesResult = withCdpMeta(z.object({ "formIssues": z.array(z.lazy(() => GenericIssueDetails)) }).passthrough(), "Audits.checkFormsIssues.result", "commandResult", { method: "Audits.checkFormsIssues" }); +export const IssueAddedEvent = withCdpMeta(z.object({ "issue": z.lazy(() => InspectorIssue) }).passthrough(), "Audits.issueAdded", "event", { phase: "event" }); + +export const zod = { + AffectedCookie: AffectedCookie, + AffectedRequest: AffectedRequest, + AffectedFrame: AffectedFrame, + CookieExclusionReason: CookieExclusionReason, + CookieWarningReason: CookieWarningReason, + CookieOperation: CookieOperation, + InsightType: InsightType, + CookieIssueInsight: CookieIssueInsight, + CookieIssueDetails: CookieIssueDetails, + PerformanceIssueType: PerformanceIssueType, + PerformanceIssueDetails: PerformanceIssueDetails, + MixedContentResolutionStatus: MixedContentResolutionStatus, + MixedContentResourceType: MixedContentResourceType, + MixedContentIssueDetails: MixedContentIssueDetails, + BlockedByResponseReason: BlockedByResponseReason, + BlockedByResponseIssueDetails: BlockedByResponseIssueDetails, + HeavyAdResolutionStatus: HeavyAdResolutionStatus, + HeavyAdReason: HeavyAdReason, + HeavyAdIssueDetails: HeavyAdIssueDetails, + ContentSecurityPolicyViolationType: ContentSecurityPolicyViolationType, + SourceCodeLocation: SourceCodeLocation, + ContentSecurityPolicyIssueDetails: ContentSecurityPolicyIssueDetails, + SharedArrayBufferIssueType: SharedArrayBufferIssueType, + SharedArrayBufferIssueDetails: SharedArrayBufferIssueDetails, + CorsIssueDetails: CorsIssueDetails, + AttributionReportingIssueType: AttributionReportingIssueType, + SharedDictionaryError: SharedDictionaryError, + SRIMessageSignatureError: SRIMessageSignatureError, + UnencodedDigestError: UnencodedDigestError, + ConnectionAllowlistError: ConnectionAllowlistError, + AttributionReportingIssueDetails: AttributionReportingIssueDetails, + QuirksModeIssueDetails: QuirksModeIssueDetails, + NavigatorUserAgentIssueDetails: NavigatorUserAgentIssueDetails, + SharedDictionaryIssueDetails: SharedDictionaryIssueDetails, + SRIMessageSignatureIssueDetails: SRIMessageSignatureIssueDetails, + UnencodedDigestIssueDetails: UnencodedDigestIssueDetails, + ConnectionAllowlistIssueDetails: ConnectionAllowlistIssueDetails, + GenericIssueErrorType: GenericIssueErrorType, + GenericIssueDetails: GenericIssueDetails, + DeprecationIssueDetails: DeprecationIssueDetails, + BounceTrackingIssueDetails: BounceTrackingIssueDetails, + CookieDeprecationMetadataIssueDetails: CookieDeprecationMetadataIssueDetails, + ClientHintIssueReason: ClientHintIssueReason, + FederatedAuthRequestIssueDetails: FederatedAuthRequestIssueDetails, + FederatedAuthRequestIssueReason: FederatedAuthRequestIssueReason, + FederatedAuthUserInfoRequestIssueDetails: FederatedAuthUserInfoRequestIssueDetails, + FederatedAuthUserInfoRequestIssueReason: FederatedAuthUserInfoRequestIssueReason, + ClientHintIssueDetails: ClientHintIssueDetails, + FailedRequestInfo: FailedRequestInfo, + PartitioningBlobURLInfo: PartitioningBlobURLInfo, + PartitioningBlobURLIssueDetails: PartitioningBlobURLIssueDetails, + ElementAccessibilityIssueReason: ElementAccessibilityIssueReason, + ElementAccessibilityIssueDetails: ElementAccessibilityIssueDetails, + StyleSheetLoadingIssueReason: StyleSheetLoadingIssueReason, + StylesheetLoadingIssueDetails: StylesheetLoadingIssueDetails, + PropertyRuleIssueReason: PropertyRuleIssueReason, + PropertyRuleIssueDetails: PropertyRuleIssueDetails, + UserReidentificationIssueType: UserReidentificationIssueType, + UserReidentificationIssueDetails: UserReidentificationIssueDetails, + PermissionElementIssueType: PermissionElementIssueType, + PermissionElementIssueDetails: PermissionElementIssueDetails, + SelectivePermissionsInterventionIssueDetails: SelectivePermissionsInterventionIssueDetails, + InspectorIssueCode: InspectorIssueCode, + InspectorIssueDetails: InspectorIssueDetails, + IssueId: IssueId, + InspectorIssue: InspectorIssue, + GetEncodedResponseParams: GetEncodedResponseParams, + GetEncodedResponseResult: GetEncodedResponseResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + CheckFormsIssuesParams: CheckFormsIssuesParams, + CheckFormsIssuesResult: CheckFormsIssuesResult, + IssueAddedEvent: IssueAddedEvent, +} as const; +export const commands = { + "Audits.getEncodedResponse": { params: GetEncodedResponseParams, result: GetEncodedResponseResult }, + "Audits.disable": { params: DisableParams, result: DisableResult }, + "Audits.enable": { params: EnableParams, result: EnableResult }, + "Audits.checkFormsIssues": { params: CheckFormsIssuesParams, result: CheckFormsIssuesResult }, +} as const; +export const events = { + "Audits.issueAdded": IssueAddedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Autofill.ts b/types/zod/Autofill.ts new file mode 100644 index 0000000..63d0d89 --- /dev/null +++ b/types/zod/Autofill.ts @@ -0,0 +1,53 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Page from "./Page.js"; + +export const CreditCard = withCdpMeta(z.object({ "number": z.string(), "name": z.string(), "expiryMonth": z.string(), "expiryYear": z.string(), "cvc": z.string() }).passthrough(), "Autofill.CreditCard", "type"); +export const AddressField = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "Autofill.AddressField", "type"); +export const AddressFields = withCdpMeta(z.object({ "fields": z.array(z.lazy(() => AddressField)) }).passthrough(), "Autofill.AddressFields", "type"); +export const Address = withCdpMeta(z.object({ "fields": z.array(z.lazy(() => AddressField)) }).passthrough(), "Autofill.Address", "type"); +export const AddressUI = withCdpMeta(z.object({ "addressFields": z.array(z.lazy(() => AddressFields)) }).passthrough(), "Autofill.AddressUI", "type"); +export const FillingStrategy = withCdpMeta(z.enum(["autocompleteAttribute", "autofillInferred"]), "Autofill.FillingStrategy", "type"); +export const FilledField = withCdpMeta(z.object({ "htmlType": z.string(), "id": z.string(), "name": z.string(), "value": z.string(), "autofillType": z.string(), "fillingStrategy": z.lazy(() => FillingStrategy), "frameId": z.lazy(() => Page.FrameId), "fieldId": z.lazy(() => DOM.BackendNodeId) }).passthrough(), "Autofill.FilledField", "type"); +export const TriggerParams = withCdpMeta(z.object({ "fieldId": z.lazy(() => DOM.BackendNodeId), "frameId": z.lazy(() => Page.FrameId).optional(), "card": z.lazy(() => CreditCard).optional(), "address": z.lazy(() => Address).optional() }).passthrough(), "Autofill.trigger.params", "commandParams", { method: "Autofill.trigger" }); +export const TriggerResult = withCdpMeta(z.object({ }).passthrough(), "Autofill.trigger.result", "commandResult", { method: "Autofill.trigger" }); +export const SetAddressesParams = withCdpMeta(z.object({ "addresses": z.array(z.lazy(() => Address)) }).passthrough(), "Autofill.setAddresses.params", "commandParams", { method: "Autofill.setAddresses" }); +export const SetAddressesResult = withCdpMeta(z.object({ }).passthrough(), "Autofill.setAddresses.result", "commandResult", { method: "Autofill.setAddresses" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Autofill.disable.params", "commandParams", { method: "Autofill.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Autofill.disable.result", "commandResult", { method: "Autofill.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Autofill.enable.params", "commandParams", { method: "Autofill.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Autofill.enable.result", "commandResult", { method: "Autofill.enable" }); +export const AddressFormFilledEvent = withCdpMeta(z.object({ "filledFields": z.array(z.lazy(() => FilledField)), "addressUi": z.lazy(() => AddressUI) }).passthrough(), "Autofill.addressFormFilled", "event", { phase: "event" }); + +export const zod = { + CreditCard: CreditCard, + AddressField: AddressField, + AddressFields: AddressFields, + Address: Address, + AddressUI: AddressUI, + FillingStrategy: FillingStrategy, + FilledField: FilledField, + TriggerParams: TriggerParams, + TriggerResult: TriggerResult, + SetAddressesParams: SetAddressesParams, + SetAddressesResult: SetAddressesResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + AddressFormFilledEvent: AddressFormFilledEvent, +} as const; +export const commands = { + "Autofill.trigger": { params: TriggerParams, result: TriggerResult }, + "Autofill.setAddresses": { params: SetAddressesParams, result: SetAddressesResult }, + "Autofill.disable": { params: DisableParams, result: DisableResult }, + "Autofill.enable": { params: EnableParams, result: EnableResult }, +} as const; +export const events = { + "Autofill.addressFormFilled": AddressFormFilledEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/BackgroundService.ts b/types/zod/BackgroundService.ts new file mode 100644 index 0000000..1991f65 --- /dev/null +++ b/types/zod/BackgroundService.ts @@ -0,0 +1,48 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Network from "./Network.js"; +import * as ServiceWorker from "./ServiceWorker.js"; + +export const ServiceName = withCdpMeta(z.enum(["backgroundFetch", "backgroundSync", "pushMessaging", "notifications", "paymentHandler", "periodicBackgroundSync"]), "BackgroundService.ServiceName", "type"); +export const EventMetadata = withCdpMeta(z.object({ "key": z.string(), "value": z.string() }).passthrough(), "BackgroundService.EventMetadata", "type"); +export const BackgroundServiceEvent = withCdpMeta(z.object({ "timestamp": z.lazy(() => Network.TimeSinceEpoch), "origin": z.string(), "serviceWorkerRegistrationId": z.lazy(() => ServiceWorker.RegistrationID), "service": z.lazy(() => ServiceName), "eventName": z.string(), "instanceId": z.string(), "eventMetadata": z.array(z.lazy(() => EventMetadata)), "storageKey": z.string() }).passthrough(), "BackgroundService.BackgroundServiceEvent", "type"); +export const StartObservingParams = withCdpMeta(z.object({ "service": z.lazy(() => ServiceName) }).passthrough(), "BackgroundService.startObserving.params", "commandParams", { method: "BackgroundService.startObserving" }); +export const StartObservingResult = withCdpMeta(z.object({ }).passthrough(), "BackgroundService.startObserving.result", "commandResult", { method: "BackgroundService.startObserving" }); +export const StopObservingParams = withCdpMeta(z.object({ "service": z.lazy(() => ServiceName) }).passthrough(), "BackgroundService.stopObserving.params", "commandParams", { method: "BackgroundService.stopObserving" }); +export const StopObservingResult = withCdpMeta(z.object({ }).passthrough(), "BackgroundService.stopObserving.result", "commandResult", { method: "BackgroundService.stopObserving" }); +export const SetRecordingParams = withCdpMeta(z.object({ "shouldRecord": z.boolean(), "service": z.lazy(() => ServiceName) }).passthrough(), "BackgroundService.setRecording.params", "commandParams", { method: "BackgroundService.setRecording" }); +export const SetRecordingResult = withCdpMeta(z.object({ }).passthrough(), "BackgroundService.setRecording.result", "commandResult", { method: "BackgroundService.setRecording" }); +export const ClearEventsParams = withCdpMeta(z.object({ "service": z.lazy(() => ServiceName) }).passthrough(), "BackgroundService.clearEvents.params", "commandParams", { method: "BackgroundService.clearEvents" }); +export const ClearEventsResult = withCdpMeta(z.object({ }).passthrough(), "BackgroundService.clearEvents.result", "commandResult", { method: "BackgroundService.clearEvents" }); +export const RecordingStateChangedEvent = withCdpMeta(z.object({ "isRecording": z.boolean(), "service": z.lazy(() => ServiceName) }).passthrough(), "BackgroundService.recordingStateChanged", "event", { phase: "event" }); +export const BackgroundServiceEventReceivedEvent = withCdpMeta(z.object({ "backgroundServiceEvent": z.lazy(() => BackgroundServiceEvent) }).passthrough(), "BackgroundService.backgroundServiceEventReceived", "event", { phase: "event" }); + +export const zod = { + ServiceName: ServiceName, + EventMetadata: EventMetadata, + BackgroundServiceEvent: BackgroundServiceEvent, + StartObservingParams: StartObservingParams, + StartObservingResult: StartObservingResult, + StopObservingParams: StopObservingParams, + StopObservingResult: StopObservingResult, + SetRecordingParams: SetRecordingParams, + SetRecordingResult: SetRecordingResult, + ClearEventsParams: ClearEventsParams, + ClearEventsResult: ClearEventsResult, + RecordingStateChangedEvent: RecordingStateChangedEvent, + BackgroundServiceEventReceivedEvent: BackgroundServiceEventReceivedEvent, +} as const; +export const commands = { + "BackgroundService.startObserving": { params: StartObservingParams, result: StartObservingResult }, + "BackgroundService.stopObserving": { params: StopObservingParams, result: StopObservingResult }, + "BackgroundService.setRecording": { params: SetRecordingParams, result: SetRecordingResult }, + "BackgroundService.clearEvents": { params: ClearEventsParams, result: ClearEventsResult }, +} as const; +export const events = { + "BackgroundService.recordingStateChanged": RecordingStateChangedEvent, + "BackgroundService.backgroundServiceEventReceived": BackgroundServiceEventReceivedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/BluetoothEmulation.ts b/types/zod/BluetoothEmulation.ts new file mode 100644 index 0000000..53c0624 --- /dev/null +++ b/types/zod/BluetoothEmulation.ts @@ -0,0 +1,116 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const CentralState = withCdpMeta(z.enum(["absent", "powered-off", "powered-on"]), "BluetoothEmulation.CentralState", "type"); +export const GATTOperationType = withCdpMeta(z.enum(["connection", "discovery"]), "BluetoothEmulation.GATTOperationType", "type"); +export const CharacteristicWriteType = withCdpMeta(z.enum(["write-default-deprecated", "write-with-response", "write-without-response"]), "BluetoothEmulation.CharacteristicWriteType", "type"); +export const CharacteristicOperationType = withCdpMeta(z.enum(["read", "write", "subscribe-to-notifications", "unsubscribe-from-notifications"]), "BluetoothEmulation.CharacteristicOperationType", "type"); +export const DescriptorOperationType = withCdpMeta(z.enum(["read", "write"]), "BluetoothEmulation.DescriptorOperationType", "type"); +export const ManufacturerData = withCdpMeta(z.object({ "key": z.number().int(), "data": z.string() }).passthrough(), "BluetoothEmulation.ManufacturerData", "type"); +export const ScanRecord = withCdpMeta(z.object({ "name": z.string().optional(), "uuids": z.array(z.string()).optional(), "appearance": z.number().int().optional(), "txPower": z.number().int().optional(), "manufacturerData": z.array(z.lazy(() => ManufacturerData)).optional() }).passthrough(), "BluetoothEmulation.ScanRecord", "type"); +export const ScanEntry = withCdpMeta(z.object({ "deviceAddress": z.string(), "rssi": z.number().int(), "scanRecord": z.lazy(() => ScanRecord) }).passthrough(), "BluetoothEmulation.ScanEntry", "type"); +export const CharacteristicProperties = withCdpMeta(z.object({ "broadcast": z.boolean().optional(), "read": z.boolean().optional(), "writeWithoutResponse": z.boolean().optional(), "write": z.boolean().optional(), "notify": z.boolean().optional(), "indicate": z.boolean().optional(), "authenticatedSignedWrites": z.boolean().optional(), "extendedProperties": z.boolean().optional() }).passthrough(), "BluetoothEmulation.CharacteristicProperties", "type"); +export const EnableParams = withCdpMeta(z.object({ "state": z.lazy(() => CentralState), "leSupported": z.boolean() }).passthrough(), "BluetoothEmulation.enable.params", "commandParams", { method: "BluetoothEmulation.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.enable.result", "commandResult", { method: "BluetoothEmulation.enable" }); +export const SetSimulatedCentralStateParams = withCdpMeta(z.object({ "state": z.lazy(() => CentralState) }).passthrough(), "BluetoothEmulation.setSimulatedCentralState.params", "commandParams", { method: "BluetoothEmulation.setSimulatedCentralState" }); +export const SetSimulatedCentralStateResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.setSimulatedCentralState.result", "commandResult", { method: "BluetoothEmulation.setSimulatedCentralState" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.disable.params", "commandParams", { method: "BluetoothEmulation.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.disable.result", "commandResult", { method: "BluetoothEmulation.disable" }); +export const SimulatePreconnectedPeripheralParams = withCdpMeta(z.object({ "address": z.string(), "name": z.string(), "manufacturerData": z.array(z.lazy(() => ManufacturerData)), "knownServiceUuids": z.array(z.string()) }).passthrough(), "BluetoothEmulation.simulatePreconnectedPeripheral.params", "commandParams", { method: "BluetoothEmulation.simulatePreconnectedPeripheral" }); +export const SimulatePreconnectedPeripheralResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulatePreconnectedPeripheral.result", "commandResult", { method: "BluetoothEmulation.simulatePreconnectedPeripheral" }); +export const SimulateAdvertisementParams = withCdpMeta(z.object({ "entry": z.lazy(() => ScanEntry) }).passthrough(), "BluetoothEmulation.simulateAdvertisement.params", "commandParams", { method: "BluetoothEmulation.simulateAdvertisement" }); +export const SimulateAdvertisementResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulateAdvertisement.result", "commandResult", { method: "BluetoothEmulation.simulateAdvertisement" }); +export const SimulateGATTOperationResponseParams = withCdpMeta(z.object({ "address": z.string(), "type": z.lazy(() => GATTOperationType), "code": z.number().int() }).passthrough(), "BluetoothEmulation.simulateGATTOperationResponse.params", "commandParams", { method: "BluetoothEmulation.simulateGATTOperationResponse" }); +export const SimulateGATTOperationResponseResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulateGATTOperationResponse.result", "commandResult", { method: "BluetoothEmulation.simulateGATTOperationResponse" }); +export const SimulateCharacteristicOperationResponseParams = withCdpMeta(z.object({ "characteristicId": z.string(), "type": z.lazy(() => CharacteristicOperationType), "code": z.number().int(), "data": z.string().optional() }).passthrough(), "BluetoothEmulation.simulateCharacteristicOperationResponse.params", "commandParams", { method: "BluetoothEmulation.simulateCharacteristicOperationResponse" }); +export const SimulateCharacteristicOperationResponseResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulateCharacteristicOperationResponse.result", "commandResult", { method: "BluetoothEmulation.simulateCharacteristicOperationResponse" }); +export const SimulateDescriptorOperationResponseParams = withCdpMeta(z.object({ "descriptorId": z.string(), "type": z.lazy(() => DescriptorOperationType), "code": z.number().int(), "data": z.string().optional() }).passthrough(), "BluetoothEmulation.simulateDescriptorOperationResponse.params", "commandParams", { method: "BluetoothEmulation.simulateDescriptorOperationResponse" }); +export const SimulateDescriptorOperationResponseResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulateDescriptorOperationResponse.result", "commandResult", { method: "BluetoothEmulation.simulateDescriptorOperationResponse" }); +export const AddServiceParams = withCdpMeta(z.object({ "address": z.string(), "serviceUuid": z.string() }).passthrough(), "BluetoothEmulation.addService.params", "commandParams", { method: "BluetoothEmulation.addService" }); +export const AddServiceResult = withCdpMeta(z.object({ "serviceId": z.string() }).passthrough(), "BluetoothEmulation.addService.result", "commandResult", { method: "BluetoothEmulation.addService" }); +export const RemoveServiceParams = withCdpMeta(z.object({ "serviceId": z.string() }).passthrough(), "BluetoothEmulation.removeService.params", "commandParams", { method: "BluetoothEmulation.removeService" }); +export const RemoveServiceResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.removeService.result", "commandResult", { method: "BluetoothEmulation.removeService" }); +export const AddCharacteristicParams = withCdpMeta(z.object({ "serviceId": z.string(), "characteristicUuid": z.string(), "properties": z.lazy(() => CharacteristicProperties) }).passthrough(), "BluetoothEmulation.addCharacteristic.params", "commandParams", { method: "BluetoothEmulation.addCharacteristic" }); +export const AddCharacteristicResult = withCdpMeta(z.object({ "characteristicId": z.string() }).passthrough(), "BluetoothEmulation.addCharacteristic.result", "commandResult", { method: "BluetoothEmulation.addCharacteristic" }); +export const RemoveCharacteristicParams = withCdpMeta(z.object({ "characteristicId": z.string() }).passthrough(), "BluetoothEmulation.removeCharacteristic.params", "commandParams", { method: "BluetoothEmulation.removeCharacteristic" }); +export const RemoveCharacteristicResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.removeCharacteristic.result", "commandResult", { method: "BluetoothEmulation.removeCharacteristic" }); +export const AddDescriptorParams = withCdpMeta(z.object({ "characteristicId": z.string(), "descriptorUuid": z.string() }).passthrough(), "BluetoothEmulation.addDescriptor.params", "commandParams", { method: "BluetoothEmulation.addDescriptor" }); +export const AddDescriptorResult = withCdpMeta(z.object({ "descriptorId": z.string() }).passthrough(), "BluetoothEmulation.addDescriptor.result", "commandResult", { method: "BluetoothEmulation.addDescriptor" }); +export const RemoveDescriptorParams = withCdpMeta(z.object({ "descriptorId": z.string() }).passthrough(), "BluetoothEmulation.removeDescriptor.params", "commandParams", { method: "BluetoothEmulation.removeDescriptor" }); +export const RemoveDescriptorResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.removeDescriptor.result", "commandResult", { method: "BluetoothEmulation.removeDescriptor" }); +export const SimulateGATTDisconnectionParams = withCdpMeta(z.object({ "address": z.string() }).passthrough(), "BluetoothEmulation.simulateGATTDisconnection.params", "commandParams", { method: "BluetoothEmulation.simulateGATTDisconnection" }); +export const SimulateGATTDisconnectionResult = withCdpMeta(z.object({ }).passthrough(), "BluetoothEmulation.simulateGATTDisconnection.result", "commandResult", { method: "BluetoothEmulation.simulateGATTDisconnection" }); +export const GattOperationReceivedEvent = withCdpMeta(z.object({ "address": z.string(), "type": z.lazy(() => GATTOperationType) }).passthrough(), "BluetoothEmulation.gattOperationReceived", "event", { phase: "event" }); +export const CharacteristicOperationReceivedEvent = withCdpMeta(z.object({ "characteristicId": z.string(), "type": z.lazy(() => CharacteristicOperationType), "data": z.string().optional(), "writeType": z.lazy(() => CharacteristicWriteType).optional() }).passthrough(), "BluetoothEmulation.characteristicOperationReceived", "event", { phase: "event" }); +export const DescriptorOperationReceivedEvent = withCdpMeta(z.object({ "descriptorId": z.string(), "type": z.lazy(() => DescriptorOperationType), "data": z.string().optional() }).passthrough(), "BluetoothEmulation.descriptorOperationReceived", "event", { phase: "event" }); + +export const zod = { + CentralState: CentralState, + GATTOperationType: GATTOperationType, + CharacteristicWriteType: CharacteristicWriteType, + CharacteristicOperationType: CharacteristicOperationType, + DescriptorOperationType: DescriptorOperationType, + ManufacturerData: ManufacturerData, + ScanRecord: ScanRecord, + ScanEntry: ScanEntry, + CharacteristicProperties: CharacteristicProperties, + EnableParams: EnableParams, + EnableResult: EnableResult, + SetSimulatedCentralStateParams: SetSimulatedCentralStateParams, + SetSimulatedCentralStateResult: SetSimulatedCentralStateResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + SimulatePreconnectedPeripheralParams: SimulatePreconnectedPeripheralParams, + SimulatePreconnectedPeripheralResult: SimulatePreconnectedPeripheralResult, + SimulateAdvertisementParams: SimulateAdvertisementParams, + SimulateAdvertisementResult: SimulateAdvertisementResult, + SimulateGATTOperationResponseParams: SimulateGATTOperationResponseParams, + SimulateGATTOperationResponseResult: SimulateGATTOperationResponseResult, + SimulateCharacteristicOperationResponseParams: SimulateCharacteristicOperationResponseParams, + SimulateCharacteristicOperationResponseResult: SimulateCharacteristicOperationResponseResult, + SimulateDescriptorOperationResponseParams: SimulateDescriptorOperationResponseParams, + SimulateDescriptorOperationResponseResult: SimulateDescriptorOperationResponseResult, + AddServiceParams: AddServiceParams, + AddServiceResult: AddServiceResult, + RemoveServiceParams: RemoveServiceParams, + RemoveServiceResult: RemoveServiceResult, + AddCharacteristicParams: AddCharacteristicParams, + AddCharacteristicResult: AddCharacteristicResult, + RemoveCharacteristicParams: RemoveCharacteristicParams, + RemoveCharacteristicResult: RemoveCharacteristicResult, + AddDescriptorParams: AddDescriptorParams, + AddDescriptorResult: AddDescriptorResult, + RemoveDescriptorParams: RemoveDescriptorParams, + RemoveDescriptorResult: RemoveDescriptorResult, + SimulateGATTDisconnectionParams: SimulateGATTDisconnectionParams, + SimulateGATTDisconnectionResult: SimulateGATTDisconnectionResult, + GattOperationReceivedEvent: GattOperationReceivedEvent, + CharacteristicOperationReceivedEvent: CharacteristicOperationReceivedEvent, + DescriptorOperationReceivedEvent: DescriptorOperationReceivedEvent, +} as const; +export const commands = { + "BluetoothEmulation.enable": { params: EnableParams, result: EnableResult }, + "BluetoothEmulation.setSimulatedCentralState": { params: SetSimulatedCentralStateParams, result: SetSimulatedCentralStateResult }, + "BluetoothEmulation.disable": { params: DisableParams, result: DisableResult }, + "BluetoothEmulation.simulatePreconnectedPeripheral": { params: SimulatePreconnectedPeripheralParams, result: SimulatePreconnectedPeripheralResult }, + "BluetoothEmulation.simulateAdvertisement": { params: SimulateAdvertisementParams, result: SimulateAdvertisementResult }, + "BluetoothEmulation.simulateGATTOperationResponse": { params: SimulateGATTOperationResponseParams, result: SimulateGATTOperationResponseResult }, + "BluetoothEmulation.simulateCharacteristicOperationResponse": { params: SimulateCharacteristicOperationResponseParams, result: SimulateCharacteristicOperationResponseResult }, + "BluetoothEmulation.simulateDescriptorOperationResponse": { params: SimulateDescriptorOperationResponseParams, result: SimulateDescriptorOperationResponseResult }, + "BluetoothEmulation.addService": { params: AddServiceParams, result: AddServiceResult }, + "BluetoothEmulation.removeService": { params: RemoveServiceParams, result: RemoveServiceResult }, + "BluetoothEmulation.addCharacteristic": { params: AddCharacteristicParams, result: AddCharacteristicResult }, + "BluetoothEmulation.removeCharacteristic": { params: RemoveCharacteristicParams, result: RemoveCharacteristicResult }, + "BluetoothEmulation.addDescriptor": { params: AddDescriptorParams, result: AddDescriptorResult }, + "BluetoothEmulation.removeDescriptor": { params: RemoveDescriptorParams, result: RemoveDescriptorResult }, + "BluetoothEmulation.simulateGATTDisconnection": { params: SimulateGATTDisconnectionParams, result: SimulateGATTDisconnectionResult }, +} as const; +export const events = { + "BluetoothEmulation.gattOperationReceived": GattOperationReceivedEvent, + "BluetoothEmulation.characteristicOperationReceived": CharacteristicOperationReceivedEvent, + "BluetoothEmulation.descriptorOperationReceived": DescriptorOperationReceivedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Browser.ts b/types/zod/Browser.ts new file mode 100644 index 0000000..026a2d7 --- /dev/null +++ b/types/zod/Browser.ts @@ -0,0 +1,144 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Page from "./Page.js"; +import * as Target from "./Target.js"; + +export const BrowserContextID = withCdpMeta(z.string(), "Browser.BrowserContextID", "type"); +export const WindowID = withCdpMeta(z.number().int(), "Browser.WindowID", "type"); +export const WindowState = withCdpMeta(z.enum(["normal", "minimized", "maximized", "fullscreen"]), "Browser.WindowState", "type"); +export const Bounds = withCdpMeta(z.object({ "left": z.number().int().optional(), "top": z.number().int().optional(), "width": z.number().int().optional(), "height": z.number().int().optional(), "windowState": z.lazy(() => WindowState).optional() }).passthrough(), "Browser.Bounds", "type"); +export const PermissionType = withCdpMeta(z.enum(["ar", "audioCapture", "automaticFullscreen", "backgroundFetch", "backgroundSync", "cameraPanTiltZoom", "capturedSurfaceControl", "clipboardReadWrite", "clipboardSanitizedWrite", "displayCapture", "durableStorage", "geolocation", "handTracking", "idleDetection", "keyboardLock", "localFonts", "localNetwork", "localNetworkAccess", "loopbackNetwork", "midi", "midiSysex", "nfc", "notifications", "paymentHandler", "periodicBackgroundSync", "pointerLock", "protectedMediaIdentifier", "sensors", "smartCard", "speakerSelection", "storageAccess", "topLevelStorageAccess", "videoCapture", "vr", "wakeLockScreen", "wakeLockSystem", "webAppInstallation", "webPrinting", "windowManagement"]), "Browser.PermissionType", "type"); +export const PermissionSetting = withCdpMeta(z.enum(["granted", "denied", "prompt"]), "Browser.PermissionSetting", "type"); +export const PermissionDescriptor = withCdpMeta(z.object({ "name": z.string(), "sysex": z.boolean().optional(), "userVisibleOnly": z.boolean().optional(), "allowWithoutSanitization": z.boolean().optional(), "allowWithoutGesture": z.boolean().optional(), "panTiltZoom": z.boolean().optional() }).passthrough(), "Browser.PermissionDescriptor", "type"); +export const BrowserCommandId = withCdpMeta(z.enum(["openTabSearch", "closeTabSearch", "openGlic"]), "Browser.BrowserCommandId", "type"); +export const Bucket = withCdpMeta(z.object({ "low": z.number().int(), "high": z.number().int(), "count": z.number().int() }).passthrough(), "Browser.Bucket", "type"); +export const Histogram = withCdpMeta(z.object({ "name": z.string(), "sum": z.number().int(), "count": z.number().int(), "buckets": z.array(z.lazy(() => Bucket)) }).passthrough(), "Browser.Histogram", "type"); +export const PrivacySandboxAPI = withCdpMeta(z.enum(["BiddingAndAuctionServices", "TrustedKeyValue"]), "Browser.PrivacySandboxAPI", "type"); +export const SetPermissionParams = withCdpMeta(z.object({ "permission": z.lazy(() => PermissionDescriptor), "setting": z.lazy(() => PermissionSetting), "origin": z.string().optional(), "embeddedOrigin": z.string().optional(), "browserContextId": z.lazy(() => BrowserContextID).optional() }).passthrough(), "Browser.setPermission.params", "commandParams", { method: "Browser.setPermission" }); +export const SetPermissionResult = withCdpMeta(z.object({ }).passthrough(), "Browser.setPermission.result", "commandResult", { method: "Browser.setPermission" }); +export const GrantPermissionsParams = withCdpMeta(z.object({ "permissions": z.array(z.lazy(() => PermissionType)), "origin": z.string().optional(), "browserContextId": z.lazy(() => BrowserContextID).optional() }).passthrough(), "Browser.grantPermissions.params", "commandParams", { method: "Browser.grantPermissions" }); +export const GrantPermissionsResult = withCdpMeta(z.object({ }).passthrough(), "Browser.grantPermissions.result", "commandResult", { method: "Browser.grantPermissions" }); +export const ResetPermissionsParams = withCdpMeta(z.object({ "browserContextId": z.lazy(() => BrowserContextID).optional() }).passthrough(), "Browser.resetPermissions.params", "commandParams", { method: "Browser.resetPermissions" }); +export const ResetPermissionsResult = withCdpMeta(z.object({ }).passthrough(), "Browser.resetPermissions.result", "commandResult", { method: "Browser.resetPermissions" }); +export const SetDownloadBehaviorParams = withCdpMeta(z.object({ "behavior": z.enum(["deny", "allow", "allowAndName", "default"]), "browserContextId": z.lazy(() => BrowserContextID).optional(), "downloadPath": z.string().optional(), "eventsEnabled": z.boolean().optional() }).passthrough(), "Browser.setDownloadBehavior.params", "commandParams", { method: "Browser.setDownloadBehavior" }); +export const SetDownloadBehaviorResult = withCdpMeta(z.object({ }).passthrough(), "Browser.setDownloadBehavior.result", "commandResult", { method: "Browser.setDownloadBehavior" }); +export const CancelDownloadParams = withCdpMeta(z.object({ "guid": z.string(), "browserContextId": z.lazy(() => BrowserContextID).optional() }).passthrough(), "Browser.cancelDownload.params", "commandParams", { method: "Browser.cancelDownload" }); +export const CancelDownloadResult = withCdpMeta(z.object({ }).passthrough(), "Browser.cancelDownload.result", "commandResult", { method: "Browser.cancelDownload" }); +export const CloseParams = withCdpMeta(z.object({ }).passthrough(), "Browser.close.params", "commandParams", { method: "Browser.close" }); +export const CloseResult = withCdpMeta(z.object({ }).passthrough(), "Browser.close.result", "commandResult", { method: "Browser.close" }); +export const CrashParams = withCdpMeta(z.object({ }).passthrough(), "Browser.crash.params", "commandParams", { method: "Browser.crash" }); +export const CrashResult = withCdpMeta(z.object({ }).passthrough(), "Browser.crash.result", "commandResult", { method: "Browser.crash" }); +export const CrashGpuProcessParams = withCdpMeta(z.object({ }).passthrough(), "Browser.crashGpuProcess.params", "commandParams", { method: "Browser.crashGpuProcess" }); +export const CrashGpuProcessResult = withCdpMeta(z.object({ }).passthrough(), "Browser.crashGpuProcess.result", "commandResult", { method: "Browser.crashGpuProcess" }); +export const GetVersionParams = withCdpMeta(z.object({ }).passthrough(), "Browser.getVersion.params", "commandParams", { method: "Browser.getVersion" }); +export const GetVersionResult = withCdpMeta(z.object({ "protocolVersion": z.string(), "product": z.string(), "revision": z.string(), "userAgent": z.string(), "jsVersion": z.string() }).passthrough(), "Browser.getVersion.result", "commandResult", { method: "Browser.getVersion" }); +export const GetBrowserCommandLineParams = withCdpMeta(z.object({ }).passthrough(), "Browser.getBrowserCommandLine.params", "commandParams", { method: "Browser.getBrowserCommandLine" }); +export const GetBrowserCommandLineResult = withCdpMeta(z.object({ "arguments": z.array(z.string()) }).passthrough(), "Browser.getBrowserCommandLine.result", "commandResult", { method: "Browser.getBrowserCommandLine" }); +export const GetHistogramsParams = withCdpMeta(z.object({ "query": z.string().optional(), "delta": z.boolean().optional() }).passthrough(), "Browser.getHistograms.params", "commandParams", { method: "Browser.getHistograms" }); +export const GetHistogramsResult = withCdpMeta(z.object({ "histograms": z.array(z.lazy(() => Histogram)) }).passthrough(), "Browser.getHistograms.result", "commandResult", { method: "Browser.getHistograms" }); +export const GetHistogramParams = withCdpMeta(z.object({ "name": z.string(), "delta": z.boolean().optional() }).passthrough(), "Browser.getHistogram.params", "commandParams", { method: "Browser.getHistogram" }); +export const GetHistogramResult = withCdpMeta(z.object({ "histogram": z.lazy(() => Histogram) }).passthrough(), "Browser.getHistogram.result", "commandResult", { method: "Browser.getHistogram" }); +export const GetWindowBoundsParams = withCdpMeta(z.object({ "windowId": z.lazy(() => WindowID) }).passthrough(), "Browser.getWindowBounds.params", "commandParams", { method: "Browser.getWindowBounds" }); +export const GetWindowBoundsResult = withCdpMeta(z.object({ "bounds": z.lazy(() => Bounds) }).passthrough(), "Browser.getWindowBounds.result", "commandResult", { method: "Browser.getWindowBounds" }); +export const GetWindowForTargetParams = withCdpMeta(z.object({ "targetId": z.lazy(() => Target.TargetID).optional() }).passthrough(), "Browser.getWindowForTarget.params", "commandParams", { method: "Browser.getWindowForTarget" }); +export const GetWindowForTargetResult = withCdpMeta(z.object({ "windowId": z.lazy(() => WindowID), "bounds": z.lazy(() => Bounds) }).passthrough(), "Browser.getWindowForTarget.result", "commandResult", { method: "Browser.getWindowForTarget" }); +export const SetWindowBoundsParams = withCdpMeta(z.object({ "windowId": z.lazy(() => WindowID), "bounds": z.lazy(() => Bounds) }).passthrough(), "Browser.setWindowBounds.params", "commandParams", { method: "Browser.setWindowBounds" }); +export const SetWindowBoundsResult = withCdpMeta(z.object({ }).passthrough(), "Browser.setWindowBounds.result", "commandResult", { method: "Browser.setWindowBounds" }); +export const SetContentsSizeParams = withCdpMeta(z.object({ "windowId": z.lazy(() => WindowID), "width": z.number().int().optional(), "height": z.number().int().optional() }).passthrough(), "Browser.setContentsSize.params", "commandParams", { method: "Browser.setContentsSize" }); +export const SetContentsSizeResult = withCdpMeta(z.object({ }).passthrough(), "Browser.setContentsSize.result", "commandResult", { method: "Browser.setContentsSize" }); +export const SetDockTileParams = withCdpMeta(z.object({ "badgeLabel": z.string().optional(), "image": z.string().optional() }).passthrough(), "Browser.setDockTile.params", "commandParams", { method: "Browser.setDockTile" }); +export const SetDockTileResult = withCdpMeta(z.object({ }).passthrough(), "Browser.setDockTile.result", "commandResult", { method: "Browser.setDockTile" }); +export const ExecuteBrowserCommandParams = withCdpMeta(z.object({ "commandId": z.lazy(() => BrowserCommandId) }).passthrough(), "Browser.executeBrowserCommand.params", "commandParams", { method: "Browser.executeBrowserCommand" }); +export const ExecuteBrowserCommandResult = withCdpMeta(z.object({ }).passthrough(), "Browser.executeBrowserCommand.result", "commandResult", { method: "Browser.executeBrowserCommand" }); +export const AddPrivacySandboxEnrollmentOverrideParams = withCdpMeta(z.object({ "url": z.string() }).passthrough(), "Browser.addPrivacySandboxEnrollmentOverride.params", "commandParams", { method: "Browser.addPrivacySandboxEnrollmentOverride" }); +export const AddPrivacySandboxEnrollmentOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Browser.addPrivacySandboxEnrollmentOverride.result", "commandResult", { method: "Browser.addPrivacySandboxEnrollmentOverride" }); +export const AddPrivacySandboxCoordinatorKeyConfigParams = withCdpMeta(z.object({ "api": z.lazy(() => PrivacySandboxAPI), "coordinatorOrigin": z.string(), "keyConfig": z.string(), "browserContextId": z.lazy(() => BrowserContextID).optional() }).passthrough(), "Browser.addPrivacySandboxCoordinatorKeyConfig.params", "commandParams", { method: "Browser.addPrivacySandboxCoordinatorKeyConfig" }); +export const AddPrivacySandboxCoordinatorKeyConfigResult = withCdpMeta(z.object({ }).passthrough(), "Browser.addPrivacySandboxCoordinatorKeyConfig.result", "commandResult", { method: "Browser.addPrivacySandboxCoordinatorKeyConfig" }); +export const DownloadWillBeginEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId), "guid": z.string(), "url": z.string(), "suggestedFilename": z.string() }).passthrough(), "Browser.downloadWillBegin", "event", { phase: "event" }); +export const DownloadProgressEvent = withCdpMeta(z.object({ "guid": z.string(), "totalBytes": z.number(), "receivedBytes": z.number(), "state": z.enum(["inProgress", "completed", "canceled"]), "filePath": z.string().optional() }).passthrough(), "Browser.downloadProgress", "event", { phase: "event" }); + +export const zod = { + BrowserContextID: BrowserContextID, + WindowID: WindowID, + WindowState: WindowState, + Bounds: Bounds, + PermissionType: PermissionType, + PermissionSetting: PermissionSetting, + PermissionDescriptor: PermissionDescriptor, + BrowserCommandId: BrowserCommandId, + Bucket: Bucket, + Histogram: Histogram, + PrivacySandboxAPI: PrivacySandboxAPI, + SetPermissionParams: SetPermissionParams, + SetPermissionResult: SetPermissionResult, + GrantPermissionsParams: GrantPermissionsParams, + GrantPermissionsResult: GrantPermissionsResult, + ResetPermissionsParams: ResetPermissionsParams, + ResetPermissionsResult: ResetPermissionsResult, + SetDownloadBehaviorParams: SetDownloadBehaviorParams, + SetDownloadBehaviorResult: SetDownloadBehaviorResult, + CancelDownloadParams: CancelDownloadParams, + CancelDownloadResult: CancelDownloadResult, + CloseParams: CloseParams, + CloseResult: CloseResult, + CrashParams: CrashParams, + CrashResult: CrashResult, + CrashGpuProcessParams: CrashGpuProcessParams, + CrashGpuProcessResult: CrashGpuProcessResult, + GetVersionParams: GetVersionParams, + GetVersionResult: GetVersionResult, + GetBrowserCommandLineParams: GetBrowserCommandLineParams, + GetBrowserCommandLineResult: GetBrowserCommandLineResult, + GetHistogramsParams: GetHistogramsParams, + GetHistogramsResult: GetHistogramsResult, + GetHistogramParams: GetHistogramParams, + GetHistogramResult: GetHistogramResult, + GetWindowBoundsParams: GetWindowBoundsParams, + GetWindowBoundsResult: GetWindowBoundsResult, + GetWindowForTargetParams: GetWindowForTargetParams, + GetWindowForTargetResult: GetWindowForTargetResult, + SetWindowBoundsParams: SetWindowBoundsParams, + SetWindowBoundsResult: SetWindowBoundsResult, + SetContentsSizeParams: SetContentsSizeParams, + SetContentsSizeResult: SetContentsSizeResult, + SetDockTileParams: SetDockTileParams, + SetDockTileResult: SetDockTileResult, + ExecuteBrowserCommandParams: ExecuteBrowserCommandParams, + ExecuteBrowserCommandResult: ExecuteBrowserCommandResult, + AddPrivacySandboxEnrollmentOverrideParams: AddPrivacySandboxEnrollmentOverrideParams, + AddPrivacySandboxEnrollmentOverrideResult: AddPrivacySandboxEnrollmentOverrideResult, + AddPrivacySandboxCoordinatorKeyConfigParams: AddPrivacySandboxCoordinatorKeyConfigParams, + AddPrivacySandboxCoordinatorKeyConfigResult: AddPrivacySandboxCoordinatorKeyConfigResult, + DownloadWillBeginEvent: DownloadWillBeginEvent, + DownloadProgressEvent: DownloadProgressEvent, +} as const; +export const commands = { + "Browser.setPermission": { params: SetPermissionParams, result: SetPermissionResult }, + "Browser.grantPermissions": { params: GrantPermissionsParams, result: GrantPermissionsResult }, + "Browser.resetPermissions": { params: ResetPermissionsParams, result: ResetPermissionsResult }, + "Browser.setDownloadBehavior": { params: SetDownloadBehaviorParams, result: SetDownloadBehaviorResult }, + "Browser.cancelDownload": { params: CancelDownloadParams, result: CancelDownloadResult }, + "Browser.close": { params: CloseParams, result: CloseResult }, + "Browser.crash": { params: CrashParams, result: CrashResult }, + "Browser.crashGpuProcess": { params: CrashGpuProcessParams, result: CrashGpuProcessResult }, + "Browser.getVersion": { params: GetVersionParams, result: GetVersionResult }, + "Browser.getBrowserCommandLine": { params: GetBrowserCommandLineParams, result: GetBrowserCommandLineResult }, + "Browser.getHistograms": { params: GetHistogramsParams, result: GetHistogramsResult }, + "Browser.getHistogram": { params: GetHistogramParams, result: GetHistogramResult }, + "Browser.getWindowBounds": { params: GetWindowBoundsParams, result: GetWindowBoundsResult }, + "Browser.getWindowForTarget": { params: GetWindowForTargetParams, result: GetWindowForTargetResult }, + "Browser.setWindowBounds": { params: SetWindowBoundsParams, result: SetWindowBoundsResult }, + "Browser.setContentsSize": { params: SetContentsSizeParams, result: SetContentsSizeResult }, + "Browser.setDockTile": { params: SetDockTileParams, result: SetDockTileResult }, + "Browser.executeBrowserCommand": { params: ExecuteBrowserCommandParams, result: ExecuteBrowserCommandResult }, + "Browser.addPrivacySandboxEnrollmentOverride": { params: AddPrivacySandboxEnrollmentOverrideParams, result: AddPrivacySandboxEnrollmentOverrideResult }, + "Browser.addPrivacySandboxCoordinatorKeyConfig": { params: AddPrivacySandboxCoordinatorKeyConfigParams, result: AddPrivacySandboxCoordinatorKeyConfigResult }, +} as const; +export const events = { + "Browser.downloadWillBegin": DownloadWillBeginEvent, + "Browser.downloadProgress": DownloadProgressEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/CSS.ts b/types/zod/CSS.ts new file mode 100644 index 0000000..0b99333 --- /dev/null +++ b/types/zod/CSS.ts @@ -0,0 +1,314 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Page from "./Page.js"; + +export const StyleSheetOrigin = withCdpMeta(z.enum(["injected", "user-agent", "inspector", "regular"]), "CSS.StyleSheetOrigin", "type"); +export const PseudoElementMatches = withCdpMeta(z.object({ "pseudoType": z.lazy(() => DOM.PseudoType), "pseudoIdentifier": z.string().optional(), "matches": z.array(z.lazy(() => RuleMatch)) }).passthrough(), "CSS.PseudoElementMatches", "type"); +export const CSSAnimationStyle = withCdpMeta(z.object({ "name": z.string().optional(), "style": z.lazy(() => CSSStyle) }).passthrough(), "CSS.CSSAnimationStyle", "type"); +export const InheritedStyleEntry = withCdpMeta(z.object({ "inlineStyle": z.lazy(() => CSSStyle).optional(), "matchedCSSRules": z.array(z.lazy(() => RuleMatch)) }).passthrough(), "CSS.InheritedStyleEntry", "type"); +export const InheritedAnimatedStyleEntry = withCdpMeta(z.object({ "animationStyles": z.array(z.lazy(() => CSSAnimationStyle)).optional(), "transitionsStyle": z.lazy(() => CSSStyle).optional() }).passthrough(), "CSS.InheritedAnimatedStyleEntry", "type"); +export const InheritedPseudoElementMatches = withCdpMeta(z.object({ "pseudoElements": z.array(z.lazy(() => PseudoElementMatches)) }).passthrough(), "CSS.InheritedPseudoElementMatches", "type"); +export const RuleMatch = withCdpMeta(z.object({ "rule": z.lazy(() => CSSRule), "matchingSelectors": z.array(z.number().int()) }).passthrough(), "CSS.RuleMatch", "type"); +export const Value = withCdpMeta(z.object({ "text": z.string(), "range": z.lazy(() => SourceRange).optional(), "specificity": z.lazy(() => Specificity).optional() }).passthrough(), "CSS.Value", "type"); +export const Specificity = withCdpMeta(z.object({ "a": z.number().int(), "b": z.number().int(), "c": z.number().int() }).passthrough(), "CSS.Specificity", "type"); +export const SelectorList = withCdpMeta(z.object({ "selectors": z.array(z.lazy(() => Value)), "text": z.string() }).passthrough(), "CSS.SelectorList", "type"); +export const CSSStyleSheetHeader = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "frameId": z.lazy(() => Page.FrameId), "sourceURL": z.string(), "sourceMapURL": z.string().optional(), "origin": z.lazy(() => StyleSheetOrigin), "title": z.string(), "ownerNode": z.lazy(() => DOM.BackendNodeId).optional(), "disabled": z.boolean(), "hasSourceURL": z.boolean().optional(), "isInline": z.boolean(), "isMutable": z.boolean(), "isConstructed": z.boolean(), "startLine": z.number(), "startColumn": z.number(), "length": z.number(), "endLine": z.number(), "endColumn": z.number(), "loadingFailed": z.boolean().optional() }).passthrough(), "CSS.CSSStyleSheetHeader", "type"); +export const CSSRule = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional(), "selectorList": z.lazy(() => SelectorList), "nestingSelectors": z.array(z.string()).optional(), "origin": z.lazy(() => StyleSheetOrigin), "style": z.lazy(() => CSSStyle), "originTreeScopeNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "media": z.array(z.lazy(() => CSSMedia)).optional(), "containerQueries": z.array(z.lazy(() => CSSContainerQuery)).optional(), "supports": z.array(z.lazy(() => CSSSupports)).optional(), "layers": z.array(z.lazy(() => CSSLayer)).optional(), "scopes": z.array(z.lazy(() => CSSScope)).optional(), "ruleTypes": z.array(z.lazy(() => CSSRuleType)).optional(), "startingStyles": z.array(z.lazy(() => CSSStartingStyle)).optional(), "navigations": z.array(z.lazy(() => CSSNavigation)).optional() }).passthrough(), "CSS.CSSRule", "type"); +export const CSSRuleType = withCdpMeta(z.enum(["MediaRule", "SupportsRule", "ContainerRule", "LayerRule", "ScopeRule", "StyleRule", "StartingStyleRule", "NavigationRule"]), "CSS.CSSRuleType", "type"); +export const RuleUsage = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "startOffset": z.number(), "endOffset": z.number(), "used": z.boolean() }).passthrough(), "CSS.RuleUsage", "type"); +export const SourceRange = withCdpMeta(z.object({ "startLine": z.number().int(), "startColumn": z.number().int(), "endLine": z.number().int(), "endColumn": z.number().int() }).passthrough(), "CSS.SourceRange", "type"); +export const ShorthandEntry = withCdpMeta(z.object({ "name": z.string(), "value": z.string(), "important": z.boolean().optional() }).passthrough(), "CSS.ShorthandEntry", "type"); +export const CSSComputedStyleProperty = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "CSS.CSSComputedStyleProperty", "type"); +export const ComputedStyleExtraFields = withCdpMeta(z.object({ "isAppearanceBase": z.boolean() }).passthrough(), "CSS.ComputedStyleExtraFields", "type"); +export const CSSStyle = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional(), "cssProperties": z.array(z.lazy(() => CSSProperty)), "shorthandEntries": z.array(z.lazy(() => ShorthandEntry)), "cssText": z.string().optional(), "range": z.lazy(() => SourceRange).optional() }).passthrough(), "CSS.CSSStyle", "type"); +export const CSSProperty = withCdpMeta(z.object({ "name": z.string(), "value": z.string(), "important": z.boolean().optional(), "implicit": z.boolean().optional(), "text": z.string().optional(), "parsedOk": z.boolean().optional(), "disabled": z.boolean().optional(), "range": z.lazy(() => SourceRange).optional(), "longhandProperties": z.array(z.lazy(() => CSSProperty)).optional() }).passthrough(), "CSS.CSSProperty", "type"); +export const CSSMedia = withCdpMeta(z.object({ "text": z.string(), "source": z.enum(["mediaRule", "importRule", "linkedSheet", "inlineSheet"]), "sourceURL": z.string().optional(), "range": z.lazy(() => SourceRange).optional(), "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional(), "mediaList": z.array(z.lazy(() => MediaQuery)).optional() }).passthrough(), "CSS.CSSMedia", "type"); +export const MediaQuery = withCdpMeta(z.object({ "expressions": z.array(z.lazy(() => MediaQueryExpression)), "active": z.boolean() }).passthrough(), "CSS.MediaQuery", "type"); +export const MediaQueryExpression = withCdpMeta(z.object({ "value": z.number(), "unit": z.string(), "feature": z.string(), "valueRange": z.lazy(() => SourceRange).optional(), "computedLength": z.number().optional() }).passthrough(), "CSS.MediaQueryExpression", "type"); +export const CSSContainerQuery = withCdpMeta(z.object({ "text": z.string(), "range": z.lazy(() => SourceRange).optional(), "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional(), "name": z.string().optional(), "physicalAxes": z.lazy(() => DOM.PhysicalAxes).optional(), "logicalAxes": z.lazy(() => DOM.LogicalAxes).optional(), "queriesScrollState": z.boolean().optional(), "queriesAnchored": z.boolean().optional() }).passthrough(), "CSS.CSSContainerQuery", "type"); +export const CSSSupports = withCdpMeta(z.object({ "text": z.string(), "active": z.boolean(), "range": z.lazy(() => SourceRange).optional(), "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional() }).passthrough(), "CSS.CSSSupports", "type"); +export const CSSNavigation = withCdpMeta(z.object({ "text": z.string(), "active": z.boolean().optional(), "range": z.lazy(() => SourceRange).optional(), "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional() }).passthrough(), "CSS.CSSNavigation", "type"); +export const CSSScope = withCdpMeta(z.object({ "text": z.string(), "range": z.lazy(() => SourceRange).optional(), "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional() }).passthrough(), "CSS.CSSScope", "type"); +export const CSSLayer = withCdpMeta(z.object({ "text": z.string(), "range": z.lazy(() => SourceRange).optional(), "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional() }).passthrough(), "CSS.CSSLayer", "type"); +export const CSSStartingStyle = withCdpMeta(z.object({ "range": z.lazy(() => SourceRange).optional(), "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional() }).passthrough(), "CSS.CSSStartingStyle", "type"); +export const CSSLayerData = withCdpMeta(z.object({ "name": z.string(), "subLayers": z.array(z.lazy(() => CSSLayerData)).optional(), "order": z.number() }).passthrough(), "CSS.CSSLayerData", "type"); +export const PlatformFontUsage = withCdpMeta(z.object({ "familyName": z.string(), "postScriptName": z.string(), "isCustomFont": z.boolean(), "glyphCount": z.number() }).passthrough(), "CSS.PlatformFontUsage", "type"); +export const FontVariationAxis = withCdpMeta(z.object({ "tag": z.string(), "name": z.string(), "minValue": z.number(), "maxValue": z.number(), "defaultValue": z.number() }).passthrough(), "CSS.FontVariationAxis", "type"); +export const FontFace = withCdpMeta(z.object({ "fontFamily": z.string(), "fontStyle": z.string(), "fontVariant": z.string(), "fontWeight": z.string(), "fontStretch": z.string(), "fontDisplay": z.string(), "unicodeRange": z.string(), "src": z.string(), "platformFontFamily": z.string(), "fontVariationAxes": z.array(z.lazy(() => FontVariationAxis)).optional() }).passthrough(), "CSS.FontFace", "type"); +export const CSSTryRule = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional(), "origin": z.lazy(() => StyleSheetOrigin), "style": z.lazy(() => CSSStyle) }).passthrough(), "CSS.CSSTryRule", "type"); +export const CSSPositionTryRule = withCdpMeta(z.object({ "name": z.lazy(() => Value), "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional(), "origin": z.lazy(() => StyleSheetOrigin), "style": z.lazy(() => CSSStyle), "active": z.boolean() }).passthrough(), "CSS.CSSPositionTryRule", "type"); +export const CSSKeyframesRule = withCdpMeta(z.object({ "animationName": z.lazy(() => Value), "keyframes": z.array(z.lazy(() => CSSKeyframeRule)) }).passthrough(), "CSS.CSSKeyframesRule", "type"); +export const CSSPropertyRegistration = withCdpMeta(z.object({ "propertyName": z.string(), "initialValue": z.lazy(() => Value).optional(), "inherits": z.boolean(), "syntax": z.string() }).passthrough(), "CSS.CSSPropertyRegistration", "type"); +export const CSSAtRule = withCdpMeta(z.object({ "type": z.enum(["font-face", "font-feature-values", "font-palette-values"]), "subsection": z.enum(["swash", "annotation", "ornaments", "stylistic", "styleset", "character-variant"]).optional(), "name": z.lazy(() => Value).optional(), "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional(), "origin": z.lazy(() => StyleSheetOrigin), "style": z.lazy(() => CSSStyle) }).passthrough(), "CSS.CSSAtRule", "type"); +export const CSSPropertyRule = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional(), "origin": z.lazy(() => StyleSheetOrigin), "propertyName": z.lazy(() => Value), "style": z.lazy(() => CSSStyle) }).passthrough(), "CSS.CSSPropertyRule", "type"); +export const CSSFunctionParameter = withCdpMeta(z.object({ "name": z.string(), "type": z.string() }).passthrough(), "CSS.CSSFunctionParameter", "type"); +export const CSSFunctionConditionNode = withCdpMeta(z.object({ "media": z.lazy(() => CSSMedia).optional(), "containerQueries": z.lazy(() => CSSContainerQuery).optional(), "supports": z.lazy(() => CSSSupports).optional(), "navigation": z.lazy(() => CSSNavigation).optional(), "children": z.array(z.lazy(() => CSSFunctionNode)), "conditionText": z.string() }).passthrough(), "CSS.CSSFunctionConditionNode", "type"); +export const CSSFunctionNode = withCdpMeta(z.object({ "condition": z.lazy(() => CSSFunctionConditionNode).optional(), "style": z.lazy(() => CSSStyle).optional() }).passthrough(), "CSS.CSSFunctionNode", "type"); +export const CSSFunctionRule = withCdpMeta(z.object({ "name": z.lazy(() => Value), "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional(), "origin": z.lazy(() => StyleSheetOrigin), "parameters": z.array(z.lazy(() => CSSFunctionParameter)), "children": z.array(z.lazy(() => CSSFunctionNode)), "originTreeScopeNodeId": z.lazy(() => DOM.BackendNodeId).optional() }).passthrough(), "CSS.CSSFunctionRule", "type"); +export const CSSKeyframeRule = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId).optional(), "origin": z.lazy(() => StyleSheetOrigin), "keyText": z.lazy(() => Value), "style": z.lazy(() => CSSStyle) }).passthrough(), "CSS.CSSKeyframeRule", "type"); +export const StyleDeclarationEdit = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "range": z.lazy(() => SourceRange), "text": z.string() }).passthrough(), "CSS.StyleDeclarationEdit", "type"); +export const AddRuleParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "ruleText": z.string(), "location": z.lazy(() => SourceRange), "nodeForPropertySyntaxValidation": z.lazy(() => DOM.NodeId).optional() }).passthrough(), "CSS.addRule.params", "commandParams", { method: "CSS.addRule" }); +export const AddRuleResult = withCdpMeta(z.object({ "rule": z.lazy(() => CSSRule) }).passthrough(), "CSS.addRule.result", "commandResult", { method: "CSS.addRule" }); +export const CollectClassNamesParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId) }).passthrough(), "CSS.collectClassNames.params", "commandParams", { method: "CSS.collectClassNames" }); +export const CollectClassNamesResult = withCdpMeta(z.object({ "classNames": z.array(z.string()) }).passthrough(), "CSS.collectClassNames.result", "commandResult", { method: "CSS.collectClassNames" }); +export const CreateStyleSheetParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId), "force": z.boolean().optional() }).passthrough(), "CSS.createStyleSheet.params", "commandParams", { method: "CSS.createStyleSheet" }); +export const CreateStyleSheetResult = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId) }).passthrough(), "CSS.createStyleSheet.result", "commandResult", { method: "CSS.createStyleSheet" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "CSS.disable.params", "commandParams", { method: "CSS.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "CSS.disable.result", "commandResult", { method: "CSS.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "CSS.enable.params", "commandParams", { method: "CSS.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "CSS.enable.result", "commandResult", { method: "CSS.enable" }); +export const ForcePseudoStateParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId), "forcedPseudoClasses": z.array(z.string()) }).passthrough(), "CSS.forcePseudoState.params", "commandParams", { method: "CSS.forcePseudoState" }); +export const ForcePseudoStateResult = withCdpMeta(z.object({ }).passthrough(), "CSS.forcePseudoState.result", "commandResult", { method: "CSS.forcePseudoState" }); +export const ForceStartingStyleParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId), "forced": z.boolean() }).passthrough(), "CSS.forceStartingStyle.params", "commandParams", { method: "CSS.forceStartingStyle" }); +export const ForceStartingStyleResult = withCdpMeta(z.object({ }).passthrough(), "CSS.forceStartingStyle.result", "commandResult", { method: "CSS.forceStartingStyle" }); +export const GetBackgroundColorsParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "CSS.getBackgroundColors.params", "commandParams", { method: "CSS.getBackgroundColors" }); +export const GetBackgroundColorsResult = withCdpMeta(z.object({ "backgroundColors": z.array(z.string()).optional(), "computedFontSize": z.string().optional(), "computedFontWeight": z.string().optional() }).passthrough(), "CSS.getBackgroundColors.result", "commandResult", { method: "CSS.getBackgroundColors" }); +export const GetComputedStyleForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "CSS.getComputedStyleForNode.params", "commandParams", { method: "CSS.getComputedStyleForNode" }); +export const GetComputedStyleForNodeResult = withCdpMeta(z.object({ "computedStyle": z.array(z.lazy(() => CSSComputedStyleProperty)), "extraFields": z.lazy(() => ComputedStyleExtraFields) }).passthrough(), "CSS.getComputedStyleForNode.result", "commandResult", { method: "CSS.getComputedStyleForNode" }); +export const ResolveValuesParams = withCdpMeta(z.object({ "values": z.array(z.string()), "nodeId": z.lazy(() => DOM.NodeId), "propertyName": z.string().optional(), "pseudoType": z.lazy(() => DOM.PseudoType).optional(), "pseudoIdentifier": z.string().optional() }).passthrough(), "CSS.resolveValues.params", "commandParams", { method: "CSS.resolveValues" }); +export const ResolveValuesResult = withCdpMeta(z.object({ "results": z.array(z.string()) }).passthrough(), "CSS.resolveValues.result", "commandResult", { method: "CSS.resolveValues" }); +export const GetLonghandPropertiesParams = withCdpMeta(z.object({ "shorthandName": z.string(), "value": z.string() }).passthrough(), "CSS.getLonghandProperties.params", "commandParams", { method: "CSS.getLonghandProperties" }); +export const GetLonghandPropertiesResult = withCdpMeta(z.object({ "longhandProperties": z.array(z.lazy(() => CSSProperty)) }).passthrough(), "CSS.getLonghandProperties.result", "commandResult", { method: "CSS.getLonghandProperties" }); +export const GetInlineStylesForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "CSS.getInlineStylesForNode.params", "commandParams", { method: "CSS.getInlineStylesForNode" }); +export const GetInlineStylesForNodeResult = withCdpMeta(z.object({ "inlineStyle": z.lazy(() => CSSStyle).optional(), "attributesStyle": z.lazy(() => CSSStyle).optional() }).passthrough(), "CSS.getInlineStylesForNode.result", "commandResult", { method: "CSS.getInlineStylesForNode" }); +export const GetAnimatedStylesForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "CSS.getAnimatedStylesForNode.params", "commandParams", { method: "CSS.getAnimatedStylesForNode" }); +export const GetAnimatedStylesForNodeResult = withCdpMeta(z.object({ "animationStyles": z.array(z.lazy(() => CSSAnimationStyle)).optional(), "transitionsStyle": z.lazy(() => CSSStyle).optional(), "inherited": z.array(z.lazy(() => InheritedAnimatedStyleEntry)).optional() }).passthrough(), "CSS.getAnimatedStylesForNode.result", "commandResult", { method: "CSS.getAnimatedStylesForNode" }); +export const GetMatchedStylesForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "CSS.getMatchedStylesForNode.params", "commandParams", { method: "CSS.getMatchedStylesForNode" }); +export const GetMatchedStylesForNodeResult = withCdpMeta(z.object({ "inlineStyle": z.lazy(() => CSSStyle).optional(), "attributesStyle": z.lazy(() => CSSStyle).optional(), "matchedCSSRules": z.array(z.lazy(() => RuleMatch)).optional(), "pseudoElements": z.array(z.lazy(() => PseudoElementMatches)).optional(), "inherited": z.array(z.lazy(() => InheritedStyleEntry)).optional(), "inheritedPseudoElements": z.array(z.lazy(() => InheritedPseudoElementMatches)).optional(), "cssKeyframesRules": z.array(z.lazy(() => CSSKeyframesRule)).optional(), "cssPositionTryRules": z.array(z.lazy(() => CSSPositionTryRule)).optional(), "activePositionFallbackIndex": z.number().int().optional(), "cssPropertyRules": z.array(z.lazy(() => CSSPropertyRule)).optional(), "cssPropertyRegistrations": z.array(z.lazy(() => CSSPropertyRegistration)).optional(), "cssAtRules": z.array(z.lazy(() => CSSAtRule)).optional(), "parentLayoutNodeId": z.lazy(() => DOM.NodeId).optional(), "cssFunctionRules": z.array(z.lazy(() => CSSFunctionRule)).optional() }).passthrough(), "CSS.getMatchedStylesForNode.result", "commandResult", { method: "CSS.getMatchedStylesForNode" }); +export const GetEnvironmentVariablesParams = withCdpMeta(z.object({ }).passthrough(), "CSS.getEnvironmentVariables.params", "commandParams", { method: "CSS.getEnvironmentVariables" }); +export const GetEnvironmentVariablesResult = withCdpMeta(z.object({ "environmentVariables": z.record(z.string(), z.unknown()) }).passthrough(), "CSS.getEnvironmentVariables.result", "commandResult", { method: "CSS.getEnvironmentVariables" }); +export const GetMediaQueriesParams = withCdpMeta(z.object({ }).passthrough(), "CSS.getMediaQueries.params", "commandParams", { method: "CSS.getMediaQueries" }); +export const GetMediaQueriesResult = withCdpMeta(z.object({ "medias": z.array(z.lazy(() => CSSMedia)) }).passthrough(), "CSS.getMediaQueries.result", "commandResult", { method: "CSS.getMediaQueries" }); +export const GetPlatformFontsForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "CSS.getPlatformFontsForNode.params", "commandParams", { method: "CSS.getPlatformFontsForNode" }); +export const GetPlatformFontsForNodeResult = withCdpMeta(z.object({ "fonts": z.array(z.lazy(() => PlatformFontUsage)) }).passthrough(), "CSS.getPlatformFontsForNode.result", "commandResult", { method: "CSS.getPlatformFontsForNode" }); +export const GetStyleSheetTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId) }).passthrough(), "CSS.getStyleSheetText.params", "commandParams", { method: "CSS.getStyleSheetText" }); +export const GetStyleSheetTextResult = withCdpMeta(z.object({ "text": z.string() }).passthrough(), "CSS.getStyleSheetText.result", "commandResult", { method: "CSS.getStyleSheetText" }); +export const GetLayersForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "CSS.getLayersForNode.params", "commandParams", { method: "CSS.getLayersForNode" }); +export const GetLayersForNodeResult = withCdpMeta(z.object({ "rootLayer": z.lazy(() => CSSLayerData) }).passthrough(), "CSS.getLayersForNode.result", "commandResult", { method: "CSS.getLayersForNode" }); +export const GetLocationForSelectorParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "selectorText": z.string() }).passthrough(), "CSS.getLocationForSelector.params", "commandParams", { method: "CSS.getLocationForSelector" }); +export const GetLocationForSelectorResult = withCdpMeta(z.object({ "ranges": z.array(z.lazy(() => SourceRange)) }).passthrough(), "CSS.getLocationForSelector.result", "commandResult", { method: "CSS.getLocationForSelector" }); +export const TrackComputedStyleUpdatesForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId).optional() }).passthrough(), "CSS.trackComputedStyleUpdatesForNode.params", "commandParams", { method: "CSS.trackComputedStyleUpdatesForNode" }); +export const TrackComputedStyleUpdatesForNodeResult = withCdpMeta(z.object({ }).passthrough(), "CSS.trackComputedStyleUpdatesForNode.result", "commandResult", { method: "CSS.trackComputedStyleUpdatesForNode" }); +export const TrackComputedStyleUpdatesParams = withCdpMeta(z.object({ "propertiesToTrack": z.array(z.lazy(() => CSSComputedStyleProperty)) }).passthrough(), "CSS.trackComputedStyleUpdates.params", "commandParams", { method: "CSS.trackComputedStyleUpdates" }); +export const TrackComputedStyleUpdatesResult = withCdpMeta(z.object({ }).passthrough(), "CSS.trackComputedStyleUpdates.result", "commandResult", { method: "CSS.trackComputedStyleUpdates" }); +export const TakeComputedStyleUpdatesParams = withCdpMeta(z.object({ }).passthrough(), "CSS.takeComputedStyleUpdates.params", "commandParams", { method: "CSS.takeComputedStyleUpdates" }); +export const TakeComputedStyleUpdatesResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM.NodeId)) }).passthrough(), "CSS.takeComputedStyleUpdates.result", "commandResult", { method: "CSS.takeComputedStyleUpdates" }); +export const SetEffectivePropertyValueForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId), "propertyName": z.string(), "value": z.string() }).passthrough(), "CSS.setEffectivePropertyValueForNode.params", "commandParams", { method: "CSS.setEffectivePropertyValueForNode" }); +export const SetEffectivePropertyValueForNodeResult = withCdpMeta(z.object({ }).passthrough(), "CSS.setEffectivePropertyValueForNode.result", "commandResult", { method: "CSS.setEffectivePropertyValueForNode" }); +export const SetPropertyRulePropertyNameParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "range": z.lazy(() => SourceRange), "propertyName": z.string() }).passthrough(), "CSS.setPropertyRulePropertyName.params", "commandParams", { method: "CSS.setPropertyRulePropertyName" }); +export const SetPropertyRulePropertyNameResult = withCdpMeta(z.object({ "propertyName": z.lazy(() => Value) }).passthrough(), "CSS.setPropertyRulePropertyName.result", "commandResult", { method: "CSS.setPropertyRulePropertyName" }); +export const SetKeyframeKeyParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "range": z.lazy(() => SourceRange), "keyText": z.string() }).passthrough(), "CSS.setKeyframeKey.params", "commandParams", { method: "CSS.setKeyframeKey" }); +export const SetKeyframeKeyResult = withCdpMeta(z.object({ "keyText": z.lazy(() => Value) }).passthrough(), "CSS.setKeyframeKey.result", "commandResult", { method: "CSS.setKeyframeKey" }); +export const SetMediaTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "range": z.lazy(() => SourceRange), "text": z.string() }).passthrough(), "CSS.setMediaText.params", "commandParams", { method: "CSS.setMediaText" }); +export const SetMediaTextResult = withCdpMeta(z.object({ "media": z.lazy(() => CSSMedia) }).passthrough(), "CSS.setMediaText.result", "commandResult", { method: "CSS.setMediaText" }); +export const SetContainerQueryTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "range": z.lazy(() => SourceRange), "text": z.string() }).passthrough(), "CSS.setContainerQueryText.params", "commandParams", { method: "CSS.setContainerQueryText" }); +export const SetContainerQueryTextResult = withCdpMeta(z.object({ "containerQuery": z.lazy(() => CSSContainerQuery) }).passthrough(), "CSS.setContainerQueryText.result", "commandResult", { method: "CSS.setContainerQueryText" }); +export const SetSupportsTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "range": z.lazy(() => SourceRange), "text": z.string() }).passthrough(), "CSS.setSupportsText.params", "commandParams", { method: "CSS.setSupportsText" }); +export const SetSupportsTextResult = withCdpMeta(z.object({ "supports": z.lazy(() => CSSSupports) }).passthrough(), "CSS.setSupportsText.result", "commandResult", { method: "CSS.setSupportsText" }); +export const SetNavigationTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "range": z.lazy(() => SourceRange), "text": z.string() }).passthrough(), "CSS.setNavigationText.params", "commandParams", { method: "CSS.setNavigationText" }); +export const SetNavigationTextResult = withCdpMeta(z.object({ "navigation": z.lazy(() => CSSNavigation) }).passthrough(), "CSS.setNavigationText.result", "commandResult", { method: "CSS.setNavigationText" }); +export const SetScopeTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "range": z.lazy(() => SourceRange), "text": z.string() }).passthrough(), "CSS.setScopeText.params", "commandParams", { method: "CSS.setScopeText" }); +export const SetScopeTextResult = withCdpMeta(z.object({ "scope": z.lazy(() => CSSScope) }).passthrough(), "CSS.setScopeText.result", "commandResult", { method: "CSS.setScopeText" }); +export const SetRuleSelectorParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "range": z.lazy(() => SourceRange), "selector": z.string() }).passthrough(), "CSS.setRuleSelector.params", "commandParams", { method: "CSS.setRuleSelector" }); +export const SetRuleSelectorResult = withCdpMeta(z.object({ "selectorList": z.lazy(() => SelectorList) }).passthrough(), "CSS.setRuleSelector.result", "commandResult", { method: "CSS.setRuleSelector" }); +export const SetStyleSheetTextParams = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId), "text": z.string() }).passthrough(), "CSS.setStyleSheetText.params", "commandParams", { method: "CSS.setStyleSheetText" }); +export const SetStyleSheetTextResult = withCdpMeta(z.object({ "sourceMapURL": z.string().optional() }).passthrough(), "CSS.setStyleSheetText.result", "commandResult", { method: "CSS.setStyleSheetText" }); +export const SetStyleTextsParams = withCdpMeta(z.object({ "edits": z.array(z.lazy(() => StyleDeclarationEdit)), "nodeForPropertySyntaxValidation": z.lazy(() => DOM.NodeId).optional() }).passthrough(), "CSS.setStyleTexts.params", "commandParams", { method: "CSS.setStyleTexts" }); +export const SetStyleTextsResult = withCdpMeta(z.object({ "styles": z.array(z.lazy(() => CSSStyle)) }).passthrough(), "CSS.setStyleTexts.result", "commandResult", { method: "CSS.setStyleTexts" }); +export const StartRuleUsageTrackingParams = withCdpMeta(z.object({ }).passthrough(), "CSS.startRuleUsageTracking.params", "commandParams", { method: "CSS.startRuleUsageTracking" }); +export const StartRuleUsageTrackingResult = withCdpMeta(z.object({ }).passthrough(), "CSS.startRuleUsageTracking.result", "commandResult", { method: "CSS.startRuleUsageTracking" }); +export const StopRuleUsageTrackingParams = withCdpMeta(z.object({ }).passthrough(), "CSS.stopRuleUsageTracking.params", "commandParams", { method: "CSS.stopRuleUsageTracking" }); +export const StopRuleUsageTrackingResult = withCdpMeta(z.object({ "ruleUsage": z.array(z.lazy(() => RuleUsage)) }).passthrough(), "CSS.stopRuleUsageTracking.result", "commandResult", { method: "CSS.stopRuleUsageTracking" }); +export const TakeCoverageDeltaParams = withCdpMeta(z.object({ }).passthrough(), "CSS.takeCoverageDelta.params", "commandParams", { method: "CSS.takeCoverageDelta" }); +export const TakeCoverageDeltaResult = withCdpMeta(z.object({ "coverage": z.array(z.lazy(() => RuleUsage)), "timestamp": z.number() }).passthrough(), "CSS.takeCoverageDelta.result", "commandResult", { method: "CSS.takeCoverageDelta" }); +export const SetLocalFontsEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "CSS.setLocalFontsEnabled.params", "commandParams", { method: "CSS.setLocalFontsEnabled" }); +export const SetLocalFontsEnabledResult = withCdpMeta(z.object({ }).passthrough(), "CSS.setLocalFontsEnabled.result", "commandResult", { method: "CSS.setLocalFontsEnabled" }); +export const FontsUpdatedEvent = withCdpMeta(z.object({ "font": z.lazy(() => FontFace).optional() }).passthrough(), "CSS.fontsUpdated", "event", { phase: "event" }); +export const MediaQueryResultChangedEvent = withCdpMeta(z.object({ }).passthrough(), "CSS.mediaQueryResultChanged", "event", { phase: "event" }); +export const StyleSheetAddedEvent = withCdpMeta(z.object({ "header": z.lazy(() => CSSStyleSheetHeader) }).passthrough(), "CSS.styleSheetAdded", "event", { phase: "event" }); +export const StyleSheetChangedEvent = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId) }).passthrough(), "CSS.styleSheetChanged", "event", { phase: "event" }); +export const StyleSheetRemovedEvent = withCdpMeta(z.object({ "styleSheetId": z.lazy(() => DOM.StyleSheetId) }).passthrough(), "CSS.styleSheetRemoved", "event", { phase: "event" }); +export const ComputedStyleUpdatedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "CSS.computedStyleUpdated", "event", { phase: "event" }); + +export const zod = { + StyleSheetOrigin: StyleSheetOrigin, + PseudoElementMatches: PseudoElementMatches, + CSSAnimationStyle: CSSAnimationStyle, + InheritedStyleEntry: InheritedStyleEntry, + InheritedAnimatedStyleEntry: InheritedAnimatedStyleEntry, + InheritedPseudoElementMatches: InheritedPseudoElementMatches, + RuleMatch: RuleMatch, + Value: Value, + Specificity: Specificity, + SelectorList: SelectorList, + CSSStyleSheetHeader: CSSStyleSheetHeader, + CSSRule: CSSRule, + CSSRuleType: CSSRuleType, + RuleUsage: RuleUsage, + SourceRange: SourceRange, + ShorthandEntry: ShorthandEntry, + CSSComputedStyleProperty: CSSComputedStyleProperty, + ComputedStyleExtraFields: ComputedStyleExtraFields, + CSSStyle: CSSStyle, + CSSProperty: CSSProperty, + CSSMedia: CSSMedia, + MediaQuery: MediaQuery, + MediaQueryExpression: MediaQueryExpression, + CSSContainerQuery: CSSContainerQuery, + CSSSupports: CSSSupports, + CSSNavigation: CSSNavigation, + CSSScope: CSSScope, + CSSLayer: CSSLayer, + CSSStartingStyle: CSSStartingStyle, + CSSLayerData: CSSLayerData, + PlatformFontUsage: PlatformFontUsage, + FontVariationAxis: FontVariationAxis, + FontFace: FontFace, + CSSTryRule: CSSTryRule, + CSSPositionTryRule: CSSPositionTryRule, + CSSKeyframesRule: CSSKeyframesRule, + CSSPropertyRegistration: CSSPropertyRegistration, + CSSAtRule: CSSAtRule, + CSSPropertyRule: CSSPropertyRule, + CSSFunctionParameter: CSSFunctionParameter, + CSSFunctionConditionNode: CSSFunctionConditionNode, + CSSFunctionNode: CSSFunctionNode, + CSSFunctionRule: CSSFunctionRule, + CSSKeyframeRule: CSSKeyframeRule, + StyleDeclarationEdit: StyleDeclarationEdit, + AddRuleParams: AddRuleParams, + AddRuleResult: AddRuleResult, + CollectClassNamesParams: CollectClassNamesParams, + CollectClassNamesResult: CollectClassNamesResult, + CreateStyleSheetParams: CreateStyleSheetParams, + CreateStyleSheetResult: CreateStyleSheetResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + ForcePseudoStateParams: ForcePseudoStateParams, + ForcePseudoStateResult: ForcePseudoStateResult, + ForceStartingStyleParams: ForceStartingStyleParams, + ForceStartingStyleResult: ForceStartingStyleResult, + GetBackgroundColorsParams: GetBackgroundColorsParams, + GetBackgroundColorsResult: GetBackgroundColorsResult, + GetComputedStyleForNodeParams: GetComputedStyleForNodeParams, + GetComputedStyleForNodeResult: GetComputedStyleForNodeResult, + ResolveValuesParams: ResolveValuesParams, + ResolveValuesResult: ResolveValuesResult, + GetLonghandPropertiesParams: GetLonghandPropertiesParams, + GetLonghandPropertiesResult: GetLonghandPropertiesResult, + GetInlineStylesForNodeParams: GetInlineStylesForNodeParams, + GetInlineStylesForNodeResult: GetInlineStylesForNodeResult, + GetAnimatedStylesForNodeParams: GetAnimatedStylesForNodeParams, + GetAnimatedStylesForNodeResult: GetAnimatedStylesForNodeResult, + GetMatchedStylesForNodeParams: GetMatchedStylesForNodeParams, + GetMatchedStylesForNodeResult: GetMatchedStylesForNodeResult, + GetEnvironmentVariablesParams: GetEnvironmentVariablesParams, + GetEnvironmentVariablesResult: GetEnvironmentVariablesResult, + GetMediaQueriesParams: GetMediaQueriesParams, + GetMediaQueriesResult: GetMediaQueriesResult, + GetPlatformFontsForNodeParams: GetPlatformFontsForNodeParams, + GetPlatformFontsForNodeResult: GetPlatformFontsForNodeResult, + GetStyleSheetTextParams: GetStyleSheetTextParams, + GetStyleSheetTextResult: GetStyleSheetTextResult, + GetLayersForNodeParams: GetLayersForNodeParams, + GetLayersForNodeResult: GetLayersForNodeResult, + GetLocationForSelectorParams: GetLocationForSelectorParams, + GetLocationForSelectorResult: GetLocationForSelectorResult, + TrackComputedStyleUpdatesForNodeParams: TrackComputedStyleUpdatesForNodeParams, + TrackComputedStyleUpdatesForNodeResult: TrackComputedStyleUpdatesForNodeResult, + TrackComputedStyleUpdatesParams: TrackComputedStyleUpdatesParams, + TrackComputedStyleUpdatesResult: TrackComputedStyleUpdatesResult, + TakeComputedStyleUpdatesParams: TakeComputedStyleUpdatesParams, + TakeComputedStyleUpdatesResult: TakeComputedStyleUpdatesResult, + SetEffectivePropertyValueForNodeParams: SetEffectivePropertyValueForNodeParams, + SetEffectivePropertyValueForNodeResult: SetEffectivePropertyValueForNodeResult, + SetPropertyRulePropertyNameParams: SetPropertyRulePropertyNameParams, + SetPropertyRulePropertyNameResult: SetPropertyRulePropertyNameResult, + SetKeyframeKeyParams: SetKeyframeKeyParams, + SetKeyframeKeyResult: SetKeyframeKeyResult, + SetMediaTextParams: SetMediaTextParams, + SetMediaTextResult: SetMediaTextResult, + SetContainerQueryTextParams: SetContainerQueryTextParams, + SetContainerQueryTextResult: SetContainerQueryTextResult, + SetSupportsTextParams: SetSupportsTextParams, + SetSupportsTextResult: SetSupportsTextResult, + SetNavigationTextParams: SetNavigationTextParams, + SetNavigationTextResult: SetNavigationTextResult, + SetScopeTextParams: SetScopeTextParams, + SetScopeTextResult: SetScopeTextResult, + SetRuleSelectorParams: SetRuleSelectorParams, + SetRuleSelectorResult: SetRuleSelectorResult, + SetStyleSheetTextParams: SetStyleSheetTextParams, + SetStyleSheetTextResult: SetStyleSheetTextResult, + SetStyleTextsParams: SetStyleTextsParams, + SetStyleTextsResult: SetStyleTextsResult, + StartRuleUsageTrackingParams: StartRuleUsageTrackingParams, + StartRuleUsageTrackingResult: StartRuleUsageTrackingResult, + StopRuleUsageTrackingParams: StopRuleUsageTrackingParams, + StopRuleUsageTrackingResult: StopRuleUsageTrackingResult, + TakeCoverageDeltaParams: TakeCoverageDeltaParams, + TakeCoverageDeltaResult: TakeCoverageDeltaResult, + SetLocalFontsEnabledParams: SetLocalFontsEnabledParams, + SetLocalFontsEnabledResult: SetLocalFontsEnabledResult, + FontsUpdatedEvent: FontsUpdatedEvent, + MediaQueryResultChangedEvent: MediaQueryResultChangedEvent, + StyleSheetAddedEvent: StyleSheetAddedEvent, + StyleSheetChangedEvent: StyleSheetChangedEvent, + StyleSheetRemovedEvent: StyleSheetRemovedEvent, + ComputedStyleUpdatedEvent: ComputedStyleUpdatedEvent, +} as const; +export const commands = { + "CSS.addRule": { params: AddRuleParams, result: AddRuleResult }, + "CSS.collectClassNames": { params: CollectClassNamesParams, result: CollectClassNamesResult }, + "CSS.createStyleSheet": { params: CreateStyleSheetParams, result: CreateStyleSheetResult }, + "CSS.disable": { params: DisableParams, result: DisableResult }, + "CSS.enable": { params: EnableParams, result: EnableResult }, + "CSS.forcePseudoState": { params: ForcePseudoStateParams, result: ForcePseudoStateResult }, + "CSS.forceStartingStyle": { params: ForceStartingStyleParams, result: ForceStartingStyleResult }, + "CSS.getBackgroundColors": { params: GetBackgroundColorsParams, result: GetBackgroundColorsResult }, + "CSS.getComputedStyleForNode": { params: GetComputedStyleForNodeParams, result: GetComputedStyleForNodeResult }, + "CSS.resolveValues": { params: ResolveValuesParams, result: ResolveValuesResult }, + "CSS.getLonghandProperties": { params: GetLonghandPropertiesParams, result: GetLonghandPropertiesResult }, + "CSS.getInlineStylesForNode": { params: GetInlineStylesForNodeParams, result: GetInlineStylesForNodeResult }, + "CSS.getAnimatedStylesForNode": { params: GetAnimatedStylesForNodeParams, result: GetAnimatedStylesForNodeResult }, + "CSS.getMatchedStylesForNode": { params: GetMatchedStylesForNodeParams, result: GetMatchedStylesForNodeResult }, + "CSS.getEnvironmentVariables": { params: GetEnvironmentVariablesParams, result: GetEnvironmentVariablesResult }, + "CSS.getMediaQueries": { params: GetMediaQueriesParams, result: GetMediaQueriesResult }, + "CSS.getPlatformFontsForNode": { params: GetPlatformFontsForNodeParams, result: GetPlatformFontsForNodeResult }, + "CSS.getStyleSheetText": { params: GetStyleSheetTextParams, result: GetStyleSheetTextResult }, + "CSS.getLayersForNode": { params: GetLayersForNodeParams, result: GetLayersForNodeResult }, + "CSS.getLocationForSelector": { params: GetLocationForSelectorParams, result: GetLocationForSelectorResult }, + "CSS.trackComputedStyleUpdatesForNode": { params: TrackComputedStyleUpdatesForNodeParams, result: TrackComputedStyleUpdatesForNodeResult }, + "CSS.trackComputedStyleUpdates": { params: TrackComputedStyleUpdatesParams, result: TrackComputedStyleUpdatesResult }, + "CSS.takeComputedStyleUpdates": { params: TakeComputedStyleUpdatesParams, result: TakeComputedStyleUpdatesResult }, + "CSS.setEffectivePropertyValueForNode": { params: SetEffectivePropertyValueForNodeParams, result: SetEffectivePropertyValueForNodeResult }, + "CSS.setPropertyRulePropertyName": { params: SetPropertyRulePropertyNameParams, result: SetPropertyRulePropertyNameResult }, + "CSS.setKeyframeKey": { params: SetKeyframeKeyParams, result: SetKeyframeKeyResult }, + "CSS.setMediaText": { params: SetMediaTextParams, result: SetMediaTextResult }, + "CSS.setContainerQueryText": { params: SetContainerQueryTextParams, result: SetContainerQueryTextResult }, + "CSS.setSupportsText": { params: SetSupportsTextParams, result: SetSupportsTextResult }, + "CSS.setNavigationText": { params: SetNavigationTextParams, result: SetNavigationTextResult }, + "CSS.setScopeText": { params: SetScopeTextParams, result: SetScopeTextResult }, + "CSS.setRuleSelector": { params: SetRuleSelectorParams, result: SetRuleSelectorResult }, + "CSS.setStyleSheetText": { params: SetStyleSheetTextParams, result: SetStyleSheetTextResult }, + "CSS.setStyleTexts": { params: SetStyleTextsParams, result: SetStyleTextsResult }, + "CSS.startRuleUsageTracking": { params: StartRuleUsageTrackingParams, result: StartRuleUsageTrackingResult }, + "CSS.stopRuleUsageTracking": { params: StopRuleUsageTrackingParams, result: StopRuleUsageTrackingResult }, + "CSS.takeCoverageDelta": { params: TakeCoverageDeltaParams, result: TakeCoverageDeltaResult }, + "CSS.setLocalFontsEnabled": { params: SetLocalFontsEnabledParams, result: SetLocalFontsEnabledResult }, +} as const; +export const events = { + "CSS.fontsUpdated": FontsUpdatedEvent, + "CSS.mediaQueryResultChanged": MediaQueryResultChangedEvent, + "CSS.styleSheetAdded": StyleSheetAddedEvent, + "CSS.styleSheetChanged": StyleSheetChangedEvent, + "CSS.styleSheetRemoved": StyleSheetRemovedEvent, + "CSS.computedStyleUpdated": ComputedStyleUpdatedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/CacheStorage.ts b/types/zod/CacheStorage.ts new file mode 100644 index 0000000..817a252 --- /dev/null +++ b/types/zod/CacheStorage.ts @@ -0,0 +1,52 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Storage from "./Storage.js"; + +export const CacheId = withCdpMeta(z.string(), "CacheStorage.CacheId", "type"); +export const CachedResponseType = withCdpMeta(z.enum(["basic", "cors", "default", "error", "opaqueResponse", "opaqueRedirect"]), "CacheStorage.CachedResponseType", "type"); +export const DataEntry = withCdpMeta(z.object({ "requestURL": z.string(), "requestMethod": z.string(), "requestHeaders": z.array(z.lazy(() => Header)), "responseTime": z.number(), "responseStatus": z.number().int(), "responseStatusText": z.string(), "responseType": z.lazy(() => CachedResponseType), "responseHeaders": z.array(z.lazy(() => Header)) }).passthrough(), "CacheStorage.DataEntry", "type"); +export const Cache = withCdpMeta(z.object({ "cacheId": z.lazy(() => CacheId), "securityOrigin": z.string(), "storageKey": z.string(), "storageBucket": z.lazy(() => Storage.StorageBucket).optional(), "cacheName": z.string() }).passthrough(), "CacheStorage.Cache", "type"); +export const Header = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "CacheStorage.Header", "type"); +export const CachedResponse = withCdpMeta(z.object({ "body": z.string() }).passthrough(), "CacheStorage.CachedResponse", "type"); +export const DeleteCacheParams = withCdpMeta(z.object({ "cacheId": z.lazy(() => CacheId) }).passthrough(), "CacheStorage.deleteCache.params", "commandParams", { method: "CacheStorage.deleteCache" }); +export const DeleteCacheResult = withCdpMeta(z.object({ }).passthrough(), "CacheStorage.deleteCache.result", "commandResult", { method: "CacheStorage.deleteCache" }); +export const DeleteEntryParams = withCdpMeta(z.object({ "cacheId": z.lazy(() => CacheId), "request": z.string() }).passthrough(), "CacheStorage.deleteEntry.params", "commandParams", { method: "CacheStorage.deleteEntry" }); +export const DeleteEntryResult = withCdpMeta(z.object({ }).passthrough(), "CacheStorage.deleteEntry.result", "commandResult", { method: "CacheStorage.deleteEntry" }); +export const RequestCacheNamesParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage.StorageBucket).optional() }).passthrough().refine((value) => [value.securityOrigin, value.storageKey, value.storageBucket].filter((item) => item !== undefined).length === 1, { message: "Exactly one of securityOrigin, storageKey, or storageBucket must be provided." }), "CacheStorage.requestCacheNames.params", "commandParams", { method: "CacheStorage.requestCacheNames" }); +export const RequestCacheNamesResult = withCdpMeta(z.object({ "caches": z.array(z.lazy(() => Cache)) }).passthrough(), "CacheStorage.requestCacheNames.result", "commandResult", { method: "CacheStorage.requestCacheNames" }); +export const RequestCachedResponseParams = withCdpMeta(z.object({ "cacheId": z.lazy(() => CacheId), "requestURL": z.string(), "requestHeaders": z.array(z.lazy(() => Header)) }).passthrough(), "CacheStorage.requestCachedResponse.params", "commandParams", { method: "CacheStorage.requestCachedResponse" }); +export const RequestCachedResponseResult = withCdpMeta(z.object({ "response": z.lazy(() => CachedResponse) }).passthrough(), "CacheStorage.requestCachedResponse.result", "commandResult", { method: "CacheStorage.requestCachedResponse" }); +export const RequestEntriesParams = withCdpMeta(z.object({ "cacheId": z.lazy(() => CacheId), "skipCount": z.number().int().optional(), "pageSize": z.number().int().optional(), "pathFilter": z.string().optional() }).passthrough(), "CacheStorage.requestEntries.params", "commandParams", { method: "CacheStorage.requestEntries" }); +export const RequestEntriesResult = withCdpMeta(z.object({ "cacheDataEntries": z.array(z.lazy(() => DataEntry)), "returnCount": z.number() }).passthrough(), "CacheStorage.requestEntries.result", "commandResult", { method: "CacheStorage.requestEntries" }); + +export const zod = { + CacheId: CacheId, + CachedResponseType: CachedResponseType, + DataEntry: DataEntry, + Cache: Cache, + Header: Header, + CachedResponse: CachedResponse, + DeleteCacheParams: DeleteCacheParams, + DeleteCacheResult: DeleteCacheResult, + DeleteEntryParams: DeleteEntryParams, + DeleteEntryResult: DeleteEntryResult, + RequestCacheNamesParams: RequestCacheNamesParams, + RequestCacheNamesResult: RequestCacheNamesResult, + RequestCachedResponseParams: RequestCachedResponseParams, + RequestCachedResponseResult: RequestCachedResponseResult, + RequestEntriesParams: RequestEntriesParams, + RequestEntriesResult: RequestEntriesResult, +} as const; +export const commands = { + "CacheStorage.deleteCache": { params: DeleteCacheParams, result: DeleteCacheResult }, + "CacheStorage.deleteEntry": { params: DeleteEntryParams, result: DeleteEntryResult }, + "CacheStorage.requestCacheNames": { params: RequestCacheNamesParams, result: RequestCacheNamesResult }, + "CacheStorage.requestCachedResponse": { params: RequestCachedResponseParams, result: RequestCachedResponseResult }, + "CacheStorage.requestEntries": { params: RequestEntriesParams, result: RequestEntriesResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Cast.ts b/types/zod/Cast.ts new file mode 100644 index 0000000..e9f25dd --- /dev/null +++ b/types/zod/Cast.ts @@ -0,0 +1,52 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const Sink = withCdpMeta(z.object({ "name": z.string(), "id": z.string(), "session": z.string().optional() }).passthrough(), "Cast.Sink", "type"); +export const EnableParams = withCdpMeta(z.object({ "presentationUrl": z.string().optional() }).passthrough(), "Cast.enable.params", "commandParams", { method: "Cast.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Cast.enable.result", "commandResult", { method: "Cast.enable" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Cast.disable.params", "commandParams", { method: "Cast.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Cast.disable.result", "commandResult", { method: "Cast.disable" }); +export const SetSinkToUseParams = withCdpMeta(z.object({ "sinkName": z.string() }).passthrough(), "Cast.setSinkToUse.params", "commandParams", { method: "Cast.setSinkToUse" }); +export const SetSinkToUseResult = withCdpMeta(z.object({ }).passthrough(), "Cast.setSinkToUse.result", "commandResult", { method: "Cast.setSinkToUse" }); +export const StartDesktopMirroringParams = withCdpMeta(z.object({ "sinkName": z.string() }).passthrough(), "Cast.startDesktopMirroring.params", "commandParams", { method: "Cast.startDesktopMirroring" }); +export const StartDesktopMirroringResult = withCdpMeta(z.object({ }).passthrough(), "Cast.startDesktopMirroring.result", "commandResult", { method: "Cast.startDesktopMirroring" }); +export const StartTabMirroringParams = withCdpMeta(z.object({ "sinkName": z.string() }).passthrough(), "Cast.startTabMirroring.params", "commandParams", { method: "Cast.startTabMirroring" }); +export const StartTabMirroringResult = withCdpMeta(z.object({ }).passthrough(), "Cast.startTabMirroring.result", "commandResult", { method: "Cast.startTabMirroring" }); +export const StopCastingParams = withCdpMeta(z.object({ "sinkName": z.string() }).passthrough(), "Cast.stopCasting.params", "commandParams", { method: "Cast.stopCasting" }); +export const StopCastingResult = withCdpMeta(z.object({ }).passthrough(), "Cast.stopCasting.result", "commandResult", { method: "Cast.stopCasting" }); +export const SinksUpdatedEvent = withCdpMeta(z.object({ "sinks": z.array(z.lazy(() => Sink)) }).passthrough(), "Cast.sinksUpdated", "event", { phase: "event" }); +export const IssueUpdatedEvent = withCdpMeta(z.object({ "issueMessage": z.string() }).passthrough(), "Cast.issueUpdated", "event", { phase: "event" }); + +export const zod = { + Sink: Sink, + EnableParams: EnableParams, + EnableResult: EnableResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + SetSinkToUseParams: SetSinkToUseParams, + SetSinkToUseResult: SetSinkToUseResult, + StartDesktopMirroringParams: StartDesktopMirroringParams, + StartDesktopMirroringResult: StartDesktopMirroringResult, + StartTabMirroringParams: StartTabMirroringParams, + StartTabMirroringResult: StartTabMirroringResult, + StopCastingParams: StopCastingParams, + StopCastingResult: StopCastingResult, + SinksUpdatedEvent: SinksUpdatedEvent, + IssueUpdatedEvent: IssueUpdatedEvent, +} as const; +export const commands = { + "Cast.enable": { params: EnableParams, result: EnableResult }, + "Cast.disable": { params: DisableParams, result: DisableResult }, + "Cast.setSinkToUse": { params: SetSinkToUseParams, result: SetSinkToUseResult }, + "Cast.startDesktopMirroring": { params: StartDesktopMirroringParams, result: StartDesktopMirroringResult }, + "Cast.startTabMirroring": { params: StartTabMirroringParams, result: StartTabMirroringResult }, + "Cast.stopCasting": { params: StopCastingParams, result: StopCastingResult }, +} as const; +export const events = { + "Cast.sinksUpdated": SinksUpdatedEvent, + "Cast.issueUpdated": IssueUpdatedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Console.ts b/types/zod/Console.ts new file mode 100644 index 0000000..d957942 --- /dev/null +++ b/types/zod/Console.ts @@ -0,0 +1,34 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const ConsoleMessage = withCdpMeta(z.object({ "source": z.enum(["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "security", "other", "deprecation", "worker"]), "level": z.enum(["log", "warning", "error", "debug", "info"]), "text": z.string(), "url": z.string().optional(), "line": z.number().int().optional(), "column": z.number().int().optional() }).passthrough(), "Console.ConsoleMessage", "type"); +export const ClearMessagesParams = withCdpMeta(z.object({ }).passthrough(), "Console.clearMessages.params", "commandParams", { method: "Console.clearMessages" }); +export const ClearMessagesResult = withCdpMeta(z.object({ }).passthrough(), "Console.clearMessages.result", "commandResult", { method: "Console.clearMessages" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Console.disable.params", "commandParams", { method: "Console.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Console.disable.result", "commandResult", { method: "Console.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Console.enable.params", "commandParams", { method: "Console.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Console.enable.result", "commandResult", { method: "Console.enable" }); +export const MessageAddedEvent = withCdpMeta(z.object({ "message": z.lazy(() => ConsoleMessage) }).passthrough(), "Console.messageAdded", "event", { phase: "event" }); + +export const zod = { + ConsoleMessage: ConsoleMessage, + ClearMessagesParams: ClearMessagesParams, + ClearMessagesResult: ClearMessagesResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + MessageAddedEvent: MessageAddedEvent, +} as const; +export const commands = { + "Console.clearMessages": { params: ClearMessagesParams, result: ClearMessagesResult }, + "Console.disable": { params: DisableParams, result: DisableResult }, + "Console.enable": { params: EnableParams, result: EnableResult }, +} as const; +export const events = { + "Console.messageAdded": MessageAddedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/CrashReportContext.ts b/types/zod/CrashReportContext.ts new file mode 100644 index 0000000..75dc013 --- /dev/null +++ b/types/zod/CrashReportContext.ts @@ -0,0 +1,22 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Page from "./Page.js"; + +export const CrashReportContextEntry = withCdpMeta(z.object({ "key": z.string(), "value": z.string(), "frameId": z.lazy(() => Page.FrameId) }).passthrough(), "CrashReportContext.CrashReportContextEntry", "type"); +export const GetEntriesParams = withCdpMeta(z.object({ }).passthrough(), "CrashReportContext.getEntries.params", "commandParams", { method: "CrashReportContext.getEntries" }); +export const GetEntriesResult = withCdpMeta(z.object({ "entries": z.array(z.lazy(() => CrashReportContextEntry)) }).passthrough(), "CrashReportContext.getEntries.result", "commandResult", { method: "CrashReportContext.getEntries" }); + +export const zod = { + CrashReportContextEntry: CrashReportContextEntry, + GetEntriesParams: GetEntriesParams, + GetEntriesResult: GetEntriesResult, +} as const; +export const commands = { + "CrashReportContext.getEntries": { params: GetEntriesParams, result: GetEntriesResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/DOM.ts b/types/zod/DOM.ts new file mode 100644 index 0000000..0058ad5 --- /dev/null +++ b/types/zod/DOM.ts @@ -0,0 +1,375 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Network from "./Network.js"; +import * as Page from "./Page.js"; +import * as Runtime from "./Runtime.js"; + +export const NodeId = withCdpMeta(z.number().int(), "DOM.NodeId", "type"); +export const BackendNodeId = withCdpMeta(z.number().int(), "DOM.BackendNodeId", "type"); +export const StyleSheetId = withCdpMeta(z.string(), "DOM.StyleSheetId", "type"); +export const BackendNode = withCdpMeta(z.object({ "nodeType": z.number().int(), "nodeName": z.string(), "backendNodeId": z.lazy(() => BackendNodeId) }).passthrough(), "DOM.BackendNode", "type"); +export const PseudoType = withCdpMeta(z.enum(["first-line", "first-letter", "checkmark", "before", "after", "expand-icon", "picker-icon", "interest-button", "marker", "backdrop", "column", "selection", "search-text", "target-text", "spelling-error", "grammar-error", "highlight", "first-line-inherited", "scroll-marker", "scroll-marker-group", "scroll-button", "scrollbar", "scrollbar-thumb", "scrollbar-button", "scrollbar-track", "scrollbar-track-piece", "scrollbar-corner", "resizer", "input-list-button", "view-transition", "view-transition-group", "view-transition-image-pair", "view-transition-group-children", "view-transition-old", "view-transition-new", "placeholder", "file-selector-button", "details-content", "picker", "permission-icon", "overscroll-area-parent"]), "DOM.PseudoType", "type"); +export const ShadowRootType = withCdpMeta(z.enum(["user-agent", "open", "closed"]), "DOM.ShadowRootType", "type"); +export const CompatibilityMode = withCdpMeta(z.enum(["QuirksMode", "LimitedQuirksMode", "NoQuirksMode"]), "DOM.CompatibilityMode", "type"); +export const PhysicalAxes = withCdpMeta(z.enum(["Horizontal", "Vertical", "Both"]), "DOM.PhysicalAxes", "type"); +export const LogicalAxes = withCdpMeta(z.enum(["Inline", "Block", "Both"]), "DOM.LogicalAxes", "type"); +export const ScrollOrientation = withCdpMeta(z.enum(["horizontal", "vertical"]), "DOM.ScrollOrientation", "type"); +export const Node = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "parentId": z.lazy(() => NodeId).optional(), "backendNodeId": z.lazy(() => BackendNodeId), "nodeType": z.number().int(), "nodeName": z.string(), "localName": z.string(), "nodeValue": z.string(), "childNodeCount": z.number().int().optional(), "children": z.array(z.lazy(() => Node)).optional(), "attributes": z.array(z.string()).optional(), "documentURL": z.string().optional(), "baseURL": z.string().optional(), "publicId": z.string().optional(), "systemId": z.string().optional(), "internalSubset": z.string().optional(), "xmlVersion": z.string().optional(), "name": z.string().optional(), "value": z.string().optional(), "pseudoType": z.lazy(() => PseudoType).optional(), "pseudoIdentifier": z.string().optional(), "shadowRootType": z.lazy(() => ShadowRootType).optional(), "frameId": z.lazy(() => Page.FrameId).optional(), "contentDocument": z.lazy(() => Node).optional(), "shadowRoots": z.array(z.lazy(() => Node)).optional(), "templateContent": z.lazy(() => Node).optional(), "pseudoElements": z.array(z.lazy(() => Node)).optional(), "importedDocument": z.lazy(() => Node).optional(), "distributedNodes": z.array(z.lazy(() => BackendNode)).optional(), "isSVG": z.boolean().optional(), "compatibilityMode": z.lazy(() => CompatibilityMode).optional(), "assignedSlot": z.lazy(() => BackendNode).optional(), "isScrollable": z.boolean().optional(), "affectedByStartingStyles": z.boolean().optional(), "adoptedStyleSheets": z.array(z.lazy(() => StyleSheetId)).optional(), "adProvenance": z.lazy(() => Network.AdProvenance).optional() }).passthrough(), "DOM.Node", "type"); +export const DetachedElementInfo = withCdpMeta(z.object({ "treeNode": z.lazy(() => Node), "retainedNodeIds": z.array(z.lazy(() => NodeId)) }).passthrough(), "DOM.DetachedElementInfo", "type"); +export const RGBA = withCdpMeta(z.object({ "r": z.number().int(), "g": z.number().int(), "b": z.number().int(), "a": z.number().optional() }).passthrough(), "DOM.RGBA", "type"); +export const Quad = withCdpMeta(z.array(z.number()), "DOM.Quad", "type"); +export const BoxModel = withCdpMeta(z.object({ "content": z.lazy(() => Quad), "padding": z.lazy(() => Quad), "border": z.lazy(() => Quad), "margin": z.lazy(() => Quad), "width": z.number().int(), "height": z.number().int(), "shapeOutside": z.lazy(() => ShapeOutsideInfo).optional() }).passthrough(), "DOM.BoxModel", "type"); +export const ShapeOutsideInfo = withCdpMeta(z.object({ "bounds": z.lazy(() => Quad), "shape": z.array(z.any()), "marginShape": z.array(z.any()) }).passthrough(), "DOM.ShapeOutsideInfo", "type"); +export const Rect = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "width": z.number(), "height": z.number() }).passthrough(), "DOM.Rect", "type"); +export const CSSComputedStyleProperty = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "DOM.CSSComputedStyleProperty", "type"); +export const CollectClassNamesFromSubtreeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.collectClassNamesFromSubtree.params", "commandParams", { method: "DOM.collectClassNamesFromSubtree" }); +export const CollectClassNamesFromSubtreeResult = withCdpMeta(z.object({ "classNames": z.array(z.string()) }).passthrough(), "DOM.collectClassNamesFromSubtree.result", "commandResult", { method: "DOM.collectClassNamesFromSubtree" }); +export const CopyToParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "targetNodeId": z.lazy(() => NodeId), "insertBeforeNodeId": z.lazy(() => NodeId).optional() }).passthrough(), "DOM.copyTo.params", "commandParams", { method: "DOM.copyTo" }); +export const CopyToResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.copyTo.result", "commandResult", { method: "DOM.copyTo" }); +export const DescribeNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId).optional(), "backendNodeId": z.lazy(() => BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional(), "depth": z.number().int().optional(), "pierce": z.boolean().optional() }).passthrough(), "DOM.describeNode.params", "commandParams", { method: "DOM.describeNode" }); +export const DescribeNodeResult = withCdpMeta(z.object({ "node": z.lazy(() => Node) }).passthrough(), "DOM.describeNode.result", "commandResult", { method: "DOM.describeNode" }); +export const ScrollIntoViewIfNeededParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId).optional(), "backendNodeId": z.lazy(() => BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional(), "rect": z.lazy(() => Rect).optional() }).passthrough(), "DOM.scrollIntoViewIfNeeded.params", "commandParams", { method: "DOM.scrollIntoViewIfNeeded" }); +export const ScrollIntoViewIfNeededResult = withCdpMeta(z.object({ }).passthrough(), "DOM.scrollIntoViewIfNeeded.result", "commandResult", { method: "DOM.scrollIntoViewIfNeeded" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "DOM.disable.params", "commandParams", { method: "DOM.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "DOM.disable.result", "commandResult", { method: "DOM.disable" }); +export const DiscardSearchResultsParams = withCdpMeta(z.object({ "searchId": z.string() }).passthrough(), "DOM.discardSearchResults.params", "commandParams", { method: "DOM.discardSearchResults" }); +export const DiscardSearchResultsResult = withCdpMeta(z.object({ }).passthrough(), "DOM.discardSearchResults.result", "commandResult", { method: "DOM.discardSearchResults" }); +export const EnableParams = withCdpMeta(z.object({ "includeWhitespace": z.enum(["none", "all"]).optional() }).passthrough(), "DOM.enable.params", "commandParams", { method: "DOM.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "DOM.enable.result", "commandResult", { method: "DOM.enable" }); +export const FocusParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId).optional(), "backendNodeId": z.lazy(() => BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional() }).passthrough(), "DOM.focus.params", "commandParams", { method: "DOM.focus" }); +export const FocusResult = withCdpMeta(z.object({ }).passthrough(), "DOM.focus.result", "commandResult", { method: "DOM.focus" }); +export const GetAttributesParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.getAttributes.params", "commandParams", { method: "DOM.getAttributes" }); +export const GetAttributesResult = withCdpMeta(z.object({ "attributes": z.array(z.string()) }).passthrough(), "DOM.getAttributes.result", "commandResult", { method: "DOM.getAttributes" }); +export const GetBoxModelParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId).optional(), "backendNodeId": z.lazy(() => BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional() }).passthrough(), "DOM.getBoxModel.params", "commandParams", { method: "DOM.getBoxModel" }); +export const GetBoxModelResult = withCdpMeta(z.object({ "model": z.lazy(() => BoxModel) }).passthrough(), "DOM.getBoxModel.result", "commandResult", { method: "DOM.getBoxModel" }); +export const GetContentQuadsParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId).optional(), "backendNodeId": z.lazy(() => BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional() }).passthrough(), "DOM.getContentQuads.params", "commandParams", { method: "DOM.getContentQuads" }); +export const GetContentQuadsResult = withCdpMeta(z.object({ "quads": z.array(z.lazy(() => Quad)) }).passthrough(), "DOM.getContentQuads.result", "commandResult", { method: "DOM.getContentQuads" }); +export const GetDocumentParams = withCdpMeta(z.object({ "depth": z.number().int().optional(), "pierce": z.boolean().optional() }).passthrough(), "DOM.getDocument.params", "commandParams", { method: "DOM.getDocument" }); +export const GetDocumentResult = withCdpMeta(z.object({ "root": z.lazy(() => Node) }).passthrough(), "DOM.getDocument.result", "commandResult", { method: "DOM.getDocument" }); +export const GetFlattenedDocumentParams = withCdpMeta(z.object({ "depth": z.number().int().optional(), "pierce": z.boolean().optional() }).passthrough(), "DOM.getFlattenedDocument.params", "commandParams", { method: "DOM.getFlattenedDocument" }); +export const GetFlattenedDocumentResult = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => Node)) }).passthrough(), "DOM.getFlattenedDocument.result", "commandResult", { method: "DOM.getFlattenedDocument" }); +export const GetNodesForSubtreeByStyleParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "computedStyles": z.array(z.lazy(() => CSSComputedStyleProperty)), "pierce": z.boolean().optional() }).passthrough(), "DOM.getNodesForSubtreeByStyle.params", "commandParams", { method: "DOM.getNodesForSubtreeByStyle" }); +export const GetNodesForSubtreeByStyleResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => NodeId)) }).passthrough(), "DOM.getNodesForSubtreeByStyle.result", "commandResult", { method: "DOM.getNodesForSubtreeByStyle" }); +export const GetNodeForLocationParams = withCdpMeta(z.object({ "x": z.number().int(), "y": z.number().int(), "includeUserAgentShadowDOM": z.boolean().optional(), "ignorePointerEventsNone": z.boolean().optional() }).passthrough(), "DOM.getNodeForLocation.params", "commandParams", { method: "DOM.getNodeForLocation" }); +export const GetNodeForLocationResult = withCdpMeta(z.object({ "backendNodeId": z.lazy(() => BackendNodeId), "frameId": z.lazy(() => Page.FrameId), "nodeId": z.lazy(() => NodeId).optional() }).passthrough(), "DOM.getNodeForLocation.result", "commandResult", { method: "DOM.getNodeForLocation" }); +export const GetOuterHTMLParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId).optional(), "backendNodeId": z.lazy(() => BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional(), "includeShadowDOM": z.boolean().optional() }).passthrough(), "DOM.getOuterHTML.params", "commandParams", { method: "DOM.getOuterHTML" }); +export const GetOuterHTMLResult = withCdpMeta(z.object({ "outerHTML": z.string() }).passthrough(), "DOM.getOuterHTML.result", "commandResult", { method: "DOM.getOuterHTML" }); +export const GetRelayoutBoundaryParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.getRelayoutBoundary.params", "commandParams", { method: "DOM.getRelayoutBoundary" }); +export const GetRelayoutBoundaryResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.getRelayoutBoundary.result", "commandResult", { method: "DOM.getRelayoutBoundary" }); +export const GetSearchResultsParams = withCdpMeta(z.object({ "searchId": z.string(), "fromIndex": z.number().int(), "toIndex": z.number().int() }).passthrough(), "DOM.getSearchResults.params", "commandParams", { method: "DOM.getSearchResults" }); +export const GetSearchResultsResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => NodeId)) }).passthrough(), "DOM.getSearchResults.result", "commandResult", { method: "DOM.getSearchResults" }); +export const HideHighlightParams = withCdpMeta(z.object({ }).passthrough(), "DOM.hideHighlight.params", "commandParams", { method: "DOM.hideHighlight" }); +export const HideHighlightResult = withCdpMeta(z.object({ }).passthrough(), "DOM.hideHighlight.result", "commandResult", { method: "DOM.hideHighlight" }); +export const HighlightNodeParams = withCdpMeta(z.object({ }).passthrough(), "DOM.highlightNode.params", "commandParams", { method: "DOM.highlightNode" }); +export const HighlightNodeResult = withCdpMeta(z.object({ }).passthrough(), "DOM.highlightNode.result", "commandResult", { method: "DOM.highlightNode" }); +export const HighlightRectParams = withCdpMeta(z.object({ }).passthrough(), "DOM.highlightRect.params", "commandParams", { method: "DOM.highlightRect" }); +export const HighlightRectResult = withCdpMeta(z.object({ }).passthrough(), "DOM.highlightRect.result", "commandResult", { method: "DOM.highlightRect" }); +export const MarkUndoableStateParams = withCdpMeta(z.object({ }).passthrough(), "DOM.markUndoableState.params", "commandParams", { method: "DOM.markUndoableState" }); +export const MarkUndoableStateResult = withCdpMeta(z.object({ }).passthrough(), "DOM.markUndoableState.result", "commandResult", { method: "DOM.markUndoableState" }); +export const MoveToParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "targetNodeId": z.lazy(() => NodeId), "insertBeforeNodeId": z.lazy(() => NodeId).optional() }).passthrough(), "DOM.moveTo.params", "commandParams", { method: "DOM.moveTo" }); +export const MoveToResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.moveTo.result", "commandResult", { method: "DOM.moveTo" }); +export const PerformSearchParams = withCdpMeta(z.object({ "query": z.string(), "includeUserAgentShadowDOM": z.boolean().optional() }).passthrough(), "DOM.performSearch.params", "commandParams", { method: "DOM.performSearch" }); +export const PerformSearchResult = withCdpMeta(z.object({ "searchId": z.string(), "resultCount": z.number().int() }).passthrough(), "DOM.performSearch.result", "commandResult", { method: "DOM.performSearch" }); +export const PushNodeByPathToFrontendParams = withCdpMeta(z.object({ "path": z.string() }).passthrough(), "DOM.pushNodeByPathToFrontend.params", "commandParams", { method: "DOM.pushNodeByPathToFrontend" }); +export const PushNodeByPathToFrontendResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.pushNodeByPathToFrontend.result", "commandResult", { method: "DOM.pushNodeByPathToFrontend" }); +export const PushNodesByBackendIdsToFrontendParams = withCdpMeta(z.object({ "backendNodeIds": z.array(z.lazy(() => BackendNodeId)) }).passthrough(), "DOM.pushNodesByBackendIdsToFrontend.params", "commandParams", { method: "DOM.pushNodesByBackendIdsToFrontend" }); +export const PushNodesByBackendIdsToFrontendResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => NodeId)) }).passthrough(), "DOM.pushNodesByBackendIdsToFrontend.result", "commandResult", { method: "DOM.pushNodesByBackendIdsToFrontend" }); +export const QuerySelectorParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "selector": z.string() }).passthrough(), "DOM.querySelector.params", "commandParams", { method: "DOM.querySelector" }); +export const QuerySelectorResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.querySelector.result", "commandResult", { method: "DOM.querySelector" }); +export const QuerySelectorAllParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "selector": z.string() }).passthrough(), "DOM.querySelectorAll.params", "commandParams", { method: "DOM.querySelectorAll" }); +export const QuerySelectorAllResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => NodeId)) }).passthrough(), "DOM.querySelectorAll.result", "commandResult", { method: "DOM.querySelectorAll" }); +export const GetTopLayerElementsParams = withCdpMeta(z.object({ }).passthrough(), "DOM.getTopLayerElements.params", "commandParams", { method: "DOM.getTopLayerElements" }); +export const GetTopLayerElementsResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => NodeId)) }).passthrough(), "DOM.getTopLayerElements.result", "commandResult", { method: "DOM.getTopLayerElements" }); +export const GetElementByRelationParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "relation": z.enum(["PopoverTarget", "InterestTarget", "CommandFor"]) }).passthrough(), "DOM.getElementByRelation.params", "commandParams", { method: "DOM.getElementByRelation" }); +export const GetElementByRelationResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.getElementByRelation.result", "commandResult", { method: "DOM.getElementByRelation" }); +export const RedoParams = withCdpMeta(z.object({ }).passthrough(), "DOM.redo.params", "commandParams", { method: "DOM.redo" }); +export const RedoResult = withCdpMeta(z.object({ }).passthrough(), "DOM.redo.result", "commandResult", { method: "DOM.redo" }); +export const RemoveAttributeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "name": z.string() }).passthrough(), "DOM.removeAttribute.params", "commandParams", { method: "DOM.removeAttribute" }); +export const RemoveAttributeResult = withCdpMeta(z.object({ }).passthrough(), "DOM.removeAttribute.result", "commandResult", { method: "DOM.removeAttribute" }); +export const RemoveNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.removeNode.params", "commandParams", { method: "DOM.removeNode" }); +export const RemoveNodeResult = withCdpMeta(z.object({ }).passthrough(), "DOM.removeNode.result", "commandResult", { method: "DOM.removeNode" }); +export const RequestChildNodesParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "depth": z.number().int().optional(), "pierce": z.boolean().optional() }).passthrough(), "DOM.requestChildNodes.params", "commandParams", { method: "DOM.requestChildNodes" }); +export const RequestChildNodesResult = withCdpMeta(z.object({ }).passthrough(), "DOM.requestChildNodes.result", "commandResult", { method: "DOM.requestChildNodes" }); +export const RequestNodeParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime.RemoteObjectId) }).passthrough(), "DOM.requestNode.params", "commandParams", { method: "DOM.requestNode" }); +export const RequestNodeResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.requestNode.result", "commandResult", { method: "DOM.requestNode" }); +export const ResolveNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId).optional(), "backendNodeId": z.lazy(() => BackendNodeId).optional(), "objectGroup": z.string().optional(), "executionContextId": z.lazy(() => Runtime.ExecutionContextId).optional() }).passthrough(), "DOM.resolveNode.params", "commandParams", { method: "DOM.resolveNode" }); +export const ResolveNodeResult = withCdpMeta(z.object({ "object": z.lazy(() => Runtime.RemoteObject) }).passthrough(), "DOM.resolveNode.result", "commandResult", { method: "DOM.resolveNode" }); +export const SetAttributeValueParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "name": z.string(), "value": z.string() }).passthrough(), "DOM.setAttributeValue.params", "commandParams", { method: "DOM.setAttributeValue" }); +export const SetAttributeValueResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setAttributeValue.result", "commandResult", { method: "DOM.setAttributeValue" }); +export const SetAttributesAsTextParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "text": z.string(), "name": z.string().optional() }).passthrough(), "DOM.setAttributesAsText.params", "commandParams", { method: "DOM.setAttributesAsText" }); +export const SetAttributesAsTextResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setAttributesAsText.result", "commandResult", { method: "DOM.setAttributesAsText" }); +export const SetFileInputFilesParams = withCdpMeta(z.object({ "files": z.array(z.string()), "nodeId": z.lazy(() => NodeId).optional(), "backendNodeId": z.lazy(() => BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional() }).passthrough(), "DOM.setFileInputFiles.params", "commandParams", { method: "DOM.setFileInputFiles" }); +export const SetFileInputFilesResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setFileInputFiles.result", "commandResult", { method: "DOM.setFileInputFiles" }); +export const SetNodeStackTracesEnabledParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "DOM.setNodeStackTracesEnabled.params", "commandParams", { method: "DOM.setNodeStackTracesEnabled" }); +export const SetNodeStackTracesEnabledResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setNodeStackTracesEnabled.result", "commandResult", { method: "DOM.setNodeStackTracesEnabled" }); +export const GetNodeStackTracesParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.getNodeStackTraces.params", "commandParams", { method: "DOM.getNodeStackTraces" }); +export const GetNodeStackTracesResult = withCdpMeta(z.object({ "creation": z.lazy(() => Runtime.StackTrace).optional() }).passthrough(), "DOM.getNodeStackTraces.result", "commandResult", { method: "DOM.getNodeStackTraces" }); +export const GetFileInfoParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime.RemoteObjectId) }).passthrough(), "DOM.getFileInfo.params", "commandParams", { method: "DOM.getFileInfo" }); +export const GetFileInfoResult = withCdpMeta(z.object({ "path": z.string() }).passthrough(), "DOM.getFileInfo.result", "commandResult", { method: "DOM.getFileInfo" }); +export const GetDetachedDomNodesParams = withCdpMeta(z.object({ }).passthrough(), "DOM.getDetachedDomNodes.params", "commandParams", { method: "DOM.getDetachedDomNodes" }); +export const GetDetachedDomNodesResult = withCdpMeta(z.object({ "detachedNodes": z.array(z.lazy(() => DetachedElementInfo)) }).passthrough(), "DOM.getDetachedDomNodes.result", "commandResult", { method: "DOM.getDetachedDomNodes" }); +export const SetInspectedNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.setInspectedNode.params", "commandParams", { method: "DOM.setInspectedNode" }); +export const SetInspectedNodeResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setInspectedNode.result", "commandResult", { method: "DOM.setInspectedNode" }); +export const SetNodeNameParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "name": z.string() }).passthrough(), "DOM.setNodeName.params", "commandParams", { method: "DOM.setNodeName" }); +export const SetNodeNameResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.setNodeName.result", "commandResult", { method: "DOM.setNodeName" }); +export const SetNodeValueParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "value": z.string() }).passthrough(), "DOM.setNodeValue.params", "commandParams", { method: "DOM.setNodeValue" }); +export const SetNodeValueResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setNodeValue.result", "commandResult", { method: "DOM.setNodeValue" }); +export const SetOuterHTMLParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "outerHTML": z.string() }).passthrough(), "DOM.setOuterHTML.params", "commandParams", { method: "DOM.setOuterHTML" }); +export const SetOuterHTMLResult = withCdpMeta(z.object({ }).passthrough(), "DOM.setOuterHTML.result", "commandResult", { method: "DOM.setOuterHTML" }); +export const UndoParams = withCdpMeta(z.object({ }).passthrough(), "DOM.undo.params", "commandParams", { method: "DOM.undo" }); +export const UndoResult = withCdpMeta(z.object({ }).passthrough(), "DOM.undo.result", "commandResult", { method: "DOM.undo" }); +export const GetFrameOwnerParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId) }).passthrough(), "DOM.getFrameOwner.params", "commandParams", { method: "DOM.getFrameOwner" }); +export const GetFrameOwnerResult = withCdpMeta(z.object({ "backendNodeId": z.lazy(() => BackendNodeId), "nodeId": z.lazy(() => NodeId).optional() }).passthrough(), "DOM.getFrameOwner.result", "commandResult", { method: "DOM.getFrameOwner" }); +export const GetContainerForNodeParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "containerName": z.string().optional(), "physicalAxes": z.lazy(() => PhysicalAxes).optional(), "logicalAxes": z.lazy(() => LogicalAxes).optional(), "queriesScrollState": z.boolean().optional(), "queriesAnchored": z.boolean().optional() }).passthrough(), "DOM.getContainerForNode.params", "commandParams", { method: "DOM.getContainerForNode" }); +export const GetContainerForNodeResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId).optional() }).passthrough(), "DOM.getContainerForNode.result", "commandResult", { method: "DOM.getContainerForNode" }); +export const GetQueryingDescendantsForContainerParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.getQueryingDescendantsForContainer.params", "commandParams", { method: "DOM.getQueryingDescendantsForContainer" }); +export const GetQueryingDescendantsForContainerResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => NodeId)) }).passthrough(), "DOM.getQueryingDescendantsForContainer.result", "commandResult", { method: "DOM.getQueryingDescendantsForContainer" }); +export const GetAnchorElementParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "anchorSpecifier": z.string().optional() }).passthrough(), "DOM.getAnchorElement.params", "commandParams", { method: "DOM.getAnchorElement" }); +export const GetAnchorElementResult = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.getAnchorElement.result", "commandResult", { method: "DOM.getAnchorElement" }); +export const ForceShowPopoverParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "enable": z.boolean() }).passthrough(), "DOM.forceShowPopover.params", "commandParams", { method: "DOM.forceShowPopover" }); +export const ForceShowPopoverResult = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => NodeId)) }).passthrough(), "DOM.forceShowPopover.result", "commandResult", { method: "DOM.forceShowPopover" }); +export const AttributeModifiedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "name": z.string(), "value": z.string() }).passthrough(), "DOM.attributeModified", "event", { phase: "event" }); +export const AdoptedStyleSheetsModifiedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "adoptedStyleSheets": z.array(z.lazy(() => StyleSheetId)) }).passthrough(), "DOM.adoptedStyleSheetsModified", "event", { phase: "event" }); +export const AttributeRemovedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "name": z.string() }).passthrough(), "DOM.attributeRemoved", "event", { phase: "event" }); +export const CharacterDataModifiedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "characterData": z.string() }).passthrough(), "DOM.characterDataModified", "event", { phase: "event" }); +export const ChildNodeCountUpdatedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "childNodeCount": z.number().int() }).passthrough(), "DOM.childNodeCountUpdated", "event", { phase: "event" }); +export const ChildNodeInsertedEvent = withCdpMeta(z.object({ "parentNodeId": z.lazy(() => NodeId), "previousNodeId": z.lazy(() => NodeId), "node": z.lazy(() => Node) }).passthrough(), "DOM.childNodeInserted", "event", { phase: "event" }); +export const ChildNodeRemovedEvent = withCdpMeta(z.object({ "parentNodeId": z.lazy(() => NodeId), "nodeId": z.lazy(() => NodeId) }).passthrough(), "DOM.childNodeRemoved", "event", { phase: "event" }); +export const DistributedNodesUpdatedEvent = withCdpMeta(z.object({ "insertionPointId": z.lazy(() => NodeId), "distributedNodes": z.array(z.lazy(() => BackendNode)) }).passthrough(), "DOM.distributedNodesUpdated", "event", { phase: "event" }); +export const DocumentUpdatedEvent = withCdpMeta(z.object({ }).passthrough(), "DOM.documentUpdated", "event", { phase: "event" }); +export const InlineStyleInvalidatedEvent = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => NodeId)) }).passthrough(), "DOM.inlineStyleInvalidated", "event", { phase: "event" }); +export const PseudoElementAddedEvent = withCdpMeta(z.object({ "parentId": z.lazy(() => NodeId), "pseudoElement": z.lazy(() => Node) }).passthrough(), "DOM.pseudoElementAdded", "event", { phase: "event" }); +export const TopLayerElementsUpdatedEvent = withCdpMeta(z.object({ }).passthrough(), "DOM.topLayerElementsUpdated", "event", { phase: "event" }); +export const ScrollableFlagUpdatedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "isScrollable": z.boolean() }).passthrough(), "DOM.scrollableFlagUpdated", "event", { phase: "event" }); +export const AdRelatedStateUpdatedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "adProvenance": z.lazy(() => Network.AdProvenance).optional() }).passthrough(), "DOM.adRelatedStateUpdated", "event", { phase: "event" }); +export const AffectedByStartingStylesFlagUpdatedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => NodeId), "affectedByStartingStyles": z.boolean() }).passthrough(), "DOM.affectedByStartingStylesFlagUpdated", "event", { phase: "event" }); +export const PseudoElementRemovedEvent = withCdpMeta(z.object({ "parentId": z.lazy(() => NodeId), "pseudoElementId": z.lazy(() => NodeId) }).passthrough(), "DOM.pseudoElementRemoved", "event", { phase: "event" }); +export const SetChildNodesEvent = withCdpMeta(z.object({ "parentId": z.lazy(() => NodeId), "nodes": z.array(z.lazy(() => Node)) }).passthrough(), "DOM.setChildNodes", "event", { phase: "event" }); +export const ShadowRootPoppedEvent = withCdpMeta(z.object({ "hostId": z.lazy(() => NodeId), "rootId": z.lazy(() => NodeId) }).passthrough(), "DOM.shadowRootPopped", "event", { phase: "event" }); +export const ShadowRootPushedEvent = withCdpMeta(z.object({ "hostId": z.lazy(() => NodeId), "root": z.lazy(() => Node) }).passthrough(), "DOM.shadowRootPushed", "event", { phase: "event" }); + +export const zod = { + NodeId: NodeId, + BackendNodeId: BackendNodeId, + StyleSheetId: StyleSheetId, + BackendNode: BackendNode, + PseudoType: PseudoType, + ShadowRootType: ShadowRootType, + CompatibilityMode: CompatibilityMode, + PhysicalAxes: PhysicalAxes, + LogicalAxes: LogicalAxes, + ScrollOrientation: ScrollOrientation, + Node: Node, + DetachedElementInfo: DetachedElementInfo, + RGBA: RGBA, + Quad: Quad, + BoxModel: BoxModel, + ShapeOutsideInfo: ShapeOutsideInfo, + Rect: Rect, + CSSComputedStyleProperty: CSSComputedStyleProperty, + CollectClassNamesFromSubtreeParams: CollectClassNamesFromSubtreeParams, + CollectClassNamesFromSubtreeResult: CollectClassNamesFromSubtreeResult, + CopyToParams: CopyToParams, + CopyToResult: CopyToResult, + DescribeNodeParams: DescribeNodeParams, + DescribeNodeResult: DescribeNodeResult, + ScrollIntoViewIfNeededParams: ScrollIntoViewIfNeededParams, + ScrollIntoViewIfNeededResult: ScrollIntoViewIfNeededResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + DiscardSearchResultsParams: DiscardSearchResultsParams, + DiscardSearchResultsResult: DiscardSearchResultsResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + FocusParams: FocusParams, + FocusResult: FocusResult, + GetAttributesParams: GetAttributesParams, + GetAttributesResult: GetAttributesResult, + GetBoxModelParams: GetBoxModelParams, + GetBoxModelResult: GetBoxModelResult, + GetContentQuadsParams: GetContentQuadsParams, + GetContentQuadsResult: GetContentQuadsResult, + GetDocumentParams: GetDocumentParams, + GetDocumentResult: GetDocumentResult, + GetFlattenedDocumentParams: GetFlattenedDocumentParams, + GetFlattenedDocumentResult: GetFlattenedDocumentResult, + GetNodesForSubtreeByStyleParams: GetNodesForSubtreeByStyleParams, + GetNodesForSubtreeByStyleResult: GetNodesForSubtreeByStyleResult, + GetNodeForLocationParams: GetNodeForLocationParams, + GetNodeForLocationResult: GetNodeForLocationResult, + GetOuterHTMLParams: GetOuterHTMLParams, + GetOuterHTMLResult: GetOuterHTMLResult, + GetRelayoutBoundaryParams: GetRelayoutBoundaryParams, + GetRelayoutBoundaryResult: GetRelayoutBoundaryResult, + GetSearchResultsParams: GetSearchResultsParams, + GetSearchResultsResult: GetSearchResultsResult, + HideHighlightParams: HideHighlightParams, + HideHighlightResult: HideHighlightResult, + HighlightNodeParams: HighlightNodeParams, + HighlightNodeResult: HighlightNodeResult, + HighlightRectParams: HighlightRectParams, + HighlightRectResult: HighlightRectResult, + MarkUndoableStateParams: MarkUndoableStateParams, + MarkUndoableStateResult: MarkUndoableStateResult, + MoveToParams: MoveToParams, + MoveToResult: MoveToResult, + PerformSearchParams: PerformSearchParams, + PerformSearchResult: PerformSearchResult, + PushNodeByPathToFrontendParams: PushNodeByPathToFrontendParams, + PushNodeByPathToFrontendResult: PushNodeByPathToFrontendResult, + PushNodesByBackendIdsToFrontendParams: PushNodesByBackendIdsToFrontendParams, + PushNodesByBackendIdsToFrontendResult: PushNodesByBackendIdsToFrontendResult, + QuerySelectorParams: QuerySelectorParams, + QuerySelectorResult: QuerySelectorResult, + QuerySelectorAllParams: QuerySelectorAllParams, + QuerySelectorAllResult: QuerySelectorAllResult, + GetTopLayerElementsParams: GetTopLayerElementsParams, + GetTopLayerElementsResult: GetTopLayerElementsResult, + GetElementByRelationParams: GetElementByRelationParams, + GetElementByRelationResult: GetElementByRelationResult, + RedoParams: RedoParams, + RedoResult: RedoResult, + RemoveAttributeParams: RemoveAttributeParams, + RemoveAttributeResult: RemoveAttributeResult, + RemoveNodeParams: RemoveNodeParams, + RemoveNodeResult: RemoveNodeResult, + RequestChildNodesParams: RequestChildNodesParams, + RequestChildNodesResult: RequestChildNodesResult, + RequestNodeParams: RequestNodeParams, + RequestNodeResult: RequestNodeResult, + ResolveNodeParams: ResolveNodeParams, + ResolveNodeResult: ResolveNodeResult, + SetAttributeValueParams: SetAttributeValueParams, + SetAttributeValueResult: SetAttributeValueResult, + SetAttributesAsTextParams: SetAttributesAsTextParams, + SetAttributesAsTextResult: SetAttributesAsTextResult, + SetFileInputFilesParams: SetFileInputFilesParams, + SetFileInputFilesResult: SetFileInputFilesResult, + SetNodeStackTracesEnabledParams: SetNodeStackTracesEnabledParams, + SetNodeStackTracesEnabledResult: SetNodeStackTracesEnabledResult, + GetNodeStackTracesParams: GetNodeStackTracesParams, + GetNodeStackTracesResult: GetNodeStackTracesResult, + GetFileInfoParams: GetFileInfoParams, + GetFileInfoResult: GetFileInfoResult, + GetDetachedDomNodesParams: GetDetachedDomNodesParams, + GetDetachedDomNodesResult: GetDetachedDomNodesResult, + SetInspectedNodeParams: SetInspectedNodeParams, + SetInspectedNodeResult: SetInspectedNodeResult, + SetNodeNameParams: SetNodeNameParams, + SetNodeNameResult: SetNodeNameResult, + SetNodeValueParams: SetNodeValueParams, + SetNodeValueResult: SetNodeValueResult, + SetOuterHTMLParams: SetOuterHTMLParams, + SetOuterHTMLResult: SetOuterHTMLResult, + UndoParams: UndoParams, + UndoResult: UndoResult, + GetFrameOwnerParams: GetFrameOwnerParams, + GetFrameOwnerResult: GetFrameOwnerResult, + GetContainerForNodeParams: GetContainerForNodeParams, + GetContainerForNodeResult: GetContainerForNodeResult, + GetQueryingDescendantsForContainerParams: GetQueryingDescendantsForContainerParams, + GetQueryingDescendantsForContainerResult: GetQueryingDescendantsForContainerResult, + GetAnchorElementParams: GetAnchorElementParams, + GetAnchorElementResult: GetAnchorElementResult, + ForceShowPopoverParams: ForceShowPopoverParams, + ForceShowPopoverResult: ForceShowPopoverResult, + AttributeModifiedEvent: AttributeModifiedEvent, + AdoptedStyleSheetsModifiedEvent: AdoptedStyleSheetsModifiedEvent, + AttributeRemovedEvent: AttributeRemovedEvent, + CharacterDataModifiedEvent: CharacterDataModifiedEvent, + ChildNodeCountUpdatedEvent: ChildNodeCountUpdatedEvent, + ChildNodeInsertedEvent: ChildNodeInsertedEvent, + ChildNodeRemovedEvent: ChildNodeRemovedEvent, + DistributedNodesUpdatedEvent: DistributedNodesUpdatedEvent, + DocumentUpdatedEvent: DocumentUpdatedEvent, + InlineStyleInvalidatedEvent: InlineStyleInvalidatedEvent, + PseudoElementAddedEvent: PseudoElementAddedEvent, + TopLayerElementsUpdatedEvent: TopLayerElementsUpdatedEvent, + ScrollableFlagUpdatedEvent: ScrollableFlagUpdatedEvent, + AdRelatedStateUpdatedEvent: AdRelatedStateUpdatedEvent, + AffectedByStartingStylesFlagUpdatedEvent: AffectedByStartingStylesFlagUpdatedEvent, + PseudoElementRemovedEvent: PseudoElementRemovedEvent, + SetChildNodesEvent: SetChildNodesEvent, + ShadowRootPoppedEvent: ShadowRootPoppedEvent, + ShadowRootPushedEvent: ShadowRootPushedEvent, +} as const; +export const commands = { + "DOM.collectClassNamesFromSubtree": { params: CollectClassNamesFromSubtreeParams, result: CollectClassNamesFromSubtreeResult }, + "DOM.copyTo": { params: CopyToParams, result: CopyToResult }, + "DOM.describeNode": { params: DescribeNodeParams, result: DescribeNodeResult }, + "DOM.scrollIntoViewIfNeeded": { params: ScrollIntoViewIfNeededParams, result: ScrollIntoViewIfNeededResult }, + "DOM.disable": { params: DisableParams, result: DisableResult }, + "DOM.discardSearchResults": { params: DiscardSearchResultsParams, result: DiscardSearchResultsResult }, + "DOM.enable": { params: EnableParams, result: EnableResult }, + "DOM.focus": { params: FocusParams, result: FocusResult }, + "DOM.getAttributes": { params: GetAttributesParams, result: GetAttributesResult }, + "DOM.getBoxModel": { params: GetBoxModelParams, result: GetBoxModelResult }, + "DOM.getContentQuads": { params: GetContentQuadsParams, result: GetContentQuadsResult }, + "DOM.getDocument": { params: GetDocumentParams, result: GetDocumentResult }, + "DOM.getFlattenedDocument": { params: GetFlattenedDocumentParams, result: GetFlattenedDocumentResult }, + "DOM.getNodesForSubtreeByStyle": { params: GetNodesForSubtreeByStyleParams, result: GetNodesForSubtreeByStyleResult }, + "DOM.getNodeForLocation": { params: GetNodeForLocationParams, result: GetNodeForLocationResult }, + "DOM.getOuterHTML": { params: GetOuterHTMLParams, result: GetOuterHTMLResult }, + "DOM.getRelayoutBoundary": { params: GetRelayoutBoundaryParams, result: GetRelayoutBoundaryResult }, + "DOM.getSearchResults": { params: GetSearchResultsParams, result: GetSearchResultsResult }, + "DOM.hideHighlight": { params: HideHighlightParams, result: HideHighlightResult }, + "DOM.highlightNode": { params: HighlightNodeParams, result: HighlightNodeResult }, + "DOM.highlightRect": { params: HighlightRectParams, result: HighlightRectResult }, + "DOM.markUndoableState": { params: MarkUndoableStateParams, result: MarkUndoableStateResult }, + "DOM.moveTo": { params: MoveToParams, result: MoveToResult }, + "DOM.performSearch": { params: PerformSearchParams, result: PerformSearchResult }, + "DOM.pushNodeByPathToFrontend": { params: PushNodeByPathToFrontendParams, result: PushNodeByPathToFrontendResult }, + "DOM.pushNodesByBackendIdsToFrontend": { params: PushNodesByBackendIdsToFrontendParams, result: PushNodesByBackendIdsToFrontendResult }, + "DOM.querySelector": { params: QuerySelectorParams, result: QuerySelectorResult }, + "DOM.querySelectorAll": { params: QuerySelectorAllParams, result: QuerySelectorAllResult }, + "DOM.getTopLayerElements": { params: GetTopLayerElementsParams, result: GetTopLayerElementsResult }, + "DOM.getElementByRelation": { params: GetElementByRelationParams, result: GetElementByRelationResult }, + "DOM.redo": { params: RedoParams, result: RedoResult }, + "DOM.removeAttribute": { params: RemoveAttributeParams, result: RemoveAttributeResult }, + "DOM.removeNode": { params: RemoveNodeParams, result: RemoveNodeResult }, + "DOM.requestChildNodes": { params: RequestChildNodesParams, result: RequestChildNodesResult }, + "DOM.requestNode": { params: RequestNodeParams, result: RequestNodeResult }, + "DOM.resolveNode": { params: ResolveNodeParams, result: ResolveNodeResult }, + "DOM.setAttributeValue": { params: SetAttributeValueParams, result: SetAttributeValueResult }, + "DOM.setAttributesAsText": { params: SetAttributesAsTextParams, result: SetAttributesAsTextResult }, + "DOM.setFileInputFiles": { params: SetFileInputFilesParams, result: SetFileInputFilesResult }, + "DOM.setNodeStackTracesEnabled": { params: SetNodeStackTracesEnabledParams, result: SetNodeStackTracesEnabledResult }, + "DOM.getNodeStackTraces": { params: GetNodeStackTracesParams, result: GetNodeStackTracesResult }, + "DOM.getFileInfo": { params: GetFileInfoParams, result: GetFileInfoResult }, + "DOM.getDetachedDomNodes": { params: GetDetachedDomNodesParams, result: GetDetachedDomNodesResult }, + "DOM.setInspectedNode": { params: SetInspectedNodeParams, result: SetInspectedNodeResult }, + "DOM.setNodeName": { params: SetNodeNameParams, result: SetNodeNameResult }, + "DOM.setNodeValue": { params: SetNodeValueParams, result: SetNodeValueResult }, + "DOM.setOuterHTML": { params: SetOuterHTMLParams, result: SetOuterHTMLResult }, + "DOM.undo": { params: UndoParams, result: UndoResult }, + "DOM.getFrameOwner": { params: GetFrameOwnerParams, result: GetFrameOwnerResult }, + "DOM.getContainerForNode": { params: GetContainerForNodeParams, result: GetContainerForNodeResult }, + "DOM.getQueryingDescendantsForContainer": { params: GetQueryingDescendantsForContainerParams, result: GetQueryingDescendantsForContainerResult }, + "DOM.getAnchorElement": { params: GetAnchorElementParams, result: GetAnchorElementResult }, + "DOM.forceShowPopover": { params: ForceShowPopoverParams, result: ForceShowPopoverResult }, +} as const; +export const events = { + "DOM.attributeModified": AttributeModifiedEvent, + "DOM.adoptedStyleSheetsModified": AdoptedStyleSheetsModifiedEvent, + "DOM.attributeRemoved": AttributeRemovedEvent, + "DOM.characterDataModified": CharacterDataModifiedEvent, + "DOM.childNodeCountUpdated": ChildNodeCountUpdatedEvent, + "DOM.childNodeInserted": ChildNodeInsertedEvent, + "DOM.childNodeRemoved": ChildNodeRemovedEvent, + "DOM.distributedNodesUpdated": DistributedNodesUpdatedEvent, + "DOM.documentUpdated": DocumentUpdatedEvent, + "DOM.inlineStyleInvalidated": InlineStyleInvalidatedEvent, + "DOM.pseudoElementAdded": PseudoElementAddedEvent, + "DOM.topLayerElementsUpdated": TopLayerElementsUpdatedEvent, + "DOM.scrollableFlagUpdated": ScrollableFlagUpdatedEvent, + "DOM.adRelatedStateUpdated": AdRelatedStateUpdatedEvent, + "DOM.affectedByStartingStylesFlagUpdated": AffectedByStartingStylesFlagUpdatedEvent, + "DOM.pseudoElementRemoved": PseudoElementRemovedEvent, + "DOM.setChildNodes": SetChildNodesEvent, + "DOM.shadowRootPopped": ShadowRootPoppedEvent, + "DOM.shadowRootPushed": ShadowRootPushedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/DOMDebugger.ts b/types/zod/DOMDebugger.ts new file mode 100644 index 0000000..b307386 --- /dev/null +++ b/types/zod/DOMDebugger.ts @@ -0,0 +1,72 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Runtime from "./Runtime.js"; + +export const DOMBreakpointType = withCdpMeta(z.enum(["subtree-modified", "attribute-modified", "node-removed"]), "DOMDebugger.DOMBreakpointType", "type"); +export const CSPViolationType = withCdpMeta(z.enum(["trustedtype-sink-violation", "trustedtype-policy-violation"]), "DOMDebugger.CSPViolationType", "type"); +export const EventListener = withCdpMeta(z.object({ "type": z.string(), "useCapture": z.boolean(), "passive": z.boolean(), "once": z.boolean(), "scriptId": z.lazy(() => Runtime.ScriptId), "lineNumber": z.number().int(), "columnNumber": z.number().int(), "handler": z.lazy(() => Runtime.RemoteObject).optional(), "originalHandler": z.lazy(() => Runtime.RemoteObject).optional(), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional() }).passthrough(), "DOMDebugger.EventListener", "type"); +export const GetEventListenersParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime.RemoteObjectId), "depth": z.number().int().optional(), "pierce": z.boolean().optional() }).passthrough(), "DOMDebugger.getEventListeners.params", "commandParams", { method: "DOMDebugger.getEventListeners" }); +export const GetEventListenersResult = withCdpMeta(z.object({ "listeners": z.array(z.lazy(() => EventListener)) }).passthrough(), "DOMDebugger.getEventListeners.result", "commandResult", { method: "DOMDebugger.getEventListeners" }); +export const RemoveDOMBreakpointParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId), "type": z.lazy(() => DOMBreakpointType) }).passthrough(), "DOMDebugger.removeDOMBreakpoint.params", "commandParams", { method: "DOMDebugger.removeDOMBreakpoint" }); +export const RemoveDOMBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.removeDOMBreakpoint.result", "commandResult", { method: "DOMDebugger.removeDOMBreakpoint" }); +export const RemoveEventListenerBreakpointParams = withCdpMeta(z.object({ "eventName": z.string(), "targetName": z.string().optional() }).passthrough(), "DOMDebugger.removeEventListenerBreakpoint.params", "commandParams", { method: "DOMDebugger.removeEventListenerBreakpoint" }); +export const RemoveEventListenerBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.removeEventListenerBreakpoint.result", "commandResult", { method: "DOMDebugger.removeEventListenerBreakpoint" }); +export const RemoveInstrumentationBreakpointParams = withCdpMeta(z.object({ "eventName": z.string() }).passthrough(), "DOMDebugger.removeInstrumentationBreakpoint.params", "commandParams", { method: "DOMDebugger.removeInstrumentationBreakpoint" }); +export const RemoveInstrumentationBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.removeInstrumentationBreakpoint.result", "commandResult", { method: "DOMDebugger.removeInstrumentationBreakpoint" }); +export const RemoveXHRBreakpointParams = withCdpMeta(z.object({ "url": z.string() }).passthrough(), "DOMDebugger.removeXHRBreakpoint.params", "commandParams", { method: "DOMDebugger.removeXHRBreakpoint" }); +export const RemoveXHRBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.removeXHRBreakpoint.result", "commandResult", { method: "DOMDebugger.removeXHRBreakpoint" }); +export const SetBreakOnCSPViolationParams = withCdpMeta(z.object({ "violationTypes": z.array(z.lazy(() => CSPViolationType)) }).passthrough(), "DOMDebugger.setBreakOnCSPViolation.params", "commandParams", { method: "DOMDebugger.setBreakOnCSPViolation" }); +export const SetBreakOnCSPViolationResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.setBreakOnCSPViolation.result", "commandResult", { method: "DOMDebugger.setBreakOnCSPViolation" }); +export const SetDOMBreakpointParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId), "type": z.lazy(() => DOMBreakpointType) }).passthrough(), "DOMDebugger.setDOMBreakpoint.params", "commandParams", { method: "DOMDebugger.setDOMBreakpoint" }); +export const SetDOMBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.setDOMBreakpoint.result", "commandResult", { method: "DOMDebugger.setDOMBreakpoint" }); +export const SetEventListenerBreakpointParams = withCdpMeta(z.object({ "eventName": z.string(), "targetName": z.string().optional() }).passthrough(), "DOMDebugger.setEventListenerBreakpoint.params", "commandParams", { method: "DOMDebugger.setEventListenerBreakpoint" }); +export const SetEventListenerBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.setEventListenerBreakpoint.result", "commandResult", { method: "DOMDebugger.setEventListenerBreakpoint" }); +export const SetInstrumentationBreakpointParams = withCdpMeta(z.object({ "eventName": z.string() }).passthrough(), "DOMDebugger.setInstrumentationBreakpoint.params", "commandParams", { method: "DOMDebugger.setInstrumentationBreakpoint" }); +export const SetInstrumentationBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.setInstrumentationBreakpoint.result", "commandResult", { method: "DOMDebugger.setInstrumentationBreakpoint" }); +export const SetXHRBreakpointParams = withCdpMeta(z.object({ "url": z.string() }).passthrough(), "DOMDebugger.setXHRBreakpoint.params", "commandParams", { method: "DOMDebugger.setXHRBreakpoint" }); +export const SetXHRBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "DOMDebugger.setXHRBreakpoint.result", "commandResult", { method: "DOMDebugger.setXHRBreakpoint" }); + +export const zod = { + DOMBreakpointType: DOMBreakpointType, + CSPViolationType: CSPViolationType, + EventListener: EventListener, + GetEventListenersParams: GetEventListenersParams, + GetEventListenersResult: GetEventListenersResult, + RemoveDOMBreakpointParams: RemoveDOMBreakpointParams, + RemoveDOMBreakpointResult: RemoveDOMBreakpointResult, + RemoveEventListenerBreakpointParams: RemoveEventListenerBreakpointParams, + RemoveEventListenerBreakpointResult: RemoveEventListenerBreakpointResult, + RemoveInstrumentationBreakpointParams: RemoveInstrumentationBreakpointParams, + RemoveInstrumentationBreakpointResult: RemoveInstrumentationBreakpointResult, + RemoveXHRBreakpointParams: RemoveXHRBreakpointParams, + RemoveXHRBreakpointResult: RemoveXHRBreakpointResult, + SetBreakOnCSPViolationParams: SetBreakOnCSPViolationParams, + SetBreakOnCSPViolationResult: SetBreakOnCSPViolationResult, + SetDOMBreakpointParams: SetDOMBreakpointParams, + SetDOMBreakpointResult: SetDOMBreakpointResult, + SetEventListenerBreakpointParams: SetEventListenerBreakpointParams, + SetEventListenerBreakpointResult: SetEventListenerBreakpointResult, + SetInstrumentationBreakpointParams: SetInstrumentationBreakpointParams, + SetInstrumentationBreakpointResult: SetInstrumentationBreakpointResult, + SetXHRBreakpointParams: SetXHRBreakpointParams, + SetXHRBreakpointResult: SetXHRBreakpointResult, +} as const; +export const commands = { + "DOMDebugger.getEventListeners": { params: GetEventListenersParams, result: GetEventListenersResult }, + "DOMDebugger.removeDOMBreakpoint": { params: RemoveDOMBreakpointParams, result: RemoveDOMBreakpointResult }, + "DOMDebugger.removeEventListenerBreakpoint": { params: RemoveEventListenerBreakpointParams, result: RemoveEventListenerBreakpointResult }, + "DOMDebugger.removeInstrumentationBreakpoint": { params: RemoveInstrumentationBreakpointParams, result: RemoveInstrumentationBreakpointResult }, + "DOMDebugger.removeXHRBreakpoint": { params: RemoveXHRBreakpointParams, result: RemoveXHRBreakpointResult }, + "DOMDebugger.setBreakOnCSPViolation": { params: SetBreakOnCSPViolationParams, result: SetBreakOnCSPViolationResult }, + "DOMDebugger.setDOMBreakpoint": { params: SetDOMBreakpointParams, result: SetDOMBreakpointResult }, + "DOMDebugger.setEventListenerBreakpoint": { params: SetEventListenerBreakpointParams, result: SetEventListenerBreakpointResult }, + "DOMDebugger.setInstrumentationBreakpoint": { params: SetInstrumentationBreakpointParams, result: SetInstrumentationBreakpointResult }, + "DOMDebugger.setXHRBreakpoint": { params: SetXHRBreakpointParams, result: SetXHRBreakpointResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/DOMSnapshot.ts b/types/zod/DOMSnapshot.ts new file mode 100644 index 0000000..1b855c2 --- /dev/null +++ b/types/zod/DOMSnapshot.ts @@ -0,0 +1,67 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as DOMDebugger from "./DOMDebugger.js"; +import * as Page from "./Page.js"; + +export const DOMNode = withCdpMeta(z.object({ "nodeType": z.number().int(), "nodeName": z.string(), "nodeValue": z.string(), "textValue": z.string().optional(), "inputValue": z.string().optional(), "inputChecked": z.boolean().optional(), "optionSelected": z.boolean().optional(), "backendNodeId": z.lazy(() => DOM.BackendNodeId), "childNodeIndexes": z.array(z.number().int()).optional(), "attributes": z.array(z.lazy(() => NameValue)).optional(), "pseudoElementIndexes": z.array(z.number().int()).optional(), "layoutNodeIndex": z.number().int().optional(), "documentURL": z.string().optional(), "baseURL": z.string().optional(), "contentLanguage": z.string().optional(), "documentEncoding": z.string().optional(), "publicId": z.string().optional(), "systemId": z.string().optional(), "frameId": z.lazy(() => Page.FrameId).optional(), "contentDocumentIndex": z.number().int().optional(), "pseudoType": z.lazy(() => DOM.PseudoType).optional(), "shadowRootType": z.lazy(() => DOM.ShadowRootType).optional(), "isClickable": z.boolean().optional(), "eventListeners": z.array(z.lazy(() => DOMDebugger.EventListener)).optional(), "currentSourceURL": z.string().optional(), "originURL": z.string().optional(), "scrollOffsetX": z.number().optional(), "scrollOffsetY": z.number().optional() }).passthrough(), "DOMSnapshot.DOMNode", "type"); +export const InlineTextBox = withCdpMeta(z.object({ "boundingBox": z.lazy(() => DOM.Rect), "startCharacterIndex": z.number().int(), "numCharacters": z.number().int() }).passthrough(), "DOMSnapshot.InlineTextBox", "type"); +export const LayoutTreeNode = withCdpMeta(z.object({ "domNodeIndex": z.number().int(), "boundingBox": z.lazy(() => DOM.Rect), "layoutText": z.string().optional(), "inlineTextNodes": z.array(z.lazy(() => InlineTextBox)).optional(), "styleIndex": z.number().int().optional(), "paintOrder": z.number().int().optional(), "isStackingContext": z.boolean().optional() }).passthrough(), "DOMSnapshot.LayoutTreeNode", "type"); +export const ComputedStyle = withCdpMeta(z.object({ "properties": z.array(z.lazy(() => NameValue)) }).passthrough(), "DOMSnapshot.ComputedStyle", "type"); +export const NameValue = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "DOMSnapshot.NameValue", "type"); +export const StringIndex = withCdpMeta(z.number().int(), "DOMSnapshot.StringIndex", "type"); +export const ArrayOfStrings = withCdpMeta(z.array(z.lazy(() => StringIndex)), "DOMSnapshot.ArrayOfStrings", "type"); +export const RareStringData = withCdpMeta(z.object({ "index": z.array(z.number().int()), "value": z.array(z.lazy(() => StringIndex)) }).passthrough(), "DOMSnapshot.RareStringData", "type"); +export const RareBooleanData = withCdpMeta(z.object({ "index": z.array(z.number().int()) }).passthrough(), "DOMSnapshot.RareBooleanData", "type"); +export const RareIntegerData = withCdpMeta(z.object({ "index": z.array(z.number().int()), "value": z.array(z.number().int()) }).passthrough(), "DOMSnapshot.RareIntegerData", "type"); +export const Rectangle = withCdpMeta(z.array(z.number()), "DOMSnapshot.Rectangle", "type"); +export const DocumentSnapshot = withCdpMeta(z.object({ "documentURL": z.lazy(() => StringIndex), "title": z.lazy(() => StringIndex), "baseURL": z.lazy(() => StringIndex), "contentLanguage": z.lazy(() => StringIndex), "encodingName": z.lazy(() => StringIndex), "publicId": z.lazy(() => StringIndex), "systemId": z.lazy(() => StringIndex), "frameId": z.lazy(() => StringIndex), "nodes": z.lazy(() => NodeTreeSnapshot), "layout": z.lazy(() => LayoutTreeSnapshot), "textBoxes": z.lazy(() => TextBoxSnapshot), "scrollOffsetX": z.number().optional(), "scrollOffsetY": z.number().optional(), "contentWidth": z.number().optional(), "contentHeight": z.number().optional() }).passthrough(), "DOMSnapshot.DocumentSnapshot", "type"); +export const NodeTreeSnapshot = withCdpMeta(z.object({ "parentIndex": z.array(z.number().int()).optional(), "nodeType": z.array(z.number().int()).optional(), "shadowRootType": z.lazy(() => RareStringData).optional(), "nodeName": z.array(z.lazy(() => StringIndex)).optional(), "nodeValue": z.array(z.lazy(() => StringIndex)).optional(), "backendNodeId": z.array(z.lazy(() => DOM.BackendNodeId)).optional(), "attributes": z.array(z.lazy(() => ArrayOfStrings)).optional(), "textValue": z.lazy(() => RareStringData).optional(), "inputValue": z.lazy(() => RareStringData).optional(), "inputChecked": z.lazy(() => RareBooleanData).optional(), "optionSelected": z.lazy(() => RareBooleanData).optional(), "contentDocumentIndex": z.lazy(() => RareIntegerData).optional(), "pseudoType": z.lazy(() => RareStringData).optional(), "pseudoIdentifier": z.lazy(() => RareStringData).optional(), "isClickable": z.lazy(() => RareBooleanData).optional(), "currentSourceURL": z.lazy(() => RareStringData).optional(), "originURL": z.lazy(() => RareStringData).optional() }).passthrough(), "DOMSnapshot.NodeTreeSnapshot", "type"); +export const LayoutTreeSnapshot = withCdpMeta(z.object({ "nodeIndex": z.array(z.number().int()), "styles": z.array(z.lazy(() => ArrayOfStrings)), "bounds": z.array(z.lazy(() => Rectangle)), "text": z.array(z.lazy(() => StringIndex)), "stackingContexts": z.lazy(() => RareBooleanData), "paintOrders": z.array(z.number().int()).optional(), "offsetRects": z.array(z.lazy(() => Rectangle)).optional(), "scrollRects": z.array(z.lazy(() => Rectangle)).optional(), "clientRects": z.array(z.lazy(() => Rectangle)).optional(), "blendedBackgroundColors": z.array(z.lazy(() => StringIndex)).optional(), "textColorOpacities": z.array(z.number()).optional() }).passthrough(), "DOMSnapshot.LayoutTreeSnapshot", "type"); +export const TextBoxSnapshot = withCdpMeta(z.object({ "layoutIndex": z.array(z.number().int()), "bounds": z.array(z.lazy(() => Rectangle)), "start": z.array(z.number().int()), "length": z.array(z.number().int()) }).passthrough(), "DOMSnapshot.TextBoxSnapshot", "type"); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "DOMSnapshot.disable.params", "commandParams", { method: "DOMSnapshot.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "DOMSnapshot.disable.result", "commandResult", { method: "DOMSnapshot.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "DOMSnapshot.enable.params", "commandParams", { method: "DOMSnapshot.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "DOMSnapshot.enable.result", "commandResult", { method: "DOMSnapshot.enable" }); +export const GetSnapshotParams = withCdpMeta(z.object({ "computedStyleWhitelist": z.array(z.string()), "includeEventListeners": z.boolean().optional(), "includePaintOrder": z.boolean().optional(), "includeUserAgentShadowTree": z.boolean().optional() }).passthrough(), "DOMSnapshot.getSnapshot.params", "commandParams", { method: "DOMSnapshot.getSnapshot" }); +export const GetSnapshotResult = withCdpMeta(z.object({ "domNodes": z.array(z.lazy(() => DOMNode)), "layoutTreeNodes": z.array(z.lazy(() => LayoutTreeNode)), "computedStyles": z.array(z.lazy(() => ComputedStyle)) }).passthrough(), "DOMSnapshot.getSnapshot.result", "commandResult", { method: "DOMSnapshot.getSnapshot" }); +export const CaptureSnapshotParams = withCdpMeta(z.object({ "computedStyles": z.array(z.string()), "includePaintOrder": z.boolean().optional(), "includeDOMRects": z.boolean().optional(), "includeBlendedBackgroundColors": z.boolean().optional(), "includeTextColorOpacities": z.boolean().optional() }).passthrough(), "DOMSnapshot.captureSnapshot.params", "commandParams", { method: "DOMSnapshot.captureSnapshot" }); +export const CaptureSnapshotResult = withCdpMeta(z.object({ "documents": z.array(z.lazy(() => DocumentSnapshot)), "strings": z.array(z.string()) }).passthrough(), "DOMSnapshot.captureSnapshot.result", "commandResult", { method: "DOMSnapshot.captureSnapshot" }); + +export const zod = { + DOMNode: DOMNode, + InlineTextBox: InlineTextBox, + LayoutTreeNode: LayoutTreeNode, + ComputedStyle: ComputedStyle, + NameValue: NameValue, + StringIndex: StringIndex, + ArrayOfStrings: ArrayOfStrings, + RareStringData: RareStringData, + RareBooleanData: RareBooleanData, + RareIntegerData: RareIntegerData, + Rectangle: Rectangle, + DocumentSnapshot: DocumentSnapshot, + NodeTreeSnapshot: NodeTreeSnapshot, + LayoutTreeSnapshot: LayoutTreeSnapshot, + TextBoxSnapshot: TextBoxSnapshot, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + GetSnapshotParams: GetSnapshotParams, + GetSnapshotResult: GetSnapshotResult, + CaptureSnapshotParams: CaptureSnapshotParams, + CaptureSnapshotResult: CaptureSnapshotResult, +} as const; +export const commands = { + "DOMSnapshot.disable": { params: DisableParams, result: DisableResult }, + "DOMSnapshot.enable": { params: EnableParams, result: EnableResult }, + "DOMSnapshot.getSnapshot": { params: GetSnapshotParams, result: GetSnapshotResult }, + "DOMSnapshot.captureSnapshot": { params: CaptureSnapshotParams, result: CaptureSnapshotResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/DOMStorage.ts b/types/zod/DOMStorage.ts new file mode 100644 index 0000000..43c5909 --- /dev/null +++ b/types/zod/DOMStorage.ts @@ -0,0 +1,62 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const SerializedStorageKey = withCdpMeta(z.string(), "DOMStorage.SerializedStorageKey", "type"); +export const StorageId = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.lazy(() => SerializedStorageKey).optional(), "isLocalStorage": z.boolean() }).passthrough(), "DOMStorage.StorageId", "type"); +export const Item = withCdpMeta(z.array(z.string()), "DOMStorage.Item", "type"); +export const ClearParams = withCdpMeta(z.object({ "storageId": z.lazy(() => StorageId) }).passthrough(), "DOMStorage.clear.params", "commandParams", { method: "DOMStorage.clear" }); +export const ClearResult = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.clear.result", "commandResult", { method: "DOMStorage.clear" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.disable.params", "commandParams", { method: "DOMStorage.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.disable.result", "commandResult", { method: "DOMStorage.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.enable.params", "commandParams", { method: "DOMStorage.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.enable.result", "commandResult", { method: "DOMStorage.enable" }); +export const GetDOMStorageItemsParams = withCdpMeta(z.object({ "storageId": z.lazy(() => StorageId) }).passthrough(), "DOMStorage.getDOMStorageItems.params", "commandParams", { method: "DOMStorage.getDOMStorageItems" }); +export const GetDOMStorageItemsResult = withCdpMeta(z.object({ "entries": z.array(z.lazy(() => Item)) }).passthrough(), "DOMStorage.getDOMStorageItems.result", "commandResult", { method: "DOMStorage.getDOMStorageItems" }); +export const RemoveDOMStorageItemParams = withCdpMeta(z.object({ "storageId": z.lazy(() => StorageId), "key": z.string() }).passthrough(), "DOMStorage.removeDOMStorageItem.params", "commandParams", { method: "DOMStorage.removeDOMStorageItem" }); +export const RemoveDOMStorageItemResult = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.removeDOMStorageItem.result", "commandResult", { method: "DOMStorage.removeDOMStorageItem" }); +export const SetDOMStorageItemParams = withCdpMeta(z.object({ "storageId": z.lazy(() => StorageId), "key": z.string(), "value": z.string() }).passthrough(), "DOMStorage.setDOMStorageItem.params", "commandParams", { method: "DOMStorage.setDOMStorageItem" }); +export const SetDOMStorageItemResult = withCdpMeta(z.object({ }).passthrough(), "DOMStorage.setDOMStorageItem.result", "commandResult", { method: "DOMStorage.setDOMStorageItem" }); +export const DomStorageItemAddedEvent = withCdpMeta(z.object({ "storageId": z.lazy(() => StorageId), "key": z.string(), "newValue": z.string() }).passthrough(), "DOMStorage.domStorageItemAdded", "event", { phase: "event" }); +export const DomStorageItemRemovedEvent = withCdpMeta(z.object({ "storageId": z.lazy(() => StorageId), "key": z.string() }).passthrough(), "DOMStorage.domStorageItemRemoved", "event", { phase: "event" }); +export const DomStorageItemUpdatedEvent = withCdpMeta(z.object({ "storageId": z.lazy(() => StorageId), "key": z.string(), "oldValue": z.string(), "newValue": z.string() }).passthrough(), "DOMStorage.domStorageItemUpdated", "event", { phase: "event" }); +export const DomStorageItemsClearedEvent = withCdpMeta(z.object({ "storageId": z.lazy(() => StorageId) }).passthrough(), "DOMStorage.domStorageItemsCleared", "event", { phase: "event" }); + +export const zod = { + SerializedStorageKey: SerializedStorageKey, + StorageId: StorageId, + Item: Item, + ClearParams: ClearParams, + ClearResult: ClearResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + GetDOMStorageItemsParams: GetDOMStorageItemsParams, + GetDOMStorageItemsResult: GetDOMStorageItemsResult, + RemoveDOMStorageItemParams: RemoveDOMStorageItemParams, + RemoveDOMStorageItemResult: RemoveDOMStorageItemResult, + SetDOMStorageItemParams: SetDOMStorageItemParams, + SetDOMStorageItemResult: SetDOMStorageItemResult, + DomStorageItemAddedEvent: DomStorageItemAddedEvent, + DomStorageItemRemovedEvent: DomStorageItemRemovedEvent, + DomStorageItemUpdatedEvent: DomStorageItemUpdatedEvent, + DomStorageItemsClearedEvent: DomStorageItemsClearedEvent, +} as const; +export const commands = { + "DOMStorage.clear": { params: ClearParams, result: ClearResult }, + "DOMStorage.disable": { params: DisableParams, result: DisableResult }, + "DOMStorage.enable": { params: EnableParams, result: EnableResult }, + "DOMStorage.getDOMStorageItems": { params: GetDOMStorageItemsParams, result: GetDOMStorageItemsResult }, + "DOMStorage.removeDOMStorageItem": { params: RemoveDOMStorageItemParams, result: RemoveDOMStorageItemResult }, + "DOMStorage.setDOMStorageItem": { params: SetDOMStorageItemParams, result: SetDOMStorageItemResult }, +} as const; +export const events = { + "DOMStorage.domStorageItemAdded": DomStorageItemAddedEvent, + "DOMStorage.domStorageItemRemoved": DomStorageItemRemovedEvent, + "DOMStorage.domStorageItemUpdated": DomStorageItemUpdatedEvent, + "DOMStorage.domStorageItemsCleared": DomStorageItemsClearedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Debugger.ts b/types/zod/Debugger.ts new file mode 100644 index 0000000..0dd8c5f --- /dev/null +++ b/types/zod/Debugger.ts @@ -0,0 +1,221 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Runtime from "./Runtime.js"; + +export const BreakpointId = withCdpMeta(z.string(), "Debugger.BreakpointId", "type"); +export const CallFrameId = withCdpMeta(z.string(), "Debugger.CallFrameId", "type"); +export const Location = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId), "lineNumber": z.number().int(), "columnNumber": z.number().int().optional() }).passthrough(), "Debugger.Location", "type"); +export const ScriptPosition = withCdpMeta(z.object({ "lineNumber": z.number().int(), "columnNumber": z.number().int() }).passthrough(), "Debugger.ScriptPosition", "type"); +export const LocationRange = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId), "start": z.lazy(() => ScriptPosition), "end": z.lazy(() => ScriptPosition) }).passthrough(), "Debugger.LocationRange", "type"); +export const CallFrame = withCdpMeta(z.object({ "callFrameId": z.lazy(() => CallFrameId), "functionName": z.string(), "functionLocation": z.lazy(() => Location).optional(), "location": z.lazy(() => Location), "url": z.string(), "scopeChain": z.array(z.lazy(() => Scope)), "this": z.lazy(() => Runtime.RemoteObject), "returnValue": z.lazy(() => Runtime.RemoteObject).optional(), "canBeRestarted": z.boolean().optional() }).passthrough(), "Debugger.CallFrame", "type"); +export const Scope = withCdpMeta(z.object({ "type": z.enum(["global", "local", "with", "closure", "catch", "block", "script", "eval", "module", "wasm-expression-stack"]), "object": z.lazy(() => Runtime.RemoteObject), "name": z.string().optional(), "startLocation": z.lazy(() => Location).optional(), "endLocation": z.lazy(() => Location).optional() }).passthrough(), "Debugger.Scope", "type"); +export const SearchMatch = withCdpMeta(z.object({ "lineNumber": z.number(), "lineContent": z.string() }).passthrough(), "Debugger.SearchMatch", "type"); +export const BreakLocation = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId), "lineNumber": z.number().int(), "columnNumber": z.number().int().optional(), "type": z.enum(["debuggerStatement", "call", "return"]).optional() }).passthrough(), "Debugger.BreakLocation", "type"); +export const WasmDisassemblyChunk = withCdpMeta(z.object({ "lines": z.array(z.string()), "bytecodeOffsets": z.array(z.number().int()) }).passthrough(), "Debugger.WasmDisassemblyChunk", "type"); +export const ScriptLanguage = withCdpMeta(z.enum(["JavaScript", "WebAssembly"]), "Debugger.ScriptLanguage", "type"); +export const DebugSymbols = withCdpMeta(z.object({ "type": z.enum(["SourceMap", "EmbeddedDWARF", "ExternalDWARF"]), "externalURL": z.string().optional() }).passthrough(), "Debugger.DebugSymbols", "type"); +export const ResolvedBreakpoint = withCdpMeta(z.object({ "breakpointId": z.lazy(() => BreakpointId), "location": z.lazy(() => Location) }).passthrough(), "Debugger.ResolvedBreakpoint", "type"); +export const ContinueToLocationParams = withCdpMeta(z.object({ "location": z.lazy(() => Location), "targetCallFrames": z.enum(["any", "current"]).optional() }).passthrough(), "Debugger.continueToLocation.params", "commandParams", { method: "Debugger.continueToLocation" }); +export const ContinueToLocationResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.continueToLocation.result", "commandResult", { method: "Debugger.continueToLocation" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Debugger.disable.params", "commandParams", { method: "Debugger.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.disable.result", "commandResult", { method: "Debugger.disable" }); +export const EnableParams = withCdpMeta(z.object({ "maxScriptsCacheSize": z.number().optional() }).passthrough(), "Debugger.enable.params", "commandParams", { method: "Debugger.enable" }); +export const EnableResult = withCdpMeta(z.object({ "debuggerId": z.lazy(() => Runtime.UniqueDebuggerId) }).passthrough(), "Debugger.enable.result", "commandResult", { method: "Debugger.enable" }); +export const EvaluateOnCallFrameParams = withCdpMeta(z.object({ "callFrameId": z.lazy(() => CallFrameId), "expression": z.string(), "objectGroup": z.string().optional(), "includeCommandLineAPI": z.boolean().optional(), "silent": z.boolean().optional(), "returnByValue": z.boolean().optional(), "generatePreview": z.boolean().optional(), "throwOnSideEffect": z.boolean().optional(), "timeout": z.lazy(() => Runtime.TimeDelta).optional() }).passthrough(), "Debugger.evaluateOnCallFrame.params", "commandParams", { method: "Debugger.evaluateOnCallFrame" }); +export const EvaluateOnCallFrameResult = withCdpMeta(z.object({ "result": z.lazy(() => Runtime.RemoteObject), "exceptionDetails": z.lazy(() => Runtime.ExceptionDetails).optional() }).passthrough(), "Debugger.evaluateOnCallFrame.result", "commandResult", { method: "Debugger.evaluateOnCallFrame" }); +export const GetPossibleBreakpointsParams = withCdpMeta(z.object({ "start": z.lazy(() => Location), "end": z.lazy(() => Location).optional(), "restrictToFunction": z.boolean().optional() }).passthrough(), "Debugger.getPossibleBreakpoints.params", "commandParams", { method: "Debugger.getPossibleBreakpoints" }); +export const GetPossibleBreakpointsResult = withCdpMeta(z.object({ "locations": z.array(z.lazy(() => BreakLocation)) }).passthrough(), "Debugger.getPossibleBreakpoints.result", "commandResult", { method: "Debugger.getPossibleBreakpoints" }); +export const GetScriptSourceParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId) }).passthrough(), "Debugger.getScriptSource.params", "commandParams", { method: "Debugger.getScriptSource" }); +export const GetScriptSourceResult = withCdpMeta(z.object({ "scriptSource": z.string(), "bytecode": z.string().optional() }).passthrough(), "Debugger.getScriptSource.result", "commandResult", { method: "Debugger.getScriptSource" }); +export const DisassembleWasmModuleParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId) }).passthrough(), "Debugger.disassembleWasmModule.params", "commandParams", { method: "Debugger.disassembleWasmModule" }); +export const DisassembleWasmModuleResult = withCdpMeta(z.object({ "streamId": z.string().optional(), "totalNumberOfLines": z.number().int(), "functionBodyOffsets": z.array(z.number().int()), "chunk": z.lazy(() => WasmDisassemblyChunk) }).passthrough(), "Debugger.disassembleWasmModule.result", "commandResult", { method: "Debugger.disassembleWasmModule" }); +export const NextWasmDisassemblyChunkParams = withCdpMeta(z.object({ "streamId": z.string() }).passthrough(), "Debugger.nextWasmDisassemblyChunk.params", "commandParams", { method: "Debugger.nextWasmDisassemblyChunk" }); +export const NextWasmDisassemblyChunkResult = withCdpMeta(z.object({ "chunk": z.lazy(() => WasmDisassemblyChunk) }).passthrough(), "Debugger.nextWasmDisassemblyChunk.result", "commandResult", { method: "Debugger.nextWasmDisassemblyChunk" }); +export const GetWasmBytecodeParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId) }).passthrough(), "Debugger.getWasmBytecode.params", "commandParams", { method: "Debugger.getWasmBytecode" }); +export const GetWasmBytecodeResult = withCdpMeta(z.object({ "bytecode": z.string() }).passthrough(), "Debugger.getWasmBytecode.result", "commandResult", { method: "Debugger.getWasmBytecode" }); +export const GetStackTraceParams = withCdpMeta(z.object({ "stackTraceId": z.lazy(() => Runtime.StackTraceId) }).passthrough(), "Debugger.getStackTrace.params", "commandParams", { method: "Debugger.getStackTrace" }); +export const GetStackTraceResult = withCdpMeta(z.object({ "stackTrace": z.lazy(() => Runtime.StackTrace) }).passthrough(), "Debugger.getStackTrace.result", "commandResult", { method: "Debugger.getStackTrace" }); +export const PauseParams = withCdpMeta(z.object({ }).passthrough(), "Debugger.pause.params", "commandParams", { method: "Debugger.pause" }); +export const PauseResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.pause.result", "commandResult", { method: "Debugger.pause" }); +export const PauseOnAsyncCallParams = withCdpMeta(z.object({ "parentStackTraceId": z.lazy(() => Runtime.StackTraceId) }).passthrough(), "Debugger.pauseOnAsyncCall.params", "commandParams", { method: "Debugger.pauseOnAsyncCall" }); +export const PauseOnAsyncCallResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.pauseOnAsyncCall.result", "commandResult", { method: "Debugger.pauseOnAsyncCall" }); +export const RemoveBreakpointParams = withCdpMeta(z.object({ "breakpointId": z.lazy(() => BreakpointId) }).passthrough(), "Debugger.removeBreakpoint.params", "commandParams", { method: "Debugger.removeBreakpoint" }); +export const RemoveBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.removeBreakpoint.result", "commandResult", { method: "Debugger.removeBreakpoint" }); +export const RestartFrameParams = withCdpMeta(z.object({ "callFrameId": z.lazy(() => CallFrameId), "mode": z.enum(["StepInto"]).optional() }).passthrough(), "Debugger.restartFrame.params", "commandParams", { method: "Debugger.restartFrame" }); +export const RestartFrameResult = withCdpMeta(z.object({ "callFrames": z.array(z.lazy(() => CallFrame)), "asyncStackTrace": z.lazy(() => Runtime.StackTrace).optional(), "asyncStackTraceId": z.lazy(() => Runtime.StackTraceId).optional() }).passthrough(), "Debugger.restartFrame.result", "commandResult", { method: "Debugger.restartFrame" }); +export const ResumeParams = withCdpMeta(z.object({ "terminateOnResume": z.boolean().optional() }).passthrough(), "Debugger.resume.params", "commandParams", { method: "Debugger.resume" }); +export const ResumeResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.resume.result", "commandResult", { method: "Debugger.resume" }); +export const SearchInContentParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId), "query": z.string(), "caseSensitive": z.boolean().optional(), "isRegex": z.boolean().optional() }).passthrough(), "Debugger.searchInContent.params", "commandParams", { method: "Debugger.searchInContent" }); +export const SearchInContentResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => SearchMatch)) }).passthrough(), "Debugger.searchInContent.result", "commandResult", { method: "Debugger.searchInContent" }); +export const SetAsyncCallStackDepthParams = withCdpMeta(z.object({ "maxDepth": z.number().int() }).passthrough(), "Debugger.setAsyncCallStackDepth.params", "commandParams", { method: "Debugger.setAsyncCallStackDepth" }); +export const SetAsyncCallStackDepthResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setAsyncCallStackDepth.result", "commandResult", { method: "Debugger.setAsyncCallStackDepth" }); +export const SetBlackboxExecutionContextsParams = withCdpMeta(z.object({ "uniqueIds": z.array(z.string()) }).passthrough(), "Debugger.setBlackboxExecutionContexts.params", "commandParams", { method: "Debugger.setBlackboxExecutionContexts" }); +export const SetBlackboxExecutionContextsResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setBlackboxExecutionContexts.result", "commandResult", { method: "Debugger.setBlackboxExecutionContexts" }); +export const SetBlackboxPatternsParams = withCdpMeta(z.object({ "patterns": z.array(z.string()), "skipAnonymous": z.boolean().optional() }).passthrough(), "Debugger.setBlackboxPatterns.params", "commandParams", { method: "Debugger.setBlackboxPatterns" }); +export const SetBlackboxPatternsResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setBlackboxPatterns.result", "commandResult", { method: "Debugger.setBlackboxPatterns" }); +export const SetBlackboxedRangesParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId), "positions": z.array(z.lazy(() => ScriptPosition)) }).passthrough(), "Debugger.setBlackboxedRanges.params", "commandParams", { method: "Debugger.setBlackboxedRanges" }); +export const SetBlackboxedRangesResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setBlackboxedRanges.result", "commandResult", { method: "Debugger.setBlackboxedRanges" }); +export const SetBreakpointParams = withCdpMeta(z.object({ "location": z.lazy(() => Location), "condition": z.string().optional() }).passthrough(), "Debugger.setBreakpoint.params", "commandParams", { method: "Debugger.setBreakpoint" }); +export const SetBreakpointResult = withCdpMeta(z.object({ "breakpointId": z.lazy(() => BreakpointId), "actualLocation": z.lazy(() => Location) }).passthrough(), "Debugger.setBreakpoint.result", "commandResult", { method: "Debugger.setBreakpoint" }); +export const SetInstrumentationBreakpointParams = withCdpMeta(z.object({ "instrumentation": z.enum(["beforeScriptExecution", "beforeScriptWithSourceMapExecution"]) }).passthrough(), "Debugger.setInstrumentationBreakpoint.params", "commandParams", { method: "Debugger.setInstrumentationBreakpoint" }); +export const SetInstrumentationBreakpointResult = withCdpMeta(z.object({ "breakpointId": z.lazy(() => BreakpointId) }).passthrough(), "Debugger.setInstrumentationBreakpoint.result", "commandResult", { method: "Debugger.setInstrumentationBreakpoint" }); +export const SetBreakpointByUrlParams = withCdpMeta(z.object({ "lineNumber": z.number().int(), "url": z.string().optional(), "urlRegex": z.string().optional(), "scriptHash": z.string().optional(), "columnNumber": z.number().int().optional(), "condition": z.string().optional() }).passthrough(), "Debugger.setBreakpointByUrl.params", "commandParams", { method: "Debugger.setBreakpointByUrl" }); +export const SetBreakpointByUrlResult = withCdpMeta(z.object({ "breakpointId": z.lazy(() => BreakpointId), "locations": z.array(z.lazy(() => Location)) }).passthrough(), "Debugger.setBreakpointByUrl.result", "commandResult", { method: "Debugger.setBreakpointByUrl" }); +export const SetBreakpointOnFunctionCallParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime.RemoteObjectId), "condition": z.string().optional() }).passthrough(), "Debugger.setBreakpointOnFunctionCall.params", "commandParams", { method: "Debugger.setBreakpointOnFunctionCall" }); +export const SetBreakpointOnFunctionCallResult = withCdpMeta(z.object({ "breakpointId": z.lazy(() => BreakpointId) }).passthrough(), "Debugger.setBreakpointOnFunctionCall.result", "commandResult", { method: "Debugger.setBreakpointOnFunctionCall" }); +export const SetBreakpointsActiveParams = withCdpMeta(z.object({ "active": z.boolean() }).passthrough(), "Debugger.setBreakpointsActive.params", "commandParams", { method: "Debugger.setBreakpointsActive" }); +export const SetBreakpointsActiveResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setBreakpointsActive.result", "commandResult", { method: "Debugger.setBreakpointsActive" }); +export const SetPauseOnExceptionsParams = withCdpMeta(z.object({ "state": z.enum(["none", "caught", "uncaught", "all"]) }).passthrough(), "Debugger.setPauseOnExceptions.params", "commandParams", { method: "Debugger.setPauseOnExceptions" }); +export const SetPauseOnExceptionsResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setPauseOnExceptions.result", "commandResult", { method: "Debugger.setPauseOnExceptions" }); +export const SetReturnValueParams = withCdpMeta(z.object({ "newValue": z.lazy(() => Runtime.CallArgument) }).passthrough(), "Debugger.setReturnValue.params", "commandParams", { method: "Debugger.setReturnValue" }); +export const SetReturnValueResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setReturnValue.result", "commandResult", { method: "Debugger.setReturnValue" }); +export const SetScriptSourceParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId), "scriptSource": z.string(), "dryRun": z.boolean().optional(), "allowTopFrameEditing": z.boolean().optional() }).passthrough(), "Debugger.setScriptSource.params", "commandParams", { method: "Debugger.setScriptSource" }); +export const SetScriptSourceResult = withCdpMeta(z.object({ "callFrames": z.array(z.lazy(() => CallFrame)).optional(), "stackChanged": z.boolean().optional(), "asyncStackTrace": z.lazy(() => Runtime.StackTrace).optional(), "asyncStackTraceId": z.lazy(() => Runtime.StackTraceId).optional(), "status": z.enum(["Ok", "CompileError", "BlockedByActiveGenerator", "BlockedByActiveFunction", "BlockedByTopLevelEsModuleChange"]), "exceptionDetails": z.lazy(() => Runtime.ExceptionDetails).optional() }).passthrough(), "Debugger.setScriptSource.result", "commandResult", { method: "Debugger.setScriptSource" }); +export const SetSkipAllPausesParams = withCdpMeta(z.object({ "skip": z.boolean() }).passthrough(), "Debugger.setSkipAllPauses.params", "commandParams", { method: "Debugger.setSkipAllPauses" }); +export const SetSkipAllPausesResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setSkipAllPauses.result", "commandResult", { method: "Debugger.setSkipAllPauses" }); +export const SetVariableValueParams = withCdpMeta(z.object({ "scopeNumber": z.number().int(), "variableName": z.string(), "newValue": z.lazy(() => Runtime.CallArgument), "callFrameId": z.lazy(() => CallFrameId) }).passthrough(), "Debugger.setVariableValue.params", "commandParams", { method: "Debugger.setVariableValue" }); +export const SetVariableValueResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.setVariableValue.result", "commandResult", { method: "Debugger.setVariableValue" }); +export const StepIntoParams = withCdpMeta(z.object({ "breakOnAsyncCall": z.boolean().optional(), "skipList": z.array(z.lazy(() => LocationRange)).optional() }).passthrough(), "Debugger.stepInto.params", "commandParams", { method: "Debugger.stepInto" }); +export const StepIntoResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.stepInto.result", "commandResult", { method: "Debugger.stepInto" }); +export const StepOutParams = withCdpMeta(z.object({ }).passthrough(), "Debugger.stepOut.params", "commandParams", { method: "Debugger.stepOut" }); +export const StepOutResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.stepOut.result", "commandResult", { method: "Debugger.stepOut" }); +export const StepOverParams = withCdpMeta(z.object({ "skipList": z.array(z.lazy(() => LocationRange)).optional() }).passthrough(), "Debugger.stepOver.params", "commandParams", { method: "Debugger.stepOver" }); +export const StepOverResult = withCdpMeta(z.object({ }).passthrough(), "Debugger.stepOver.result", "commandResult", { method: "Debugger.stepOver" }); +export const BreakpointResolvedEvent = withCdpMeta(z.object({ "breakpointId": z.lazy(() => BreakpointId), "location": z.lazy(() => Location) }).passthrough(), "Debugger.breakpointResolved", "event", { phase: "event" }); +export const PausedEvent = withCdpMeta(z.object({ "callFrames": z.array(z.lazy(() => CallFrame)), "reason": z.enum(["ambiguous", "assert", "CSPViolation", "debugCommand", "DOM", "EventListener", "exception", "instrumentation", "OOM", "other", "promiseRejection", "XHR", "step"]), "data": z.record(z.string(), z.unknown()).optional(), "hitBreakpoints": z.array(z.string()).optional(), "asyncStackTrace": z.lazy(() => Runtime.StackTrace).optional(), "asyncStackTraceId": z.lazy(() => Runtime.StackTraceId).optional(), "asyncCallStackTraceId": z.lazy(() => Runtime.StackTraceId).optional() }).passthrough(), "Debugger.paused", "event", { phase: "event" }); +export const ResumedEvent = withCdpMeta(z.object({ }).passthrough(), "Debugger.resumed", "event", { phase: "event" }); +export const ScriptFailedToParseEvent = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId), "url": z.string(), "startLine": z.number().int(), "startColumn": z.number().int(), "endLine": z.number().int(), "endColumn": z.number().int(), "executionContextId": z.lazy(() => Runtime.ExecutionContextId), "hash": z.string(), "buildId": z.string(), "executionContextAuxData": z.record(z.string(), z.unknown()).optional(), "sourceMapURL": z.string().optional(), "hasSourceURL": z.boolean().optional(), "isModule": z.boolean().optional(), "length": z.number().int().optional(), "stackTrace": z.lazy(() => Runtime.StackTrace).optional(), "codeOffset": z.number().int().optional(), "scriptLanguage": z.lazy(() => ScriptLanguage).optional(), "embedderName": z.string().optional() }).passthrough(), "Debugger.scriptFailedToParse", "event", { phase: "event" }); +export const ScriptParsedEvent = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId), "url": z.string(), "startLine": z.number().int(), "startColumn": z.number().int(), "endLine": z.number().int(), "endColumn": z.number().int(), "executionContextId": z.lazy(() => Runtime.ExecutionContextId), "hash": z.string(), "buildId": z.string(), "executionContextAuxData": z.record(z.string(), z.unknown()).optional(), "isLiveEdit": z.boolean().optional(), "sourceMapURL": z.string().optional(), "hasSourceURL": z.boolean().optional(), "isModule": z.boolean().optional(), "length": z.number().int().optional(), "stackTrace": z.lazy(() => Runtime.StackTrace).optional(), "codeOffset": z.number().int().optional(), "scriptLanguage": z.lazy(() => ScriptLanguage).optional(), "debugSymbols": z.array(z.lazy(() => DebugSymbols)).optional(), "embedderName": z.string().optional(), "resolvedBreakpoints": z.array(z.lazy(() => ResolvedBreakpoint)).optional() }).passthrough(), "Debugger.scriptParsed", "event", { phase: "event" }); + +export const zod = { + BreakpointId: BreakpointId, + CallFrameId: CallFrameId, + Location: Location, + ScriptPosition: ScriptPosition, + LocationRange: LocationRange, + CallFrame: CallFrame, + Scope: Scope, + SearchMatch: SearchMatch, + BreakLocation: BreakLocation, + WasmDisassemblyChunk: WasmDisassemblyChunk, + ScriptLanguage: ScriptLanguage, + DebugSymbols: DebugSymbols, + ResolvedBreakpoint: ResolvedBreakpoint, + ContinueToLocationParams: ContinueToLocationParams, + ContinueToLocationResult: ContinueToLocationResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + EvaluateOnCallFrameParams: EvaluateOnCallFrameParams, + EvaluateOnCallFrameResult: EvaluateOnCallFrameResult, + GetPossibleBreakpointsParams: GetPossibleBreakpointsParams, + GetPossibleBreakpointsResult: GetPossibleBreakpointsResult, + GetScriptSourceParams: GetScriptSourceParams, + GetScriptSourceResult: GetScriptSourceResult, + DisassembleWasmModuleParams: DisassembleWasmModuleParams, + DisassembleWasmModuleResult: DisassembleWasmModuleResult, + NextWasmDisassemblyChunkParams: NextWasmDisassemblyChunkParams, + NextWasmDisassemblyChunkResult: NextWasmDisassemblyChunkResult, + GetWasmBytecodeParams: GetWasmBytecodeParams, + GetWasmBytecodeResult: GetWasmBytecodeResult, + GetStackTraceParams: GetStackTraceParams, + GetStackTraceResult: GetStackTraceResult, + PauseParams: PauseParams, + PauseResult: PauseResult, + PauseOnAsyncCallParams: PauseOnAsyncCallParams, + PauseOnAsyncCallResult: PauseOnAsyncCallResult, + RemoveBreakpointParams: RemoveBreakpointParams, + RemoveBreakpointResult: RemoveBreakpointResult, + RestartFrameParams: RestartFrameParams, + RestartFrameResult: RestartFrameResult, + ResumeParams: ResumeParams, + ResumeResult: ResumeResult, + SearchInContentParams: SearchInContentParams, + SearchInContentResult: SearchInContentResult, + SetAsyncCallStackDepthParams: SetAsyncCallStackDepthParams, + SetAsyncCallStackDepthResult: SetAsyncCallStackDepthResult, + SetBlackboxExecutionContextsParams: SetBlackboxExecutionContextsParams, + SetBlackboxExecutionContextsResult: SetBlackboxExecutionContextsResult, + SetBlackboxPatternsParams: SetBlackboxPatternsParams, + SetBlackboxPatternsResult: SetBlackboxPatternsResult, + SetBlackboxedRangesParams: SetBlackboxedRangesParams, + SetBlackboxedRangesResult: SetBlackboxedRangesResult, + SetBreakpointParams: SetBreakpointParams, + SetBreakpointResult: SetBreakpointResult, + SetInstrumentationBreakpointParams: SetInstrumentationBreakpointParams, + SetInstrumentationBreakpointResult: SetInstrumentationBreakpointResult, + SetBreakpointByUrlParams: SetBreakpointByUrlParams, + SetBreakpointByUrlResult: SetBreakpointByUrlResult, + SetBreakpointOnFunctionCallParams: SetBreakpointOnFunctionCallParams, + SetBreakpointOnFunctionCallResult: SetBreakpointOnFunctionCallResult, + SetBreakpointsActiveParams: SetBreakpointsActiveParams, + SetBreakpointsActiveResult: SetBreakpointsActiveResult, + SetPauseOnExceptionsParams: SetPauseOnExceptionsParams, + SetPauseOnExceptionsResult: SetPauseOnExceptionsResult, + SetReturnValueParams: SetReturnValueParams, + SetReturnValueResult: SetReturnValueResult, + SetScriptSourceParams: SetScriptSourceParams, + SetScriptSourceResult: SetScriptSourceResult, + SetSkipAllPausesParams: SetSkipAllPausesParams, + SetSkipAllPausesResult: SetSkipAllPausesResult, + SetVariableValueParams: SetVariableValueParams, + SetVariableValueResult: SetVariableValueResult, + StepIntoParams: StepIntoParams, + StepIntoResult: StepIntoResult, + StepOutParams: StepOutParams, + StepOutResult: StepOutResult, + StepOverParams: StepOverParams, + StepOverResult: StepOverResult, + BreakpointResolvedEvent: BreakpointResolvedEvent, + PausedEvent: PausedEvent, + ResumedEvent: ResumedEvent, + ScriptFailedToParseEvent: ScriptFailedToParseEvent, + ScriptParsedEvent: ScriptParsedEvent, +} as const; +export const commands = { + "Debugger.continueToLocation": { params: ContinueToLocationParams, result: ContinueToLocationResult }, + "Debugger.disable": { params: DisableParams, result: DisableResult }, + "Debugger.enable": { params: EnableParams, result: EnableResult }, + "Debugger.evaluateOnCallFrame": { params: EvaluateOnCallFrameParams, result: EvaluateOnCallFrameResult }, + "Debugger.getPossibleBreakpoints": { params: GetPossibleBreakpointsParams, result: GetPossibleBreakpointsResult }, + "Debugger.getScriptSource": { params: GetScriptSourceParams, result: GetScriptSourceResult }, + "Debugger.disassembleWasmModule": { params: DisassembleWasmModuleParams, result: DisassembleWasmModuleResult }, + "Debugger.nextWasmDisassemblyChunk": { params: NextWasmDisassemblyChunkParams, result: NextWasmDisassemblyChunkResult }, + "Debugger.getWasmBytecode": { params: GetWasmBytecodeParams, result: GetWasmBytecodeResult }, + "Debugger.getStackTrace": { params: GetStackTraceParams, result: GetStackTraceResult }, + "Debugger.pause": { params: PauseParams, result: PauseResult }, + "Debugger.pauseOnAsyncCall": { params: PauseOnAsyncCallParams, result: PauseOnAsyncCallResult }, + "Debugger.removeBreakpoint": { params: RemoveBreakpointParams, result: RemoveBreakpointResult }, + "Debugger.restartFrame": { params: RestartFrameParams, result: RestartFrameResult }, + "Debugger.resume": { params: ResumeParams, result: ResumeResult }, + "Debugger.searchInContent": { params: SearchInContentParams, result: SearchInContentResult }, + "Debugger.setAsyncCallStackDepth": { params: SetAsyncCallStackDepthParams, result: SetAsyncCallStackDepthResult }, + "Debugger.setBlackboxExecutionContexts": { params: SetBlackboxExecutionContextsParams, result: SetBlackboxExecutionContextsResult }, + "Debugger.setBlackboxPatterns": { params: SetBlackboxPatternsParams, result: SetBlackboxPatternsResult }, + "Debugger.setBlackboxedRanges": { params: SetBlackboxedRangesParams, result: SetBlackboxedRangesResult }, + "Debugger.setBreakpoint": { params: SetBreakpointParams, result: SetBreakpointResult }, + "Debugger.setInstrumentationBreakpoint": { params: SetInstrumentationBreakpointParams, result: SetInstrumentationBreakpointResult }, + "Debugger.setBreakpointByUrl": { params: SetBreakpointByUrlParams, result: SetBreakpointByUrlResult }, + "Debugger.setBreakpointOnFunctionCall": { params: SetBreakpointOnFunctionCallParams, result: SetBreakpointOnFunctionCallResult }, + "Debugger.setBreakpointsActive": { params: SetBreakpointsActiveParams, result: SetBreakpointsActiveResult }, + "Debugger.setPauseOnExceptions": { params: SetPauseOnExceptionsParams, result: SetPauseOnExceptionsResult }, + "Debugger.setReturnValue": { params: SetReturnValueParams, result: SetReturnValueResult }, + "Debugger.setScriptSource": { params: SetScriptSourceParams, result: SetScriptSourceResult }, + "Debugger.setSkipAllPauses": { params: SetSkipAllPausesParams, result: SetSkipAllPausesResult }, + "Debugger.setVariableValue": { params: SetVariableValueParams, result: SetVariableValueResult }, + "Debugger.stepInto": { params: StepIntoParams, result: StepIntoResult }, + "Debugger.stepOut": { params: StepOutParams, result: StepOutResult }, + "Debugger.stepOver": { params: StepOverParams, result: StepOverResult }, +} as const; +export const events = { + "Debugger.breakpointResolved": BreakpointResolvedEvent, + "Debugger.paused": PausedEvent, + "Debugger.resumed": ResumedEvent, + "Debugger.scriptFailedToParse": ScriptFailedToParseEvent, + "Debugger.scriptParsed": ScriptParsedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/DeviceAccess.ts b/types/zod/DeviceAccess.ts new file mode 100644 index 0000000..5d860a8 --- /dev/null +++ b/types/zod/DeviceAccess.ts @@ -0,0 +1,43 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const RequestId = withCdpMeta(z.string(), "DeviceAccess.RequestId", "type"); +export const DeviceId = withCdpMeta(z.string(), "DeviceAccess.DeviceId", "type"); +export const PromptDevice = withCdpMeta(z.object({ "id": z.lazy(() => DeviceId), "name": z.string() }).passthrough(), "DeviceAccess.PromptDevice", "type"); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.enable.params", "commandParams", { method: "DeviceAccess.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.enable.result", "commandResult", { method: "DeviceAccess.enable" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.disable.params", "commandParams", { method: "DeviceAccess.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.disable.result", "commandResult", { method: "DeviceAccess.disable" }); +export const SelectPromptParams = withCdpMeta(z.object({ "id": z.lazy(() => RequestId), "deviceId": z.lazy(() => DeviceId) }).passthrough(), "DeviceAccess.selectPrompt.params", "commandParams", { method: "DeviceAccess.selectPrompt" }); +export const SelectPromptResult = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.selectPrompt.result", "commandResult", { method: "DeviceAccess.selectPrompt" }); +export const CancelPromptParams = withCdpMeta(z.object({ "id": z.lazy(() => RequestId) }).passthrough(), "DeviceAccess.cancelPrompt.params", "commandParams", { method: "DeviceAccess.cancelPrompt" }); +export const CancelPromptResult = withCdpMeta(z.object({ }).passthrough(), "DeviceAccess.cancelPrompt.result", "commandResult", { method: "DeviceAccess.cancelPrompt" }); +export const DeviceRequestPromptedEvent = withCdpMeta(z.object({ "id": z.lazy(() => RequestId), "devices": z.array(z.lazy(() => PromptDevice)) }).passthrough(), "DeviceAccess.deviceRequestPrompted", "event", { phase: "event" }); + +export const zod = { + RequestId: RequestId, + DeviceId: DeviceId, + PromptDevice: PromptDevice, + EnableParams: EnableParams, + EnableResult: EnableResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + SelectPromptParams: SelectPromptParams, + SelectPromptResult: SelectPromptResult, + CancelPromptParams: CancelPromptParams, + CancelPromptResult: CancelPromptResult, + DeviceRequestPromptedEvent: DeviceRequestPromptedEvent, +} as const; +export const commands = { + "DeviceAccess.enable": { params: EnableParams, result: EnableResult }, + "DeviceAccess.disable": { params: DisableParams, result: DisableResult }, + "DeviceAccess.selectPrompt": { params: SelectPromptParams, result: SelectPromptResult }, + "DeviceAccess.cancelPrompt": { params: CancelPromptParams, result: CancelPromptResult }, +} as const; +export const events = { + "DeviceAccess.deviceRequestPrompted": DeviceRequestPromptedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/DeviceOrientation.ts b/types/zod/DeviceOrientation.ts new file mode 100644 index 0000000..3f06e14 --- /dev/null +++ b/types/zod/DeviceOrientation.ts @@ -0,0 +1,24 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const ClearDeviceOrientationOverrideParams = withCdpMeta(z.object({ }).passthrough(), "DeviceOrientation.clearDeviceOrientationOverride.params", "commandParams", { method: "DeviceOrientation.clearDeviceOrientationOverride" }); +export const ClearDeviceOrientationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "DeviceOrientation.clearDeviceOrientationOverride.result", "commandResult", { method: "DeviceOrientation.clearDeviceOrientationOverride" }); +export const SetDeviceOrientationOverrideParams = withCdpMeta(z.object({ "alpha": z.number(), "beta": z.number(), "gamma": z.number() }).passthrough(), "DeviceOrientation.setDeviceOrientationOverride.params", "commandParams", { method: "DeviceOrientation.setDeviceOrientationOverride" }); +export const SetDeviceOrientationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "DeviceOrientation.setDeviceOrientationOverride.result", "commandResult", { method: "DeviceOrientation.setDeviceOrientationOverride" }); + +export const zod = { + ClearDeviceOrientationOverrideParams: ClearDeviceOrientationOverrideParams, + ClearDeviceOrientationOverrideResult: ClearDeviceOrientationOverrideResult, + SetDeviceOrientationOverrideParams: SetDeviceOrientationOverrideParams, + SetDeviceOrientationOverrideResult: SetDeviceOrientationOverrideResult, +} as const; +export const commands = { + "DeviceOrientation.clearDeviceOrientationOverride": { params: ClearDeviceOrientationOverrideParams, result: ClearDeviceOrientationOverrideResult }, + "DeviceOrientation.setDeviceOrientationOverride": { params: SetDeviceOrientationOverrideParams, result: SetDeviceOrientationOverrideResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Emulation.ts b/types/zod/Emulation.ts new file mode 100644 index 0000000..00cfea6 --- /dev/null +++ b/types/zod/Emulation.ts @@ -0,0 +1,305 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Network from "./Network.js"; +import * as Page from "./Page.js"; + +export const SafeAreaInsets = withCdpMeta(z.object({ "top": z.number().int().optional(), "topMax": z.number().int().optional(), "left": z.number().int().optional(), "leftMax": z.number().int().optional(), "bottom": z.number().int().optional(), "bottomMax": z.number().int().optional(), "right": z.number().int().optional(), "rightMax": z.number().int().optional() }).passthrough(), "Emulation.SafeAreaInsets", "type"); +export const ScreenOrientation = withCdpMeta(z.object({ "type": z.enum(["portraitPrimary", "portraitSecondary", "landscapePrimary", "landscapeSecondary"]), "angle": z.number().int() }).passthrough(), "Emulation.ScreenOrientation", "type"); +export const DisplayFeature = withCdpMeta(z.object({ "orientation": z.enum(["vertical", "horizontal"]), "offset": z.number().int(), "maskLength": z.number().int() }).passthrough(), "Emulation.DisplayFeature", "type"); +export const DevicePosture = withCdpMeta(z.object({ "type": z.enum(["continuous", "folded"]) }).passthrough(), "Emulation.DevicePosture", "type"); +export const MediaFeature = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "Emulation.MediaFeature", "type"); +export const VirtualTimePolicy = withCdpMeta(z.enum(["advance", "pause", "pauseIfNetworkFetchesPending"]), "Emulation.VirtualTimePolicy", "type"); +export const UserAgentBrandVersion = withCdpMeta(z.object({ "brand": z.string(), "version": z.string() }).passthrough(), "Emulation.UserAgentBrandVersion", "type"); +export const UserAgentMetadata = withCdpMeta(z.object({ "brands": z.array(z.lazy(() => UserAgentBrandVersion)).optional(), "fullVersionList": z.array(z.lazy(() => UserAgentBrandVersion)).optional(), "fullVersion": z.string().optional(), "platform": z.string(), "platformVersion": z.string(), "architecture": z.string(), "model": z.string(), "mobile": z.boolean(), "bitness": z.string().optional(), "wow64": z.boolean().optional(), "formFactors": z.array(z.string()).optional() }).passthrough(), "Emulation.UserAgentMetadata", "type"); +export const SensorType = withCdpMeta(z.enum(["absolute-orientation", "accelerometer", "ambient-light", "gravity", "gyroscope", "linear-acceleration", "magnetometer", "relative-orientation"]), "Emulation.SensorType", "type"); +export const SensorMetadata = withCdpMeta(z.object({ "available": z.boolean().optional(), "minimumFrequency": z.number().optional(), "maximumFrequency": z.number().optional() }).passthrough(), "Emulation.SensorMetadata", "type"); +export const SensorReadingSingle = withCdpMeta(z.object({ "value": z.number() }).passthrough(), "Emulation.SensorReadingSingle", "type"); +export const SensorReadingXYZ = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "z": z.number() }).passthrough(), "Emulation.SensorReadingXYZ", "type"); +export const SensorReadingQuaternion = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "z": z.number(), "w": z.number() }).passthrough(), "Emulation.SensorReadingQuaternion", "type"); +export const SensorReading = withCdpMeta(z.object({ "single": z.lazy(() => SensorReadingSingle).optional(), "xyz": z.lazy(() => SensorReadingXYZ).optional(), "quaternion": z.lazy(() => SensorReadingQuaternion).optional() }).passthrough(), "Emulation.SensorReading", "type"); +export const PressureSource = withCdpMeta(z.enum(["cpu"]), "Emulation.PressureSource", "type"); +export const PressureState = withCdpMeta(z.enum(["nominal", "fair", "serious", "critical"]), "Emulation.PressureState", "type"); +export const PressureMetadata = withCdpMeta(z.object({ "available": z.boolean().optional() }).passthrough(), "Emulation.PressureMetadata", "type"); +export const WorkAreaInsets = withCdpMeta(z.object({ "top": z.number().int().optional(), "left": z.number().int().optional(), "bottom": z.number().int().optional(), "right": z.number().int().optional() }).passthrough(), "Emulation.WorkAreaInsets", "type"); +export const ScreenId = withCdpMeta(z.string(), "Emulation.ScreenId", "type"); +export const ScreenInfo = withCdpMeta(z.object({ "left": z.number().int(), "top": z.number().int(), "width": z.number().int(), "height": z.number().int(), "availLeft": z.number().int(), "availTop": z.number().int(), "availWidth": z.number().int(), "availHeight": z.number().int(), "devicePixelRatio": z.number(), "orientation": z.lazy(() => ScreenOrientation), "colorDepth": z.number().int(), "isExtended": z.boolean(), "isInternal": z.boolean(), "isPrimary": z.boolean(), "label": z.string(), "id": z.lazy(() => ScreenId) }).passthrough(), "Emulation.ScreenInfo", "type"); +export const DisabledImageType = withCdpMeta(z.enum(["avif", "jxl", "webp"]), "Emulation.DisabledImageType", "type"); +export const CanEmulateParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.canEmulate.params", "commandParams", { method: "Emulation.canEmulate" }); +export const CanEmulateResult = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Emulation.canEmulate.result", "commandResult", { method: "Emulation.canEmulate" }); +export const ClearDeviceMetricsOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDeviceMetricsOverride.params", "commandParams", { method: "Emulation.clearDeviceMetricsOverride" }); +export const ClearDeviceMetricsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDeviceMetricsOverride.result", "commandResult", { method: "Emulation.clearDeviceMetricsOverride" }); +export const ClearGeolocationOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearGeolocationOverride.params", "commandParams", { method: "Emulation.clearGeolocationOverride" }); +export const ClearGeolocationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearGeolocationOverride.result", "commandResult", { method: "Emulation.clearGeolocationOverride" }); +export const ResetPageScaleFactorParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.resetPageScaleFactor.params", "commandParams", { method: "Emulation.resetPageScaleFactor" }); +export const ResetPageScaleFactorResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.resetPageScaleFactor.result", "commandResult", { method: "Emulation.resetPageScaleFactor" }); +export const SetFocusEmulationEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Emulation.setFocusEmulationEnabled.params", "commandParams", { method: "Emulation.setFocusEmulationEnabled" }); +export const SetFocusEmulationEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setFocusEmulationEnabled.result", "commandResult", { method: "Emulation.setFocusEmulationEnabled" }); +export const SetAutoDarkModeOverrideParams = withCdpMeta(z.object({ "enabled": z.boolean().optional() }).passthrough(), "Emulation.setAutoDarkModeOverride.params", "commandParams", { method: "Emulation.setAutoDarkModeOverride" }); +export const SetAutoDarkModeOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setAutoDarkModeOverride.result", "commandResult", { method: "Emulation.setAutoDarkModeOverride" }); +export const SetCPUThrottlingRateParams = withCdpMeta(z.object({ "rate": z.number() }).passthrough(), "Emulation.setCPUThrottlingRate.params", "commandParams", { method: "Emulation.setCPUThrottlingRate" }); +export const SetCPUThrottlingRateResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setCPUThrottlingRate.result", "commandResult", { method: "Emulation.setCPUThrottlingRate" }); +export const SetDefaultBackgroundColorOverrideParams = withCdpMeta(z.object({ "color": z.lazy(() => DOM.RGBA).optional() }).passthrough(), "Emulation.setDefaultBackgroundColorOverride.params", "commandParams", { method: "Emulation.setDefaultBackgroundColorOverride" }); +export const SetDefaultBackgroundColorOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDefaultBackgroundColorOverride.result", "commandResult", { method: "Emulation.setDefaultBackgroundColorOverride" }); +export const SetSafeAreaInsetsOverrideParams = withCdpMeta(z.object({ "insets": z.lazy(() => SafeAreaInsets) }).passthrough(), "Emulation.setSafeAreaInsetsOverride.params", "commandParams", { method: "Emulation.setSafeAreaInsetsOverride" }); +export const SetSafeAreaInsetsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setSafeAreaInsetsOverride.result", "commandResult", { method: "Emulation.setSafeAreaInsetsOverride" }); +export const SetDeviceMetricsOverrideParams = withCdpMeta(z.object({ "width": z.number().int(), "height": z.number().int(), "deviceScaleFactor": z.number(), "mobile": z.boolean(), "scale": z.number().optional(), "screenWidth": z.number().int().optional(), "screenHeight": z.number().int().optional(), "positionX": z.number().int().optional(), "positionY": z.number().int().optional(), "dontSetVisibleSize": z.boolean().optional(), "screenOrientation": z.lazy(() => ScreenOrientation).optional(), "viewport": z.lazy(() => Page.Viewport).optional(), "displayFeature": z.lazy(() => DisplayFeature).optional(), "devicePosture": z.lazy(() => DevicePosture).optional(), "scrollbarType": z.enum(["overlay", "default"]).optional(), "screenOrientationLockEmulation": z.boolean().optional() }).passthrough(), "Emulation.setDeviceMetricsOverride.params", "commandParams", { method: "Emulation.setDeviceMetricsOverride" }); +export const SetDeviceMetricsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDeviceMetricsOverride.result", "commandResult", { method: "Emulation.setDeviceMetricsOverride" }); +export const SetDevicePostureOverrideParams = withCdpMeta(z.object({ "posture": z.lazy(() => DevicePosture) }).passthrough(), "Emulation.setDevicePostureOverride.params", "commandParams", { method: "Emulation.setDevicePostureOverride" }); +export const SetDevicePostureOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDevicePostureOverride.result", "commandResult", { method: "Emulation.setDevicePostureOverride" }); +export const ClearDevicePostureOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDevicePostureOverride.params", "commandParams", { method: "Emulation.clearDevicePostureOverride" }); +export const ClearDevicePostureOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDevicePostureOverride.result", "commandResult", { method: "Emulation.clearDevicePostureOverride" }); +export const SetDisplayFeaturesOverrideParams = withCdpMeta(z.object({ "features": z.array(z.lazy(() => DisplayFeature)) }).passthrough(), "Emulation.setDisplayFeaturesOverride.params", "commandParams", { method: "Emulation.setDisplayFeaturesOverride" }); +export const SetDisplayFeaturesOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDisplayFeaturesOverride.result", "commandResult", { method: "Emulation.setDisplayFeaturesOverride" }); +export const ClearDisplayFeaturesOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDisplayFeaturesOverride.params", "commandParams", { method: "Emulation.clearDisplayFeaturesOverride" }); +export const ClearDisplayFeaturesOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearDisplayFeaturesOverride.result", "commandResult", { method: "Emulation.clearDisplayFeaturesOverride" }); +export const SetScrollbarsHiddenParams = withCdpMeta(z.object({ "hidden": z.boolean() }).passthrough(), "Emulation.setScrollbarsHidden.params", "commandParams", { method: "Emulation.setScrollbarsHidden" }); +export const SetScrollbarsHiddenResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setScrollbarsHidden.result", "commandResult", { method: "Emulation.setScrollbarsHidden" }); +export const SetDocumentCookieDisabledParams = withCdpMeta(z.object({ "disabled": z.boolean() }).passthrough(), "Emulation.setDocumentCookieDisabled.params", "commandParams", { method: "Emulation.setDocumentCookieDisabled" }); +export const SetDocumentCookieDisabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDocumentCookieDisabled.result", "commandResult", { method: "Emulation.setDocumentCookieDisabled" }); +export const SetEmitTouchEventsForMouseParams = withCdpMeta(z.object({ "enabled": z.boolean(), "configuration": z.enum(["mobile", "desktop"]).optional() }).passthrough(), "Emulation.setEmitTouchEventsForMouse.params", "commandParams", { method: "Emulation.setEmitTouchEventsForMouse" }); +export const SetEmitTouchEventsForMouseResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setEmitTouchEventsForMouse.result", "commandResult", { method: "Emulation.setEmitTouchEventsForMouse" }); +export const SetEmulatedMediaParams = withCdpMeta(z.object({ "media": z.string().optional(), "features": z.array(z.lazy(() => MediaFeature)).optional() }).passthrough(), "Emulation.setEmulatedMedia.params", "commandParams", { method: "Emulation.setEmulatedMedia" }); +export const SetEmulatedMediaResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setEmulatedMedia.result", "commandResult", { method: "Emulation.setEmulatedMedia" }); +export const SetEmulatedVisionDeficiencyParams = withCdpMeta(z.object({ "type": z.enum(["none", "blurredVision", "reducedContrast", "achromatopsia", "deuteranopia", "protanopia", "tritanopia"]) }).passthrough(), "Emulation.setEmulatedVisionDeficiency.params", "commandParams", { method: "Emulation.setEmulatedVisionDeficiency" }); +export const SetEmulatedVisionDeficiencyResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setEmulatedVisionDeficiency.result", "commandResult", { method: "Emulation.setEmulatedVisionDeficiency" }); +export const SetEmulatedOSTextScaleParams = withCdpMeta(z.object({ "scale": z.number().optional() }).passthrough(), "Emulation.setEmulatedOSTextScale.params", "commandParams", { method: "Emulation.setEmulatedOSTextScale" }); +export const SetEmulatedOSTextScaleResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setEmulatedOSTextScale.result", "commandResult", { method: "Emulation.setEmulatedOSTextScale" }); +export const SetGeolocationOverrideParams = withCdpMeta(z.object({ "latitude": z.number().optional(), "longitude": z.number().optional(), "accuracy": z.number().optional(), "altitude": z.number().optional(), "altitudeAccuracy": z.number().optional(), "heading": z.number().optional(), "speed": z.number().optional() }).passthrough(), "Emulation.setGeolocationOverride.params", "commandParams", { method: "Emulation.setGeolocationOverride" }); +export const SetGeolocationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setGeolocationOverride.result", "commandResult", { method: "Emulation.setGeolocationOverride" }); +export const GetOverriddenSensorInformationParams = withCdpMeta(z.object({ "type": z.lazy(() => SensorType) }).passthrough(), "Emulation.getOverriddenSensorInformation.params", "commandParams", { method: "Emulation.getOverriddenSensorInformation" }); +export const GetOverriddenSensorInformationResult = withCdpMeta(z.object({ "requestedSamplingFrequency": z.number() }).passthrough(), "Emulation.getOverriddenSensorInformation.result", "commandResult", { method: "Emulation.getOverriddenSensorInformation" }); +export const SetSensorOverrideEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean(), "type": z.lazy(() => SensorType), "metadata": z.lazy(() => SensorMetadata).optional() }).passthrough(), "Emulation.setSensorOverrideEnabled.params", "commandParams", { method: "Emulation.setSensorOverrideEnabled" }); +export const SetSensorOverrideEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setSensorOverrideEnabled.result", "commandResult", { method: "Emulation.setSensorOverrideEnabled" }); +export const SetSensorOverrideReadingsParams = withCdpMeta(z.object({ "type": z.lazy(() => SensorType), "reading": z.lazy(() => SensorReading) }).passthrough(), "Emulation.setSensorOverrideReadings.params", "commandParams", { method: "Emulation.setSensorOverrideReadings" }); +export const SetSensorOverrideReadingsResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setSensorOverrideReadings.result", "commandResult", { method: "Emulation.setSensorOverrideReadings" }); +export const SetPressureSourceOverrideEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean(), "source": z.lazy(() => PressureSource), "metadata": z.lazy(() => PressureMetadata).optional() }).passthrough(), "Emulation.setPressureSourceOverrideEnabled.params", "commandParams", { method: "Emulation.setPressureSourceOverrideEnabled" }); +export const SetPressureSourceOverrideEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setPressureSourceOverrideEnabled.result", "commandResult", { method: "Emulation.setPressureSourceOverrideEnabled" }); +export const SetPressureStateOverrideParams = withCdpMeta(z.object({ "source": z.lazy(() => PressureSource), "state": z.lazy(() => PressureState) }).passthrough(), "Emulation.setPressureStateOverride.params", "commandParams", { method: "Emulation.setPressureStateOverride" }); +export const SetPressureStateOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setPressureStateOverride.result", "commandResult", { method: "Emulation.setPressureStateOverride" }); +export const SetPressureDataOverrideParams = withCdpMeta(z.object({ "source": z.lazy(() => PressureSource), "state": z.lazy(() => PressureState), "ownContributionEstimate": z.number().optional() }).passthrough(), "Emulation.setPressureDataOverride.params", "commandParams", { method: "Emulation.setPressureDataOverride" }); +export const SetPressureDataOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setPressureDataOverride.result", "commandResult", { method: "Emulation.setPressureDataOverride" }); +export const SetIdleOverrideParams = withCdpMeta(z.object({ "isUserActive": z.boolean(), "isScreenUnlocked": z.boolean() }).passthrough(), "Emulation.setIdleOverride.params", "commandParams", { method: "Emulation.setIdleOverride" }); +export const SetIdleOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setIdleOverride.result", "commandResult", { method: "Emulation.setIdleOverride" }); +export const ClearIdleOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearIdleOverride.params", "commandParams", { method: "Emulation.clearIdleOverride" }); +export const ClearIdleOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.clearIdleOverride.result", "commandResult", { method: "Emulation.clearIdleOverride" }); +export const SetNavigatorOverridesParams = withCdpMeta(z.object({ "platform": z.string() }).passthrough(), "Emulation.setNavigatorOverrides.params", "commandParams", { method: "Emulation.setNavigatorOverrides" }); +export const SetNavigatorOverridesResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setNavigatorOverrides.result", "commandResult", { method: "Emulation.setNavigatorOverrides" }); +export const SetPageScaleFactorParams = withCdpMeta(z.object({ "pageScaleFactor": z.number() }).passthrough(), "Emulation.setPageScaleFactor.params", "commandParams", { method: "Emulation.setPageScaleFactor" }); +export const SetPageScaleFactorResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setPageScaleFactor.result", "commandResult", { method: "Emulation.setPageScaleFactor" }); +export const SetScriptExecutionDisabledParams = withCdpMeta(z.object({ "value": z.boolean() }).passthrough(), "Emulation.setScriptExecutionDisabled.params", "commandParams", { method: "Emulation.setScriptExecutionDisabled" }); +export const SetScriptExecutionDisabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setScriptExecutionDisabled.result", "commandResult", { method: "Emulation.setScriptExecutionDisabled" }); +export const SetTouchEmulationEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean(), "maxTouchPoints": z.number().int().optional() }).passthrough(), "Emulation.setTouchEmulationEnabled.params", "commandParams", { method: "Emulation.setTouchEmulationEnabled" }); +export const SetTouchEmulationEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setTouchEmulationEnabled.result", "commandResult", { method: "Emulation.setTouchEmulationEnabled" }); +export const SetVirtualTimePolicyParams = withCdpMeta(z.object({ "policy": z.lazy(() => VirtualTimePolicy), "budget": z.number().optional(), "maxVirtualTimeTaskStarvationCount": z.number().int().optional(), "initialVirtualTime": z.lazy(() => Network.TimeSinceEpoch).optional() }).passthrough(), "Emulation.setVirtualTimePolicy.params", "commandParams", { method: "Emulation.setVirtualTimePolicy" }); +export const SetVirtualTimePolicyResult = withCdpMeta(z.object({ "virtualTimeTicksBase": z.number() }).passthrough(), "Emulation.setVirtualTimePolicy.result", "commandResult", { method: "Emulation.setVirtualTimePolicy" }); +export const SetLocaleOverrideParams = withCdpMeta(z.object({ "locale": z.string().optional() }).passthrough(), "Emulation.setLocaleOverride.params", "commandParams", { method: "Emulation.setLocaleOverride" }); +export const SetLocaleOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setLocaleOverride.result", "commandResult", { method: "Emulation.setLocaleOverride" }); +export const SetTimezoneOverrideParams = withCdpMeta(z.object({ "timezoneId": z.string() }).passthrough(), "Emulation.setTimezoneOverride.params", "commandParams", { method: "Emulation.setTimezoneOverride" }); +export const SetTimezoneOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setTimezoneOverride.result", "commandResult", { method: "Emulation.setTimezoneOverride" }); +export const SetVisibleSizeParams = withCdpMeta(z.object({ "width": z.number().int(), "height": z.number().int() }).passthrough(), "Emulation.setVisibleSize.params", "commandParams", { method: "Emulation.setVisibleSize" }); +export const SetVisibleSizeResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setVisibleSize.result", "commandResult", { method: "Emulation.setVisibleSize" }); +export const SetDisabledImageTypesParams = withCdpMeta(z.object({ "imageTypes": z.array(z.lazy(() => DisabledImageType)) }).passthrough(), "Emulation.setDisabledImageTypes.params", "commandParams", { method: "Emulation.setDisabledImageTypes" }); +export const SetDisabledImageTypesResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDisabledImageTypes.result", "commandResult", { method: "Emulation.setDisabledImageTypes" }); +export const SetDataSaverOverrideParams = withCdpMeta(z.object({ "dataSaverEnabled": z.boolean().optional() }).passthrough(), "Emulation.setDataSaverOverride.params", "commandParams", { method: "Emulation.setDataSaverOverride" }); +export const SetDataSaverOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setDataSaverOverride.result", "commandResult", { method: "Emulation.setDataSaverOverride" }); +export const SetHardwareConcurrencyOverrideParams = withCdpMeta(z.object({ "hardwareConcurrency": z.number().int() }).passthrough(), "Emulation.setHardwareConcurrencyOverride.params", "commandParams", { method: "Emulation.setHardwareConcurrencyOverride" }); +export const SetHardwareConcurrencyOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setHardwareConcurrencyOverride.result", "commandResult", { method: "Emulation.setHardwareConcurrencyOverride" }); +export const SetUserAgentOverrideParams = withCdpMeta(z.object({ "userAgent": z.string(), "acceptLanguage": z.string().optional(), "platform": z.string().optional(), "userAgentMetadata": z.lazy(() => UserAgentMetadata).optional() }).passthrough(), "Emulation.setUserAgentOverride.params", "commandParams", { method: "Emulation.setUserAgentOverride" }); +export const SetUserAgentOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setUserAgentOverride.result", "commandResult", { method: "Emulation.setUserAgentOverride" }); +export const SetAutomationOverrideParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Emulation.setAutomationOverride.params", "commandParams", { method: "Emulation.setAutomationOverride" }); +export const SetAutomationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setAutomationOverride.result", "commandResult", { method: "Emulation.setAutomationOverride" }); +export const SetSmallViewportHeightDifferenceOverrideParams = withCdpMeta(z.object({ "difference": z.number().int() }).passthrough(), "Emulation.setSmallViewportHeightDifferenceOverride.params", "commandParams", { method: "Emulation.setSmallViewportHeightDifferenceOverride" }); +export const SetSmallViewportHeightDifferenceOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setSmallViewportHeightDifferenceOverride.result", "commandResult", { method: "Emulation.setSmallViewportHeightDifferenceOverride" }); +export const GetScreenInfosParams = withCdpMeta(z.object({ }).passthrough(), "Emulation.getScreenInfos.params", "commandParams", { method: "Emulation.getScreenInfos" }); +export const GetScreenInfosResult = withCdpMeta(z.object({ "screenInfos": z.array(z.lazy(() => ScreenInfo)) }).passthrough(), "Emulation.getScreenInfos.result", "commandResult", { method: "Emulation.getScreenInfos" }); +export const AddScreenParams = withCdpMeta(z.object({ "left": z.number().int(), "top": z.number().int(), "width": z.number().int(), "height": z.number().int(), "workAreaInsets": z.lazy(() => WorkAreaInsets).optional(), "devicePixelRatio": z.number().optional(), "rotation": z.number().int().optional(), "colorDepth": z.number().int().optional(), "label": z.string().optional(), "isInternal": z.boolean().optional() }).passthrough(), "Emulation.addScreen.params", "commandParams", { method: "Emulation.addScreen" }); +export const AddScreenResult = withCdpMeta(z.object({ "screenInfo": z.lazy(() => ScreenInfo) }).passthrough(), "Emulation.addScreen.result", "commandResult", { method: "Emulation.addScreen" }); +export const UpdateScreenParams = withCdpMeta(z.object({ "screenId": z.lazy(() => ScreenId), "left": z.number().int().optional(), "top": z.number().int().optional(), "width": z.number().int().optional(), "height": z.number().int().optional(), "workAreaInsets": z.lazy(() => WorkAreaInsets).optional(), "devicePixelRatio": z.number().optional(), "rotation": z.number().int().optional(), "colorDepth": z.number().int().optional(), "label": z.string().optional(), "isInternal": z.boolean().optional() }).passthrough(), "Emulation.updateScreen.params", "commandParams", { method: "Emulation.updateScreen" }); +export const UpdateScreenResult = withCdpMeta(z.object({ "screenInfo": z.lazy(() => ScreenInfo) }).passthrough(), "Emulation.updateScreen.result", "commandResult", { method: "Emulation.updateScreen" }); +export const RemoveScreenParams = withCdpMeta(z.object({ "screenId": z.lazy(() => ScreenId) }).passthrough(), "Emulation.removeScreen.params", "commandParams", { method: "Emulation.removeScreen" }); +export const RemoveScreenResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.removeScreen.result", "commandResult", { method: "Emulation.removeScreen" }); +export const SetPrimaryScreenParams = withCdpMeta(z.object({ "screenId": z.lazy(() => ScreenId) }).passthrough(), "Emulation.setPrimaryScreen.params", "commandParams", { method: "Emulation.setPrimaryScreen" }); +export const SetPrimaryScreenResult = withCdpMeta(z.object({ }).passthrough(), "Emulation.setPrimaryScreen.result", "commandResult", { method: "Emulation.setPrimaryScreen" }); +export const VirtualTimeBudgetExpiredEvent = withCdpMeta(z.object({ }).passthrough(), "Emulation.virtualTimeBudgetExpired", "event", { phase: "event" }); +export const ScreenOrientationLockChangedEvent = withCdpMeta(z.object({ "locked": z.boolean(), "orientation": z.lazy(() => ScreenOrientation).optional() }).passthrough(), "Emulation.screenOrientationLockChanged", "event", { phase: "event" }); + +export const zod = { + SafeAreaInsets: SafeAreaInsets, + ScreenOrientation: ScreenOrientation, + DisplayFeature: DisplayFeature, + DevicePosture: DevicePosture, + MediaFeature: MediaFeature, + VirtualTimePolicy: VirtualTimePolicy, + UserAgentBrandVersion: UserAgentBrandVersion, + UserAgentMetadata: UserAgentMetadata, + SensorType: SensorType, + SensorMetadata: SensorMetadata, + SensorReadingSingle: SensorReadingSingle, + SensorReadingXYZ: SensorReadingXYZ, + SensorReadingQuaternion: SensorReadingQuaternion, + SensorReading: SensorReading, + PressureSource: PressureSource, + PressureState: PressureState, + PressureMetadata: PressureMetadata, + WorkAreaInsets: WorkAreaInsets, + ScreenId: ScreenId, + ScreenInfo: ScreenInfo, + DisabledImageType: DisabledImageType, + CanEmulateParams: CanEmulateParams, + CanEmulateResult: CanEmulateResult, + ClearDeviceMetricsOverrideParams: ClearDeviceMetricsOverrideParams, + ClearDeviceMetricsOverrideResult: ClearDeviceMetricsOverrideResult, + ClearGeolocationOverrideParams: ClearGeolocationOverrideParams, + ClearGeolocationOverrideResult: ClearGeolocationOverrideResult, + ResetPageScaleFactorParams: ResetPageScaleFactorParams, + ResetPageScaleFactorResult: ResetPageScaleFactorResult, + SetFocusEmulationEnabledParams: SetFocusEmulationEnabledParams, + SetFocusEmulationEnabledResult: SetFocusEmulationEnabledResult, + SetAutoDarkModeOverrideParams: SetAutoDarkModeOverrideParams, + SetAutoDarkModeOverrideResult: SetAutoDarkModeOverrideResult, + SetCPUThrottlingRateParams: SetCPUThrottlingRateParams, + SetCPUThrottlingRateResult: SetCPUThrottlingRateResult, + SetDefaultBackgroundColorOverrideParams: SetDefaultBackgroundColorOverrideParams, + SetDefaultBackgroundColorOverrideResult: SetDefaultBackgroundColorOverrideResult, + SetSafeAreaInsetsOverrideParams: SetSafeAreaInsetsOverrideParams, + SetSafeAreaInsetsOverrideResult: SetSafeAreaInsetsOverrideResult, + SetDeviceMetricsOverrideParams: SetDeviceMetricsOverrideParams, + SetDeviceMetricsOverrideResult: SetDeviceMetricsOverrideResult, + SetDevicePostureOverrideParams: SetDevicePostureOverrideParams, + SetDevicePostureOverrideResult: SetDevicePostureOverrideResult, + ClearDevicePostureOverrideParams: ClearDevicePostureOverrideParams, + ClearDevicePostureOverrideResult: ClearDevicePostureOverrideResult, + SetDisplayFeaturesOverrideParams: SetDisplayFeaturesOverrideParams, + SetDisplayFeaturesOverrideResult: SetDisplayFeaturesOverrideResult, + ClearDisplayFeaturesOverrideParams: ClearDisplayFeaturesOverrideParams, + ClearDisplayFeaturesOverrideResult: ClearDisplayFeaturesOverrideResult, + SetScrollbarsHiddenParams: SetScrollbarsHiddenParams, + SetScrollbarsHiddenResult: SetScrollbarsHiddenResult, + SetDocumentCookieDisabledParams: SetDocumentCookieDisabledParams, + SetDocumentCookieDisabledResult: SetDocumentCookieDisabledResult, + SetEmitTouchEventsForMouseParams: SetEmitTouchEventsForMouseParams, + SetEmitTouchEventsForMouseResult: SetEmitTouchEventsForMouseResult, + SetEmulatedMediaParams: SetEmulatedMediaParams, + SetEmulatedMediaResult: SetEmulatedMediaResult, + SetEmulatedVisionDeficiencyParams: SetEmulatedVisionDeficiencyParams, + SetEmulatedVisionDeficiencyResult: SetEmulatedVisionDeficiencyResult, + SetEmulatedOSTextScaleParams: SetEmulatedOSTextScaleParams, + SetEmulatedOSTextScaleResult: SetEmulatedOSTextScaleResult, + SetGeolocationOverrideParams: SetGeolocationOverrideParams, + SetGeolocationOverrideResult: SetGeolocationOverrideResult, + GetOverriddenSensorInformationParams: GetOverriddenSensorInformationParams, + GetOverriddenSensorInformationResult: GetOverriddenSensorInformationResult, + SetSensorOverrideEnabledParams: SetSensorOverrideEnabledParams, + SetSensorOverrideEnabledResult: SetSensorOverrideEnabledResult, + SetSensorOverrideReadingsParams: SetSensorOverrideReadingsParams, + SetSensorOverrideReadingsResult: SetSensorOverrideReadingsResult, + SetPressureSourceOverrideEnabledParams: SetPressureSourceOverrideEnabledParams, + SetPressureSourceOverrideEnabledResult: SetPressureSourceOverrideEnabledResult, + SetPressureStateOverrideParams: SetPressureStateOverrideParams, + SetPressureStateOverrideResult: SetPressureStateOverrideResult, + SetPressureDataOverrideParams: SetPressureDataOverrideParams, + SetPressureDataOverrideResult: SetPressureDataOverrideResult, + SetIdleOverrideParams: SetIdleOverrideParams, + SetIdleOverrideResult: SetIdleOverrideResult, + ClearIdleOverrideParams: ClearIdleOverrideParams, + ClearIdleOverrideResult: ClearIdleOverrideResult, + SetNavigatorOverridesParams: SetNavigatorOverridesParams, + SetNavigatorOverridesResult: SetNavigatorOverridesResult, + SetPageScaleFactorParams: SetPageScaleFactorParams, + SetPageScaleFactorResult: SetPageScaleFactorResult, + SetScriptExecutionDisabledParams: SetScriptExecutionDisabledParams, + SetScriptExecutionDisabledResult: SetScriptExecutionDisabledResult, + SetTouchEmulationEnabledParams: SetTouchEmulationEnabledParams, + SetTouchEmulationEnabledResult: SetTouchEmulationEnabledResult, + SetVirtualTimePolicyParams: SetVirtualTimePolicyParams, + SetVirtualTimePolicyResult: SetVirtualTimePolicyResult, + SetLocaleOverrideParams: SetLocaleOverrideParams, + SetLocaleOverrideResult: SetLocaleOverrideResult, + SetTimezoneOverrideParams: SetTimezoneOverrideParams, + SetTimezoneOverrideResult: SetTimezoneOverrideResult, + SetVisibleSizeParams: SetVisibleSizeParams, + SetVisibleSizeResult: SetVisibleSizeResult, + SetDisabledImageTypesParams: SetDisabledImageTypesParams, + SetDisabledImageTypesResult: SetDisabledImageTypesResult, + SetDataSaverOverrideParams: SetDataSaverOverrideParams, + SetDataSaverOverrideResult: SetDataSaverOverrideResult, + SetHardwareConcurrencyOverrideParams: SetHardwareConcurrencyOverrideParams, + SetHardwareConcurrencyOverrideResult: SetHardwareConcurrencyOverrideResult, + SetUserAgentOverrideParams: SetUserAgentOverrideParams, + SetUserAgentOverrideResult: SetUserAgentOverrideResult, + SetAutomationOverrideParams: SetAutomationOverrideParams, + SetAutomationOverrideResult: SetAutomationOverrideResult, + SetSmallViewportHeightDifferenceOverrideParams: SetSmallViewportHeightDifferenceOverrideParams, + SetSmallViewportHeightDifferenceOverrideResult: SetSmallViewportHeightDifferenceOverrideResult, + GetScreenInfosParams: GetScreenInfosParams, + GetScreenInfosResult: GetScreenInfosResult, + AddScreenParams: AddScreenParams, + AddScreenResult: AddScreenResult, + UpdateScreenParams: UpdateScreenParams, + UpdateScreenResult: UpdateScreenResult, + RemoveScreenParams: RemoveScreenParams, + RemoveScreenResult: RemoveScreenResult, + SetPrimaryScreenParams: SetPrimaryScreenParams, + SetPrimaryScreenResult: SetPrimaryScreenResult, + VirtualTimeBudgetExpiredEvent: VirtualTimeBudgetExpiredEvent, + ScreenOrientationLockChangedEvent: ScreenOrientationLockChangedEvent, +} as const; +export const commands = { + "Emulation.canEmulate": { params: CanEmulateParams, result: CanEmulateResult }, + "Emulation.clearDeviceMetricsOverride": { params: ClearDeviceMetricsOverrideParams, result: ClearDeviceMetricsOverrideResult }, + "Emulation.clearGeolocationOverride": { params: ClearGeolocationOverrideParams, result: ClearGeolocationOverrideResult }, + "Emulation.resetPageScaleFactor": { params: ResetPageScaleFactorParams, result: ResetPageScaleFactorResult }, + "Emulation.setFocusEmulationEnabled": { params: SetFocusEmulationEnabledParams, result: SetFocusEmulationEnabledResult }, + "Emulation.setAutoDarkModeOverride": { params: SetAutoDarkModeOverrideParams, result: SetAutoDarkModeOverrideResult }, + "Emulation.setCPUThrottlingRate": { params: SetCPUThrottlingRateParams, result: SetCPUThrottlingRateResult }, + "Emulation.setDefaultBackgroundColorOverride": { params: SetDefaultBackgroundColorOverrideParams, result: SetDefaultBackgroundColorOverrideResult }, + "Emulation.setSafeAreaInsetsOverride": { params: SetSafeAreaInsetsOverrideParams, result: SetSafeAreaInsetsOverrideResult }, + "Emulation.setDeviceMetricsOverride": { params: SetDeviceMetricsOverrideParams, result: SetDeviceMetricsOverrideResult }, + "Emulation.setDevicePostureOverride": { params: SetDevicePostureOverrideParams, result: SetDevicePostureOverrideResult }, + "Emulation.clearDevicePostureOverride": { params: ClearDevicePostureOverrideParams, result: ClearDevicePostureOverrideResult }, + "Emulation.setDisplayFeaturesOverride": { params: SetDisplayFeaturesOverrideParams, result: SetDisplayFeaturesOverrideResult }, + "Emulation.clearDisplayFeaturesOverride": { params: ClearDisplayFeaturesOverrideParams, result: ClearDisplayFeaturesOverrideResult }, + "Emulation.setScrollbarsHidden": { params: SetScrollbarsHiddenParams, result: SetScrollbarsHiddenResult }, + "Emulation.setDocumentCookieDisabled": { params: SetDocumentCookieDisabledParams, result: SetDocumentCookieDisabledResult }, + "Emulation.setEmitTouchEventsForMouse": { params: SetEmitTouchEventsForMouseParams, result: SetEmitTouchEventsForMouseResult }, + "Emulation.setEmulatedMedia": { params: SetEmulatedMediaParams, result: SetEmulatedMediaResult }, + "Emulation.setEmulatedVisionDeficiency": { params: SetEmulatedVisionDeficiencyParams, result: SetEmulatedVisionDeficiencyResult }, + "Emulation.setEmulatedOSTextScale": { params: SetEmulatedOSTextScaleParams, result: SetEmulatedOSTextScaleResult }, + "Emulation.setGeolocationOverride": { params: SetGeolocationOverrideParams, result: SetGeolocationOverrideResult }, + "Emulation.getOverriddenSensorInformation": { params: GetOverriddenSensorInformationParams, result: GetOverriddenSensorInformationResult }, + "Emulation.setSensorOverrideEnabled": { params: SetSensorOverrideEnabledParams, result: SetSensorOverrideEnabledResult }, + "Emulation.setSensorOverrideReadings": { params: SetSensorOverrideReadingsParams, result: SetSensorOverrideReadingsResult }, + "Emulation.setPressureSourceOverrideEnabled": { params: SetPressureSourceOverrideEnabledParams, result: SetPressureSourceOverrideEnabledResult }, + "Emulation.setPressureStateOverride": { params: SetPressureStateOverrideParams, result: SetPressureStateOverrideResult }, + "Emulation.setPressureDataOverride": { params: SetPressureDataOverrideParams, result: SetPressureDataOverrideResult }, + "Emulation.setIdleOverride": { params: SetIdleOverrideParams, result: SetIdleOverrideResult }, + "Emulation.clearIdleOverride": { params: ClearIdleOverrideParams, result: ClearIdleOverrideResult }, + "Emulation.setNavigatorOverrides": { params: SetNavigatorOverridesParams, result: SetNavigatorOverridesResult }, + "Emulation.setPageScaleFactor": { params: SetPageScaleFactorParams, result: SetPageScaleFactorResult }, + "Emulation.setScriptExecutionDisabled": { params: SetScriptExecutionDisabledParams, result: SetScriptExecutionDisabledResult }, + "Emulation.setTouchEmulationEnabled": { params: SetTouchEmulationEnabledParams, result: SetTouchEmulationEnabledResult }, + "Emulation.setVirtualTimePolicy": { params: SetVirtualTimePolicyParams, result: SetVirtualTimePolicyResult }, + "Emulation.setLocaleOverride": { params: SetLocaleOverrideParams, result: SetLocaleOverrideResult }, + "Emulation.setTimezoneOverride": { params: SetTimezoneOverrideParams, result: SetTimezoneOverrideResult }, + "Emulation.setVisibleSize": { params: SetVisibleSizeParams, result: SetVisibleSizeResult }, + "Emulation.setDisabledImageTypes": { params: SetDisabledImageTypesParams, result: SetDisabledImageTypesResult }, + "Emulation.setDataSaverOverride": { params: SetDataSaverOverrideParams, result: SetDataSaverOverrideResult }, + "Emulation.setHardwareConcurrencyOverride": { params: SetHardwareConcurrencyOverrideParams, result: SetHardwareConcurrencyOverrideResult }, + "Emulation.setUserAgentOverride": { params: SetUserAgentOverrideParams, result: SetUserAgentOverrideResult }, + "Emulation.setAutomationOverride": { params: SetAutomationOverrideParams, result: SetAutomationOverrideResult }, + "Emulation.setSmallViewportHeightDifferenceOverride": { params: SetSmallViewportHeightDifferenceOverrideParams, result: SetSmallViewportHeightDifferenceOverrideResult }, + "Emulation.getScreenInfos": { params: GetScreenInfosParams, result: GetScreenInfosResult }, + "Emulation.addScreen": { params: AddScreenParams, result: AddScreenResult }, + "Emulation.updateScreen": { params: UpdateScreenParams, result: UpdateScreenResult }, + "Emulation.removeScreen": { params: RemoveScreenParams, result: RemoveScreenResult }, + "Emulation.setPrimaryScreen": { params: SetPrimaryScreenParams, result: SetPrimaryScreenResult }, +} as const; +export const events = { + "Emulation.virtualTimeBudgetExpired": VirtualTimeBudgetExpiredEvent, + "Emulation.screenOrientationLockChanged": ScreenOrientationLockChangedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/EventBreakpoints.ts b/types/zod/EventBreakpoints.ts new file mode 100644 index 0000000..6f9da15 --- /dev/null +++ b/types/zod/EventBreakpoints.ts @@ -0,0 +1,29 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const SetInstrumentationBreakpointParams = withCdpMeta(z.object({ "eventName": z.string() }).passthrough(), "EventBreakpoints.setInstrumentationBreakpoint.params", "commandParams", { method: "EventBreakpoints.setInstrumentationBreakpoint" }); +export const SetInstrumentationBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "EventBreakpoints.setInstrumentationBreakpoint.result", "commandResult", { method: "EventBreakpoints.setInstrumentationBreakpoint" }); +export const RemoveInstrumentationBreakpointParams = withCdpMeta(z.object({ "eventName": z.string() }).passthrough(), "EventBreakpoints.removeInstrumentationBreakpoint.params", "commandParams", { method: "EventBreakpoints.removeInstrumentationBreakpoint" }); +export const RemoveInstrumentationBreakpointResult = withCdpMeta(z.object({ }).passthrough(), "EventBreakpoints.removeInstrumentationBreakpoint.result", "commandResult", { method: "EventBreakpoints.removeInstrumentationBreakpoint" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "EventBreakpoints.disable.params", "commandParams", { method: "EventBreakpoints.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "EventBreakpoints.disable.result", "commandResult", { method: "EventBreakpoints.disable" }); + +export const zod = { + SetInstrumentationBreakpointParams: SetInstrumentationBreakpointParams, + SetInstrumentationBreakpointResult: SetInstrumentationBreakpointResult, + RemoveInstrumentationBreakpointParams: RemoveInstrumentationBreakpointParams, + RemoveInstrumentationBreakpointResult: RemoveInstrumentationBreakpointResult, + DisableParams: DisableParams, + DisableResult: DisableResult, +} as const; +export const commands = { + "EventBreakpoints.setInstrumentationBreakpoint": { params: SetInstrumentationBreakpointParams, result: SetInstrumentationBreakpointResult }, + "EventBreakpoints.removeInstrumentationBreakpoint": { params: RemoveInstrumentationBreakpointParams, result: RemoveInstrumentationBreakpointResult }, + "EventBreakpoints.disable": { params: DisableParams, result: DisableResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Extensions.ts b/types/zod/Extensions.ts new file mode 100644 index 0000000..8cd2332 --- /dev/null +++ b/types/zod/Extensions.ts @@ -0,0 +1,58 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const StorageArea = withCdpMeta(z.enum(["session", "local", "sync", "managed"]), "Extensions.StorageArea", "type"); +export const ExtensionInfo = withCdpMeta(z.object({ "id": z.string(), "name": z.string(), "version": z.string(), "path": z.string(), "enabled": z.boolean() }).passthrough(), "Extensions.ExtensionInfo", "type"); +export const TriggerActionParams = withCdpMeta(z.object({ "id": z.string(), "targetId": z.string() }).passthrough(), "Extensions.triggerAction.params", "commandParams", { method: "Extensions.triggerAction" }); +export const TriggerActionResult = withCdpMeta(z.object({ }).passthrough(), "Extensions.triggerAction.result", "commandResult", { method: "Extensions.triggerAction" }); +export const LoadUnpackedParams = withCdpMeta(z.object({ "path": z.string(), "enableInIncognito": z.boolean().optional() }).passthrough(), "Extensions.loadUnpacked.params", "commandParams", { method: "Extensions.loadUnpacked" }); +export const LoadUnpackedResult = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Extensions.loadUnpacked.result", "commandResult", { method: "Extensions.loadUnpacked" }); +export const GetExtensionsParams = withCdpMeta(z.object({ }).passthrough(), "Extensions.getExtensions.params", "commandParams", { method: "Extensions.getExtensions" }); +export const GetExtensionsResult = withCdpMeta(z.object({ "extensions": z.array(z.lazy(() => ExtensionInfo)) }).passthrough(), "Extensions.getExtensions.result", "commandResult", { method: "Extensions.getExtensions" }); +export const UninstallParams = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Extensions.uninstall.params", "commandParams", { method: "Extensions.uninstall" }); +export const UninstallResult = withCdpMeta(z.object({ }).passthrough(), "Extensions.uninstall.result", "commandResult", { method: "Extensions.uninstall" }); +export const GetStorageItemsParams = withCdpMeta(z.object({ "id": z.string(), "storageArea": z.lazy(() => StorageArea), "keys": z.array(z.string()).optional() }).passthrough(), "Extensions.getStorageItems.params", "commandParams", { method: "Extensions.getStorageItems" }); +export const GetStorageItemsResult = withCdpMeta(z.object({ "data": z.record(z.string(), z.unknown()) }).passthrough(), "Extensions.getStorageItems.result", "commandResult", { method: "Extensions.getStorageItems" }); +export const RemoveStorageItemsParams = withCdpMeta(z.object({ "id": z.string(), "storageArea": z.lazy(() => StorageArea), "keys": z.array(z.string()) }).passthrough(), "Extensions.removeStorageItems.params", "commandParams", { method: "Extensions.removeStorageItems" }); +export const RemoveStorageItemsResult = withCdpMeta(z.object({ }).passthrough(), "Extensions.removeStorageItems.result", "commandResult", { method: "Extensions.removeStorageItems" }); +export const ClearStorageItemsParams = withCdpMeta(z.object({ "id": z.string(), "storageArea": z.lazy(() => StorageArea) }).passthrough(), "Extensions.clearStorageItems.params", "commandParams", { method: "Extensions.clearStorageItems" }); +export const ClearStorageItemsResult = withCdpMeta(z.object({ }).passthrough(), "Extensions.clearStorageItems.result", "commandResult", { method: "Extensions.clearStorageItems" }); +export const SetStorageItemsParams = withCdpMeta(z.object({ "id": z.string(), "storageArea": z.lazy(() => StorageArea), "values": z.record(z.string(), z.unknown()) }).passthrough(), "Extensions.setStorageItems.params", "commandParams", { method: "Extensions.setStorageItems" }); +export const SetStorageItemsResult = withCdpMeta(z.object({ }).passthrough(), "Extensions.setStorageItems.result", "commandResult", { method: "Extensions.setStorageItems" }); + +export const zod = { + StorageArea: StorageArea, + ExtensionInfo: ExtensionInfo, + TriggerActionParams: TriggerActionParams, + TriggerActionResult: TriggerActionResult, + LoadUnpackedParams: LoadUnpackedParams, + LoadUnpackedResult: LoadUnpackedResult, + GetExtensionsParams: GetExtensionsParams, + GetExtensionsResult: GetExtensionsResult, + UninstallParams: UninstallParams, + UninstallResult: UninstallResult, + GetStorageItemsParams: GetStorageItemsParams, + GetStorageItemsResult: GetStorageItemsResult, + RemoveStorageItemsParams: RemoveStorageItemsParams, + RemoveStorageItemsResult: RemoveStorageItemsResult, + ClearStorageItemsParams: ClearStorageItemsParams, + ClearStorageItemsResult: ClearStorageItemsResult, + SetStorageItemsParams: SetStorageItemsParams, + SetStorageItemsResult: SetStorageItemsResult, +} as const; +export const commands = { + "Extensions.triggerAction": { params: TriggerActionParams, result: TriggerActionResult }, + "Extensions.loadUnpacked": { params: LoadUnpackedParams, result: LoadUnpackedResult }, + "Extensions.getExtensions": { params: GetExtensionsParams, result: GetExtensionsResult }, + "Extensions.uninstall": { params: UninstallParams, result: UninstallResult }, + "Extensions.getStorageItems": { params: GetStorageItemsParams, result: GetStorageItemsResult }, + "Extensions.removeStorageItems": { params: RemoveStorageItemsParams, result: RemoveStorageItemsResult }, + "Extensions.clearStorageItems": { params: ClearStorageItemsParams, result: ClearStorageItemsResult }, + "Extensions.setStorageItems": { params: SetStorageItemsParams, result: SetStorageItemsResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/FedCm.ts b/types/zod/FedCm.ts new file mode 100644 index 0000000..a39f549 --- /dev/null +++ b/types/zod/FedCm.ts @@ -0,0 +1,65 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const LoginState = withCdpMeta(z.enum(["SignIn", "SignUp"]), "FedCm.LoginState", "type"); +export const DialogType = withCdpMeta(z.enum(["AccountChooser", "AutoReauthn", "ConfirmIdpLogin", "Error"]), "FedCm.DialogType", "type"); +export const DialogButton = withCdpMeta(z.enum(["ConfirmIdpLoginContinue", "ErrorGotIt", "ErrorMoreDetails"]), "FedCm.DialogButton", "type"); +export const AccountUrlType = withCdpMeta(z.enum(["TermsOfService", "PrivacyPolicy"]), "FedCm.AccountUrlType", "type"); +export const Account = withCdpMeta(z.object({ "accountId": z.string(), "email": z.string(), "name": z.string(), "givenName": z.string(), "pictureUrl": z.string(), "idpConfigUrl": z.string(), "idpLoginUrl": z.string(), "loginState": z.lazy(() => LoginState), "termsOfServiceUrl": z.string().optional(), "privacyPolicyUrl": z.string().optional() }).passthrough(), "FedCm.Account", "type"); +export const EnableParams = withCdpMeta(z.object({ "disableRejectionDelay": z.boolean().optional() }).passthrough(), "FedCm.enable.params", "commandParams", { method: "FedCm.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.enable.result", "commandResult", { method: "FedCm.enable" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "FedCm.disable.params", "commandParams", { method: "FedCm.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.disable.result", "commandResult", { method: "FedCm.disable" }); +export const SelectAccountParams = withCdpMeta(z.object({ "dialogId": z.string(), "accountIndex": z.number().int() }).passthrough(), "FedCm.selectAccount.params", "commandParams", { method: "FedCm.selectAccount" }); +export const SelectAccountResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.selectAccount.result", "commandResult", { method: "FedCm.selectAccount" }); +export const ClickDialogButtonParams = withCdpMeta(z.object({ "dialogId": z.string(), "dialogButton": z.lazy(() => DialogButton) }).passthrough(), "FedCm.clickDialogButton.params", "commandParams", { method: "FedCm.clickDialogButton" }); +export const ClickDialogButtonResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.clickDialogButton.result", "commandResult", { method: "FedCm.clickDialogButton" }); +export const OpenUrlParams = withCdpMeta(z.object({ "dialogId": z.string(), "accountIndex": z.number().int(), "accountUrlType": z.lazy(() => AccountUrlType) }).passthrough(), "FedCm.openUrl.params", "commandParams", { method: "FedCm.openUrl" }); +export const OpenUrlResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.openUrl.result", "commandResult", { method: "FedCm.openUrl" }); +export const DismissDialogParams = withCdpMeta(z.object({ "dialogId": z.string(), "triggerCooldown": z.boolean().optional() }).passthrough(), "FedCm.dismissDialog.params", "commandParams", { method: "FedCm.dismissDialog" }); +export const DismissDialogResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.dismissDialog.result", "commandResult", { method: "FedCm.dismissDialog" }); +export const ResetCooldownParams = withCdpMeta(z.object({ }).passthrough(), "FedCm.resetCooldown.params", "commandParams", { method: "FedCm.resetCooldown" }); +export const ResetCooldownResult = withCdpMeta(z.object({ }).passthrough(), "FedCm.resetCooldown.result", "commandResult", { method: "FedCm.resetCooldown" }); +export const DialogShownEvent = withCdpMeta(z.object({ "dialogId": z.string(), "dialogType": z.lazy(() => DialogType), "accounts": z.array(z.lazy(() => Account)), "title": z.string(), "subtitle": z.string().optional() }).passthrough(), "FedCm.dialogShown", "event", { phase: "event" }); +export const DialogClosedEvent = withCdpMeta(z.object({ "dialogId": z.string() }).passthrough(), "FedCm.dialogClosed", "event", { phase: "event" }); + +export const zod = { + LoginState: LoginState, + DialogType: DialogType, + DialogButton: DialogButton, + AccountUrlType: AccountUrlType, + Account: Account, + EnableParams: EnableParams, + EnableResult: EnableResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + SelectAccountParams: SelectAccountParams, + SelectAccountResult: SelectAccountResult, + ClickDialogButtonParams: ClickDialogButtonParams, + ClickDialogButtonResult: ClickDialogButtonResult, + OpenUrlParams: OpenUrlParams, + OpenUrlResult: OpenUrlResult, + DismissDialogParams: DismissDialogParams, + DismissDialogResult: DismissDialogResult, + ResetCooldownParams: ResetCooldownParams, + ResetCooldownResult: ResetCooldownResult, + DialogShownEvent: DialogShownEvent, + DialogClosedEvent: DialogClosedEvent, +} as const; +export const commands = { + "FedCm.enable": { params: EnableParams, result: EnableResult }, + "FedCm.disable": { params: DisableParams, result: DisableResult }, + "FedCm.selectAccount": { params: SelectAccountParams, result: SelectAccountResult }, + "FedCm.clickDialogButton": { params: ClickDialogButtonParams, result: ClickDialogButtonResult }, + "FedCm.openUrl": { params: OpenUrlParams, result: OpenUrlResult }, + "FedCm.dismissDialog": { params: DismissDialogParams, result: DismissDialogResult }, + "FedCm.resetCooldown": { params: ResetCooldownParams, result: ResetCooldownResult }, +} as const; +export const events = { + "FedCm.dialogShown": DialogShownEvent, + "FedCm.dialogClosed": DialogClosedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Fetch.ts b/types/zod/Fetch.ts new file mode 100644 index 0000000..f87b181 --- /dev/null +++ b/types/zod/Fetch.ts @@ -0,0 +1,80 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as IO from "./IO.js"; +import * as Network from "./Network.js"; +import * as Page from "./Page.js"; + +export const RequestId = withCdpMeta(z.string(), "Fetch.RequestId", "type"); +export const RequestStage = withCdpMeta(z.enum(["Request", "Response"]), "Fetch.RequestStage", "type"); +export const RequestPattern = withCdpMeta(z.object({ "urlPattern": z.string().optional(), "resourceType": z.lazy(() => Network.ResourceType).optional(), "requestStage": z.lazy(() => RequestStage).optional() }).passthrough(), "Fetch.RequestPattern", "type"); +export const HeaderEntry = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "Fetch.HeaderEntry", "type"); +export const AuthChallenge = withCdpMeta(z.object({ "source": z.enum(["Server", "Proxy"]).optional(), "origin": z.string(), "scheme": z.string(), "realm": z.string() }).passthrough(), "Fetch.AuthChallenge", "type"); +export const AuthChallengeResponse = withCdpMeta(z.object({ "response": z.enum(["Default", "CancelAuth", "ProvideCredentials"]), "username": z.string().optional(), "password": z.string().optional() }).passthrough(), "Fetch.AuthChallengeResponse", "type"); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Fetch.disable.params", "commandParams", { method: "Fetch.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.disable.result", "commandResult", { method: "Fetch.disable" }); +export const EnableParams = withCdpMeta(z.object({ "patterns": z.array(z.lazy(() => RequestPattern)).optional(), "handleAuthRequests": z.boolean().optional() }).passthrough(), "Fetch.enable.params", "commandParams", { method: "Fetch.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.enable.result", "commandResult", { method: "Fetch.enable" }); +export const FailRequestParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "errorReason": z.lazy(() => Network.ErrorReason) }).passthrough(), "Fetch.failRequest.params", "commandParams", { method: "Fetch.failRequest" }); +export const FailRequestResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.failRequest.result", "commandResult", { method: "Fetch.failRequest" }); +export const FulfillRequestParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "responseCode": z.number().int(), "responseHeaders": z.array(z.lazy(() => HeaderEntry)).optional(), "binaryResponseHeaders": z.string().optional(), "body": z.string().optional(), "responsePhrase": z.string().optional() }).passthrough(), "Fetch.fulfillRequest.params", "commandParams", { method: "Fetch.fulfillRequest" }); +export const FulfillRequestResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.fulfillRequest.result", "commandResult", { method: "Fetch.fulfillRequest" }); +export const ContinueRequestParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "url": z.string().optional(), "method": z.string().optional(), "postData": z.string().optional(), "headers": z.array(z.lazy(() => HeaderEntry)).optional(), "interceptResponse": z.boolean().optional() }).passthrough(), "Fetch.continueRequest.params", "commandParams", { method: "Fetch.continueRequest" }); +export const ContinueRequestResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.continueRequest.result", "commandResult", { method: "Fetch.continueRequest" }); +export const ContinueWithAuthParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "authChallengeResponse": z.lazy(() => AuthChallengeResponse) }).passthrough(), "Fetch.continueWithAuth.params", "commandParams", { method: "Fetch.continueWithAuth" }); +export const ContinueWithAuthResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.continueWithAuth.result", "commandResult", { method: "Fetch.continueWithAuth" }); +export const ContinueResponseParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "responseCode": z.number().int().optional(), "responsePhrase": z.string().optional(), "responseHeaders": z.array(z.lazy(() => HeaderEntry)).optional(), "binaryResponseHeaders": z.string().optional() }).passthrough(), "Fetch.continueResponse.params", "commandParams", { method: "Fetch.continueResponse" }); +export const ContinueResponseResult = withCdpMeta(z.object({ }).passthrough(), "Fetch.continueResponse.result", "commandResult", { method: "Fetch.continueResponse" }); +export const GetResponseBodyParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId) }).passthrough(), "Fetch.getResponseBody.params", "commandParams", { method: "Fetch.getResponseBody" }); +export const GetResponseBodyResult = withCdpMeta(z.object({ "body": z.string(), "base64Encoded": z.boolean() }).passthrough(), "Fetch.getResponseBody.result", "commandResult", { method: "Fetch.getResponseBody" }); +export const TakeResponseBodyAsStreamParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId) }).passthrough(), "Fetch.takeResponseBodyAsStream.params", "commandParams", { method: "Fetch.takeResponseBodyAsStream" }); +export const TakeResponseBodyAsStreamResult = withCdpMeta(z.object({ "stream": z.lazy(() => IO.StreamHandle) }).passthrough(), "Fetch.takeResponseBodyAsStream.result", "commandResult", { method: "Fetch.takeResponseBodyAsStream" }); +export const RequestPausedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "request": z.lazy(() => Network.Request), "frameId": z.lazy(() => Page.FrameId), "resourceType": z.lazy(() => Network.ResourceType), "responseErrorReason": z.lazy(() => Network.ErrorReason).optional(), "responseStatusCode": z.number().int().optional(), "responseStatusText": z.string().optional(), "responseHeaders": z.array(z.lazy(() => HeaderEntry)).optional(), "networkId": z.lazy(() => Network.RequestId).optional(), "redirectedRequestId": z.lazy(() => RequestId).optional() }).passthrough(), "Fetch.requestPaused", "event", { phase: "event" }); +export const AuthRequiredEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "request": z.lazy(() => Network.Request), "frameId": z.lazy(() => Page.FrameId), "resourceType": z.lazy(() => Network.ResourceType), "authChallenge": z.lazy(() => AuthChallenge) }).passthrough(), "Fetch.authRequired", "event", { phase: "event" }); + +export const zod = { + RequestId: RequestId, + RequestStage: RequestStage, + RequestPattern: RequestPattern, + HeaderEntry: HeaderEntry, + AuthChallenge: AuthChallenge, + AuthChallengeResponse: AuthChallengeResponse, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + FailRequestParams: FailRequestParams, + FailRequestResult: FailRequestResult, + FulfillRequestParams: FulfillRequestParams, + FulfillRequestResult: FulfillRequestResult, + ContinueRequestParams: ContinueRequestParams, + ContinueRequestResult: ContinueRequestResult, + ContinueWithAuthParams: ContinueWithAuthParams, + ContinueWithAuthResult: ContinueWithAuthResult, + ContinueResponseParams: ContinueResponseParams, + ContinueResponseResult: ContinueResponseResult, + GetResponseBodyParams: GetResponseBodyParams, + GetResponseBodyResult: GetResponseBodyResult, + TakeResponseBodyAsStreamParams: TakeResponseBodyAsStreamParams, + TakeResponseBodyAsStreamResult: TakeResponseBodyAsStreamResult, + RequestPausedEvent: RequestPausedEvent, + AuthRequiredEvent: AuthRequiredEvent, +} as const; +export const commands = { + "Fetch.disable": { params: DisableParams, result: DisableResult }, + "Fetch.enable": { params: EnableParams, result: EnableResult }, + "Fetch.failRequest": { params: FailRequestParams, result: FailRequestResult }, + "Fetch.fulfillRequest": { params: FulfillRequestParams, result: FulfillRequestResult }, + "Fetch.continueRequest": { params: ContinueRequestParams, result: ContinueRequestResult }, + "Fetch.continueWithAuth": { params: ContinueWithAuthParams, result: ContinueWithAuthResult }, + "Fetch.continueResponse": { params: ContinueResponseParams, result: ContinueResponseResult }, + "Fetch.getResponseBody": { params: GetResponseBodyParams, result: GetResponseBodyResult }, + "Fetch.takeResponseBodyAsStream": { params: TakeResponseBodyAsStreamParams, result: TakeResponseBodyAsStreamResult }, +} as const; +export const events = { + "Fetch.requestPaused": RequestPausedEvent, + "Fetch.authRequired": AuthRequiredEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/FileSystem.ts b/types/zod/FileSystem.ts new file mode 100644 index 0000000..9e15cc4 --- /dev/null +++ b/types/zod/FileSystem.ts @@ -0,0 +1,27 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Network from "./Network.js"; +import * as Storage from "./Storage.js"; + +export const File = withCdpMeta(z.object({ "name": z.string(), "lastModified": z.lazy(() => Network.TimeSinceEpoch), "size": z.number(), "type": z.string() }).passthrough(), "FileSystem.File", "type"); +export const Directory = withCdpMeta(z.object({ "name": z.string(), "nestedDirectories": z.array(z.string()), "nestedFiles": z.array(z.lazy(() => File)) }).passthrough(), "FileSystem.Directory", "type"); +export const BucketFileSystemLocator = withCdpMeta(z.object({ "storageKey": z.lazy(() => Storage.SerializedStorageKey), "bucketName": z.string().optional(), "pathComponents": z.array(z.string()) }).passthrough(), "FileSystem.BucketFileSystemLocator", "type"); +export const GetDirectoryParams = withCdpMeta(z.object({ "bucketFileSystemLocator": z.lazy(() => BucketFileSystemLocator) }).passthrough(), "FileSystem.getDirectory.params", "commandParams", { method: "FileSystem.getDirectory" }); +export const GetDirectoryResult = withCdpMeta(z.object({ "directory": z.lazy(() => Directory) }).passthrough(), "FileSystem.getDirectory.result", "commandResult", { method: "FileSystem.getDirectory" }); + +export const zod = { + File: File, + Directory: Directory, + BucketFileSystemLocator: BucketFileSystemLocator, + GetDirectoryParams: GetDirectoryParams, + GetDirectoryResult: GetDirectoryResult, +} as const; +export const commands = { + "FileSystem.getDirectory": { params: GetDirectoryParams, result: GetDirectoryResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/HeadlessExperimental.ts b/types/zod/HeadlessExperimental.ts new file mode 100644 index 0000000..e0f017b --- /dev/null +++ b/types/zod/HeadlessExperimental.ts @@ -0,0 +1,31 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const ScreenshotParams = withCdpMeta(z.object({ "format": z.enum(["jpeg", "png", "webp"]).optional(), "quality": z.number().int().optional(), "optimizeForSpeed": z.boolean().optional() }).passthrough(), "HeadlessExperimental.ScreenshotParams", "type"); +export const BeginFrameParams = withCdpMeta(z.object({ "frameTimeTicks": z.number().optional(), "interval": z.number().optional(), "noDisplayUpdates": z.boolean().optional(), "screenshot": z.lazy(() => ScreenshotParams).optional() }).passthrough(), "HeadlessExperimental.beginFrame.params", "commandParams", { method: "HeadlessExperimental.beginFrame" }); +export const BeginFrameResult = withCdpMeta(z.object({ "hasDamage": z.boolean(), "screenshotData": z.string().optional() }).passthrough(), "HeadlessExperimental.beginFrame.result", "commandResult", { method: "HeadlessExperimental.beginFrame" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "HeadlessExperimental.disable.params", "commandParams", { method: "HeadlessExperimental.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "HeadlessExperimental.disable.result", "commandResult", { method: "HeadlessExperimental.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "HeadlessExperimental.enable.params", "commandParams", { method: "HeadlessExperimental.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "HeadlessExperimental.enable.result", "commandResult", { method: "HeadlessExperimental.enable" }); + +export const zod = { + ScreenshotParams: ScreenshotParams, + BeginFrameParams: BeginFrameParams, + BeginFrameResult: BeginFrameResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, +} as const; +export const commands = { + "HeadlessExperimental.beginFrame": { params: BeginFrameParams, result: BeginFrameResult }, + "HeadlessExperimental.disable": { params: DisableParams, result: DisableResult }, + "HeadlessExperimental.enable": { params: EnableParams, result: EnableResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/HeapProfiler.ts b/types/zod/HeapProfiler.ts new file mode 100644 index 0000000..a88e018 --- /dev/null +++ b/types/zod/HeapProfiler.ts @@ -0,0 +1,98 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Runtime from "./Runtime.js"; + +export const HeapSnapshotObjectId = withCdpMeta(z.string(), "HeapProfiler.HeapSnapshotObjectId", "type"); +export const SamplingHeapProfileNode = withCdpMeta(z.object({ "callFrame": z.lazy(() => Runtime.CallFrame), "selfSize": z.number(), "id": z.number().int(), "children": z.array(z.lazy(() => SamplingHeapProfileNode)) }).passthrough(), "HeapProfiler.SamplingHeapProfileNode", "type"); +export const SamplingHeapProfileSample = withCdpMeta(z.object({ "size": z.number(), "nodeId": z.number().int(), "ordinal": z.number() }).passthrough(), "HeapProfiler.SamplingHeapProfileSample", "type"); +export const SamplingHeapProfile = withCdpMeta(z.object({ "head": z.lazy(() => SamplingHeapProfileNode), "samples": z.array(z.lazy(() => SamplingHeapProfileSample)) }).passthrough(), "HeapProfiler.SamplingHeapProfile", "type"); +export const AddInspectedHeapObjectParams = withCdpMeta(z.object({ "heapObjectId": z.lazy(() => HeapSnapshotObjectId) }).passthrough(), "HeapProfiler.addInspectedHeapObject.params", "commandParams", { method: "HeapProfiler.addInspectedHeapObject" }); +export const AddInspectedHeapObjectResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.addInspectedHeapObject.result", "commandResult", { method: "HeapProfiler.addInspectedHeapObject" }); +export const CollectGarbageParams = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.collectGarbage.params", "commandParams", { method: "HeapProfiler.collectGarbage" }); +export const CollectGarbageResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.collectGarbage.result", "commandResult", { method: "HeapProfiler.collectGarbage" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.disable.params", "commandParams", { method: "HeapProfiler.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.disable.result", "commandResult", { method: "HeapProfiler.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.enable.params", "commandParams", { method: "HeapProfiler.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.enable.result", "commandResult", { method: "HeapProfiler.enable" }); +export const GetHeapObjectIdParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime.RemoteObjectId) }).passthrough(), "HeapProfiler.getHeapObjectId.params", "commandParams", { method: "HeapProfiler.getHeapObjectId" }); +export const GetHeapObjectIdResult = withCdpMeta(z.object({ "heapSnapshotObjectId": z.lazy(() => HeapSnapshotObjectId) }).passthrough(), "HeapProfiler.getHeapObjectId.result", "commandResult", { method: "HeapProfiler.getHeapObjectId" }); +export const GetObjectByHeapObjectIdParams = withCdpMeta(z.object({ "objectId": z.lazy(() => HeapSnapshotObjectId), "objectGroup": z.string().optional() }).passthrough(), "HeapProfiler.getObjectByHeapObjectId.params", "commandParams", { method: "HeapProfiler.getObjectByHeapObjectId" }); +export const GetObjectByHeapObjectIdResult = withCdpMeta(z.object({ "result": z.lazy(() => Runtime.RemoteObject) }).passthrough(), "HeapProfiler.getObjectByHeapObjectId.result", "commandResult", { method: "HeapProfiler.getObjectByHeapObjectId" }); +export const GetSamplingProfileParams = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.getSamplingProfile.params", "commandParams", { method: "HeapProfiler.getSamplingProfile" }); +export const GetSamplingProfileResult = withCdpMeta(z.object({ "profile": z.lazy(() => SamplingHeapProfile) }).passthrough(), "HeapProfiler.getSamplingProfile.result", "commandResult", { method: "HeapProfiler.getSamplingProfile" }); +export const StartSamplingParams = withCdpMeta(z.object({ "samplingInterval": z.number().optional(), "stackDepth": z.number().optional(), "includeObjectsCollectedByMajorGC": z.boolean().optional(), "includeObjectsCollectedByMinorGC": z.boolean().optional() }).passthrough(), "HeapProfiler.startSampling.params", "commandParams", { method: "HeapProfiler.startSampling" }); +export const StartSamplingResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.startSampling.result", "commandResult", { method: "HeapProfiler.startSampling" }); +export const StartTrackingHeapObjectsParams = withCdpMeta(z.object({ "trackAllocations": z.boolean().optional() }).passthrough(), "HeapProfiler.startTrackingHeapObjects.params", "commandParams", { method: "HeapProfiler.startTrackingHeapObjects" }); +export const StartTrackingHeapObjectsResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.startTrackingHeapObjects.result", "commandResult", { method: "HeapProfiler.startTrackingHeapObjects" }); +export const StopSamplingParams = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.stopSampling.params", "commandParams", { method: "HeapProfiler.stopSampling" }); +export const StopSamplingResult = withCdpMeta(z.object({ "profile": z.lazy(() => SamplingHeapProfile) }).passthrough(), "HeapProfiler.stopSampling.result", "commandResult", { method: "HeapProfiler.stopSampling" }); +export const StopTrackingHeapObjectsParams = withCdpMeta(z.object({ "reportProgress": z.boolean().optional(), "treatGlobalObjectsAsRoots": z.boolean().optional(), "captureNumericValue": z.boolean().optional(), "exposeInternals": z.boolean().optional() }).passthrough(), "HeapProfiler.stopTrackingHeapObjects.params", "commandParams", { method: "HeapProfiler.stopTrackingHeapObjects" }); +export const StopTrackingHeapObjectsResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.stopTrackingHeapObjects.result", "commandResult", { method: "HeapProfiler.stopTrackingHeapObjects" }); +export const TakeHeapSnapshotParams = withCdpMeta(z.object({ "reportProgress": z.boolean().optional(), "treatGlobalObjectsAsRoots": z.boolean().optional(), "captureNumericValue": z.boolean().optional(), "exposeInternals": z.boolean().optional() }).passthrough(), "HeapProfiler.takeHeapSnapshot.params", "commandParams", { method: "HeapProfiler.takeHeapSnapshot" }); +export const TakeHeapSnapshotResult = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.takeHeapSnapshot.result", "commandResult", { method: "HeapProfiler.takeHeapSnapshot" }); +export const AddHeapSnapshotChunkEvent = withCdpMeta(z.object({ "chunk": z.string() }).passthrough(), "HeapProfiler.addHeapSnapshotChunk", "event", { phase: "event" }); +export const HeapStatsUpdateEvent = withCdpMeta(z.object({ "statsUpdate": z.array(z.number().int()) }).passthrough(), "HeapProfiler.heapStatsUpdate", "event", { phase: "event" }); +export const LastSeenObjectIdEvent = withCdpMeta(z.object({ "lastSeenObjectId": z.number().int(), "timestamp": z.number() }).passthrough(), "HeapProfiler.lastSeenObjectId", "event", { phase: "event" }); +export const ReportHeapSnapshotProgressEvent = withCdpMeta(z.object({ "done": z.number().int(), "total": z.number().int(), "finished": z.boolean().optional() }).passthrough(), "HeapProfiler.reportHeapSnapshotProgress", "event", { phase: "event" }); +export const ResetProfilesEvent = withCdpMeta(z.object({ }).passthrough(), "HeapProfiler.resetProfiles", "event", { phase: "event" }); + +export const zod = { + HeapSnapshotObjectId: HeapSnapshotObjectId, + SamplingHeapProfileNode: SamplingHeapProfileNode, + SamplingHeapProfileSample: SamplingHeapProfileSample, + SamplingHeapProfile: SamplingHeapProfile, + AddInspectedHeapObjectParams: AddInspectedHeapObjectParams, + AddInspectedHeapObjectResult: AddInspectedHeapObjectResult, + CollectGarbageParams: CollectGarbageParams, + CollectGarbageResult: CollectGarbageResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + GetHeapObjectIdParams: GetHeapObjectIdParams, + GetHeapObjectIdResult: GetHeapObjectIdResult, + GetObjectByHeapObjectIdParams: GetObjectByHeapObjectIdParams, + GetObjectByHeapObjectIdResult: GetObjectByHeapObjectIdResult, + GetSamplingProfileParams: GetSamplingProfileParams, + GetSamplingProfileResult: GetSamplingProfileResult, + StartSamplingParams: StartSamplingParams, + StartSamplingResult: StartSamplingResult, + StartTrackingHeapObjectsParams: StartTrackingHeapObjectsParams, + StartTrackingHeapObjectsResult: StartTrackingHeapObjectsResult, + StopSamplingParams: StopSamplingParams, + StopSamplingResult: StopSamplingResult, + StopTrackingHeapObjectsParams: StopTrackingHeapObjectsParams, + StopTrackingHeapObjectsResult: StopTrackingHeapObjectsResult, + TakeHeapSnapshotParams: TakeHeapSnapshotParams, + TakeHeapSnapshotResult: TakeHeapSnapshotResult, + AddHeapSnapshotChunkEvent: AddHeapSnapshotChunkEvent, + HeapStatsUpdateEvent: HeapStatsUpdateEvent, + LastSeenObjectIdEvent: LastSeenObjectIdEvent, + ReportHeapSnapshotProgressEvent: ReportHeapSnapshotProgressEvent, + ResetProfilesEvent: ResetProfilesEvent, +} as const; +export const commands = { + "HeapProfiler.addInspectedHeapObject": { params: AddInspectedHeapObjectParams, result: AddInspectedHeapObjectResult }, + "HeapProfiler.collectGarbage": { params: CollectGarbageParams, result: CollectGarbageResult }, + "HeapProfiler.disable": { params: DisableParams, result: DisableResult }, + "HeapProfiler.enable": { params: EnableParams, result: EnableResult }, + "HeapProfiler.getHeapObjectId": { params: GetHeapObjectIdParams, result: GetHeapObjectIdResult }, + "HeapProfiler.getObjectByHeapObjectId": { params: GetObjectByHeapObjectIdParams, result: GetObjectByHeapObjectIdResult }, + "HeapProfiler.getSamplingProfile": { params: GetSamplingProfileParams, result: GetSamplingProfileResult }, + "HeapProfiler.startSampling": { params: StartSamplingParams, result: StartSamplingResult }, + "HeapProfiler.startTrackingHeapObjects": { params: StartTrackingHeapObjectsParams, result: StartTrackingHeapObjectsResult }, + "HeapProfiler.stopSampling": { params: StopSamplingParams, result: StopSamplingResult }, + "HeapProfiler.stopTrackingHeapObjects": { params: StopTrackingHeapObjectsParams, result: StopTrackingHeapObjectsResult }, + "HeapProfiler.takeHeapSnapshot": { params: TakeHeapSnapshotParams, result: TakeHeapSnapshotResult }, +} as const; +export const events = { + "HeapProfiler.addHeapSnapshotChunk": AddHeapSnapshotChunkEvent, + "HeapProfiler.heapStatsUpdate": HeapStatsUpdateEvent, + "HeapProfiler.lastSeenObjectId": LastSeenObjectIdEvent, + "HeapProfiler.reportHeapSnapshotProgress": ReportHeapSnapshotProgressEvent, + "HeapProfiler.resetProfiles": ResetProfilesEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/IO.ts b/types/zod/IO.ts new file mode 100644 index 0000000..90b40e1 --- /dev/null +++ b/types/zod/IO.ts @@ -0,0 +1,32 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Runtime from "./Runtime.js"; + +export const StreamHandle = withCdpMeta(z.string(), "IO.StreamHandle", "type"); +export const CloseParams = withCdpMeta(z.object({ "handle": z.lazy(() => StreamHandle) }).passthrough(), "IO.close.params", "commandParams", { method: "IO.close" }); +export const CloseResult = withCdpMeta(z.object({ }).passthrough(), "IO.close.result", "commandResult", { method: "IO.close" }); +export const ReadParams = withCdpMeta(z.object({ "handle": z.lazy(() => StreamHandle), "offset": z.number().int().optional(), "size": z.number().int().optional() }).passthrough(), "IO.read.params", "commandParams", { method: "IO.read" }); +export const ReadResult = withCdpMeta(z.object({ "base64Encoded": z.boolean().optional(), "data": z.string(), "eof": z.boolean() }).passthrough(), "IO.read.result", "commandResult", { method: "IO.read" }); +export const ResolveBlobParams = withCdpMeta(z.object({ "objectId": z.lazy(() => Runtime.RemoteObjectId) }).passthrough(), "IO.resolveBlob.params", "commandParams", { method: "IO.resolveBlob" }); +export const ResolveBlobResult = withCdpMeta(z.object({ "uuid": z.string() }).passthrough(), "IO.resolveBlob.result", "commandResult", { method: "IO.resolveBlob" }); + +export const zod = { + StreamHandle: StreamHandle, + CloseParams: CloseParams, + CloseResult: CloseResult, + ReadParams: ReadParams, + ReadResult: ReadResult, + ResolveBlobParams: ResolveBlobParams, + ResolveBlobResult: ResolveBlobResult, +} as const; +export const commands = { + "IO.close": { params: CloseParams, result: CloseResult }, + "IO.read": { params: ReadParams, result: ReadResult }, + "IO.resolveBlob": { params: ResolveBlobParams, result: ResolveBlobResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/IndexedDB.ts b/types/zod/IndexedDB.ts new file mode 100644 index 0000000..3d484ce --- /dev/null +++ b/types/zod/IndexedDB.ts @@ -0,0 +1,75 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Runtime from "./Runtime.js"; +import * as Storage from "./Storage.js"; + +export const DatabaseWithObjectStores = withCdpMeta(z.object({ "name": z.string(), "version": z.number(), "objectStores": z.array(z.lazy(() => ObjectStore)) }).passthrough(), "IndexedDB.DatabaseWithObjectStores", "type"); +export const ObjectStore = withCdpMeta(z.object({ "name": z.string(), "keyPath": z.lazy(() => KeyPath), "autoIncrement": z.boolean(), "indexes": z.array(z.lazy(() => ObjectStoreIndex)) }).passthrough(), "IndexedDB.ObjectStore", "type"); +export const ObjectStoreIndex = withCdpMeta(z.object({ "name": z.string(), "keyPath": z.lazy(() => KeyPath), "unique": z.boolean(), "multiEntry": z.boolean() }).passthrough(), "IndexedDB.ObjectStoreIndex", "type"); +export const Key = withCdpMeta(z.object({ "type": z.enum(["number", "string", "date", "array"]), "number": z.number().optional(), "string": z.string().optional(), "date": z.number().optional(), "array": z.array(z.lazy(() => Key)).optional() }).passthrough(), "IndexedDB.Key", "type"); +export const KeyRange = withCdpMeta(z.object({ "lower": z.lazy(() => Key).optional(), "upper": z.lazy(() => Key).optional(), "lowerOpen": z.boolean(), "upperOpen": z.boolean() }).passthrough(), "IndexedDB.KeyRange", "type"); +export const DataEntry = withCdpMeta(z.object({ "key": z.lazy(() => Runtime.RemoteObject), "primaryKey": z.lazy(() => Runtime.RemoteObject), "value": z.lazy(() => Runtime.RemoteObject) }).passthrough(), "IndexedDB.DataEntry", "type"); +export const KeyPath = withCdpMeta(z.object({ "type": z.enum(["null", "string", "array"]), "string": z.string().optional(), "array": z.array(z.string()).optional() }).passthrough(), "IndexedDB.KeyPath", "type"); +export const ClearObjectStoreParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage.StorageBucket).optional(), "databaseName": z.string(), "objectStoreName": z.string() }).passthrough(), "IndexedDB.clearObjectStore.params", "commandParams", { method: "IndexedDB.clearObjectStore" }); +export const ClearObjectStoreResult = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.clearObjectStore.result", "commandResult", { method: "IndexedDB.clearObjectStore" }); +export const DeleteDatabaseParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage.StorageBucket).optional(), "databaseName": z.string() }).passthrough(), "IndexedDB.deleteDatabase.params", "commandParams", { method: "IndexedDB.deleteDatabase" }); +export const DeleteDatabaseResult = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.deleteDatabase.result", "commandResult", { method: "IndexedDB.deleteDatabase" }); +export const DeleteObjectStoreEntriesParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage.StorageBucket).optional(), "databaseName": z.string(), "objectStoreName": z.string(), "keyRange": z.lazy(() => KeyRange) }).passthrough(), "IndexedDB.deleteObjectStoreEntries.params", "commandParams", { method: "IndexedDB.deleteObjectStoreEntries" }); +export const DeleteObjectStoreEntriesResult = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.deleteObjectStoreEntries.result", "commandResult", { method: "IndexedDB.deleteObjectStoreEntries" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.disable.params", "commandParams", { method: "IndexedDB.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.disable.result", "commandResult", { method: "IndexedDB.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.enable.params", "commandParams", { method: "IndexedDB.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "IndexedDB.enable.result", "commandResult", { method: "IndexedDB.enable" }); +export const RequestDataParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage.StorageBucket).optional(), "databaseName": z.string(), "objectStoreName": z.string(), "indexName": z.string().optional(), "skipCount": z.number().int(), "pageSize": z.number().int(), "keyRange": z.lazy(() => KeyRange).optional() }).passthrough(), "IndexedDB.requestData.params", "commandParams", { method: "IndexedDB.requestData" }); +export const RequestDataResult = withCdpMeta(z.object({ "objectStoreDataEntries": z.array(z.lazy(() => DataEntry)), "hasMore": z.boolean() }).passthrough(), "IndexedDB.requestData.result", "commandResult", { method: "IndexedDB.requestData" }); +export const GetMetadataParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage.StorageBucket).optional(), "databaseName": z.string(), "objectStoreName": z.string() }).passthrough(), "IndexedDB.getMetadata.params", "commandParams", { method: "IndexedDB.getMetadata" }); +export const GetMetadataResult = withCdpMeta(z.object({ "entriesCount": z.number(), "keyGeneratorValue": z.number() }).passthrough(), "IndexedDB.getMetadata.result", "commandResult", { method: "IndexedDB.getMetadata" }); +export const RequestDatabaseParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage.StorageBucket).optional(), "databaseName": z.string() }).passthrough(), "IndexedDB.requestDatabase.params", "commandParams", { method: "IndexedDB.requestDatabase" }); +export const RequestDatabaseResult = withCdpMeta(z.object({ "databaseWithObjectStores": z.lazy(() => DatabaseWithObjectStores) }).passthrough(), "IndexedDB.requestDatabase.result", "commandResult", { method: "IndexedDB.requestDatabase" }); +export const RequestDatabaseNamesParams = withCdpMeta(z.object({ "securityOrigin": z.string().optional(), "storageKey": z.string().optional(), "storageBucket": z.lazy(() => Storage.StorageBucket).optional() }).passthrough(), "IndexedDB.requestDatabaseNames.params", "commandParams", { method: "IndexedDB.requestDatabaseNames" }); +export const RequestDatabaseNamesResult = withCdpMeta(z.object({ "databaseNames": z.array(z.string()) }).passthrough(), "IndexedDB.requestDatabaseNames.result", "commandResult", { method: "IndexedDB.requestDatabaseNames" }); + +export const zod = { + DatabaseWithObjectStores: DatabaseWithObjectStores, + ObjectStore: ObjectStore, + ObjectStoreIndex: ObjectStoreIndex, + Key: Key, + KeyRange: KeyRange, + DataEntry: DataEntry, + KeyPath: KeyPath, + ClearObjectStoreParams: ClearObjectStoreParams, + ClearObjectStoreResult: ClearObjectStoreResult, + DeleteDatabaseParams: DeleteDatabaseParams, + DeleteDatabaseResult: DeleteDatabaseResult, + DeleteObjectStoreEntriesParams: DeleteObjectStoreEntriesParams, + DeleteObjectStoreEntriesResult: DeleteObjectStoreEntriesResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + RequestDataParams: RequestDataParams, + RequestDataResult: RequestDataResult, + GetMetadataParams: GetMetadataParams, + GetMetadataResult: GetMetadataResult, + RequestDatabaseParams: RequestDatabaseParams, + RequestDatabaseResult: RequestDatabaseResult, + RequestDatabaseNamesParams: RequestDatabaseNamesParams, + RequestDatabaseNamesResult: RequestDatabaseNamesResult, +} as const; +export const commands = { + "IndexedDB.clearObjectStore": { params: ClearObjectStoreParams, result: ClearObjectStoreResult }, + "IndexedDB.deleteDatabase": { params: DeleteDatabaseParams, result: DeleteDatabaseResult }, + "IndexedDB.deleteObjectStoreEntries": { params: DeleteObjectStoreEntriesParams, result: DeleteObjectStoreEntriesResult }, + "IndexedDB.disable": { params: DisableParams, result: DisableResult }, + "IndexedDB.enable": { params: EnableParams, result: EnableResult }, + "IndexedDB.requestData": { params: RequestDataParams, result: RequestDataResult }, + "IndexedDB.getMetadata": { params: GetMetadataParams, result: GetMetadataResult }, + "IndexedDB.requestDatabase": { params: RequestDatabaseParams, result: RequestDatabaseResult }, + "IndexedDB.requestDatabaseNames": { params: RequestDatabaseNamesParams, result: RequestDatabaseNamesResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Input.ts b/types/zod/Input.ts new file mode 100644 index 0000000..e751355 --- /dev/null +++ b/types/zod/Input.ts @@ -0,0 +1,94 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const TouchPoint = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "radiusX": z.number().optional(), "radiusY": z.number().optional(), "rotationAngle": z.number().optional(), "force": z.number().optional(), "tangentialPressure": z.number().optional(), "tiltX": z.number().optional(), "tiltY": z.number().optional(), "twist": z.number().int().optional(), "id": z.number().optional() }).passthrough(), "Input.TouchPoint", "type"); +export const GestureSourceType = withCdpMeta(z.enum(["default", "touch", "mouse"]), "Input.GestureSourceType", "type"); +export const MouseButton = withCdpMeta(z.enum(["none", "left", "middle", "right", "back", "forward"]), "Input.MouseButton", "type"); +export const TimeSinceEpoch = withCdpMeta(z.number(), "Input.TimeSinceEpoch", "type"); +export const DragDataItem = withCdpMeta(z.object({ "mimeType": z.string(), "data": z.string(), "title": z.string().optional(), "baseURL": z.string().optional() }).passthrough(), "Input.DragDataItem", "type"); +export const DragData = withCdpMeta(z.object({ "items": z.array(z.lazy(() => DragDataItem)), "files": z.array(z.string()).optional(), "dragOperationsMask": z.number().int() }).passthrough(), "Input.DragData", "type"); +export const DispatchDragEventParams = withCdpMeta(z.object({ "type": z.enum(["dragEnter", "dragOver", "drop", "dragCancel"]), "x": z.number(), "y": z.number(), "data": z.lazy(() => DragData), "modifiers": z.number().int().optional() }).passthrough(), "Input.dispatchDragEvent.params", "commandParams", { method: "Input.dispatchDragEvent" }); +export const DispatchDragEventResult = withCdpMeta(z.object({ }).passthrough(), "Input.dispatchDragEvent.result", "commandResult", { method: "Input.dispatchDragEvent" }); +export const DispatchKeyEventParams = withCdpMeta(z.object({ "type": z.enum(["keyDown", "keyUp", "rawKeyDown", "char"]), "modifiers": z.number().int().optional(), "timestamp": z.lazy(() => TimeSinceEpoch).optional(), "text": z.string().optional(), "unmodifiedText": z.string().optional(), "keyIdentifier": z.string().optional(), "code": z.string().optional(), "key": z.string().optional(), "windowsVirtualKeyCode": z.number().int().optional(), "nativeVirtualKeyCode": z.number().int().optional(), "autoRepeat": z.boolean().optional(), "isKeypad": z.boolean().optional(), "isSystemKey": z.boolean().optional(), "location": z.number().int().optional(), "commands": z.array(z.string()).optional() }).passthrough(), "Input.dispatchKeyEvent.params", "commandParams", { method: "Input.dispatchKeyEvent" }); +export const DispatchKeyEventResult = withCdpMeta(z.object({ }).passthrough(), "Input.dispatchKeyEvent.result", "commandResult", { method: "Input.dispatchKeyEvent" }); +export const InsertTextParams = withCdpMeta(z.object({ "text": z.string() }).passthrough(), "Input.insertText.params", "commandParams", { method: "Input.insertText" }); +export const InsertTextResult = withCdpMeta(z.object({ }).passthrough(), "Input.insertText.result", "commandResult", { method: "Input.insertText" }); +export const ImeSetCompositionParams = withCdpMeta(z.object({ "text": z.string(), "selectionStart": z.number().int(), "selectionEnd": z.number().int(), "replacementStart": z.number().int().optional(), "replacementEnd": z.number().int().optional() }).passthrough(), "Input.imeSetComposition.params", "commandParams", { method: "Input.imeSetComposition" }); +export const ImeSetCompositionResult = withCdpMeta(z.object({ }).passthrough(), "Input.imeSetComposition.result", "commandResult", { method: "Input.imeSetComposition" }); +export const DispatchMouseEventParams = withCdpMeta(z.object({ "type": z.enum(["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"]), "x": z.number(), "y": z.number(), "modifiers": z.number().int().optional(), "timestamp": z.lazy(() => TimeSinceEpoch).optional(), "button": z.lazy(() => MouseButton).optional(), "buttons": z.number().int().optional(), "clickCount": z.number().int().optional(), "force": z.number().optional(), "tangentialPressure": z.number().optional(), "tiltX": z.number().optional(), "tiltY": z.number().optional(), "twist": z.number().int().optional(), "deltaX": z.number().optional(), "deltaY": z.number().optional(), "pointerType": z.enum(["mouse", "pen"]).optional() }).passthrough(), "Input.dispatchMouseEvent.params", "commandParams", { method: "Input.dispatchMouseEvent" }); +export const DispatchMouseEventResult = withCdpMeta(z.object({ }).passthrough(), "Input.dispatchMouseEvent.result", "commandResult", { method: "Input.dispatchMouseEvent" }); +export const DispatchTouchEventParams = withCdpMeta(z.object({ "type": z.enum(["touchStart", "touchEnd", "touchMove", "touchCancel"]), "touchPoints": z.array(z.lazy(() => TouchPoint)), "modifiers": z.number().int().optional(), "timestamp": z.lazy(() => TimeSinceEpoch).optional() }).passthrough(), "Input.dispatchTouchEvent.params", "commandParams", { method: "Input.dispatchTouchEvent" }); +export const DispatchTouchEventResult = withCdpMeta(z.object({ }).passthrough(), "Input.dispatchTouchEvent.result", "commandResult", { method: "Input.dispatchTouchEvent" }); +export const CancelDraggingParams = withCdpMeta(z.object({ }).passthrough(), "Input.cancelDragging.params", "commandParams", { method: "Input.cancelDragging" }); +export const CancelDraggingResult = withCdpMeta(z.object({ }).passthrough(), "Input.cancelDragging.result", "commandResult", { method: "Input.cancelDragging" }); +export const EmulateTouchFromMouseEventParams = withCdpMeta(z.object({ "type": z.enum(["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"]), "x": z.number().int(), "y": z.number().int(), "button": z.lazy(() => MouseButton), "timestamp": z.lazy(() => TimeSinceEpoch).optional(), "deltaX": z.number().optional(), "deltaY": z.number().optional(), "modifiers": z.number().int().optional(), "clickCount": z.number().int().optional() }).passthrough(), "Input.emulateTouchFromMouseEvent.params", "commandParams", { method: "Input.emulateTouchFromMouseEvent" }); +export const EmulateTouchFromMouseEventResult = withCdpMeta(z.object({ }).passthrough(), "Input.emulateTouchFromMouseEvent.result", "commandResult", { method: "Input.emulateTouchFromMouseEvent" }); +export const SetIgnoreInputEventsParams = withCdpMeta(z.object({ "ignore": z.boolean() }).passthrough(), "Input.setIgnoreInputEvents.params", "commandParams", { method: "Input.setIgnoreInputEvents" }); +export const SetIgnoreInputEventsResult = withCdpMeta(z.object({ }).passthrough(), "Input.setIgnoreInputEvents.result", "commandResult", { method: "Input.setIgnoreInputEvents" }); +export const SetInterceptDragsParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Input.setInterceptDrags.params", "commandParams", { method: "Input.setInterceptDrags" }); +export const SetInterceptDragsResult = withCdpMeta(z.object({ }).passthrough(), "Input.setInterceptDrags.result", "commandResult", { method: "Input.setInterceptDrags" }); +export const SynthesizePinchGestureParams = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "scaleFactor": z.number(), "relativeSpeed": z.number().int().optional(), "gestureSourceType": z.lazy(() => GestureSourceType).optional() }).passthrough(), "Input.synthesizePinchGesture.params", "commandParams", { method: "Input.synthesizePinchGesture" }); +export const SynthesizePinchGestureResult = withCdpMeta(z.object({ }).passthrough(), "Input.synthesizePinchGesture.result", "commandResult", { method: "Input.synthesizePinchGesture" }); +export const SynthesizeScrollGestureParams = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "xDistance": z.number().optional(), "yDistance": z.number().optional(), "xOverscroll": z.number().optional(), "yOverscroll": z.number().optional(), "preventFling": z.boolean().optional(), "speed": z.number().int().optional(), "gestureSourceType": z.lazy(() => GestureSourceType).optional(), "repeatCount": z.number().int().optional(), "repeatDelayMs": z.number().int().optional(), "interactionMarkerName": z.string().optional() }).passthrough(), "Input.synthesizeScrollGesture.params", "commandParams", { method: "Input.synthesizeScrollGesture" }); +export const SynthesizeScrollGestureResult = withCdpMeta(z.object({ }).passthrough(), "Input.synthesizeScrollGesture.result", "commandResult", { method: "Input.synthesizeScrollGesture" }); +export const SynthesizeTapGestureParams = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "duration": z.number().int().optional(), "tapCount": z.number().int().optional(), "gestureSourceType": z.lazy(() => GestureSourceType).optional() }).passthrough(), "Input.synthesizeTapGesture.params", "commandParams", { method: "Input.synthesizeTapGesture" }); +export const SynthesizeTapGestureResult = withCdpMeta(z.object({ }).passthrough(), "Input.synthesizeTapGesture.result", "commandResult", { method: "Input.synthesizeTapGesture" }); +export const DragInterceptedEvent = withCdpMeta(z.object({ "data": z.lazy(() => DragData) }).passthrough(), "Input.dragIntercepted", "event", { phase: "event" }); + +export const zod = { + TouchPoint: TouchPoint, + GestureSourceType: GestureSourceType, + MouseButton: MouseButton, + TimeSinceEpoch: TimeSinceEpoch, + DragDataItem: DragDataItem, + DragData: DragData, + DispatchDragEventParams: DispatchDragEventParams, + DispatchDragEventResult: DispatchDragEventResult, + DispatchKeyEventParams: DispatchKeyEventParams, + DispatchKeyEventResult: DispatchKeyEventResult, + InsertTextParams: InsertTextParams, + InsertTextResult: InsertTextResult, + ImeSetCompositionParams: ImeSetCompositionParams, + ImeSetCompositionResult: ImeSetCompositionResult, + DispatchMouseEventParams: DispatchMouseEventParams, + DispatchMouseEventResult: DispatchMouseEventResult, + DispatchTouchEventParams: DispatchTouchEventParams, + DispatchTouchEventResult: DispatchTouchEventResult, + CancelDraggingParams: CancelDraggingParams, + CancelDraggingResult: CancelDraggingResult, + EmulateTouchFromMouseEventParams: EmulateTouchFromMouseEventParams, + EmulateTouchFromMouseEventResult: EmulateTouchFromMouseEventResult, + SetIgnoreInputEventsParams: SetIgnoreInputEventsParams, + SetIgnoreInputEventsResult: SetIgnoreInputEventsResult, + SetInterceptDragsParams: SetInterceptDragsParams, + SetInterceptDragsResult: SetInterceptDragsResult, + SynthesizePinchGestureParams: SynthesizePinchGestureParams, + SynthesizePinchGestureResult: SynthesizePinchGestureResult, + SynthesizeScrollGestureParams: SynthesizeScrollGestureParams, + SynthesizeScrollGestureResult: SynthesizeScrollGestureResult, + SynthesizeTapGestureParams: SynthesizeTapGestureParams, + SynthesizeTapGestureResult: SynthesizeTapGestureResult, + DragInterceptedEvent: DragInterceptedEvent, +} as const; +export const commands = { + "Input.dispatchDragEvent": { params: DispatchDragEventParams, result: DispatchDragEventResult }, + "Input.dispatchKeyEvent": { params: DispatchKeyEventParams, result: DispatchKeyEventResult }, + "Input.insertText": { params: InsertTextParams, result: InsertTextResult }, + "Input.imeSetComposition": { params: ImeSetCompositionParams, result: ImeSetCompositionResult }, + "Input.dispatchMouseEvent": { params: DispatchMouseEventParams, result: DispatchMouseEventResult }, + "Input.dispatchTouchEvent": { params: DispatchTouchEventParams, result: DispatchTouchEventResult }, + "Input.cancelDragging": { params: CancelDraggingParams, result: CancelDraggingResult }, + "Input.emulateTouchFromMouseEvent": { params: EmulateTouchFromMouseEventParams, result: EmulateTouchFromMouseEventResult }, + "Input.setIgnoreInputEvents": { params: SetIgnoreInputEventsParams, result: SetIgnoreInputEventsResult }, + "Input.setInterceptDrags": { params: SetInterceptDragsParams, result: SetInterceptDragsResult }, + "Input.synthesizePinchGesture": { params: SynthesizePinchGestureParams, result: SynthesizePinchGestureResult }, + "Input.synthesizeScrollGesture": { params: SynthesizeScrollGestureParams, result: SynthesizeScrollGestureResult }, + "Input.synthesizeTapGesture": { params: SynthesizeTapGestureParams, result: SynthesizeTapGestureResult }, +} as const; +export const events = { + "Input.dragIntercepted": DragInterceptedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Inspector.ts b/types/zod/Inspector.ts new file mode 100644 index 0000000..821520e --- /dev/null +++ b/types/zod/Inspector.ts @@ -0,0 +1,36 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Inspector.disable.params", "commandParams", { method: "Inspector.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Inspector.disable.result", "commandResult", { method: "Inspector.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Inspector.enable.params", "commandParams", { method: "Inspector.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Inspector.enable.result", "commandResult", { method: "Inspector.enable" }); +export const DetachedEvent = withCdpMeta(z.object({ "reason": z.string() }).passthrough(), "Inspector.detached", "event", { phase: "event" }); +export const TargetCrashedEvent = withCdpMeta(z.object({ }).passthrough(), "Inspector.targetCrashed", "event", { phase: "event" }); +export const TargetReloadedAfterCrashEvent = withCdpMeta(z.object({ }).passthrough(), "Inspector.targetReloadedAfterCrash", "event", { phase: "event" }); +export const WorkerScriptLoadedEvent = withCdpMeta(z.object({ }).passthrough(), "Inspector.workerScriptLoaded", "event", { phase: "event" }); + +export const zod = { + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + DetachedEvent: DetachedEvent, + TargetCrashedEvent: TargetCrashedEvent, + TargetReloadedAfterCrashEvent: TargetReloadedAfterCrashEvent, + WorkerScriptLoadedEvent: WorkerScriptLoadedEvent, +} as const; +export const commands = { + "Inspector.disable": { params: DisableParams, result: DisableResult }, + "Inspector.enable": { params: EnableParams, result: EnableResult }, +} as const; +export const events = { + "Inspector.detached": DetachedEvent, + "Inspector.targetCrashed": TargetCrashedEvent, + "Inspector.targetReloadedAfterCrash": TargetReloadedAfterCrashEvent, + "Inspector.workerScriptLoaded": WorkerScriptLoadedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/LayerTree.ts b/types/zod/LayerTree.ts new file mode 100644 index 0000000..4bd592c --- /dev/null +++ b/types/zod/LayerTree.ts @@ -0,0 +1,80 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; + +export const LayerId = withCdpMeta(z.string(), "LayerTree.LayerId", "type"); +export const SnapshotId = withCdpMeta(z.string(), "LayerTree.SnapshotId", "type"); +export const ScrollRect = withCdpMeta(z.object({ "rect": z.lazy(() => DOM.Rect), "type": z.enum(["RepaintsOnScroll", "TouchEventHandler", "WheelEventHandler"]) }).passthrough(), "LayerTree.ScrollRect", "type"); +export const StickyPositionConstraint = withCdpMeta(z.object({ "stickyBoxRect": z.lazy(() => DOM.Rect), "containingBlockRect": z.lazy(() => DOM.Rect), "nearestLayerShiftingStickyBox": z.lazy(() => LayerId).optional(), "nearestLayerShiftingContainingBlock": z.lazy(() => LayerId).optional() }).passthrough(), "LayerTree.StickyPositionConstraint", "type"); +export const PictureTile = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "picture": z.string() }).passthrough(), "LayerTree.PictureTile", "type"); +export const Layer = withCdpMeta(z.object({ "layerId": z.lazy(() => LayerId), "parentLayerId": z.lazy(() => LayerId).optional(), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "offsetX": z.number(), "offsetY": z.number(), "width": z.number(), "height": z.number(), "transform": z.array(z.number()).optional(), "anchorX": z.number().optional(), "anchorY": z.number().optional(), "anchorZ": z.number().optional(), "paintCount": z.number().int(), "drawsContent": z.boolean(), "invisible": z.boolean().optional(), "scrollRects": z.array(z.lazy(() => ScrollRect)).optional(), "stickyPositionConstraint": z.lazy(() => StickyPositionConstraint).optional() }).passthrough(), "LayerTree.Layer", "type"); +export const PaintProfile = withCdpMeta(z.array(z.number()), "LayerTree.PaintProfile", "type"); +export const CompositingReasonsParams = withCdpMeta(z.object({ "layerId": z.lazy(() => LayerId) }).passthrough(), "LayerTree.compositingReasons.params", "commandParams", { method: "LayerTree.compositingReasons" }); +export const CompositingReasonsResult = withCdpMeta(z.object({ "compositingReasons": z.array(z.string()), "compositingReasonIds": z.array(z.string()) }).passthrough(), "LayerTree.compositingReasons.result", "commandResult", { method: "LayerTree.compositingReasons" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "LayerTree.disable.params", "commandParams", { method: "LayerTree.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "LayerTree.disable.result", "commandResult", { method: "LayerTree.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "LayerTree.enable.params", "commandParams", { method: "LayerTree.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "LayerTree.enable.result", "commandResult", { method: "LayerTree.enable" }); +export const LoadSnapshotParams = withCdpMeta(z.object({ "tiles": z.array(z.lazy(() => PictureTile)) }).passthrough(), "LayerTree.loadSnapshot.params", "commandParams", { method: "LayerTree.loadSnapshot" }); +export const LoadSnapshotResult = withCdpMeta(z.object({ "snapshotId": z.lazy(() => SnapshotId) }).passthrough(), "LayerTree.loadSnapshot.result", "commandResult", { method: "LayerTree.loadSnapshot" }); +export const MakeSnapshotParams = withCdpMeta(z.object({ "layerId": z.lazy(() => LayerId) }).passthrough(), "LayerTree.makeSnapshot.params", "commandParams", { method: "LayerTree.makeSnapshot" }); +export const MakeSnapshotResult = withCdpMeta(z.object({ "snapshotId": z.lazy(() => SnapshotId) }).passthrough(), "LayerTree.makeSnapshot.result", "commandResult", { method: "LayerTree.makeSnapshot" }); +export const ProfileSnapshotParams = withCdpMeta(z.object({ "snapshotId": z.lazy(() => SnapshotId), "minRepeatCount": z.number().int().optional(), "minDuration": z.number().optional(), "clipRect": z.lazy(() => DOM.Rect).optional() }).passthrough(), "LayerTree.profileSnapshot.params", "commandParams", { method: "LayerTree.profileSnapshot" }); +export const ProfileSnapshotResult = withCdpMeta(z.object({ "timings": z.array(z.lazy(() => PaintProfile)) }).passthrough(), "LayerTree.profileSnapshot.result", "commandResult", { method: "LayerTree.profileSnapshot" }); +export const ReleaseSnapshotParams = withCdpMeta(z.object({ "snapshotId": z.lazy(() => SnapshotId) }).passthrough(), "LayerTree.releaseSnapshot.params", "commandParams", { method: "LayerTree.releaseSnapshot" }); +export const ReleaseSnapshotResult = withCdpMeta(z.object({ }).passthrough(), "LayerTree.releaseSnapshot.result", "commandResult", { method: "LayerTree.releaseSnapshot" }); +export const ReplaySnapshotParams = withCdpMeta(z.object({ "snapshotId": z.lazy(() => SnapshotId), "fromStep": z.number().int().optional(), "toStep": z.number().int().optional(), "scale": z.number().optional() }).passthrough(), "LayerTree.replaySnapshot.params", "commandParams", { method: "LayerTree.replaySnapshot" }); +export const ReplaySnapshotResult = withCdpMeta(z.object({ "dataURL": z.string() }).passthrough(), "LayerTree.replaySnapshot.result", "commandResult", { method: "LayerTree.replaySnapshot" }); +export const SnapshotCommandLogParams = withCdpMeta(z.object({ "snapshotId": z.lazy(() => SnapshotId) }).passthrough(), "LayerTree.snapshotCommandLog.params", "commandParams", { method: "LayerTree.snapshotCommandLog" }); +export const SnapshotCommandLogResult = withCdpMeta(z.object({ "commandLog": z.array(z.record(z.string(), z.unknown())) }).passthrough(), "LayerTree.snapshotCommandLog.result", "commandResult", { method: "LayerTree.snapshotCommandLog" }); +export const LayerPaintedEvent = withCdpMeta(z.object({ "layerId": z.lazy(() => LayerId), "clip": z.lazy(() => DOM.Rect) }).passthrough(), "LayerTree.layerPainted", "event", { phase: "event" }); +export const LayerTreeDidChangeEvent = withCdpMeta(z.object({ "layers": z.array(z.lazy(() => Layer)).optional() }).passthrough(), "LayerTree.layerTreeDidChange", "event", { phase: "event" }); + +export const zod = { + LayerId: LayerId, + SnapshotId: SnapshotId, + ScrollRect: ScrollRect, + StickyPositionConstraint: StickyPositionConstraint, + PictureTile: PictureTile, + Layer: Layer, + PaintProfile: PaintProfile, + CompositingReasonsParams: CompositingReasonsParams, + CompositingReasonsResult: CompositingReasonsResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + LoadSnapshotParams: LoadSnapshotParams, + LoadSnapshotResult: LoadSnapshotResult, + MakeSnapshotParams: MakeSnapshotParams, + MakeSnapshotResult: MakeSnapshotResult, + ProfileSnapshotParams: ProfileSnapshotParams, + ProfileSnapshotResult: ProfileSnapshotResult, + ReleaseSnapshotParams: ReleaseSnapshotParams, + ReleaseSnapshotResult: ReleaseSnapshotResult, + ReplaySnapshotParams: ReplaySnapshotParams, + ReplaySnapshotResult: ReplaySnapshotResult, + SnapshotCommandLogParams: SnapshotCommandLogParams, + SnapshotCommandLogResult: SnapshotCommandLogResult, + LayerPaintedEvent: LayerPaintedEvent, + LayerTreeDidChangeEvent: LayerTreeDidChangeEvent, +} as const; +export const commands = { + "LayerTree.compositingReasons": { params: CompositingReasonsParams, result: CompositingReasonsResult }, + "LayerTree.disable": { params: DisableParams, result: DisableResult }, + "LayerTree.enable": { params: EnableParams, result: EnableResult }, + "LayerTree.loadSnapshot": { params: LoadSnapshotParams, result: LoadSnapshotResult }, + "LayerTree.makeSnapshot": { params: MakeSnapshotParams, result: MakeSnapshotResult }, + "LayerTree.profileSnapshot": { params: ProfileSnapshotParams, result: ProfileSnapshotResult }, + "LayerTree.releaseSnapshot": { params: ReleaseSnapshotParams, result: ReleaseSnapshotResult }, + "LayerTree.replaySnapshot": { params: ReplaySnapshotParams, result: ReplaySnapshotResult }, + "LayerTree.snapshotCommandLog": { params: SnapshotCommandLogParams, result: SnapshotCommandLogResult }, +} as const; +export const events = { + "LayerTree.layerPainted": LayerPaintedEvent, + "LayerTree.layerTreeDidChange": LayerTreeDidChangeEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Log.ts b/types/zod/Log.ts new file mode 100644 index 0000000..e8131fe --- /dev/null +++ b/types/zod/Log.ts @@ -0,0 +1,48 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Network from "./Network.js"; +import * as Runtime from "./Runtime.js"; + +export const LogEntry = withCdpMeta(z.object({ "source": z.enum(["xml", "javascript", "network", "storage", "appcache", "rendering", "security", "deprecation", "worker", "violation", "intervention", "recommendation", "other"]), "level": z.enum(["verbose", "info", "warning", "error"]), "text": z.string(), "category": z.enum(["cors"]).optional(), "timestamp": z.lazy(() => Runtime.Timestamp), "url": z.string().optional(), "lineNumber": z.number().int().optional(), "stackTrace": z.lazy(() => Runtime.StackTrace).optional(), "networkRequestId": z.lazy(() => Network.RequestId).optional(), "workerId": z.string().optional(), "args": z.array(z.lazy(() => Runtime.RemoteObject)).optional() }).passthrough(), "Log.LogEntry", "type"); +export const ViolationSetting = withCdpMeta(z.object({ "name": z.enum(["longTask", "longLayout", "blockedEvent", "blockedParser", "discouragedAPIUse", "handler", "recurringHandler"]), "threshold": z.number() }).passthrough(), "Log.ViolationSetting", "type"); +export const ClearParams = withCdpMeta(z.object({ }).passthrough(), "Log.clear.params", "commandParams", { method: "Log.clear" }); +export const ClearResult = withCdpMeta(z.object({ }).passthrough(), "Log.clear.result", "commandResult", { method: "Log.clear" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Log.disable.params", "commandParams", { method: "Log.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Log.disable.result", "commandResult", { method: "Log.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Log.enable.params", "commandParams", { method: "Log.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Log.enable.result", "commandResult", { method: "Log.enable" }); +export const StartViolationsReportParams = withCdpMeta(z.object({ "config": z.array(z.lazy(() => ViolationSetting)) }).passthrough(), "Log.startViolationsReport.params", "commandParams", { method: "Log.startViolationsReport" }); +export const StartViolationsReportResult = withCdpMeta(z.object({ }).passthrough(), "Log.startViolationsReport.result", "commandResult", { method: "Log.startViolationsReport" }); +export const StopViolationsReportParams = withCdpMeta(z.object({ }).passthrough(), "Log.stopViolationsReport.params", "commandParams", { method: "Log.stopViolationsReport" }); +export const StopViolationsReportResult = withCdpMeta(z.object({ }).passthrough(), "Log.stopViolationsReport.result", "commandResult", { method: "Log.stopViolationsReport" }); +export const EntryAddedEvent = withCdpMeta(z.object({ "entry": z.lazy(() => LogEntry) }).passthrough(), "Log.entryAdded", "event", { phase: "event" }); + +export const zod = { + LogEntry: LogEntry, + ViolationSetting: ViolationSetting, + ClearParams: ClearParams, + ClearResult: ClearResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + StartViolationsReportParams: StartViolationsReportParams, + StartViolationsReportResult: StartViolationsReportResult, + StopViolationsReportParams: StopViolationsReportParams, + StopViolationsReportResult: StopViolationsReportResult, + EntryAddedEvent: EntryAddedEvent, +} as const; +export const commands = { + "Log.clear": { params: ClearParams, result: ClearResult }, + "Log.disable": { params: DisableParams, result: DisableResult }, + "Log.enable": { params: EnableParams, result: EnableResult }, + "Log.startViolationsReport": { params: StartViolationsReportParams, result: StartViolationsReportResult }, + "Log.stopViolationsReport": { params: StopViolationsReportParams, result: StopViolationsReportResult }, +} as const; +export const events = { + "Log.entryAdded": EntryAddedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Media.ts b/types/zod/Media.ts new file mode 100644 index 0000000..05841be --- /dev/null +++ b/types/zod/Media.ts @@ -0,0 +1,56 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; + +export const PlayerId = withCdpMeta(z.string(), "Media.PlayerId", "type"); +export const Timestamp = withCdpMeta(z.number(), "Media.Timestamp", "type"); +export const PlayerMessage = withCdpMeta(z.object({ "level": z.enum(["error", "warning", "info", "debug"]), "message": z.string() }).passthrough(), "Media.PlayerMessage", "type"); +export const PlayerProperty = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "Media.PlayerProperty", "type"); +export const PlayerEvent = withCdpMeta(z.object({ "timestamp": z.lazy(() => Timestamp), "value": z.string() }).passthrough(), "Media.PlayerEvent", "type"); +export const PlayerErrorSourceLocation = withCdpMeta(z.object({ "file": z.string(), "line": z.number().int() }).passthrough(), "Media.PlayerErrorSourceLocation", "type"); +export const PlayerError = withCdpMeta(z.object({ "errorType": z.string(), "code": z.number().int(), "stack": z.array(z.lazy(() => PlayerErrorSourceLocation)), "cause": z.array(z.lazy(() => PlayerError)), "data": z.record(z.string(), z.unknown()) }).passthrough(), "Media.PlayerError", "type"); +export const Player = withCdpMeta(z.object({ "playerId": z.lazy(() => PlayerId), "domNodeId": z.lazy(() => DOM.BackendNodeId).optional() }).passthrough(), "Media.Player", "type"); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Media.enable.params", "commandParams", { method: "Media.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Media.enable.result", "commandResult", { method: "Media.enable" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Media.disable.params", "commandParams", { method: "Media.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Media.disable.result", "commandResult", { method: "Media.disable" }); +export const PlayerPropertiesChangedEvent = withCdpMeta(z.object({ "playerId": z.lazy(() => PlayerId), "properties": z.array(z.lazy(() => PlayerProperty)) }).passthrough(), "Media.playerPropertiesChanged", "event", { phase: "event" }); +export const PlayerEventsAddedEvent = withCdpMeta(z.object({ "playerId": z.lazy(() => PlayerId), "events": z.array(z.lazy(() => PlayerEvent)) }).passthrough(), "Media.playerEventsAdded", "event", { phase: "event" }); +export const PlayerMessagesLoggedEvent = withCdpMeta(z.object({ "playerId": z.lazy(() => PlayerId), "messages": z.array(z.lazy(() => PlayerMessage)) }).passthrough(), "Media.playerMessagesLogged", "event", { phase: "event" }); +export const PlayerErrorsRaisedEvent = withCdpMeta(z.object({ "playerId": z.lazy(() => PlayerId), "errors": z.array(z.lazy(() => PlayerError)) }).passthrough(), "Media.playerErrorsRaised", "event", { phase: "event" }); +export const PlayerCreatedEvent = withCdpMeta(z.object({ "player": z.lazy(() => Player) }).passthrough(), "Media.playerCreated", "event", { phase: "event" }); + +export const zod = { + PlayerId: PlayerId, + Timestamp: Timestamp, + PlayerMessage: PlayerMessage, + PlayerProperty: PlayerProperty, + PlayerEvent: PlayerEvent, + PlayerErrorSourceLocation: PlayerErrorSourceLocation, + PlayerError: PlayerError, + Player: Player, + EnableParams: EnableParams, + EnableResult: EnableResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + PlayerPropertiesChangedEvent: PlayerPropertiesChangedEvent, + PlayerEventsAddedEvent: PlayerEventsAddedEvent, + PlayerMessagesLoggedEvent: PlayerMessagesLoggedEvent, + PlayerErrorsRaisedEvent: PlayerErrorsRaisedEvent, + PlayerCreatedEvent: PlayerCreatedEvent, +} as const; +export const commands = { + "Media.enable": { params: EnableParams, result: EnableResult }, + "Media.disable": { params: DisableParams, result: DisableResult }, +} as const; +export const events = { + "Media.playerPropertiesChanged": PlayerPropertiesChangedEvent, + "Media.playerEventsAdded": PlayerEventsAddedEvent, + "Media.playerMessagesLogged": PlayerMessagesLoggedEvent, + "Media.playerErrorsRaised": PlayerErrorsRaisedEvent, + "Media.playerCreated": PlayerCreatedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Memory.ts b/types/zod/Memory.ts new file mode 100644 index 0000000..8a7e097 --- /dev/null +++ b/types/zod/Memory.ts @@ -0,0 +1,79 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const PressureLevel = withCdpMeta(z.enum(["moderate", "critical"]), "Memory.PressureLevel", "type"); +export const SamplingProfileNode = withCdpMeta(z.object({ "size": z.number(), "total": z.number(), "stack": z.array(z.string()) }).passthrough(), "Memory.SamplingProfileNode", "type"); +export const SamplingProfile = withCdpMeta(z.object({ "samples": z.array(z.lazy(() => SamplingProfileNode)), "modules": z.array(z.lazy(() => Module)) }).passthrough(), "Memory.SamplingProfile", "type"); +export const Module = withCdpMeta(z.object({ "name": z.string(), "uuid": z.string(), "baseAddress": z.string(), "size": z.number() }).passthrough(), "Memory.Module", "type"); +export const DOMCounter = withCdpMeta(z.object({ "name": z.string(), "count": z.number().int() }).passthrough(), "Memory.DOMCounter", "type"); +export const GetDOMCountersParams = withCdpMeta(z.object({ }).passthrough(), "Memory.getDOMCounters.params", "commandParams", { method: "Memory.getDOMCounters" }); +export const GetDOMCountersResult = withCdpMeta(z.object({ "documents": z.number().int(), "nodes": z.number().int(), "jsEventListeners": z.number().int() }).passthrough(), "Memory.getDOMCounters.result", "commandResult", { method: "Memory.getDOMCounters" }); +export const GetDOMCountersForLeakDetectionParams = withCdpMeta(z.object({ }).passthrough(), "Memory.getDOMCountersForLeakDetection.params", "commandParams", { method: "Memory.getDOMCountersForLeakDetection" }); +export const GetDOMCountersForLeakDetectionResult = withCdpMeta(z.object({ "counters": z.array(z.lazy(() => DOMCounter)) }).passthrough(), "Memory.getDOMCountersForLeakDetection.result", "commandResult", { method: "Memory.getDOMCountersForLeakDetection" }); +export const PrepareForLeakDetectionParams = withCdpMeta(z.object({ }).passthrough(), "Memory.prepareForLeakDetection.params", "commandParams", { method: "Memory.prepareForLeakDetection" }); +export const PrepareForLeakDetectionResult = withCdpMeta(z.object({ }).passthrough(), "Memory.prepareForLeakDetection.result", "commandResult", { method: "Memory.prepareForLeakDetection" }); +export const ForciblyPurgeJavaScriptMemoryParams = withCdpMeta(z.object({ }).passthrough(), "Memory.forciblyPurgeJavaScriptMemory.params", "commandParams", { method: "Memory.forciblyPurgeJavaScriptMemory" }); +export const ForciblyPurgeJavaScriptMemoryResult = withCdpMeta(z.object({ }).passthrough(), "Memory.forciblyPurgeJavaScriptMemory.result", "commandResult", { method: "Memory.forciblyPurgeJavaScriptMemory" }); +export const SetPressureNotificationsSuppressedParams = withCdpMeta(z.object({ "suppressed": z.boolean() }).passthrough(), "Memory.setPressureNotificationsSuppressed.params", "commandParams", { method: "Memory.setPressureNotificationsSuppressed" }); +export const SetPressureNotificationsSuppressedResult = withCdpMeta(z.object({ }).passthrough(), "Memory.setPressureNotificationsSuppressed.result", "commandResult", { method: "Memory.setPressureNotificationsSuppressed" }); +export const SimulatePressureNotificationParams = withCdpMeta(z.object({ "level": z.lazy(() => PressureLevel) }).passthrough(), "Memory.simulatePressureNotification.params", "commandParams", { method: "Memory.simulatePressureNotification" }); +export const SimulatePressureNotificationResult = withCdpMeta(z.object({ }).passthrough(), "Memory.simulatePressureNotification.result", "commandResult", { method: "Memory.simulatePressureNotification" }); +export const StartSamplingParams = withCdpMeta(z.object({ "samplingInterval": z.number().int().optional(), "suppressRandomness": z.boolean().optional() }).passthrough(), "Memory.startSampling.params", "commandParams", { method: "Memory.startSampling" }); +export const StartSamplingResult = withCdpMeta(z.object({ }).passthrough(), "Memory.startSampling.result", "commandResult", { method: "Memory.startSampling" }); +export const StopSamplingParams = withCdpMeta(z.object({ }).passthrough(), "Memory.stopSampling.params", "commandParams", { method: "Memory.stopSampling" }); +export const StopSamplingResult = withCdpMeta(z.object({ }).passthrough(), "Memory.stopSampling.result", "commandResult", { method: "Memory.stopSampling" }); +export const GetAllTimeSamplingProfileParams = withCdpMeta(z.object({ }).passthrough(), "Memory.getAllTimeSamplingProfile.params", "commandParams", { method: "Memory.getAllTimeSamplingProfile" }); +export const GetAllTimeSamplingProfileResult = withCdpMeta(z.object({ "profile": z.lazy(() => SamplingProfile) }).passthrough(), "Memory.getAllTimeSamplingProfile.result", "commandResult", { method: "Memory.getAllTimeSamplingProfile" }); +export const GetBrowserSamplingProfileParams = withCdpMeta(z.object({ }).passthrough(), "Memory.getBrowserSamplingProfile.params", "commandParams", { method: "Memory.getBrowserSamplingProfile" }); +export const GetBrowserSamplingProfileResult = withCdpMeta(z.object({ "profile": z.lazy(() => SamplingProfile) }).passthrough(), "Memory.getBrowserSamplingProfile.result", "commandResult", { method: "Memory.getBrowserSamplingProfile" }); +export const GetSamplingProfileParams = withCdpMeta(z.object({ }).passthrough(), "Memory.getSamplingProfile.params", "commandParams", { method: "Memory.getSamplingProfile" }); +export const GetSamplingProfileResult = withCdpMeta(z.object({ "profile": z.lazy(() => SamplingProfile) }).passthrough(), "Memory.getSamplingProfile.result", "commandResult", { method: "Memory.getSamplingProfile" }); + +export const zod = { + PressureLevel: PressureLevel, + SamplingProfileNode: SamplingProfileNode, + SamplingProfile: SamplingProfile, + Module: Module, + DOMCounter: DOMCounter, + GetDOMCountersParams: GetDOMCountersParams, + GetDOMCountersResult: GetDOMCountersResult, + GetDOMCountersForLeakDetectionParams: GetDOMCountersForLeakDetectionParams, + GetDOMCountersForLeakDetectionResult: GetDOMCountersForLeakDetectionResult, + PrepareForLeakDetectionParams: PrepareForLeakDetectionParams, + PrepareForLeakDetectionResult: PrepareForLeakDetectionResult, + ForciblyPurgeJavaScriptMemoryParams: ForciblyPurgeJavaScriptMemoryParams, + ForciblyPurgeJavaScriptMemoryResult: ForciblyPurgeJavaScriptMemoryResult, + SetPressureNotificationsSuppressedParams: SetPressureNotificationsSuppressedParams, + SetPressureNotificationsSuppressedResult: SetPressureNotificationsSuppressedResult, + SimulatePressureNotificationParams: SimulatePressureNotificationParams, + SimulatePressureNotificationResult: SimulatePressureNotificationResult, + StartSamplingParams: StartSamplingParams, + StartSamplingResult: StartSamplingResult, + StopSamplingParams: StopSamplingParams, + StopSamplingResult: StopSamplingResult, + GetAllTimeSamplingProfileParams: GetAllTimeSamplingProfileParams, + GetAllTimeSamplingProfileResult: GetAllTimeSamplingProfileResult, + GetBrowserSamplingProfileParams: GetBrowserSamplingProfileParams, + GetBrowserSamplingProfileResult: GetBrowserSamplingProfileResult, + GetSamplingProfileParams: GetSamplingProfileParams, + GetSamplingProfileResult: GetSamplingProfileResult, +} as const; +export const commands = { + "Memory.getDOMCounters": { params: GetDOMCountersParams, result: GetDOMCountersResult }, + "Memory.getDOMCountersForLeakDetection": { params: GetDOMCountersForLeakDetectionParams, result: GetDOMCountersForLeakDetectionResult }, + "Memory.prepareForLeakDetection": { params: PrepareForLeakDetectionParams, result: PrepareForLeakDetectionResult }, + "Memory.forciblyPurgeJavaScriptMemory": { params: ForciblyPurgeJavaScriptMemoryParams, result: ForciblyPurgeJavaScriptMemoryResult }, + "Memory.setPressureNotificationsSuppressed": { params: SetPressureNotificationsSuppressedParams, result: SetPressureNotificationsSuppressedResult }, + "Memory.simulatePressureNotification": { params: SimulatePressureNotificationParams, result: SimulatePressureNotificationResult }, + "Memory.startSampling": { params: StartSamplingParams, result: StartSamplingResult }, + "Memory.stopSampling": { params: StopSamplingParams, result: StopSamplingResult }, + "Memory.getAllTimeSamplingProfile": { params: GetAllTimeSamplingProfileParams, result: GetAllTimeSamplingProfileResult }, + "Memory.getBrowserSamplingProfile": { params: GetBrowserSamplingProfileParams, result: GetBrowserSamplingProfileResult }, + "Memory.getSamplingProfile": { params: GetSamplingProfileParams, result: GetSamplingProfileResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Network.ts b/types/zod/Network.ts new file mode 100644 index 0000000..249626a --- /dev/null +++ b/types/zod/Network.ts @@ -0,0 +1,543 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Debugger from "./Debugger.js"; +import * as Emulation from "./Emulation.js"; +import * as IO from "./IO.js"; +import * as Page from "./Page.js"; +import * as Runtime from "./Runtime.js"; +import * as Security from "./Security.js"; + +export const ResourceType = withCdpMeta(z.enum(["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "Fetch", "Prefetch", "EventSource", "WebSocket", "Manifest", "SignedExchange", "Ping", "CSPViolationReport", "Preflight", "FedCM", "Other"]), "Network.ResourceType", "type"); +export const LoaderId = withCdpMeta(z.string(), "Network.LoaderId", "type"); +export const RequestId = withCdpMeta(z.string(), "Network.RequestId", "type"); +export const InterceptionId = withCdpMeta(z.string(), "Network.InterceptionId", "type"); +export const ErrorReason = withCdpMeta(z.enum(["Failed", "Aborted", "TimedOut", "AccessDenied", "ConnectionClosed", "ConnectionReset", "ConnectionRefused", "ConnectionAborted", "ConnectionFailed", "NameNotResolved", "InternetDisconnected", "AddressUnreachable", "BlockedByClient", "BlockedByResponse"]), "Network.ErrorReason", "type"); +export const TimeSinceEpoch = withCdpMeta(z.number(), "Network.TimeSinceEpoch", "type"); +export const MonotonicTime = withCdpMeta(z.number(), "Network.MonotonicTime", "type"); +export const Headers = withCdpMeta(z.record(z.string(), z.unknown()), "Network.Headers", "type"); +export const ConnectionType = withCdpMeta(z.enum(["none", "cellular2g", "cellular3g", "cellular4g", "bluetooth", "ethernet", "wifi", "wimax", "other"]), "Network.ConnectionType", "type"); +export const CookieSameSite = withCdpMeta(z.enum(["Strict", "Lax", "None"]), "Network.CookieSameSite", "type"); +export const CookiePriority = withCdpMeta(z.enum(["Low", "Medium", "High"]), "Network.CookiePriority", "type"); +export const CookieSourceScheme = withCdpMeta(z.enum(["Unset", "NonSecure", "Secure"]), "Network.CookieSourceScheme", "type"); +export const ResourceTiming = withCdpMeta(z.object({ "requestTime": z.number(), "proxyStart": z.number(), "proxyEnd": z.number(), "dnsStart": z.number(), "dnsEnd": z.number(), "connectStart": z.number(), "connectEnd": z.number(), "sslStart": z.number(), "sslEnd": z.number(), "workerStart": z.number(), "workerReady": z.number(), "workerFetchStart": z.number(), "workerRespondWithSettled": z.number(), "workerRouterEvaluationStart": z.number().optional(), "workerCacheLookupStart": z.number().optional(), "sendStart": z.number(), "sendEnd": z.number(), "pushStart": z.number(), "pushEnd": z.number(), "receiveHeadersStart": z.number(), "receiveHeadersEnd": z.number() }).passthrough(), "Network.ResourceTiming", "type"); +export const ResourcePriority = withCdpMeta(z.enum(["VeryLow", "Low", "Medium", "High", "VeryHigh"]), "Network.ResourcePriority", "type"); +export const RenderBlockingBehavior = withCdpMeta(z.enum(["Blocking", "InBodyParserBlocking", "NonBlocking", "NonBlockingDynamic", "PotentiallyBlocking"]), "Network.RenderBlockingBehavior", "type"); +export const PostDataEntry = withCdpMeta(z.object({ "bytes": z.string().optional() }).passthrough(), "Network.PostDataEntry", "type"); +export const Request = withCdpMeta(z.object({ "url": z.string(), "urlFragment": z.string().optional(), "method": z.string(), "headers": z.lazy(() => Headers), "postData": z.string().optional(), "hasPostData": z.boolean().optional(), "postDataEntries": z.array(z.lazy(() => PostDataEntry)).optional(), "mixedContentType": z.lazy(() => Security.MixedContentType).optional(), "initialPriority": z.lazy(() => ResourcePriority), "referrerPolicy": z.enum(["unsafe-url", "no-referrer-when-downgrade", "no-referrer", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin"]), "isLinkPreload": z.boolean().optional(), "trustTokenParams": z.lazy(() => TrustTokenParams).optional(), "isSameSite": z.boolean().optional(), "isAdRelated": z.boolean().optional() }).passthrough(), "Network.Request", "type"); +export const SignedCertificateTimestamp = withCdpMeta(z.object({ "status": z.string(), "origin": z.string(), "logDescription": z.string(), "logId": z.string(), "timestamp": z.number(), "hashAlgorithm": z.string(), "signatureAlgorithm": z.string(), "signatureData": z.string() }).passthrough(), "Network.SignedCertificateTimestamp", "type"); +export const SecurityDetails = withCdpMeta(z.object({ "protocol": z.string(), "keyExchange": z.string(), "keyExchangeGroup": z.string().optional(), "cipher": z.string(), "mac": z.string().optional(), "certificateId": z.lazy(() => Security.CertificateId), "subjectName": z.string(), "sanList": z.array(z.string()), "issuer": z.string(), "validFrom": z.lazy(() => TimeSinceEpoch), "validTo": z.lazy(() => TimeSinceEpoch), "signedCertificateTimestampList": z.array(z.lazy(() => SignedCertificateTimestamp)), "certificateTransparencyCompliance": z.lazy(() => CertificateTransparencyCompliance), "serverSignatureAlgorithm": z.number().int().optional(), "encryptedClientHello": z.boolean() }).passthrough(), "Network.SecurityDetails", "type"); +export const CertificateTransparencyCompliance = withCdpMeta(z.enum(["unknown", "not-compliant", "compliant"]), "Network.CertificateTransparencyCompliance", "type"); +export const BlockedReason = withCdpMeta(z.enum(["other", "csp", "mixed-content", "origin", "inspector", "integrity", "subresource-filter", "content-type", "coep-frame-resource-needs-coep-header", "coop-sandboxed-iframe-cannot-navigate-to-coop-page", "corp-not-same-origin", "corp-not-same-origin-after-defaulted-to-same-origin-by-coep", "corp-not-same-origin-after-defaulted-to-same-origin-by-dip", "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip", "corp-not-same-site", "sri-message-signature-mismatch"]), "Network.BlockedReason", "type"); +export const CorsError = withCdpMeta(z.enum(["DisallowedByMode", "InvalidResponse", "WildcardOriginNotAllowed", "MissingAllowOriginHeader", "MultipleAllowOriginValues", "InvalidAllowOriginValue", "AllowOriginMismatch", "InvalidAllowCredentials", "CorsDisabledScheme", "PreflightInvalidStatus", "PreflightDisallowedRedirect", "PreflightWildcardOriginNotAllowed", "PreflightMissingAllowOriginHeader", "PreflightMultipleAllowOriginValues", "PreflightInvalidAllowOriginValue", "PreflightAllowOriginMismatch", "PreflightInvalidAllowCredentials", "PreflightMissingAllowExternal", "PreflightInvalidAllowExternal", "InvalidAllowMethodsPreflightResponse", "InvalidAllowHeadersPreflightResponse", "MethodDisallowedByPreflightResponse", "HeaderDisallowedByPreflightResponse", "RedirectContainsCredentials", "InsecureLocalNetwork", "InvalidLocalNetworkAccess", "NoCorsRedirectModeNotFollow", "LocalNetworkAccessPermissionDenied"]), "Network.CorsError", "type"); +export const CorsErrorStatus = withCdpMeta(z.object({ "corsError": z.lazy(() => CorsError), "failedParameter": z.string() }).passthrough(), "Network.CorsErrorStatus", "type"); +export const ServiceWorkerResponseSource = withCdpMeta(z.enum(["cache-storage", "http-cache", "fallback-code", "network"]), "Network.ServiceWorkerResponseSource", "type"); +export const TrustTokenParams = withCdpMeta(z.object({ "operation": z.lazy(() => TrustTokenOperationType), "refreshPolicy": z.enum(["UseCached", "Refresh"]), "issuers": z.array(z.string()).optional() }).passthrough(), "Network.TrustTokenParams", "type"); +export const TrustTokenOperationType = withCdpMeta(z.enum(["Issuance", "Redemption", "Signing"]), "Network.TrustTokenOperationType", "type"); +export const AlternateProtocolUsage = withCdpMeta(z.enum(["alternativeJobWonWithoutRace", "alternativeJobWonRace", "mainJobWonRace", "mappingMissing", "broken", "dnsAlpnH3JobWonWithoutRace", "dnsAlpnH3JobWonRace", "unspecifiedReason"]), "Network.AlternateProtocolUsage", "type"); +export const ServiceWorkerRouterSource = withCdpMeta(z.enum(["network", "cache", "fetch-event", "race-network-and-fetch-handler", "race-network-and-cache"]), "Network.ServiceWorkerRouterSource", "type"); +export const ServiceWorkerRouterInfo = withCdpMeta(z.object({ "ruleIdMatched": z.number().int().optional(), "matchedSourceType": z.lazy(() => ServiceWorkerRouterSource).optional(), "actualSourceType": z.lazy(() => ServiceWorkerRouterSource).optional() }).passthrough(), "Network.ServiceWorkerRouterInfo", "type"); +export const Response = withCdpMeta(z.object({ "url": z.string(), "status": z.number().int(), "statusText": z.string(), "headers": z.lazy(() => Headers), "headersText": z.string().optional(), "mimeType": z.string(), "charset": z.string(), "requestHeaders": z.lazy(() => Headers).optional(), "requestHeadersText": z.string().optional(), "connectionReused": z.boolean(), "connectionId": z.number(), "remoteIPAddress": z.string().optional(), "remotePort": z.number().int().optional(), "fromDiskCache": z.boolean().optional(), "fromServiceWorker": z.boolean().optional(), "fromPrefetchCache": z.boolean().optional(), "fromEarlyHints": z.boolean().optional(), "serviceWorkerRouterInfo": z.lazy(() => ServiceWorkerRouterInfo).optional(), "encodedDataLength": z.number(), "timing": z.lazy(() => ResourceTiming).optional(), "serviceWorkerResponseSource": z.lazy(() => ServiceWorkerResponseSource).optional(), "responseTime": z.lazy(() => TimeSinceEpoch).optional(), "cacheStorageCacheName": z.string().optional(), "protocol": z.string().optional(), "alternateProtocolUsage": z.lazy(() => AlternateProtocolUsage).optional(), "securityState": z.lazy(() => Security.SecurityState), "securityDetails": z.lazy(() => SecurityDetails).optional() }).passthrough(), "Network.Response", "type"); +export const WebSocketRequest = withCdpMeta(z.object({ "headers": z.lazy(() => Headers) }).passthrough(), "Network.WebSocketRequest", "type"); +export const WebSocketResponse = withCdpMeta(z.object({ "status": z.number().int(), "statusText": z.string(), "headers": z.lazy(() => Headers), "headersText": z.string().optional(), "requestHeaders": z.lazy(() => Headers).optional(), "requestHeadersText": z.string().optional() }).passthrough(), "Network.WebSocketResponse", "type"); +export const WebSocketFrame = withCdpMeta(z.object({ "opcode": z.number(), "mask": z.boolean(), "payloadData": z.string() }).passthrough(), "Network.WebSocketFrame", "type"); +export const CachedResource = withCdpMeta(z.object({ "url": z.string(), "type": z.lazy(() => ResourceType), "response": z.lazy(() => Response).optional(), "bodySize": z.number() }).passthrough(), "Network.CachedResource", "type"); +export const Initiator = withCdpMeta(z.object({ "type": z.enum(["parser", "script", "preload", "SignedExchange", "preflight", "FedCM", "other"]), "stack": z.lazy(() => Runtime.StackTrace).optional(), "url": z.string().optional(), "lineNumber": z.number().optional(), "columnNumber": z.number().optional(), "requestId": z.lazy(() => RequestId).optional() }).passthrough(), "Network.Initiator", "type"); +export const CookiePartitionKey = withCdpMeta(z.object({ "topLevelSite": z.string(), "hasCrossSiteAncestor": z.boolean() }).passthrough(), "Network.CookiePartitionKey", "type"); +export const Cookie = withCdpMeta(z.object({ "name": z.string(), "value": z.string(), "domain": z.string(), "path": z.string(), "expires": z.number(), "size": z.number().int(), "httpOnly": z.boolean(), "secure": z.boolean(), "session": z.boolean(), "sameSite": z.lazy(() => CookieSameSite).optional(), "priority": z.lazy(() => CookiePriority), "sourceScheme": z.lazy(() => CookieSourceScheme), "sourcePort": z.number().int(), "partitionKey": z.lazy(() => CookiePartitionKey).optional(), "partitionKeyOpaque": z.boolean().optional() }).passthrough(), "Network.Cookie", "type"); +export const SetCookieBlockedReason = withCdpMeta(z.enum(["SecureOnly", "SameSiteStrict", "SameSiteLax", "SameSiteUnspecifiedTreatedAsLax", "SameSiteNoneInsecure", "UserPreferences", "ThirdPartyPhaseout", "ThirdPartyBlockedInFirstPartySet", "SyntaxError", "SchemeNotSupported", "OverwriteSecure", "InvalidDomain", "InvalidPrefix", "UnknownError", "SchemefulSameSiteStrict", "SchemefulSameSiteLax", "SchemefulSameSiteUnspecifiedTreatedAsLax", "NameValuePairExceedsMaxSize", "DisallowedCharacter", "NoCookieContent"]), "Network.SetCookieBlockedReason", "type"); +export const CookieBlockedReason = withCdpMeta(z.enum(["SecureOnly", "NotOnPath", "DomainMismatch", "SameSiteStrict", "SameSiteLax", "SameSiteUnspecifiedTreatedAsLax", "SameSiteNoneInsecure", "UserPreferences", "ThirdPartyPhaseout", "ThirdPartyBlockedInFirstPartySet", "UnknownError", "SchemefulSameSiteStrict", "SchemefulSameSiteLax", "SchemefulSameSiteUnspecifiedTreatedAsLax", "NameValuePairExceedsMaxSize", "PortMismatch", "SchemeMismatch", "AnonymousContext"]), "Network.CookieBlockedReason", "type"); +export const CookieExemptionReason = withCdpMeta(z.enum(["None", "UserSetting", "TPCDMetadata", "TPCDDeprecationTrial", "TopLevelTPCDDeprecationTrial", "TPCDHeuristics", "EnterprisePolicy", "StorageAccess", "TopLevelStorageAccess", "Scheme", "SameSiteNoneCookiesInSandbox"]), "Network.CookieExemptionReason", "type"); +export const BlockedSetCookieWithReason = withCdpMeta(z.object({ "blockedReasons": z.array(z.lazy(() => SetCookieBlockedReason)), "cookieLine": z.string(), "cookie": z.lazy(() => Cookie).optional() }).passthrough(), "Network.BlockedSetCookieWithReason", "type"); +export const ExemptedSetCookieWithReason = withCdpMeta(z.object({ "exemptionReason": z.lazy(() => CookieExemptionReason), "cookieLine": z.string(), "cookie": z.lazy(() => Cookie) }).passthrough(), "Network.ExemptedSetCookieWithReason", "type"); +export const AssociatedCookie = withCdpMeta(z.object({ "cookie": z.lazy(() => Cookie), "blockedReasons": z.array(z.lazy(() => CookieBlockedReason)), "exemptionReason": z.lazy(() => CookieExemptionReason).optional() }).passthrough(), "Network.AssociatedCookie", "type"); +export const CookieParam = withCdpMeta(z.object({ "name": z.string(), "value": z.string(), "url": z.string().optional(), "domain": z.string().optional(), "path": z.string().optional(), "secure": z.boolean().optional(), "httpOnly": z.boolean().optional(), "sameSite": z.lazy(() => CookieSameSite).optional(), "expires": z.lazy(() => TimeSinceEpoch).optional(), "priority": z.lazy(() => CookiePriority).optional(), "sourceScheme": z.lazy(() => CookieSourceScheme).optional(), "sourcePort": z.number().int().optional(), "partitionKey": z.lazy(() => CookiePartitionKey).optional() }).passthrough(), "Network.CookieParam", "type"); +export const AuthChallenge = withCdpMeta(z.object({ "source": z.enum(["Server", "Proxy"]).optional(), "origin": z.string(), "scheme": z.string(), "realm": z.string() }).passthrough(), "Network.AuthChallenge", "type"); +export const AuthChallengeResponse = withCdpMeta(z.object({ "response": z.enum(["Default", "CancelAuth", "ProvideCredentials"]), "username": z.string().optional(), "password": z.string().optional() }).passthrough(), "Network.AuthChallengeResponse", "type"); +export const InterceptionStage = withCdpMeta(z.enum(["Request", "HeadersReceived"]), "Network.InterceptionStage", "type"); +export const RequestPattern = withCdpMeta(z.object({ "urlPattern": z.string().optional(), "resourceType": z.lazy(() => ResourceType).optional(), "interceptionStage": z.lazy(() => InterceptionStage).optional() }).passthrough(), "Network.RequestPattern", "type"); +export const SignedExchangeSignature = withCdpMeta(z.object({ "label": z.string(), "signature": z.string(), "integrity": z.string(), "certUrl": z.string().optional(), "certSha256": z.string().optional(), "validityUrl": z.string(), "date": z.number().int(), "expires": z.number().int(), "certificates": z.array(z.string()).optional() }).passthrough(), "Network.SignedExchangeSignature", "type"); +export const SignedExchangeHeader = withCdpMeta(z.object({ "requestUrl": z.string(), "responseCode": z.number().int(), "responseHeaders": z.lazy(() => Headers), "signatures": z.array(z.lazy(() => SignedExchangeSignature)), "headerIntegrity": z.string() }).passthrough(), "Network.SignedExchangeHeader", "type"); +export const SignedExchangeErrorField = withCdpMeta(z.enum(["signatureSig", "signatureIntegrity", "signatureCertUrl", "signatureCertSha256", "signatureValidityUrl", "signatureTimestamps"]), "Network.SignedExchangeErrorField", "type"); +export const SignedExchangeError = withCdpMeta(z.object({ "message": z.string(), "signatureIndex": z.number().int().optional(), "errorField": z.lazy(() => SignedExchangeErrorField).optional() }).passthrough(), "Network.SignedExchangeError", "type"); +export const SignedExchangeInfo = withCdpMeta(z.object({ "outerResponse": z.lazy(() => Response), "hasExtraInfo": z.boolean(), "header": z.lazy(() => SignedExchangeHeader).optional(), "securityDetails": z.lazy(() => SecurityDetails).optional(), "errors": z.array(z.lazy(() => SignedExchangeError)).optional() }).passthrough(), "Network.SignedExchangeInfo", "type"); +export const ContentEncoding = withCdpMeta(z.enum(["deflate", "gzip", "br", "zstd"]), "Network.ContentEncoding", "type"); +export const NetworkConditions = withCdpMeta(z.object({ "urlPattern": z.string(), "latency": z.number(), "downloadThroughput": z.number(), "uploadThroughput": z.number(), "connectionType": z.lazy(() => ConnectionType).optional(), "packetLoss": z.number().optional(), "packetQueueLength": z.number().int().optional(), "packetReordering": z.boolean().optional(), "offline": z.boolean().optional() }).passthrough(), "Network.NetworkConditions", "type"); +export const BlockPattern = withCdpMeta(z.object({ "urlPattern": z.string(), "block": z.boolean() }).passthrough(), "Network.BlockPattern", "type"); +export const DirectSocketDnsQueryType = withCdpMeta(z.enum(["ipv4", "ipv6"]), "Network.DirectSocketDnsQueryType", "type"); +export const DirectTCPSocketOptions = withCdpMeta(z.object({ "noDelay": z.boolean(), "keepAliveDelay": z.number().optional(), "sendBufferSize": z.number().optional(), "receiveBufferSize": z.number().optional(), "dnsQueryType": z.lazy(() => DirectSocketDnsQueryType).optional() }).passthrough(), "Network.DirectTCPSocketOptions", "type"); +export const DirectUDPSocketOptions = withCdpMeta(z.object({ "remoteAddr": z.string().optional(), "remotePort": z.number().int().optional(), "localAddr": z.string().optional(), "localPort": z.number().int().optional(), "dnsQueryType": z.lazy(() => DirectSocketDnsQueryType).optional(), "sendBufferSize": z.number().optional(), "receiveBufferSize": z.number().optional(), "multicastLoopback": z.boolean().optional(), "multicastTimeToLive": z.number().int().optional(), "multicastAllowAddressSharing": z.boolean().optional() }).passthrough(), "Network.DirectUDPSocketOptions", "type"); +export const DirectUDPMessage = withCdpMeta(z.object({ "data": z.string(), "remoteAddr": z.string().optional(), "remotePort": z.number().int().optional() }).passthrough(), "Network.DirectUDPMessage", "type"); +export const LocalNetworkAccessRequestPolicy = withCdpMeta(z.enum(["Allow", "BlockFromInsecureToMorePrivate", "WarnFromInsecureToMorePrivate", "PermissionBlock", "PermissionWarn"]), "Network.LocalNetworkAccessRequestPolicy", "type"); +export const IPAddressSpace = withCdpMeta(z.enum(["Loopback", "Local", "Public", "Unknown"]), "Network.IPAddressSpace", "type"); +export const ConnectTiming = withCdpMeta(z.object({ "requestTime": z.number() }).passthrough(), "Network.ConnectTiming", "type"); +export const ClientSecurityState = withCdpMeta(z.object({ "initiatorIsSecureContext": z.boolean(), "initiatorIPAddressSpace": z.lazy(() => IPAddressSpace), "localNetworkAccessRequestPolicy": z.lazy(() => LocalNetworkAccessRequestPolicy) }).passthrough(), "Network.ClientSecurityState", "type"); +export const AdScriptIdentifier = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId), "debuggerId": z.lazy(() => Runtime.UniqueDebuggerId), "name": z.string() }).passthrough(), "Network.AdScriptIdentifier", "type"); +export const AdAncestry = withCdpMeta(z.object({ "ancestryChain": z.array(z.lazy(() => AdScriptIdentifier)), "rootScriptFilterlistRule": z.string().optional() }).passthrough(), "Network.AdAncestry", "type"); +export const AdProvenance = withCdpMeta(z.object({ "filterlistRule": z.string().optional(), "adScriptAncestry": z.lazy(() => AdAncestry).optional() }).passthrough(), "Network.AdProvenance", "type"); +export const CrossOriginOpenerPolicyValue = withCdpMeta(z.enum(["SameOrigin", "SameOriginAllowPopups", "RestrictProperties", "UnsafeNone", "SameOriginPlusCoep", "RestrictPropertiesPlusCoep", "NoopenerAllowPopups"]), "Network.CrossOriginOpenerPolicyValue", "type"); +export const CrossOriginOpenerPolicyStatus = withCdpMeta(z.object({ "value": z.lazy(() => CrossOriginOpenerPolicyValue), "reportOnlyValue": z.lazy(() => CrossOriginOpenerPolicyValue), "reportingEndpoint": z.string().optional(), "reportOnlyReportingEndpoint": z.string().optional() }).passthrough(), "Network.CrossOriginOpenerPolicyStatus", "type"); +export const CrossOriginEmbedderPolicyValue = withCdpMeta(z.enum(["None", "Credentialless", "RequireCorp"]), "Network.CrossOriginEmbedderPolicyValue", "type"); +export const CrossOriginEmbedderPolicyStatus = withCdpMeta(z.object({ "value": z.lazy(() => CrossOriginEmbedderPolicyValue), "reportOnlyValue": z.lazy(() => CrossOriginEmbedderPolicyValue), "reportingEndpoint": z.string().optional(), "reportOnlyReportingEndpoint": z.string().optional() }).passthrough(), "Network.CrossOriginEmbedderPolicyStatus", "type"); +export const ContentSecurityPolicySource = withCdpMeta(z.enum(["HTTP", "Meta"]), "Network.ContentSecurityPolicySource", "type"); +export const ContentSecurityPolicyStatus = withCdpMeta(z.object({ "effectiveDirectives": z.string(), "isEnforced": z.boolean(), "source": z.lazy(() => ContentSecurityPolicySource) }).passthrough(), "Network.ContentSecurityPolicyStatus", "type"); +export const SecurityIsolationStatus = withCdpMeta(z.object({ "coop": z.lazy(() => CrossOriginOpenerPolicyStatus).optional(), "coep": z.lazy(() => CrossOriginEmbedderPolicyStatus).optional(), "csp": z.array(z.lazy(() => ContentSecurityPolicyStatus)).optional() }).passthrough(), "Network.SecurityIsolationStatus", "type"); +export const ReportStatus = withCdpMeta(z.enum(["Queued", "Pending", "MarkedForRemoval", "Success"]), "Network.ReportStatus", "type"); +export const ReportId = withCdpMeta(z.string(), "Network.ReportId", "type"); +export const ReportingApiReport = withCdpMeta(z.object({ "id": z.lazy(() => ReportId), "initiatorUrl": z.string(), "destination": z.string(), "type": z.string(), "timestamp": z.lazy(() => TimeSinceEpoch), "depth": z.number().int(), "completedAttempts": z.number().int(), "body": z.record(z.string(), z.unknown()), "status": z.lazy(() => ReportStatus) }).passthrough(), "Network.ReportingApiReport", "type"); +export const ReportingApiEndpoint = withCdpMeta(z.object({ "url": z.string(), "groupName": z.string() }).passthrough(), "Network.ReportingApiEndpoint", "type"); +export const DeviceBoundSessionKey = withCdpMeta(z.object({ "site": z.string(), "id": z.string() }).passthrough(), "Network.DeviceBoundSessionKey", "type"); +export const DeviceBoundSessionWithUsage = withCdpMeta(z.object({ "sessionKey": z.lazy(() => DeviceBoundSessionKey), "usage": z.enum(["NotInScope", "InScopeRefreshNotYetNeeded", "InScopeRefreshNotAllowed", "ProactiveRefreshNotPossible", "ProactiveRefreshAttempted", "Deferred"]) }).passthrough(), "Network.DeviceBoundSessionWithUsage", "type"); +export const DeviceBoundSessionCookieCraving = withCdpMeta(z.object({ "name": z.string(), "domain": z.string(), "path": z.string(), "secure": z.boolean(), "httpOnly": z.boolean(), "sameSite": z.lazy(() => CookieSameSite).optional() }).passthrough(), "Network.DeviceBoundSessionCookieCraving", "type"); +export const DeviceBoundSessionUrlRule = withCdpMeta(z.object({ "ruleType": z.enum(["Exclude", "Include"]), "hostPattern": z.string(), "pathPrefix": z.string() }).passthrough(), "Network.DeviceBoundSessionUrlRule", "type"); +export const DeviceBoundSessionInclusionRules = withCdpMeta(z.object({ "origin": z.string(), "includeSite": z.boolean(), "urlRules": z.array(z.lazy(() => DeviceBoundSessionUrlRule)) }).passthrough(), "Network.DeviceBoundSessionInclusionRules", "type"); +export const DeviceBoundSession = withCdpMeta(z.object({ "key": z.lazy(() => DeviceBoundSessionKey), "refreshUrl": z.string(), "inclusionRules": z.lazy(() => DeviceBoundSessionInclusionRules), "cookieCravings": z.array(z.lazy(() => DeviceBoundSessionCookieCraving)), "expiryDate": z.lazy(() => TimeSinceEpoch), "cachedChallenge": z.string().optional(), "allowedRefreshInitiators": z.array(z.string()) }).passthrough(), "Network.DeviceBoundSession", "type"); +export const DeviceBoundSessionEventId = withCdpMeta(z.string(), "Network.DeviceBoundSessionEventId", "type"); +export const DeviceBoundSessionFetchResult = withCdpMeta(z.enum(["Success", "KeyError", "SigningError", "ServerRequestedTermination", "InvalidSessionId", "InvalidChallenge", "TooManyChallenges", "InvalidFetcherUrl", "InvalidRefreshUrl", "TransientHttpError", "ScopeOriginSameSiteMismatch", "RefreshUrlSameSiteMismatch", "MismatchedSessionId", "MissingScope", "NoCredentials", "SubdomainRegistrationWellKnownUnavailable", "SubdomainRegistrationUnauthorized", "SubdomainRegistrationWellKnownMalformed", "SessionProviderWellKnownUnavailable", "RelyingPartyWellKnownUnavailable", "FederatedKeyThumbprintMismatch", "InvalidFederatedSessionUrl", "InvalidFederatedKey", "TooManyRelyingOriginLabels", "BoundCookieSetForbidden", "NetError", "ProxyError", "EmptySessionConfig", "InvalidCredentialsConfig", "InvalidCredentialsType", "InvalidCredentialsEmptyName", "InvalidCredentialsCookie", "PersistentHttpError", "RegistrationAttemptedChallenge", "InvalidScopeOrigin", "ScopeOriginContainsPath", "RefreshInitiatorNotString", "RefreshInitiatorInvalidHostPattern", "InvalidScopeSpecification", "MissingScopeSpecificationType", "EmptyScopeSpecificationDomain", "EmptyScopeSpecificationPath", "InvalidScopeSpecificationType", "InvalidScopeIncludeSite", "MissingScopeIncludeSite", "FederatedNotAuthorizedByProvider", "FederatedNotAuthorizedByRelyingParty", "SessionProviderWellKnownMalformed", "SessionProviderWellKnownHasProviderOrigin", "RelyingPartyWellKnownMalformed", "RelyingPartyWellKnownHasRelyingOrigins", "InvalidFederatedSessionProviderSessionMissing", "InvalidFederatedSessionWrongProviderOrigin", "InvalidCredentialsCookieCreationTime", "InvalidCredentialsCookieName", "InvalidCredentialsCookieParsing", "InvalidCredentialsCookieUnpermittedAttribute", "InvalidCredentialsCookieInvalidDomain", "InvalidCredentialsCookiePrefix", "InvalidScopeRulePath", "InvalidScopeRuleHostPattern", "ScopeRuleOriginScopedHostPatternMismatch", "ScopeRuleSiteScopedHostPatternMismatch", "SigningQuotaExceeded", "InvalidConfigJson", "InvalidFederatedSessionProviderFailedToRestoreKey", "FailedToUnwrapKey", "SessionDeletedDuringRefresh"]), "Network.DeviceBoundSessionFetchResult", "type"); +export const DeviceBoundSessionFailedRequest = withCdpMeta(z.object({ "requestUrl": z.string(), "netError": z.string().optional(), "responseError": z.number().int().optional(), "responseErrorBody": z.string().optional() }).passthrough(), "Network.DeviceBoundSessionFailedRequest", "type"); +export const CreationEventDetails = withCdpMeta(z.object({ "fetchResult": z.lazy(() => DeviceBoundSessionFetchResult), "newSession": z.lazy(() => DeviceBoundSession).optional(), "failedRequest": z.lazy(() => DeviceBoundSessionFailedRequest).optional() }).passthrough(), "Network.CreationEventDetails", "type"); +export const RefreshEventDetails = withCdpMeta(z.object({ "refreshResult": z.enum(["Refreshed", "RefreshedAsWaiter", "InitializedService", "Unreachable", "ServerError", "RefreshQuotaExceeded", "FatalError", "SigningQuotaExceeded"]), "fetchResult": z.lazy(() => DeviceBoundSessionFetchResult).optional(), "newSession": z.lazy(() => DeviceBoundSession).optional(), "wasFullyProactiveRefresh": z.boolean(), "failedRequest": z.lazy(() => DeviceBoundSessionFailedRequest).optional() }).passthrough(), "Network.RefreshEventDetails", "type"); +export const TerminationEventDetails = withCdpMeta(z.object({ "deletionReason": z.enum(["Expired", "FailedToRestoreKey", "FailedToUnwrapKey", "StoragePartitionCleared", "ClearBrowsingData", "ServerRequested", "InvalidSessionParams", "RefreshFatalError", "DevTools"]) }).passthrough(), "Network.TerminationEventDetails", "type"); +export const ChallengeEventDetails = withCdpMeta(z.object({ "challengeResult": z.enum(["Success", "NoSessionId", "NoSessionMatch", "CantSetBoundCookie"]), "challenge": z.string() }).passthrough(), "Network.ChallengeEventDetails", "type"); +export const LoadNetworkResourcePageResult = withCdpMeta(z.object({ "success": z.boolean(), "netError": z.number().optional(), "netErrorName": z.string().optional(), "httpStatusCode": z.number().optional(), "stream": z.lazy(() => IO.StreamHandle).optional(), "headers": z.lazy(() => Headers).optional() }).passthrough(), "Network.LoadNetworkResourcePageResult", "type"); +export const LoadNetworkResourceOptions = withCdpMeta(z.object({ "disableCache": z.boolean(), "includeCredentials": z.boolean() }).passthrough(), "Network.LoadNetworkResourceOptions", "type"); +export const SetAcceptedEncodingsParams = withCdpMeta(z.object({ "encodings": z.array(z.lazy(() => ContentEncoding)) }).passthrough(), "Network.setAcceptedEncodings.params", "commandParams", { method: "Network.setAcceptedEncodings" }); +export const SetAcceptedEncodingsResult = withCdpMeta(z.object({ }).passthrough(), "Network.setAcceptedEncodings.result", "commandResult", { method: "Network.setAcceptedEncodings" }); +export const ClearAcceptedEncodingsOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Network.clearAcceptedEncodingsOverride.params", "commandParams", { method: "Network.clearAcceptedEncodingsOverride" }); +export const ClearAcceptedEncodingsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Network.clearAcceptedEncodingsOverride.result", "commandResult", { method: "Network.clearAcceptedEncodingsOverride" }); +export const CanClearBrowserCacheParams = withCdpMeta(z.object({ }).passthrough(), "Network.canClearBrowserCache.params", "commandParams", { method: "Network.canClearBrowserCache" }); +export const CanClearBrowserCacheResult = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Network.canClearBrowserCache.result", "commandResult", { method: "Network.canClearBrowserCache" }); +export const CanClearBrowserCookiesParams = withCdpMeta(z.object({ }).passthrough(), "Network.canClearBrowserCookies.params", "commandParams", { method: "Network.canClearBrowserCookies" }); +export const CanClearBrowserCookiesResult = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Network.canClearBrowserCookies.result", "commandResult", { method: "Network.canClearBrowserCookies" }); +export const CanEmulateNetworkConditionsParams = withCdpMeta(z.object({ }).passthrough(), "Network.canEmulateNetworkConditions.params", "commandParams", { method: "Network.canEmulateNetworkConditions" }); +export const CanEmulateNetworkConditionsResult = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Network.canEmulateNetworkConditions.result", "commandResult", { method: "Network.canEmulateNetworkConditions" }); +export const ClearBrowserCacheParams = withCdpMeta(z.object({ }).passthrough(), "Network.clearBrowserCache.params", "commandParams", { method: "Network.clearBrowserCache" }); +export const ClearBrowserCacheResult = withCdpMeta(z.object({ }).passthrough(), "Network.clearBrowserCache.result", "commandResult", { method: "Network.clearBrowserCache" }); +export const ClearBrowserCookiesParams = withCdpMeta(z.object({ }).passthrough(), "Network.clearBrowserCookies.params", "commandParams", { method: "Network.clearBrowserCookies" }); +export const ClearBrowserCookiesResult = withCdpMeta(z.object({ }).passthrough(), "Network.clearBrowserCookies.result", "commandResult", { method: "Network.clearBrowserCookies" }); +export const ContinueInterceptedRequestParams = withCdpMeta(z.object({ "interceptionId": z.lazy(() => InterceptionId), "errorReason": z.lazy(() => ErrorReason).optional(), "rawResponse": z.string().optional(), "url": z.string().optional(), "method": z.string().optional(), "postData": z.string().optional(), "headers": z.lazy(() => Headers).optional(), "authChallengeResponse": z.lazy(() => AuthChallengeResponse).optional() }).passthrough(), "Network.continueInterceptedRequest.params", "commandParams", { method: "Network.continueInterceptedRequest" }); +export const ContinueInterceptedRequestResult = withCdpMeta(z.object({ }).passthrough(), "Network.continueInterceptedRequest.result", "commandResult", { method: "Network.continueInterceptedRequest" }); +export const DeleteCookiesParams = withCdpMeta(z.object({ "name": z.string(), "url": z.string().optional(), "domain": z.string().optional(), "path": z.string().optional(), "partitionKey": z.lazy(() => CookiePartitionKey).optional() }).passthrough(), "Network.deleteCookies.params", "commandParams", { method: "Network.deleteCookies" }); +export const DeleteCookiesResult = withCdpMeta(z.object({ }).passthrough(), "Network.deleteCookies.result", "commandResult", { method: "Network.deleteCookies" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Network.disable.params", "commandParams", { method: "Network.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Network.disable.result", "commandResult", { method: "Network.disable" }); +export const EmulateNetworkConditionsParams = withCdpMeta(z.object({ "offline": z.boolean(), "latency": z.number(), "downloadThroughput": z.number(), "uploadThroughput": z.number(), "connectionType": z.lazy(() => ConnectionType).optional(), "packetLoss": z.number().optional(), "packetQueueLength": z.number().int().optional(), "packetReordering": z.boolean().optional() }).passthrough(), "Network.emulateNetworkConditions.params", "commandParams", { method: "Network.emulateNetworkConditions" }); +export const EmulateNetworkConditionsResult = withCdpMeta(z.object({ }).passthrough(), "Network.emulateNetworkConditions.result", "commandResult", { method: "Network.emulateNetworkConditions" }); +export const EmulateNetworkConditionsByRuleParams = withCdpMeta(z.object({ "offline": z.boolean().optional(), "emulateOfflineServiceWorker": z.boolean().optional(), "matchedNetworkConditions": z.array(z.lazy(() => NetworkConditions)) }).passthrough(), "Network.emulateNetworkConditionsByRule.params", "commandParams", { method: "Network.emulateNetworkConditionsByRule" }); +export const EmulateNetworkConditionsByRuleResult = withCdpMeta(z.object({ "ruleIds": z.array(z.string()) }).passthrough(), "Network.emulateNetworkConditionsByRule.result", "commandResult", { method: "Network.emulateNetworkConditionsByRule" }); +export const OverrideNetworkStateParams = withCdpMeta(z.object({ "offline": z.boolean(), "latency": z.number(), "downloadThroughput": z.number(), "uploadThroughput": z.number(), "connectionType": z.lazy(() => ConnectionType).optional() }).passthrough(), "Network.overrideNetworkState.params", "commandParams", { method: "Network.overrideNetworkState" }); +export const OverrideNetworkStateResult = withCdpMeta(z.object({ }).passthrough(), "Network.overrideNetworkState.result", "commandResult", { method: "Network.overrideNetworkState" }); +export const EnableParams = withCdpMeta(z.object({ "maxTotalBufferSize": z.number().int().optional(), "maxResourceBufferSize": z.number().int().optional(), "maxPostDataSize": z.number().int().optional(), "reportDirectSocketTraffic": z.boolean().optional(), "enableDurableMessages": z.boolean().optional() }).passthrough(), "Network.enable.params", "commandParams", { method: "Network.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Network.enable.result", "commandResult", { method: "Network.enable" }); +export const ConfigureDurableMessagesParams = withCdpMeta(z.object({ "maxTotalBufferSize": z.number().int().optional(), "maxResourceBufferSize": z.number().int().optional() }).passthrough(), "Network.configureDurableMessages.params", "commandParams", { method: "Network.configureDurableMessages" }); +export const ConfigureDurableMessagesResult = withCdpMeta(z.object({ }).passthrough(), "Network.configureDurableMessages.result", "commandResult", { method: "Network.configureDurableMessages" }); +export const GetAllCookiesParams = withCdpMeta(z.object({ }).passthrough(), "Network.getAllCookies.params", "commandParams", { method: "Network.getAllCookies" }); +export const GetAllCookiesResult = withCdpMeta(z.object({ "cookies": z.array(z.lazy(() => Cookie)) }).passthrough(), "Network.getAllCookies.result", "commandResult", { method: "Network.getAllCookies" }); +export const GetCertificateParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Network.getCertificate.params", "commandParams", { method: "Network.getCertificate" }); +export const GetCertificateResult = withCdpMeta(z.object({ "tableNames": z.array(z.string()) }).passthrough(), "Network.getCertificate.result", "commandResult", { method: "Network.getCertificate" }); +export const GetCookiesParams = withCdpMeta(z.object({ "urls": z.array(z.string()).optional() }).passthrough(), "Network.getCookies.params", "commandParams", { method: "Network.getCookies" }); +export const GetCookiesResult = withCdpMeta(z.object({ "cookies": z.array(z.lazy(() => Cookie)) }).passthrough(), "Network.getCookies.result", "commandResult", { method: "Network.getCookies" }); +export const GetResponseBodyParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId) }).passthrough(), "Network.getResponseBody.params", "commandParams", { method: "Network.getResponseBody" }); +export const GetResponseBodyResult = withCdpMeta(z.object({ "body": z.string(), "base64Encoded": z.boolean() }).passthrough(), "Network.getResponseBody.result", "commandResult", { method: "Network.getResponseBody" }); +export const GetRequestPostDataParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId) }).passthrough(), "Network.getRequestPostData.params", "commandParams", { method: "Network.getRequestPostData" }); +export const GetRequestPostDataResult = withCdpMeta(z.object({ "postData": z.string(), "base64Encoded": z.boolean() }).passthrough(), "Network.getRequestPostData.result", "commandResult", { method: "Network.getRequestPostData" }); +export const GetResponseBodyForInterceptionParams = withCdpMeta(z.object({ "interceptionId": z.lazy(() => InterceptionId) }).passthrough(), "Network.getResponseBodyForInterception.params", "commandParams", { method: "Network.getResponseBodyForInterception" }); +export const GetResponseBodyForInterceptionResult = withCdpMeta(z.object({ "body": z.string(), "base64Encoded": z.boolean() }).passthrough(), "Network.getResponseBodyForInterception.result", "commandResult", { method: "Network.getResponseBodyForInterception" }); +export const TakeResponseBodyForInterceptionAsStreamParams = withCdpMeta(z.object({ "interceptionId": z.lazy(() => InterceptionId) }).passthrough(), "Network.takeResponseBodyForInterceptionAsStream.params", "commandParams", { method: "Network.takeResponseBodyForInterceptionAsStream" }); +export const TakeResponseBodyForInterceptionAsStreamResult = withCdpMeta(z.object({ "stream": z.lazy(() => IO.StreamHandle) }).passthrough(), "Network.takeResponseBodyForInterceptionAsStream.result", "commandResult", { method: "Network.takeResponseBodyForInterceptionAsStream" }); +export const ReplayXHRParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId) }).passthrough(), "Network.replayXHR.params", "commandParams", { method: "Network.replayXHR" }); +export const ReplayXHRResult = withCdpMeta(z.object({ }).passthrough(), "Network.replayXHR.result", "commandResult", { method: "Network.replayXHR" }); +export const SearchInResponseBodyParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "query": z.string(), "caseSensitive": z.boolean().optional(), "isRegex": z.boolean().optional() }).passthrough(), "Network.searchInResponseBody.params", "commandParams", { method: "Network.searchInResponseBody" }); +export const SearchInResponseBodyResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => Debugger.SearchMatch)) }).passthrough(), "Network.searchInResponseBody.result", "commandResult", { method: "Network.searchInResponseBody" }); +export const SetBlockedURLsParams = withCdpMeta(z.object({ "urlPatterns": z.array(z.lazy(() => BlockPattern)).optional(), "urls": z.array(z.string()).optional() }).passthrough(), "Network.setBlockedURLs.params", "commandParams", { method: "Network.setBlockedURLs" }); +export const SetBlockedURLsResult = withCdpMeta(z.object({ }).passthrough(), "Network.setBlockedURLs.result", "commandResult", { method: "Network.setBlockedURLs" }); +export const SetBypassServiceWorkerParams = withCdpMeta(z.object({ "bypass": z.boolean() }).passthrough(), "Network.setBypassServiceWorker.params", "commandParams", { method: "Network.setBypassServiceWorker" }); +export const SetBypassServiceWorkerResult = withCdpMeta(z.object({ }).passthrough(), "Network.setBypassServiceWorker.result", "commandResult", { method: "Network.setBypassServiceWorker" }); +export const SetCacheDisabledParams = withCdpMeta(z.object({ "cacheDisabled": z.boolean() }).passthrough(), "Network.setCacheDisabled.params", "commandParams", { method: "Network.setCacheDisabled" }); +export const SetCacheDisabledResult = withCdpMeta(z.object({ }).passthrough(), "Network.setCacheDisabled.result", "commandResult", { method: "Network.setCacheDisabled" }); +export const SetCookieParams = withCdpMeta(z.object({ "name": z.string(), "value": z.string(), "url": z.string().optional(), "domain": z.string().optional(), "path": z.string().optional(), "secure": z.boolean().optional(), "httpOnly": z.boolean().optional(), "sameSite": z.lazy(() => CookieSameSite).optional(), "expires": z.lazy(() => TimeSinceEpoch).optional(), "priority": z.lazy(() => CookiePriority).optional(), "sourceScheme": z.lazy(() => CookieSourceScheme).optional(), "sourcePort": z.number().int().optional(), "partitionKey": z.lazy(() => CookiePartitionKey).optional() }).passthrough(), "Network.setCookie.params", "commandParams", { method: "Network.setCookie" }); +export const SetCookieResult = withCdpMeta(z.object({ "success": z.boolean() }).passthrough(), "Network.setCookie.result", "commandResult", { method: "Network.setCookie" }); +export const SetCookiesParams = withCdpMeta(z.object({ "cookies": z.array(z.lazy(() => CookieParam)) }).passthrough(), "Network.setCookies.params", "commandParams", { method: "Network.setCookies" }); +export const SetCookiesResult = withCdpMeta(z.object({ }).passthrough(), "Network.setCookies.result", "commandResult", { method: "Network.setCookies" }); +export const SetExtraHTTPHeadersParams = withCdpMeta(z.object({ "headers": z.lazy(() => Headers) }).passthrough(), "Network.setExtraHTTPHeaders.params", "commandParams", { method: "Network.setExtraHTTPHeaders" }); +export const SetExtraHTTPHeadersResult = withCdpMeta(z.object({ }).passthrough(), "Network.setExtraHTTPHeaders.result", "commandResult", { method: "Network.setExtraHTTPHeaders" }); +export const SetAttachDebugStackParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Network.setAttachDebugStack.params", "commandParams", { method: "Network.setAttachDebugStack" }); +export const SetAttachDebugStackResult = withCdpMeta(z.object({ }).passthrough(), "Network.setAttachDebugStack.result", "commandResult", { method: "Network.setAttachDebugStack" }); +export const SetRequestInterceptionParams = withCdpMeta(z.object({ "patterns": z.array(z.lazy(() => RequestPattern)) }).passthrough(), "Network.setRequestInterception.params", "commandParams", { method: "Network.setRequestInterception" }); +export const SetRequestInterceptionResult = withCdpMeta(z.object({ }).passthrough(), "Network.setRequestInterception.result", "commandResult", { method: "Network.setRequestInterception" }); +export const SetUserAgentOverrideParams = withCdpMeta(z.object({ "userAgent": z.string(), "acceptLanguage": z.string().optional(), "platform": z.string().optional(), "userAgentMetadata": z.lazy(() => Emulation.UserAgentMetadata).optional() }).passthrough(), "Network.setUserAgentOverride.params", "commandParams", { method: "Network.setUserAgentOverride" }); +export const SetUserAgentOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Network.setUserAgentOverride.result", "commandResult", { method: "Network.setUserAgentOverride" }); +export const StreamResourceContentParams = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId) }).passthrough(), "Network.streamResourceContent.params", "commandParams", { method: "Network.streamResourceContent" }); +export const StreamResourceContentResult = withCdpMeta(z.object({ "bufferedData": z.string() }).passthrough(), "Network.streamResourceContent.result", "commandResult", { method: "Network.streamResourceContent" }); +export const GetSecurityIsolationStatusParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId).optional() }).passthrough(), "Network.getSecurityIsolationStatus.params", "commandParams", { method: "Network.getSecurityIsolationStatus" }); +export const GetSecurityIsolationStatusResult = withCdpMeta(z.object({ "status": z.lazy(() => SecurityIsolationStatus) }).passthrough(), "Network.getSecurityIsolationStatus.result", "commandResult", { method: "Network.getSecurityIsolationStatus" }); +export const EnableReportingApiParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "Network.enableReportingApi.params", "commandParams", { method: "Network.enableReportingApi" }); +export const EnableReportingApiResult = withCdpMeta(z.object({ }).passthrough(), "Network.enableReportingApi.result", "commandResult", { method: "Network.enableReportingApi" }); +export const EnableDeviceBoundSessionsParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "Network.enableDeviceBoundSessions.params", "commandParams", { method: "Network.enableDeviceBoundSessions" }); +export const EnableDeviceBoundSessionsResult = withCdpMeta(z.object({ }).passthrough(), "Network.enableDeviceBoundSessions.result", "commandResult", { method: "Network.enableDeviceBoundSessions" }); +export const DeleteDeviceBoundSessionParams = withCdpMeta(z.object({ "key": z.lazy(() => DeviceBoundSessionKey) }).passthrough(), "Network.deleteDeviceBoundSession.params", "commandParams", { method: "Network.deleteDeviceBoundSession" }); +export const DeleteDeviceBoundSessionResult = withCdpMeta(z.object({ }).passthrough(), "Network.deleteDeviceBoundSession.result", "commandResult", { method: "Network.deleteDeviceBoundSession" }); +export const FetchSchemefulSiteParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Network.fetchSchemefulSite.params", "commandParams", { method: "Network.fetchSchemefulSite" }); +export const FetchSchemefulSiteResult = withCdpMeta(z.object({ "schemefulSite": z.string() }).passthrough(), "Network.fetchSchemefulSite.result", "commandResult", { method: "Network.fetchSchemefulSite" }); +export const LoadNetworkResourceParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId).optional(), "url": z.string(), "options": z.lazy(() => LoadNetworkResourceOptions) }).passthrough(), "Network.loadNetworkResource.params", "commandParams", { method: "Network.loadNetworkResource" }); +export const LoadNetworkResourceResult = withCdpMeta(z.object({ "resource": z.lazy(() => LoadNetworkResourcePageResult) }).passthrough(), "Network.loadNetworkResource.result", "commandResult", { method: "Network.loadNetworkResource" }); +export const SetCookieControlsParams = withCdpMeta(z.object({ "enableThirdPartyCookieRestriction": z.boolean() }).passthrough(), "Network.setCookieControls.params", "commandParams", { method: "Network.setCookieControls" }); +export const SetCookieControlsResult = withCdpMeta(z.object({ }).passthrough(), "Network.setCookieControls.result", "commandResult", { method: "Network.setCookieControls" }); +export const DataReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime), "dataLength": z.number().int(), "encodedDataLength": z.number().int(), "data": z.string().optional() }).passthrough(), "Network.dataReceived", "event", { phase: "event" }); +export const EventSourceMessageReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime), "eventName": z.string(), "eventId": z.string(), "data": z.string() }).passthrough(), "Network.eventSourceMessageReceived", "event", { phase: "event" }); +export const LoadingFailedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime), "type": z.lazy(() => ResourceType), "errorText": z.string(), "canceled": z.boolean().optional(), "blockedReason": z.lazy(() => BlockedReason).optional(), "corsErrorStatus": z.lazy(() => CorsErrorStatus).optional() }).passthrough(), "Network.loadingFailed", "event", { phase: "event" }); +export const LoadingFinishedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime), "encodedDataLength": z.number() }).passthrough(), "Network.loadingFinished", "event", { phase: "event" }); +export const RequestInterceptedEvent = withCdpMeta(z.object({ "interceptionId": z.lazy(() => InterceptionId), "request": z.lazy(() => Request), "frameId": z.lazy(() => Page.FrameId), "resourceType": z.lazy(() => ResourceType), "isNavigationRequest": z.boolean(), "isDownload": z.boolean().optional(), "redirectUrl": z.string().optional(), "authChallenge": z.lazy(() => AuthChallenge).optional(), "responseErrorReason": z.lazy(() => ErrorReason).optional(), "responseStatusCode": z.number().int().optional(), "responseHeaders": z.lazy(() => Headers).optional(), "requestId": z.lazy(() => RequestId).optional() }).passthrough(), "Network.requestIntercepted", "event", { phase: "event" }); +export const RequestServedFromCacheEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId) }).passthrough(), "Network.requestServedFromCache", "event", { phase: "event" }); +export const RequestWillBeSentEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "loaderId": z.lazy(() => LoaderId), "documentURL": z.string(), "request": z.lazy(() => Request), "timestamp": z.lazy(() => MonotonicTime), "wallTime": z.lazy(() => TimeSinceEpoch), "initiator": z.lazy(() => Initiator), "redirectHasExtraInfo": z.boolean(), "redirectResponse": z.lazy(() => Response).optional(), "type": z.lazy(() => ResourceType).optional(), "frameId": z.lazy(() => Page.FrameId).optional(), "hasUserGesture": z.boolean().optional(), "renderBlockingBehavior": z.lazy(() => RenderBlockingBehavior).optional() }).passthrough(), "Network.requestWillBeSent", "event", { phase: "event" }); +export const ResourceChangedPriorityEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "newPriority": z.lazy(() => ResourcePriority), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.resourceChangedPriority", "event", { phase: "event" }); +export const SignedExchangeReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "info": z.lazy(() => SignedExchangeInfo) }).passthrough(), "Network.signedExchangeReceived", "event", { phase: "event" }); +export const ResponseReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "loaderId": z.lazy(() => LoaderId), "timestamp": z.lazy(() => MonotonicTime), "type": z.lazy(() => ResourceType), "response": z.lazy(() => Response), "hasExtraInfo": z.boolean(), "frameId": z.lazy(() => Page.FrameId).optional() }).passthrough(), "Network.responseReceived", "event", { phase: "event" }); +export const WebSocketClosedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.webSocketClosed", "event", { phase: "event" }); +export const WebSocketCreatedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "url": z.string(), "initiator": z.lazy(() => Initiator).optional() }).passthrough(), "Network.webSocketCreated", "event", { phase: "event" }); +export const WebSocketFrameErrorEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime), "errorMessage": z.string() }).passthrough(), "Network.webSocketFrameError", "event", { phase: "event" }); +export const WebSocketFrameReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime), "response": z.lazy(() => WebSocketFrame) }).passthrough(), "Network.webSocketFrameReceived", "event", { phase: "event" }); +export const WebSocketFrameSentEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime), "response": z.lazy(() => WebSocketFrame) }).passthrough(), "Network.webSocketFrameSent", "event", { phase: "event" }); +export const WebSocketHandshakeResponseReceivedEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime), "response": z.lazy(() => WebSocketResponse) }).passthrough(), "Network.webSocketHandshakeResponseReceived", "event", { phase: "event" }); +export const WebSocketWillSendHandshakeRequestEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime), "wallTime": z.lazy(() => TimeSinceEpoch), "request": z.lazy(() => WebSocketRequest) }).passthrough(), "Network.webSocketWillSendHandshakeRequest", "event", { phase: "event" }); +export const WebTransportCreatedEvent = withCdpMeta(z.object({ "transportId": z.lazy(() => RequestId), "url": z.string(), "timestamp": z.lazy(() => MonotonicTime), "initiator": z.lazy(() => Initiator).optional() }).passthrough(), "Network.webTransportCreated", "event", { phase: "event" }); +export const WebTransportConnectionEstablishedEvent = withCdpMeta(z.object({ "transportId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.webTransportConnectionEstablished", "event", { phase: "event" }); +export const WebTransportClosedEvent = withCdpMeta(z.object({ "transportId": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.webTransportClosed", "event", { phase: "event" }); +export const DirectTCPSocketCreatedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "remoteAddr": z.string(), "remotePort": z.number().int(), "options": z.lazy(() => DirectTCPSocketOptions), "timestamp": z.lazy(() => MonotonicTime), "initiator": z.lazy(() => Initiator).optional() }).passthrough(), "Network.directTCPSocketCreated", "event", { phase: "event" }); +export const DirectTCPSocketOpenedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "remoteAddr": z.string(), "remotePort": z.number().int(), "timestamp": z.lazy(() => MonotonicTime), "localAddr": z.string().optional(), "localPort": z.number().int().optional() }).passthrough(), "Network.directTCPSocketOpened", "event", { phase: "event" }); +export const DirectTCPSocketAbortedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "errorMessage": z.string(), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.directTCPSocketAborted", "event", { phase: "event" }); +export const DirectTCPSocketClosedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.directTCPSocketClosed", "event", { phase: "event" }); +export const DirectTCPSocketChunkSentEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "data": z.string(), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.directTCPSocketChunkSent", "event", { phase: "event" }); +export const DirectTCPSocketChunkReceivedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "data": z.string(), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.directTCPSocketChunkReceived", "event", { phase: "event" }); +export const DirectUDPSocketJoinedMulticastGroupEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "IPAddress": z.string() }).passthrough(), "Network.directUDPSocketJoinedMulticastGroup", "event", { phase: "event" }); +export const DirectUDPSocketLeftMulticastGroupEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "IPAddress": z.string() }).passthrough(), "Network.directUDPSocketLeftMulticastGroup", "event", { phase: "event" }); +export const DirectUDPSocketCreatedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "options": z.lazy(() => DirectUDPSocketOptions), "timestamp": z.lazy(() => MonotonicTime), "initiator": z.lazy(() => Initiator).optional() }).passthrough(), "Network.directUDPSocketCreated", "event", { phase: "event" }); +export const DirectUDPSocketOpenedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "localAddr": z.string(), "localPort": z.number().int(), "timestamp": z.lazy(() => MonotonicTime), "remoteAddr": z.string().optional(), "remotePort": z.number().int().optional() }).passthrough(), "Network.directUDPSocketOpened", "event", { phase: "event" }); +export const DirectUDPSocketAbortedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "errorMessage": z.string(), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.directUDPSocketAborted", "event", { phase: "event" }); +export const DirectUDPSocketClosedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.directUDPSocketClosed", "event", { phase: "event" }); +export const DirectUDPSocketChunkSentEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "message": z.lazy(() => DirectUDPMessage), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.directUDPSocketChunkSent", "event", { phase: "event" }); +export const DirectUDPSocketChunkReceivedEvent = withCdpMeta(z.object({ "identifier": z.lazy(() => RequestId), "message": z.lazy(() => DirectUDPMessage), "timestamp": z.lazy(() => MonotonicTime) }).passthrough(), "Network.directUDPSocketChunkReceived", "event", { phase: "event" }); +export const RequestWillBeSentExtraInfoEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "associatedCookies": z.array(z.lazy(() => AssociatedCookie)), "headers": z.lazy(() => Headers), "connectTiming": z.lazy(() => ConnectTiming), "deviceBoundSessionUsages": z.array(z.lazy(() => DeviceBoundSessionWithUsage)).optional(), "clientSecurityState": z.lazy(() => ClientSecurityState).optional(), "siteHasCookieInOtherPartition": z.boolean().optional(), "appliedNetworkConditionsId": z.string().optional() }).passthrough(), "Network.requestWillBeSentExtraInfo", "event", { phase: "event" }); +export const ResponseReceivedExtraInfoEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "blockedCookies": z.array(z.lazy(() => BlockedSetCookieWithReason)), "headers": z.lazy(() => Headers), "resourceIPAddressSpace": z.lazy(() => IPAddressSpace), "statusCode": z.number().int(), "headersText": z.string().optional(), "cookiePartitionKey": z.lazy(() => CookiePartitionKey).optional(), "cookiePartitionKeyOpaque": z.boolean().optional(), "exemptedCookies": z.array(z.lazy(() => ExemptedSetCookieWithReason)).optional() }).passthrough(), "Network.responseReceivedExtraInfo", "event", { phase: "event" }); +export const ResponseReceivedEarlyHintsEvent = withCdpMeta(z.object({ "requestId": z.lazy(() => RequestId), "headers": z.lazy(() => Headers) }).passthrough(), "Network.responseReceivedEarlyHints", "event", { phase: "event" }); +export const TrustTokenOperationDoneEvent = withCdpMeta(z.object({ "status": z.enum(["Ok", "InvalidArgument", "MissingIssuerKeys", "FailedPrecondition", "ResourceExhausted", "AlreadyExists", "ResourceLimited", "Unauthorized", "BadResponse", "InternalError", "UnknownError", "FulfilledLocally", "SiteIssuerLimit"]), "type": z.lazy(() => TrustTokenOperationType), "requestId": z.lazy(() => RequestId), "topLevelOrigin": z.string().optional(), "issuerOrigin": z.string().optional(), "issuedTokenCount": z.number().int().optional() }).passthrough(), "Network.trustTokenOperationDone", "event", { phase: "event" }); +export const PolicyUpdatedEvent = withCdpMeta(z.object({ }).passthrough(), "Network.policyUpdated", "event", { phase: "event" }); +export const ReportingApiReportAddedEvent = withCdpMeta(z.object({ "report": z.lazy(() => ReportingApiReport) }).passthrough(), "Network.reportingApiReportAdded", "event", { phase: "event" }); +export const ReportingApiReportUpdatedEvent = withCdpMeta(z.object({ "report": z.lazy(() => ReportingApiReport) }).passthrough(), "Network.reportingApiReportUpdated", "event", { phase: "event" }); +export const ReportingApiEndpointsChangedForOriginEvent = withCdpMeta(z.object({ "origin": z.string(), "endpoints": z.array(z.lazy(() => ReportingApiEndpoint)) }).passthrough(), "Network.reportingApiEndpointsChangedForOrigin", "event", { phase: "event" }); +export const DeviceBoundSessionsAddedEvent = withCdpMeta(z.object({ "sessions": z.array(z.lazy(() => DeviceBoundSession)) }).passthrough(), "Network.deviceBoundSessionsAdded", "event", { phase: "event" }); +export const DeviceBoundSessionEventOccurredEvent = withCdpMeta(z.object({ "eventId": z.lazy(() => DeviceBoundSessionEventId), "site": z.string(), "succeeded": z.boolean(), "sessionId": z.string().optional(), "creationEventDetails": z.lazy(() => CreationEventDetails).optional(), "refreshEventDetails": z.lazy(() => RefreshEventDetails).optional(), "terminationEventDetails": z.lazy(() => TerminationEventDetails).optional(), "challengeEventDetails": z.lazy(() => ChallengeEventDetails).optional() }).passthrough(), "Network.deviceBoundSessionEventOccurred", "event", { phase: "event" }); + +export const zod = { + ResourceType: ResourceType, + LoaderId: LoaderId, + RequestId: RequestId, + InterceptionId: InterceptionId, + ErrorReason: ErrorReason, + TimeSinceEpoch: TimeSinceEpoch, + MonotonicTime: MonotonicTime, + Headers: Headers, + ConnectionType: ConnectionType, + CookieSameSite: CookieSameSite, + CookiePriority: CookiePriority, + CookieSourceScheme: CookieSourceScheme, + ResourceTiming: ResourceTiming, + ResourcePriority: ResourcePriority, + RenderBlockingBehavior: RenderBlockingBehavior, + PostDataEntry: PostDataEntry, + Request: Request, + SignedCertificateTimestamp: SignedCertificateTimestamp, + SecurityDetails: SecurityDetails, + CertificateTransparencyCompliance: CertificateTransparencyCompliance, + BlockedReason: BlockedReason, + CorsError: CorsError, + CorsErrorStatus: CorsErrorStatus, + ServiceWorkerResponseSource: ServiceWorkerResponseSource, + TrustTokenParams: TrustTokenParams, + TrustTokenOperationType: TrustTokenOperationType, + AlternateProtocolUsage: AlternateProtocolUsage, + ServiceWorkerRouterSource: ServiceWorkerRouterSource, + ServiceWorkerRouterInfo: ServiceWorkerRouterInfo, + Response: Response, + WebSocketRequest: WebSocketRequest, + WebSocketResponse: WebSocketResponse, + WebSocketFrame: WebSocketFrame, + CachedResource: CachedResource, + Initiator: Initiator, + CookiePartitionKey: CookiePartitionKey, + Cookie: Cookie, + SetCookieBlockedReason: SetCookieBlockedReason, + CookieBlockedReason: CookieBlockedReason, + CookieExemptionReason: CookieExemptionReason, + BlockedSetCookieWithReason: BlockedSetCookieWithReason, + ExemptedSetCookieWithReason: ExemptedSetCookieWithReason, + AssociatedCookie: AssociatedCookie, + CookieParam: CookieParam, + AuthChallenge: AuthChallenge, + AuthChallengeResponse: AuthChallengeResponse, + InterceptionStage: InterceptionStage, + RequestPattern: RequestPattern, + SignedExchangeSignature: SignedExchangeSignature, + SignedExchangeHeader: SignedExchangeHeader, + SignedExchangeErrorField: SignedExchangeErrorField, + SignedExchangeError: SignedExchangeError, + SignedExchangeInfo: SignedExchangeInfo, + ContentEncoding: ContentEncoding, + NetworkConditions: NetworkConditions, + BlockPattern: BlockPattern, + DirectSocketDnsQueryType: DirectSocketDnsQueryType, + DirectTCPSocketOptions: DirectTCPSocketOptions, + DirectUDPSocketOptions: DirectUDPSocketOptions, + DirectUDPMessage: DirectUDPMessage, + LocalNetworkAccessRequestPolicy: LocalNetworkAccessRequestPolicy, + IPAddressSpace: IPAddressSpace, + ConnectTiming: ConnectTiming, + ClientSecurityState: ClientSecurityState, + AdScriptIdentifier: AdScriptIdentifier, + AdAncestry: AdAncestry, + AdProvenance: AdProvenance, + CrossOriginOpenerPolicyValue: CrossOriginOpenerPolicyValue, + CrossOriginOpenerPolicyStatus: CrossOriginOpenerPolicyStatus, + CrossOriginEmbedderPolicyValue: CrossOriginEmbedderPolicyValue, + CrossOriginEmbedderPolicyStatus: CrossOriginEmbedderPolicyStatus, + ContentSecurityPolicySource: ContentSecurityPolicySource, + ContentSecurityPolicyStatus: ContentSecurityPolicyStatus, + SecurityIsolationStatus: SecurityIsolationStatus, + ReportStatus: ReportStatus, + ReportId: ReportId, + ReportingApiReport: ReportingApiReport, + ReportingApiEndpoint: ReportingApiEndpoint, + DeviceBoundSessionKey: DeviceBoundSessionKey, + DeviceBoundSessionWithUsage: DeviceBoundSessionWithUsage, + DeviceBoundSessionCookieCraving: DeviceBoundSessionCookieCraving, + DeviceBoundSessionUrlRule: DeviceBoundSessionUrlRule, + DeviceBoundSessionInclusionRules: DeviceBoundSessionInclusionRules, + DeviceBoundSession: DeviceBoundSession, + DeviceBoundSessionEventId: DeviceBoundSessionEventId, + DeviceBoundSessionFetchResult: DeviceBoundSessionFetchResult, + DeviceBoundSessionFailedRequest: DeviceBoundSessionFailedRequest, + CreationEventDetails: CreationEventDetails, + RefreshEventDetails: RefreshEventDetails, + TerminationEventDetails: TerminationEventDetails, + ChallengeEventDetails: ChallengeEventDetails, + LoadNetworkResourcePageResult: LoadNetworkResourcePageResult, + LoadNetworkResourceOptions: LoadNetworkResourceOptions, + SetAcceptedEncodingsParams: SetAcceptedEncodingsParams, + SetAcceptedEncodingsResult: SetAcceptedEncodingsResult, + ClearAcceptedEncodingsOverrideParams: ClearAcceptedEncodingsOverrideParams, + ClearAcceptedEncodingsOverrideResult: ClearAcceptedEncodingsOverrideResult, + CanClearBrowserCacheParams: CanClearBrowserCacheParams, + CanClearBrowserCacheResult: CanClearBrowserCacheResult, + CanClearBrowserCookiesParams: CanClearBrowserCookiesParams, + CanClearBrowserCookiesResult: CanClearBrowserCookiesResult, + CanEmulateNetworkConditionsParams: CanEmulateNetworkConditionsParams, + CanEmulateNetworkConditionsResult: CanEmulateNetworkConditionsResult, + ClearBrowserCacheParams: ClearBrowserCacheParams, + ClearBrowserCacheResult: ClearBrowserCacheResult, + ClearBrowserCookiesParams: ClearBrowserCookiesParams, + ClearBrowserCookiesResult: ClearBrowserCookiesResult, + ContinueInterceptedRequestParams: ContinueInterceptedRequestParams, + ContinueInterceptedRequestResult: ContinueInterceptedRequestResult, + DeleteCookiesParams: DeleteCookiesParams, + DeleteCookiesResult: DeleteCookiesResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EmulateNetworkConditionsParams: EmulateNetworkConditionsParams, + EmulateNetworkConditionsResult: EmulateNetworkConditionsResult, + EmulateNetworkConditionsByRuleParams: EmulateNetworkConditionsByRuleParams, + EmulateNetworkConditionsByRuleResult: EmulateNetworkConditionsByRuleResult, + OverrideNetworkStateParams: OverrideNetworkStateParams, + OverrideNetworkStateResult: OverrideNetworkStateResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + ConfigureDurableMessagesParams: ConfigureDurableMessagesParams, + ConfigureDurableMessagesResult: ConfigureDurableMessagesResult, + GetAllCookiesParams: GetAllCookiesParams, + GetAllCookiesResult: GetAllCookiesResult, + GetCertificateParams: GetCertificateParams, + GetCertificateResult: GetCertificateResult, + GetCookiesParams: GetCookiesParams, + GetCookiesResult: GetCookiesResult, + GetResponseBodyParams: GetResponseBodyParams, + GetResponseBodyResult: GetResponseBodyResult, + GetRequestPostDataParams: GetRequestPostDataParams, + GetRequestPostDataResult: GetRequestPostDataResult, + GetResponseBodyForInterceptionParams: GetResponseBodyForInterceptionParams, + GetResponseBodyForInterceptionResult: GetResponseBodyForInterceptionResult, + TakeResponseBodyForInterceptionAsStreamParams: TakeResponseBodyForInterceptionAsStreamParams, + TakeResponseBodyForInterceptionAsStreamResult: TakeResponseBodyForInterceptionAsStreamResult, + ReplayXHRParams: ReplayXHRParams, + ReplayXHRResult: ReplayXHRResult, + SearchInResponseBodyParams: SearchInResponseBodyParams, + SearchInResponseBodyResult: SearchInResponseBodyResult, + SetBlockedURLsParams: SetBlockedURLsParams, + SetBlockedURLsResult: SetBlockedURLsResult, + SetBypassServiceWorkerParams: SetBypassServiceWorkerParams, + SetBypassServiceWorkerResult: SetBypassServiceWorkerResult, + SetCacheDisabledParams: SetCacheDisabledParams, + SetCacheDisabledResult: SetCacheDisabledResult, + SetCookieParams: SetCookieParams, + SetCookieResult: SetCookieResult, + SetCookiesParams: SetCookiesParams, + SetCookiesResult: SetCookiesResult, + SetExtraHTTPHeadersParams: SetExtraHTTPHeadersParams, + SetExtraHTTPHeadersResult: SetExtraHTTPHeadersResult, + SetAttachDebugStackParams: SetAttachDebugStackParams, + SetAttachDebugStackResult: SetAttachDebugStackResult, + SetRequestInterceptionParams: SetRequestInterceptionParams, + SetRequestInterceptionResult: SetRequestInterceptionResult, + SetUserAgentOverrideParams: SetUserAgentOverrideParams, + SetUserAgentOverrideResult: SetUserAgentOverrideResult, + StreamResourceContentParams: StreamResourceContentParams, + StreamResourceContentResult: StreamResourceContentResult, + GetSecurityIsolationStatusParams: GetSecurityIsolationStatusParams, + GetSecurityIsolationStatusResult: GetSecurityIsolationStatusResult, + EnableReportingApiParams: EnableReportingApiParams, + EnableReportingApiResult: EnableReportingApiResult, + EnableDeviceBoundSessionsParams: EnableDeviceBoundSessionsParams, + EnableDeviceBoundSessionsResult: EnableDeviceBoundSessionsResult, + DeleteDeviceBoundSessionParams: DeleteDeviceBoundSessionParams, + DeleteDeviceBoundSessionResult: DeleteDeviceBoundSessionResult, + FetchSchemefulSiteParams: FetchSchemefulSiteParams, + FetchSchemefulSiteResult: FetchSchemefulSiteResult, + LoadNetworkResourceParams: LoadNetworkResourceParams, + LoadNetworkResourceResult: LoadNetworkResourceResult, + SetCookieControlsParams: SetCookieControlsParams, + SetCookieControlsResult: SetCookieControlsResult, + DataReceivedEvent: DataReceivedEvent, + EventSourceMessageReceivedEvent: EventSourceMessageReceivedEvent, + LoadingFailedEvent: LoadingFailedEvent, + LoadingFinishedEvent: LoadingFinishedEvent, + RequestInterceptedEvent: RequestInterceptedEvent, + RequestServedFromCacheEvent: RequestServedFromCacheEvent, + RequestWillBeSentEvent: RequestWillBeSentEvent, + ResourceChangedPriorityEvent: ResourceChangedPriorityEvent, + SignedExchangeReceivedEvent: SignedExchangeReceivedEvent, + ResponseReceivedEvent: ResponseReceivedEvent, + WebSocketClosedEvent: WebSocketClosedEvent, + WebSocketCreatedEvent: WebSocketCreatedEvent, + WebSocketFrameErrorEvent: WebSocketFrameErrorEvent, + WebSocketFrameReceivedEvent: WebSocketFrameReceivedEvent, + WebSocketFrameSentEvent: WebSocketFrameSentEvent, + WebSocketHandshakeResponseReceivedEvent: WebSocketHandshakeResponseReceivedEvent, + WebSocketWillSendHandshakeRequestEvent: WebSocketWillSendHandshakeRequestEvent, + WebTransportCreatedEvent: WebTransportCreatedEvent, + WebTransportConnectionEstablishedEvent: WebTransportConnectionEstablishedEvent, + WebTransportClosedEvent: WebTransportClosedEvent, + DirectTCPSocketCreatedEvent: DirectTCPSocketCreatedEvent, + DirectTCPSocketOpenedEvent: DirectTCPSocketOpenedEvent, + DirectTCPSocketAbortedEvent: DirectTCPSocketAbortedEvent, + DirectTCPSocketClosedEvent: DirectTCPSocketClosedEvent, + DirectTCPSocketChunkSentEvent: DirectTCPSocketChunkSentEvent, + DirectTCPSocketChunkReceivedEvent: DirectTCPSocketChunkReceivedEvent, + DirectUDPSocketJoinedMulticastGroupEvent: DirectUDPSocketJoinedMulticastGroupEvent, + DirectUDPSocketLeftMulticastGroupEvent: DirectUDPSocketLeftMulticastGroupEvent, + DirectUDPSocketCreatedEvent: DirectUDPSocketCreatedEvent, + DirectUDPSocketOpenedEvent: DirectUDPSocketOpenedEvent, + DirectUDPSocketAbortedEvent: DirectUDPSocketAbortedEvent, + DirectUDPSocketClosedEvent: DirectUDPSocketClosedEvent, + DirectUDPSocketChunkSentEvent: DirectUDPSocketChunkSentEvent, + DirectUDPSocketChunkReceivedEvent: DirectUDPSocketChunkReceivedEvent, + RequestWillBeSentExtraInfoEvent: RequestWillBeSentExtraInfoEvent, + ResponseReceivedExtraInfoEvent: ResponseReceivedExtraInfoEvent, + ResponseReceivedEarlyHintsEvent: ResponseReceivedEarlyHintsEvent, + TrustTokenOperationDoneEvent: TrustTokenOperationDoneEvent, + PolicyUpdatedEvent: PolicyUpdatedEvent, + ReportingApiReportAddedEvent: ReportingApiReportAddedEvent, + ReportingApiReportUpdatedEvent: ReportingApiReportUpdatedEvent, + ReportingApiEndpointsChangedForOriginEvent: ReportingApiEndpointsChangedForOriginEvent, + DeviceBoundSessionsAddedEvent: DeviceBoundSessionsAddedEvent, + DeviceBoundSessionEventOccurredEvent: DeviceBoundSessionEventOccurredEvent, +} as const; +export const commands = { + "Network.setAcceptedEncodings": { params: SetAcceptedEncodingsParams, result: SetAcceptedEncodingsResult }, + "Network.clearAcceptedEncodingsOverride": { params: ClearAcceptedEncodingsOverrideParams, result: ClearAcceptedEncodingsOverrideResult }, + "Network.canClearBrowserCache": { params: CanClearBrowserCacheParams, result: CanClearBrowserCacheResult }, + "Network.canClearBrowserCookies": { params: CanClearBrowserCookiesParams, result: CanClearBrowserCookiesResult }, + "Network.canEmulateNetworkConditions": { params: CanEmulateNetworkConditionsParams, result: CanEmulateNetworkConditionsResult }, + "Network.clearBrowserCache": { params: ClearBrowserCacheParams, result: ClearBrowserCacheResult }, + "Network.clearBrowserCookies": { params: ClearBrowserCookiesParams, result: ClearBrowserCookiesResult }, + "Network.continueInterceptedRequest": { params: ContinueInterceptedRequestParams, result: ContinueInterceptedRequestResult }, + "Network.deleteCookies": { params: DeleteCookiesParams, result: DeleteCookiesResult }, + "Network.disable": { params: DisableParams, result: DisableResult }, + "Network.emulateNetworkConditions": { params: EmulateNetworkConditionsParams, result: EmulateNetworkConditionsResult }, + "Network.emulateNetworkConditionsByRule": { params: EmulateNetworkConditionsByRuleParams, result: EmulateNetworkConditionsByRuleResult }, + "Network.overrideNetworkState": { params: OverrideNetworkStateParams, result: OverrideNetworkStateResult }, + "Network.enable": { params: EnableParams, result: EnableResult }, + "Network.configureDurableMessages": { params: ConfigureDurableMessagesParams, result: ConfigureDurableMessagesResult }, + "Network.getAllCookies": { params: GetAllCookiesParams, result: GetAllCookiesResult }, + "Network.getCertificate": { params: GetCertificateParams, result: GetCertificateResult }, + "Network.getCookies": { params: GetCookiesParams, result: GetCookiesResult }, + "Network.getResponseBody": { params: GetResponseBodyParams, result: GetResponseBodyResult }, + "Network.getRequestPostData": { params: GetRequestPostDataParams, result: GetRequestPostDataResult }, + "Network.getResponseBodyForInterception": { params: GetResponseBodyForInterceptionParams, result: GetResponseBodyForInterceptionResult }, + "Network.takeResponseBodyForInterceptionAsStream": { params: TakeResponseBodyForInterceptionAsStreamParams, result: TakeResponseBodyForInterceptionAsStreamResult }, + "Network.replayXHR": { params: ReplayXHRParams, result: ReplayXHRResult }, + "Network.searchInResponseBody": { params: SearchInResponseBodyParams, result: SearchInResponseBodyResult }, + "Network.setBlockedURLs": { params: SetBlockedURLsParams, result: SetBlockedURLsResult }, + "Network.setBypassServiceWorker": { params: SetBypassServiceWorkerParams, result: SetBypassServiceWorkerResult }, + "Network.setCacheDisabled": { params: SetCacheDisabledParams, result: SetCacheDisabledResult }, + "Network.setCookie": { params: SetCookieParams, result: SetCookieResult }, + "Network.setCookies": { params: SetCookiesParams, result: SetCookiesResult }, + "Network.setExtraHTTPHeaders": { params: SetExtraHTTPHeadersParams, result: SetExtraHTTPHeadersResult }, + "Network.setAttachDebugStack": { params: SetAttachDebugStackParams, result: SetAttachDebugStackResult }, + "Network.setRequestInterception": { params: SetRequestInterceptionParams, result: SetRequestInterceptionResult }, + "Network.setUserAgentOverride": { params: SetUserAgentOverrideParams, result: SetUserAgentOverrideResult }, + "Network.streamResourceContent": { params: StreamResourceContentParams, result: StreamResourceContentResult }, + "Network.getSecurityIsolationStatus": { params: GetSecurityIsolationStatusParams, result: GetSecurityIsolationStatusResult }, + "Network.enableReportingApi": { params: EnableReportingApiParams, result: EnableReportingApiResult }, + "Network.enableDeviceBoundSessions": { params: EnableDeviceBoundSessionsParams, result: EnableDeviceBoundSessionsResult }, + "Network.deleteDeviceBoundSession": { params: DeleteDeviceBoundSessionParams, result: DeleteDeviceBoundSessionResult }, + "Network.fetchSchemefulSite": { params: FetchSchemefulSiteParams, result: FetchSchemefulSiteResult }, + "Network.loadNetworkResource": { params: LoadNetworkResourceParams, result: LoadNetworkResourceResult }, + "Network.setCookieControls": { params: SetCookieControlsParams, result: SetCookieControlsResult }, +} as const; +export const events = { + "Network.dataReceived": DataReceivedEvent, + "Network.eventSourceMessageReceived": EventSourceMessageReceivedEvent, + "Network.loadingFailed": LoadingFailedEvent, + "Network.loadingFinished": LoadingFinishedEvent, + "Network.requestIntercepted": RequestInterceptedEvent, + "Network.requestServedFromCache": RequestServedFromCacheEvent, + "Network.requestWillBeSent": RequestWillBeSentEvent, + "Network.resourceChangedPriority": ResourceChangedPriorityEvent, + "Network.signedExchangeReceived": SignedExchangeReceivedEvent, + "Network.responseReceived": ResponseReceivedEvent, + "Network.webSocketClosed": WebSocketClosedEvent, + "Network.webSocketCreated": WebSocketCreatedEvent, + "Network.webSocketFrameError": WebSocketFrameErrorEvent, + "Network.webSocketFrameReceived": WebSocketFrameReceivedEvent, + "Network.webSocketFrameSent": WebSocketFrameSentEvent, + "Network.webSocketHandshakeResponseReceived": WebSocketHandshakeResponseReceivedEvent, + "Network.webSocketWillSendHandshakeRequest": WebSocketWillSendHandshakeRequestEvent, + "Network.webTransportCreated": WebTransportCreatedEvent, + "Network.webTransportConnectionEstablished": WebTransportConnectionEstablishedEvent, + "Network.webTransportClosed": WebTransportClosedEvent, + "Network.directTCPSocketCreated": DirectTCPSocketCreatedEvent, + "Network.directTCPSocketOpened": DirectTCPSocketOpenedEvent, + "Network.directTCPSocketAborted": DirectTCPSocketAbortedEvent, + "Network.directTCPSocketClosed": DirectTCPSocketClosedEvent, + "Network.directTCPSocketChunkSent": DirectTCPSocketChunkSentEvent, + "Network.directTCPSocketChunkReceived": DirectTCPSocketChunkReceivedEvent, + "Network.directUDPSocketJoinedMulticastGroup": DirectUDPSocketJoinedMulticastGroupEvent, + "Network.directUDPSocketLeftMulticastGroup": DirectUDPSocketLeftMulticastGroupEvent, + "Network.directUDPSocketCreated": DirectUDPSocketCreatedEvent, + "Network.directUDPSocketOpened": DirectUDPSocketOpenedEvent, + "Network.directUDPSocketAborted": DirectUDPSocketAbortedEvent, + "Network.directUDPSocketClosed": DirectUDPSocketClosedEvent, + "Network.directUDPSocketChunkSent": DirectUDPSocketChunkSentEvent, + "Network.directUDPSocketChunkReceived": DirectUDPSocketChunkReceivedEvent, + "Network.requestWillBeSentExtraInfo": RequestWillBeSentExtraInfoEvent, + "Network.responseReceivedExtraInfo": ResponseReceivedExtraInfoEvent, + "Network.responseReceivedEarlyHints": ResponseReceivedEarlyHintsEvent, + "Network.trustTokenOperationDone": TrustTokenOperationDoneEvent, + "Network.policyUpdated": PolicyUpdatedEvent, + "Network.reportingApiReportAdded": ReportingApiReportAddedEvent, + "Network.reportingApiReportUpdated": ReportingApiReportUpdatedEvent, + "Network.reportingApiEndpointsChangedForOrigin": ReportingApiEndpointsChangedForOriginEvent, + "Network.deviceBoundSessionsAdded": DeviceBoundSessionsAddedEvent, + "Network.deviceBoundSessionEventOccurred": DeviceBoundSessionEventOccurredEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Overlay.ts b/types/zod/Overlay.ts new file mode 100644 index 0000000..74eb92b --- /dev/null +++ b/types/zod/Overlay.ts @@ -0,0 +1,227 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Page from "./Page.js"; +import * as Runtime from "./Runtime.js"; + +export const SourceOrderConfig = withCdpMeta(z.object({ "parentOutlineColor": z.lazy(() => DOM.RGBA), "childOutlineColor": z.lazy(() => DOM.RGBA) }).passthrough(), "Overlay.SourceOrderConfig", "type"); +export const GridHighlightConfig = withCdpMeta(z.object({ "showGridExtensionLines": z.boolean().optional(), "showPositiveLineNumbers": z.boolean().optional(), "showNegativeLineNumbers": z.boolean().optional(), "showAreaNames": z.boolean().optional(), "showLineNames": z.boolean().optional(), "showTrackSizes": z.boolean().optional(), "gridBorderColor": z.lazy(() => DOM.RGBA).optional(), "cellBorderColor": z.lazy(() => DOM.RGBA).optional(), "rowLineColor": z.lazy(() => DOM.RGBA).optional(), "columnLineColor": z.lazy(() => DOM.RGBA).optional(), "gridBorderDash": z.boolean().optional(), "cellBorderDash": z.boolean().optional(), "rowLineDash": z.boolean().optional(), "columnLineDash": z.boolean().optional(), "rowGapColor": z.lazy(() => DOM.RGBA).optional(), "rowHatchColor": z.lazy(() => DOM.RGBA).optional(), "columnGapColor": z.lazy(() => DOM.RGBA).optional(), "columnHatchColor": z.lazy(() => DOM.RGBA).optional(), "areaBorderColor": z.lazy(() => DOM.RGBA).optional(), "gridBackgroundColor": z.lazy(() => DOM.RGBA).optional() }).passthrough(), "Overlay.GridHighlightConfig", "type"); +export const FlexContainerHighlightConfig = withCdpMeta(z.object({ "containerBorder": z.lazy(() => LineStyle).optional(), "lineSeparator": z.lazy(() => LineStyle).optional(), "itemSeparator": z.lazy(() => LineStyle).optional(), "mainDistributedSpace": z.lazy(() => BoxStyle).optional(), "crossDistributedSpace": z.lazy(() => BoxStyle).optional(), "rowGapSpace": z.lazy(() => BoxStyle).optional(), "columnGapSpace": z.lazy(() => BoxStyle).optional(), "crossAlignment": z.lazy(() => LineStyle).optional() }).passthrough(), "Overlay.FlexContainerHighlightConfig", "type"); +export const FlexItemHighlightConfig = withCdpMeta(z.object({ "baseSizeBox": z.lazy(() => BoxStyle).optional(), "baseSizeBorder": z.lazy(() => LineStyle).optional(), "flexibilityArrow": z.lazy(() => LineStyle).optional() }).passthrough(), "Overlay.FlexItemHighlightConfig", "type"); +export const LineStyle = withCdpMeta(z.object({ "color": z.lazy(() => DOM.RGBA).optional(), "pattern": z.enum(["dashed", "dotted"]).optional() }).passthrough(), "Overlay.LineStyle", "type"); +export const BoxStyle = withCdpMeta(z.object({ "fillColor": z.lazy(() => DOM.RGBA).optional(), "hatchColor": z.lazy(() => DOM.RGBA).optional() }).passthrough(), "Overlay.BoxStyle", "type"); +export const ContrastAlgorithm = withCdpMeta(z.enum(["aa", "aaa", "apca"]), "Overlay.ContrastAlgorithm", "type"); +export const HighlightConfig = withCdpMeta(z.object({ "showInfo": z.boolean().optional(), "showStyles": z.boolean().optional(), "showRulers": z.boolean().optional(), "showAccessibilityInfo": z.boolean().optional(), "showExtensionLines": z.boolean().optional(), "contentColor": z.lazy(() => DOM.RGBA).optional(), "paddingColor": z.lazy(() => DOM.RGBA).optional(), "borderColor": z.lazy(() => DOM.RGBA).optional(), "marginColor": z.lazy(() => DOM.RGBA).optional(), "eventTargetColor": z.lazy(() => DOM.RGBA).optional(), "shapeColor": z.lazy(() => DOM.RGBA).optional(), "shapeMarginColor": z.lazy(() => DOM.RGBA).optional(), "cssGridColor": z.lazy(() => DOM.RGBA).optional(), "colorFormat": z.lazy(() => ColorFormat).optional(), "gridHighlightConfig": z.lazy(() => GridHighlightConfig).optional(), "flexContainerHighlightConfig": z.lazy(() => FlexContainerHighlightConfig).optional(), "flexItemHighlightConfig": z.lazy(() => FlexItemHighlightConfig).optional(), "contrastAlgorithm": z.lazy(() => ContrastAlgorithm).optional(), "containerQueryContainerHighlightConfig": z.lazy(() => ContainerQueryContainerHighlightConfig).optional() }).passthrough(), "Overlay.HighlightConfig", "type"); +export const ColorFormat = withCdpMeta(z.enum(["rgb", "hsl", "hwb", "hex"]), "Overlay.ColorFormat", "type"); +export const GridNodeHighlightConfig = withCdpMeta(z.object({ "gridHighlightConfig": z.lazy(() => GridHighlightConfig), "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "Overlay.GridNodeHighlightConfig", "type"); +export const FlexNodeHighlightConfig = withCdpMeta(z.object({ "flexContainerHighlightConfig": z.lazy(() => FlexContainerHighlightConfig), "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "Overlay.FlexNodeHighlightConfig", "type"); +export const ScrollSnapContainerHighlightConfig = withCdpMeta(z.object({ "snapportBorder": z.lazy(() => LineStyle).optional(), "snapAreaBorder": z.lazy(() => LineStyle).optional(), "scrollMarginColor": z.lazy(() => DOM.RGBA).optional(), "scrollPaddingColor": z.lazy(() => DOM.RGBA).optional() }).passthrough(), "Overlay.ScrollSnapContainerHighlightConfig", "type"); +export const ScrollSnapHighlightConfig = withCdpMeta(z.object({ "scrollSnapContainerHighlightConfig": z.lazy(() => ScrollSnapContainerHighlightConfig), "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "Overlay.ScrollSnapHighlightConfig", "type"); +export const HingeConfig = withCdpMeta(z.object({ "rect": z.lazy(() => DOM.Rect), "contentColor": z.lazy(() => DOM.RGBA).optional(), "outlineColor": z.lazy(() => DOM.RGBA).optional() }).passthrough(), "Overlay.HingeConfig", "type"); +export const WindowControlsOverlayConfig = withCdpMeta(z.object({ "showCSS": z.boolean(), "selectedPlatform": z.string(), "themeColor": z.string() }).passthrough(), "Overlay.WindowControlsOverlayConfig", "type"); +export const ContainerQueryHighlightConfig = withCdpMeta(z.object({ "containerQueryContainerHighlightConfig": z.lazy(() => ContainerQueryContainerHighlightConfig), "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "Overlay.ContainerQueryHighlightConfig", "type"); +export const ContainerQueryContainerHighlightConfig = withCdpMeta(z.object({ "containerBorder": z.lazy(() => LineStyle).optional(), "descendantBorder": z.lazy(() => LineStyle).optional() }).passthrough(), "Overlay.ContainerQueryContainerHighlightConfig", "type"); +export const IsolatedElementHighlightConfig = withCdpMeta(z.object({ "isolationModeHighlightConfig": z.lazy(() => IsolationModeHighlightConfig), "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "Overlay.IsolatedElementHighlightConfig", "type"); +export const IsolationModeHighlightConfig = withCdpMeta(z.object({ "resizerColor": z.lazy(() => DOM.RGBA).optional(), "resizerHandleColor": z.lazy(() => DOM.RGBA).optional(), "maskColor": z.lazy(() => DOM.RGBA).optional() }).passthrough(), "Overlay.IsolationModeHighlightConfig", "type"); +export const InspectMode = withCdpMeta(z.enum(["searchForNode", "searchForUAShadowDOM", "captureAreaScreenshot", "none"]), "Overlay.InspectMode", "type"); +export const InspectedElementAnchorConfig = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId).optional(), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional() }).passthrough(), "Overlay.InspectedElementAnchorConfig", "type"); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Overlay.disable.params", "commandParams", { method: "Overlay.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.disable.result", "commandResult", { method: "Overlay.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Overlay.enable.params", "commandParams", { method: "Overlay.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.enable.result", "commandResult", { method: "Overlay.enable" }); +export const GetHighlightObjectForTestParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId), "includeDistance": z.boolean().optional(), "includeStyle": z.boolean().optional(), "colorFormat": z.lazy(() => ColorFormat).optional(), "showAccessibilityInfo": z.boolean().optional() }).passthrough(), "Overlay.getHighlightObjectForTest.params", "commandParams", { method: "Overlay.getHighlightObjectForTest" }); +export const GetHighlightObjectForTestResult = withCdpMeta(z.object({ "highlight": z.record(z.string(), z.unknown()) }).passthrough(), "Overlay.getHighlightObjectForTest.result", "commandResult", { method: "Overlay.getHighlightObjectForTest" }); +export const GetGridHighlightObjectsForTestParams = withCdpMeta(z.object({ "nodeIds": z.array(z.lazy(() => DOM.NodeId)) }).passthrough(), "Overlay.getGridHighlightObjectsForTest.params", "commandParams", { method: "Overlay.getGridHighlightObjectsForTest" }); +export const GetGridHighlightObjectsForTestResult = withCdpMeta(z.object({ "highlights": z.record(z.string(), z.unknown()) }).passthrough(), "Overlay.getGridHighlightObjectsForTest.result", "commandResult", { method: "Overlay.getGridHighlightObjectsForTest" }); +export const GetSourceOrderHighlightObjectForTestParams = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "Overlay.getSourceOrderHighlightObjectForTest.params", "commandParams", { method: "Overlay.getSourceOrderHighlightObjectForTest" }); +export const GetSourceOrderHighlightObjectForTestResult = withCdpMeta(z.object({ "highlight": z.record(z.string(), z.unknown()) }).passthrough(), "Overlay.getSourceOrderHighlightObjectForTest.result", "commandResult", { method: "Overlay.getSourceOrderHighlightObjectForTest" }); +export const HideHighlightParams = withCdpMeta(z.object({ }).passthrough(), "Overlay.hideHighlight.params", "commandParams", { method: "Overlay.hideHighlight" }); +export const HideHighlightResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.hideHighlight.result", "commandResult", { method: "Overlay.hideHighlight" }); +export const HighlightFrameParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId), "contentColor": z.lazy(() => DOM.RGBA).optional(), "contentOutlineColor": z.lazy(() => DOM.RGBA).optional() }).passthrough(), "Overlay.highlightFrame.params", "commandParams", { method: "Overlay.highlightFrame" }); +export const HighlightFrameResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.highlightFrame.result", "commandResult", { method: "Overlay.highlightFrame" }); +export const HighlightNodeParams = withCdpMeta(z.object({ "highlightConfig": z.lazy(() => HighlightConfig), "nodeId": z.lazy(() => DOM.NodeId).optional(), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional(), "selector": z.string().optional() }).passthrough(), "Overlay.highlightNode.params", "commandParams", { method: "Overlay.highlightNode" }); +export const HighlightNodeResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.highlightNode.result", "commandResult", { method: "Overlay.highlightNode" }); +export const HighlightQuadParams = withCdpMeta(z.object({ "quad": z.lazy(() => DOM.Quad), "color": z.lazy(() => DOM.RGBA).optional(), "outlineColor": z.lazy(() => DOM.RGBA).optional() }).passthrough(), "Overlay.highlightQuad.params", "commandParams", { method: "Overlay.highlightQuad" }); +export const HighlightQuadResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.highlightQuad.result", "commandResult", { method: "Overlay.highlightQuad" }); +export const HighlightRectParams = withCdpMeta(z.object({ "x": z.number().int(), "y": z.number().int(), "width": z.number().int(), "height": z.number().int(), "color": z.lazy(() => DOM.RGBA).optional(), "outlineColor": z.lazy(() => DOM.RGBA).optional() }).passthrough(), "Overlay.highlightRect.params", "commandParams", { method: "Overlay.highlightRect" }); +export const HighlightRectResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.highlightRect.result", "commandResult", { method: "Overlay.highlightRect" }); +export const HighlightSourceOrderParams = withCdpMeta(z.object({ "sourceOrderConfig": z.lazy(() => SourceOrderConfig), "nodeId": z.lazy(() => DOM.NodeId).optional(), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "objectId": z.lazy(() => Runtime.RemoteObjectId).optional() }).passthrough(), "Overlay.highlightSourceOrder.params", "commandParams", { method: "Overlay.highlightSourceOrder" }); +export const HighlightSourceOrderResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.highlightSourceOrder.result", "commandResult", { method: "Overlay.highlightSourceOrder" }); +export const SetInspectModeParams = withCdpMeta(z.object({ "mode": z.lazy(() => InspectMode), "highlightConfig": z.lazy(() => HighlightConfig).optional() }).passthrough(), "Overlay.setInspectMode.params", "commandParams", { method: "Overlay.setInspectMode" }); +export const SetInspectModeResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setInspectMode.result", "commandResult", { method: "Overlay.setInspectMode" }); +export const SetShowAdHighlightsParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowAdHighlights.params", "commandParams", { method: "Overlay.setShowAdHighlights" }); +export const SetShowAdHighlightsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowAdHighlights.result", "commandResult", { method: "Overlay.setShowAdHighlights" }); +export const SetPausedInDebuggerMessageParams = withCdpMeta(z.object({ "message": z.string().optional() }).passthrough(), "Overlay.setPausedInDebuggerMessage.params", "commandParams", { method: "Overlay.setPausedInDebuggerMessage" }); +export const SetPausedInDebuggerMessageResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setPausedInDebuggerMessage.result", "commandResult", { method: "Overlay.setPausedInDebuggerMessage" }); +export const SetShowDebugBordersParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowDebugBorders.params", "commandParams", { method: "Overlay.setShowDebugBorders" }); +export const SetShowDebugBordersResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowDebugBorders.result", "commandResult", { method: "Overlay.setShowDebugBorders" }); +export const SetShowFPSCounterParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowFPSCounter.params", "commandParams", { method: "Overlay.setShowFPSCounter" }); +export const SetShowFPSCounterResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowFPSCounter.result", "commandResult", { method: "Overlay.setShowFPSCounter" }); +export const SetShowGridOverlaysParams = withCdpMeta(z.object({ "gridNodeHighlightConfigs": z.array(z.lazy(() => GridNodeHighlightConfig)) }).passthrough(), "Overlay.setShowGridOverlays.params", "commandParams", { method: "Overlay.setShowGridOverlays" }); +export const SetShowGridOverlaysResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowGridOverlays.result", "commandResult", { method: "Overlay.setShowGridOverlays" }); +export const SetShowFlexOverlaysParams = withCdpMeta(z.object({ "flexNodeHighlightConfigs": z.array(z.lazy(() => FlexNodeHighlightConfig)) }).passthrough(), "Overlay.setShowFlexOverlays.params", "commandParams", { method: "Overlay.setShowFlexOverlays" }); +export const SetShowFlexOverlaysResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowFlexOverlays.result", "commandResult", { method: "Overlay.setShowFlexOverlays" }); +export const SetShowScrollSnapOverlaysParams = withCdpMeta(z.object({ "scrollSnapHighlightConfigs": z.array(z.lazy(() => ScrollSnapHighlightConfig)) }).passthrough(), "Overlay.setShowScrollSnapOverlays.params", "commandParams", { method: "Overlay.setShowScrollSnapOverlays" }); +export const SetShowScrollSnapOverlaysResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowScrollSnapOverlays.result", "commandResult", { method: "Overlay.setShowScrollSnapOverlays" }); +export const SetShowContainerQueryOverlaysParams = withCdpMeta(z.object({ "containerQueryHighlightConfigs": z.array(z.lazy(() => ContainerQueryHighlightConfig)) }).passthrough(), "Overlay.setShowContainerQueryOverlays.params", "commandParams", { method: "Overlay.setShowContainerQueryOverlays" }); +export const SetShowContainerQueryOverlaysResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowContainerQueryOverlays.result", "commandResult", { method: "Overlay.setShowContainerQueryOverlays" }); +export const SetShowInspectedElementAnchorParams = withCdpMeta(z.object({ "inspectedElementAnchorConfig": z.lazy(() => InspectedElementAnchorConfig) }).passthrough(), "Overlay.setShowInspectedElementAnchor.params", "commandParams", { method: "Overlay.setShowInspectedElementAnchor" }); +export const SetShowInspectedElementAnchorResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowInspectedElementAnchor.result", "commandResult", { method: "Overlay.setShowInspectedElementAnchor" }); +export const SetShowPaintRectsParams = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Overlay.setShowPaintRects.params", "commandParams", { method: "Overlay.setShowPaintRects" }); +export const SetShowPaintRectsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowPaintRects.result", "commandResult", { method: "Overlay.setShowPaintRects" }); +export const SetShowLayoutShiftRegionsParams = withCdpMeta(z.object({ "result": z.boolean() }).passthrough(), "Overlay.setShowLayoutShiftRegions.params", "commandParams", { method: "Overlay.setShowLayoutShiftRegions" }); +export const SetShowLayoutShiftRegionsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowLayoutShiftRegions.result", "commandResult", { method: "Overlay.setShowLayoutShiftRegions" }); +export const SetShowScrollBottleneckRectsParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowScrollBottleneckRects.params", "commandParams", { method: "Overlay.setShowScrollBottleneckRects" }); +export const SetShowScrollBottleneckRectsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowScrollBottleneckRects.result", "commandResult", { method: "Overlay.setShowScrollBottleneckRects" }); +export const SetShowHitTestBordersParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowHitTestBorders.params", "commandParams", { method: "Overlay.setShowHitTestBorders" }); +export const SetShowHitTestBordersResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowHitTestBorders.result", "commandResult", { method: "Overlay.setShowHitTestBorders" }); +export const SetShowWebVitalsParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowWebVitals.params", "commandParams", { method: "Overlay.setShowWebVitals" }); +export const SetShowWebVitalsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowWebVitals.result", "commandResult", { method: "Overlay.setShowWebVitals" }); +export const SetShowViewportSizeOnResizeParams = withCdpMeta(z.object({ "show": z.boolean() }).passthrough(), "Overlay.setShowViewportSizeOnResize.params", "commandParams", { method: "Overlay.setShowViewportSizeOnResize" }); +export const SetShowViewportSizeOnResizeResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowViewportSizeOnResize.result", "commandResult", { method: "Overlay.setShowViewportSizeOnResize" }); +export const SetShowHingeParams = withCdpMeta(z.object({ "hingeConfig": z.lazy(() => HingeConfig).optional() }).passthrough(), "Overlay.setShowHinge.params", "commandParams", { method: "Overlay.setShowHinge" }); +export const SetShowHingeResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowHinge.result", "commandResult", { method: "Overlay.setShowHinge" }); +export const SetShowIsolatedElementsParams = withCdpMeta(z.object({ "isolatedElementHighlightConfigs": z.array(z.lazy(() => IsolatedElementHighlightConfig)) }).passthrough(), "Overlay.setShowIsolatedElements.params", "commandParams", { method: "Overlay.setShowIsolatedElements" }); +export const SetShowIsolatedElementsResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowIsolatedElements.result", "commandResult", { method: "Overlay.setShowIsolatedElements" }); +export const SetShowWindowControlsOverlayParams = withCdpMeta(z.object({ "windowControlsOverlayConfig": z.lazy(() => WindowControlsOverlayConfig).optional() }).passthrough(), "Overlay.setShowWindowControlsOverlay.params", "commandParams", { method: "Overlay.setShowWindowControlsOverlay" }); +export const SetShowWindowControlsOverlayResult = withCdpMeta(z.object({ }).passthrough(), "Overlay.setShowWindowControlsOverlay.result", "commandResult", { method: "Overlay.setShowWindowControlsOverlay" }); +export const InspectNodeRequestedEvent = withCdpMeta(z.object({ "backendNodeId": z.lazy(() => DOM.BackendNodeId) }).passthrough(), "Overlay.inspectNodeRequested", "event", { phase: "event" }); +export const NodeHighlightRequestedEvent = withCdpMeta(z.object({ "nodeId": z.lazy(() => DOM.NodeId) }).passthrough(), "Overlay.nodeHighlightRequested", "event", { phase: "event" }); +export const ScreenshotRequestedEvent = withCdpMeta(z.object({ "viewport": z.lazy(() => Page.Viewport) }).passthrough(), "Overlay.screenshotRequested", "event", { phase: "event" }); +export const InspectPanelShowRequestedEvent = withCdpMeta(z.object({ "backendNodeId": z.lazy(() => DOM.BackendNodeId) }).passthrough(), "Overlay.inspectPanelShowRequested", "event", { phase: "event" }); +export const InspectedElementWindowRestoredEvent = withCdpMeta(z.object({ "backendNodeId": z.lazy(() => DOM.BackendNodeId) }).passthrough(), "Overlay.inspectedElementWindowRestored", "event", { phase: "event" }); +export const InspectModeCanceledEvent = withCdpMeta(z.object({ }).passthrough(), "Overlay.inspectModeCanceled", "event", { phase: "event" }); + +export const zod = { + SourceOrderConfig: SourceOrderConfig, + GridHighlightConfig: GridHighlightConfig, + FlexContainerHighlightConfig: FlexContainerHighlightConfig, + FlexItemHighlightConfig: FlexItemHighlightConfig, + LineStyle: LineStyle, + BoxStyle: BoxStyle, + ContrastAlgorithm: ContrastAlgorithm, + HighlightConfig: HighlightConfig, + ColorFormat: ColorFormat, + GridNodeHighlightConfig: GridNodeHighlightConfig, + FlexNodeHighlightConfig: FlexNodeHighlightConfig, + ScrollSnapContainerHighlightConfig: ScrollSnapContainerHighlightConfig, + ScrollSnapHighlightConfig: ScrollSnapHighlightConfig, + HingeConfig: HingeConfig, + WindowControlsOverlayConfig: WindowControlsOverlayConfig, + ContainerQueryHighlightConfig: ContainerQueryHighlightConfig, + ContainerQueryContainerHighlightConfig: ContainerQueryContainerHighlightConfig, + IsolatedElementHighlightConfig: IsolatedElementHighlightConfig, + IsolationModeHighlightConfig: IsolationModeHighlightConfig, + InspectMode: InspectMode, + InspectedElementAnchorConfig: InspectedElementAnchorConfig, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + GetHighlightObjectForTestParams: GetHighlightObjectForTestParams, + GetHighlightObjectForTestResult: GetHighlightObjectForTestResult, + GetGridHighlightObjectsForTestParams: GetGridHighlightObjectsForTestParams, + GetGridHighlightObjectsForTestResult: GetGridHighlightObjectsForTestResult, + GetSourceOrderHighlightObjectForTestParams: GetSourceOrderHighlightObjectForTestParams, + GetSourceOrderHighlightObjectForTestResult: GetSourceOrderHighlightObjectForTestResult, + HideHighlightParams: HideHighlightParams, + HideHighlightResult: HideHighlightResult, + HighlightFrameParams: HighlightFrameParams, + HighlightFrameResult: HighlightFrameResult, + HighlightNodeParams: HighlightNodeParams, + HighlightNodeResult: HighlightNodeResult, + HighlightQuadParams: HighlightQuadParams, + HighlightQuadResult: HighlightQuadResult, + HighlightRectParams: HighlightRectParams, + HighlightRectResult: HighlightRectResult, + HighlightSourceOrderParams: HighlightSourceOrderParams, + HighlightSourceOrderResult: HighlightSourceOrderResult, + SetInspectModeParams: SetInspectModeParams, + SetInspectModeResult: SetInspectModeResult, + SetShowAdHighlightsParams: SetShowAdHighlightsParams, + SetShowAdHighlightsResult: SetShowAdHighlightsResult, + SetPausedInDebuggerMessageParams: SetPausedInDebuggerMessageParams, + SetPausedInDebuggerMessageResult: SetPausedInDebuggerMessageResult, + SetShowDebugBordersParams: SetShowDebugBordersParams, + SetShowDebugBordersResult: SetShowDebugBordersResult, + SetShowFPSCounterParams: SetShowFPSCounterParams, + SetShowFPSCounterResult: SetShowFPSCounterResult, + SetShowGridOverlaysParams: SetShowGridOverlaysParams, + SetShowGridOverlaysResult: SetShowGridOverlaysResult, + SetShowFlexOverlaysParams: SetShowFlexOverlaysParams, + SetShowFlexOverlaysResult: SetShowFlexOverlaysResult, + SetShowScrollSnapOverlaysParams: SetShowScrollSnapOverlaysParams, + SetShowScrollSnapOverlaysResult: SetShowScrollSnapOverlaysResult, + SetShowContainerQueryOverlaysParams: SetShowContainerQueryOverlaysParams, + SetShowContainerQueryOverlaysResult: SetShowContainerQueryOverlaysResult, + SetShowInspectedElementAnchorParams: SetShowInspectedElementAnchorParams, + SetShowInspectedElementAnchorResult: SetShowInspectedElementAnchorResult, + SetShowPaintRectsParams: SetShowPaintRectsParams, + SetShowPaintRectsResult: SetShowPaintRectsResult, + SetShowLayoutShiftRegionsParams: SetShowLayoutShiftRegionsParams, + SetShowLayoutShiftRegionsResult: SetShowLayoutShiftRegionsResult, + SetShowScrollBottleneckRectsParams: SetShowScrollBottleneckRectsParams, + SetShowScrollBottleneckRectsResult: SetShowScrollBottleneckRectsResult, + SetShowHitTestBordersParams: SetShowHitTestBordersParams, + SetShowHitTestBordersResult: SetShowHitTestBordersResult, + SetShowWebVitalsParams: SetShowWebVitalsParams, + SetShowWebVitalsResult: SetShowWebVitalsResult, + SetShowViewportSizeOnResizeParams: SetShowViewportSizeOnResizeParams, + SetShowViewportSizeOnResizeResult: SetShowViewportSizeOnResizeResult, + SetShowHingeParams: SetShowHingeParams, + SetShowHingeResult: SetShowHingeResult, + SetShowIsolatedElementsParams: SetShowIsolatedElementsParams, + SetShowIsolatedElementsResult: SetShowIsolatedElementsResult, + SetShowWindowControlsOverlayParams: SetShowWindowControlsOverlayParams, + SetShowWindowControlsOverlayResult: SetShowWindowControlsOverlayResult, + InspectNodeRequestedEvent: InspectNodeRequestedEvent, + NodeHighlightRequestedEvent: NodeHighlightRequestedEvent, + ScreenshotRequestedEvent: ScreenshotRequestedEvent, + InspectPanelShowRequestedEvent: InspectPanelShowRequestedEvent, + InspectedElementWindowRestoredEvent: InspectedElementWindowRestoredEvent, + InspectModeCanceledEvent: InspectModeCanceledEvent, +} as const; +export const commands = { + "Overlay.disable": { params: DisableParams, result: DisableResult }, + "Overlay.enable": { params: EnableParams, result: EnableResult }, + "Overlay.getHighlightObjectForTest": { params: GetHighlightObjectForTestParams, result: GetHighlightObjectForTestResult }, + "Overlay.getGridHighlightObjectsForTest": { params: GetGridHighlightObjectsForTestParams, result: GetGridHighlightObjectsForTestResult }, + "Overlay.getSourceOrderHighlightObjectForTest": { params: GetSourceOrderHighlightObjectForTestParams, result: GetSourceOrderHighlightObjectForTestResult }, + "Overlay.hideHighlight": { params: HideHighlightParams, result: HideHighlightResult }, + "Overlay.highlightFrame": { params: HighlightFrameParams, result: HighlightFrameResult }, + "Overlay.highlightNode": { params: HighlightNodeParams, result: HighlightNodeResult }, + "Overlay.highlightQuad": { params: HighlightQuadParams, result: HighlightQuadResult }, + "Overlay.highlightRect": { params: HighlightRectParams, result: HighlightRectResult }, + "Overlay.highlightSourceOrder": { params: HighlightSourceOrderParams, result: HighlightSourceOrderResult }, + "Overlay.setInspectMode": { params: SetInspectModeParams, result: SetInspectModeResult }, + "Overlay.setShowAdHighlights": { params: SetShowAdHighlightsParams, result: SetShowAdHighlightsResult }, + "Overlay.setPausedInDebuggerMessage": { params: SetPausedInDebuggerMessageParams, result: SetPausedInDebuggerMessageResult }, + "Overlay.setShowDebugBorders": { params: SetShowDebugBordersParams, result: SetShowDebugBordersResult }, + "Overlay.setShowFPSCounter": { params: SetShowFPSCounterParams, result: SetShowFPSCounterResult }, + "Overlay.setShowGridOverlays": { params: SetShowGridOverlaysParams, result: SetShowGridOverlaysResult }, + "Overlay.setShowFlexOverlays": { params: SetShowFlexOverlaysParams, result: SetShowFlexOverlaysResult }, + "Overlay.setShowScrollSnapOverlays": { params: SetShowScrollSnapOverlaysParams, result: SetShowScrollSnapOverlaysResult }, + "Overlay.setShowContainerQueryOverlays": { params: SetShowContainerQueryOverlaysParams, result: SetShowContainerQueryOverlaysResult }, + "Overlay.setShowInspectedElementAnchor": { params: SetShowInspectedElementAnchorParams, result: SetShowInspectedElementAnchorResult }, + "Overlay.setShowPaintRects": { params: SetShowPaintRectsParams, result: SetShowPaintRectsResult }, + "Overlay.setShowLayoutShiftRegions": { params: SetShowLayoutShiftRegionsParams, result: SetShowLayoutShiftRegionsResult }, + "Overlay.setShowScrollBottleneckRects": { params: SetShowScrollBottleneckRectsParams, result: SetShowScrollBottleneckRectsResult }, + "Overlay.setShowHitTestBorders": { params: SetShowHitTestBordersParams, result: SetShowHitTestBordersResult }, + "Overlay.setShowWebVitals": { params: SetShowWebVitalsParams, result: SetShowWebVitalsResult }, + "Overlay.setShowViewportSizeOnResize": { params: SetShowViewportSizeOnResizeParams, result: SetShowViewportSizeOnResizeResult }, + "Overlay.setShowHinge": { params: SetShowHingeParams, result: SetShowHingeResult }, + "Overlay.setShowIsolatedElements": { params: SetShowIsolatedElementsParams, result: SetShowIsolatedElementsResult }, + "Overlay.setShowWindowControlsOverlay": { params: SetShowWindowControlsOverlayParams, result: SetShowWindowControlsOverlayResult }, +} as const; +export const events = { + "Overlay.inspectNodeRequested": InspectNodeRequestedEvent, + "Overlay.nodeHighlightRequested": NodeHighlightRequestedEvent, + "Overlay.screenshotRequested": ScreenshotRequestedEvent, + "Overlay.inspectPanelShowRequested": InspectPanelShowRequestedEvent, + "Overlay.inspectedElementWindowRestored": InspectedElementWindowRestoredEvent, + "Overlay.inspectModeCanceled": InspectModeCanceledEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/PWA.ts b/types/zod/PWA.ts new file mode 100644 index 0000000..7723159 --- /dev/null +++ b/types/zod/PWA.ts @@ -0,0 +1,56 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Target from "./Target.js"; + +export const FileHandlerAccept = withCdpMeta(z.object({ "mediaType": z.string(), "fileExtensions": z.array(z.string()) }).passthrough(), "PWA.FileHandlerAccept", "type"); +export const FileHandler = withCdpMeta(z.object({ "action": z.string(), "accepts": z.array(z.lazy(() => FileHandlerAccept)), "displayName": z.string() }).passthrough(), "PWA.FileHandler", "type"); +export const DisplayMode = withCdpMeta(z.enum(["standalone", "browser"]), "PWA.DisplayMode", "type"); +export const GetOsAppStateParams = withCdpMeta(z.object({ "manifestId": z.string() }).passthrough(), "PWA.getOsAppState.params", "commandParams", { method: "PWA.getOsAppState" }); +export const GetOsAppStateResult = withCdpMeta(z.object({ "badgeCount": z.number().int(), "fileHandlers": z.array(z.lazy(() => FileHandler)) }).passthrough(), "PWA.getOsAppState.result", "commandResult", { method: "PWA.getOsAppState" }); +export const InstallParams = withCdpMeta(z.object({ "manifestId": z.string(), "installUrlOrBundleUrl": z.string().optional() }).passthrough(), "PWA.install.params", "commandParams", { method: "PWA.install" }); +export const InstallResult = withCdpMeta(z.object({ }).passthrough(), "PWA.install.result", "commandResult", { method: "PWA.install" }); +export const UninstallParams = withCdpMeta(z.object({ "manifestId": z.string() }).passthrough(), "PWA.uninstall.params", "commandParams", { method: "PWA.uninstall" }); +export const UninstallResult = withCdpMeta(z.object({ }).passthrough(), "PWA.uninstall.result", "commandResult", { method: "PWA.uninstall" }); +export const LaunchParams = withCdpMeta(z.object({ "manifestId": z.string(), "url": z.string().optional() }).passthrough(), "PWA.launch.params", "commandParams", { method: "PWA.launch" }); +export const LaunchResult = withCdpMeta(z.object({ "targetId": z.lazy(() => Target.TargetID) }).passthrough(), "PWA.launch.result", "commandResult", { method: "PWA.launch" }); +export const LaunchFilesInAppParams = withCdpMeta(z.object({ "manifestId": z.string(), "files": z.array(z.string()) }).passthrough(), "PWA.launchFilesInApp.params", "commandParams", { method: "PWA.launchFilesInApp" }); +export const LaunchFilesInAppResult = withCdpMeta(z.object({ "targetIds": z.array(z.lazy(() => Target.TargetID)) }).passthrough(), "PWA.launchFilesInApp.result", "commandResult", { method: "PWA.launchFilesInApp" }); +export const OpenCurrentPageInAppParams = withCdpMeta(z.object({ "manifestId": z.string() }).passthrough(), "PWA.openCurrentPageInApp.params", "commandParams", { method: "PWA.openCurrentPageInApp" }); +export const OpenCurrentPageInAppResult = withCdpMeta(z.object({ }).passthrough(), "PWA.openCurrentPageInApp.result", "commandResult", { method: "PWA.openCurrentPageInApp" }); +export const ChangeAppUserSettingsParams = withCdpMeta(z.object({ "manifestId": z.string(), "linkCapturing": z.boolean().optional(), "displayMode": z.lazy(() => DisplayMode).optional() }).passthrough(), "PWA.changeAppUserSettings.params", "commandParams", { method: "PWA.changeAppUserSettings" }); +export const ChangeAppUserSettingsResult = withCdpMeta(z.object({ }).passthrough(), "PWA.changeAppUserSettings.result", "commandResult", { method: "PWA.changeAppUserSettings" }); + +export const zod = { + FileHandlerAccept: FileHandlerAccept, + FileHandler: FileHandler, + DisplayMode: DisplayMode, + GetOsAppStateParams: GetOsAppStateParams, + GetOsAppStateResult: GetOsAppStateResult, + InstallParams: InstallParams, + InstallResult: InstallResult, + UninstallParams: UninstallParams, + UninstallResult: UninstallResult, + LaunchParams: LaunchParams, + LaunchResult: LaunchResult, + LaunchFilesInAppParams: LaunchFilesInAppParams, + LaunchFilesInAppResult: LaunchFilesInAppResult, + OpenCurrentPageInAppParams: OpenCurrentPageInAppParams, + OpenCurrentPageInAppResult: OpenCurrentPageInAppResult, + ChangeAppUserSettingsParams: ChangeAppUserSettingsParams, + ChangeAppUserSettingsResult: ChangeAppUserSettingsResult, +} as const; +export const commands = { + "PWA.getOsAppState": { params: GetOsAppStateParams, result: GetOsAppStateResult }, + "PWA.install": { params: InstallParams, result: InstallResult }, + "PWA.uninstall": { params: UninstallParams, result: UninstallResult }, + "PWA.launch": { params: LaunchParams, result: LaunchResult }, + "PWA.launchFilesInApp": { params: LaunchFilesInAppParams, result: LaunchFilesInAppResult }, + "PWA.openCurrentPageInApp": { params: OpenCurrentPageInAppParams, result: OpenCurrentPageInAppResult }, + "PWA.changeAppUserSettings": { params: ChangeAppUserSettingsParams, result: ChangeAppUserSettingsResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Page.ts b/types/zod/Page.ts new file mode 100644 index 0000000..75d3bf4 --- /dev/null +++ b/types/zod/Page.ts @@ -0,0 +1,525 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Debugger from "./Debugger.js"; +import * as Emulation from "./Emulation.js"; +import * as IO from "./IO.js"; +import * as Network from "./Network.js"; +import * as Runtime from "./Runtime.js"; + +export const FrameId = withCdpMeta(z.string(), "Page.FrameId", "type"); +export const AdFrameType = withCdpMeta(z.enum(["none", "child", "root"]), "Page.AdFrameType", "type"); +export const AdFrameExplanation = withCdpMeta(z.enum(["ParentIsAd", "CreatedByAdScript", "MatchedBlockingRule"]), "Page.AdFrameExplanation", "type"); +export const AdFrameStatus = withCdpMeta(z.object({ "adFrameType": z.lazy(() => AdFrameType), "explanations": z.array(z.lazy(() => AdFrameExplanation)).optional() }).passthrough(), "Page.AdFrameStatus", "type"); +export const SecureContextType = withCdpMeta(z.enum(["Secure", "SecureLocalhost", "InsecureScheme", "InsecureAncestor"]), "Page.SecureContextType", "type"); +export const CrossOriginIsolatedContextType = withCdpMeta(z.enum(["Isolated", "NotIsolated", "NotIsolatedFeatureDisabled"]), "Page.CrossOriginIsolatedContextType", "type"); +export const GatedAPIFeatures = withCdpMeta(z.enum(["SharedArrayBuffers", "SharedArrayBuffersTransferAllowed", "PerformanceMeasureMemory", "PerformanceProfile"]), "Page.GatedAPIFeatures", "type"); +export const PermissionsPolicyFeature = withCdpMeta(z.enum(["accelerometer", "all-screens-capture", "ambient-light-sensor", "aria-notify", "attribution-reporting", "autofill", "autoplay", "bluetooth", "browsing-topics", "camera", "captured-surface-control", "ch-dpr", "ch-device-memory", "ch-downlink", "ch-ect", "ch-prefers-color-scheme", "ch-prefers-reduced-motion", "ch-prefers-reduced-transparency", "ch-rtt", "ch-save-data", "ch-ua", "ch-ua-arch", "ch-ua-bitness", "ch-ua-high-entropy-values", "ch-ua-platform", "ch-ua-model", "ch-ua-mobile", "ch-ua-form-factors", "ch-ua-full-version", "ch-ua-full-version-list", "ch-ua-platform-version", "ch-ua-wow64", "ch-viewport-height", "ch-viewport-width", "ch-width", "clipboard-read", "clipboard-write", "compute-pressure", "controlled-frame", "cross-origin-isolated", "deferred-fetch", "deferred-fetch-minimal", "device-attributes", "digital-credentials-create", "digital-credentials-get", "direct-sockets", "direct-sockets-multicast", "direct-sockets-private", "display-capture", "document-domain", "encrypted-media", "execution-while-out-of-viewport", "execution-while-not-rendered", "focus-without-user-activation", "fullscreen", "frobulate", "gamepad", "geolocation", "gyroscope", "hid", "identity-credentials-get", "idle-detection", "interest-cohort", "join-ad-interest-group", "keyboard-map", "language-detector", "language-model", "local-fonts", "local-network", "local-network-access", "loopback-network", "magnetometer", "manual-text", "media-playback-while-not-visible", "microphone", "midi", "on-device-speech-recognition", "otp-credentials", "payment", "picture-in-picture", "private-aggregation", "private-state-token-issuance", "private-state-token-redemption", "publickey-credentials-create", "publickey-credentials-get", "record-ad-auction-events", "rewriter", "run-ad-auction", "screen-wake-lock", "serial", "shared-storage", "shared-storage-select-url", "smart-card", "speaker-selection", "storage-access", "sub-apps", "summarizer", "sync-xhr", "translator", "unload", "usb", "usb-unrestricted", "vertical-scroll", "web-app-installation", "web-printing", "web-share", "window-management", "writer", "xr-spatial-tracking"]), "Page.PermissionsPolicyFeature", "type"); +export const PermissionsPolicyBlockReason = withCdpMeta(z.enum(["Header", "IframeAttribute", "InFencedFrameTree", "InIsolatedApp"]), "Page.PermissionsPolicyBlockReason", "type"); +export const PermissionsPolicyBlockLocator = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "blockReason": z.lazy(() => PermissionsPolicyBlockReason) }).passthrough(), "Page.PermissionsPolicyBlockLocator", "type"); +export const PermissionsPolicyFeatureState = withCdpMeta(z.object({ "feature": z.lazy(() => PermissionsPolicyFeature), "allowed": z.boolean(), "locator": z.lazy(() => PermissionsPolicyBlockLocator).optional() }).passthrough(), "Page.PermissionsPolicyFeatureState", "type"); +export const OriginTrialTokenStatus = withCdpMeta(z.enum(["Success", "NotSupported", "Insecure", "Expired", "WrongOrigin", "InvalidSignature", "Malformed", "WrongVersion", "FeatureDisabled", "TokenDisabled", "FeatureDisabledForUser", "UnknownTrial"]), "Page.OriginTrialTokenStatus", "type"); +export const OriginTrialStatus = withCdpMeta(z.enum(["Enabled", "ValidTokenNotProvided", "OSNotSupported", "TrialNotAllowed"]), "Page.OriginTrialStatus", "type"); +export const OriginTrialUsageRestriction = withCdpMeta(z.enum(["None", "Subset"]), "Page.OriginTrialUsageRestriction", "type"); +export const OriginTrialToken = withCdpMeta(z.object({ "origin": z.string(), "matchSubDomains": z.boolean(), "trialName": z.string(), "expiryTime": z.lazy(() => Network.TimeSinceEpoch), "isThirdParty": z.boolean(), "usageRestriction": z.lazy(() => OriginTrialUsageRestriction) }).passthrough(), "Page.OriginTrialToken", "type"); +export const OriginTrialTokenWithStatus = withCdpMeta(z.object({ "rawTokenText": z.string(), "parsedToken": z.lazy(() => OriginTrialToken).optional(), "status": z.lazy(() => OriginTrialTokenStatus) }).passthrough(), "Page.OriginTrialTokenWithStatus", "type"); +export const OriginTrial = withCdpMeta(z.object({ "trialName": z.string(), "status": z.lazy(() => OriginTrialStatus), "tokensWithStatus": z.array(z.lazy(() => OriginTrialTokenWithStatus)) }).passthrough(), "Page.OriginTrial", "type"); +export const SecurityOriginDetails = withCdpMeta(z.object({ "isLocalhost": z.boolean() }).passthrough(), "Page.SecurityOriginDetails", "type"); +export const Frame = withCdpMeta(z.object({ "id": z.lazy(() => FrameId), "parentId": z.lazy(() => FrameId).optional(), "loaderId": z.lazy(() => Network.LoaderId), "name": z.string().optional(), "url": z.string(), "urlFragment": z.string().optional(), "domainAndRegistry": z.string(), "securityOrigin": z.string(), "securityOriginDetails": z.lazy(() => SecurityOriginDetails).optional(), "mimeType": z.string(), "unreachableUrl": z.string().optional(), "adFrameStatus": z.lazy(() => AdFrameStatus).optional(), "secureContextType": z.lazy(() => SecureContextType), "crossOriginIsolatedContextType": z.lazy(() => CrossOriginIsolatedContextType), "gatedAPIFeatures": z.array(z.lazy(() => GatedAPIFeatures)) }).passthrough(), "Page.Frame", "type"); +export const FrameResource = withCdpMeta(z.object({ "url": z.string(), "type": z.lazy(() => Network.ResourceType), "mimeType": z.string(), "lastModified": z.lazy(() => Network.TimeSinceEpoch).optional(), "contentSize": z.number().optional(), "failed": z.boolean().optional(), "canceled": z.boolean().optional() }).passthrough(), "Page.FrameResource", "type"); +export const FrameResourceTree = withCdpMeta(z.object({ "frame": z.lazy(() => Frame), "childFrames": z.array(z.lazy(() => FrameResourceTree)).optional(), "resources": z.array(z.lazy(() => FrameResource)) }).passthrough(), "Page.FrameResourceTree", "type"); +export const FrameTree = withCdpMeta(z.object({ "frame": z.lazy(() => Frame), "childFrames": z.array(z.lazy(() => FrameTree)).optional() }).passthrough(), "Page.FrameTree", "type"); +export const ScriptIdentifier = withCdpMeta(z.string(), "Page.ScriptIdentifier", "type"); +export const TransitionType = withCdpMeta(z.enum(["link", "typed", "address_bar", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated", "other"]), "Page.TransitionType", "type"); +export const NavigationEntry = withCdpMeta(z.object({ "id": z.number().int(), "url": z.string(), "userTypedURL": z.string(), "title": z.string(), "transitionType": z.lazy(() => TransitionType) }).passthrough(), "Page.NavigationEntry", "type"); +export const ScreencastFrameMetadata = withCdpMeta(z.object({ "offsetTop": z.number(), "pageScaleFactor": z.number(), "deviceWidth": z.number(), "deviceHeight": z.number(), "scrollOffsetX": z.number(), "scrollOffsetY": z.number(), "timestamp": z.lazy(() => Network.TimeSinceEpoch).optional() }).passthrough(), "Page.ScreencastFrameMetadata", "type"); +export const DialogType = withCdpMeta(z.enum(["alert", "confirm", "prompt", "beforeunload"]), "Page.DialogType", "type"); +export const AppManifestError = withCdpMeta(z.object({ "message": z.string(), "critical": z.number().int(), "line": z.number().int(), "column": z.number().int() }).passthrough(), "Page.AppManifestError", "type"); +export const AppManifestParsedProperties = withCdpMeta(z.object({ "scope": z.string() }).passthrough(), "Page.AppManifestParsedProperties", "type"); +export const LayoutViewport = withCdpMeta(z.object({ "pageX": z.number().int(), "pageY": z.number().int(), "clientWidth": z.number().int(), "clientHeight": z.number().int() }).passthrough(), "Page.LayoutViewport", "type"); +export const VisualViewport = withCdpMeta(z.object({ "offsetX": z.number(), "offsetY": z.number(), "pageX": z.number(), "pageY": z.number(), "clientWidth": z.number(), "clientHeight": z.number(), "scale": z.number(), "zoom": z.number().optional() }).passthrough(), "Page.VisualViewport", "type"); +export const Viewport = withCdpMeta(z.object({ "x": z.number(), "y": z.number(), "width": z.number(), "height": z.number(), "scale": z.number() }).passthrough(), "Page.Viewport", "type"); +export const FontFamilies = withCdpMeta(z.object({ "standard": z.string().optional(), "fixed": z.string().optional(), "serif": z.string().optional(), "sansSerif": z.string().optional(), "cursive": z.string().optional(), "fantasy": z.string().optional(), "math": z.string().optional() }).passthrough(), "Page.FontFamilies", "type"); +export const ScriptFontFamilies = withCdpMeta(z.object({ "script": z.string(), "fontFamilies": z.lazy(() => FontFamilies) }).passthrough(), "Page.ScriptFontFamilies", "type"); +export const FontSizes = withCdpMeta(z.object({ "standard": z.number().int().optional(), "fixed": z.number().int().optional() }).passthrough(), "Page.FontSizes", "type"); +export const ClientNavigationReason = withCdpMeta(z.enum(["anchorClick", "formSubmissionGet", "formSubmissionPost", "httpHeaderRefresh", "initialFrameNavigation", "metaTagRefresh", "other", "pageBlockInterstitial", "reload", "scriptInitiated"]), "Page.ClientNavigationReason", "type"); +export const ClientNavigationDisposition = withCdpMeta(z.enum(["currentTab", "newTab", "newWindow", "download"]), "Page.ClientNavigationDisposition", "type"); +export const InstallabilityErrorArgument = withCdpMeta(z.object({ "name": z.string(), "value": z.string() }).passthrough(), "Page.InstallabilityErrorArgument", "type"); +export const InstallabilityError = withCdpMeta(z.object({ "errorId": z.string(), "errorArguments": z.array(z.lazy(() => InstallabilityErrorArgument)) }).passthrough(), "Page.InstallabilityError", "type"); +export const ReferrerPolicy = withCdpMeta(z.enum(["noReferrer", "noReferrerWhenDowngrade", "origin", "originWhenCrossOrigin", "sameOrigin", "strictOrigin", "strictOriginWhenCrossOrigin", "unsafeUrl"]), "Page.ReferrerPolicy", "type"); +export const CompilationCacheParams = withCdpMeta(z.object({ "url": z.string(), "eager": z.boolean().optional() }).passthrough(), "Page.CompilationCacheParams", "type"); +export const FileFilter = withCdpMeta(z.object({ "name": z.string().optional(), "accepts": z.array(z.string()).optional() }).passthrough(), "Page.FileFilter", "type"); +export const FileHandler = withCdpMeta(z.object({ "action": z.string(), "name": z.string(), "icons": z.array(z.lazy(() => ImageResource)).optional(), "accepts": z.array(z.lazy(() => FileFilter)).optional(), "launchType": z.string() }).passthrough(), "Page.FileHandler", "type"); +export const ImageResource = withCdpMeta(z.object({ "url": z.string(), "sizes": z.string().optional(), "type": z.string().optional() }).passthrough(), "Page.ImageResource", "type"); +export const LaunchHandler = withCdpMeta(z.object({ "clientMode": z.string() }).passthrough(), "Page.LaunchHandler", "type"); +export const ProtocolHandler = withCdpMeta(z.object({ "protocol": z.string(), "url": z.string() }).passthrough(), "Page.ProtocolHandler", "type"); +export const RelatedApplication = withCdpMeta(z.object({ "id": z.string().optional(), "url": z.string() }).passthrough(), "Page.RelatedApplication", "type"); +export const ScopeExtension = withCdpMeta(z.object({ "origin": z.string(), "hasOriginWildcard": z.boolean() }).passthrough(), "Page.ScopeExtension", "type"); +export const Screenshot = withCdpMeta(z.object({ "image": z.lazy(() => ImageResource), "formFactor": z.string(), "label": z.string().optional() }).passthrough(), "Page.Screenshot", "type"); +export const ShareTarget = withCdpMeta(z.object({ "action": z.string(), "method": z.string(), "enctype": z.string(), "title": z.string().optional(), "text": z.string().optional(), "url": z.string().optional(), "files": z.array(z.lazy(() => FileFilter)).optional() }).passthrough(), "Page.ShareTarget", "type"); +export const Shortcut = withCdpMeta(z.object({ "name": z.string(), "url": z.string() }).passthrough(), "Page.Shortcut", "type"); +export const WebAppManifest = withCdpMeta(z.object({ "backgroundColor": z.string().optional(), "description": z.string().optional(), "dir": z.string().optional(), "display": z.string().optional(), "displayOverrides": z.array(z.string()).optional(), "fileHandlers": z.array(z.lazy(() => FileHandler)).optional(), "icons": z.array(z.lazy(() => ImageResource)).optional(), "id": z.string().optional(), "lang": z.string().optional(), "launchHandler": z.lazy(() => LaunchHandler).optional(), "name": z.string().optional(), "orientation": z.string().optional(), "preferRelatedApplications": z.boolean().optional(), "protocolHandlers": z.array(z.lazy(() => ProtocolHandler)).optional(), "relatedApplications": z.array(z.lazy(() => RelatedApplication)).optional(), "scope": z.string().optional(), "scopeExtensions": z.array(z.lazy(() => ScopeExtension)).optional(), "screenshots": z.array(z.lazy(() => Screenshot)).optional(), "shareTarget": z.lazy(() => ShareTarget).optional(), "shortName": z.string().optional(), "shortcuts": z.array(z.lazy(() => Shortcut)).optional(), "startUrl": z.string().optional(), "themeColor": z.string().optional() }).passthrough(), "Page.WebAppManifest", "type"); +export const NavigationType = withCdpMeta(z.enum(["Navigation", "BackForwardCacheRestore"]), "Page.NavigationType", "type"); +export const BackForwardCacheNotRestoredReason = withCdpMeta(z.enum(["NotPrimaryMainFrame", "BackForwardCacheDisabled", "RelatedActiveContentsExist", "HTTPStatusNotOK", "SchemeNotHTTPOrHTTPS", "Loading", "WasGrantedMediaAccess", "DisableForRenderFrameHostCalled", "DomainNotAllowed", "HTTPMethodNotGET", "SubframeIsNavigating", "Timeout", "CacheLimit", "JavaScriptExecution", "RendererProcessKilled", "RendererProcessCrashed", "SchedulerTrackedFeatureUsed", "ConflictingBrowsingInstance", "CacheFlushed", "ServiceWorkerVersionActivation", "SessionRestored", "ServiceWorkerPostMessage", "EnteredBackForwardCacheBeforeServiceWorkerHostAdded", "RenderFrameHostReused_SameSite", "RenderFrameHostReused_CrossSite", "ServiceWorkerClaim", "IgnoreEventAndEvict", "HaveInnerContents", "TimeoutPuttingInCache", "BackForwardCacheDisabledByLowMemory", "BackForwardCacheDisabledByCommandLine", "NetworkRequestDatapipeDrainedAsBytesConsumer", "NetworkRequestRedirected", "NetworkRequestTimeout", "NetworkExceedsBufferLimit", "NavigationCancelledWhileRestoring", "NotMostRecentNavigationEntry", "BackForwardCacheDisabledForPrerender", "UserAgentOverrideDiffers", "ForegroundCacheLimit", "ForwardCacheDisabled", "BrowsingInstanceNotSwapped", "BackForwardCacheDisabledForDelegate", "UnloadHandlerExistsInMainFrame", "UnloadHandlerExistsInSubFrame", "ServiceWorkerUnregistration", "CacheControlNoStore", "CacheControlNoStoreCookieModified", "CacheControlNoStoreHTTPOnlyCookieModified", "NoResponseHead", "Unknown", "ActivationNavigationsDisallowedForBug1234857", "ErrorDocument", "FencedFramesEmbedder", "CookieDisabled", "HTTPAuthRequired", "CookieFlushed", "BroadcastChannelOnMessage", "WebViewSettingsChanged", "WebViewJavaScriptObjectChanged", "WebViewMessageListenerInjected", "WebViewSafeBrowsingAllowlistChanged", "WebViewDocumentStartJavascriptChanged", "WebSocket", "WebTransport", "WebRTC", "MainResourceHasCacheControlNoStore", "MainResourceHasCacheControlNoCache", "SubresourceHasCacheControlNoStore", "SubresourceHasCacheControlNoCache", "ContainsPlugins", "DocumentLoaded", "OutstandingNetworkRequestOthers", "RequestedMIDIPermission", "RequestedAudioCapturePermission", "RequestedVideoCapturePermission", "RequestedBackForwardCacheBlockedSensors", "RequestedBackgroundWorkPermission", "BroadcastChannel", "WebXR", "SharedWorker", "SharedWorkerMessage", "SharedWorkerWithNoActiveClient", "WebLocks", "WebLocksContention", "WebHID", "WebBluetooth", "WebShare", "RequestedStorageAccessGrant", "WebNfc", "OutstandingNetworkRequestFetch", "OutstandingNetworkRequestXHR", "AppBanner", "Printing", "WebDatabase", "PictureInPicture", "SpeechRecognizer", "IdleManager", "PaymentManager", "SpeechSynthesis", "KeyboardLock", "WebOTPService", "OutstandingNetworkRequestDirectSocket", "InjectedJavascript", "InjectedStyleSheet", "KeepaliveRequest", "IndexedDBEvent", "Dummy", "JsNetworkRequestReceivedCacheControlNoStoreResource", "WebRTCUsedWithCCNS", "WebTransportUsedWithCCNS", "WebSocketUsedWithCCNS", "SmartCard", "LiveMediaStreamTrack", "UnloadHandler", "ParserAborted", "ContentSecurityHandler", "ContentWebAuthenticationAPI", "ContentFileChooser", "ContentSerial", "ContentFileSystemAccess", "ContentMediaDevicesDispatcherHost", "ContentWebBluetooth", "ContentWebUSB", "ContentMediaSessionService", "ContentScreenReader", "ContentDiscarded", "EmbedderPopupBlockerTabHelper", "EmbedderSafeBrowsingTriggeredPopupBlocker", "EmbedderSafeBrowsingThreatDetails", "EmbedderAppBannerManager", "EmbedderDomDistillerViewerSource", "EmbedderDomDistillerSelfDeletingRequestDelegate", "EmbedderOomInterventionTabHelper", "EmbedderOfflinePage", "EmbedderChromePasswordManagerClientBindCredentialManager", "EmbedderPermissionRequestManager", "EmbedderModalDialog", "EmbedderExtensions", "EmbedderExtensionMessaging", "EmbedderExtensionMessagingForOpenPort", "EmbedderExtensionSentMessageToCachedFrame", "EmbedderExtensionFrame", "RequestedByWebViewClient", "PostMessageByWebViewClient", "CacheControlNoStoreDeviceBoundSessionTerminated", "CacheLimitPrunedOnModerateMemoryPressure", "CacheLimitPrunedOnCriticalMemoryPressure"]), "Page.BackForwardCacheNotRestoredReason", "type"); +export const BackForwardCacheNotRestoredReasonType = withCdpMeta(z.enum(["SupportPending", "PageSupportNeeded", "Circumstantial"]), "Page.BackForwardCacheNotRestoredReasonType", "type"); +export const BackForwardCacheBlockingDetails = withCdpMeta(z.object({ "url": z.string().optional(), "function": z.string().optional(), "lineNumber": z.number().int(), "columnNumber": z.number().int() }).passthrough(), "Page.BackForwardCacheBlockingDetails", "type"); +export const BackForwardCacheNotRestoredExplanation = withCdpMeta(z.object({ "type": z.lazy(() => BackForwardCacheNotRestoredReasonType), "reason": z.lazy(() => BackForwardCacheNotRestoredReason), "context": z.string().optional(), "details": z.array(z.lazy(() => BackForwardCacheBlockingDetails)).optional() }).passthrough(), "Page.BackForwardCacheNotRestoredExplanation", "type"); +export const BackForwardCacheNotRestoredExplanationTree = withCdpMeta(z.object({ "url": z.string(), "explanations": z.array(z.lazy(() => BackForwardCacheNotRestoredExplanation)), "children": z.array(z.lazy(() => BackForwardCacheNotRestoredExplanationTree)) }).passthrough(), "Page.BackForwardCacheNotRestoredExplanationTree", "type"); +export const AddScriptToEvaluateOnLoadParams = withCdpMeta(z.object({ "scriptSource": z.string() }).passthrough(), "Page.addScriptToEvaluateOnLoad.params", "commandParams", { method: "Page.addScriptToEvaluateOnLoad" }); +export const AddScriptToEvaluateOnLoadResult = withCdpMeta(z.object({ "identifier": z.lazy(() => ScriptIdentifier) }).passthrough(), "Page.addScriptToEvaluateOnLoad.result", "commandResult", { method: "Page.addScriptToEvaluateOnLoad" }); +export const AddScriptToEvaluateOnNewDocumentParams = withCdpMeta(z.object({ "source": z.string(), "worldName": z.string().optional(), "includeCommandLineAPI": z.boolean().optional(), "runImmediately": z.boolean().optional() }).passthrough(), "Page.addScriptToEvaluateOnNewDocument.params", "commandParams", { method: "Page.addScriptToEvaluateOnNewDocument" }); +export const AddScriptToEvaluateOnNewDocumentResult = withCdpMeta(z.object({ "identifier": z.lazy(() => ScriptIdentifier) }).passthrough(), "Page.addScriptToEvaluateOnNewDocument.result", "commandResult", { method: "Page.addScriptToEvaluateOnNewDocument" }); +export const BringToFrontParams = withCdpMeta(z.object({ }).passthrough(), "Page.bringToFront.params", "commandParams", { method: "Page.bringToFront" }); +export const BringToFrontResult = withCdpMeta(z.object({ }).passthrough(), "Page.bringToFront.result", "commandResult", { method: "Page.bringToFront" }); +export const CaptureScreenshotParams = withCdpMeta(z.object({ "format": z.enum(["jpeg", "png", "webp"]).optional(), "quality": z.number().int().optional(), "clip": z.lazy(() => Viewport).optional(), "fromSurface": z.boolean().optional(), "captureBeyondViewport": z.boolean().optional(), "optimizeForSpeed": z.boolean().optional() }).passthrough(), "Page.captureScreenshot.params", "commandParams", { method: "Page.captureScreenshot" }); +export const CaptureScreenshotResult = withCdpMeta(z.object({ "data": z.string() }).passthrough(), "Page.captureScreenshot.result", "commandResult", { method: "Page.captureScreenshot" }); +export const CaptureSnapshotParams = withCdpMeta(z.object({ "format": z.enum(["mhtml"]).optional() }).passthrough(), "Page.captureSnapshot.params", "commandParams", { method: "Page.captureSnapshot" }); +export const CaptureSnapshotResult = withCdpMeta(z.object({ "data": z.string() }).passthrough(), "Page.captureSnapshot.result", "commandResult", { method: "Page.captureSnapshot" }); +export const ClearDeviceMetricsOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Page.clearDeviceMetricsOverride.params", "commandParams", { method: "Page.clearDeviceMetricsOverride" }); +export const ClearDeviceMetricsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.clearDeviceMetricsOverride.result", "commandResult", { method: "Page.clearDeviceMetricsOverride" }); +export const ClearDeviceOrientationOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Page.clearDeviceOrientationOverride.params", "commandParams", { method: "Page.clearDeviceOrientationOverride" }); +export const ClearDeviceOrientationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.clearDeviceOrientationOverride.result", "commandResult", { method: "Page.clearDeviceOrientationOverride" }); +export const ClearGeolocationOverrideParams = withCdpMeta(z.object({ }).passthrough(), "Page.clearGeolocationOverride.params", "commandParams", { method: "Page.clearGeolocationOverride" }); +export const ClearGeolocationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.clearGeolocationOverride.result", "commandResult", { method: "Page.clearGeolocationOverride" }); +export const CreateIsolatedWorldParams = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "worldName": z.string().optional(), "grantUniveralAccess": z.boolean().optional() }).passthrough(), "Page.createIsolatedWorld.params", "commandParams", { method: "Page.createIsolatedWorld" }); +export const CreateIsolatedWorldResult = withCdpMeta(z.object({ "executionContextId": z.lazy(() => Runtime.ExecutionContextId) }).passthrough(), "Page.createIsolatedWorld.result", "commandResult", { method: "Page.createIsolatedWorld" }); +export const DeleteCookieParams = withCdpMeta(z.object({ "cookieName": z.string(), "url": z.string() }).passthrough(), "Page.deleteCookie.params", "commandParams", { method: "Page.deleteCookie" }); +export const DeleteCookieResult = withCdpMeta(z.object({ }).passthrough(), "Page.deleteCookie.result", "commandResult", { method: "Page.deleteCookie" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Page.disable.params", "commandParams", { method: "Page.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Page.disable.result", "commandResult", { method: "Page.disable" }); +export const EnableParams = withCdpMeta(z.object({ "enableFileChooserOpenedEvent": z.boolean().optional() }).passthrough(), "Page.enable.params", "commandParams", { method: "Page.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Page.enable.result", "commandResult", { method: "Page.enable" }); +export const GetAppManifestParams = withCdpMeta(z.object({ "manifestId": z.string().optional() }).passthrough(), "Page.getAppManifest.params", "commandParams", { method: "Page.getAppManifest" }); +export const GetAppManifestResult = withCdpMeta(z.object({ "url": z.string(), "errors": z.array(z.lazy(() => AppManifestError)), "data": z.string().optional(), "parsed": z.lazy(() => AppManifestParsedProperties).optional(), "manifest": z.lazy(() => WebAppManifest) }).passthrough(), "Page.getAppManifest.result", "commandResult", { method: "Page.getAppManifest" }); +export const GetInstallabilityErrorsParams = withCdpMeta(z.object({ }).passthrough(), "Page.getInstallabilityErrors.params", "commandParams", { method: "Page.getInstallabilityErrors" }); +export const GetInstallabilityErrorsResult = withCdpMeta(z.object({ "installabilityErrors": z.array(z.lazy(() => InstallabilityError)) }).passthrough(), "Page.getInstallabilityErrors.result", "commandResult", { method: "Page.getInstallabilityErrors" }); +export const GetManifestIconsParams = withCdpMeta(z.object({ }).passthrough(), "Page.getManifestIcons.params", "commandParams", { method: "Page.getManifestIcons" }); +export const GetManifestIconsResult = withCdpMeta(z.object({ "primaryIcon": z.string().optional() }).passthrough(), "Page.getManifestIcons.result", "commandResult", { method: "Page.getManifestIcons" }); +export const GetAppIdParams = withCdpMeta(z.object({ }).passthrough(), "Page.getAppId.params", "commandParams", { method: "Page.getAppId" }); +export const GetAppIdResult = withCdpMeta(z.object({ "appId": z.string().optional(), "recommendedId": z.string().optional() }).passthrough(), "Page.getAppId.result", "commandResult", { method: "Page.getAppId" }); +export const GetAdScriptAncestryParams = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId) }).passthrough(), "Page.getAdScriptAncestry.params", "commandParams", { method: "Page.getAdScriptAncestry" }); +export const GetAdScriptAncestryResult = withCdpMeta(z.object({ "adScriptAncestry": z.lazy(() => Network.AdAncestry).optional() }).passthrough(), "Page.getAdScriptAncestry.result", "commandResult", { method: "Page.getAdScriptAncestry" }); +export const GetFrameTreeParams = withCdpMeta(z.object({ }).passthrough(), "Page.getFrameTree.params", "commandParams", { method: "Page.getFrameTree" }); +export const GetFrameTreeResult = withCdpMeta(z.object({ "frameTree": z.lazy(() => FrameTree) }).passthrough(), "Page.getFrameTree.result", "commandResult", { method: "Page.getFrameTree" }); +export const GetLayoutMetricsParams = withCdpMeta(z.object({ }).passthrough(), "Page.getLayoutMetrics.params", "commandParams", { method: "Page.getLayoutMetrics" }); +export const GetLayoutMetricsResult = withCdpMeta(z.object({ "layoutViewport": z.lazy(() => LayoutViewport), "visualViewport": z.lazy(() => VisualViewport), "contentSize": z.lazy(() => DOM.Rect), "cssLayoutViewport": z.lazy(() => LayoutViewport), "cssVisualViewport": z.lazy(() => VisualViewport), "cssContentSize": z.lazy(() => DOM.Rect) }).passthrough(), "Page.getLayoutMetrics.result", "commandResult", { method: "Page.getLayoutMetrics" }); +export const GetNavigationHistoryParams = withCdpMeta(z.object({ }).passthrough(), "Page.getNavigationHistory.params", "commandParams", { method: "Page.getNavigationHistory" }); +export const GetNavigationHistoryResult = withCdpMeta(z.object({ "currentIndex": z.number().int(), "entries": z.array(z.lazy(() => NavigationEntry)) }).passthrough(), "Page.getNavigationHistory.result", "commandResult", { method: "Page.getNavigationHistory" }); +export const ResetNavigationHistoryParams = withCdpMeta(z.object({ }).passthrough(), "Page.resetNavigationHistory.params", "commandParams", { method: "Page.resetNavigationHistory" }); +export const ResetNavigationHistoryResult = withCdpMeta(z.object({ }).passthrough(), "Page.resetNavigationHistory.result", "commandResult", { method: "Page.resetNavigationHistory" }); +export const GetResourceContentParams = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "url": z.string() }).passthrough(), "Page.getResourceContent.params", "commandParams", { method: "Page.getResourceContent" }); +export const GetResourceContentResult = withCdpMeta(z.object({ "content": z.string(), "base64Encoded": z.boolean() }).passthrough(), "Page.getResourceContent.result", "commandResult", { method: "Page.getResourceContent" }); +export const GetResourceTreeParams = withCdpMeta(z.object({ }).passthrough(), "Page.getResourceTree.params", "commandParams", { method: "Page.getResourceTree" }); +export const GetResourceTreeResult = withCdpMeta(z.object({ "frameTree": z.lazy(() => FrameResourceTree) }).passthrough(), "Page.getResourceTree.result", "commandResult", { method: "Page.getResourceTree" }); +export const HandleJavaScriptDialogParams = withCdpMeta(z.object({ "accept": z.boolean(), "promptText": z.string().optional() }).passthrough(), "Page.handleJavaScriptDialog.params", "commandParams", { method: "Page.handleJavaScriptDialog" }); +export const HandleJavaScriptDialogResult = withCdpMeta(z.object({ }).passthrough(), "Page.handleJavaScriptDialog.result", "commandResult", { method: "Page.handleJavaScriptDialog" }); +export const NavigateParams = withCdpMeta(z.object({ "url": z.string(), "referrer": z.string().optional(), "transitionType": z.lazy(() => TransitionType).optional(), "frameId": z.lazy(() => FrameId).optional(), "referrerPolicy": z.lazy(() => ReferrerPolicy).optional() }).passthrough(), "Page.navigate.params", "commandParams", { method: "Page.navigate" }); +export const NavigateResult = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "loaderId": z.lazy(() => Network.LoaderId).optional(), "errorText": z.string().optional(), "isDownload": z.boolean().optional() }).passthrough(), "Page.navigate.result", "commandResult", { method: "Page.navigate" }); +export const NavigateToHistoryEntryParams = withCdpMeta(z.object({ "entryId": z.number().int() }).passthrough(), "Page.navigateToHistoryEntry.params", "commandParams", { method: "Page.navigateToHistoryEntry" }); +export const NavigateToHistoryEntryResult = withCdpMeta(z.object({ }).passthrough(), "Page.navigateToHistoryEntry.result", "commandResult", { method: "Page.navigateToHistoryEntry" }); +export const PrintToPDFParams = withCdpMeta(z.object({ "landscape": z.boolean().optional(), "displayHeaderFooter": z.boolean().optional(), "printBackground": z.boolean().optional(), "scale": z.number().optional(), "paperWidth": z.number().optional(), "paperHeight": z.number().optional(), "marginTop": z.number().optional(), "marginBottom": z.number().optional(), "marginLeft": z.number().optional(), "marginRight": z.number().optional(), "pageRanges": z.string().optional(), "headerTemplate": z.string().optional(), "footerTemplate": z.string().optional(), "preferCSSPageSize": z.boolean().optional(), "transferMode": z.enum(["ReturnAsBase64", "ReturnAsStream"]).optional(), "generateTaggedPDF": z.boolean().optional(), "generateDocumentOutline": z.boolean().optional() }).passthrough(), "Page.printToPDF.params", "commandParams", { method: "Page.printToPDF" }); +export const PrintToPDFResult = withCdpMeta(z.object({ "data": z.string(), "stream": z.lazy(() => IO.StreamHandle).optional() }).passthrough(), "Page.printToPDF.result", "commandResult", { method: "Page.printToPDF" }); +export const ReloadParams = withCdpMeta(z.object({ "ignoreCache": z.boolean().optional(), "scriptToEvaluateOnLoad": z.string().optional(), "loaderId": z.lazy(() => Network.LoaderId).optional() }).passthrough(), "Page.reload.params", "commandParams", { method: "Page.reload" }); +export const ReloadResult = withCdpMeta(z.object({ }).passthrough(), "Page.reload.result", "commandResult", { method: "Page.reload" }); +export const RemoveScriptToEvaluateOnLoadParams = withCdpMeta(z.object({ "identifier": z.lazy(() => ScriptIdentifier) }).passthrough(), "Page.removeScriptToEvaluateOnLoad.params", "commandParams", { method: "Page.removeScriptToEvaluateOnLoad" }); +export const RemoveScriptToEvaluateOnLoadResult = withCdpMeta(z.object({ }).passthrough(), "Page.removeScriptToEvaluateOnLoad.result", "commandResult", { method: "Page.removeScriptToEvaluateOnLoad" }); +export const RemoveScriptToEvaluateOnNewDocumentParams = withCdpMeta(z.object({ "identifier": z.lazy(() => ScriptIdentifier) }).passthrough(), "Page.removeScriptToEvaluateOnNewDocument.params", "commandParams", { method: "Page.removeScriptToEvaluateOnNewDocument" }); +export const RemoveScriptToEvaluateOnNewDocumentResult = withCdpMeta(z.object({ }).passthrough(), "Page.removeScriptToEvaluateOnNewDocument.result", "commandResult", { method: "Page.removeScriptToEvaluateOnNewDocument" }); +export const ScreencastFrameAckParams = withCdpMeta(z.object({ "sessionId": z.number().int() }).passthrough(), "Page.screencastFrameAck.params", "commandParams", { method: "Page.screencastFrameAck" }); +export const ScreencastFrameAckResult = withCdpMeta(z.object({ }).passthrough(), "Page.screencastFrameAck.result", "commandResult", { method: "Page.screencastFrameAck" }); +export const SearchInResourceParams = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "url": z.string(), "query": z.string(), "caseSensitive": z.boolean().optional(), "isRegex": z.boolean().optional() }).passthrough(), "Page.searchInResource.params", "commandParams", { method: "Page.searchInResource" }); +export const SearchInResourceResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => Debugger.SearchMatch)) }).passthrough(), "Page.searchInResource.result", "commandResult", { method: "Page.searchInResource" }); +export const SetAdBlockingEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Page.setAdBlockingEnabled.params", "commandParams", { method: "Page.setAdBlockingEnabled" }); +export const SetAdBlockingEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Page.setAdBlockingEnabled.result", "commandResult", { method: "Page.setAdBlockingEnabled" }); +export const SetBypassCSPParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Page.setBypassCSP.params", "commandParams", { method: "Page.setBypassCSP" }); +export const SetBypassCSPResult = withCdpMeta(z.object({ }).passthrough(), "Page.setBypassCSP.result", "commandResult", { method: "Page.setBypassCSP" }); +export const GetPermissionsPolicyStateParams = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId) }).passthrough(), "Page.getPermissionsPolicyState.params", "commandParams", { method: "Page.getPermissionsPolicyState" }); +export const GetPermissionsPolicyStateResult = withCdpMeta(z.object({ "states": z.array(z.lazy(() => PermissionsPolicyFeatureState)) }).passthrough(), "Page.getPermissionsPolicyState.result", "commandResult", { method: "Page.getPermissionsPolicyState" }); +export const GetOriginTrialsParams = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId) }).passthrough(), "Page.getOriginTrials.params", "commandParams", { method: "Page.getOriginTrials" }); +export const GetOriginTrialsResult = withCdpMeta(z.object({ "originTrials": z.array(z.lazy(() => OriginTrial)) }).passthrough(), "Page.getOriginTrials.result", "commandResult", { method: "Page.getOriginTrials" }); +export const SetDeviceMetricsOverrideParams = withCdpMeta(z.object({ "width": z.number().int(), "height": z.number().int(), "deviceScaleFactor": z.number(), "mobile": z.boolean(), "scale": z.number().optional(), "screenWidth": z.number().int().optional(), "screenHeight": z.number().int().optional(), "positionX": z.number().int().optional(), "positionY": z.number().int().optional(), "dontSetVisibleSize": z.boolean().optional(), "screenOrientation": z.lazy(() => Emulation.ScreenOrientation).optional(), "viewport": z.lazy(() => Viewport).optional() }).passthrough(), "Page.setDeviceMetricsOverride.params", "commandParams", { method: "Page.setDeviceMetricsOverride" }); +export const SetDeviceMetricsOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.setDeviceMetricsOverride.result", "commandResult", { method: "Page.setDeviceMetricsOverride" }); +export const SetDeviceOrientationOverrideParams = withCdpMeta(z.object({ "alpha": z.number(), "beta": z.number(), "gamma": z.number() }).passthrough(), "Page.setDeviceOrientationOverride.params", "commandParams", { method: "Page.setDeviceOrientationOverride" }); +export const SetDeviceOrientationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.setDeviceOrientationOverride.result", "commandResult", { method: "Page.setDeviceOrientationOverride" }); +export const SetFontFamiliesParams = withCdpMeta(z.object({ "fontFamilies": z.lazy(() => FontFamilies), "forScripts": z.array(z.lazy(() => ScriptFontFamilies)).optional() }).passthrough(), "Page.setFontFamilies.params", "commandParams", { method: "Page.setFontFamilies" }); +export const SetFontFamiliesResult = withCdpMeta(z.object({ }).passthrough(), "Page.setFontFamilies.result", "commandResult", { method: "Page.setFontFamilies" }); +export const SetFontSizesParams = withCdpMeta(z.object({ "fontSizes": z.lazy(() => FontSizes) }).passthrough(), "Page.setFontSizes.params", "commandParams", { method: "Page.setFontSizes" }); +export const SetFontSizesResult = withCdpMeta(z.object({ }).passthrough(), "Page.setFontSizes.result", "commandResult", { method: "Page.setFontSizes" }); +export const SetDocumentContentParams = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "html": z.string() }).passthrough(), "Page.setDocumentContent.params", "commandParams", { method: "Page.setDocumentContent" }); +export const SetDocumentContentResult = withCdpMeta(z.object({ }).passthrough(), "Page.setDocumentContent.result", "commandResult", { method: "Page.setDocumentContent" }); +export const SetDownloadBehaviorParams = withCdpMeta(z.object({ "behavior": z.enum(["deny", "allow", "default"]), "downloadPath": z.string().optional() }).passthrough(), "Page.setDownloadBehavior.params", "commandParams", { method: "Page.setDownloadBehavior" }); +export const SetDownloadBehaviorResult = withCdpMeta(z.object({ }).passthrough(), "Page.setDownloadBehavior.result", "commandResult", { method: "Page.setDownloadBehavior" }); +export const SetGeolocationOverrideParams = withCdpMeta(z.object({ "latitude": z.number().optional(), "longitude": z.number().optional(), "accuracy": z.number().optional() }).passthrough(), "Page.setGeolocationOverride.params", "commandParams", { method: "Page.setGeolocationOverride" }); +export const SetGeolocationOverrideResult = withCdpMeta(z.object({ }).passthrough(), "Page.setGeolocationOverride.result", "commandResult", { method: "Page.setGeolocationOverride" }); +export const SetLifecycleEventsEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Page.setLifecycleEventsEnabled.params", "commandParams", { method: "Page.setLifecycleEventsEnabled" }); +export const SetLifecycleEventsEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Page.setLifecycleEventsEnabled.result", "commandResult", { method: "Page.setLifecycleEventsEnabled" }); +export const SetTouchEmulationEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean(), "configuration": z.enum(["mobile", "desktop"]).optional() }).passthrough(), "Page.setTouchEmulationEnabled.params", "commandParams", { method: "Page.setTouchEmulationEnabled" }); +export const SetTouchEmulationEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Page.setTouchEmulationEnabled.result", "commandResult", { method: "Page.setTouchEmulationEnabled" }); +export const StartScreencastParams = withCdpMeta(z.object({ "format": z.enum(["jpeg", "png"]).optional(), "quality": z.number().int().optional(), "maxWidth": z.number().int().optional(), "maxHeight": z.number().int().optional(), "everyNthFrame": z.number().int().optional() }).passthrough(), "Page.startScreencast.params", "commandParams", { method: "Page.startScreencast" }); +export const StartScreencastResult = withCdpMeta(z.object({ }).passthrough(), "Page.startScreencast.result", "commandResult", { method: "Page.startScreencast" }); +export const StopLoadingParams = withCdpMeta(z.object({ }).passthrough(), "Page.stopLoading.params", "commandParams", { method: "Page.stopLoading" }); +export const StopLoadingResult = withCdpMeta(z.object({ }).passthrough(), "Page.stopLoading.result", "commandResult", { method: "Page.stopLoading" }); +export const CrashParams = withCdpMeta(z.object({ }).passthrough(), "Page.crash.params", "commandParams", { method: "Page.crash" }); +export const CrashResult = withCdpMeta(z.object({ }).passthrough(), "Page.crash.result", "commandResult", { method: "Page.crash" }); +export const CloseParams = withCdpMeta(z.object({ }).passthrough(), "Page.close.params", "commandParams", { method: "Page.close" }); +export const CloseResult = withCdpMeta(z.object({ }).passthrough(), "Page.close.result", "commandResult", { method: "Page.close" }); +export const SetWebLifecycleStateParams = withCdpMeta(z.object({ "state": z.enum(["frozen", "active"]) }).passthrough(), "Page.setWebLifecycleState.params", "commandParams", { method: "Page.setWebLifecycleState" }); +export const SetWebLifecycleStateResult = withCdpMeta(z.object({ }).passthrough(), "Page.setWebLifecycleState.result", "commandResult", { method: "Page.setWebLifecycleState" }); +export const StopScreencastParams = withCdpMeta(z.object({ }).passthrough(), "Page.stopScreencast.params", "commandParams", { method: "Page.stopScreencast" }); +export const StopScreencastResult = withCdpMeta(z.object({ }).passthrough(), "Page.stopScreencast.result", "commandResult", { method: "Page.stopScreencast" }); +export const ProduceCompilationCacheParams = withCdpMeta(z.object({ "scripts": z.array(z.lazy(() => CompilationCacheParams)) }).passthrough(), "Page.produceCompilationCache.params", "commandParams", { method: "Page.produceCompilationCache" }); +export const ProduceCompilationCacheResult = withCdpMeta(z.object({ }).passthrough(), "Page.produceCompilationCache.result", "commandResult", { method: "Page.produceCompilationCache" }); +export const AddCompilationCacheParams = withCdpMeta(z.object({ "url": z.string(), "data": z.string() }).passthrough(), "Page.addCompilationCache.params", "commandParams", { method: "Page.addCompilationCache" }); +export const AddCompilationCacheResult = withCdpMeta(z.object({ }).passthrough(), "Page.addCompilationCache.result", "commandResult", { method: "Page.addCompilationCache" }); +export const ClearCompilationCacheParams = withCdpMeta(z.object({ }).passthrough(), "Page.clearCompilationCache.params", "commandParams", { method: "Page.clearCompilationCache" }); +export const ClearCompilationCacheResult = withCdpMeta(z.object({ }).passthrough(), "Page.clearCompilationCache.result", "commandResult", { method: "Page.clearCompilationCache" }); +export const SetSPCTransactionModeParams = withCdpMeta(z.object({ "mode": z.enum(["none", "autoAccept", "autoChooseToAuthAnotherWay", "autoReject", "autoOptOut"]) }).passthrough(), "Page.setSPCTransactionMode.params", "commandParams", { method: "Page.setSPCTransactionMode" }); +export const SetSPCTransactionModeResult = withCdpMeta(z.object({ }).passthrough(), "Page.setSPCTransactionMode.result", "commandResult", { method: "Page.setSPCTransactionMode" }); +export const SetRPHRegistrationModeParams = withCdpMeta(z.object({ "mode": z.enum(["none", "autoAccept", "autoReject"]) }).passthrough(), "Page.setRPHRegistrationMode.params", "commandParams", { method: "Page.setRPHRegistrationMode" }); +export const SetRPHRegistrationModeResult = withCdpMeta(z.object({ }).passthrough(), "Page.setRPHRegistrationMode.result", "commandResult", { method: "Page.setRPHRegistrationMode" }); +export const GenerateTestReportParams = withCdpMeta(z.object({ "message": z.string(), "group": z.string().optional() }).passthrough(), "Page.generateTestReport.params", "commandParams", { method: "Page.generateTestReport" }); +export const GenerateTestReportResult = withCdpMeta(z.object({ }).passthrough(), "Page.generateTestReport.result", "commandResult", { method: "Page.generateTestReport" }); +export const WaitForDebuggerParams = withCdpMeta(z.object({ }).passthrough(), "Page.waitForDebugger.params", "commandParams", { method: "Page.waitForDebugger" }); +export const WaitForDebuggerResult = withCdpMeta(z.object({ }).passthrough(), "Page.waitForDebugger.result", "commandResult", { method: "Page.waitForDebugger" }); +export const SetInterceptFileChooserDialogParams = withCdpMeta(z.object({ "enabled": z.boolean(), "cancel": z.boolean().optional() }).passthrough(), "Page.setInterceptFileChooserDialog.params", "commandParams", { method: "Page.setInterceptFileChooserDialog" }); +export const SetInterceptFileChooserDialogResult = withCdpMeta(z.object({ }).passthrough(), "Page.setInterceptFileChooserDialog.result", "commandResult", { method: "Page.setInterceptFileChooserDialog" }); +export const SetPrerenderingAllowedParams = withCdpMeta(z.object({ "isAllowed": z.boolean() }).passthrough(), "Page.setPrerenderingAllowed.params", "commandParams", { method: "Page.setPrerenderingAllowed" }); +export const SetPrerenderingAllowedResult = withCdpMeta(z.object({ }).passthrough(), "Page.setPrerenderingAllowed.result", "commandResult", { method: "Page.setPrerenderingAllowed" }); +export const GetAnnotatedPageContentParams = withCdpMeta(z.object({ "includeActionableInformation": z.boolean().optional() }).passthrough(), "Page.getAnnotatedPageContent.params", "commandParams", { method: "Page.getAnnotatedPageContent" }); +export const GetAnnotatedPageContentResult = withCdpMeta(z.object({ "content": z.string() }).passthrough(), "Page.getAnnotatedPageContent.result", "commandResult", { method: "Page.getAnnotatedPageContent" }); +export const DomContentEventFiredEvent = withCdpMeta(z.object({ "timestamp": z.lazy(() => Network.MonotonicTime) }).passthrough(), "Page.domContentEventFired", "event", { phase: "event" }); +export const FileChooserOpenedEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "mode": z.enum(["selectSingle", "selectMultiple"]), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional() }).passthrough(), "Page.fileChooserOpened", "event", { phase: "event" }); +export const FrameAttachedEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "parentFrameId": z.lazy(() => FrameId), "stack": z.lazy(() => Runtime.StackTrace).optional() }).passthrough(), "Page.frameAttached", "event", { phase: "event" }); +export const FrameClearedScheduledNavigationEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId) }).passthrough(), "Page.frameClearedScheduledNavigation", "event", { phase: "event" }); +export const FrameDetachedEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "reason": z.enum(["remove", "swap"]) }).passthrough(), "Page.frameDetached", "event", { phase: "event" }); +export const FrameSubtreeWillBeDetachedEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId) }).passthrough(), "Page.frameSubtreeWillBeDetached", "event", { phase: "event" }); +export const FrameNavigatedEvent = withCdpMeta(z.object({ "frame": z.lazy(() => Frame), "type": z.lazy(() => NavigationType) }).passthrough(), "Page.frameNavigated", "event", { phase: "event" }); +export const DocumentOpenedEvent = withCdpMeta(z.object({ "frame": z.lazy(() => Frame) }).passthrough(), "Page.documentOpened", "event", { phase: "event" }); +export const FrameResizedEvent = withCdpMeta(z.object({ }).passthrough(), "Page.frameResized", "event", { phase: "event" }); +export const FrameStartedNavigatingEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "url": z.string(), "loaderId": z.lazy(() => Network.LoaderId), "navigationType": z.enum(["reload", "reloadBypassingCache", "restore", "restoreWithPost", "historySameDocument", "historyDifferentDocument", "sameDocument", "differentDocument"]) }).passthrough(), "Page.frameStartedNavigating", "event", { phase: "event" }); +export const FrameRequestedNavigationEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "reason": z.lazy(() => ClientNavigationReason), "url": z.string(), "disposition": z.lazy(() => ClientNavigationDisposition) }).passthrough(), "Page.frameRequestedNavigation", "event", { phase: "event" }); +export const FrameScheduledNavigationEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "delay": z.number(), "reason": z.lazy(() => ClientNavigationReason), "url": z.string() }).passthrough(), "Page.frameScheduledNavigation", "event", { phase: "event" }); +export const FrameStartedLoadingEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId) }).passthrough(), "Page.frameStartedLoading", "event", { phase: "event" }); +export const FrameStoppedLoadingEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId) }).passthrough(), "Page.frameStoppedLoading", "event", { phase: "event" }); +export const DownloadWillBeginEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "guid": z.string(), "url": z.string(), "suggestedFilename": z.string() }).passthrough(), "Page.downloadWillBegin", "event", { phase: "event" }); +export const DownloadProgressEvent = withCdpMeta(z.object({ "guid": z.string(), "totalBytes": z.number(), "receivedBytes": z.number(), "state": z.enum(["inProgress", "completed", "canceled"]) }).passthrough(), "Page.downloadProgress", "event", { phase: "event" }); +export const InterstitialHiddenEvent = withCdpMeta(z.object({ }).passthrough(), "Page.interstitialHidden", "event", { phase: "event" }); +export const InterstitialShownEvent = withCdpMeta(z.object({ }).passthrough(), "Page.interstitialShown", "event", { phase: "event" }); +export const JavascriptDialogClosedEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "result": z.boolean(), "userInput": z.string() }).passthrough(), "Page.javascriptDialogClosed", "event", { phase: "event" }); +export const JavascriptDialogOpeningEvent = withCdpMeta(z.object({ "url": z.string(), "frameId": z.lazy(() => FrameId), "message": z.string(), "type": z.lazy(() => DialogType), "hasBrowserHandler": z.boolean(), "defaultPrompt": z.string().optional() }).passthrough(), "Page.javascriptDialogOpening", "event", { phase: "event" }); +export const LifecycleEventEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "loaderId": z.lazy(() => Network.LoaderId), "name": z.string(), "timestamp": z.lazy(() => Network.MonotonicTime) }).passthrough(), "Page.lifecycleEvent", "event", { phase: "event" }); +export const BackForwardCacheNotUsedEvent = withCdpMeta(z.object({ "loaderId": z.lazy(() => Network.LoaderId), "frameId": z.lazy(() => FrameId), "notRestoredExplanations": z.array(z.lazy(() => BackForwardCacheNotRestoredExplanation)), "notRestoredExplanationsTree": z.lazy(() => BackForwardCacheNotRestoredExplanationTree).optional() }).passthrough(), "Page.backForwardCacheNotUsed", "event", { phase: "event" }); +export const LoadEventFiredEvent = withCdpMeta(z.object({ "timestamp": z.lazy(() => Network.MonotonicTime) }).passthrough(), "Page.loadEventFired", "event", { phase: "event" }); +export const NavigatedWithinDocumentEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => FrameId), "url": z.string(), "navigationType": z.enum(["fragment", "historyApi", "other"]) }).passthrough(), "Page.navigatedWithinDocument", "event", { phase: "event" }); +export const ScreencastFrameEvent = withCdpMeta(z.object({ "data": z.string(), "metadata": z.lazy(() => ScreencastFrameMetadata), "sessionId": z.number().int() }).passthrough(), "Page.screencastFrame", "event", { phase: "event" }); +export const ScreencastVisibilityChangedEvent = withCdpMeta(z.object({ "visible": z.boolean() }).passthrough(), "Page.screencastVisibilityChanged", "event", { phase: "event" }); +export const WindowOpenEvent = withCdpMeta(z.object({ "url": z.string(), "windowName": z.string(), "windowFeatures": z.array(z.string()), "userGesture": z.boolean() }).passthrough(), "Page.windowOpen", "event", { phase: "event" }); +export const CompilationCacheProducedEvent = withCdpMeta(z.object({ "url": z.string(), "data": z.string() }).passthrough(), "Page.compilationCacheProduced", "event", { phase: "event" }); + +export const zod = { + FrameId: FrameId, + AdFrameType: AdFrameType, + AdFrameExplanation: AdFrameExplanation, + AdFrameStatus: AdFrameStatus, + SecureContextType: SecureContextType, + CrossOriginIsolatedContextType: CrossOriginIsolatedContextType, + GatedAPIFeatures: GatedAPIFeatures, + PermissionsPolicyFeature: PermissionsPolicyFeature, + PermissionsPolicyBlockReason: PermissionsPolicyBlockReason, + PermissionsPolicyBlockLocator: PermissionsPolicyBlockLocator, + PermissionsPolicyFeatureState: PermissionsPolicyFeatureState, + OriginTrialTokenStatus: OriginTrialTokenStatus, + OriginTrialStatus: OriginTrialStatus, + OriginTrialUsageRestriction: OriginTrialUsageRestriction, + OriginTrialToken: OriginTrialToken, + OriginTrialTokenWithStatus: OriginTrialTokenWithStatus, + OriginTrial: OriginTrial, + SecurityOriginDetails: SecurityOriginDetails, + Frame: Frame, + FrameResource: FrameResource, + FrameResourceTree: FrameResourceTree, + FrameTree: FrameTree, + ScriptIdentifier: ScriptIdentifier, + TransitionType: TransitionType, + NavigationEntry: NavigationEntry, + ScreencastFrameMetadata: ScreencastFrameMetadata, + DialogType: DialogType, + AppManifestError: AppManifestError, + AppManifestParsedProperties: AppManifestParsedProperties, + LayoutViewport: LayoutViewport, + VisualViewport: VisualViewport, + Viewport: Viewport, + FontFamilies: FontFamilies, + ScriptFontFamilies: ScriptFontFamilies, + FontSizes: FontSizes, + ClientNavigationReason: ClientNavigationReason, + ClientNavigationDisposition: ClientNavigationDisposition, + InstallabilityErrorArgument: InstallabilityErrorArgument, + InstallabilityError: InstallabilityError, + ReferrerPolicy: ReferrerPolicy, + CompilationCacheParams: CompilationCacheParams, + FileFilter: FileFilter, + FileHandler: FileHandler, + ImageResource: ImageResource, + LaunchHandler: LaunchHandler, + ProtocolHandler: ProtocolHandler, + RelatedApplication: RelatedApplication, + ScopeExtension: ScopeExtension, + Screenshot: Screenshot, + ShareTarget: ShareTarget, + Shortcut: Shortcut, + WebAppManifest: WebAppManifest, + NavigationType: NavigationType, + BackForwardCacheNotRestoredReason: BackForwardCacheNotRestoredReason, + BackForwardCacheNotRestoredReasonType: BackForwardCacheNotRestoredReasonType, + BackForwardCacheBlockingDetails: BackForwardCacheBlockingDetails, + BackForwardCacheNotRestoredExplanation: BackForwardCacheNotRestoredExplanation, + BackForwardCacheNotRestoredExplanationTree: BackForwardCacheNotRestoredExplanationTree, + AddScriptToEvaluateOnLoadParams: AddScriptToEvaluateOnLoadParams, + AddScriptToEvaluateOnLoadResult: AddScriptToEvaluateOnLoadResult, + AddScriptToEvaluateOnNewDocumentParams: AddScriptToEvaluateOnNewDocumentParams, + AddScriptToEvaluateOnNewDocumentResult: AddScriptToEvaluateOnNewDocumentResult, + BringToFrontParams: BringToFrontParams, + BringToFrontResult: BringToFrontResult, + CaptureScreenshotParams: CaptureScreenshotParams, + CaptureScreenshotResult: CaptureScreenshotResult, + CaptureSnapshotParams: CaptureSnapshotParams, + CaptureSnapshotResult: CaptureSnapshotResult, + ClearDeviceMetricsOverrideParams: ClearDeviceMetricsOverrideParams, + ClearDeviceMetricsOverrideResult: ClearDeviceMetricsOverrideResult, + ClearDeviceOrientationOverrideParams: ClearDeviceOrientationOverrideParams, + ClearDeviceOrientationOverrideResult: ClearDeviceOrientationOverrideResult, + ClearGeolocationOverrideParams: ClearGeolocationOverrideParams, + ClearGeolocationOverrideResult: ClearGeolocationOverrideResult, + CreateIsolatedWorldParams: CreateIsolatedWorldParams, + CreateIsolatedWorldResult: CreateIsolatedWorldResult, + DeleteCookieParams: DeleteCookieParams, + DeleteCookieResult: DeleteCookieResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + GetAppManifestParams: GetAppManifestParams, + GetAppManifestResult: GetAppManifestResult, + GetInstallabilityErrorsParams: GetInstallabilityErrorsParams, + GetInstallabilityErrorsResult: GetInstallabilityErrorsResult, + GetManifestIconsParams: GetManifestIconsParams, + GetManifestIconsResult: GetManifestIconsResult, + GetAppIdParams: GetAppIdParams, + GetAppIdResult: GetAppIdResult, + GetAdScriptAncestryParams: GetAdScriptAncestryParams, + GetAdScriptAncestryResult: GetAdScriptAncestryResult, + GetFrameTreeParams: GetFrameTreeParams, + GetFrameTreeResult: GetFrameTreeResult, + GetLayoutMetricsParams: GetLayoutMetricsParams, + GetLayoutMetricsResult: GetLayoutMetricsResult, + GetNavigationHistoryParams: GetNavigationHistoryParams, + GetNavigationHistoryResult: GetNavigationHistoryResult, + ResetNavigationHistoryParams: ResetNavigationHistoryParams, + ResetNavigationHistoryResult: ResetNavigationHistoryResult, + GetResourceContentParams: GetResourceContentParams, + GetResourceContentResult: GetResourceContentResult, + GetResourceTreeParams: GetResourceTreeParams, + GetResourceTreeResult: GetResourceTreeResult, + HandleJavaScriptDialogParams: HandleJavaScriptDialogParams, + HandleJavaScriptDialogResult: HandleJavaScriptDialogResult, + NavigateParams: NavigateParams, + NavigateResult: NavigateResult, + NavigateToHistoryEntryParams: NavigateToHistoryEntryParams, + NavigateToHistoryEntryResult: NavigateToHistoryEntryResult, + PrintToPDFParams: PrintToPDFParams, + PrintToPDFResult: PrintToPDFResult, + ReloadParams: ReloadParams, + ReloadResult: ReloadResult, + RemoveScriptToEvaluateOnLoadParams: RemoveScriptToEvaluateOnLoadParams, + RemoveScriptToEvaluateOnLoadResult: RemoveScriptToEvaluateOnLoadResult, + RemoveScriptToEvaluateOnNewDocumentParams: RemoveScriptToEvaluateOnNewDocumentParams, + RemoveScriptToEvaluateOnNewDocumentResult: RemoveScriptToEvaluateOnNewDocumentResult, + ScreencastFrameAckParams: ScreencastFrameAckParams, + ScreencastFrameAckResult: ScreencastFrameAckResult, + SearchInResourceParams: SearchInResourceParams, + SearchInResourceResult: SearchInResourceResult, + SetAdBlockingEnabledParams: SetAdBlockingEnabledParams, + SetAdBlockingEnabledResult: SetAdBlockingEnabledResult, + SetBypassCSPParams: SetBypassCSPParams, + SetBypassCSPResult: SetBypassCSPResult, + GetPermissionsPolicyStateParams: GetPermissionsPolicyStateParams, + GetPermissionsPolicyStateResult: GetPermissionsPolicyStateResult, + GetOriginTrialsParams: GetOriginTrialsParams, + GetOriginTrialsResult: GetOriginTrialsResult, + SetDeviceMetricsOverrideParams: SetDeviceMetricsOverrideParams, + SetDeviceMetricsOverrideResult: SetDeviceMetricsOverrideResult, + SetDeviceOrientationOverrideParams: SetDeviceOrientationOverrideParams, + SetDeviceOrientationOverrideResult: SetDeviceOrientationOverrideResult, + SetFontFamiliesParams: SetFontFamiliesParams, + SetFontFamiliesResult: SetFontFamiliesResult, + SetFontSizesParams: SetFontSizesParams, + SetFontSizesResult: SetFontSizesResult, + SetDocumentContentParams: SetDocumentContentParams, + SetDocumentContentResult: SetDocumentContentResult, + SetDownloadBehaviorParams: SetDownloadBehaviorParams, + SetDownloadBehaviorResult: SetDownloadBehaviorResult, + SetGeolocationOverrideParams: SetGeolocationOverrideParams, + SetGeolocationOverrideResult: SetGeolocationOverrideResult, + SetLifecycleEventsEnabledParams: SetLifecycleEventsEnabledParams, + SetLifecycleEventsEnabledResult: SetLifecycleEventsEnabledResult, + SetTouchEmulationEnabledParams: SetTouchEmulationEnabledParams, + SetTouchEmulationEnabledResult: SetTouchEmulationEnabledResult, + StartScreencastParams: StartScreencastParams, + StartScreencastResult: StartScreencastResult, + StopLoadingParams: StopLoadingParams, + StopLoadingResult: StopLoadingResult, + CrashParams: CrashParams, + CrashResult: CrashResult, + CloseParams: CloseParams, + CloseResult: CloseResult, + SetWebLifecycleStateParams: SetWebLifecycleStateParams, + SetWebLifecycleStateResult: SetWebLifecycleStateResult, + StopScreencastParams: StopScreencastParams, + StopScreencastResult: StopScreencastResult, + ProduceCompilationCacheParams: ProduceCompilationCacheParams, + ProduceCompilationCacheResult: ProduceCompilationCacheResult, + AddCompilationCacheParams: AddCompilationCacheParams, + AddCompilationCacheResult: AddCompilationCacheResult, + ClearCompilationCacheParams: ClearCompilationCacheParams, + ClearCompilationCacheResult: ClearCompilationCacheResult, + SetSPCTransactionModeParams: SetSPCTransactionModeParams, + SetSPCTransactionModeResult: SetSPCTransactionModeResult, + SetRPHRegistrationModeParams: SetRPHRegistrationModeParams, + SetRPHRegistrationModeResult: SetRPHRegistrationModeResult, + GenerateTestReportParams: GenerateTestReportParams, + GenerateTestReportResult: GenerateTestReportResult, + WaitForDebuggerParams: WaitForDebuggerParams, + WaitForDebuggerResult: WaitForDebuggerResult, + SetInterceptFileChooserDialogParams: SetInterceptFileChooserDialogParams, + SetInterceptFileChooserDialogResult: SetInterceptFileChooserDialogResult, + SetPrerenderingAllowedParams: SetPrerenderingAllowedParams, + SetPrerenderingAllowedResult: SetPrerenderingAllowedResult, + GetAnnotatedPageContentParams: GetAnnotatedPageContentParams, + GetAnnotatedPageContentResult: GetAnnotatedPageContentResult, + DomContentEventFiredEvent: DomContentEventFiredEvent, + FileChooserOpenedEvent: FileChooserOpenedEvent, + FrameAttachedEvent: FrameAttachedEvent, + FrameClearedScheduledNavigationEvent: FrameClearedScheduledNavigationEvent, + FrameDetachedEvent: FrameDetachedEvent, + FrameSubtreeWillBeDetachedEvent: FrameSubtreeWillBeDetachedEvent, + FrameNavigatedEvent: FrameNavigatedEvent, + DocumentOpenedEvent: DocumentOpenedEvent, + FrameResizedEvent: FrameResizedEvent, + FrameStartedNavigatingEvent: FrameStartedNavigatingEvent, + FrameRequestedNavigationEvent: FrameRequestedNavigationEvent, + FrameScheduledNavigationEvent: FrameScheduledNavigationEvent, + FrameStartedLoadingEvent: FrameStartedLoadingEvent, + FrameStoppedLoadingEvent: FrameStoppedLoadingEvent, + DownloadWillBeginEvent: DownloadWillBeginEvent, + DownloadProgressEvent: DownloadProgressEvent, + InterstitialHiddenEvent: InterstitialHiddenEvent, + InterstitialShownEvent: InterstitialShownEvent, + JavascriptDialogClosedEvent: JavascriptDialogClosedEvent, + JavascriptDialogOpeningEvent: JavascriptDialogOpeningEvent, + LifecycleEventEvent: LifecycleEventEvent, + BackForwardCacheNotUsedEvent: BackForwardCacheNotUsedEvent, + LoadEventFiredEvent: LoadEventFiredEvent, + NavigatedWithinDocumentEvent: NavigatedWithinDocumentEvent, + ScreencastFrameEvent: ScreencastFrameEvent, + ScreencastVisibilityChangedEvent: ScreencastVisibilityChangedEvent, + WindowOpenEvent: WindowOpenEvent, + CompilationCacheProducedEvent: CompilationCacheProducedEvent, +} as const; +export const commands = { + "Page.addScriptToEvaluateOnLoad": { params: AddScriptToEvaluateOnLoadParams, result: AddScriptToEvaluateOnLoadResult }, + "Page.addScriptToEvaluateOnNewDocument": { params: AddScriptToEvaluateOnNewDocumentParams, result: AddScriptToEvaluateOnNewDocumentResult }, + "Page.bringToFront": { params: BringToFrontParams, result: BringToFrontResult }, + "Page.captureScreenshot": { params: CaptureScreenshotParams, result: CaptureScreenshotResult }, + "Page.captureSnapshot": { params: CaptureSnapshotParams, result: CaptureSnapshotResult }, + "Page.clearDeviceMetricsOverride": { params: ClearDeviceMetricsOverrideParams, result: ClearDeviceMetricsOverrideResult }, + "Page.clearDeviceOrientationOverride": { params: ClearDeviceOrientationOverrideParams, result: ClearDeviceOrientationOverrideResult }, + "Page.clearGeolocationOverride": { params: ClearGeolocationOverrideParams, result: ClearGeolocationOverrideResult }, + "Page.createIsolatedWorld": { params: CreateIsolatedWorldParams, result: CreateIsolatedWorldResult }, + "Page.deleteCookie": { params: DeleteCookieParams, result: DeleteCookieResult }, + "Page.disable": { params: DisableParams, result: DisableResult }, + "Page.enable": { params: EnableParams, result: EnableResult }, + "Page.getAppManifest": { params: GetAppManifestParams, result: GetAppManifestResult }, + "Page.getInstallabilityErrors": { params: GetInstallabilityErrorsParams, result: GetInstallabilityErrorsResult }, + "Page.getManifestIcons": { params: GetManifestIconsParams, result: GetManifestIconsResult }, + "Page.getAppId": { params: GetAppIdParams, result: GetAppIdResult }, + "Page.getAdScriptAncestry": { params: GetAdScriptAncestryParams, result: GetAdScriptAncestryResult }, + "Page.getFrameTree": { params: GetFrameTreeParams, result: GetFrameTreeResult }, + "Page.getLayoutMetrics": { params: GetLayoutMetricsParams, result: GetLayoutMetricsResult }, + "Page.getNavigationHistory": { params: GetNavigationHistoryParams, result: GetNavigationHistoryResult }, + "Page.resetNavigationHistory": { params: ResetNavigationHistoryParams, result: ResetNavigationHistoryResult }, + "Page.getResourceContent": { params: GetResourceContentParams, result: GetResourceContentResult }, + "Page.getResourceTree": { params: GetResourceTreeParams, result: GetResourceTreeResult }, + "Page.handleJavaScriptDialog": { params: HandleJavaScriptDialogParams, result: HandleJavaScriptDialogResult }, + "Page.navigate": { params: NavigateParams, result: NavigateResult }, + "Page.navigateToHistoryEntry": { params: NavigateToHistoryEntryParams, result: NavigateToHistoryEntryResult }, + "Page.printToPDF": { params: PrintToPDFParams, result: PrintToPDFResult }, + "Page.reload": { params: ReloadParams, result: ReloadResult }, + "Page.removeScriptToEvaluateOnLoad": { params: RemoveScriptToEvaluateOnLoadParams, result: RemoveScriptToEvaluateOnLoadResult }, + "Page.removeScriptToEvaluateOnNewDocument": { params: RemoveScriptToEvaluateOnNewDocumentParams, result: RemoveScriptToEvaluateOnNewDocumentResult }, + "Page.screencastFrameAck": { params: ScreencastFrameAckParams, result: ScreencastFrameAckResult }, + "Page.searchInResource": { params: SearchInResourceParams, result: SearchInResourceResult }, + "Page.setAdBlockingEnabled": { params: SetAdBlockingEnabledParams, result: SetAdBlockingEnabledResult }, + "Page.setBypassCSP": { params: SetBypassCSPParams, result: SetBypassCSPResult }, + "Page.getPermissionsPolicyState": { params: GetPermissionsPolicyStateParams, result: GetPermissionsPolicyStateResult }, + "Page.getOriginTrials": { params: GetOriginTrialsParams, result: GetOriginTrialsResult }, + "Page.setDeviceMetricsOverride": { params: SetDeviceMetricsOverrideParams, result: SetDeviceMetricsOverrideResult }, + "Page.setDeviceOrientationOverride": { params: SetDeviceOrientationOverrideParams, result: SetDeviceOrientationOverrideResult }, + "Page.setFontFamilies": { params: SetFontFamiliesParams, result: SetFontFamiliesResult }, + "Page.setFontSizes": { params: SetFontSizesParams, result: SetFontSizesResult }, + "Page.setDocumentContent": { params: SetDocumentContentParams, result: SetDocumentContentResult }, + "Page.setDownloadBehavior": { params: SetDownloadBehaviorParams, result: SetDownloadBehaviorResult }, + "Page.setGeolocationOverride": { params: SetGeolocationOverrideParams, result: SetGeolocationOverrideResult }, + "Page.setLifecycleEventsEnabled": { params: SetLifecycleEventsEnabledParams, result: SetLifecycleEventsEnabledResult }, + "Page.setTouchEmulationEnabled": { params: SetTouchEmulationEnabledParams, result: SetTouchEmulationEnabledResult }, + "Page.startScreencast": { params: StartScreencastParams, result: StartScreencastResult }, + "Page.stopLoading": { params: StopLoadingParams, result: StopLoadingResult }, + "Page.crash": { params: CrashParams, result: CrashResult }, + "Page.close": { params: CloseParams, result: CloseResult }, + "Page.setWebLifecycleState": { params: SetWebLifecycleStateParams, result: SetWebLifecycleStateResult }, + "Page.stopScreencast": { params: StopScreencastParams, result: StopScreencastResult }, + "Page.produceCompilationCache": { params: ProduceCompilationCacheParams, result: ProduceCompilationCacheResult }, + "Page.addCompilationCache": { params: AddCompilationCacheParams, result: AddCompilationCacheResult }, + "Page.clearCompilationCache": { params: ClearCompilationCacheParams, result: ClearCompilationCacheResult }, + "Page.setSPCTransactionMode": { params: SetSPCTransactionModeParams, result: SetSPCTransactionModeResult }, + "Page.setRPHRegistrationMode": { params: SetRPHRegistrationModeParams, result: SetRPHRegistrationModeResult }, + "Page.generateTestReport": { params: GenerateTestReportParams, result: GenerateTestReportResult }, + "Page.waitForDebugger": { params: WaitForDebuggerParams, result: WaitForDebuggerResult }, + "Page.setInterceptFileChooserDialog": { params: SetInterceptFileChooserDialogParams, result: SetInterceptFileChooserDialogResult }, + "Page.setPrerenderingAllowed": { params: SetPrerenderingAllowedParams, result: SetPrerenderingAllowedResult }, + "Page.getAnnotatedPageContent": { params: GetAnnotatedPageContentParams, result: GetAnnotatedPageContentResult }, +} as const; +export const events = { + "Page.domContentEventFired": DomContentEventFiredEvent, + "Page.fileChooserOpened": FileChooserOpenedEvent, + "Page.frameAttached": FrameAttachedEvent, + "Page.frameClearedScheduledNavigation": FrameClearedScheduledNavigationEvent, + "Page.frameDetached": FrameDetachedEvent, + "Page.frameSubtreeWillBeDetached": FrameSubtreeWillBeDetachedEvent, + "Page.frameNavigated": FrameNavigatedEvent, + "Page.documentOpened": DocumentOpenedEvent, + "Page.frameResized": FrameResizedEvent, + "Page.frameStartedNavigating": FrameStartedNavigatingEvent, + "Page.frameRequestedNavigation": FrameRequestedNavigationEvent, + "Page.frameScheduledNavigation": FrameScheduledNavigationEvent, + "Page.frameStartedLoading": FrameStartedLoadingEvent, + "Page.frameStoppedLoading": FrameStoppedLoadingEvent, + "Page.downloadWillBegin": DownloadWillBeginEvent, + "Page.downloadProgress": DownloadProgressEvent, + "Page.interstitialHidden": InterstitialHiddenEvent, + "Page.interstitialShown": InterstitialShownEvent, + "Page.javascriptDialogClosed": JavascriptDialogClosedEvent, + "Page.javascriptDialogOpening": JavascriptDialogOpeningEvent, + "Page.lifecycleEvent": LifecycleEventEvent, + "Page.backForwardCacheNotUsed": BackForwardCacheNotUsedEvent, + "Page.loadEventFired": LoadEventFiredEvent, + "Page.navigatedWithinDocument": NavigatedWithinDocumentEvent, + "Page.screencastFrame": ScreencastFrameEvent, + "Page.screencastVisibilityChanged": ScreencastVisibilityChangedEvent, + "Page.windowOpen": WindowOpenEvent, + "Page.compilationCacheProduced": CompilationCacheProducedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Performance.ts b/types/zod/Performance.ts new file mode 100644 index 0000000..1374ed8 --- /dev/null +++ b/types/zod/Performance.ts @@ -0,0 +1,39 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const Metric = withCdpMeta(z.object({ "name": z.string(), "value": z.number() }).passthrough(), "Performance.Metric", "type"); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Performance.disable.params", "commandParams", { method: "Performance.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Performance.disable.result", "commandResult", { method: "Performance.disable" }); +export const EnableParams = withCdpMeta(z.object({ "timeDomain": z.enum(["timeTicks", "threadTicks"]).optional() }).passthrough(), "Performance.enable.params", "commandParams", { method: "Performance.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Performance.enable.result", "commandResult", { method: "Performance.enable" }); +export const SetTimeDomainParams = withCdpMeta(z.object({ "timeDomain": z.enum(["timeTicks", "threadTicks"]) }).passthrough(), "Performance.setTimeDomain.params", "commandParams", { method: "Performance.setTimeDomain" }); +export const SetTimeDomainResult = withCdpMeta(z.object({ }).passthrough(), "Performance.setTimeDomain.result", "commandResult", { method: "Performance.setTimeDomain" }); +export const GetMetricsParams = withCdpMeta(z.object({ }).passthrough(), "Performance.getMetrics.params", "commandParams", { method: "Performance.getMetrics" }); +export const GetMetricsResult = withCdpMeta(z.object({ "metrics": z.array(z.lazy(() => Metric)) }).passthrough(), "Performance.getMetrics.result", "commandResult", { method: "Performance.getMetrics" }); +export const MetricsEvent = withCdpMeta(z.object({ "metrics": z.array(z.lazy(() => Metric)), "title": z.string() }).passthrough(), "Performance.metrics", "event", { phase: "event" }); + +export const zod = { + Metric: Metric, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + SetTimeDomainParams: SetTimeDomainParams, + SetTimeDomainResult: SetTimeDomainResult, + GetMetricsParams: GetMetricsParams, + GetMetricsResult: GetMetricsResult, + MetricsEvent: MetricsEvent, +} as const; +export const commands = { + "Performance.disable": { params: DisableParams, result: DisableResult }, + "Performance.enable": { params: EnableParams, result: EnableResult }, + "Performance.setTimeDomain": { params: SetTimeDomainParams, result: SetTimeDomainResult }, + "Performance.getMetrics": { params: GetMetricsParams, result: GetMetricsResult }, +} as const; +export const events = { + "Performance.metrics": MetricsEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/PerformanceTimeline.ts b/types/zod/PerformanceTimeline.ts new file mode 100644 index 0000000..efe9bde --- /dev/null +++ b/types/zod/PerformanceTimeline.ts @@ -0,0 +1,33 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Network from "./Network.js"; +import * as Page from "./Page.js"; + +export const LargestContentfulPaint = withCdpMeta(z.object({ "renderTime": z.lazy(() => Network.TimeSinceEpoch), "loadTime": z.lazy(() => Network.TimeSinceEpoch), "size": z.number(), "elementId": z.string().optional(), "url": z.string().optional(), "nodeId": z.lazy(() => DOM.BackendNodeId).optional() }).passthrough(), "PerformanceTimeline.LargestContentfulPaint", "type"); +export const LayoutShiftAttribution = withCdpMeta(z.object({ "previousRect": z.lazy(() => DOM.Rect), "currentRect": z.lazy(() => DOM.Rect), "nodeId": z.lazy(() => DOM.BackendNodeId).optional() }).passthrough(), "PerformanceTimeline.LayoutShiftAttribution", "type"); +export const LayoutShift = withCdpMeta(z.object({ "value": z.number(), "hadRecentInput": z.boolean(), "lastInputTime": z.lazy(() => Network.TimeSinceEpoch), "sources": z.array(z.lazy(() => LayoutShiftAttribution)) }).passthrough(), "PerformanceTimeline.LayoutShift", "type"); +export const TimelineEvent = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId), "type": z.string(), "name": z.string(), "time": z.lazy(() => Network.TimeSinceEpoch), "duration": z.number().optional(), "lcpDetails": z.lazy(() => LargestContentfulPaint).optional(), "layoutShiftDetails": z.lazy(() => LayoutShift).optional() }).passthrough(), "PerformanceTimeline.TimelineEvent", "type"); +export const EnableParams = withCdpMeta(z.object({ "eventTypes": z.array(z.string()) }).passthrough(), "PerformanceTimeline.enable.params", "commandParams", { method: "PerformanceTimeline.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "PerformanceTimeline.enable.result", "commandResult", { method: "PerformanceTimeline.enable" }); +export const TimelineEventAddedEvent = withCdpMeta(z.object({ "event": z.lazy(() => TimelineEvent) }).passthrough(), "PerformanceTimeline.timelineEventAdded", "event", { phase: "event" }); + +export const zod = { + LargestContentfulPaint: LargestContentfulPaint, + LayoutShiftAttribution: LayoutShiftAttribution, + LayoutShift: LayoutShift, + TimelineEvent: TimelineEvent, + EnableParams: EnableParams, + EnableResult: EnableResult, + TimelineEventAddedEvent: TimelineEventAddedEvent, +} as const; +export const commands = { + "PerformanceTimeline.enable": { params: EnableParams, result: EnableResult }, +} as const; +export const events = { + "PerformanceTimeline.timelineEventAdded": TimelineEventAddedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Preload.ts b/types/zod/Preload.ts new file mode 100644 index 0000000..277bf93 --- /dev/null +++ b/types/zod/Preload.ts @@ -0,0 +1,69 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Network from "./Network.js"; +import * as Page from "./Page.js"; + +export const RuleSetId = withCdpMeta(z.string(), "Preload.RuleSetId", "type"); +export const RuleSet = withCdpMeta(z.object({ "id": z.lazy(() => RuleSetId), "loaderId": z.lazy(() => Network.LoaderId), "sourceText": z.string(), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "url": z.string().optional(), "requestId": z.lazy(() => Network.RequestId).optional(), "errorType": z.lazy(() => RuleSetErrorType).optional(), "errorMessage": z.string().optional(), "tag": z.string().optional() }).passthrough(), "Preload.RuleSet", "type"); +export const RuleSetErrorType = withCdpMeta(z.enum(["SourceIsNotJsonObject", "InvalidRulesSkipped", "InvalidRulesetLevelTag"]), "Preload.RuleSetErrorType", "type"); +export const SpeculationAction = withCdpMeta(z.enum(["Prefetch", "Prerender", "PrerenderUntilScript"]), "Preload.SpeculationAction", "type"); +export const SpeculationTargetHint = withCdpMeta(z.enum(["Blank", "Self"]), "Preload.SpeculationTargetHint", "type"); +export const PreloadingAttemptKey = withCdpMeta(z.object({ "loaderId": z.lazy(() => Network.LoaderId), "action": z.lazy(() => SpeculationAction), "url": z.string(), "formSubmission": z.boolean().optional(), "targetHint": z.lazy(() => SpeculationTargetHint).optional() }).passthrough(), "Preload.PreloadingAttemptKey", "type"); +export const PreloadingAttemptSource = withCdpMeta(z.object({ "key": z.lazy(() => PreloadingAttemptKey), "ruleSetIds": z.array(z.lazy(() => RuleSetId)), "nodeIds": z.array(z.lazy(() => DOM.BackendNodeId)) }).passthrough(), "Preload.PreloadingAttemptSource", "type"); +export const PreloadPipelineId = withCdpMeta(z.string(), "Preload.PreloadPipelineId", "type"); +export const PrerenderFinalStatus = withCdpMeta(z.enum(["Activated", "Destroyed", "LowEndDevice", "InvalidSchemeRedirect", "InvalidSchemeNavigation", "NavigationRequestBlockedByCsp", "MojoBinderPolicy", "RendererProcessCrashed", "RendererProcessKilled", "Download", "TriggerDestroyed", "NavigationNotCommitted", "NavigationBadHttpStatus", "ClientCertRequested", "NavigationRequestNetworkError", "CancelAllHostsForTesting", "DidFailLoad", "Stop", "SslCertificateError", "LoginAuthRequested", "UaChangeRequiresReload", "BlockedByClient", "AudioOutputDeviceRequested", "MixedContent", "TriggerBackgrounded", "MemoryLimitExceeded", "DataSaverEnabled", "TriggerUrlHasEffectiveUrl", "ActivatedBeforeStarted", "InactivePageRestriction", "StartFailed", "TimeoutBackgrounded", "CrossSiteRedirectInInitialNavigation", "CrossSiteNavigationInInitialNavigation", "SameSiteCrossOriginRedirectNotOptInInInitialNavigation", "SameSiteCrossOriginNavigationNotOptInInInitialNavigation", "ActivationNavigationParameterMismatch", "ActivatedInBackground", "EmbedderHostDisallowed", "ActivationNavigationDestroyedBeforeSuccess", "TabClosedByUserGesture", "TabClosedWithoutUserGesture", "PrimaryMainFrameRendererProcessCrashed", "PrimaryMainFrameRendererProcessKilled", "ActivationFramePolicyNotCompatible", "PreloadingDisabled", "BatterySaverEnabled", "ActivatedDuringMainFrameNavigation", "PreloadingUnsupportedByWebContents", "CrossSiteRedirectInMainFrameNavigation", "CrossSiteNavigationInMainFrameNavigation", "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation", "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation", "MemoryPressureOnTrigger", "MemoryPressureAfterTriggered", "PrerenderingDisabledByDevTools", "SpeculationRuleRemoved", "ActivatedWithAuxiliaryBrowsingContexts", "MaxNumOfRunningEagerPrerendersExceeded", "MaxNumOfRunningNonEagerPrerendersExceeded", "MaxNumOfRunningEmbedderPrerendersExceeded", "PrerenderingUrlHasEffectiveUrl", "RedirectedPrerenderingUrlHasEffectiveUrl", "ActivationUrlHasEffectiveUrl", "JavaScriptInterfaceAdded", "JavaScriptInterfaceRemoved", "AllPrerenderingCanceled", "WindowClosed", "SlowNetwork", "OtherPrerenderedPageActivated", "V8OptimizerDisabled", "PrerenderFailedDuringPrefetch", "BrowsingDataRemoved", "PrerenderHostReused", "FormSubmitWhenPrerendering"]), "Preload.PrerenderFinalStatus", "type"); +export const PreloadingStatus = withCdpMeta(z.enum(["Pending", "Running", "Ready", "Success", "Failure", "NotSupported"]), "Preload.PreloadingStatus", "type"); +export const PrefetchStatus = withCdpMeta(z.enum(["PrefetchAllowed", "PrefetchFailedIneligibleRedirect", "PrefetchFailedInvalidRedirect", "PrefetchFailedMIMENotSupported", "PrefetchFailedNetError", "PrefetchFailedNon2XX", "PrefetchEvictedAfterBrowsingDataRemoved", "PrefetchEvictedAfterCandidateRemoved", "PrefetchEvictedForNewerPrefetch", "PrefetchHeldback", "PrefetchIneligibleRetryAfter", "PrefetchIsPrivacyDecoy", "PrefetchIsStale", "PrefetchNotEligibleBrowserContextOffTheRecord", "PrefetchNotEligibleDataSaverEnabled", "PrefetchNotEligibleExistingProxy", "PrefetchNotEligibleHostIsNonUnique", "PrefetchNotEligibleNonDefaultStoragePartition", "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy", "PrefetchNotEligibleSchemeIsNotHttps", "PrefetchNotEligibleUserHasCookies", "PrefetchNotEligibleUserHasServiceWorker", "PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler", "PrefetchNotEligibleRedirectFromServiceWorker", "PrefetchNotEligibleRedirectToServiceWorker", "PrefetchNotEligibleBatterySaverEnabled", "PrefetchNotEligiblePreloadingDisabled", "PrefetchNotFinishedInTime", "PrefetchNotStarted", "PrefetchNotUsedCookiesChanged", "PrefetchProxyNotAvailable", "PrefetchResponseUsed", "PrefetchSuccessfulButNotUsed", "PrefetchNotUsedProbeFailed"]), "Preload.PrefetchStatus", "type"); +export const PrerenderMismatchedHeaders = withCdpMeta(z.object({ "headerName": z.string(), "initialValue": z.string().optional(), "activationValue": z.string().optional() }).passthrough(), "Preload.PrerenderMismatchedHeaders", "type"); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Preload.enable.params", "commandParams", { method: "Preload.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Preload.enable.result", "commandResult", { method: "Preload.enable" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Preload.disable.params", "commandParams", { method: "Preload.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Preload.disable.result", "commandResult", { method: "Preload.disable" }); +export const RuleSetUpdatedEvent = withCdpMeta(z.object({ "ruleSet": z.lazy(() => RuleSet) }).passthrough(), "Preload.ruleSetUpdated", "event", { phase: "event" }); +export const RuleSetRemovedEvent = withCdpMeta(z.object({ "id": z.lazy(() => RuleSetId) }).passthrough(), "Preload.ruleSetRemoved", "event", { phase: "event" }); +export const PreloadEnabledStateUpdatedEvent = withCdpMeta(z.object({ "disabledByPreference": z.boolean(), "disabledByDataSaver": z.boolean(), "disabledByBatterySaver": z.boolean(), "disabledByHoldbackPrefetchSpeculationRules": z.boolean(), "disabledByHoldbackPrerenderSpeculationRules": z.boolean() }).passthrough(), "Preload.preloadEnabledStateUpdated", "event", { phase: "event" }); +export const PrefetchStatusUpdatedEvent = withCdpMeta(z.object({ "key": z.lazy(() => PreloadingAttemptKey), "pipelineId": z.lazy(() => PreloadPipelineId), "initiatingFrameId": z.lazy(() => Page.FrameId), "prefetchUrl": z.string(), "status": z.lazy(() => PreloadingStatus), "prefetchStatus": z.lazy(() => PrefetchStatus), "requestId": z.lazy(() => Network.RequestId) }).passthrough(), "Preload.prefetchStatusUpdated", "event", { phase: "event" }); +export const PrerenderStatusUpdatedEvent = withCdpMeta(z.object({ "key": z.lazy(() => PreloadingAttemptKey), "pipelineId": z.lazy(() => PreloadPipelineId), "status": z.lazy(() => PreloadingStatus), "prerenderStatus": z.lazy(() => PrerenderFinalStatus).optional(), "disallowedMojoInterface": z.string().optional(), "mismatchedHeaders": z.array(z.lazy(() => PrerenderMismatchedHeaders)).optional() }).passthrough(), "Preload.prerenderStatusUpdated", "event", { phase: "event" }); +export const PreloadingAttemptSourcesUpdatedEvent = withCdpMeta(z.object({ "loaderId": z.lazy(() => Network.LoaderId), "preloadingAttemptSources": z.array(z.lazy(() => PreloadingAttemptSource)) }).passthrough(), "Preload.preloadingAttemptSourcesUpdated", "event", { phase: "event" }); + +export const zod = { + RuleSetId: RuleSetId, + RuleSet: RuleSet, + RuleSetErrorType: RuleSetErrorType, + SpeculationAction: SpeculationAction, + SpeculationTargetHint: SpeculationTargetHint, + PreloadingAttemptKey: PreloadingAttemptKey, + PreloadingAttemptSource: PreloadingAttemptSource, + PreloadPipelineId: PreloadPipelineId, + PrerenderFinalStatus: PrerenderFinalStatus, + PreloadingStatus: PreloadingStatus, + PrefetchStatus: PrefetchStatus, + PrerenderMismatchedHeaders: PrerenderMismatchedHeaders, + EnableParams: EnableParams, + EnableResult: EnableResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + RuleSetUpdatedEvent: RuleSetUpdatedEvent, + RuleSetRemovedEvent: RuleSetRemovedEvent, + PreloadEnabledStateUpdatedEvent: PreloadEnabledStateUpdatedEvent, + PrefetchStatusUpdatedEvent: PrefetchStatusUpdatedEvent, + PrerenderStatusUpdatedEvent: PrerenderStatusUpdatedEvent, + PreloadingAttemptSourcesUpdatedEvent: PreloadingAttemptSourcesUpdatedEvent, +} as const; +export const commands = { + "Preload.enable": { params: EnableParams, result: EnableResult }, + "Preload.disable": { params: DisableParams, result: DisableResult }, +} as const; +export const events = { + "Preload.ruleSetUpdated": RuleSetUpdatedEvent, + "Preload.ruleSetRemoved": RuleSetRemovedEvent, + "Preload.preloadEnabledStateUpdated": PreloadEnabledStateUpdatedEvent, + "Preload.prefetchStatusUpdated": PrefetchStatusUpdatedEvent, + "Preload.prerenderStatusUpdated": PrerenderStatusUpdatedEvent, + "Preload.preloadingAttemptSourcesUpdated": PreloadingAttemptSourcesUpdatedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Profiler.ts b/types/zod/Profiler.ts new file mode 100644 index 0000000..48a0f9d --- /dev/null +++ b/types/zod/Profiler.ts @@ -0,0 +1,82 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Debugger from "./Debugger.js"; +import * as Runtime from "./Runtime.js"; + +export const ProfileNode = withCdpMeta(z.object({ "id": z.number().int(), "callFrame": z.lazy(() => Runtime.CallFrame), "hitCount": z.number().int().optional(), "children": z.array(z.number().int()).optional(), "deoptReason": z.string().optional(), "positionTicks": z.array(z.lazy(() => PositionTickInfo)).optional() }).passthrough(), "Profiler.ProfileNode", "type"); +export const Profile = withCdpMeta(z.object({ "nodes": z.array(z.lazy(() => ProfileNode)), "startTime": z.number(), "endTime": z.number(), "samples": z.array(z.number().int()).optional(), "timeDeltas": z.array(z.number().int()).optional() }).passthrough(), "Profiler.Profile", "type"); +export const PositionTickInfo = withCdpMeta(z.object({ "line": z.number().int(), "ticks": z.number().int() }).passthrough(), "Profiler.PositionTickInfo", "type"); +export const CoverageRange = withCdpMeta(z.object({ "startOffset": z.number().int(), "endOffset": z.number().int(), "count": z.number().int() }).passthrough(), "Profiler.CoverageRange", "type"); +export const FunctionCoverage = withCdpMeta(z.object({ "functionName": z.string(), "ranges": z.array(z.lazy(() => CoverageRange)), "isBlockCoverage": z.boolean() }).passthrough(), "Profiler.FunctionCoverage", "type"); +export const ScriptCoverage = withCdpMeta(z.object({ "scriptId": z.lazy(() => Runtime.ScriptId), "url": z.string(), "functions": z.array(z.lazy(() => FunctionCoverage)) }).passthrough(), "Profiler.ScriptCoverage", "type"); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.disable.params", "commandParams", { method: "Profiler.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Profiler.disable.result", "commandResult", { method: "Profiler.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.enable.params", "commandParams", { method: "Profiler.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Profiler.enable.result", "commandResult", { method: "Profiler.enable" }); +export const GetBestEffortCoverageParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.getBestEffortCoverage.params", "commandParams", { method: "Profiler.getBestEffortCoverage" }); +export const GetBestEffortCoverageResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => ScriptCoverage)) }).passthrough(), "Profiler.getBestEffortCoverage.result", "commandResult", { method: "Profiler.getBestEffortCoverage" }); +export const SetSamplingIntervalParams = withCdpMeta(z.object({ "interval": z.number().int() }).passthrough(), "Profiler.setSamplingInterval.params", "commandParams", { method: "Profiler.setSamplingInterval" }); +export const SetSamplingIntervalResult = withCdpMeta(z.object({ }).passthrough(), "Profiler.setSamplingInterval.result", "commandResult", { method: "Profiler.setSamplingInterval" }); +export const StartParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.start.params", "commandParams", { method: "Profiler.start" }); +export const StartResult = withCdpMeta(z.object({ }).passthrough(), "Profiler.start.result", "commandResult", { method: "Profiler.start" }); +export const StartPreciseCoverageParams = withCdpMeta(z.object({ "callCount": z.boolean().optional(), "detailed": z.boolean().optional(), "allowTriggeredUpdates": z.boolean().optional() }).passthrough(), "Profiler.startPreciseCoverage.params", "commandParams", { method: "Profiler.startPreciseCoverage" }); +export const StartPreciseCoverageResult = withCdpMeta(z.object({ "timestamp": z.number() }).passthrough(), "Profiler.startPreciseCoverage.result", "commandResult", { method: "Profiler.startPreciseCoverage" }); +export const StopParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.stop.params", "commandParams", { method: "Profiler.stop" }); +export const StopResult = withCdpMeta(z.object({ "profile": z.lazy(() => Profile) }).passthrough(), "Profiler.stop.result", "commandResult", { method: "Profiler.stop" }); +export const StopPreciseCoverageParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.stopPreciseCoverage.params", "commandParams", { method: "Profiler.stopPreciseCoverage" }); +export const StopPreciseCoverageResult = withCdpMeta(z.object({ }).passthrough(), "Profiler.stopPreciseCoverage.result", "commandResult", { method: "Profiler.stopPreciseCoverage" }); +export const TakePreciseCoverageParams = withCdpMeta(z.object({ }).passthrough(), "Profiler.takePreciseCoverage.params", "commandParams", { method: "Profiler.takePreciseCoverage" }); +export const TakePreciseCoverageResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => ScriptCoverage)), "timestamp": z.number() }).passthrough(), "Profiler.takePreciseCoverage.result", "commandResult", { method: "Profiler.takePreciseCoverage" }); +export const ConsoleProfileFinishedEvent = withCdpMeta(z.object({ "id": z.string(), "location": z.lazy(() => Debugger.Location), "profile": z.lazy(() => Profile), "title": z.string().optional() }).passthrough(), "Profiler.consoleProfileFinished", "event", { phase: "event" }); +export const ConsoleProfileStartedEvent = withCdpMeta(z.object({ "id": z.string(), "location": z.lazy(() => Debugger.Location), "title": z.string().optional() }).passthrough(), "Profiler.consoleProfileStarted", "event", { phase: "event" }); +export const PreciseCoverageDeltaUpdateEvent = withCdpMeta(z.object({ "timestamp": z.number(), "occasion": z.string(), "result": z.array(z.lazy(() => ScriptCoverage)) }).passthrough(), "Profiler.preciseCoverageDeltaUpdate", "event", { phase: "event" }); + +export const zod = { + ProfileNode: ProfileNode, + Profile: Profile, + PositionTickInfo: PositionTickInfo, + CoverageRange: CoverageRange, + FunctionCoverage: FunctionCoverage, + ScriptCoverage: ScriptCoverage, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + GetBestEffortCoverageParams: GetBestEffortCoverageParams, + GetBestEffortCoverageResult: GetBestEffortCoverageResult, + SetSamplingIntervalParams: SetSamplingIntervalParams, + SetSamplingIntervalResult: SetSamplingIntervalResult, + StartParams: StartParams, + StartResult: StartResult, + StartPreciseCoverageParams: StartPreciseCoverageParams, + StartPreciseCoverageResult: StartPreciseCoverageResult, + StopParams: StopParams, + StopResult: StopResult, + StopPreciseCoverageParams: StopPreciseCoverageParams, + StopPreciseCoverageResult: StopPreciseCoverageResult, + TakePreciseCoverageParams: TakePreciseCoverageParams, + TakePreciseCoverageResult: TakePreciseCoverageResult, + ConsoleProfileFinishedEvent: ConsoleProfileFinishedEvent, + ConsoleProfileStartedEvent: ConsoleProfileStartedEvent, + PreciseCoverageDeltaUpdateEvent: PreciseCoverageDeltaUpdateEvent, +} as const; +export const commands = { + "Profiler.disable": { params: DisableParams, result: DisableResult }, + "Profiler.enable": { params: EnableParams, result: EnableResult }, + "Profiler.getBestEffortCoverage": { params: GetBestEffortCoverageParams, result: GetBestEffortCoverageResult }, + "Profiler.setSamplingInterval": { params: SetSamplingIntervalParams, result: SetSamplingIntervalResult }, + "Profiler.start": { params: StartParams, result: StartResult }, + "Profiler.startPreciseCoverage": { params: StartPreciseCoverageParams, result: StartPreciseCoverageResult }, + "Profiler.stop": { params: StopParams, result: StopResult }, + "Profiler.stopPreciseCoverage": { params: StopPreciseCoverageParams, result: StopPreciseCoverageResult }, + "Profiler.takePreciseCoverage": { params: TakePreciseCoverageParams, result: TakePreciseCoverageResult }, +} as const; +export const events = { + "Profiler.consoleProfileFinished": ConsoleProfileFinishedEvent, + "Profiler.consoleProfileStarted": ConsoleProfileStartedEvent, + "Profiler.preciseCoverageDeltaUpdate": PreciseCoverageDeltaUpdateEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Runtime.ts b/types/zod/Runtime.ts new file mode 100644 index 0000000..11a6f11 --- /dev/null +++ b/types/zod/Runtime.ts @@ -0,0 +1,199 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const ScriptId = withCdpMeta(z.string(), "Runtime.ScriptId", "type"); +export const SerializationOptions = withCdpMeta(z.object({ "serialization": z.enum(["deep", "json", "idOnly"]), "maxDepth": z.number().int().optional(), "additionalParameters": z.record(z.string(), z.unknown()).optional() }).passthrough(), "Runtime.SerializationOptions", "type"); +export const DeepSerializedValue = withCdpMeta(z.object({ "type": z.enum(["undefined", "null", "string", "number", "boolean", "bigint", "regexp", "date", "symbol", "array", "object", "function", "map", "set", "weakmap", "weakset", "error", "proxy", "promise", "typedarray", "arraybuffer", "node", "window", "generator"]), "value": z.any().optional(), "objectId": z.string().optional(), "weakLocalObjectReference": z.number().int().optional() }).passthrough(), "Runtime.DeepSerializedValue", "type"); +export const RemoteObjectId = withCdpMeta(z.string(), "Runtime.RemoteObjectId", "type"); +export const UnserializableValue = withCdpMeta(z.string(), "Runtime.UnserializableValue", "type"); +export const RemoteObject = withCdpMeta(z.object({ "type": z.enum(["object", "function", "undefined", "string", "number", "boolean", "symbol", "bigint"]), "subtype": z.enum(["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray", "arraybuffer", "dataview", "webassemblymemory", "wasmvalue", "trustedtype"]).optional(), "className": z.string().optional(), "value": z.any().optional(), "unserializableValue": z.lazy(() => UnserializableValue).optional(), "description": z.string().optional(), "deepSerializedValue": z.lazy(() => DeepSerializedValue).optional(), "objectId": z.lazy(() => RemoteObjectId).optional(), "preview": z.lazy(() => ObjectPreview).optional(), "customPreview": z.lazy(() => CustomPreview).optional() }).passthrough(), "Runtime.RemoteObject", "type"); +export const CustomPreview = withCdpMeta(z.object({ "header": z.string(), "bodyGetterId": z.lazy(() => RemoteObjectId).optional() }).passthrough(), "Runtime.CustomPreview", "type"); +export const ObjectPreview = withCdpMeta(z.object({ "type": z.enum(["object", "function", "undefined", "string", "number", "boolean", "symbol", "bigint"]), "subtype": z.enum(["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray", "arraybuffer", "dataview", "webassemblymemory", "wasmvalue", "trustedtype"]).optional(), "description": z.string().optional(), "overflow": z.boolean(), "properties": z.array(z.lazy(() => PropertyPreview)), "entries": z.array(z.lazy(() => EntryPreview)).optional() }).passthrough(), "Runtime.ObjectPreview", "type"); +export const PropertyPreview = withCdpMeta(z.object({ "name": z.string(), "type": z.enum(["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor", "bigint"]), "value": z.string().optional(), "valuePreview": z.lazy(() => ObjectPreview).optional(), "subtype": z.enum(["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray", "arraybuffer", "dataview", "webassemblymemory", "wasmvalue", "trustedtype"]).optional() }).passthrough(), "Runtime.PropertyPreview", "type"); +export const EntryPreview = withCdpMeta(z.object({ "key": z.lazy(() => ObjectPreview).optional(), "value": z.lazy(() => ObjectPreview) }).passthrough(), "Runtime.EntryPreview", "type"); +export const PropertyDescriptor = withCdpMeta(z.object({ "name": z.string(), "value": z.lazy(() => RemoteObject).optional(), "writable": z.boolean().optional(), "get": z.lazy(() => RemoteObject).optional(), "set": z.lazy(() => RemoteObject).optional(), "configurable": z.boolean(), "enumerable": z.boolean(), "wasThrown": z.boolean().optional(), "isOwn": z.boolean().optional(), "symbol": z.lazy(() => RemoteObject).optional() }).passthrough(), "Runtime.PropertyDescriptor", "type"); +export const InternalPropertyDescriptor = withCdpMeta(z.object({ "name": z.string(), "value": z.lazy(() => RemoteObject).optional() }).passthrough(), "Runtime.InternalPropertyDescriptor", "type"); +export const PrivatePropertyDescriptor = withCdpMeta(z.object({ "name": z.string(), "value": z.lazy(() => RemoteObject).optional(), "get": z.lazy(() => RemoteObject).optional(), "set": z.lazy(() => RemoteObject).optional() }).passthrough(), "Runtime.PrivatePropertyDescriptor", "type"); +export const CallArgument = withCdpMeta(z.object({ "value": z.any().optional(), "unserializableValue": z.lazy(() => UnserializableValue).optional(), "objectId": z.lazy(() => RemoteObjectId).optional() }).passthrough(), "Runtime.CallArgument", "type"); +export const ExecutionContextId = withCdpMeta(z.number().int(), "Runtime.ExecutionContextId", "type"); +export const ExecutionContextDescription = withCdpMeta(z.object({ "id": z.lazy(() => ExecutionContextId), "origin": z.string(), "name": z.string(), "uniqueId": z.string(), "auxData": z.record(z.string(), z.unknown()).optional() }).passthrough(), "Runtime.ExecutionContextDescription", "type"); +export const ExceptionDetails = withCdpMeta(z.object({ "exceptionId": z.number().int(), "text": z.string(), "lineNumber": z.number().int(), "columnNumber": z.number().int(), "scriptId": z.lazy(() => ScriptId).optional(), "url": z.string().optional(), "stackTrace": z.lazy(() => StackTrace).optional(), "exception": z.lazy(() => RemoteObject).optional(), "executionContextId": z.lazy(() => ExecutionContextId).optional(), "exceptionMetaData": z.record(z.string(), z.unknown()).optional() }).passthrough(), "Runtime.ExceptionDetails", "type"); +export const Timestamp = withCdpMeta(z.number(), "Runtime.Timestamp", "type"); +export const TimeDelta = withCdpMeta(z.number(), "Runtime.TimeDelta", "type"); +export const CallFrame = withCdpMeta(z.object({ "functionName": z.string(), "scriptId": z.lazy(() => ScriptId), "url": z.string(), "lineNumber": z.number().int(), "columnNumber": z.number().int() }).passthrough(), "Runtime.CallFrame", "type"); +export const StackTrace = withCdpMeta(z.object({ "description": z.string().optional(), "callFrames": z.array(z.lazy(() => CallFrame)), "parent": z.lazy(() => StackTrace).optional(), "parentId": z.lazy(() => StackTraceId).optional() }).passthrough(), "Runtime.StackTrace", "type"); +export const UniqueDebuggerId = withCdpMeta(z.string(), "Runtime.UniqueDebuggerId", "type"); +export const StackTraceId = withCdpMeta(z.object({ "id": z.string(), "debuggerId": z.lazy(() => UniqueDebuggerId).optional() }).passthrough(), "Runtime.StackTraceId", "type"); +export const AwaitPromiseParams = withCdpMeta(z.object({ "promiseObjectId": z.lazy(() => RemoteObjectId), "returnByValue": z.boolean().optional(), "generatePreview": z.boolean().optional() }).passthrough(), "Runtime.awaitPromise.params", "commandParams", { method: "Runtime.awaitPromise" }); +export const AwaitPromiseResult = withCdpMeta(z.object({ "result": z.lazy(() => RemoteObject), "exceptionDetails": z.lazy(() => ExceptionDetails).optional() }).passthrough(), "Runtime.awaitPromise.result", "commandResult", { method: "Runtime.awaitPromise" }); +export const CallFunctionOnParams = withCdpMeta(z.object({ "functionDeclaration": z.string(), "objectId": z.lazy(() => RemoteObjectId).optional(), "arguments": z.array(z.lazy(() => CallArgument)).optional(), "silent": z.boolean().optional(), "returnByValue": z.boolean().optional(), "generatePreview": z.boolean().optional(), "userGesture": z.boolean().optional(), "awaitPromise": z.boolean().optional(), "executionContextId": z.lazy(() => ExecutionContextId).optional(), "objectGroup": z.string().optional(), "throwOnSideEffect": z.boolean().optional(), "uniqueContextId": z.string().optional(), "serializationOptions": z.lazy(() => SerializationOptions).optional() }).passthrough(), "Runtime.callFunctionOn.params", "commandParams", { method: "Runtime.callFunctionOn" }); +export const CallFunctionOnResult = withCdpMeta(z.object({ "result": z.lazy(() => RemoteObject), "exceptionDetails": z.lazy(() => ExceptionDetails).optional() }).passthrough(), "Runtime.callFunctionOn.result", "commandResult", { method: "Runtime.callFunctionOn" }); +export const CompileScriptParams = withCdpMeta(z.object({ "expression": z.string(), "sourceURL": z.string(), "persistScript": z.boolean(), "executionContextId": z.lazy(() => ExecutionContextId).optional() }).passthrough(), "Runtime.compileScript.params", "commandParams", { method: "Runtime.compileScript" }); +export const CompileScriptResult = withCdpMeta(z.object({ "scriptId": z.lazy(() => ScriptId).optional(), "exceptionDetails": z.lazy(() => ExceptionDetails).optional() }).passthrough(), "Runtime.compileScript.result", "commandResult", { method: "Runtime.compileScript" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.disable.params", "commandParams", { method: "Runtime.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.disable.result", "commandResult", { method: "Runtime.disable" }); +export const DiscardConsoleEntriesParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.discardConsoleEntries.params", "commandParams", { method: "Runtime.discardConsoleEntries" }); +export const DiscardConsoleEntriesResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.discardConsoleEntries.result", "commandResult", { method: "Runtime.discardConsoleEntries" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.enable.params", "commandParams", { method: "Runtime.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.enable.result", "commandResult", { method: "Runtime.enable" }); +export const EvaluateParams = withCdpMeta(z.object({ "expression": z.string(), "objectGroup": z.string().optional(), "includeCommandLineAPI": z.boolean().optional(), "silent": z.boolean().optional(), "contextId": z.lazy(() => ExecutionContextId).optional(), "returnByValue": z.boolean().optional(), "generatePreview": z.boolean().optional(), "userGesture": z.boolean().optional(), "awaitPromise": z.boolean().optional(), "throwOnSideEffect": z.boolean().optional(), "timeout": z.lazy(() => TimeDelta).optional(), "disableBreaks": z.boolean().optional(), "replMode": z.boolean().optional(), "allowUnsafeEvalBlockedByCSP": z.boolean().optional(), "uniqueContextId": z.string().optional(), "serializationOptions": z.lazy(() => SerializationOptions).optional() }).passthrough(), "Runtime.evaluate.params", "commandParams", { method: "Runtime.evaluate" }); +export const EvaluateResult = withCdpMeta(z.object({ "result": z.lazy(() => RemoteObject), "exceptionDetails": z.lazy(() => ExceptionDetails).optional() }).passthrough(), "Runtime.evaluate.result", "commandResult", { method: "Runtime.evaluate" }); +export const GetIsolateIdParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.getIsolateId.params", "commandParams", { method: "Runtime.getIsolateId" }); +export const GetIsolateIdResult = withCdpMeta(z.object({ "id": z.string() }).passthrough(), "Runtime.getIsolateId.result", "commandResult", { method: "Runtime.getIsolateId" }); +export const GetHeapUsageParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.getHeapUsage.params", "commandParams", { method: "Runtime.getHeapUsage" }); +export const GetHeapUsageResult = withCdpMeta(z.object({ "usedSize": z.number(), "totalSize": z.number(), "embedderHeapUsedSize": z.number(), "backingStorageSize": z.number() }).passthrough(), "Runtime.getHeapUsage.result", "commandResult", { method: "Runtime.getHeapUsage" }); +export const GetPropertiesParams = withCdpMeta(z.object({ "objectId": z.lazy(() => RemoteObjectId), "ownProperties": z.boolean().optional(), "accessorPropertiesOnly": z.boolean().optional(), "generatePreview": z.boolean().optional(), "nonIndexedPropertiesOnly": z.boolean().optional() }).passthrough(), "Runtime.getProperties.params", "commandParams", { method: "Runtime.getProperties" }); +export const GetPropertiesResult = withCdpMeta(z.object({ "result": z.array(z.lazy(() => PropertyDescriptor)), "internalProperties": z.array(z.lazy(() => InternalPropertyDescriptor)).optional(), "privateProperties": z.array(z.lazy(() => PrivatePropertyDescriptor)).optional(), "exceptionDetails": z.lazy(() => ExceptionDetails).optional() }).passthrough(), "Runtime.getProperties.result", "commandResult", { method: "Runtime.getProperties" }); +export const GlobalLexicalScopeNamesParams = withCdpMeta(z.object({ "executionContextId": z.lazy(() => ExecutionContextId).optional() }).passthrough(), "Runtime.globalLexicalScopeNames.params", "commandParams", { method: "Runtime.globalLexicalScopeNames" }); +export const GlobalLexicalScopeNamesResult = withCdpMeta(z.object({ "names": z.array(z.string()) }).passthrough(), "Runtime.globalLexicalScopeNames.result", "commandResult", { method: "Runtime.globalLexicalScopeNames" }); +export const QueryObjectsParams = withCdpMeta(z.object({ "prototypeObjectId": z.lazy(() => RemoteObjectId), "objectGroup": z.string().optional() }).passthrough(), "Runtime.queryObjects.params", "commandParams", { method: "Runtime.queryObjects" }); +export const QueryObjectsResult = withCdpMeta(z.object({ "objects": z.lazy(() => RemoteObject) }).passthrough(), "Runtime.queryObjects.result", "commandResult", { method: "Runtime.queryObjects" }); +export const ReleaseObjectParams = withCdpMeta(z.object({ "objectId": z.lazy(() => RemoteObjectId) }).passthrough(), "Runtime.releaseObject.params", "commandParams", { method: "Runtime.releaseObject" }); +export const ReleaseObjectResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.releaseObject.result", "commandResult", { method: "Runtime.releaseObject" }); +export const ReleaseObjectGroupParams = withCdpMeta(z.object({ "objectGroup": z.string() }).passthrough(), "Runtime.releaseObjectGroup.params", "commandParams", { method: "Runtime.releaseObjectGroup" }); +export const ReleaseObjectGroupResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.releaseObjectGroup.result", "commandResult", { method: "Runtime.releaseObjectGroup" }); +export const RunIfWaitingForDebuggerParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.runIfWaitingForDebugger.params", "commandParams", { method: "Runtime.runIfWaitingForDebugger" }); +export const RunIfWaitingForDebuggerResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.runIfWaitingForDebugger.result", "commandResult", { method: "Runtime.runIfWaitingForDebugger" }); +export const RunScriptParams = withCdpMeta(z.object({ "scriptId": z.lazy(() => ScriptId), "executionContextId": z.lazy(() => ExecutionContextId).optional(), "objectGroup": z.string().optional(), "silent": z.boolean().optional(), "includeCommandLineAPI": z.boolean().optional(), "returnByValue": z.boolean().optional(), "generatePreview": z.boolean().optional(), "awaitPromise": z.boolean().optional() }).passthrough(), "Runtime.runScript.params", "commandParams", { method: "Runtime.runScript" }); +export const RunScriptResult = withCdpMeta(z.object({ "result": z.lazy(() => RemoteObject), "exceptionDetails": z.lazy(() => ExceptionDetails).optional() }).passthrough(), "Runtime.runScript.result", "commandResult", { method: "Runtime.runScript" }); +export const SetAsyncCallStackDepthParams = withCdpMeta(z.object({ "maxDepth": z.number().int() }).passthrough(), "Runtime.setAsyncCallStackDepth.params", "commandParams", { method: "Runtime.setAsyncCallStackDepth" }); +export const SetAsyncCallStackDepthResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.setAsyncCallStackDepth.result", "commandResult", { method: "Runtime.setAsyncCallStackDepth" }); +export const SetCustomObjectFormatterEnabledParams = withCdpMeta(z.object({ "enabled": z.boolean() }).passthrough(), "Runtime.setCustomObjectFormatterEnabled.params", "commandParams", { method: "Runtime.setCustomObjectFormatterEnabled" }); +export const SetCustomObjectFormatterEnabledResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.setCustomObjectFormatterEnabled.result", "commandResult", { method: "Runtime.setCustomObjectFormatterEnabled" }); +export const SetMaxCallStackSizeToCaptureParams = withCdpMeta(z.object({ "size": z.number().int() }).passthrough(), "Runtime.setMaxCallStackSizeToCapture.params", "commandParams", { method: "Runtime.setMaxCallStackSizeToCapture" }); +export const SetMaxCallStackSizeToCaptureResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.setMaxCallStackSizeToCapture.result", "commandResult", { method: "Runtime.setMaxCallStackSizeToCapture" }); +export const TerminateExecutionParams = withCdpMeta(z.object({ }).passthrough(), "Runtime.terminateExecution.params", "commandParams", { method: "Runtime.terminateExecution" }); +export const TerminateExecutionResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.terminateExecution.result", "commandResult", { method: "Runtime.terminateExecution" }); +export const AddBindingParams = withCdpMeta(z.object({ "name": z.string(), "executionContextId": z.lazy(() => ExecutionContextId).optional(), "executionContextName": z.string().optional() }).passthrough(), "Runtime.addBinding.params", "commandParams", { method: "Runtime.addBinding" }); +export const AddBindingResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.addBinding.result", "commandResult", { method: "Runtime.addBinding" }); +export const RemoveBindingParams = withCdpMeta(z.object({ "name": z.string() }).passthrough(), "Runtime.removeBinding.params", "commandParams", { method: "Runtime.removeBinding" }); +export const RemoveBindingResult = withCdpMeta(z.object({ }).passthrough(), "Runtime.removeBinding.result", "commandResult", { method: "Runtime.removeBinding" }); +export const GetExceptionDetailsParams = withCdpMeta(z.object({ "errorObjectId": z.lazy(() => RemoteObjectId) }).passthrough(), "Runtime.getExceptionDetails.params", "commandParams", { method: "Runtime.getExceptionDetails" }); +export const GetExceptionDetailsResult = withCdpMeta(z.object({ "exceptionDetails": z.lazy(() => ExceptionDetails).optional() }).passthrough(), "Runtime.getExceptionDetails.result", "commandResult", { method: "Runtime.getExceptionDetails" }); +export const BindingCalledEvent = withCdpMeta(z.object({ "name": z.string(), "payload": z.string(), "executionContextId": z.lazy(() => ExecutionContextId) }).passthrough(), "Runtime.bindingCalled", "event", { phase: "event" }); +export const ConsoleAPICalledEvent = withCdpMeta(z.object({ "type": z.enum(["log", "debug", "info", "error", "warning", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd", "count", "timeEnd"]), "args": z.array(z.lazy(() => RemoteObject)), "executionContextId": z.lazy(() => ExecutionContextId), "timestamp": z.lazy(() => Timestamp), "stackTrace": z.lazy(() => StackTrace).optional(), "context": z.string().optional() }).passthrough(), "Runtime.consoleAPICalled", "event", { phase: "event" }); +export const ExceptionRevokedEvent = withCdpMeta(z.object({ "reason": z.string(), "exceptionId": z.number().int() }).passthrough(), "Runtime.exceptionRevoked", "event", { phase: "event" }); +export const ExceptionThrownEvent = withCdpMeta(z.object({ "timestamp": z.lazy(() => Timestamp), "exceptionDetails": z.lazy(() => ExceptionDetails) }).passthrough(), "Runtime.exceptionThrown", "event", { phase: "event" }); +export const ExecutionContextCreatedEvent = withCdpMeta(z.object({ "context": z.lazy(() => ExecutionContextDescription) }).passthrough(), "Runtime.executionContextCreated", "event", { phase: "event" }); +export const ExecutionContextDestroyedEvent = withCdpMeta(z.object({ "executionContextId": z.lazy(() => ExecutionContextId), "executionContextUniqueId": z.string() }).passthrough(), "Runtime.executionContextDestroyed", "event", { phase: "event" }); +export const ExecutionContextsClearedEvent = withCdpMeta(z.object({ }).passthrough(), "Runtime.executionContextsCleared", "event", { phase: "event" }); +export const InspectRequestedEvent = withCdpMeta(z.object({ "object": z.lazy(() => RemoteObject), "hints": z.record(z.string(), z.unknown()), "executionContextId": z.lazy(() => ExecutionContextId).optional() }).passthrough(), "Runtime.inspectRequested", "event", { phase: "event" }); + +export const zod = { + ScriptId: ScriptId, + SerializationOptions: SerializationOptions, + DeepSerializedValue: DeepSerializedValue, + RemoteObjectId: RemoteObjectId, + UnserializableValue: UnserializableValue, + RemoteObject: RemoteObject, + CustomPreview: CustomPreview, + ObjectPreview: ObjectPreview, + PropertyPreview: PropertyPreview, + EntryPreview: EntryPreview, + PropertyDescriptor: PropertyDescriptor, + InternalPropertyDescriptor: InternalPropertyDescriptor, + PrivatePropertyDescriptor: PrivatePropertyDescriptor, + CallArgument: CallArgument, + ExecutionContextId: ExecutionContextId, + ExecutionContextDescription: ExecutionContextDescription, + ExceptionDetails: ExceptionDetails, + Timestamp: Timestamp, + TimeDelta: TimeDelta, + CallFrame: CallFrame, + StackTrace: StackTrace, + UniqueDebuggerId: UniqueDebuggerId, + StackTraceId: StackTraceId, + AwaitPromiseParams: AwaitPromiseParams, + AwaitPromiseResult: AwaitPromiseResult, + CallFunctionOnParams: CallFunctionOnParams, + CallFunctionOnResult: CallFunctionOnResult, + CompileScriptParams: CompileScriptParams, + CompileScriptResult: CompileScriptResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + DiscardConsoleEntriesParams: DiscardConsoleEntriesParams, + DiscardConsoleEntriesResult: DiscardConsoleEntriesResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + EvaluateParams: EvaluateParams, + EvaluateResult: EvaluateResult, + GetIsolateIdParams: GetIsolateIdParams, + GetIsolateIdResult: GetIsolateIdResult, + GetHeapUsageParams: GetHeapUsageParams, + GetHeapUsageResult: GetHeapUsageResult, + GetPropertiesParams: GetPropertiesParams, + GetPropertiesResult: GetPropertiesResult, + GlobalLexicalScopeNamesParams: GlobalLexicalScopeNamesParams, + GlobalLexicalScopeNamesResult: GlobalLexicalScopeNamesResult, + QueryObjectsParams: QueryObjectsParams, + QueryObjectsResult: QueryObjectsResult, + ReleaseObjectParams: ReleaseObjectParams, + ReleaseObjectResult: ReleaseObjectResult, + ReleaseObjectGroupParams: ReleaseObjectGroupParams, + ReleaseObjectGroupResult: ReleaseObjectGroupResult, + RunIfWaitingForDebuggerParams: RunIfWaitingForDebuggerParams, + RunIfWaitingForDebuggerResult: RunIfWaitingForDebuggerResult, + RunScriptParams: RunScriptParams, + RunScriptResult: RunScriptResult, + SetAsyncCallStackDepthParams: SetAsyncCallStackDepthParams, + SetAsyncCallStackDepthResult: SetAsyncCallStackDepthResult, + SetCustomObjectFormatterEnabledParams: SetCustomObjectFormatterEnabledParams, + SetCustomObjectFormatterEnabledResult: SetCustomObjectFormatterEnabledResult, + SetMaxCallStackSizeToCaptureParams: SetMaxCallStackSizeToCaptureParams, + SetMaxCallStackSizeToCaptureResult: SetMaxCallStackSizeToCaptureResult, + TerminateExecutionParams: TerminateExecutionParams, + TerminateExecutionResult: TerminateExecutionResult, + AddBindingParams: AddBindingParams, + AddBindingResult: AddBindingResult, + RemoveBindingParams: RemoveBindingParams, + RemoveBindingResult: RemoveBindingResult, + GetExceptionDetailsParams: GetExceptionDetailsParams, + GetExceptionDetailsResult: GetExceptionDetailsResult, + BindingCalledEvent: BindingCalledEvent, + ConsoleAPICalledEvent: ConsoleAPICalledEvent, + ExceptionRevokedEvent: ExceptionRevokedEvent, + ExceptionThrownEvent: ExceptionThrownEvent, + ExecutionContextCreatedEvent: ExecutionContextCreatedEvent, + ExecutionContextDestroyedEvent: ExecutionContextDestroyedEvent, + ExecutionContextsClearedEvent: ExecutionContextsClearedEvent, + InspectRequestedEvent: InspectRequestedEvent, +} as const; +export const commands = { + "Runtime.awaitPromise": { params: AwaitPromiseParams, result: AwaitPromiseResult }, + "Runtime.callFunctionOn": { params: CallFunctionOnParams, result: CallFunctionOnResult }, + "Runtime.compileScript": { params: CompileScriptParams, result: CompileScriptResult }, + "Runtime.disable": { params: DisableParams, result: DisableResult }, + "Runtime.discardConsoleEntries": { params: DiscardConsoleEntriesParams, result: DiscardConsoleEntriesResult }, + "Runtime.enable": { params: EnableParams, result: EnableResult }, + "Runtime.evaluate": { params: EvaluateParams, result: EvaluateResult }, + "Runtime.getIsolateId": { params: GetIsolateIdParams, result: GetIsolateIdResult }, + "Runtime.getHeapUsage": { params: GetHeapUsageParams, result: GetHeapUsageResult }, + "Runtime.getProperties": { params: GetPropertiesParams, result: GetPropertiesResult }, + "Runtime.globalLexicalScopeNames": { params: GlobalLexicalScopeNamesParams, result: GlobalLexicalScopeNamesResult }, + "Runtime.queryObjects": { params: QueryObjectsParams, result: QueryObjectsResult }, + "Runtime.releaseObject": { params: ReleaseObjectParams, result: ReleaseObjectResult }, + "Runtime.releaseObjectGroup": { params: ReleaseObjectGroupParams, result: ReleaseObjectGroupResult }, + "Runtime.runIfWaitingForDebugger": { params: RunIfWaitingForDebuggerParams, result: RunIfWaitingForDebuggerResult }, + "Runtime.runScript": { params: RunScriptParams, result: RunScriptResult }, + "Runtime.setAsyncCallStackDepth": { params: SetAsyncCallStackDepthParams, result: SetAsyncCallStackDepthResult }, + "Runtime.setCustomObjectFormatterEnabled": { params: SetCustomObjectFormatterEnabledParams, result: SetCustomObjectFormatterEnabledResult }, + "Runtime.setMaxCallStackSizeToCapture": { params: SetMaxCallStackSizeToCaptureParams, result: SetMaxCallStackSizeToCaptureResult }, + "Runtime.terminateExecution": { params: TerminateExecutionParams, result: TerminateExecutionResult }, + "Runtime.addBinding": { params: AddBindingParams, result: AddBindingResult }, + "Runtime.removeBinding": { params: RemoveBindingParams, result: RemoveBindingResult }, + "Runtime.getExceptionDetails": { params: GetExceptionDetailsParams, result: GetExceptionDetailsResult }, +} as const; +export const events = { + "Runtime.bindingCalled": BindingCalledEvent, + "Runtime.consoleAPICalled": ConsoleAPICalledEvent, + "Runtime.exceptionRevoked": ExceptionRevokedEvent, + "Runtime.exceptionThrown": ExceptionThrownEvent, + "Runtime.executionContextCreated": ExecutionContextCreatedEvent, + "Runtime.executionContextDestroyed": ExecutionContextDestroyedEvent, + "Runtime.executionContextsCleared": ExecutionContextsClearedEvent, + "Runtime.inspectRequested": InspectRequestedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Schema.ts b/types/zod/Schema.ts new file mode 100644 index 0000000..bbc668b --- /dev/null +++ b/types/zod/Schema.ts @@ -0,0 +1,21 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const Domain = withCdpMeta(z.object({ "name": z.string(), "version": z.string() }).passthrough(), "Schema.Domain", "type"); +export const GetDomainsParams = withCdpMeta(z.object({ }).passthrough(), "Schema.getDomains.params", "commandParams", { method: "Schema.getDomains" }); +export const GetDomainsResult = withCdpMeta(z.object({ "domains": z.array(z.lazy(() => Domain)) }).passthrough(), "Schema.getDomains.result", "commandResult", { method: "Schema.getDomains" }); + +export const zod = { + Domain: Domain, + GetDomainsParams: GetDomainsParams, + GetDomainsResult: GetDomainsResult, +} as const; +export const commands = { + "Schema.getDomains": { params: GetDomainsParams, result: GetDomainsResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Security.ts b/types/zod/Security.ts new file mode 100644 index 0000000..3c6c4e2 --- /dev/null +++ b/types/zod/Security.ts @@ -0,0 +1,69 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Network from "./Network.js"; + +export const CertificateId = withCdpMeta(z.number().int(), "Security.CertificateId", "type"); +export const MixedContentType = withCdpMeta(z.enum(["blockable", "optionally-blockable", "none"]), "Security.MixedContentType", "type"); +export const SecurityState = withCdpMeta(z.enum(["unknown", "neutral", "insecure", "secure", "info", "insecure-broken"]), "Security.SecurityState", "type"); +export const CertificateSecurityState = withCdpMeta(z.object({ "protocol": z.string(), "keyExchange": z.string(), "keyExchangeGroup": z.string().optional(), "cipher": z.string(), "mac": z.string().optional(), "certificate": z.array(z.string()), "subjectName": z.string(), "issuer": z.string(), "validFrom": z.lazy(() => Network.TimeSinceEpoch), "validTo": z.lazy(() => Network.TimeSinceEpoch), "certificateNetworkError": z.string().optional(), "certificateHasWeakSignature": z.boolean(), "certificateHasSha1Signature": z.boolean(), "modernSSL": z.boolean(), "obsoleteSslProtocol": z.boolean(), "obsoleteSslKeyExchange": z.boolean(), "obsoleteSslCipher": z.boolean(), "obsoleteSslSignature": z.boolean() }).passthrough(), "Security.CertificateSecurityState", "type"); +export const SafetyTipStatus = withCdpMeta(z.enum(["badReputation", "lookalike"]), "Security.SafetyTipStatus", "type"); +export const SafetyTipInfo = withCdpMeta(z.object({ "safetyTipStatus": z.lazy(() => SafetyTipStatus), "safeUrl": z.string().optional() }).passthrough(), "Security.SafetyTipInfo", "type"); +export const VisibleSecurityState = withCdpMeta(z.object({ "securityState": z.lazy(() => SecurityState), "certificateSecurityState": z.lazy(() => CertificateSecurityState).optional(), "safetyTipInfo": z.lazy(() => SafetyTipInfo).optional(), "securityStateIssueIds": z.array(z.string()) }).passthrough(), "Security.VisibleSecurityState", "type"); +export const SecurityStateExplanation = withCdpMeta(z.object({ "securityState": z.lazy(() => SecurityState), "title": z.string(), "summary": z.string(), "description": z.string(), "mixedContentType": z.lazy(() => MixedContentType), "certificate": z.array(z.string()), "recommendations": z.array(z.string()).optional() }).passthrough(), "Security.SecurityStateExplanation", "type"); +export const InsecureContentStatus = withCdpMeta(z.object({ "ranMixedContent": z.boolean(), "displayedMixedContent": z.boolean(), "containedMixedForm": z.boolean(), "ranContentWithCertErrors": z.boolean(), "displayedContentWithCertErrors": z.boolean(), "ranInsecureContentStyle": z.lazy(() => SecurityState), "displayedInsecureContentStyle": z.lazy(() => SecurityState) }).passthrough(), "Security.InsecureContentStatus", "type"); +export const CertificateErrorAction = withCdpMeta(z.enum(["continue", "cancel"]), "Security.CertificateErrorAction", "type"); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "Security.disable.params", "commandParams", { method: "Security.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "Security.disable.result", "commandResult", { method: "Security.disable" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "Security.enable.params", "commandParams", { method: "Security.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "Security.enable.result", "commandResult", { method: "Security.enable" }); +export const SetIgnoreCertificateErrorsParams = withCdpMeta(z.object({ "ignore": z.boolean() }).passthrough(), "Security.setIgnoreCertificateErrors.params", "commandParams", { method: "Security.setIgnoreCertificateErrors" }); +export const SetIgnoreCertificateErrorsResult = withCdpMeta(z.object({ }).passthrough(), "Security.setIgnoreCertificateErrors.result", "commandResult", { method: "Security.setIgnoreCertificateErrors" }); +export const HandleCertificateErrorParams = withCdpMeta(z.object({ "eventId": z.number().int(), "action": z.lazy(() => CertificateErrorAction) }).passthrough(), "Security.handleCertificateError.params", "commandParams", { method: "Security.handleCertificateError" }); +export const HandleCertificateErrorResult = withCdpMeta(z.object({ }).passthrough(), "Security.handleCertificateError.result", "commandResult", { method: "Security.handleCertificateError" }); +export const SetOverrideCertificateErrorsParams = withCdpMeta(z.object({ "override": z.boolean() }).passthrough(), "Security.setOverrideCertificateErrors.params", "commandParams", { method: "Security.setOverrideCertificateErrors" }); +export const SetOverrideCertificateErrorsResult = withCdpMeta(z.object({ }).passthrough(), "Security.setOverrideCertificateErrors.result", "commandResult", { method: "Security.setOverrideCertificateErrors" }); +export const CertificateErrorEvent = withCdpMeta(z.object({ "eventId": z.number().int(), "errorType": z.string(), "requestURL": z.string() }).passthrough(), "Security.certificateError", "event", { phase: "event" }); +export const VisibleSecurityStateChangedEvent = withCdpMeta(z.object({ "visibleSecurityState": z.lazy(() => VisibleSecurityState) }).passthrough(), "Security.visibleSecurityStateChanged", "event", { phase: "event" }); +export const SecurityStateChangedEvent = withCdpMeta(z.object({ "securityState": z.lazy(() => SecurityState), "schemeIsCryptographic": z.boolean(), "explanations": z.array(z.lazy(() => SecurityStateExplanation)), "insecureContentStatus": z.lazy(() => InsecureContentStatus), "summary": z.string().optional() }).passthrough(), "Security.securityStateChanged", "event", { phase: "event" }); + +export const zod = { + CertificateId: CertificateId, + MixedContentType: MixedContentType, + SecurityState: SecurityState, + CertificateSecurityState: CertificateSecurityState, + SafetyTipStatus: SafetyTipStatus, + SafetyTipInfo: SafetyTipInfo, + VisibleSecurityState: VisibleSecurityState, + SecurityStateExplanation: SecurityStateExplanation, + InsecureContentStatus: InsecureContentStatus, + CertificateErrorAction: CertificateErrorAction, + DisableParams: DisableParams, + DisableResult: DisableResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + SetIgnoreCertificateErrorsParams: SetIgnoreCertificateErrorsParams, + SetIgnoreCertificateErrorsResult: SetIgnoreCertificateErrorsResult, + HandleCertificateErrorParams: HandleCertificateErrorParams, + HandleCertificateErrorResult: HandleCertificateErrorResult, + SetOverrideCertificateErrorsParams: SetOverrideCertificateErrorsParams, + SetOverrideCertificateErrorsResult: SetOverrideCertificateErrorsResult, + CertificateErrorEvent: CertificateErrorEvent, + VisibleSecurityStateChangedEvent: VisibleSecurityStateChangedEvent, + SecurityStateChangedEvent: SecurityStateChangedEvent, +} as const; +export const commands = { + "Security.disable": { params: DisableParams, result: DisableResult }, + "Security.enable": { params: EnableParams, result: EnableResult }, + "Security.setIgnoreCertificateErrors": { params: SetIgnoreCertificateErrorsParams, result: SetIgnoreCertificateErrorsResult }, + "Security.handleCertificateError": { params: HandleCertificateErrorParams, result: HandleCertificateErrorResult }, + "Security.setOverrideCertificateErrors": { params: SetOverrideCertificateErrorsParams, result: SetOverrideCertificateErrorsResult }, +} as const; +export const events = { + "Security.certificateError": CertificateErrorEvent, + "Security.visibleSecurityStateChanged": VisibleSecurityStateChangedEvent, + "Security.securityStateChanged": SecurityStateChangedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/ServiceWorker.ts b/types/zod/ServiceWorker.ts new file mode 100644 index 0000000..636a776 --- /dev/null +++ b/types/zod/ServiceWorker.ts @@ -0,0 +1,96 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Target from "./Target.js"; + +export const RegistrationID = withCdpMeta(z.string(), "ServiceWorker.RegistrationID", "type"); +export const ServiceWorkerRegistration = withCdpMeta(z.object({ "registrationId": z.lazy(() => RegistrationID), "scopeURL": z.string(), "isDeleted": z.boolean() }).passthrough(), "ServiceWorker.ServiceWorkerRegistration", "type"); +export const ServiceWorkerVersionRunningStatus = withCdpMeta(z.enum(["stopped", "starting", "running", "stopping"]), "ServiceWorker.ServiceWorkerVersionRunningStatus", "type"); +export const ServiceWorkerVersionStatus = withCdpMeta(z.enum(["new", "installing", "installed", "activating", "activated", "redundant"]), "ServiceWorker.ServiceWorkerVersionStatus", "type"); +export const ServiceWorkerVersion = withCdpMeta(z.object({ "versionId": z.string(), "registrationId": z.lazy(() => RegistrationID), "scriptURL": z.string(), "runningStatus": z.lazy(() => ServiceWorkerVersionRunningStatus), "status": z.lazy(() => ServiceWorkerVersionStatus), "scriptLastModified": z.number().optional(), "scriptResponseTime": z.number().optional(), "controlledClients": z.array(z.lazy(() => Target.TargetID)).optional(), "targetId": z.lazy(() => Target.TargetID).optional(), "routerRules": z.string().optional() }).passthrough(), "ServiceWorker.ServiceWorkerVersion", "type"); +export const ServiceWorkerErrorMessage = withCdpMeta(z.object({ "errorMessage": z.string(), "registrationId": z.lazy(() => RegistrationID), "versionId": z.string(), "sourceURL": z.string(), "lineNumber": z.number().int(), "columnNumber": z.number().int() }).passthrough(), "ServiceWorker.ServiceWorkerErrorMessage", "type"); +export const DeliverPushMessageParams = withCdpMeta(z.object({ "origin": z.string(), "registrationId": z.lazy(() => RegistrationID), "data": z.string() }).passthrough(), "ServiceWorker.deliverPushMessage.params", "commandParams", { method: "ServiceWorker.deliverPushMessage" }); +export const DeliverPushMessageResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.deliverPushMessage.result", "commandResult", { method: "ServiceWorker.deliverPushMessage" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.disable.params", "commandParams", { method: "ServiceWorker.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.disable.result", "commandResult", { method: "ServiceWorker.disable" }); +export const DispatchSyncEventParams = withCdpMeta(z.object({ "origin": z.string(), "registrationId": z.lazy(() => RegistrationID), "tag": z.string(), "lastChance": z.boolean() }).passthrough(), "ServiceWorker.dispatchSyncEvent.params", "commandParams", { method: "ServiceWorker.dispatchSyncEvent" }); +export const DispatchSyncEventResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.dispatchSyncEvent.result", "commandResult", { method: "ServiceWorker.dispatchSyncEvent" }); +export const DispatchPeriodicSyncEventParams = withCdpMeta(z.object({ "origin": z.string(), "registrationId": z.lazy(() => RegistrationID), "tag": z.string() }).passthrough(), "ServiceWorker.dispatchPeriodicSyncEvent.params", "commandParams", { method: "ServiceWorker.dispatchPeriodicSyncEvent" }); +export const DispatchPeriodicSyncEventResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.dispatchPeriodicSyncEvent.result", "commandResult", { method: "ServiceWorker.dispatchPeriodicSyncEvent" }); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.enable.params", "commandParams", { method: "ServiceWorker.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.enable.result", "commandResult", { method: "ServiceWorker.enable" }); +export const SetForceUpdateOnPageLoadParams = withCdpMeta(z.object({ "forceUpdateOnPageLoad": z.boolean() }).passthrough(), "ServiceWorker.setForceUpdateOnPageLoad.params", "commandParams", { method: "ServiceWorker.setForceUpdateOnPageLoad" }); +export const SetForceUpdateOnPageLoadResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.setForceUpdateOnPageLoad.result", "commandResult", { method: "ServiceWorker.setForceUpdateOnPageLoad" }); +export const SkipWaitingParams = withCdpMeta(z.object({ "scopeURL": z.string() }).passthrough(), "ServiceWorker.skipWaiting.params", "commandParams", { method: "ServiceWorker.skipWaiting" }); +export const SkipWaitingResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.skipWaiting.result", "commandResult", { method: "ServiceWorker.skipWaiting" }); +export const StartWorkerParams = withCdpMeta(z.object({ "scopeURL": z.string() }).passthrough(), "ServiceWorker.startWorker.params", "commandParams", { method: "ServiceWorker.startWorker" }); +export const StartWorkerResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.startWorker.result", "commandResult", { method: "ServiceWorker.startWorker" }); +export const StopAllWorkersParams = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.stopAllWorkers.params", "commandParams", { method: "ServiceWorker.stopAllWorkers" }); +export const StopAllWorkersResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.stopAllWorkers.result", "commandResult", { method: "ServiceWorker.stopAllWorkers" }); +export const StopWorkerParams = withCdpMeta(z.object({ "versionId": z.string() }).passthrough(), "ServiceWorker.stopWorker.params", "commandParams", { method: "ServiceWorker.stopWorker" }); +export const StopWorkerResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.stopWorker.result", "commandResult", { method: "ServiceWorker.stopWorker" }); +export const UnregisterParams = withCdpMeta(z.object({ "scopeURL": z.string() }).passthrough(), "ServiceWorker.unregister.params", "commandParams", { method: "ServiceWorker.unregister" }); +export const UnregisterResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.unregister.result", "commandResult", { method: "ServiceWorker.unregister" }); +export const UpdateRegistrationParams = withCdpMeta(z.object({ "scopeURL": z.string() }).passthrough(), "ServiceWorker.updateRegistration.params", "commandParams", { method: "ServiceWorker.updateRegistration" }); +export const UpdateRegistrationResult = withCdpMeta(z.object({ }).passthrough(), "ServiceWorker.updateRegistration.result", "commandResult", { method: "ServiceWorker.updateRegistration" }); +export const WorkerErrorReportedEvent = withCdpMeta(z.object({ "errorMessage": z.lazy(() => ServiceWorkerErrorMessage) }).passthrough(), "ServiceWorker.workerErrorReported", "event", { phase: "event" }); +export const WorkerRegistrationUpdatedEvent = withCdpMeta(z.object({ "registrations": z.array(z.lazy(() => ServiceWorkerRegistration)) }).passthrough(), "ServiceWorker.workerRegistrationUpdated", "event", { phase: "event" }); +export const WorkerVersionUpdatedEvent = withCdpMeta(z.object({ "versions": z.array(z.lazy(() => ServiceWorkerVersion)) }).passthrough(), "ServiceWorker.workerVersionUpdated", "event", { phase: "event" }); + +export const zod = { + RegistrationID: RegistrationID, + ServiceWorkerRegistration: ServiceWorkerRegistration, + ServiceWorkerVersionRunningStatus: ServiceWorkerVersionRunningStatus, + ServiceWorkerVersionStatus: ServiceWorkerVersionStatus, + ServiceWorkerVersion: ServiceWorkerVersion, + ServiceWorkerErrorMessage: ServiceWorkerErrorMessage, + DeliverPushMessageParams: DeliverPushMessageParams, + DeliverPushMessageResult: DeliverPushMessageResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + DispatchSyncEventParams: DispatchSyncEventParams, + DispatchSyncEventResult: DispatchSyncEventResult, + DispatchPeriodicSyncEventParams: DispatchPeriodicSyncEventParams, + DispatchPeriodicSyncEventResult: DispatchPeriodicSyncEventResult, + EnableParams: EnableParams, + EnableResult: EnableResult, + SetForceUpdateOnPageLoadParams: SetForceUpdateOnPageLoadParams, + SetForceUpdateOnPageLoadResult: SetForceUpdateOnPageLoadResult, + SkipWaitingParams: SkipWaitingParams, + SkipWaitingResult: SkipWaitingResult, + StartWorkerParams: StartWorkerParams, + StartWorkerResult: StartWorkerResult, + StopAllWorkersParams: StopAllWorkersParams, + StopAllWorkersResult: StopAllWorkersResult, + StopWorkerParams: StopWorkerParams, + StopWorkerResult: StopWorkerResult, + UnregisterParams: UnregisterParams, + UnregisterResult: UnregisterResult, + UpdateRegistrationParams: UpdateRegistrationParams, + UpdateRegistrationResult: UpdateRegistrationResult, + WorkerErrorReportedEvent: WorkerErrorReportedEvent, + WorkerRegistrationUpdatedEvent: WorkerRegistrationUpdatedEvent, + WorkerVersionUpdatedEvent: WorkerVersionUpdatedEvent, +} as const; +export const commands = { + "ServiceWorker.deliverPushMessage": { params: DeliverPushMessageParams, result: DeliverPushMessageResult }, + "ServiceWorker.disable": { params: DisableParams, result: DisableResult }, + "ServiceWorker.dispatchSyncEvent": { params: DispatchSyncEventParams, result: DispatchSyncEventResult }, + "ServiceWorker.dispatchPeriodicSyncEvent": { params: DispatchPeriodicSyncEventParams, result: DispatchPeriodicSyncEventResult }, + "ServiceWorker.enable": { params: EnableParams, result: EnableResult }, + "ServiceWorker.setForceUpdateOnPageLoad": { params: SetForceUpdateOnPageLoadParams, result: SetForceUpdateOnPageLoadResult }, + "ServiceWorker.skipWaiting": { params: SkipWaitingParams, result: SkipWaitingResult }, + "ServiceWorker.startWorker": { params: StartWorkerParams, result: StartWorkerResult }, + "ServiceWorker.stopAllWorkers": { params: StopAllWorkersParams, result: StopAllWorkersResult }, + "ServiceWorker.stopWorker": { params: StopWorkerParams, result: StopWorkerResult }, + "ServiceWorker.unregister": { params: UnregisterParams, result: UnregisterResult }, + "ServiceWorker.updateRegistration": { params: UpdateRegistrationParams, result: UpdateRegistrationResult }, +} as const; +export const events = { + "ServiceWorker.workerErrorReported": WorkerErrorReportedEvent, + "ServiceWorker.workerRegistrationUpdated": WorkerRegistrationUpdatedEvent, + "ServiceWorker.workerVersionUpdated": WorkerVersionUpdatedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/SmartCardEmulation.ts b/types/zod/SmartCardEmulation.ts new file mode 100644 index 0000000..946008e --- /dev/null +++ b/types/zod/SmartCardEmulation.ts @@ -0,0 +1,134 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const ResultCode = withCdpMeta(z.enum(["success", "removed-card", "reset-card", "unpowered-card", "unresponsive-card", "unsupported-card", "reader-unavailable", "sharing-violation", "not-transacted", "no-smartcard", "proto-mismatch", "system-cancelled", "not-ready", "cancelled", "insufficient-buffer", "invalid-handle", "invalid-parameter", "invalid-value", "no-memory", "timeout", "unknown-reader", "unsupported-feature", "no-readers-available", "service-stopped", "no-service", "comm-error", "internal-error", "server-too-busy", "unexpected", "shutdown", "unknown-card", "unknown"]), "SmartCardEmulation.ResultCode", "type"); +export const ShareMode = withCdpMeta(z.enum(["shared", "exclusive", "direct"]), "SmartCardEmulation.ShareMode", "type"); +export const Disposition = withCdpMeta(z.enum(["leave-card", "reset-card", "unpower-card", "eject-card"]), "SmartCardEmulation.Disposition", "type"); +export const ConnectionState = withCdpMeta(z.enum(["absent", "present", "swallowed", "powered", "negotiable", "specific"]), "SmartCardEmulation.ConnectionState", "type"); +export const ReaderStateFlags = withCdpMeta(z.object({ "unaware": z.boolean().optional(), "ignore": z.boolean().optional(), "changed": z.boolean().optional(), "unknown": z.boolean().optional(), "unavailable": z.boolean().optional(), "empty": z.boolean().optional(), "present": z.boolean().optional(), "exclusive": z.boolean().optional(), "inuse": z.boolean().optional(), "mute": z.boolean().optional(), "unpowered": z.boolean().optional() }).passthrough(), "SmartCardEmulation.ReaderStateFlags", "type"); +export const ProtocolSet = withCdpMeta(z.object({ "t0": z.boolean().optional(), "t1": z.boolean().optional(), "raw": z.boolean().optional() }).passthrough(), "SmartCardEmulation.ProtocolSet", "type"); +export const Protocol = withCdpMeta(z.enum(["t0", "t1", "raw"]), "SmartCardEmulation.Protocol", "type"); +export const ReaderStateIn = withCdpMeta(z.object({ "reader": z.string(), "currentState": z.lazy(() => ReaderStateFlags), "currentInsertionCount": z.number().int() }).passthrough(), "SmartCardEmulation.ReaderStateIn", "type"); +export const ReaderStateOut = withCdpMeta(z.object({ "reader": z.string(), "eventState": z.lazy(() => ReaderStateFlags), "eventCount": z.number().int(), "atr": z.string() }).passthrough(), "SmartCardEmulation.ReaderStateOut", "type"); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.enable.params", "commandParams", { method: "SmartCardEmulation.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.enable.result", "commandResult", { method: "SmartCardEmulation.enable" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.disable.params", "commandParams", { method: "SmartCardEmulation.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.disable.result", "commandResult", { method: "SmartCardEmulation.disable" }); +export const ReportEstablishContextResultParams = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int() }).passthrough(), "SmartCardEmulation.reportEstablishContextResult.params", "commandParams", { method: "SmartCardEmulation.reportEstablishContextResult" }); +export const ReportEstablishContextResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportEstablishContextResult.result", "commandResult", { method: "SmartCardEmulation.reportEstablishContextResult" }); +export const ReportReleaseContextResultParams = withCdpMeta(z.object({ "requestId": z.string() }).passthrough(), "SmartCardEmulation.reportReleaseContextResult.params", "commandParams", { method: "SmartCardEmulation.reportReleaseContextResult" }); +export const ReportReleaseContextResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportReleaseContextResult.result", "commandResult", { method: "SmartCardEmulation.reportReleaseContextResult" }); +export const ReportListReadersResultParams = withCdpMeta(z.object({ "requestId": z.string(), "readers": z.array(z.string()) }).passthrough(), "SmartCardEmulation.reportListReadersResult.params", "commandParams", { method: "SmartCardEmulation.reportListReadersResult" }); +export const ReportListReadersResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportListReadersResult.result", "commandResult", { method: "SmartCardEmulation.reportListReadersResult" }); +export const ReportGetStatusChangeResultParams = withCdpMeta(z.object({ "requestId": z.string(), "readerStates": z.array(z.lazy(() => ReaderStateOut)) }).passthrough(), "SmartCardEmulation.reportGetStatusChangeResult.params", "commandParams", { method: "SmartCardEmulation.reportGetStatusChangeResult" }); +export const ReportGetStatusChangeResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportGetStatusChangeResult.result", "commandResult", { method: "SmartCardEmulation.reportGetStatusChangeResult" }); +export const ReportBeginTransactionResultParams = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int() }).passthrough(), "SmartCardEmulation.reportBeginTransactionResult.params", "commandParams", { method: "SmartCardEmulation.reportBeginTransactionResult" }); +export const ReportBeginTransactionResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportBeginTransactionResult.result", "commandResult", { method: "SmartCardEmulation.reportBeginTransactionResult" }); +export const ReportPlainResultParams = withCdpMeta(z.object({ "requestId": z.string() }).passthrough(), "SmartCardEmulation.reportPlainResult.params", "commandParams", { method: "SmartCardEmulation.reportPlainResult" }); +export const ReportPlainResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportPlainResult.result", "commandResult", { method: "SmartCardEmulation.reportPlainResult" }); +export const ReportConnectResultParams = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "activeProtocol": z.lazy(() => Protocol).optional() }).passthrough(), "SmartCardEmulation.reportConnectResult.params", "commandParams", { method: "SmartCardEmulation.reportConnectResult" }); +export const ReportConnectResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportConnectResult.result", "commandResult", { method: "SmartCardEmulation.reportConnectResult" }); +export const ReportDataResultParams = withCdpMeta(z.object({ "requestId": z.string(), "data": z.string() }).passthrough(), "SmartCardEmulation.reportDataResult.params", "commandParams", { method: "SmartCardEmulation.reportDataResult" }); +export const ReportDataResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportDataResult.result", "commandResult", { method: "SmartCardEmulation.reportDataResult" }); +export const ReportStatusResultParams = withCdpMeta(z.object({ "requestId": z.string(), "readerName": z.string(), "state": z.lazy(() => ConnectionState), "atr": z.string(), "protocol": z.lazy(() => Protocol).optional() }).passthrough(), "SmartCardEmulation.reportStatusResult.params", "commandParams", { method: "SmartCardEmulation.reportStatusResult" }); +export const ReportStatusResultResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportStatusResult.result", "commandResult", { method: "SmartCardEmulation.reportStatusResult" }); +export const ReportErrorParams = withCdpMeta(z.object({ "requestId": z.string(), "resultCode": z.lazy(() => ResultCode) }).passthrough(), "SmartCardEmulation.reportError.params", "commandParams", { method: "SmartCardEmulation.reportError" }); +export const ReportErrorResult = withCdpMeta(z.object({ }).passthrough(), "SmartCardEmulation.reportError.result", "commandResult", { method: "SmartCardEmulation.reportError" }); +export const EstablishContextRequestedEvent = withCdpMeta(z.object({ "requestId": z.string() }).passthrough(), "SmartCardEmulation.establishContextRequested", "event", { phase: "event" }); +export const ReleaseContextRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int() }).passthrough(), "SmartCardEmulation.releaseContextRequested", "event", { phase: "event" }); +export const ListReadersRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int() }).passthrough(), "SmartCardEmulation.listReadersRequested", "event", { phase: "event" }); +export const GetStatusChangeRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int(), "readerStates": z.array(z.lazy(() => ReaderStateIn)), "timeout": z.number().int().optional() }).passthrough(), "SmartCardEmulation.getStatusChangeRequested", "event", { phase: "event" }); +export const CancelRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int() }).passthrough(), "SmartCardEmulation.cancelRequested", "event", { phase: "event" }); +export const ConnectRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "contextId": z.number().int(), "reader": z.string(), "shareMode": z.lazy(() => ShareMode), "preferredProtocols": z.lazy(() => ProtocolSet) }).passthrough(), "SmartCardEmulation.connectRequested", "event", { phase: "event" }); +export const DisconnectRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "disposition": z.lazy(() => Disposition) }).passthrough(), "SmartCardEmulation.disconnectRequested", "event", { phase: "event" }); +export const TransmitRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "data": z.string(), "protocol": z.lazy(() => Protocol).optional() }).passthrough(), "SmartCardEmulation.transmitRequested", "event", { phase: "event" }); +export const ControlRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "controlCode": z.number().int(), "data": z.string() }).passthrough(), "SmartCardEmulation.controlRequested", "event", { phase: "event" }); +export const GetAttribRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "attribId": z.number().int() }).passthrough(), "SmartCardEmulation.getAttribRequested", "event", { phase: "event" }); +export const SetAttribRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "attribId": z.number().int(), "data": z.string() }).passthrough(), "SmartCardEmulation.setAttribRequested", "event", { phase: "event" }); +export const StatusRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int() }).passthrough(), "SmartCardEmulation.statusRequested", "event", { phase: "event" }); +export const BeginTransactionRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int() }).passthrough(), "SmartCardEmulation.beginTransactionRequested", "event", { phase: "event" }); +export const EndTransactionRequestedEvent = withCdpMeta(z.object({ "requestId": z.string(), "handle": z.number().int(), "disposition": z.lazy(() => Disposition) }).passthrough(), "SmartCardEmulation.endTransactionRequested", "event", { phase: "event" }); + +export const zod = { + ResultCode: ResultCode, + ShareMode: ShareMode, + Disposition: Disposition, + ConnectionState: ConnectionState, + ReaderStateFlags: ReaderStateFlags, + ProtocolSet: ProtocolSet, + Protocol: Protocol, + ReaderStateIn: ReaderStateIn, + ReaderStateOut: ReaderStateOut, + EnableParams: EnableParams, + EnableResult: EnableResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + ReportEstablishContextResultParams: ReportEstablishContextResultParams, + ReportEstablishContextResultResult: ReportEstablishContextResultResult, + ReportReleaseContextResultParams: ReportReleaseContextResultParams, + ReportReleaseContextResultResult: ReportReleaseContextResultResult, + ReportListReadersResultParams: ReportListReadersResultParams, + ReportListReadersResultResult: ReportListReadersResultResult, + ReportGetStatusChangeResultParams: ReportGetStatusChangeResultParams, + ReportGetStatusChangeResultResult: ReportGetStatusChangeResultResult, + ReportBeginTransactionResultParams: ReportBeginTransactionResultParams, + ReportBeginTransactionResultResult: ReportBeginTransactionResultResult, + ReportPlainResultParams: ReportPlainResultParams, + ReportPlainResultResult: ReportPlainResultResult, + ReportConnectResultParams: ReportConnectResultParams, + ReportConnectResultResult: ReportConnectResultResult, + ReportDataResultParams: ReportDataResultParams, + ReportDataResultResult: ReportDataResultResult, + ReportStatusResultParams: ReportStatusResultParams, + ReportStatusResultResult: ReportStatusResultResult, + ReportErrorParams: ReportErrorParams, + ReportErrorResult: ReportErrorResult, + EstablishContextRequestedEvent: EstablishContextRequestedEvent, + ReleaseContextRequestedEvent: ReleaseContextRequestedEvent, + ListReadersRequestedEvent: ListReadersRequestedEvent, + GetStatusChangeRequestedEvent: GetStatusChangeRequestedEvent, + CancelRequestedEvent: CancelRequestedEvent, + ConnectRequestedEvent: ConnectRequestedEvent, + DisconnectRequestedEvent: DisconnectRequestedEvent, + TransmitRequestedEvent: TransmitRequestedEvent, + ControlRequestedEvent: ControlRequestedEvent, + GetAttribRequestedEvent: GetAttribRequestedEvent, + SetAttribRequestedEvent: SetAttribRequestedEvent, + StatusRequestedEvent: StatusRequestedEvent, + BeginTransactionRequestedEvent: BeginTransactionRequestedEvent, + EndTransactionRequestedEvent: EndTransactionRequestedEvent, +} as const; +export const commands = { + "SmartCardEmulation.enable": { params: EnableParams, result: EnableResult }, + "SmartCardEmulation.disable": { params: DisableParams, result: DisableResult }, + "SmartCardEmulation.reportEstablishContextResult": { params: ReportEstablishContextResultParams, result: ReportEstablishContextResultResult }, + "SmartCardEmulation.reportReleaseContextResult": { params: ReportReleaseContextResultParams, result: ReportReleaseContextResultResult }, + "SmartCardEmulation.reportListReadersResult": { params: ReportListReadersResultParams, result: ReportListReadersResultResult }, + "SmartCardEmulation.reportGetStatusChangeResult": { params: ReportGetStatusChangeResultParams, result: ReportGetStatusChangeResultResult }, + "SmartCardEmulation.reportBeginTransactionResult": { params: ReportBeginTransactionResultParams, result: ReportBeginTransactionResultResult }, + "SmartCardEmulation.reportPlainResult": { params: ReportPlainResultParams, result: ReportPlainResultResult }, + "SmartCardEmulation.reportConnectResult": { params: ReportConnectResultParams, result: ReportConnectResultResult }, + "SmartCardEmulation.reportDataResult": { params: ReportDataResultParams, result: ReportDataResultResult }, + "SmartCardEmulation.reportStatusResult": { params: ReportStatusResultParams, result: ReportStatusResultResult }, + "SmartCardEmulation.reportError": { params: ReportErrorParams, result: ReportErrorResult }, +} as const; +export const events = { + "SmartCardEmulation.establishContextRequested": EstablishContextRequestedEvent, + "SmartCardEmulation.releaseContextRequested": ReleaseContextRequestedEvent, + "SmartCardEmulation.listReadersRequested": ListReadersRequestedEvent, + "SmartCardEmulation.getStatusChangeRequested": GetStatusChangeRequestedEvent, + "SmartCardEmulation.cancelRequested": CancelRequestedEvent, + "SmartCardEmulation.connectRequested": ConnectRequestedEvent, + "SmartCardEmulation.disconnectRequested": DisconnectRequestedEvent, + "SmartCardEmulation.transmitRequested": TransmitRequestedEvent, + "SmartCardEmulation.controlRequested": ControlRequestedEvent, + "SmartCardEmulation.getAttribRequested": GetAttribRequestedEvent, + "SmartCardEmulation.setAttribRequested": SetAttribRequestedEvent, + "SmartCardEmulation.statusRequested": StatusRequestedEvent, + "SmartCardEmulation.beginTransactionRequested": BeginTransactionRequestedEvent, + "SmartCardEmulation.endTransactionRequested": EndTransactionRequestedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Storage.ts b/types/zod/Storage.ts new file mode 100644 index 0000000..637aafb --- /dev/null +++ b/types/zod/Storage.ts @@ -0,0 +1,261 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Browser from "./Browser.js"; +import * as Network from "./Network.js"; +import * as Page from "./Page.js"; +import * as Target from "./Target.js"; + +export const SerializedStorageKey = withCdpMeta(z.string(), "Storage.SerializedStorageKey", "type"); +export const StorageType = withCdpMeta(z.enum(["cookies", "file_systems", "indexeddb", "local_storage", "shader_cache", "websql", "service_workers", "cache_storage", "interest_groups", "shared_storage", "storage_buckets", "all", "other"]), "Storage.StorageType", "type"); +export const UsageForType = withCdpMeta(z.object({ "storageType": z.lazy(() => StorageType), "usage": z.number() }).passthrough(), "Storage.UsageForType", "type"); +export const TrustTokens = withCdpMeta(z.object({ "issuerOrigin": z.string(), "count": z.number() }).passthrough(), "Storage.TrustTokens", "type"); +export const InterestGroupAuctionId = withCdpMeta(z.string(), "Storage.InterestGroupAuctionId", "type"); +export const InterestGroupAccessType = withCdpMeta(z.enum(["join", "leave", "update", "loaded", "bid", "win", "additionalBid", "additionalBidWin", "topLevelBid", "topLevelAdditionalBid", "clear"]), "Storage.InterestGroupAccessType", "type"); +export const InterestGroupAuctionEventType = withCdpMeta(z.enum(["started", "configResolved"]), "Storage.InterestGroupAuctionEventType", "type"); +export const InterestGroupAuctionFetchType = withCdpMeta(z.enum(["bidderJs", "bidderWasm", "sellerJs", "bidderTrustedSignals", "sellerTrustedSignals"]), "Storage.InterestGroupAuctionFetchType", "type"); +export const SharedStorageAccessScope = withCdpMeta(z.enum(["window", "sharedStorageWorklet", "protectedAudienceWorklet", "header"]), "Storage.SharedStorageAccessScope", "type"); +export const SharedStorageAccessMethod = withCdpMeta(z.enum(["addModule", "createWorklet", "selectURL", "run", "batchUpdate", "set", "append", "delete", "clear", "get", "keys", "values", "entries", "length", "remainingBudget"]), "Storage.SharedStorageAccessMethod", "type"); +export const SharedStorageEntry = withCdpMeta(z.object({ "key": z.string(), "value": z.string() }).passthrough(), "Storage.SharedStorageEntry", "type"); +export const SharedStorageMetadata = withCdpMeta(z.object({ "creationTime": z.lazy(() => Network.TimeSinceEpoch), "length": z.number().int(), "remainingBudget": z.number(), "bytesUsed": z.number().int() }).passthrough(), "Storage.SharedStorageMetadata", "type"); +export const SharedStoragePrivateAggregationConfig = withCdpMeta(z.object({ "aggregationCoordinatorOrigin": z.string().optional(), "contextId": z.string().optional(), "filteringIdMaxBytes": z.number().int(), "maxContributions": z.number().int().optional() }).passthrough(), "Storage.SharedStoragePrivateAggregationConfig", "type"); +export const SharedStorageReportingMetadata = withCdpMeta(z.object({ "eventType": z.string(), "reportingUrl": z.string() }).passthrough(), "Storage.SharedStorageReportingMetadata", "type"); +export const SharedStorageUrlWithMetadata = withCdpMeta(z.object({ "url": z.string(), "reportingMetadata": z.array(z.lazy(() => SharedStorageReportingMetadata)) }).passthrough(), "Storage.SharedStorageUrlWithMetadata", "type"); +export const SharedStorageAccessParams = withCdpMeta(z.object({ "scriptSourceUrl": z.string().optional(), "dataOrigin": z.string().optional(), "operationName": z.string().optional(), "operationId": z.string().optional(), "keepAlive": z.boolean().optional(), "privateAggregationConfig": z.lazy(() => SharedStoragePrivateAggregationConfig).optional(), "serializedData": z.string().optional(), "urlsWithMetadata": z.array(z.lazy(() => SharedStorageUrlWithMetadata)).optional(), "urnUuid": z.string().optional(), "key": z.string().optional(), "value": z.string().optional(), "ignoreIfPresent": z.boolean().optional(), "workletOrdinal": z.number().int().optional(), "workletTargetId": z.lazy(() => Target.TargetID).optional(), "withLock": z.string().optional(), "batchUpdateId": z.string().optional(), "batchSize": z.number().int().optional() }).passthrough(), "Storage.SharedStorageAccessParams", "type"); +export const StorageBucketsDurability = withCdpMeta(z.enum(["relaxed", "strict"]), "Storage.StorageBucketsDurability", "type"); +export const StorageBucket = withCdpMeta(z.object({ "storageKey": z.lazy(() => SerializedStorageKey), "name": z.string().optional() }).passthrough(), "Storage.StorageBucket", "type"); +export const StorageBucketInfo = withCdpMeta(z.object({ "bucket": z.lazy(() => StorageBucket), "id": z.string(), "expiration": z.lazy(() => Network.TimeSinceEpoch), "quota": z.number(), "persistent": z.boolean(), "durability": z.lazy(() => StorageBucketsDurability) }).passthrough(), "Storage.StorageBucketInfo", "type"); +export const RelatedWebsiteSet = withCdpMeta(z.object({ "primarySites": z.array(z.string()), "associatedSites": z.array(z.string()), "serviceSites": z.array(z.string()) }).passthrough(), "Storage.RelatedWebsiteSet", "type"); +export const GetStorageKeyForFrameParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId) }).passthrough(), "Storage.getStorageKeyForFrame.params", "commandParams", { method: "Storage.getStorageKeyForFrame" }); +export const GetStorageKeyForFrameResult = withCdpMeta(z.object({ "storageKey": z.lazy(() => SerializedStorageKey) }).passthrough(), "Storage.getStorageKeyForFrame.result", "commandResult", { method: "Storage.getStorageKeyForFrame" }); +export const GetStorageKeyParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId).optional() }).passthrough(), "Storage.getStorageKey.params", "commandParams", { method: "Storage.getStorageKey" }); +export const GetStorageKeyResult = withCdpMeta(z.object({ "storageKey": z.lazy(() => SerializedStorageKey) }).passthrough(), "Storage.getStorageKey.result", "commandResult", { method: "Storage.getStorageKey" }); +export const ClearDataForOriginParams = withCdpMeta(z.object({ "origin": z.string(), "storageTypes": z.string() }).passthrough(), "Storage.clearDataForOrigin.params", "commandParams", { method: "Storage.clearDataForOrigin" }); +export const ClearDataForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.clearDataForOrigin.result", "commandResult", { method: "Storage.clearDataForOrigin" }); +export const ClearDataForStorageKeyParams = withCdpMeta(z.object({ "storageKey": z.string(), "storageTypes": z.string() }).passthrough(), "Storage.clearDataForStorageKey.params", "commandParams", { method: "Storage.clearDataForStorageKey" }); +export const ClearDataForStorageKeyResult = withCdpMeta(z.object({ }).passthrough(), "Storage.clearDataForStorageKey.result", "commandResult", { method: "Storage.clearDataForStorageKey" }); +export const GetCookiesParams = withCdpMeta(z.object({ "browserContextId": z.lazy(() => Browser.BrowserContextID).optional() }).passthrough(), "Storage.getCookies.params", "commandParams", { method: "Storage.getCookies" }); +export const GetCookiesResult = withCdpMeta(z.object({ "cookies": z.array(z.lazy(() => Network.Cookie)) }).passthrough(), "Storage.getCookies.result", "commandResult", { method: "Storage.getCookies" }); +export const SetCookiesParams = withCdpMeta(z.object({ "cookies": z.array(z.lazy(() => Network.CookieParam)), "browserContextId": z.lazy(() => Browser.BrowserContextID).optional() }).passthrough(), "Storage.setCookies.params", "commandParams", { method: "Storage.setCookies" }); +export const SetCookiesResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setCookies.result", "commandResult", { method: "Storage.setCookies" }); +export const ClearCookiesParams = withCdpMeta(z.object({ "browserContextId": z.lazy(() => Browser.BrowserContextID).optional() }).passthrough(), "Storage.clearCookies.params", "commandParams", { method: "Storage.clearCookies" }); +export const ClearCookiesResult = withCdpMeta(z.object({ }).passthrough(), "Storage.clearCookies.result", "commandResult", { method: "Storage.clearCookies" }); +export const GetUsageAndQuotaParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Storage.getUsageAndQuota.params", "commandParams", { method: "Storage.getUsageAndQuota" }); +export const GetUsageAndQuotaResult = withCdpMeta(z.object({ "usage": z.number(), "quota": z.number(), "overrideActive": z.boolean(), "usageBreakdown": z.array(z.lazy(() => UsageForType)) }).passthrough(), "Storage.getUsageAndQuota.result", "commandResult", { method: "Storage.getUsageAndQuota" }); +export const OverrideQuotaForOriginParams = withCdpMeta(z.object({ "origin": z.string(), "quotaSize": z.number().optional() }).passthrough(), "Storage.overrideQuotaForOrigin.params", "commandParams", { method: "Storage.overrideQuotaForOrigin" }); +export const OverrideQuotaForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.overrideQuotaForOrigin.result", "commandResult", { method: "Storage.overrideQuotaForOrigin" }); +export const TrackCacheStorageForOriginParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Storage.trackCacheStorageForOrigin.params", "commandParams", { method: "Storage.trackCacheStorageForOrigin" }); +export const TrackCacheStorageForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.trackCacheStorageForOrigin.result", "commandResult", { method: "Storage.trackCacheStorageForOrigin" }); +export const TrackCacheStorageForStorageKeyParams = withCdpMeta(z.object({ "storageKey": z.string() }).passthrough(), "Storage.trackCacheStorageForStorageKey.params", "commandParams", { method: "Storage.trackCacheStorageForStorageKey" }); +export const TrackCacheStorageForStorageKeyResult = withCdpMeta(z.object({ }).passthrough(), "Storage.trackCacheStorageForStorageKey.result", "commandResult", { method: "Storage.trackCacheStorageForStorageKey" }); +export const TrackIndexedDBForOriginParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Storage.trackIndexedDBForOrigin.params", "commandParams", { method: "Storage.trackIndexedDBForOrigin" }); +export const TrackIndexedDBForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.trackIndexedDBForOrigin.result", "commandResult", { method: "Storage.trackIndexedDBForOrigin" }); +export const TrackIndexedDBForStorageKeyParams = withCdpMeta(z.object({ "storageKey": z.string() }).passthrough(), "Storage.trackIndexedDBForStorageKey.params", "commandParams", { method: "Storage.trackIndexedDBForStorageKey" }); +export const TrackIndexedDBForStorageKeyResult = withCdpMeta(z.object({ }).passthrough(), "Storage.trackIndexedDBForStorageKey.result", "commandResult", { method: "Storage.trackIndexedDBForStorageKey" }); +export const UntrackCacheStorageForOriginParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Storage.untrackCacheStorageForOrigin.params", "commandParams", { method: "Storage.untrackCacheStorageForOrigin" }); +export const UntrackCacheStorageForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.untrackCacheStorageForOrigin.result", "commandResult", { method: "Storage.untrackCacheStorageForOrigin" }); +export const UntrackCacheStorageForStorageKeyParams = withCdpMeta(z.object({ "storageKey": z.string() }).passthrough(), "Storage.untrackCacheStorageForStorageKey.params", "commandParams", { method: "Storage.untrackCacheStorageForStorageKey" }); +export const UntrackCacheStorageForStorageKeyResult = withCdpMeta(z.object({ }).passthrough(), "Storage.untrackCacheStorageForStorageKey.result", "commandResult", { method: "Storage.untrackCacheStorageForStorageKey" }); +export const UntrackIndexedDBForOriginParams = withCdpMeta(z.object({ "origin": z.string() }).passthrough(), "Storage.untrackIndexedDBForOrigin.params", "commandParams", { method: "Storage.untrackIndexedDBForOrigin" }); +export const UntrackIndexedDBForOriginResult = withCdpMeta(z.object({ }).passthrough(), "Storage.untrackIndexedDBForOrigin.result", "commandResult", { method: "Storage.untrackIndexedDBForOrigin" }); +export const UntrackIndexedDBForStorageKeyParams = withCdpMeta(z.object({ "storageKey": z.string() }).passthrough(), "Storage.untrackIndexedDBForStorageKey.params", "commandParams", { method: "Storage.untrackIndexedDBForStorageKey" }); +export const UntrackIndexedDBForStorageKeyResult = withCdpMeta(z.object({ }).passthrough(), "Storage.untrackIndexedDBForStorageKey.result", "commandResult", { method: "Storage.untrackIndexedDBForStorageKey" }); +export const GetTrustTokensParams = withCdpMeta(z.object({ }).passthrough(), "Storage.getTrustTokens.params", "commandParams", { method: "Storage.getTrustTokens" }); +export const GetTrustTokensResult = withCdpMeta(z.object({ "tokens": z.array(z.lazy(() => TrustTokens)) }).passthrough(), "Storage.getTrustTokens.result", "commandResult", { method: "Storage.getTrustTokens" }); +export const ClearTrustTokensParams = withCdpMeta(z.object({ "issuerOrigin": z.string() }).passthrough(), "Storage.clearTrustTokens.params", "commandParams", { method: "Storage.clearTrustTokens" }); +export const ClearTrustTokensResult = withCdpMeta(z.object({ "didDeleteTokens": z.boolean() }).passthrough(), "Storage.clearTrustTokens.result", "commandResult", { method: "Storage.clearTrustTokens" }); +export const GetInterestGroupDetailsParams = withCdpMeta(z.object({ "ownerOrigin": z.string(), "name": z.string() }).passthrough(), "Storage.getInterestGroupDetails.params", "commandParams", { method: "Storage.getInterestGroupDetails" }); +export const GetInterestGroupDetailsResult = withCdpMeta(z.object({ "details": z.record(z.string(), z.unknown()) }).passthrough(), "Storage.getInterestGroupDetails.result", "commandResult", { method: "Storage.getInterestGroupDetails" }); +export const SetInterestGroupTrackingParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "Storage.setInterestGroupTracking.params", "commandParams", { method: "Storage.setInterestGroupTracking" }); +export const SetInterestGroupTrackingResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setInterestGroupTracking.result", "commandResult", { method: "Storage.setInterestGroupTracking" }); +export const SetInterestGroupAuctionTrackingParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "Storage.setInterestGroupAuctionTracking.params", "commandParams", { method: "Storage.setInterestGroupAuctionTracking" }); +export const SetInterestGroupAuctionTrackingResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setInterestGroupAuctionTracking.result", "commandResult", { method: "Storage.setInterestGroupAuctionTracking" }); +export const GetSharedStorageMetadataParams = withCdpMeta(z.object({ "ownerOrigin": z.string() }).passthrough(), "Storage.getSharedStorageMetadata.params", "commandParams", { method: "Storage.getSharedStorageMetadata" }); +export const GetSharedStorageMetadataResult = withCdpMeta(z.object({ "metadata": z.lazy(() => SharedStorageMetadata) }).passthrough(), "Storage.getSharedStorageMetadata.result", "commandResult", { method: "Storage.getSharedStorageMetadata" }); +export const GetSharedStorageEntriesParams = withCdpMeta(z.object({ "ownerOrigin": z.string() }).passthrough(), "Storage.getSharedStorageEntries.params", "commandParams", { method: "Storage.getSharedStorageEntries" }); +export const GetSharedStorageEntriesResult = withCdpMeta(z.object({ "entries": z.array(z.lazy(() => SharedStorageEntry)) }).passthrough(), "Storage.getSharedStorageEntries.result", "commandResult", { method: "Storage.getSharedStorageEntries" }); +export const SetSharedStorageEntryParams = withCdpMeta(z.object({ "ownerOrigin": z.string(), "key": z.string(), "value": z.string(), "ignoreIfPresent": z.boolean().optional() }).passthrough(), "Storage.setSharedStorageEntry.params", "commandParams", { method: "Storage.setSharedStorageEntry" }); +export const SetSharedStorageEntryResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setSharedStorageEntry.result", "commandResult", { method: "Storage.setSharedStorageEntry" }); +export const DeleteSharedStorageEntryParams = withCdpMeta(z.object({ "ownerOrigin": z.string(), "key": z.string() }).passthrough(), "Storage.deleteSharedStorageEntry.params", "commandParams", { method: "Storage.deleteSharedStorageEntry" }); +export const DeleteSharedStorageEntryResult = withCdpMeta(z.object({ }).passthrough(), "Storage.deleteSharedStorageEntry.result", "commandResult", { method: "Storage.deleteSharedStorageEntry" }); +export const ClearSharedStorageEntriesParams = withCdpMeta(z.object({ "ownerOrigin": z.string() }).passthrough(), "Storage.clearSharedStorageEntries.params", "commandParams", { method: "Storage.clearSharedStorageEntries" }); +export const ClearSharedStorageEntriesResult = withCdpMeta(z.object({ }).passthrough(), "Storage.clearSharedStorageEntries.result", "commandResult", { method: "Storage.clearSharedStorageEntries" }); +export const ResetSharedStorageBudgetParams = withCdpMeta(z.object({ "ownerOrigin": z.string() }).passthrough(), "Storage.resetSharedStorageBudget.params", "commandParams", { method: "Storage.resetSharedStorageBudget" }); +export const ResetSharedStorageBudgetResult = withCdpMeta(z.object({ }).passthrough(), "Storage.resetSharedStorageBudget.result", "commandResult", { method: "Storage.resetSharedStorageBudget" }); +export const SetSharedStorageTrackingParams = withCdpMeta(z.object({ "enable": z.boolean() }).passthrough(), "Storage.setSharedStorageTracking.params", "commandParams", { method: "Storage.setSharedStorageTracking" }); +export const SetSharedStorageTrackingResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setSharedStorageTracking.result", "commandResult", { method: "Storage.setSharedStorageTracking" }); +export const SetStorageBucketTrackingParams = withCdpMeta(z.object({ "storageKey": z.string(), "enable": z.boolean() }).passthrough(), "Storage.setStorageBucketTracking.params", "commandParams", { method: "Storage.setStorageBucketTracking" }); +export const SetStorageBucketTrackingResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setStorageBucketTracking.result", "commandResult", { method: "Storage.setStorageBucketTracking" }); +export const DeleteStorageBucketParams = withCdpMeta(z.object({ "bucket": z.lazy(() => StorageBucket) }).passthrough(), "Storage.deleteStorageBucket.params", "commandParams", { method: "Storage.deleteStorageBucket" }); +export const DeleteStorageBucketResult = withCdpMeta(z.object({ }).passthrough(), "Storage.deleteStorageBucket.result", "commandResult", { method: "Storage.deleteStorageBucket" }); +export const RunBounceTrackingMitigationsParams = withCdpMeta(z.object({ }).passthrough(), "Storage.runBounceTrackingMitigations.params", "commandParams", { method: "Storage.runBounceTrackingMitigations" }); +export const RunBounceTrackingMitigationsResult = withCdpMeta(z.object({ "deletedSites": z.array(z.string()) }).passthrough(), "Storage.runBounceTrackingMitigations.result", "commandResult", { method: "Storage.runBounceTrackingMitigations" }); +export const GetRelatedWebsiteSetsParams = withCdpMeta(z.object({ }).passthrough(), "Storage.getRelatedWebsiteSets.params", "commandParams", { method: "Storage.getRelatedWebsiteSets" }); +export const GetRelatedWebsiteSetsResult = withCdpMeta(z.object({ "sets": z.array(z.lazy(() => RelatedWebsiteSet)) }).passthrough(), "Storage.getRelatedWebsiteSets.result", "commandResult", { method: "Storage.getRelatedWebsiteSets" }); +export const SetProtectedAudienceKAnonymityParams = withCdpMeta(z.object({ "owner": z.string(), "name": z.string(), "hashes": z.array(z.string()) }).passthrough(), "Storage.setProtectedAudienceKAnonymity.params", "commandParams", { method: "Storage.setProtectedAudienceKAnonymity" }); +export const SetProtectedAudienceKAnonymityResult = withCdpMeta(z.object({ }).passthrough(), "Storage.setProtectedAudienceKAnonymity.result", "commandResult", { method: "Storage.setProtectedAudienceKAnonymity" }); +export const CacheStorageContentUpdatedEvent = withCdpMeta(z.object({ "origin": z.string(), "storageKey": z.string(), "bucketId": z.string(), "cacheName": z.string() }).passthrough(), "Storage.cacheStorageContentUpdated", "event", { phase: "event" }); +export const CacheStorageListUpdatedEvent = withCdpMeta(z.object({ "origin": z.string(), "storageKey": z.string(), "bucketId": z.string() }).passthrough(), "Storage.cacheStorageListUpdated", "event", { phase: "event" }); +export const IndexedDBContentUpdatedEvent = withCdpMeta(z.object({ "origin": z.string(), "storageKey": z.string(), "bucketId": z.string(), "databaseName": z.string(), "objectStoreName": z.string() }).passthrough(), "Storage.indexedDBContentUpdated", "event", { phase: "event" }); +export const IndexedDBListUpdatedEvent = withCdpMeta(z.object({ "origin": z.string(), "storageKey": z.string(), "bucketId": z.string() }).passthrough(), "Storage.indexedDBListUpdated", "event", { phase: "event" }); +export const InterestGroupAccessedEvent = withCdpMeta(z.object({ "accessTime": z.lazy(() => Network.TimeSinceEpoch), "type": z.lazy(() => InterestGroupAccessType), "ownerOrigin": z.string(), "name": z.string(), "componentSellerOrigin": z.string().optional(), "bid": z.number().optional(), "bidCurrency": z.string().optional(), "uniqueAuctionId": z.lazy(() => InterestGroupAuctionId).optional() }).passthrough(), "Storage.interestGroupAccessed", "event", { phase: "event" }); +export const InterestGroupAuctionEventOccurredEvent = withCdpMeta(z.object({ "eventTime": z.lazy(() => Network.TimeSinceEpoch), "type": z.lazy(() => InterestGroupAuctionEventType), "uniqueAuctionId": z.lazy(() => InterestGroupAuctionId), "parentAuctionId": z.lazy(() => InterestGroupAuctionId).optional(), "auctionConfig": z.record(z.string(), z.unknown()).optional() }).passthrough(), "Storage.interestGroupAuctionEventOccurred", "event", { phase: "event" }); +export const InterestGroupAuctionNetworkRequestCreatedEvent = withCdpMeta(z.object({ "type": z.lazy(() => InterestGroupAuctionFetchType), "requestId": z.lazy(() => Network.RequestId), "auctions": z.array(z.lazy(() => InterestGroupAuctionId)) }).passthrough(), "Storage.interestGroupAuctionNetworkRequestCreated", "event", { phase: "event" }); +export const SharedStorageAccessedEvent = withCdpMeta(z.object({ "accessTime": z.lazy(() => Network.TimeSinceEpoch), "scope": z.lazy(() => SharedStorageAccessScope), "method": z.lazy(() => SharedStorageAccessMethod), "mainFrameId": z.lazy(() => Page.FrameId), "ownerOrigin": z.string(), "ownerSite": z.string(), "params": z.lazy(() => SharedStorageAccessParams) }).passthrough(), "Storage.sharedStorageAccessed", "event", { phase: "event" }); +export const SharedStorageWorkletOperationExecutionFinishedEvent = withCdpMeta(z.object({ "finishedTime": z.lazy(() => Network.TimeSinceEpoch), "executionTime": z.number().int(), "method": z.lazy(() => SharedStorageAccessMethod), "operationId": z.string(), "workletTargetId": z.lazy(() => Target.TargetID), "mainFrameId": z.lazy(() => Page.FrameId), "ownerOrigin": z.string() }).passthrough(), "Storage.sharedStorageWorkletOperationExecutionFinished", "event", { phase: "event" }); +export const StorageBucketCreatedOrUpdatedEvent = withCdpMeta(z.object({ "bucketInfo": z.lazy(() => StorageBucketInfo) }).passthrough(), "Storage.storageBucketCreatedOrUpdated", "event", { phase: "event" }); +export const StorageBucketDeletedEvent = withCdpMeta(z.object({ "bucketId": z.string() }).passthrough(), "Storage.storageBucketDeleted", "event", { phase: "event" }); + +export const zod = { + SerializedStorageKey: SerializedStorageKey, + StorageType: StorageType, + UsageForType: UsageForType, + TrustTokens: TrustTokens, + InterestGroupAuctionId: InterestGroupAuctionId, + InterestGroupAccessType: InterestGroupAccessType, + InterestGroupAuctionEventType: InterestGroupAuctionEventType, + InterestGroupAuctionFetchType: InterestGroupAuctionFetchType, + SharedStorageAccessScope: SharedStorageAccessScope, + SharedStorageAccessMethod: SharedStorageAccessMethod, + SharedStorageEntry: SharedStorageEntry, + SharedStorageMetadata: SharedStorageMetadata, + SharedStoragePrivateAggregationConfig: SharedStoragePrivateAggregationConfig, + SharedStorageReportingMetadata: SharedStorageReportingMetadata, + SharedStorageUrlWithMetadata: SharedStorageUrlWithMetadata, + SharedStorageAccessParams: SharedStorageAccessParams, + StorageBucketsDurability: StorageBucketsDurability, + StorageBucket: StorageBucket, + StorageBucketInfo: StorageBucketInfo, + RelatedWebsiteSet: RelatedWebsiteSet, + GetStorageKeyForFrameParams: GetStorageKeyForFrameParams, + GetStorageKeyForFrameResult: GetStorageKeyForFrameResult, + GetStorageKeyParams: GetStorageKeyParams, + GetStorageKeyResult: GetStorageKeyResult, + ClearDataForOriginParams: ClearDataForOriginParams, + ClearDataForOriginResult: ClearDataForOriginResult, + ClearDataForStorageKeyParams: ClearDataForStorageKeyParams, + ClearDataForStorageKeyResult: ClearDataForStorageKeyResult, + GetCookiesParams: GetCookiesParams, + GetCookiesResult: GetCookiesResult, + SetCookiesParams: SetCookiesParams, + SetCookiesResult: SetCookiesResult, + ClearCookiesParams: ClearCookiesParams, + ClearCookiesResult: ClearCookiesResult, + GetUsageAndQuotaParams: GetUsageAndQuotaParams, + GetUsageAndQuotaResult: GetUsageAndQuotaResult, + OverrideQuotaForOriginParams: OverrideQuotaForOriginParams, + OverrideQuotaForOriginResult: OverrideQuotaForOriginResult, + TrackCacheStorageForOriginParams: TrackCacheStorageForOriginParams, + TrackCacheStorageForOriginResult: TrackCacheStorageForOriginResult, + TrackCacheStorageForStorageKeyParams: TrackCacheStorageForStorageKeyParams, + TrackCacheStorageForStorageKeyResult: TrackCacheStorageForStorageKeyResult, + TrackIndexedDBForOriginParams: TrackIndexedDBForOriginParams, + TrackIndexedDBForOriginResult: TrackIndexedDBForOriginResult, + TrackIndexedDBForStorageKeyParams: TrackIndexedDBForStorageKeyParams, + TrackIndexedDBForStorageKeyResult: TrackIndexedDBForStorageKeyResult, + UntrackCacheStorageForOriginParams: UntrackCacheStorageForOriginParams, + UntrackCacheStorageForOriginResult: UntrackCacheStorageForOriginResult, + UntrackCacheStorageForStorageKeyParams: UntrackCacheStorageForStorageKeyParams, + UntrackCacheStorageForStorageKeyResult: UntrackCacheStorageForStorageKeyResult, + UntrackIndexedDBForOriginParams: UntrackIndexedDBForOriginParams, + UntrackIndexedDBForOriginResult: UntrackIndexedDBForOriginResult, + UntrackIndexedDBForStorageKeyParams: UntrackIndexedDBForStorageKeyParams, + UntrackIndexedDBForStorageKeyResult: UntrackIndexedDBForStorageKeyResult, + GetTrustTokensParams: GetTrustTokensParams, + GetTrustTokensResult: GetTrustTokensResult, + ClearTrustTokensParams: ClearTrustTokensParams, + ClearTrustTokensResult: ClearTrustTokensResult, + GetInterestGroupDetailsParams: GetInterestGroupDetailsParams, + GetInterestGroupDetailsResult: GetInterestGroupDetailsResult, + SetInterestGroupTrackingParams: SetInterestGroupTrackingParams, + SetInterestGroupTrackingResult: SetInterestGroupTrackingResult, + SetInterestGroupAuctionTrackingParams: SetInterestGroupAuctionTrackingParams, + SetInterestGroupAuctionTrackingResult: SetInterestGroupAuctionTrackingResult, + GetSharedStorageMetadataParams: GetSharedStorageMetadataParams, + GetSharedStorageMetadataResult: GetSharedStorageMetadataResult, + GetSharedStorageEntriesParams: GetSharedStorageEntriesParams, + GetSharedStorageEntriesResult: GetSharedStorageEntriesResult, + SetSharedStorageEntryParams: SetSharedStorageEntryParams, + SetSharedStorageEntryResult: SetSharedStorageEntryResult, + DeleteSharedStorageEntryParams: DeleteSharedStorageEntryParams, + DeleteSharedStorageEntryResult: DeleteSharedStorageEntryResult, + ClearSharedStorageEntriesParams: ClearSharedStorageEntriesParams, + ClearSharedStorageEntriesResult: ClearSharedStorageEntriesResult, + ResetSharedStorageBudgetParams: ResetSharedStorageBudgetParams, + ResetSharedStorageBudgetResult: ResetSharedStorageBudgetResult, + SetSharedStorageTrackingParams: SetSharedStorageTrackingParams, + SetSharedStorageTrackingResult: SetSharedStorageTrackingResult, + SetStorageBucketTrackingParams: SetStorageBucketTrackingParams, + SetStorageBucketTrackingResult: SetStorageBucketTrackingResult, + DeleteStorageBucketParams: DeleteStorageBucketParams, + DeleteStorageBucketResult: DeleteStorageBucketResult, + RunBounceTrackingMitigationsParams: RunBounceTrackingMitigationsParams, + RunBounceTrackingMitigationsResult: RunBounceTrackingMitigationsResult, + GetRelatedWebsiteSetsParams: GetRelatedWebsiteSetsParams, + GetRelatedWebsiteSetsResult: GetRelatedWebsiteSetsResult, + SetProtectedAudienceKAnonymityParams: SetProtectedAudienceKAnonymityParams, + SetProtectedAudienceKAnonymityResult: SetProtectedAudienceKAnonymityResult, + CacheStorageContentUpdatedEvent: CacheStorageContentUpdatedEvent, + CacheStorageListUpdatedEvent: CacheStorageListUpdatedEvent, + IndexedDBContentUpdatedEvent: IndexedDBContentUpdatedEvent, + IndexedDBListUpdatedEvent: IndexedDBListUpdatedEvent, + InterestGroupAccessedEvent: InterestGroupAccessedEvent, + InterestGroupAuctionEventOccurredEvent: InterestGroupAuctionEventOccurredEvent, + InterestGroupAuctionNetworkRequestCreatedEvent: InterestGroupAuctionNetworkRequestCreatedEvent, + SharedStorageAccessedEvent: SharedStorageAccessedEvent, + SharedStorageWorkletOperationExecutionFinishedEvent: SharedStorageWorkletOperationExecutionFinishedEvent, + StorageBucketCreatedOrUpdatedEvent: StorageBucketCreatedOrUpdatedEvent, + StorageBucketDeletedEvent: StorageBucketDeletedEvent, +} as const; +export const commands = { + "Storage.getStorageKeyForFrame": { params: GetStorageKeyForFrameParams, result: GetStorageKeyForFrameResult }, + "Storage.getStorageKey": { params: GetStorageKeyParams, result: GetStorageKeyResult }, + "Storage.clearDataForOrigin": { params: ClearDataForOriginParams, result: ClearDataForOriginResult }, + "Storage.clearDataForStorageKey": { params: ClearDataForStorageKeyParams, result: ClearDataForStorageKeyResult }, + "Storage.getCookies": { params: GetCookiesParams, result: GetCookiesResult }, + "Storage.setCookies": { params: SetCookiesParams, result: SetCookiesResult }, + "Storage.clearCookies": { params: ClearCookiesParams, result: ClearCookiesResult }, + "Storage.getUsageAndQuota": { params: GetUsageAndQuotaParams, result: GetUsageAndQuotaResult }, + "Storage.overrideQuotaForOrigin": { params: OverrideQuotaForOriginParams, result: OverrideQuotaForOriginResult }, + "Storage.trackCacheStorageForOrigin": { params: TrackCacheStorageForOriginParams, result: TrackCacheStorageForOriginResult }, + "Storage.trackCacheStorageForStorageKey": { params: TrackCacheStorageForStorageKeyParams, result: TrackCacheStorageForStorageKeyResult }, + "Storage.trackIndexedDBForOrigin": { params: TrackIndexedDBForOriginParams, result: TrackIndexedDBForOriginResult }, + "Storage.trackIndexedDBForStorageKey": { params: TrackIndexedDBForStorageKeyParams, result: TrackIndexedDBForStorageKeyResult }, + "Storage.untrackCacheStorageForOrigin": { params: UntrackCacheStorageForOriginParams, result: UntrackCacheStorageForOriginResult }, + "Storage.untrackCacheStorageForStorageKey": { params: UntrackCacheStorageForStorageKeyParams, result: UntrackCacheStorageForStorageKeyResult }, + "Storage.untrackIndexedDBForOrigin": { params: UntrackIndexedDBForOriginParams, result: UntrackIndexedDBForOriginResult }, + "Storage.untrackIndexedDBForStorageKey": { params: UntrackIndexedDBForStorageKeyParams, result: UntrackIndexedDBForStorageKeyResult }, + "Storage.getTrustTokens": { params: GetTrustTokensParams, result: GetTrustTokensResult }, + "Storage.clearTrustTokens": { params: ClearTrustTokensParams, result: ClearTrustTokensResult }, + "Storage.getInterestGroupDetails": { params: GetInterestGroupDetailsParams, result: GetInterestGroupDetailsResult }, + "Storage.setInterestGroupTracking": { params: SetInterestGroupTrackingParams, result: SetInterestGroupTrackingResult }, + "Storage.setInterestGroupAuctionTracking": { params: SetInterestGroupAuctionTrackingParams, result: SetInterestGroupAuctionTrackingResult }, + "Storage.getSharedStorageMetadata": { params: GetSharedStorageMetadataParams, result: GetSharedStorageMetadataResult }, + "Storage.getSharedStorageEntries": { params: GetSharedStorageEntriesParams, result: GetSharedStorageEntriesResult }, + "Storage.setSharedStorageEntry": { params: SetSharedStorageEntryParams, result: SetSharedStorageEntryResult }, + "Storage.deleteSharedStorageEntry": { params: DeleteSharedStorageEntryParams, result: DeleteSharedStorageEntryResult }, + "Storage.clearSharedStorageEntries": { params: ClearSharedStorageEntriesParams, result: ClearSharedStorageEntriesResult }, + "Storage.resetSharedStorageBudget": { params: ResetSharedStorageBudgetParams, result: ResetSharedStorageBudgetResult }, + "Storage.setSharedStorageTracking": { params: SetSharedStorageTrackingParams, result: SetSharedStorageTrackingResult }, + "Storage.setStorageBucketTracking": { params: SetStorageBucketTrackingParams, result: SetStorageBucketTrackingResult }, + "Storage.deleteStorageBucket": { params: DeleteStorageBucketParams, result: DeleteStorageBucketResult }, + "Storage.runBounceTrackingMitigations": { params: RunBounceTrackingMitigationsParams, result: RunBounceTrackingMitigationsResult }, + "Storage.getRelatedWebsiteSets": { params: GetRelatedWebsiteSetsParams, result: GetRelatedWebsiteSetsResult }, + "Storage.setProtectedAudienceKAnonymity": { params: SetProtectedAudienceKAnonymityParams, result: SetProtectedAudienceKAnonymityResult }, +} as const; +export const events = { + "Storage.cacheStorageContentUpdated": CacheStorageContentUpdatedEvent, + "Storage.cacheStorageListUpdated": CacheStorageListUpdatedEvent, + "Storage.indexedDBContentUpdated": IndexedDBContentUpdatedEvent, + "Storage.indexedDBListUpdated": IndexedDBListUpdatedEvent, + "Storage.interestGroupAccessed": InterestGroupAccessedEvent, + "Storage.interestGroupAuctionEventOccurred": InterestGroupAuctionEventOccurredEvent, + "Storage.interestGroupAuctionNetworkRequestCreated": InterestGroupAuctionNetworkRequestCreatedEvent, + "Storage.sharedStorageAccessed": SharedStorageAccessedEvent, + "Storage.sharedStorageWorkletOperationExecutionFinished": SharedStorageWorkletOperationExecutionFinishedEvent, + "Storage.storageBucketCreatedOrUpdated": StorageBucketCreatedOrUpdatedEvent, + "Storage.storageBucketDeleted": StorageBucketDeletedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/SystemInfo.ts b/types/zod/SystemInfo.ts new file mode 100644 index 0000000..d66b96a --- /dev/null +++ b/types/zod/SystemInfo.ts @@ -0,0 +1,45 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const GPUDevice = withCdpMeta(z.object({ "vendorId": z.number(), "deviceId": z.number(), "subSysId": z.number().optional(), "revision": z.number().optional(), "vendorString": z.string(), "deviceString": z.string(), "driverVendor": z.string(), "driverVersion": z.string() }).passthrough(), "SystemInfo.GPUDevice", "type"); +export const Size = withCdpMeta(z.object({ "width": z.number().int(), "height": z.number().int() }).passthrough(), "SystemInfo.Size", "type"); +export const VideoDecodeAcceleratorCapability = withCdpMeta(z.object({ "profile": z.string(), "maxResolution": z.lazy(() => Size), "minResolution": z.lazy(() => Size) }).passthrough(), "SystemInfo.VideoDecodeAcceleratorCapability", "type"); +export const VideoEncodeAcceleratorCapability = withCdpMeta(z.object({ "profile": z.string(), "maxResolution": z.lazy(() => Size), "maxFramerateNumerator": z.number().int(), "maxFramerateDenominator": z.number().int() }).passthrough(), "SystemInfo.VideoEncodeAcceleratorCapability", "type"); +export const SubsamplingFormat = withCdpMeta(z.enum(["yuv420", "yuv422", "yuv444"]), "SystemInfo.SubsamplingFormat", "type"); +export const ImageType = withCdpMeta(z.enum(["jpeg", "webp", "unknown"]), "SystemInfo.ImageType", "type"); +export const GPUInfo = withCdpMeta(z.object({ "devices": z.array(z.lazy(() => GPUDevice)), "auxAttributes": z.record(z.string(), z.unknown()).optional(), "featureStatus": z.record(z.string(), z.unknown()).optional(), "driverBugWorkarounds": z.array(z.string()), "videoDecoding": z.array(z.lazy(() => VideoDecodeAcceleratorCapability)), "videoEncoding": z.array(z.lazy(() => VideoEncodeAcceleratorCapability)) }).passthrough(), "SystemInfo.GPUInfo", "type"); +export const ProcessInfo = withCdpMeta(z.object({ "type": z.string(), "id": z.number().int(), "cpuTime": z.number() }).passthrough(), "SystemInfo.ProcessInfo", "type"); +export const GetInfoParams = withCdpMeta(z.object({ }).passthrough(), "SystemInfo.getInfo.params", "commandParams", { method: "SystemInfo.getInfo" }); +export const GetInfoResult = withCdpMeta(z.object({ "gpu": z.lazy(() => GPUInfo), "modelName": z.string(), "modelVersion": z.string(), "commandLine": z.string() }).passthrough(), "SystemInfo.getInfo.result", "commandResult", { method: "SystemInfo.getInfo" }); +export const GetFeatureStateParams = withCdpMeta(z.object({ "featureState": z.string() }).passthrough(), "SystemInfo.getFeatureState.params", "commandParams", { method: "SystemInfo.getFeatureState" }); +export const GetFeatureStateResult = withCdpMeta(z.object({ "featureEnabled": z.boolean() }).passthrough(), "SystemInfo.getFeatureState.result", "commandResult", { method: "SystemInfo.getFeatureState" }); +export const GetProcessInfoParams = withCdpMeta(z.object({ }).passthrough(), "SystemInfo.getProcessInfo.params", "commandParams", { method: "SystemInfo.getProcessInfo" }); +export const GetProcessInfoResult = withCdpMeta(z.object({ "processInfo": z.array(z.lazy(() => ProcessInfo)) }).passthrough(), "SystemInfo.getProcessInfo.result", "commandResult", { method: "SystemInfo.getProcessInfo" }); + +export const zod = { + GPUDevice: GPUDevice, + Size: Size, + VideoDecodeAcceleratorCapability: VideoDecodeAcceleratorCapability, + VideoEncodeAcceleratorCapability: VideoEncodeAcceleratorCapability, + SubsamplingFormat: SubsamplingFormat, + ImageType: ImageType, + GPUInfo: GPUInfo, + ProcessInfo: ProcessInfo, + GetInfoParams: GetInfoParams, + GetInfoResult: GetInfoResult, + GetFeatureStateParams: GetFeatureStateParams, + GetFeatureStateResult: GetFeatureStateResult, + GetProcessInfoParams: GetProcessInfoParams, + GetProcessInfoResult: GetProcessInfoResult, +} as const; +export const commands = { + "SystemInfo.getInfo": { params: GetInfoParams, result: GetInfoResult }, + "SystemInfo.getFeatureState": { params: GetFeatureStateParams, result: GetFeatureStateResult }, + "SystemInfo.getProcessInfo": { params: GetProcessInfoParams, result: GetProcessInfoResult }, +} as const; +export const events = { +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Target.ts b/types/zod/Target.ts new file mode 100644 index 0000000..baeb0c2 --- /dev/null +++ b/types/zod/Target.ts @@ -0,0 +1,146 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as Browser from "./Browser.js"; +import * as Page from "./Page.js"; + +export const TargetID = withCdpMeta(z.string(), "Target.TargetID", "type"); +export const SessionID = withCdpMeta(z.string(), "Target.SessionID", "type"); +export const TargetInfo = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID), "type": z.string(), "title": z.string(), "url": z.string(), "attached": z.boolean(), "parentId": z.lazy(() => TargetID).optional(), "openerId": z.lazy(() => TargetID).optional(), "canAccessOpener": z.boolean(), "openerFrameId": z.lazy(() => Page.FrameId).optional(), "parentFrameId": z.lazy(() => Page.FrameId).optional(), "browserContextId": z.lazy(() => Browser.BrowserContextID).optional(), "subtype": z.string().optional() }).passthrough(), "Target.TargetInfo", "type"); +export const FilterEntry = withCdpMeta(z.object({ "exclude": z.boolean().optional(), "type": z.string().optional() }).passthrough(), "Target.FilterEntry", "type"); +export const TargetFilter = withCdpMeta(z.array(z.lazy(() => FilterEntry)), "Target.TargetFilter", "type"); +export const RemoteLocation = withCdpMeta(z.object({ "host": z.string(), "port": z.number().int() }).passthrough(), "Target.RemoteLocation", "type"); +export const WindowState = withCdpMeta(z.enum(["normal", "minimized", "maximized", "fullscreen"]), "Target.WindowState", "type"); +export const ActivateTargetParams = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID) }).passthrough(), "Target.activateTarget.params", "commandParams", { method: "Target.activateTarget" }); +export const ActivateTargetResult = withCdpMeta(z.object({ }).passthrough(), "Target.activateTarget.result", "commandResult", { method: "Target.activateTarget" }); +export const AttachToTargetParams = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID), "flatten": z.boolean().optional() }).passthrough(), "Target.attachToTarget.params", "commandParams", { method: "Target.attachToTarget" }); +export const AttachToTargetResult = withCdpMeta(z.object({ "sessionId": z.lazy(() => SessionID) }).passthrough(), "Target.attachToTarget.result", "commandResult", { method: "Target.attachToTarget" }); +export const AttachToBrowserTargetParams = withCdpMeta(z.object({ }).passthrough(), "Target.attachToBrowserTarget.params", "commandParams", { method: "Target.attachToBrowserTarget" }); +export const AttachToBrowserTargetResult = withCdpMeta(z.object({ "sessionId": z.lazy(() => SessionID) }).passthrough(), "Target.attachToBrowserTarget.result", "commandResult", { method: "Target.attachToBrowserTarget" }); +export const CloseTargetParams = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID) }).passthrough(), "Target.closeTarget.params", "commandParams", { method: "Target.closeTarget" }); +export const CloseTargetResult = withCdpMeta(z.object({ "success": z.boolean() }).passthrough(), "Target.closeTarget.result", "commandResult", { method: "Target.closeTarget" }); +export const ExposeDevToolsProtocolParams = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID), "bindingName": z.string().optional(), "inheritPermissions": z.boolean().optional() }).passthrough(), "Target.exposeDevToolsProtocol.params", "commandParams", { method: "Target.exposeDevToolsProtocol" }); +export const ExposeDevToolsProtocolResult = withCdpMeta(z.object({ }).passthrough(), "Target.exposeDevToolsProtocol.result", "commandResult", { method: "Target.exposeDevToolsProtocol" }); +export const CreateBrowserContextParams = withCdpMeta(z.object({ "disposeOnDetach": z.boolean().optional(), "proxyServer": z.string().optional(), "proxyBypassList": z.string().optional(), "originsWithUniversalNetworkAccess": z.array(z.string()).optional() }).passthrough(), "Target.createBrowserContext.params", "commandParams", { method: "Target.createBrowserContext" }); +export const CreateBrowserContextResult = withCdpMeta(z.object({ "browserContextId": z.lazy(() => Browser.BrowserContextID) }).passthrough(), "Target.createBrowserContext.result", "commandResult", { method: "Target.createBrowserContext" }); +export const GetBrowserContextsParams = withCdpMeta(z.object({ }).passthrough(), "Target.getBrowserContexts.params", "commandParams", { method: "Target.getBrowserContexts" }); +export const GetBrowserContextsResult = withCdpMeta(z.object({ "browserContextIds": z.array(z.lazy(() => Browser.BrowserContextID)), "defaultBrowserContextId": z.lazy(() => Browser.BrowserContextID).optional() }).passthrough(), "Target.getBrowserContexts.result", "commandResult", { method: "Target.getBrowserContexts" }); +export const CreateTargetParams = withCdpMeta(z.object({ "url": z.string(), "left": z.number().int().optional(), "top": z.number().int().optional(), "width": z.number().int().optional(), "height": z.number().int().optional(), "windowState": z.lazy(() => WindowState).optional(), "browserContextId": z.lazy(() => Browser.BrowserContextID).optional(), "enableBeginFrameControl": z.boolean().optional(), "newWindow": z.boolean().optional(), "background": z.boolean().optional(), "forTab": z.boolean().optional(), "hidden": z.boolean().optional(), "focus": z.boolean().optional() }).passthrough(), "Target.createTarget.params", "commandParams", { method: "Target.createTarget" }); +export const CreateTargetResult = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID) }).passthrough(), "Target.createTarget.result", "commandResult", { method: "Target.createTarget" }); +export const DetachFromTargetParams = withCdpMeta(z.object({ "sessionId": z.lazy(() => SessionID).optional(), "targetId": z.lazy(() => TargetID).optional() }).passthrough(), "Target.detachFromTarget.params", "commandParams", { method: "Target.detachFromTarget" }); +export const DetachFromTargetResult = withCdpMeta(z.object({ }).passthrough(), "Target.detachFromTarget.result", "commandResult", { method: "Target.detachFromTarget" }); +export const DisposeBrowserContextParams = withCdpMeta(z.object({ "browserContextId": z.lazy(() => Browser.BrowserContextID) }).passthrough(), "Target.disposeBrowserContext.params", "commandParams", { method: "Target.disposeBrowserContext" }); +export const DisposeBrowserContextResult = withCdpMeta(z.object({ }).passthrough(), "Target.disposeBrowserContext.result", "commandResult", { method: "Target.disposeBrowserContext" }); +export const GetTargetInfoParams = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID).optional() }).passthrough(), "Target.getTargetInfo.params", "commandParams", { method: "Target.getTargetInfo" }); +export const GetTargetInfoResult = withCdpMeta(z.object({ "targetInfo": z.lazy(() => TargetInfo) }).passthrough(), "Target.getTargetInfo.result", "commandResult", { method: "Target.getTargetInfo" }); +export const GetTargetsParams = withCdpMeta(z.object({ "filter": z.lazy(() => TargetFilter).optional() }).passthrough(), "Target.getTargets.params", "commandParams", { method: "Target.getTargets" }); +export const GetTargetsResult = withCdpMeta(z.object({ "targetInfos": z.array(z.lazy(() => TargetInfo)) }).passthrough(), "Target.getTargets.result", "commandResult", { method: "Target.getTargets" }); +export const SendMessageToTargetParams = withCdpMeta(z.object({ "message": z.string(), "sessionId": z.lazy(() => SessionID).optional(), "targetId": z.lazy(() => TargetID).optional() }).passthrough(), "Target.sendMessageToTarget.params", "commandParams", { method: "Target.sendMessageToTarget" }); +export const SendMessageToTargetResult = withCdpMeta(z.object({ }).passthrough(), "Target.sendMessageToTarget.result", "commandResult", { method: "Target.sendMessageToTarget" }); +export const SetAutoAttachParams = withCdpMeta(z.object({ "autoAttach": z.boolean(), "waitForDebuggerOnStart": z.boolean(), "flatten": z.boolean().optional(), "filter": z.lazy(() => TargetFilter).optional() }).passthrough(), "Target.setAutoAttach.params", "commandParams", { method: "Target.setAutoAttach" }); +export const SetAutoAttachResult = withCdpMeta(z.object({ }).passthrough(), "Target.setAutoAttach.result", "commandResult", { method: "Target.setAutoAttach" }); +export const AutoAttachRelatedParams = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID), "waitForDebuggerOnStart": z.boolean(), "filter": z.lazy(() => TargetFilter).optional() }).passthrough(), "Target.autoAttachRelated.params", "commandParams", { method: "Target.autoAttachRelated" }); +export const AutoAttachRelatedResult = withCdpMeta(z.object({ }).passthrough(), "Target.autoAttachRelated.result", "commandResult", { method: "Target.autoAttachRelated" }); +export const SetDiscoverTargetsParams = withCdpMeta(z.object({ "discover": z.boolean(), "filter": z.lazy(() => TargetFilter).optional() }).passthrough(), "Target.setDiscoverTargets.params", "commandParams", { method: "Target.setDiscoverTargets" }); +export const SetDiscoverTargetsResult = withCdpMeta(z.object({ }).passthrough(), "Target.setDiscoverTargets.result", "commandResult", { method: "Target.setDiscoverTargets" }); +export const SetRemoteLocationsParams = withCdpMeta(z.object({ "locations": z.array(z.lazy(() => RemoteLocation)) }).passthrough(), "Target.setRemoteLocations.params", "commandParams", { method: "Target.setRemoteLocations" }); +export const SetRemoteLocationsResult = withCdpMeta(z.object({ }).passthrough(), "Target.setRemoteLocations.result", "commandResult", { method: "Target.setRemoteLocations" }); +export const GetDevToolsTargetParams = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID) }).passthrough(), "Target.getDevToolsTarget.params", "commandParams", { method: "Target.getDevToolsTarget" }); +export const GetDevToolsTargetResult = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID).optional() }).passthrough(), "Target.getDevToolsTarget.result", "commandResult", { method: "Target.getDevToolsTarget" }); +export const OpenDevToolsParams = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID), "panelId": z.string().optional() }).passthrough(), "Target.openDevTools.params", "commandParams", { method: "Target.openDevTools" }); +export const OpenDevToolsResult = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID) }).passthrough(), "Target.openDevTools.result", "commandResult", { method: "Target.openDevTools" }); +export const AttachedToTargetEvent = withCdpMeta(z.object({ "sessionId": z.lazy(() => SessionID), "targetInfo": z.lazy(() => TargetInfo), "waitingForDebugger": z.boolean() }).passthrough(), "Target.attachedToTarget", "event", { phase: "event" }); +export const DetachedFromTargetEvent = withCdpMeta(z.object({ "sessionId": z.lazy(() => SessionID), "targetId": z.lazy(() => TargetID).optional() }).passthrough(), "Target.detachedFromTarget", "event", { phase: "event" }); +export const ReceivedMessageFromTargetEvent = withCdpMeta(z.object({ "sessionId": z.lazy(() => SessionID), "message": z.string(), "targetId": z.lazy(() => TargetID).optional() }).passthrough(), "Target.receivedMessageFromTarget", "event", { phase: "event" }); +export const TargetCreatedEvent = withCdpMeta(z.object({ "targetInfo": z.lazy(() => TargetInfo) }).passthrough(), "Target.targetCreated", "event", { phase: "event" }); +export const TargetDestroyedEvent = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID) }).passthrough(), "Target.targetDestroyed", "event", { phase: "event" }); +export const TargetCrashedEvent = withCdpMeta(z.object({ "targetId": z.lazy(() => TargetID), "status": z.string(), "errorCode": z.number().int() }).passthrough(), "Target.targetCrashed", "event", { phase: "event" }); +export const TargetInfoChangedEvent = withCdpMeta(z.object({ "targetInfo": z.lazy(() => TargetInfo) }).passthrough(), "Target.targetInfoChanged", "event", { phase: "event" }); + +export const zod = { + TargetID: TargetID, + SessionID: SessionID, + TargetInfo: TargetInfo, + FilterEntry: FilterEntry, + TargetFilter: TargetFilter, + RemoteLocation: RemoteLocation, + WindowState: WindowState, + ActivateTargetParams: ActivateTargetParams, + ActivateTargetResult: ActivateTargetResult, + AttachToTargetParams: AttachToTargetParams, + AttachToTargetResult: AttachToTargetResult, + AttachToBrowserTargetParams: AttachToBrowserTargetParams, + AttachToBrowserTargetResult: AttachToBrowserTargetResult, + CloseTargetParams: CloseTargetParams, + CloseTargetResult: CloseTargetResult, + ExposeDevToolsProtocolParams: ExposeDevToolsProtocolParams, + ExposeDevToolsProtocolResult: ExposeDevToolsProtocolResult, + CreateBrowserContextParams: CreateBrowserContextParams, + CreateBrowserContextResult: CreateBrowserContextResult, + GetBrowserContextsParams: GetBrowserContextsParams, + GetBrowserContextsResult: GetBrowserContextsResult, + CreateTargetParams: CreateTargetParams, + CreateTargetResult: CreateTargetResult, + DetachFromTargetParams: DetachFromTargetParams, + DetachFromTargetResult: DetachFromTargetResult, + DisposeBrowserContextParams: DisposeBrowserContextParams, + DisposeBrowserContextResult: DisposeBrowserContextResult, + GetTargetInfoParams: GetTargetInfoParams, + GetTargetInfoResult: GetTargetInfoResult, + GetTargetsParams: GetTargetsParams, + GetTargetsResult: GetTargetsResult, + SendMessageToTargetParams: SendMessageToTargetParams, + SendMessageToTargetResult: SendMessageToTargetResult, + SetAutoAttachParams: SetAutoAttachParams, + SetAutoAttachResult: SetAutoAttachResult, + AutoAttachRelatedParams: AutoAttachRelatedParams, + AutoAttachRelatedResult: AutoAttachRelatedResult, + SetDiscoverTargetsParams: SetDiscoverTargetsParams, + SetDiscoverTargetsResult: SetDiscoverTargetsResult, + SetRemoteLocationsParams: SetRemoteLocationsParams, + SetRemoteLocationsResult: SetRemoteLocationsResult, + GetDevToolsTargetParams: GetDevToolsTargetParams, + GetDevToolsTargetResult: GetDevToolsTargetResult, + OpenDevToolsParams: OpenDevToolsParams, + OpenDevToolsResult: OpenDevToolsResult, + AttachedToTargetEvent: AttachedToTargetEvent, + DetachedFromTargetEvent: DetachedFromTargetEvent, + ReceivedMessageFromTargetEvent: ReceivedMessageFromTargetEvent, + TargetCreatedEvent: TargetCreatedEvent, + TargetDestroyedEvent: TargetDestroyedEvent, + TargetCrashedEvent: TargetCrashedEvent, + TargetInfoChangedEvent: TargetInfoChangedEvent, +} as const; +export const commands = { + "Target.activateTarget": { params: ActivateTargetParams, result: ActivateTargetResult }, + "Target.attachToTarget": { params: AttachToTargetParams, result: AttachToTargetResult }, + "Target.attachToBrowserTarget": { params: AttachToBrowserTargetParams, result: AttachToBrowserTargetResult }, + "Target.closeTarget": { params: CloseTargetParams, result: CloseTargetResult }, + "Target.exposeDevToolsProtocol": { params: ExposeDevToolsProtocolParams, result: ExposeDevToolsProtocolResult }, + "Target.createBrowserContext": { params: CreateBrowserContextParams, result: CreateBrowserContextResult }, + "Target.getBrowserContexts": { params: GetBrowserContextsParams, result: GetBrowserContextsResult }, + "Target.createTarget": { params: CreateTargetParams, result: CreateTargetResult }, + "Target.detachFromTarget": { params: DetachFromTargetParams, result: DetachFromTargetResult }, + "Target.disposeBrowserContext": { params: DisposeBrowserContextParams, result: DisposeBrowserContextResult }, + "Target.getTargetInfo": { params: GetTargetInfoParams, result: GetTargetInfoResult }, + "Target.getTargets": { params: GetTargetsParams, result: GetTargetsResult }, + "Target.sendMessageToTarget": { params: SendMessageToTargetParams, result: SendMessageToTargetResult }, + "Target.setAutoAttach": { params: SetAutoAttachParams, result: SetAutoAttachResult }, + "Target.autoAttachRelated": { params: AutoAttachRelatedParams, result: AutoAttachRelatedResult }, + "Target.setDiscoverTargets": { params: SetDiscoverTargetsParams, result: SetDiscoverTargetsResult }, + "Target.setRemoteLocations": { params: SetRemoteLocationsParams, result: SetRemoteLocationsResult }, + "Target.getDevToolsTarget": { params: GetDevToolsTargetParams, result: GetDevToolsTargetResult }, + "Target.openDevTools": { params: OpenDevToolsParams, result: OpenDevToolsResult }, +} as const; +export const events = { + "Target.attachedToTarget": AttachedToTargetEvent, + "Target.detachedFromTarget": DetachedFromTargetEvent, + "Target.receivedMessageFromTarget": ReceivedMessageFromTargetEvent, + "Target.targetCreated": TargetCreatedEvent, + "Target.targetDestroyed": TargetDestroyedEvent, + "Target.targetCrashed": TargetCrashedEvent, + "Target.targetInfoChanged": TargetInfoChangedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Tethering.ts b/types/zod/Tethering.ts new file mode 100644 index 0000000..4ae9eaf --- /dev/null +++ b/types/zod/Tethering.ts @@ -0,0 +1,27 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const BindParams = withCdpMeta(z.object({ "port": z.number().int() }).passthrough(), "Tethering.bind.params", "commandParams", { method: "Tethering.bind" }); +export const BindResult = withCdpMeta(z.object({ }).passthrough(), "Tethering.bind.result", "commandResult", { method: "Tethering.bind" }); +export const UnbindParams = withCdpMeta(z.object({ "port": z.number().int() }).passthrough(), "Tethering.unbind.params", "commandParams", { method: "Tethering.unbind" }); +export const UnbindResult = withCdpMeta(z.object({ }).passthrough(), "Tethering.unbind.result", "commandResult", { method: "Tethering.unbind" }); +export const AcceptedEvent = withCdpMeta(z.object({ "port": z.number().int(), "connectionId": z.string() }).passthrough(), "Tethering.accepted", "event", { phase: "event" }); + +export const zod = { + BindParams: BindParams, + BindResult: BindResult, + UnbindParams: UnbindParams, + UnbindResult: UnbindResult, + AcceptedEvent: AcceptedEvent, +} as const; +export const commands = { + "Tethering.bind": { params: BindParams, result: BindResult }, + "Tethering.unbind": { params: UnbindParams, result: UnbindResult }, +} as const; +export const events = { + "Tethering.accepted": AcceptedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/Tracing.ts b/types/zod/Tracing.ts new file mode 100644 index 0000000..ec4c11c --- /dev/null +++ b/types/zod/Tracing.ts @@ -0,0 +1,66 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as IO from "./IO.js"; + +export const MemoryDumpConfig = withCdpMeta(z.record(z.string(), z.unknown()), "Tracing.MemoryDumpConfig", "type"); +export const TraceConfig = withCdpMeta(z.object({ "recordMode": z.enum(["recordUntilFull", "recordContinuously", "recordAsMuchAsPossible", "echoToConsole"]).optional(), "traceBufferSizeInKb": z.number().optional(), "enableSampling": z.boolean().optional(), "enableSystrace": z.boolean().optional(), "enableArgumentFilter": z.boolean().optional(), "includedCategories": z.array(z.string()).optional(), "excludedCategories": z.array(z.string()).optional(), "syntheticDelays": z.array(z.string()).optional(), "memoryDumpConfig": z.lazy(() => MemoryDumpConfig).optional() }).passthrough(), "Tracing.TraceConfig", "type"); +export const StreamFormat = withCdpMeta(z.enum(["json", "proto"]), "Tracing.StreamFormat", "type"); +export const StreamCompression = withCdpMeta(z.enum(["none", "gzip"]), "Tracing.StreamCompression", "type"); +export const MemoryDumpLevelOfDetail = withCdpMeta(z.enum(["background", "light", "detailed"]), "Tracing.MemoryDumpLevelOfDetail", "type"); +export const TracingBackend = withCdpMeta(z.enum(["auto", "chrome", "system"]), "Tracing.TracingBackend", "type"); +export const EndParams = withCdpMeta(z.object({ }).passthrough(), "Tracing.end.params", "commandParams", { method: "Tracing.end" }); +export const EndResult = withCdpMeta(z.object({ }).passthrough(), "Tracing.end.result", "commandResult", { method: "Tracing.end" }); +export const GetCategoriesParams = withCdpMeta(z.object({ }).passthrough(), "Tracing.getCategories.params", "commandParams", { method: "Tracing.getCategories" }); +export const GetCategoriesResult = withCdpMeta(z.object({ "categories": z.array(z.string()) }).passthrough(), "Tracing.getCategories.result", "commandResult", { method: "Tracing.getCategories" }); +export const GetTrackEventDescriptorParams = withCdpMeta(z.object({ }).passthrough(), "Tracing.getTrackEventDescriptor.params", "commandParams", { method: "Tracing.getTrackEventDescriptor" }); +export const GetTrackEventDescriptorResult = withCdpMeta(z.object({ "descriptor": z.string() }).passthrough(), "Tracing.getTrackEventDescriptor.result", "commandResult", { method: "Tracing.getTrackEventDescriptor" }); +export const RecordClockSyncMarkerParams = withCdpMeta(z.object({ "syncId": z.string() }).passthrough(), "Tracing.recordClockSyncMarker.params", "commandParams", { method: "Tracing.recordClockSyncMarker" }); +export const RecordClockSyncMarkerResult = withCdpMeta(z.object({ }).passthrough(), "Tracing.recordClockSyncMarker.result", "commandResult", { method: "Tracing.recordClockSyncMarker" }); +export const RequestMemoryDumpParams = withCdpMeta(z.object({ "deterministic": z.boolean().optional(), "levelOfDetail": z.lazy(() => MemoryDumpLevelOfDetail).optional() }).passthrough(), "Tracing.requestMemoryDump.params", "commandParams", { method: "Tracing.requestMemoryDump" }); +export const RequestMemoryDumpResult = withCdpMeta(z.object({ "dumpGuid": z.string(), "success": z.boolean() }).passthrough(), "Tracing.requestMemoryDump.result", "commandResult", { method: "Tracing.requestMemoryDump" }); +export const StartParams = withCdpMeta(z.object({ "categories": z.string().optional(), "options": z.string().optional(), "bufferUsageReportingInterval": z.number().optional(), "transferMode": z.enum(["ReportEvents", "ReturnAsStream"]).optional(), "streamFormat": z.lazy(() => StreamFormat).optional(), "streamCompression": z.lazy(() => StreamCompression).optional(), "traceConfig": z.lazy(() => TraceConfig).optional(), "perfettoConfig": z.string().optional(), "tracingBackend": z.lazy(() => TracingBackend).optional() }).passthrough(), "Tracing.start.params", "commandParams", { method: "Tracing.start" }); +export const StartResult = withCdpMeta(z.object({ }).passthrough(), "Tracing.start.result", "commandResult", { method: "Tracing.start" }); +export const BufferUsageEvent = withCdpMeta(z.object({ "percentFull": z.number().optional(), "eventCount": z.number().optional(), "value": z.number().optional() }).passthrough(), "Tracing.bufferUsage", "event", { phase: "event" }); +export const DataCollectedEvent = withCdpMeta(z.object({ "value": z.array(z.record(z.string(), z.unknown())) }).passthrough(), "Tracing.dataCollected", "event", { phase: "event" }); +export const TracingCompleteEvent = withCdpMeta(z.object({ "dataLossOccurred": z.boolean(), "stream": z.lazy(() => IO.StreamHandle).optional(), "traceFormat": z.lazy(() => StreamFormat).optional(), "streamCompression": z.lazy(() => StreamCompression).optional() }).passthrough(), "Tracing.tracingComplete", "event", { phase: "event" }); + +export const zod = { + MemoryDumpConfig: MemoryDumpConfig, + TraceConfig: TraceConfig, + StreamFormat: StreamFormat, + StreamCompression: StreamCompression, + MemoryDumpLevelOfDetail: MemoryDumpLevelOfDetail, + TracingBackend: TracingBackend, + EndParams: EndParams, + EndResult: EndResult, + GetCategoriesParams: GetCategoriesParams, + GetCategoriesResult: GetCategoriesResult, + GetTrackEventDescriptorParams: GetTrackEventDescriptorParams, + GetTrackEventDescriptorResult: GetTrackEventDescriptorResult, + RecordClockSyncMarkerParams: RecordClockSyncMarkerParams, + RecordClockSyncMarkerResult: RecordClockSyncMarkerResult, + RequestMemoryDumpParams: RequestMemoryDumpParams, + RequestMemoryDumpResult: RequestMemoryDumpResult, + StartParams: StartParams, + StartResult: StartResult, + BufferUsageEvent: BufferUsageEvent, + DataCollectedEvent: DataCollectedEvent, + TracingCompleteEvent: TracingCompleteEvent, +} as const; +export const commands = { + "Tracing.end": { params: EndParams, result: EndResult }, + "Tracing.getCategories": { params: GetCategoriesParams, result: GetCategoriesResult }, + "Tracing.getTrackEventDescriptor": { params: GetTrackEventDescriptorParams, result: GetTrackEventDescriptorResult }, + "Tracing.recordClockSyncMarker": { params: RecordClockSyncMarkerParams, result: RecordClockSyncMarkerResult }, + "Tracing.requestMemoryDump": { params: RequestMemoryDumpParams, result: RequestMemoryDumpResult }, + "Tracing.start": { params: StartParams, result: StartResult }, +} as const; +export const events = { + "Tracing.bufferUsage": BufferUsageEvent, + "Tracing.dataCollected": DataCollectedEvent, + "Tracing.tracingComplete": TracingCompleteEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/WebAudio.ts b/types/zod/WebAudio.ts new file mode 100644 index 0000000..3169347 --- /dev/null +++ b/types/zod/WebAudio.ts @@ -0,0 +1,94 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const GraphObjectId = withCdpMeta(z.string(), "WebAudio.GraphObjectId", "type"); +export const ContextType = withCdpMeta(z.enum(["realtime", "offline"]), "WebAudio.ContextType", "type"); +export const ContextState = withCdpMeta(z.enum(["suspended", "running", "closed", "interrupted"]), "WebAudio.ContextState", "type"); +export const NodeType = withCdpMeta(z.string(), "WebAudio.NodeType", "type"); +export const ChannelCountMode = withCdpMeta(z.enum(["clamped-max", "explicit", "max"]), "WebAudio.ChannelCountMode", "type"); +export const ChannelInterpretation = withCdpMeta(z.enum(["discrete", "speakers"]), "WebAudio.ChannelInterpretation", "type"); +export const ParamType = withCdpMeta(z.string(), "WebAudio.ParamType", "type"); +export const AutomationRate = withCdpMeta(z.enum(["a-rate", "k-rate"]), "WebAudio.AutomationRate", "type"); +export const ContextRealtimeData = withCdpMeta(z.object({ "currentTime": z.number(), "renderCapacity": z.number(), "callbackIntervalMean": z.number(), "callbackIntervalVariance": z.number() }).passthrough(), "WebAudio.ContextRealtimeData", "type"); +export const BaseAudioContext = withCdpMeta(z.object({ "contextId": z.lazy(() => GraphObjectId), "contextType": z.lazy(() => ContextType), "contextState": z.lazy(() => ContextState), "realtimeData": z.lazy(() => ContextRealtimeData).optional(), "callbackBufferSize": z.number(), "maxOutputChannelCount": z.number(), "sampleRate": z.number() }).passthrough(), "WebAudio.BaseAudioContext", "type"); +export const AudioListener = withCdpMeta(z.object({ "listenerId": z.lazy(() => GraphObjectId), "contextId": z.lazy(() => GraphObjectId) }).passthrough(), "WebAudio.AudioListener", "type"); +export const AudioNode = withCdpMeta(z.object({ "nodeId": z.lazy(() => GraphObjectId), "contextId": z.lazy(() => GraphObjectId), "nodeType": z.lazy(() => NodeType), "numberOfInputs": z.number(), "numberOfOutputs": z.number(), "channelCount": z.number(), "channelCountMode": z.lazy(() => ChannelCountMode), "channelInterpretation": z.lazy(() => ChannelInterpretation) }).passthrough(), "WebAudio.AudioNode", "type"); +export const AudioParam = withCdpMeta(z.object({ "paramId": z.lazy(() => GraphObjectId), "nodeId": z.lazy(() => GraphObjectId), "contextId": z.lazy(() => GraphObjectId), "paramType": z.lazy(() => ParamType), "rate": z.lazy(() => AutomationRate), "defaultValue": z.number(), "minValue": z.number(), "maxValue": z.number() }).passthrough(), "WebAudio.AudioParam", "type"); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "WebAudio.enable.params", "commandParams", { method: "WebAudio.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "WebAudio.enable.result", "commandResult", { method: "WebAudio.enable" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "WebAudio.disable.params", "commandParams", { method: "WebAudio.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "WebAudio.disable.result", "commandResult", { method: "WebAudio.disable" }); +export const GetRealtimeDataParams = withCdpMeta(z.object({ "contextId": z.lazy(() => GraphObjectId) }).passthrough(), "WebAudio.getRealtimeData.params", "commandParams", { method: "WebAudio.getRealtimeData" }); +export const GetRealtimeDataResult = withCdpMeta(z.object({ "realtimeData": z.lazy(() => ContextRealtimeData) }).passthrough(), "WebAudio.getRealtimeData.result", "commandResult", { method: "WebAudio.getRealtimeData" }); +export const ContextCreatedEvent = withCdpMeta(z.object({ "context": z.lazy(() => BaseAudioContext) }).passthrough(), "WebAudio.contextCreated", "event", { phase: "event" }); +export const ContextWillBeDestroyedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => GraphObjectId) }).passthrough(), "WebAudio.contextWillBeDestroyed", "event", { phase: "event" }); +export const ContextChangedEvent = withCdpMeta(z.object({ "context": z.lazy(() => BaseAudioContext) }).passthrough(), "WebAudio.contextChanged", "event", { phase: "event" }); +export const AudioListenerCreatedEvent = withCdpMeta(z.object({ "listener": z.lazy(() => AudioListener) }).passthrough(), "WebAudio.audioListenerCreated", "event", { phase: "event" }); +export const AudioListenerWillBeDestroyedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => GraphObjectId), "listenerId": z.lazy(() => GraphObjectId) }).passthrough(), "WebAudio.audioListenerWillBeDestroyed", "event", { phase: "event" }); +export const AudioNodeCreatedEvent = withCdpMeta(z.object({ "node": z.lazy(() => AudioNode) }).passthrough(), "WebAudio.audioNodeCreated", "event", { phase: "event" }); +export const AudioNodeWillBeDestroyedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => GraphObjectId), "nodeId": z.lazy(() => GraphObjectId) }).passthrough(), "WebAudio.audioNodeWillBeDestroyed", "event", { phase: "event" }); +export const AudioParamCreatedEvent = withCdpMeta(z.object({ "param": z.lazy(() => AudioParam) }).passthrough(), "WebAudio.audioParamCreated", "event", { phase: "event" }); +export const AudioParamWillBeDestroyedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => GraphObjectId), "nodeId": z.lazy(() => GraphObjectId), "paramId": z.lazy(() => GraphObjectId) }).passthrough(), "WebAudio.audioParamWillBeDestroyed", "event", { phase: "event" }); +export const NodesConnectedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => GraphObjectId), "sourceId": z.lazy(() => GraphObjectId), "destinationId": z.lazy(() => GraphObjectId), "sourceOutputIndex": z.number().optional(), "destinationInputIndex": z.number().optional() }).passthrough(), "WebAudio.nodesConnected", "event", { phase: "event" }); +export const NodesDisconnectedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => GraphObjectId), "sourceId": z.lazy(() => GraphObjectId), "destinationId": z.lazy(() => GraphObjectId), "sourceOutputIndex": z.number().optional(), "destinationInputIndex": z.number().optional() }).passthrough(), "WebAudio.nodesDisconnected", "event", { phase: "event" }); +export const NodeParamConnectedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => GraphObjectId), "sourceId": z.lazy(() => GraphObjectId), "destinationId": z.lazy(() => GraphObjectId), "sourceOutputIndex": z.number().optional() }).passthrough(), "WebAudio.nodeParamConnected", "event", { phase: "event" }); +export const NodeParamDisconnectedEvent = withCdpMeta(z.object({ "contextId": z.lazy(() => GraphObjectId), "sourceId": z.lazy(() => GraphObjectId), "destinationId": z.lazy(() => GraphObjectId), "sourceOutputIndex": z.number().optional() }).passthrough(), "WebAudio.nodeParamDisconnected", "event", { phase: "event" }); + +export const zod = { + GraphObjectId: GraphObjectId, + ContextType: ContextType, + ContextState: ContextState, + NodeType: NodeType, + ChannelCountMode: ChannelCountMode, + ChannelInterpretation: ChannelInterpretation, + ParamType: ParamType, + AutomationRate: AutomationRate, + ContextRealtimeData: ContextRealtimeData, + BaseAudioContext: BaseAudioContext, + AudioListener: AudioListener, + AudioNode: AudioNode, + AudioParam: AudioParam, + EnableParams: EnableParams, + EnableResult: EnableResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + GetRealtimeDataParams: GetRealtimeDataParams, + GetRealtimeDataResult: GetRealtimeDataResult, + ContextCreatedEvent: ContextCreatedEvent, + ContextWillBeDestroyedEvent: ContextWillBeDestroyedEvent, + ContextChangedEvent: ContextChangedEvent, + AudioListenerCreatedEvent: AudioListenerCreatedEvent, + AudioListenerWillBeDestroyedEvent: AudioListenerWillBeDestroyedEvent, + AudioNodeCreatedEvent: AudioNodeCreatedEvent, + AudioNodeWillBeDestroyedEvent: AudioNodeWillBeDestroyedEvent, + AudioParamCreatedEvent: AudioParamCreatedEvent, + AudioParamWillBeDestroyedEvent: AudioParamWillBeDestroyedEvent, + NodesConnectedEvent: NodesConnectedEvent, + NodesDisconnectedEvent: NodesDisconnectedEvent, + NodeParamConnectedEvent: NodeParamConnectedEvent, + NodeParamDisconnectedEvent: NodeParamDisconnectedEvent, +} as const; +export const commands = { + "WebAudio.enable": { params: EnableParams, result: EnableResult }, + "WebAudio.disable": { params: DisableParams, result: DisableResult }, + "WebAudio.getRealtimeData": { params: GetRealtimeDataParams, result: GetRealtimeDataResult }, +} as const; +export const events = { + "WebAudio.contextCreated": ContextCreatedEvent, + "WebAudio.contextWillBeDestroyed": ContextWillBeDestroyedEvent, + "WebAudio.contextChanged": ContextChangedEvent, + "WebAudio.audioListenerCreated": AudioListenerCreatedEvent, + "WebAudio.audioListenerWillBeDestroyed": AudioListenerWillBeDestroyedEvent, + "WebAudio.audioNodeCreated": AudioNodeCreatedEvent, + "WebAudio.audioNodeWillBeDestroyed": AudioNodeWillBeDestroyedEvent, + "WebAudio.audioParamCreated": AudioParamCreatedEvent, + "WebAudio.audioParamWillBeDestroyed": AudioParamWillBeDestroyedEvent, + "WebAudio.nodesConnected": NodesConnectedEvent, + "WebAudio.nodesDisconnected": NodesDisconnectedEvent, + "WebAudio.nodeParamConnected": NodeParamConnectedEvent, + "WebAudio.nodeParamDisconnected": NodeParamDisconnectedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/WebAuthn.ts b/types/zod/WebAuthn.ts new file mode 100644 index 0000000..76755a9 --- /dev/null +++ b/types/zod/WebAuthn.ts @@ -0,0 +1,103 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; + +export const AuthenticatorId = withCdpMeta(z.string(), "WebAuthn.AuthenticatorId", "type"); +export const AuthenticatorProtocol = withCdpMeta(z.enum(["u2f", "ctap2"]), "WebAuthn.AuthenticatorProtocol", "type"); +export const Ctap2Version = withCdpMeta(z.enum(["ctap2_0", "ctap2_1", "ctap2_2"]), "WebAuthn.Ctap2Version", "type"); +export const AuthenticatorTransport = withCdpMeta(z.enum(["usb", "nfc", "ble", "cable", "internal"]), "WebAuthn.AuthenticatorTransport", "type"); +export const VirtualAuthenticatorOptions = withCdpMeta(z.object({ "protocol": z.lazy(() => AuthenticatorProtocol), "ctap2Version": z.lazy(() => Ctap2Version).optional(), "transport": z.lazy(() => AuthenticatorTransport), "hasResidentKey": z.boolean().optional(), "hasUserVerification": z.boolean().optional(), "hasLargeBlob": z.boolean().optional(), "hasCredBlob": z.boolean().optional(), "hasMinPinLength": z.boolean().optional(), "hasPrf": z.boolean().optional(), "hasHmacSecret": z.boolean().optional(), "hasHmacSecretMc": z.boolean().optional(), "automaticPresenceSimulation": z.boolean().optional(), "isUserVerified": z.boolean().optional(), "defaultBackupEligibility": z.boolean().optional(), "defaultBackupState": z.boolean().optional() }).passthrough(), "WebAuthn.VirtualAuthenticatorOptions", "type"); +export const Credential = withCdpMeta(z.object({ "credentialId": z.string(), "isResidentCredential": z.boolean(), "rpId": z.string().optional(), "privateKey": z.string(), "userHandle": z.string().optional(), "signCount": z.number().int(), "largeBlob": z.string().optional(), "backupEligibility": z.boolean().optional(), "backupState": z.boolean().optional(), "userName": z.string().optional(), "userDisplayName": z.string().optional() }).passthrough(), "WebAuthn.Credential", "type"); +export const EnableParams = withCdpMeta(z.object({ "enableUI": z.boolean().optional() }).passthrough(), "WebAuthn.enable.params", "commandParams", { method: "WebAuthn.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.enable.result", "commandResult", { method: "WebAuthn.enable" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.disable.params", "commandParams", { method: "WebAuthn.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.disable.result", "commandResult", { method: "WebAuthn.disable" }); +export const AddVirtualAuthenticatorParams = withCdpMeta(z.object({ "options": z.lazy(() => VirtualAuthenticatorOptions) }).passthrough(), "WebAuthn.addVirtualAuthenticator.params", "commandParams", { method: "WebAuthn.addVirtualAuthenticator" }); +export const AddVirtualAuthenticatorResult = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId) }).passthrough(), "WebAuthn.addVirtualAuthenticator.result", "commandResult", { method: "WebAuthn.addVirtualAuthenticator" }); +export const SetResponseOverrideBitsParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "isBogusSignature": z.boolean().optional(), "isBadUV": z.boolean().optional(), "isBadUP": z.boolean().optional() }).passthrough(), "WebAuthn.setResponseOverrideBits.params", "commandParams", { method: "WebAuthn.setResponseOverrideBits" }); +export const SetResponseOverrideBitsResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.setResponseOverrideBits.result", "commandResult", { method: "WebAuthn.setResponseOverrideBits" }); +export const RemoveVirtualAuthenticatorParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId) }).passthrough(), "WebAuthn.removeVirtualAuthenticator.params", "commandParams", { method: "WebAuthn.removeVirtualAuthenticator" }); +export const RemoveVirtualAuthenticatorResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.removeVirtualAuthenticator.result", "commandResult", { method: "WebAuthn.removeVirtualAuthenticator" }); +export const AddCredentialParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "credential": z.lazy(() => Credential) }).passthrough(), "WebAuthn.addCredential.params", "commandParams", { method: "WebAuthn.addCredential" }); +export const AddCredentialResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.addCredential.result", "commandResult", { method: "WebAuthn.addCredential" }); +export const GetCredentialParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "credentialId": z.string() }).passthrough(), "WebAuthn.getCredential.params", "commandParams", { method: "WebAuthn.getCredential" }); +export const GetCredentialResult = withCdpMeta(z.object({ "credential": z.lazy(() => Credential) }).passthrough(), "WebAuthn.getCredential.result", "commandResult", { method: "WebAuthn.getCredential" }); +export const GetCredentialsParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId) }).passthrough(), "WebAuthn.getCredentials.params", "commandParams", { method: "WebAuthn.getCredentials" }); +export const GetCredentialsResult = withCdpMeta(z.object({ "credentials": z.array(z.lazy(() => Credential)) }).passthrough(), "WebAuthn.getCredentials.result", "commandResult", { method: "WebAuthn.getCredentials" }); +export const RemoveCredentialParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "credentialId": z.string() }).passthrough(), "WebAuthn.removeCredential.params", "commandParams", { method: "WebAuthn.removeCredential" }); +export const RemoveCredentialResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.removeCredential.result", "commandResult", { method: "WebAuthn.removeCredential" }); +export const ClearCredentialsParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId) }).passthrough(), "WebAuthn.clearCredentials.params", "commandParams", { method: "WebAuthn.clearCredentials" }); +export const ClearCredentialsResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.clearCredentials.result", "commandResult", { method: "WebAuthn.clearCredentials" }); +export const SetUserVerifiedParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "isUserVerified": z.boolean() }).passthrough(), "WebAuthn.setUserVerified.params", "commandParams", { method: "WebAuthn.setUserVerified" }); +export const SetUserVerifiedResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.setUserVerified.result", "commandResult", { method: "WebAuthn.setUserVerified" }); +export const SetAutomaticPresenceSimulationParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "enabled": z.boolean() }).passthrough(), "WebAuthn.setAutomaticPresenceSimulation.params", "commandParams", { method: "WebAuthn.setAutomaticPresenceSimulation" }); +export const SetAutomaticPresenceSimulationResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.setAutomaticPresenceSimulation.result", "commandResult", { method: "WebAuthn.setAutomaticPresenceSimulation" }); +export const SetCredentialPropertiesParams = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "credentialId": z.string(), "backupEligibility": z.boolean().optional(), "backupState": z.boolean().optional() }).passthrough(), "WebAuthn.setCredentialProperties.params", "commandParams", { method: "WebAuthn.setCredentialProperties" }); +export const SetCredentialPropertiesResult = withCdpMeta(z.object({ }).passthrough(), "WebAuthn.setCredentialProperties.result", "commandResult", { method: "WebAuthn.setCredentialProperties" }); +export const CredentialAddedEvent = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "credential": z.lazy(() => Credential) }).passthrough(), "WebAuthn.credentialAdded", "event", { phase: "event" }); +export const CredentialDeletedEvent = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "credentialId": z.string() }).passthrough(), "WebAuthn.credentialDeleted", "event", { phase: "event" }); +export const CredentialUpdatedEvent = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "credential": z.lazy(() => Credential) }).passthrough(), "WebAuthn.credentialUpdated", "event", { phase: "event" }); +export const CredentialAssertedEvent = withCdpMeta(z.object({ "authenticatorId": z.lazy(() => AuthenticatorId), "credential": z.lazy(() => Credential) }).passthrough(), "WebAuthn.credentialAsserted", "event", { phase: "event" }); + +export const zod = { + AuthenticatorId: AuthenticatorId, + AuthenticatorProtocol: AuthenticatorProtocol, + Ctap2Version: Ctap2Version, + AuthenticatorTransport: AuthenticatorTransport, + VirtualAuthenticatorOptions: VirtualAuthenticatorOptions, + Credential: Credential, + EnableParams: EnableParams, + EnableResult: EnableResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + AddVirtualAuthenticatorParams: AddVirtualAuthenticatorParams, + AddVirtualAuthenticatorResult: AddVirtualAuthenticatorResult, + SetResponseOverrideBitsParams: SetResponseOverrideBitsParams, + SetResponseOverrideBitsResult: SetResponseOverrideBitsResult, + RemoveVirtualAuthenticatorParams: RemoveVirtualAuthenticatorParams, + RemoveVirtualAuthenticatorResult: RemoveVirtualAuthenticatorResult, + AddCredentialParams: AddCredentialParams, + AddCredentialResult: AddCredentialResult, + GetCredentialParams: GetCredentialParams, + GetCredentialResult: GetCredentialResult, + GetCredentialsParams: GetCredentialsParams, + GetCredentialsResult: GetCredentialsResult, + RemoveCredentialParams: RemoveCredentialParams, + RemoveCredentialResult: RemoveCredentialResult, + ClearCredentialsParams: ClearCredentialsParams, + ClearCredentialsResult: ClearCredentialsResult, + SetUserVerifiedParams: SetUserVerifiedParams, + SetUserVerifiedResult: SetUserVerifiedResult, + SetAutomaticPresenceSimulationParams: SetAutomaticPresenceSimulationParams, + SetAutomaticPresenceSimulationResult: SetAutomaticPresenceSimulationResult, + SetCredentialPropertiesParams: SetCredentialPropertiesParams, + SetCredentialPropertiesResult: SetCredentialPropertiesResult, + CredentialAddedEvent: CredentialAddedEvent, + CredentialDeletedEvent: CredentialDeletedEvent, + CredentialUpdatedEvent: CredentialUpdatedEvent, + CredentialAssertedEvent: CredentialAssertedEvent, +} as const; +export const commands = { + "WebAuthn.enable": { params: EnableParams, result: EnableResult }, + "WebAuthn.disable": { params: DisableParams, result: DisableResult }, + "WebAuthn.addVirtualAuthenticator": { params: AddVirtualAuthenticatorParams, result: AddVirtualAuthenticatorResult }, + "WebAuthn.setResponseOverrideBits": { params: SetResponseOverrideBitsParams, result: SetResponseOverrideBitsResult }, + "WebAuthn.removeVirtualAuthenticator": { params: RemoveVirtualAuthenticatorParams, result: RemoveVirtualAuthenticatorResult }, + "WebAuthn.addCredential": { params: AddCredentialParams, result: AddCredentialResult }, + "WebAuthn.getCredential": { params: GetCredentialParams, result: GetCredentialResult }, + "WebAuthn.getCredentials": { params: GetCredentialsParams, result: GetCredentialsResult }, + "WebAuthn.removeCredential": { params: RemoveCredentialParams, result: RemoveCredentialResult }, + "WebAuthn.clearCredentials": { params: ClearCredentialsParams, result: ClearCredentialsResult }, + "WebAuthn.setUserVerified": { params: SetUserVerifiedParams, result: SetUserVerifiedResult }, + "WebAuthn.setAutomaticPresenceSimulation": { params: SetAutomaticPresenceSimulationParams, result: SetAutomaticPresenceSimulationResult }, + "WebAuthn.setCredentialProperties": { params: SetCredentialPropertiesParams, result: SetCredentialPropertiesResult }, +} as const; +export const events = { + "WebAuthn.credentialAdded": CredentialAddedEvent, + "WebAuthn.credentialDeleted": CredentialDeletedEvent, + "WebAuthn.credentialUpdated": CredentialUpdatedEvent, + "WebAuthn.credentialAsserted": CredentialAssertedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/WebMCP.ts b/types/zod/WebMCP.ts new file mode 100644 index 0000000..0ca06d3 --- /dev/null +++ b/types/zod/WebMCP.ts @@ -0,0 +1,57 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +// @ts-nocheck -- recursive protocol schemas intentionally use lazy self/cross references. +import { z } from "zod"; +import { withCdpMeta } from "./helpers.js"; +import * as DOM from "./DOM.js"; +import * as Page from "./Page.js"; +import * as Runtime from "./Runtime.js"; + +export const Annotation = withCdpMeta(z.object({ "readOnly": z.boolean().optional(), "untrustedContent": z.boolean().optional(), "autosubmit": z.boolean().optional() }).passthrough(), "WebMCP.Annotation", "type"); +export const InvocationStatus = withCdpMeta(z.enum(["Completed", "Canceled", "Error"]), "WebMCP.InvocationStatus", "type"); +export const Tool = withCdpMeta(z.object({ "name": z.string(), "description": z.string(), "inputSchema": z.record(z.string(), z.unknown()).optional(), "annotations": z.lazy(() => Annotation).optional(), "frameId": z.lazy(() => Page.FrameId), "backendNodeId": z.lazy(() => DOM.BackendNodeId).optional(), "stackTrace": z.lazy(() => Runtime.StackTrace).optional() }).passthrough(), "WebMCP.Tool", "type"); +export const RemovedTool = withCdpMeta(z.object({ "name": z.string(), "frameId": z.lazy(() => Page.FrameId) }).passthrough(), "WebMCP.RemovedTool", "type"); +export const EnableParams = withCdpMeta(z.object({ }).passthrough(), "WebMCP.enable.params", "commandParams", { method: "WebMCP.enable" }); +export const EnableResult = withCdpMeta(z.object({ }).passthrough(), "WebMCP.enable.result", "commandResult", { method: "WebMCP.enable" }); +export const DisableParams = withCdpMeta(z.object({ }).passthrough(), "WebMCP.disable.params", "commandParams", { method: "WebMCP.disable" }); +export const DisableResult = withCdpMeta(z.object({ }).passthrough(), "WebMCP.disable.result", "commandResult", { method: "WebMCP.disable" }); +export const InvokeToolParams = withCdpMeta(z.object({ "frameId": z.lazy(() => Page.FrameId), "toolName": z.string(), "input": z.record(z.string(), z.unknown()) }).passthrough(), "WebMCP.invokeTool.params", "commandParams", { method: "WebMCP.invokeTool" }); +export const InvokeToolResult = withCdpMeta(z.object({ "invocationId": z.string() }).passthrough(), "WebMCP.invokeTool.result", "commandResult", { method: "WebMCP.invokeTool" }); +export const CancelInvocationParams = withCdpMeta(z.object({ "invocationId": z.string() }).passthrough(), "WebMCP.cancelInvocation.params", "commandParams", { method: "WebMCP.cancelInvocation" }); +export const CancelInvocationResult = withCdpMeta(z.object({ }).passthrough(), "WebMCP.cancelInvocation.result", "commandResult", { method: "WebMCP.cancelInvocation" }); +export const ToolsAddedEvent = withCdpMeta(z.object({ "tools": z.array(z.lazy(() => Tool)) }).passthrough(), "WebMCP.toolsAdded", "event", { phase: "event" }); +export const ToolsRemovedEvent = withCdpMeta(z.object({ "tools": z.array(z.lazy(() => RemovedTool)) }).passthrough(), "WebMCP.toolsRemoved", "event", { phase: "event" }); +export const ToolInvokedEvent = withCdpMeta(z.object({ "toolName": z.string(), "frameId": z.lazy(() => Page.FrameId), "invocationId": z.string(), "input": z.string() }).passthrough(), "WebMCP.toolInvoked", "event", { phase: "event" }); +export const ToolRespondedEvent = withCdpMeta(z.object({ "invocationId": z.string(), "status": z.lazy(() => InvocationStatus), "output": z.any().optional(), "errorText": z.string().optional(), "exception": z.lazy(() => Runtime.RemoteObject).optional() }).passthrough(), "WebMCP.toolResponded", "event", { phase: "event" }); + +export const zod = { + Annotation: Annotation, + InvocationStatus: InvocationStatus, + Tool: Tool, + RemovedTool: RemovedTool, + EnableParams: EnableParams, + EnableResult: EnableResult, + DisableParams: DisableParams, + DisableResult: DisableResult, + InvokeToolParams: InvokeToolParams, + InvokeToolResult: InvokeToolResult, + CancelInvocationParams: CancelInvocationParams, + CancelInvocationResult: CancelInvocationResult, + ToolsAddedEvent: ToolsAddedEvent, + ToolsRemovedEvent: ToolsRemovedEvent, + ToolInvokedEvent: ToolInvokedEvent, + ToolRespondedEvent: ToolRespondedEvent, +} as const; +export const commands = { + "WebMCP.enable": { params: EnableParams, result: EnableResult }, + "WebMCP.disable": { params: DisableParams, result: DisableResult }, + "WebMCP.invokeTool": { params: InvokeToolParams, result: InvokeToolResult }, + "WebMCP.cancelInvocation": { params: CancelInvocationParams, result: CancelInvocationResult }, +} as const; +export const events = { + "WebMCP.toolsAdded": ToolsAddedEvent, + "WebMCP.toolsRemoved": ToolsRemovedEvent, + "WebMCP.toolInvoked": ToolInvokedEvent, + "WebMCP.toolResponded": ToolRespondedEvent, +} as const; +export const types = { zod } as const; +export const cdp = { types, commands, events } as const; diff --git a/types/zod/helpers.ts b/types/zod/helpers.ts new file mode 100644 index 0000000..805339a --- /dev/null +++ b/types/zod/helpers.ts @@ -0,0 +1,14 @@ +// Generated by types/codegen.ts from devtools-protocol@0.0.1621552. Do not edit by hand. +import type { z } from "zod"; + +export type CdpNamedSchema = T & { readonly id: string; readonly name: string; readonly kind: string; meta(): { id: string; name: string; kind: string } }; +export const withCdpMeta = (schema: T, id: string, kind: string, extra = {}): CdpNamedSchema => { + const meta = { id, name: id, kind, ...extra }; + const named = schema.meta(meta); + Object.defineProperties(named, { + id: { value: id, enumerable: true, configurable: true }, + name: { value: id, configurable: true }, + kind: { value: kind, enumerable: true, configurable: true }, + }); + return named as CdpNamedSchema; +};