mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-13 23:53:25 +00:00
feat: generate cdp types based on protocol" (#355)
* feat: gen cdp types * feat: move apis to use typed cdp * fix: lint errors on scripts/codegen * fix: lint errors on scripts/codegen
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
"@ai-sdk/openai-compatible": "^2.0.30",
|
||||
"@ai-sdk/provider": "^3.0.8",
|
||||
"@browseros-ai/agent-sdk": "workspace:*",
|
||||
"@browseros/cdp-protocol": "workspace:*",
|
||||
"@browseros/shared": "workspace:*",
|
||||
"@google/gemini-cli-core": "^0.16.0",
|
||||
"@google/genai": "1.30.0",
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import {
|
||||
createProtocolApi,
|
||||
type RawOn,
|
||||
type RawSend,
|
||||
} from '@browseros/cdp-protocol/create-api'
|
||||
import type { ProtocolApi } from '@browseros/cdp-protocol/protocol-api'
|
||||
import type { CdpTarget, CdpBackend as ICdpBackend } from './types'
|
||||
|
||||
interface PendingRequest {
|
||||
@@ -5,16 +11,24 @@ interface PendingRequest {
|
||||
reject: (reason: Error) => void
|
||||
}
|
||||
|
||||
export class CdpBackend implements ICdpBackend {
|
||||
// biome-ignore lint/correctness/noUnusedVariables: declaration merging adds ProtocolApi properties to the class
|
||||
interface CdpBackend extends ProtocolApi {}
|
||||
// biome-ignore lint/suspicious/noUnsafeDeclarationMerging: intentional — Object.assign fills these at runtime
|
||||
class CdpBackend implements ICdpBackend {
|
||||
private port: number
|
||||
private ws: WebSocket | null = null
|
||||
private messageId = 0
|
||||
private pending = new Map<number, PendingRequest>()
|
||||
private connected = false
|
||||
private eventHandlers = new Map<string, ((params: unknown) => void)[]>()
|
||||
private sessionCache = new Map<string, ProtocolApi>()
|
||||
|
||||
constructor(config: { port: number }) {
|
||||
this.port = config.port
|
||||
|
||||
const rawSend: RawSend = (method, params) => this.rawSend(method, params)
|
||||
const rawOn: RawOn = (event, handler) => this.rawOn(event, handler)
|
||||
Object.assign(this, createProtocolApi(rawSend, rawOn))
|
||||
}
|
||||
|
||||
async connect(): Promise<void> {
|
||||
@@ -60,7 +74,32 @@ export class CdpBackend implements ICdpBackend {
|
||||
return this.connected
|
||||
}
|
||||
|
||||
async send(
|
||||
session(sessionId: string): ProtocolApi {
|
||||
let cached = this.sessionCache.get(sessionId)
|
||||
if (!cached) {
|
||||
cached = createProtocolApi(
|
||||
(method, params) => this.rawSend(method, params, sessionId),
|
||||
(event, handler) => this.rawOn(event, handler),
|
||||
)
|
||||
this.sessionCache.set(sessionId, cached)
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
async getTargets(): Promise<CdpTarget[]> {
|
||||
const result = await this.Target.getTargets()
|
||||
|
||||
return result.targetInfos.map((t) => ({
|
||||
id: t.targetId,
|
||||
type: t.type,
|
||||
title: t.title,
|
||||
url: t.url,
|
||||
tabId: t.tabId,
|
||||
windowId: t.windowId,
|
||||
}))
|
||||
}
|
||||
|
||||
private async rawSend(
|
||||
method: string,
|
||||
params?: Record<string, unknown>,
|
||||
sessionId?: string,
|
||||
@@ -86,29 +125,7 @@ export class CdpBackend implements ICdpBackend {
|
||||
})
|
||||
}
|
||||
|
||||
async getTargets(): Promise<CdpTarget[]> {
|
||||
const result = (await this.send('Target.getTargets')) as {
|
||||
targetInfos: Array<{
|
||||
targetId: string
|
||||
type: string
|
||||
title: string
|
||||
url: string
|
||||
tabId?: number
|
||||
windowId?: number
|
||||
}>
|
||||
}
|
||||
|
||||
return result.targetInfos.map((t) => ({
|
||||
id: t.targetId,
|
||||
type: t.type,
|
||||
title: t.title,
|
||||
url: t.url,
|
||||
tabId: t.tabId,
|
||||
windowId: t.windowId,
|
||||
}))
|
||||
}
|
||||
|
||||
on(event: string, handler: (params: unknown) => void): () => void {
|
||||
private rawOn(event: string, handler: (params: unknown) => void): () => void {
|
||||
if (!this.eventHandlers.has(event)) {
|
||||
this.eventHandlers.set(event, [])
|
||||
}
|
||||
@@ -154,3 +171,5 @@ export class CdpBackend implements ICdpBackend {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { CdpBackend }
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
export interface CdpBackend {
|
||||
import type { ProtocolApi } from '@browseros/cdp-protocol/protocol-api'
|
||||
|
||||
export interface CdpBackend extends ProtocolApi {
|
||||
connect(): Promise<void>
|
||||
disconnect(): Promise<void>
|
||||
isConnected(): boolean
|
||||
send(
|
||||
method: string,
|
||||
params?: Record<string, unknown>,
|
||||
sessionId?: string,
|
||||
): Promise<unknown>
|
||||
getTargets(): Promise<CdpTarget[]>
|
||||
on(event: string, handler: (params: unknown) => void): () => void
|
||||
session(sessionId: string): ProtocolApi
|
||||
}
|
||||
|
||||
export interface ControllerBackend {
|
||||
|
||||
@@ -12,29 +12,27 @@ export interface BookmarkNode {
|
||||
}
|
||||
|
||||
export async function getBookmarks(cdp: CdpBackend): Promise<BookmarkNode[]> {
|
||||
const result = await cdp.send('Bookmarks.getBookmarks')
|
||||
const data = result as { nodes: BookmarkNode[] }
|
||||
return data.nodes
|
||||
const result = await cdp.Bookmarks.getBookmarks()
|
||||
return result.nodes as BookmarkNode[]
|
||||
}
|
||||
|
||||
export async function createBookmark(
|
||||
cdp: CdpBackend,
|
||||
params: { title: string; url?: string; parentId?: string },
|
||||
): Promise<BookmarkNode> {
|
||||
const result = await cdp.send('Bookmarks.createBookmark', {
|
||||
const result = await cdp.Bookmarks.createBookmark({
|
||||
title: params.title,
|
||||
...(params.url !== undefined && { url: params.url }),
|
||||
...(params.parentId !== undefined && { parentId: params.parentId }),
|
||||
})
|
||||
const data = result as { node: BookmarkNode }
|
||||
return data.node
|
||||
return result.node as BookmarkNode
|
||||
}
|
||||
|
||||
export async function removeBookmark(
|
||||
cdp: CdpBackend,
|
||||
id: string,
|
||||
): Promise<void> {
|
||||
await cdp.send('Bookmarks.removeBookmark', { id })
|
||||
await cdp.Bookmarks.removeBookmark({ id })
|
||||
}
|
||||
|
||||
export async function updateBookmark(
|
||||
@@ -42,9 +40,8 @@ export async function updateBookmark(
|
||||
id: string,
|
||||
changes: { url?: string; title?: string },
|
||||
): Promise<BookmarkNode> {
|
||||
const result = await cdp.send('Bookmarks.updateBookmark', { id, ...changes })
|
||||
const data = result as { node: BookmarkNode }
|
||||
return data.node
|
||||
const result = await cdp.Bookmarks.updateBookmark({ id, ...changes })
|
||||
return result.node as BookmarkNode
|
||||
}
|
||||
|
||||
export async function moveBookmark(
|
||||
@@ -52,19 +49,14 @@ export async function moveBookmark(
|
||||
id: string,
|
||||
destination: { parentId?: string; index?: number },
|
||||
): Promise<BookmarkNode> {
|
||||
const result = await cdp.send('Bookmarks.moveBookmark', {
|
||||
id,
|
||||
...destination,
|
||||
})
|
||||
const data = result as { node: BookmarkNode }
|
||||
return data.node
|
||||
const result = await cdp.Bookmarks.moveBookmark({ id, ...destination })
|
||||
return result.node as BookmarkNode
|
||||
}
|
||||
|
||||
export async function searchBookmarks(
|
||||
cdp: CdpBackend,
|
||||
query: string,
|
||||
): Promise<BookmarkNode[]> {
|
||||
const result = await cdp.send('Bookmarks.searchBookmarks', { query })
|
||||
const data = result as { results: BookmarkNode[] }
|
||||
return data.results
|
||||
const result = await cdp.Bookmarks.searchBookmarks({ query })
|
||||
return result.results as BookmarkNode[]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { ProtocolApi } from '@browseros/cdp-protocol/protocol-api'
|
||||
import { logger } from '../lib/logger'
|
||||
import type { CdpBackend, ControllerBackend } from './backends/types'
|
||||
import type { BookmarkNode } from './bookmarks'
|
||||
@@ -93,11 +94,10 @@ export class Browser {
|
||||
}
|
||||
|
||||
private setupEventHandlers(): void {
|
||||
this.cdp.on('Target.detachedFromTarget', (params) => {
|
||||
const { sessionId } = params as { sessionId?: string }
|
||||
if (sessionId) {
|
||||
this.cdp.Target.on('detachedFromTarget', (params) => {
|
||||
if (params.sessionId) {
|
||||
for (const [targetId, sid] of this.sessions) {
|
||||
if (sid === sessionId) {
|
||||
if (sid === params.sessionId) {
|
||||
this.sessions.delete(targetId)
|
||||
break
|
||||
}
|
||||
@@ -108,7 +108,7 @@ export class Browser {
|
||||
|
||||
// --- Session management ---
|
||||
|
||||
private async resolvePage(page: number): Promise<string> {
|
||||
private async resolveSession(page: number): Promise<ProtocolApi> {
|
||||
let info = this.pages.get(page)
|
||||
if (!info) {
|
||||
await this.listPages()
|
||||
@@ -118,25 +118,27 @@ export class Browser {
|
||||
throw new Error(
|
||||
`Unknown page ${page}. Use list_pages to see available pages.`,
|
||||
)
|
||||
return this.attachToPage(info.targetId)
|
||||
const sessionId = await this.attachToPage(info.targetId)
|
||||
return this.cdp.session(sessionId)
|
||||
}
|
||||
|
||||
private async attachToPage(targetId: string): Promise<string> {
|
||||
const cached = this.sessions.get(targetId)
|
||||
if (cached) return cached
|
||||
|
||||
const result = (await this.cdp.send('Target.attachToTarget', {
|
||||
const result = await this.cdp.Target.attachToTarget({
|
||||
targetId,
|
||||
flatten: true,
|
||||
})) as { sessionId: string }
|
||||
})
|
||||
|
||||
const sessionId = result.sessionId
|
||||
const session = this.cdp.session(sessionId)
|
||||
|
||||
await Promise.all([
|
||||
this.cdp.send('Page.enable', {}, sessionId),
|
||||
this.cdp.send('DOM.enable', {}, sessionId),
|
||||
this.cdp.send('Runtime.enable', {}, sessionId),
|
||||
this.cdp.send('Accessibility.enable', {}, sessionId),
|
||||
session.Page.enable(),
|
||||
session.DOM.enable(),
|
||||
session.Runtime.enable(),
|
||||
session.Accessibility.enable(),
|
||||
])
|
||||
|
||||
this.sessions.set(targetId, sessionId)
|
||||
@@ -146,10 +148,8 @@ export class Browser {
|
||||
// --- Pages ---
|
||||
|
||||
async listPages(): Promise<PageInfo[]> {
|
||||
const result = (await this.cdp.send('Browser.getTabs', {
|
||||
includeHidden: true,
|
||||
})) as { tabs: TabInfo[] }
|
||||
const tabs = result.tabs.filter(
|
||||
const result = await this.cdp.Browser.getTabs({ includeHidden: true })
|
||||
const tabs = (result.tabs as TabInfo[]).filter(
|
||||
(t) => !EXCLUDED_URL_PREFIXES.some((prefix) => t.url.startsWith(prefix)),
|
||||
)
|
||||
|
||||
@@ -218,16 +218,14 @@ export class Browser {
|
||||
}
|
||||
|
||||
async getActivePage(): Promise<PageInfo | null> {
|
||||
const result = (await this.cdp.send('Browser.getActiveTab')) as {
|
||||
tab?: TabInfo
|
||||
}
|
||||
const result = await this.cdp.Browser.getActiveTab()
|
||||
|
||||
if (!result.tab) return null
|
||||
|
||||
await this.listPages()
|
||||
|
||||
for (const info of this.pages.values()) {
|
||||
if (info.targetId === result.tab.targetId) return info
|
||||
if (info.targetId === (result.tab as TabInfo).targetId) return info
|
||||
}
|
||||
|
||||
return null
|
||||
@@ -237,17 +235,17 @@ export class Browser {
|
||||
url: string,
|
||||
opts?: { hidden?: boolean; background?: boolean; windowId?: number },
|
||||
): Promise<number> {
|
||||
const createResult = (await this.cdp.send('Browser.createTab', {
|
||||
const createResult = await this.cdp.Browser.createTab({
|
||||
url,
|
||||
...(opts?.hidden !== undefined && { hidden: opts.hidden }),
|
||||
...(opts?.background !== undefined && { background: opts.background }),
|
||||
...(opts?.windowId !== undefined && { windowId: opts.windowId }),
|
||||
})) as { tab: TabInfo }
|
||||
})
|
||||
|
||||
const infoResult = (await this.cdp.send('Browser.getTabInfo', {
|
||||
tabId: createResult.tab.tabId,
|
||||
})) as { tab: TabInfo }
|
||||
const tabInfo = infoResult.tab
|
||||
const infoResult = await this.cdp.Browser.getTabInfo({
|
||||
tabId: (createResult.tab as TabInfo).tabId,
|
||||
})
|
||||
const tabInfo = infoResult.tab as TabInfo
|
||||
|
||||
const pageId = this.nextPageId++
|
||||
this.pages.set(pageId, {
|
||||
@@ -274,25 +272,27 @@ export class Browser {
|
||||
throw new Error(
|
||||
`Unknown page ${page}. Use list_pages to see available pages.`,
|
||||
)
|
||||
await this.cdp.send('Browser.closeTab', { tabId: info.tabId })
|
||||
await this.cdp.Browser.closeTab({ tabId: info.tabId })
|
||||
this.pages.delete(page)
|
||||
this.sessions.delete(info.targetId)
|
||||
}
|
||||
|
||||
// --- Navigation ---
|
||||
|
||||
private async waitForLoad(sessionId: string, timeout = 30000): Promise<void> {
|
||||
private async waitForLoad(
|
||||
session: ProtocolApi,
|
||||
timeout = 30000,
|
||||
): Promise<void> {
|
||||
const deadline = Date.now() + timeout
|
||||
await new Promise((r) => setTimeout(r, 50))
|
||||
|
||||
while (Date.now() < deadline) {
|
||||
try {
|
||||
const result = (await this.cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{ expression: 'document.readyState', returnByValue: true },
|
||||
sessionId,
|
||||
)) as { result?: { value?: string } }
|
||||
if (result.result?.value === 'complete') return
|
||||
const result = await session.Runtime.evaluate({
|
||||
expression: 'document.readyState',
|
||||
returnByValue: true,
|
||||
})
|
||||
if ((result.result?.value as string) === 'complete') return
|
||||
} catch {
|
||||
// Context torn down during navigation — expected
|
||||
}
|
||||
@@ -301,67 +301,57 @@ export class Browser {
|
||||
}
|
||||
|
||||
async goto(page: number, url: string): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
await this.cdp.send('Page.navigate', { url }, sessionId)
|
||||
await this.waitForLoad(sessionId)
|
||||
const session = await this.resolveSession(page)
|
||||
await session.Page.navigate({ url })
|
||||
await this.waitForLoad(session)
|
||||
}
|
||||
|
||||
async goBack(page: number): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
await this.cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{ expression: 'history.back()', awaitPromise: true },
|
||||
sessionId,
|
||||
)
|
||||
await this.waitForLoad(sessionId)
|
||||
const session = await this.resolveSession(page)
|
||||
await session.Runtime.evaluate({
|
||||
expression: 'history.back()',
|
||||
awaitPromise: true,
|
||||
})
|
||||
await this.waitForLoad(session)
|
||||
}
|
||||
|
||||
async goForward(page: number): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
await this.cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{ expression: 'history.forward()', awaitPromise: true },
|
||||
sessionId,
|
||||
)
|
||||
await this.waitForLoad(sessionId)
|
||||
const session = await this.resolveSession(page)
|
||||
await session.Runtime.evaluate({
|
||||
expression: 'history.forward()',
|
||||
awaitPromise: true,
|
||||
})
|
||||
await this.waitForLoad(session)
|
||||
}
|
||||
|
||||
async reload(page: number): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
await this.cdp.send('Page.reload', {}, sessionId)
|
||||
await this.waitForLoad(sessionId)
|
||||
const session = await this.resolveSession(page)
|
||||
await session.Page.reload()
|
||||
await this.waitForLoad(session)
|
||||
}
|
||||
|
||||
async waitFor(
|
||||
page: number,
|
||||
opts: { text?: string; selector?: string; timeout: number },
|
||||
): Promise<boolean> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
const deadline = Date.now() + opts.timeout
|
||||
const interval = 500
|
||||
|
||||
while (Date.now() < deadline) {
|
||||
if (opts.text) {
|
||||
const result = (await this.cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{
|
||||
expression: `document.body?.innerText?.includes(${JSON.stringify(opts.text)}) ?? false`,
|
||||
returnByValue: true,
|
||||
},
|
||||
sessionId,
|
||||
)) as { result?: { value?: boolean } }
|
||||
const result = await session.Runtime.evaluate({
|
||||
expression: `document.body?.innerText?.includes(${JSON.stringify(opts.text)}) ?? false`,
|
||||
returnByValue: true,
|
||||
})
|
||||
if (result.result?.value === true) return true
|
||||
}
|
||||
|
||||
if (opts.selector) {
|
||||
const result = (await this.cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{
|
||||
expression: `!!document.querySelector(${JSON.stringify(opts.selector)})`,
|
||||
returnByValue: true,
|
||||
},
|
||||
sessionId,
|
||||
)) as { result?: { value?: boolean } }
|
||||
const result = await session.Runtime.evaluate({
|
||||
expression: `!!document.querySelector(${JSON.stringify(opts.selector)})`,
|
||||
returnByValue: true,
|
||||
})
|
||||
if (result.result?.value === true) return true
|
||||
}
|
||||
|
||||
@@ -373,36 +363,28 @@ export class Browser {
|
||||
|
||||
// --- Observation ---
|
||||
|
||||
private async fetchAXTree(sessionId: string): Promise<AXNode[]> {
|
||||
const result = (await this.cdp.send(
|
||||
'Accessibility.getFullAXTree',
|
||||
{},
|
||||
sessionId,
|
||||
)) as {
|
||||
nodes: AXNode[]
|
||||
}
|
||||
return result.nodes ?? []
|
||||
private async fetchAXTree(session: ProtocolApi): Promise<AXNode[]> {
|
||||
const result = await session.Accessibility.getFullAXTree()
|
||||
return (result.nodes as AXNode[]) ?? []
|
||||
}
|
||||
|
||||
async snapshot(page: number): Promise<string> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const nodes = await this.fetchAXTree(sessionId)
|
||||
const session = await this.resolveSession(page)
|
||||
const nodes = await this.fetchAXTree(session)
|
||||
if (nodes.length === 0) return ''
|
||||
return snapshot.buildInteractiveTree(nodes).join('\n')
|
||||
}
|
||||
|
||||
async enhancedSnapshot(page: number): Promise<string> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const nodes = await this.fetchAXTree(sessionId)
|
||||
const session = await this.resolveSession(page)
|
||||
const nodes = await this.fetchAXTree(session)
|
||||
if (nodes.length === 0) return ''
|
||||
|
||||
const treeLines = snapshot.buildEnhancedTree(nodes)
|
||||
|
||||
try {
|
||||
const cursorElements = await snapshot.findCursorInteractiveElements(
|
||||
this.cdp,
|
||||
sessionId,
|
||||
)
|
||||
const cursorElements =
|
||||
await snapshot.findCursorInteractiveElements(session)
|
||||
|
||||
if (cursorElements.length > 0) {
|
||||
const existingIds = new Set<number>()
|
||||
@@ -434,25 +416,24 @@ export class Browser {
|
||||
}
|
||||
|
||||
async content(page: number, selector?: string): Promise<string> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
const expression = selector
|
||||
? `(document.querySelector(${JSON.stringify(selector)})?.innerText ?? '')`
|
||||
: `(document.body?.innerText ?? '')`
|
||||
|
||||
const result = (await this.cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{ expression, returnByValue: true },
|
||||
sessionId,
|
||||
)) as { result?: { value?: string } }
|
||||
const result = await session.Runtime.evaluate({
|
||||
expression,
|
||||
returnByValue: true,
|
||||
})
|
||||
|
||||
return result.result?.value ?? ''
|
||||
return (result.result?.value as string) ?? ''
|
||||
}
|
||||
|
||||
async contentAsMarkdown(
|
||||
page: number,
|
||||
opts?: Omit<ContentMarkdownOptions, 'selector'> & { selector?: string },
|
||||
): Promise<string> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
const expression = buildContentMarkdownExpression({
|
||||
selector: opts?.selector,
|
||||
viewportOnly: opts?.viewportOnly,
|
||||
@@ -460,20 +441,19 @@ export class Browser {
|
||||
includeImages: opts?.includeImages,
|
||||
})
|
||||
|
||||
const result = (await this.cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{ expression, returnByValue: true },
|
||||
sessionId,
|
||||
)) as { result?: { value?: string } }
|
||||
const result = await session.Runtime.evaluate({
|
||||
expression,
|
||||
returnByValue: true,
|
||||
})
|
||||
|
||||
return result.result?.value ?? ''
|
||||
return (result.result?.value as string) ?? ''
|
||||
}
|
||||
|
||||
async screenshot(
|
||||
page: number,
|
||||
opts: { format: string; quality?: number; fullPage: boolean },
|
||||
): Promise<{ data: string; mimeType: string }> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
|
||||
const params: Record<string, unknown> = {
|
||||
format: opts.format,
|
||||
@@ -481,13 +461,9 @@ export class Browser {
|
||||
}
|
||||
if (opts.quality !== undefined) params.quality = opts.quality
|
||||
|
||||
const result = (await this.cdp.send(
|
||||
'Page.captureScreenshot',
|
||||
params,
|
||||
sessionId,
|
||||
)) as {
|
||||
data: string
|
||||
}
|
||||
const result = await session.Page.captureScreenshot(
|
||||
params as Parameters<ProtocolApi['Page']['captureScreenshot']>[0],
|
||||
)
|
||||
|
||||
return { data: result.data, mimeType: `image/${opts.format}` }
|
||||
}
|
||||
@@ -500,27 +476,13 @@ export class Browser {
|
||||
error?: string
|
||||
description?: string
|
||||
}> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
|
||||
const result = (await this.cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{
|
||||
expression,
|
||||
returnByValue: true,
|
||||
awaitPromise: true,
|
||||
},
|
||||
sessionId,
|
||||
)) as {
|
||||
result?: {
|
||||
type: string
|
||||
value?: unknown
|
||||
description?: string
|
||||
}
|
||||
exceptionDetails?: {
|
||||
text: string
|
||||
exception?: { description?: string }
|
||||
}
|
||||
}
|
||||
const result = await session.Runtime.evaluate({
|
||||
expression,
|
||||
returnByValue: true,
|
||||
awaitPromise: true,
|
||||
})
|
||||
|
||||
if (result.exceptionDetails) {
|
||||
return {
|
||||
@@ -543,19 +505,14 @@ export class Browser {
|
||||
element: number,
|
||||
opts?: { button?: string; clickCount?: number },
|
||||
): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
|
||||
await elements.scrollIntoView(this.cdp, element, sessionId)
|
||||
await elements.scrollIntoView(session, element)
|
||||
|
||||
try {
|
||||
const { x, y } = await elements.getElementCenter(
|
||||
this.cdp,
|
||||
element,
|
||||
sessionId,
|
||||
)
|
||||
const { x, y } = await elements.getElementCenter(session, element)
|
||||
await mouse.dispatchClick(
|
||||
this.cdp,
|
||||
sessionId,
|
||||
session,
|
||||
x,
|
||||
y,
|
||||
opts?.button ?? 'left',
|
||||
@@ -566,7 +523,7 @@ export class Browser {
|
||||
logger.debug(
|
||||
`CDP click failed for element=${element}, falling back to JS click`,
|
||||
)
|
||||
await elements.jsClick(this.cdp, element, sessionId)
|
||||
await elements.jsClick(session, element)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -576,10 +533,9 @@ export class Browser {
|
||||
y: number,
|
||||
opts?: { button?: string; clickCount?: number },
|
||||
): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
await mouse.dispatchClick(
|
||||
this.cdp,
|
||||
sessionId,
|
||||
session,
|
||||
x,
|
||||
y,
|
||||
opts?.button ?? 'left',
|
||||
@@ -589,15 +545,11 @@ export class Browser {
|
||||
}
|
||||
|
||||
async hover(page: number, element: number): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
|
||||
await elements.scrollIntoView(this.cdp, element, sessionId)
|
||||
const { x, y } = await elements.getElementCenter(
|
||||
this.cdp,
|
||||
element,
|
||||
sessionId,
|
||||
)
|
||||
await mouse.dispatchHover(this.cdp, sessionId, x, y)
|
||||
await elements.scrollIntoView(session, element)
|
||||
const { x, y } = await elements.getElementCenter(session, element)
|
||||
await mouse.dispatchHover(session, x, y)
|
||||
}
|
||||
|
||||
async fill(
|
||||
@@ -606,32 +558,28 @@ export class Browser {
|
||||
text: string,
|
||||
clear = true,
|
||||
): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
|
||||
await elements.scrollIntoView(this.cdp, element, sessionId)
|
||||
await elements.scrollIntoView(session, element)
|
||||
|
||||
try {
|
||||
await elements.focusElement(this.cdp, element, sessionId)
|
||||
await elements.focusElement(session, element)
|
||||
} catch {
|
||||
try {
|
||||
const { x, y } = await elements.getElementCenter(
|
||||
this.cdp,
|
||||
element,
|
||||
sessionId,
|
||||
)
|
||||
await mouse.dispatchClick(this.cdp, sessionId, x, y, 'left', 1, 0)
|
||||
const { x, y } = await elements.getElementCenter(session, element)
|
||||
await mouse.dispatchClick(session, x, y, 'left', 1, 0)
|
||||
} catch {
|
||||
logger.warn('Could not focus element via click either')
|
||||
}
|
||||
}
|
||||
|
||||
if (clear) await keyboard.clearField(this.cdp, sessionId)
|
||||
await keyboard.typeText(this.cdp, sessionId, text)
|
||||
if (clear) await keyboard.clearField(session)
|
||||
await keyboard.typeText(session, text)
|
||||
}
|
||||
|
||||
async pressKey(page: number, key: string): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
await keyboard.pressCombo(this.cdp, sessionId, key)
|
||||
const session = await this.resolveSession(page)
|
||||
await keyboard.pressCombo(session, key)
|
||||
}
|
||||
|
||||
async drag(
|
||||
@@ -639,18 +587,14 @@ export class Browser {
|
||||
sourceElement: number,
|
||||
target: { element?: number; x?: number; y?: number },
|
||||
): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
|
||||
await elements.scrollIntoView(this.cdp, sourceElement, sessionId)
|
||||
const from = await elements.getElementCenter(
|
||||
this.cdp,
|
||||
sourceElement,
|
||||
sessionId,
|
||||
)
|
||||
await elements.scrollIntoView(session, sourceElement)
|
||||
const from = await elements.getElementCenter(session, sourceElement)
|
||||
|
||||
let to: { x: number; y: number }
|
||||
if (target.element !== undefined) {
|
||||
to = await elements.getElementCenter(this.cdp, target.element, sessionId)
|
||||
to = await elements.getElementCenter(session, target.element)
|
||||
} else if (target.x !== undefined && target.y !== undefined) {
|
||||
to = { x: target.x, y: target.y }
|
||||
} else {
|
||||
@@ -659,7 +603,7 @@ export class Browser {
|
||||
)
|
||||
}
|
||||
|
||||
await mouse.dispatchDrag(this.cdp, sessionId, from, to)
|
||||
await mouse.dispatchDrag(session, from, to)
|
||||
}
|
||||
|
||||
async scroll(
|
||||
@@ -668,30 +612,17 @@ export class Browser {
|
||||
amount: number,
|
||||
element?: number,
|
||||
): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
const pixels = amount * 120
|
||||
|
||||
let x: number
|
||||
let y: number
|
||||
if (element !== undefined) {
|
||||
const center = await elements.getElementCenter(
|
||||
this.cdp,
|
||||
element,
|
||||
sessionId,
|
||||
)
|
||||
const center = await elements.getElementCenter(session, element)
|
||||
x = center.x
|
||||
y = center.y
|
||||
} else {
|
||||
const metrics = (await this.cdp.send(
|
||||
'Page.getLayoutMetrics',
|
||||
{},
|
||||
sessionId,
|
||||
)) as {
|
||||
layoutViewport: {
|
||||
clientWidth: number
|
||||
clientHeight: number
|
||||
}
|
||||
}
|
||||
const metrics = await session.Page.getLayoutMetrics()
|
||||
x = metrics.layoutViewport.clientWidth / 2
|
||||
y = metrics.layoutViewport.clientHeight / 2
|
||||
}
|
||||
@@ -701,7 +632,7 @@ export class Browser {
|
||||
const deltaY =
|
||||
direction === 'up' ? -pixels : direction === 'down' ? pixels : 0
|
||||
|
||||
await mouse.dispatchScroll(this.cdp, sessionId, x, y, deltaX, deltaY)
|
||||
await mouse.dispatchScroll(session, x, y, deltaX, deltaY)
|
||||
}
|
||||
|
||||
async handleDialog(
|
||||
@@ -709,10 +640,11 @@ export class Browser {
|
||||
accept: boolean,
|
||||
promptText?: string,
|
||||
): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const params: Record<string, unknown> = { accept }
|
||||
if (promptText !== undefined) params.promptText = promptText
|
||||
await this.cdp.send('Page.handleJavaScriptDialog', params, sessionId)
|
||||
const session = await this.resolveSession(page)
|
||||
await session.Page.handleJavaScriptDialog({
|
||||
accept,
|
||||
...(promptText !== undefined && { promptText }),
|
||||
})
|
||||
}
|
||||
|
||||
async selectOption(
|
||||
@@ -720,12 +652,11 @@ export class Browser {
|
||||
element: number,
|
||||
value: string,
|
||||
): Promise<string | null> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
|
||||
const selected = await elements.callOnElement(
|
||||
this.cdp,
|
||||
session,
|
||||
element,
|
||||
sessionId,
|
||||
`function(val){
|
||||
for(var i=0;i<this.options.length;i++){
|
||||
if(this.options[i].value===val||this.options[i].textContent.trim()===val){
|
||||
@@ -745,17 +676,16 @@ export class Browser {
|
||||
// --- Form helpers ---
|
||||
|
||||
async focus(page: number, element: number): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
await elements.scrollIntoView(this.cdp, element, sessionId)
|
||||
await elements.focusElement(this.cdp, element, sessionId)
|
||||
const session = await this.resolveSession(page)
|
||||
await elements.scrollIntoView(session, element)
|
||||
await elements.focusElement(session, element)
|
||||
}
|
||||
|
||||
async check(page: number, element: number): Promise<boolean> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
const checked = await elements.callOnElement(
|
||||
this.cdp,
|
||||
session,
|
||||
element,
|
||||
sessionId,
|
||||
'function(){return this.checked}',
|
||||
)
|
||||
if (!checked) await this.click(page, element)
|
||||
@@ -763,11 +693,10 @@ export class Browser {
|
||||
}
|
||||
|
||||
async uncheck(page: number, element: number): Promise<boolean> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const session = await this.resolveSession(page)
|
||||
const checked = await elements.callOnElement(
|
||||
this.cdp,
|
||||
session,
|
||||
element,
|
||||
sessionId,
|
||||
'function(){return this.checked}',
|
||||
)
|
||||
if (checked) await this.click(page, element)
|
||||
@@ -779,12 +708,8 @@ export class Browser {
|
||||
element: number,
|
||||
files: string[],
|
||||
): Promise<void> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
await this.cdp.send(
|
||||
'DOM.setFileInputFiles',
|
||||
{ files, backendNodeId: element },
|
||||
sessionId,
|
||||
)
|
||||
const session = await this.resolveSession(page)
|
||||
await session.DOM.setFileInputFiles({ files, backendNodeId: element })
|
||||
}
|
||||
|
||||
// --- File operations ---
|
||||
@@ -793,15 +718,11 @@ export class Browser {
|
||||
page: number,
|
||||
opts?: { landscape?: boolean; printBackground?: boolean },
|
||||
): Promise<{ data: string }> {
|
||||
const sessionId = await this.resolvePage(page)
|
||||
const result = (await this.cdp.send(
|
||||
'Page.printToPDF',
|
||||
{
|
||||
landscape: opts?.landscape ?? false,
|
||||
printBackground: opts?.printBackground ?? true,
|
||||
},
|
||||
sessionId,
|
||||
)) as { data: string }
|
||||
const session = await this.resolveSession(page)
|
||||
const result = await session.Page.printToPDF({
|
||||
landscape: opts?.landscape ?? false,
|
||||
printBackground: opts?.printBackground ?? true,
|
||||
})
|
||||
return { data: result.data }
|
||||
}
|
||||
|
||||
@@ -810,7 +731,7 @@ export class Browser {
|
||||
element: number,
|
||||
downloadPath: string,
|
||||
): Promise<{ filePath: string; suggestedFilename: string }> {
|
||||
await this.cdp.send('Browser.setDownloadBehavior', {
|
||||
await this.cdp.Browser.setDownloadBehavior({
|
||||
behavior: 'allowAndName',
|
||||
downloadPath,
|
||||
eventsEnabled: true,
|
||||
@@ -825,27 +746,25 @@ export class Browser {
|
||||
reject(new Error('Download timed out after 60s'))
|
||||
}, 60000)
|
||||
|
||||
const unsubBegin = this.cdp.on(
|
||||
'Browser.downloadWillBegin',
|
||||
(params: unknown) => {
|
||||
const p = params as { guid: string; suggestedFilename: string }
|
||||
guid = p.guid
|
||||
suggestedFilename = p.suggestedFilename
|
||||
const unsubBegin = this.cdp.Browser.on(
|
||||
'downloadWillBegin',
|
||||
(params) => {
|
||||
guid = params.guid
|
||||
suggestedFilename = params.suggestedFilename
|
||||
},
|
||||
)
|
||||
|
||||
const unsubProgress = this.cdp.on(
|
||||
'Browser.downloadProgress',
|
||||
(params: unknown) => {
|
||||
const p = params as { guid: string; state: string }
|
||||
if (p.guid === guid && p.state === 'completed') {
|
||||
const unsubProgress = this.cdp.Browser.on(
|
||||
'downloadProgress',
|
||||
(params) => {
|
||||
if (params.guid === guid && params.state === 'completed') {
|
||||
cleanUp()
|
||||
resolve({
|
||||
filePath: `${downloadPath}/${guid}`,
|
||||
suggestedFilename,
|
||||
})
|
||||
}
|
||||
if (p.guid === guid && p.state === 'canceled') {
|
||||
if (params.guid === guid && params.state === 'canceled') {
|
||||
cleanUp()
|
||||
reject(new Error('Download was canceled'))
|
||||
}
|
||||
@@ -856,9 +775,9 @@ export class Browser {
|
||||
clearTimeout(timeout)
|
||||
unsubBegin()
|
||||
unsubProgress()
|
||||
this.cdp
|
||||
.send('Browser.setDownloadBehavior', { behavior: 'default' })
|
||||
.catch(() => {})
|
||||
this.cdp.Browser.setDownloadBehavior({ behavior: 'default' }).catch(
|
||||
() => {},
|
||||
)
|
||||
}
|
||||
|
||||
this.click(page, element).catch((err) => {
|
||||
@@ -872,25 +791,23 @@ export class Browser {
|
||||
// --- Windows ---
|
||||
|
||||
async listWindows(): Promise<WindowInfo[]> {
|
||||
const result = (await this.cdp.send('Browser.getWindows')) as {
|
||||
windows: WindowInfo[]
|
||||
}
|
||||
return result.windows
|
||||
const result = await this.cdp.Browser.getWindows()
|
||||
return result.windows as WindowInfo[]
|
||||
}
|
||||
|
||||
async createWindow(opts?: { hidden?: boolean }): Promise<WindowInfo> {
|
||||
const result = (await this.cdp.send('Browser.createWindow', {
|
||||
const result = await this.cdp.Browser.createWindow({
|
||||
...(opts?.hidden !== undefined && { hidden: opts.hidden }),
|
||||
})) as { window: WindowInfo }
|
||||
return result.window
|
||||
})
|
||||
return result.window as WindowInfo
|
||||
}
|
||||
|
||||
async closeWindow(windowId: number): Promise<void> {
|
||||
await this.cdp.send('Browser.closeWindow', { windowId })
|
||||
await this.cdp.Browser.closeWindow({ windowId })
|
||||
}
|
||||
|
||||
async activateWindow(windowId: number): Promise<void> {
|
||||
await this.cdp.send('Browser.activateWindow', { windowId })
|
||||
await this.cdp.Browser.activateWindow({ windowId })
|
||||
}
|
||||
|
||||
// --- Bookmarks ---
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { CdpBackend } from './backends/types'
|
||||
import type { ProtocolApi } from '@browseros/cdp-protocol/protocol-api'
|
||||
|
||||
function quadCenter(q: number[]): { x: number; y: number } {
|
||||
const x = ((q[0] ?? 0) + (q[2] ?? 0) + (q[4] ?? 0) + (q[6] ?? 0)) / 4
|
||||
@@ -8,20 +8,13 @@ function quadCenter(q: number[]): { x: number; y: number } {
|
||||
|
||||
/** 3-tier fallback: getContentQuads -> getBoxModel -> getBoundingClientRect */
|
||||
export async function getElementCenter(
|
||||
cdp: CdpBackend,
|
||||
session: ProtocolApi,
|
||||
backendNodeId: number,
|
||||
sessionId: string,
|
||||
): Promise<{ x: number; y: number }> {
|
||||
try {
|
||||
const quadsResult = (await cdp.send(
|
||||
'DOM.getContentQuads',
|
||||
{ backendNodeId },
|
||||
sessionId,
|
||||
)) as {
|
||||
quads?: number[][]
|
||||
}
|
||||
const quadsResult = await session.DOM.getContentQuads({ backendNodeId })
|
||||
if (quadsResult.quads?.length) {
|
||||
const q = quadsResult.quads[0]
|
||||
const q = quadsResult.quads[0] as unknown as number[]
|
||||
if (q && q.length >= 8) return quadCenter(q)
|
||||
}
|
||||
} catch {
|
||||
@@ -29,26 +22,14 @@ export async function getElementCenter(
|
||||
}
|
||||
|
||||
try {
|
||||
const boxResult = (await cdp.send(
|
||||
'DOM.getBoxModel',
|
||||
{ backendNodeId },
|
||||
sessionId,
|
||||
)) as {
|
||||
model?: { content: number[] }
|
||||
}
|
||||
const content = boxResult.model?.content
|
||||
const boxResult = await session.DOM.getBoxModel({ backendNodeId })
|
||||
const content = boxResult.model?.content as unknown as number[] | undefined
|
||||
if (content && content.length >= 8) return quadCenter(content)
|
||||
} catch {
|
||||
// fall through
|
||||
}
|
||||
|
||||
const resolved = (await cdp.send(
|
||||
'DOM.resolveNode',
|
||||
{ backendNodeId },
|
||||
sessionId,
|
||||
)) as {
|
||||
object?: { objectId?: string }
|
||||
}
|
||||
const resolved = await session.DOM.resolveNode({ backendNodeId })
|
||||
const objectId = resolved.object?.objectId
|
||||
if (!objectId) {
|
||||
throw new Error(
|
||||
@@ -56,76 +37,57 @@ export async function getElementCenter(
|
||||
)
|
||||
}
|
||||
|
||||
const boundsResult = (await cdp.send(
|
||||
'Runtime.callFunctionOn',
|
||||
{
|
||||
functionDeclaration:
|
||||
'function(){var r=this.getBoundingClientRect();return{x:r.left,y:r.top,w:r.width,h:r.height}}',
|
||||
objectId,
|
||||
returnByValue: true,
|
||||
},
|
||||
sessionId,
|
||||
)) as {
|
||||
result?: {
|
||||
value?: { x: number; y: number; w: number; h: number }
|
||||
}
|
||||
}
|
||||
const boundsResult = await session.Runtime.callFunctionOn({
|
||||
functionDeclaration:
|
||||
'function(){var r=this.getBoundingClientRect();return{x:r.left,y:r.top,w:r.width,h:r.height}}',
|
||||
objectId,
|
||||
returnByValue: true,
|
||||
})
|
||||
|
||||
const rect = boundsResult.result?.value
|
||||
const rect = boundsResult.result?.value as
|
||||
| { x: number; y: number; w: number; h: number }
|
||||
| undefined
|
||||
if (!rect) throw new Error('Could not get element bounds.')
|
||||
return { x: rect.x + rect.w / 2, y: rect.y + rect.h / 2 }
|
||||
}
|
||||
|
||||
export async function scrollIntoView(
|
||||
cdp: CdpBackend,
|
||||
session: ProtocolApi,
|
||||
backendNodeId: number,
|
||||
sessionId: string,
|
||||
): Promise<void> {
|
||||
try {
|
||||
await cdp.send('DOM.scrollIntoViewIfNeeded', { backendNodeId }, sessionId)
|
||||
await session.DOM.scrollIntoViewIfNeeded({ backendNodeId })
|
||||
} catch {
|
||||
// not critical
|
||||
}
|
||||
}
|
||||
|
||||
export async function focusElement(
|
||||
cdp: CdpBackend,
|
||||
session: ProtocolApi,
|
||||
backendNodeId: number,
|
||||
sessionId: string,
|
||||
): Promise<void> {
|
||||
const pushResult = (await cdp.send(
|
||||
'DOM.pushNodesByBackendIdsToFrontend',
|
||||
{ backendNodeIds: [backendNodeId] },
|
||||
sessionId,
|
||||
)) as { nodeIds: number[] }
|
||||
await cdp.send('DOM.focus', { nodeId: pushResult.nodeIds[0] }, sessionId)
|
||||
const pushResult = await session.DOM.pushNodesByBackendIdsToFrontend({
|
||||
backendNodeIds: [backendNodeId],
|
||||
})
|
||||
await session.DOM.focus({ nodeId: pushResult.nodeIds[0] })
|
||||
}
|
||||
|
||||
export async function jsClick(
|
||||
cdp: CdpBackend,
|
||||
session: ProtocolApi,
|
||||
backendNodeId: number,
|
||||
sessionId: string,
|
||||
): Promise<void> {
|
||||
const objectId = await resolveObjectId(cdp, backendNodeId, sessionId)
|
||||
await cdp.send(
|
||||
'Runtime.callFunctionOn',
|
||||
{ functionDeclaration: 'function(){this.click()}', objectId },
|
||||
sessionId,
|
||||
)
|
||||
const objectId = await resolveObjectId(session, backendNodeId)
|
||||
await session.Runtime.callFunctionOn({
|
||||
functionDeclaration: 'function(){this.click()}',
|
||||
objectId,
|
||||
})
|
||||
}
|
||||
|
||||
export async function resolveObjectId(
|
||||
cdp: CdpBackend,
|
||||
session: ProtocolApi,
|
||||
backendNodeId: number,
|
||||
sessionId: string,
|
||||
): Promise<string> {
|
||||
const resolved = (await cdp.send(
|
||||
'DOM.resolveNode',
|
||||
{ backendNodeId },
|
||||
sessionId,
|
||||
)) as {
|
||||
object?: { objectId?: string }
|
||||
}
|
||||
const resolved = await session.DOM.resolveNode({ backendNodeId })
|
||||
const objectId = resolved.object?.objectId
|
||||
if (!objectId)
|
||||
throw new Error('Element not found in DOM. Take a new snapshot.')
|
||||
@@ -133,25 +95,19 @@ export async function resolveObjectId(
|
||||
}
|
||||
|
||||
export async function callOnElement(
|
||||
cdp: CdpBackend,
|
||||
session: ProtocolApi,
|
||||
backendNodeId: number,
|
||||
sessionId: string,
|
||||
fn: string,
|
||||
args?: unknown[],
|
||||
): Promise<unknown> {
|
||||
const objectId = await resolveObjectId(cdp, backendNodeId, sessionId)
|
||||
const params: Record<string, unknown> = {
|
||||
const objectId = await resolveObjectId(session, backendNodeId)
|
||||
const result = await session.Runtime.callFunctionOn({
|
||||
functionDeclaration: fn,
|
||||
objectId,
|
||||
returnByValue: true,
|
||||
}
|
||||
if (args) params.arguments = args.map((v) => ({ value: v }))
|
||||
const result = (await cdp.send(
|
||||
'Runtime.callFunctionOn',
|
||||
params,
|
||||
sessionId,
|
||||
)) as {
|
||||
result?: { value?: unknown }
|
||||
}
|
||||
...(args && {
|
||||
arguments: args.map((v) => ({ value: v })),
|
||||
}),
|
||||
})
|
||||
return result.result?.value
|
||||
}
|
||||
|
||||
@@ -14,27 +14,25 @@ export async function searchHistory(
|
||||
query: string,
|
||||
maxResults?: number,
|
||||
): Promise<HistoryEntry[]> {
|
||||
const result = await cdp.send('History.search', {
|
||||
const result = await cdp.History.search({
|
||||
query,
|
||||
...(maxResults !== undefined && { maxResults }),
|
||||
})
|
||||
const data = result as { entries: HistoryEntry[] }
|
||||
return data.entries
|
||||
return result.entries as HistoryEntry[]
|
||||
}
|
||||
|
||||
export async function getRecentHistory(
|
||||
cdp: CdpBackend,
|
||||
maxResults?: number,
|
||||
): Promise<HistoryEntry[]> {
|
||||
const result = await cdp.send('History.getRecent', {
|
||||
const result = await cdp.History.getRecent({
|
||||
...(maxResults !== undefined && { maxResults }),
|
||||
})
|
||||
const data = result as { entries: HistoryEntry[] }
|
||||
return data.entries
|
||||
return result.entries as HistoryEntry[]
|
||||
}
|
||||
|
||||
export async function deleteUrl(cdp: CdpBackend, url: string): Promise<void> {
|
||||
await cdp.send('History.deleteUrl', { url })
|
||||
await cdp.History.deleteUrl({ url })
|
||||
}
|
||||
|
||||
export async function deleteRange(
|
||||
@@ -42,5 +40,5 @@ export async function deleteRange(
|
||||
startTime: number,
|
||||
endTime: number,
|
||||
): Promise<void> {
|
||||
await cdp.send('History.deleteRange', { startTime, endTime })
|
||||
await cdp.History.deleteRange({ startTime, endTime })
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { CdpBackend } from './backends/types'
|
||||
import type { ProtocolApi } from '@browseros/cdp-protocol/protocol-api'
|
||||
|
||||
type KeyInfo = { code: string; keyCode: number | undefined }
|
||||
|
||||
@@ -71,119 +71,82 @@ export function modifierBitmask(modifiers: string[]): number {
|
||||
}
|
||||
|
||||
export async function typeText(
|
||||
cdp: CdpBackend,
|
||||
sessionId: string,
|
||||
session: ProtocolApi,
|
||||
text: string,
|
||||
): Promise<void> {
|
||||
for (const char of text) {
|
||||
if (char === '\n') {
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyDown',
|
||||
key: 'Enter',
|
||||
code: 'Enter',
|
||||
windowsVirtualKeyCode: 13,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{ type: 'char', text: '\r', key: 'Enter' },
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyUp',
|
||||
key: 'Enter',
|
||||
code: 'Enter',
|
||||
windowsVirtualKeyCode: 13,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyDown',
|
||||
key: 'Enter',
|
||||
code: 'Enter',
|
||||
windowsVirtualKeyCode: 13,
|
||||
})
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'char',
|
||||
text: '\r',
|
||||
key: 'Enter',
|
||||
})
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyUp',
|
||||
key: 'Enter',
|
||||
code: 'Enter',
|
||||
windowsVirtualKeyCode: 13,
|
||||
})
|
||||
} else {
|
||||
const info = getKeyInfo(char)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyDown',
|
||||
key: char,
|
||||
code: info.code,
|
||||
windowsVirtualKeyCode: info.keyCode,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{ type: 'char', text: char, key: char },
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyUp',
|
||||
key: char,
|
||||
code: info.code,
|
||||
windowsVirtualKeyCode: info.keyCode,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyDown',
|
||||
key: char,
|
||||
code: info.code,
|
||||
windowsVirtualKeyCode: info.keyCode,
|
||||
})
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'char',
|
||||
text: char,
|
||||
key: char,
|
||||
})
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyUp',
|
||||
key: char,
|
||||
code: info.code,
|
||||
windowsVirtualKeyCode: info.keyCode,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function clearField(
|
||||
cdp: CdpBackend,
|
||||
sessionId: string,
|
||||
): Promise<void> {
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyDown',
|
||||
key: 'a',
|
||||
code: 'KeyA',
|
||||
modifiers: 2,
|
||||
windowsVirtualKeyCode: 65,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyUp',
|
||||
key: 'a',
|
||||
code: 'KeyA',
|
||||
modifiers: 2,
|
||||
windowsVirtualKeyCode: 65,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyDown',
|
||||
key: 'Delete',
|
||||
code: 'Delete',
|
||||
windowsVirtualKeyCode: 46,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyUp',
|
||||
key: 'Delete',
|
||||
code: 'Delete',
|
||||
windowsVirtualKeyCode: 46,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
export async function clearField(session: ProtocolApi): Promise<void> {
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyDown',
|
||||
key: 'a',
|
||||
code: 'KeyA',
|
||||
modifiers: 2,
|
||||
windowsVirtualKeyCode: 65,
|
||||
})
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyUp',
|
||||
key: 'a',
|
||||
code: 'KeyA',
|
||||
modifiers: 2,
|
||||
windowsVirtualKeyCode: 65,
|
||||
})
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyDown',
|
||||
key: 'Delete',
|
||||
code: 'Delete',
|
||||
windowsVirtualKeyCode: 46,
|
||||
})
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyUp',
|
||||
key: 'Delete',
|
||||
code: 'Delete',
|
||||
windowsVirtualKeyCode: 46,
|
||||
})
|
||||
}
|
||||
|
||||
export async function pressCombo(
|
||||
cdp: CdpBackend,
|
||||
sessionId: string,
|
||||
session: ProtocolApi,
|
||||
key: string,
|
||||
): Promise<void> {
|
||||
const parts = key.split('+')
|
||||
@@ -193,53 +156,37 @@ export async function pressCombo(
|
||||
|
||||
for (const mod of modifiers) {
|
||||
const info = getKeyInfo(mod)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyDown',
|
||||
key: mod,
|
||||
code: info.code,
|
||||
windowsVirtualKeyCode: info.keyCode,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyDown',
|
||||
key: mod,
|
||||
code: info.code,
|
||||
windowsVirtualKeyCode: info.keyCode,
|
||||
})
|
||||
}
|
||||
|
||||
const mainInfo = getKeyInfo(mainKey)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyDown',
|
||||
key: mainKey,
|
||||
code: mainInfo.code,
|
||||
modifiers: modBitmask,
|
||||
windowsVirtualKeyCode: mainInfo.keyCode,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyUp',
|
||||
key: mainKey,
|
||||
code: mainInfo.code,
|
||||
modifiers: modBitmask,
|
||||
windowsVirtualKeyCode: mainInfo.keyCode,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyDown',
|
||||
key: mainKey,
|
||||
code: mainInfo.code,
|
||||
modifiers: modBitmask,
|
||||
windowsVirtualKeyCode: mainInfo.keyCode,
|
||||
})
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyUp',
|
||||
key: mainKey,
|
||||
code: mainInfo.code,
|
||||
modifiers: modBitmask,
|
||||
windowsVirtualKeyCode: mainInfo.keyCode,
|
||||
})
|
||||
|
||||
for (const mod of modifiers.reverse()) {
|
||||
const info = getKeyInfo(mod)
|
||||
await cdp.send(
|
||||
'Input.dispatchKeyEvent',
|
||||
{
|
||||
type: 'keyUp',
|
||||
key: mod,
|
||||
code: info.code,
|
||||
windowsVirtualKeyCode: info.keyCode,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await session.Input.dispatchKeyEvent({
|
||||
type: 'keyUp',
|
||||
key: mod,
|
||||
code: info.code,
|
||||
windowsVirtualKeyCode: info.keyCode,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,95 +1,84 @@
|
||||
import type { CdpBackend } from './backends/types'
|
||||
import type { ProtocolApi } from '@browseros/cdp-protocol/protocol-api'
|
||||
|
||||
export async function dispatchClick(
|
||||
cdp: CdpBackend,
|
||||
sessionId: string,
|
||||
session: ProtocolApi,
|
||||
x: number,
|
||||
y: number,
|
||||
button: string,
|
||||
clickCount: number,
|
||||
modifiers: number,
|
||||
): Promise<void> {
|
||||
await cdp.send(
|
||||
'Input.dispatchMouseEvent',
|
||||
{ type: 'mouseMoved', x, y },
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchMouseEvent',
|
||||
{ type: 'mousePressed', x, y, button, clickCount, modifiers },
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchMouseEvent',
|
||||
{ type: 'mouseReleased', x, y, button, clickCount, modifiers },
|
||||
sessionId,
|
||||
)
|
||||
const btn = button as 'left' | 'middle' | 'right'
|
||||
await session.Input.dispatchMouseEvent({ type: 'mouseMoved', x, y })
|
||||
await session.Input.dispatchMouseEvent({
|
||||
type: 'mousePressed',
|
||||
x,
|
||||
y,
|
||||
button: btn,
|
||||
clickCount,
|
||||
modifiers,
|
||||
})
|
||||
await session.Input.dispatchMouseEvent({
|
||||
type: 'mouseReleased',
|
||||
x,
|
||||
y,
|
||||
button: btn,
|
||||
clickCount,
|
||||
modifiers,
|
||||
})
|
||||
}
|
||||
|
||||
export async function dispatchHover(
|
||||
cdp: CdpBackend,
|
||||
sessionId: string,
|
||||
session: ProtocolApi,
|
||||
x: number,
|
||||
y: number,
|
||||
): Promise<void> {
|
||||
await cdp.send(
|
||||
'Input.dispatchMouseEvent',
|
||||
{ type: 'mouseMoved', x, y },
|
||||
sessionId,
|
||||
)
|
||||
await session.Input.dispatchMouseEvent({ type: 'mouseMoved', x, y })
|
||||
}
|
||||
|
||||
export async function dispatchDrag(
|
||||
cdp: CdpBackend,
|
||||
sessionId: string,
|
||||
session: ProtocolApi,
|
||||
from: { x: number; y: number },
|
||||
to: { x: number; y: number },
|
||||
): Promise<void> {
|
||||
await cdp.send(
|
||||
'Input.dispatchMouseEvent',
|
||||
{ type: 'mouseMoved', x: from.x, y: from.y },
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchMouseEvent',
|
||||
{
|
||||
type: 'mousePressed',
|
||||
x: from.x,
|
||||
y: from.y,
|
||||
button: 'left',
|
||||
clickCount: 1,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchMouseEvent',
|
||||
{ type: 'mouseMoved', x: to.x, y: to.y },
|
||||
sessionId,
|
||||
)
|
||||
await cdp.send(
|
||||
'Input.dispatchMouseEvent',
|
||||
{
|
||||
type: 'mouseReleased',
|
||||
x: to.x,
|
||||
y: to.y,
|
||||
button: 'left',
|
||||
clickCount: 1,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await session.Input.dispatchMouseEvent({
|
||||
type: 'mouseMoved',
|
||||
x: from.x,
|
||||
y: from.y,
|
||||
})
|
||||
await session.Input.dispatchMouseEvent({
|
||||
type: 'mousePressed',
|
||||
x: from.x,
|
||||
y: from.y,
|
||||
button: 'left',
|
||||
clickCount: 1,
|
||||
})
|
||||
await session.Input.dispatchMouseEvent({
|
||||
type: 'mouseMoved',
|
||||
x: to.x,
|
||||
y: to.y,
|
||||
})
|
||||
await session.Input.dispatchMouseEvent({
|
||||
type: 'mouseReleased',
|
||||
x: to.x,
|
||||
y: to.y,
|
||||
button: 'left',
|
||||
clickCount: 1,
|
||||
})
|
||||
}
|
||||
|
||||
export async function dispatchScroll(
|
||||
cdp: CdpBackend,
|
||||
sessionId: string,
|
||||
session: ProtocolApi,
|
||||
x: number,
|
||||
y: number,
|
||||
deltaX: number,
|
||||
deltaY: number,
|
||||
): Promise<void> {
|
||||
await cdp.send(
|
||||
'Input.dispatchMouseEvent',
|
||||
{ type: 'mouseWheel', x, y, deltaX, deltaY },
|
||||
sessionId,
|
||||
)
|
||||
await session.Input.dispatchMouseEvent({
|
||||
type: 'mouseWheel',
|
||||
x,
|
||||
y,
|
||||
deltaX,
|
||||
deltaY,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { CdpBackend } from './backends/types'
|
||||
import type { ProtocolApi } from '@browseros/cdp-protocol/protocol-api'
|
||||
|
||||
interface AXValue {
|
||||
type: string
|
||||
@@ -214,46 +214,32 @@ export interface CursorInteractiveElement {
|
||||
}
|
||||
|
||||
export async function findCursorInteractiveElements(
|
||||
cdp: CdpBackend,
|
||||
sessionId: string,
|
||||
session: ProtocolApi,
|
||||
): Promise<CursorInteractiveElement[]> {
|
||||
const findResult = (await cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{ expression: CURSOR_INTERACTIVE_JS, returnByValue: true },
|
||||
sessionId,
|
||||
)) as {
|
||||
result?: {
|
||||
value?: Array<{
|
||||
marker: string
|
||||
text: string
|
||||
reasons: string[]
|
||||
}>
|
||||
}
|
||||
}
|
||||
const findResult = await session.Runtime.evaluate({
|
||||
expression: CURSOR_INTERACTIVE_JS,
|
||||
returnByValue: true,
|
||||
})
|
||||
|
||||
const found = findResult.result?.value
|
||||
const found = findResult.result?.value as
|
||||
| Array<{ marker: string; text: string; reasons: string[] }>
|
||||
| undefined
|
||||
if (!found?.length) return []
|
||||
|
||||
const results: CursorInteractiveElement[] = []
|
||||
|
||||
for (const el of found) {
|
||||
try {
|
||||
const queryResult = (await cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{
|
||||
expression: `document.querySelector('[data-__cid="${el.marker}"]')`,
|
||||
returnByValue: false,
|
||||
},
|
||||
sessionId,
|
||||
)) as { result?: { objectId?: string } }
|
||||
const queryResult = await session.Runtime.evaluate({
|
||||
expression: `document.querySelector('[data-__cid="${el.marker}"]')`,
|
||||
returnByValue: false,
|
||||
})
|
||||
|
||||
if (!queryResult.result?.objectId) continue
|
||||
|
||||
const desc = (await cdp.send(
|
||||
'DOM.describeNode',
|
||||
{ objectId: queryResult.result.objectId },
|
||||
sessionId,
|
||||
)) as { node?: { backendNodeId?: number } }
|
||||
const desc = await session.DOM.describeNode({
|
||||
objectId: queryResult.result.objectId,
|
||||
})
|
||||
|
||||
if (desc.node?.backendNodeId) {
|
||||
results.push({
|
||||
@@ -267,14 +253,10 @@ export async function findCursorInteractiveElements(
|
||||
}
|
||||
}
|
||||
|
||||
await cdp.send(
|
||||
'Runtime.evaluate',
|
||||
{
|
||||
expression: `document.querySelectorAll('[data-__cid]').forEach(function(el){el.removeAttribute('data-__cid')})`,
|
||||
returnByValue: true,
|
||||
},
|
||||
sessionId,
|
||||
)
|
||||
await session.Runtime.evaluate({
|
||||
expression: `document.querySelectorAll('[data-__cid]').forEach(function(el){el.removeAttribute('data-__cid')})`,
|
||||
returnByValue: true,
|
||||
})
|
||||
|
||||
return results
|
||||
}
|
||||
|
||||
@@ -10,9 +10,8 @@ export interface TabGroup {
|
||||
}
|
||||
|
||||
export async function listTabGroups(cdp: CdpBackend): Promise<TabGroup[]> {
|
||||
const result = await cdp.send('Browser.getTabGroups')
|
||||
const data = result as { groups: TabGroup[] }
|
||||
return data.groups
|
||||
const result = await cdp.Browser.getTabGroups()
|
||||
return result.groups as TabGroup[]
|
||||
}
|
||||
|
||||
export async function groupTabs(
|
||||
@@ -21,20 +20,18 @@ export async function groupTabs(
|
||||
opts?: { title?: string; groupId?: string },
|
||||
): Promise<TabGroup> {
|
||||
if (opts?.groupId) {
|
||||
const result = await cdp.send('Browser.addTabsToGroup', {
|
||||
const result = await cdp.Browser.addTabsToGroup({
|
||||
groupId: opts.groupId,
|
||||
tabIds,
|
||||
})
|
||||
const data = result as { group: TabGroup }
|
||||
return data.group
|
||||
return result.group as TabGroup
|
||||
}
|
||||
|
||||
const result = await cdp.send('Browser.createTabGroup', {
|
||||
const result = await cdp.Browser.createTabGroup({
|
||||
tabIds,
|
||||
...(opts?.title !== undefined && { title: opts.title }),
|
||||
})
|
||||
const data = result as { group: TabGroup }
|
||||
return data.group
|
||||
return result.group as TabGroup
|
||||
}
|
||||
|
||||
export async function updateTabGroup(
|
||||
@@ -42,24 +39,20 @@ export async function updateTabGroup(
|
||||
groupId: string,
|
||||
opts: { title?: string; color?: string; collapsed?: boolean },
|
||||
): Promise<TabGroup> {
|
||||
const result = await cdp.send('Browser.updateTabGroup', {
|
||||
groupId,
|
||||
...opts,
|
||||
})
|
||||
const data = result as { group: TabGroup }
|
||||
return data.group
|
||||
const result = await cdp.Browser.updateTabGroup({ groupId, ...opts })
|
||||
return result.group as TabGroup
|
||||
}
|
||||
|
||||
export async function ungroupTabs(
|
||||
cdp: CdpBackend,
|
||||
tabIds: number[],
|
||||
): Promise<void> {
|
||||
await cdp.send('Browser.removeTabsFromGroup', { tabIds })
|
||||
await cdp.Browser.removeTabsFromGroup({ tabIds })
|
||||
}
|
||||
|
||||
export async function closeTabGroup(
|
||||
cdp: CdpBackend,
|
||||
groupId: string,
|
||||
): Promise<void> {
|
||||
await cdp.send('Browser.closeTabGroup', { groupId })
|
||||
await cdp.Browser.closeTabGroup({ groupId })
|
||||
}
|
||||
|
||||
8
bun.lock
8
bun.lock
@@ -7,6 +7,7 @@
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.3.14",
|
||||
"@sentry/cli": "^2.42.2",
|
||||
"@types/bun": "^1.3.5",
|
||||
"@types/node": "^24.3.3",
|
||||
"dotenv": "^17.2.3",
|
||||
"globals": "^16.4.0",
|
||||
@@ -152,6 +153,7 @@
|
||||
"@ai-sdk/openai-compatible": "^2.0.30",
|
||||
"@ai-sdk/provider": "^3.0.8",
|
||||
"@browseros-ai/agent-sdk": "workspace:*",
|
||||
"@browseros/cdp-protocol": "workspace:*",
|
||||
"@browseros/shared": "workspace:*",
|
||||
"@google/gemini-cli-core": "^0.16.0",
|
||||
"@google/genai": "1.30.0",
|
||||
@@ -209,6 +211,10 @@
|
||||
"zod": "^3.x",
|
||||
},
|
||||
},
|
||||
"packages/cdp-protocol": {
|
||||
"name": "@browseros/cdp-protocol",
|
||||
"version": "0.0.1",
|
||||
},
|
||||
"packages/shared": {
|
||||
"name": "@browseros/shared",
|
||||
"version": "0.0.1",
|
||||
@@ -420,6 +426,8 @@
|
||||
|
||||
"@browseros/agent": ["@browseros/agent@workspace:apps/agent"],
|
||||
|
||||
"@browseros/cdp-protocol": ["@browseros/cdp-protocol@workspace:packages/cdp-protocol"],
|
||||
|
||||
"@browseros/server": ["@browseros/server@workspace:apps/server"],
|
||||
|
||||
"@browseros/shared": ["@browseros/shared@workspace:packages/shared"],
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"typecheck": "bun run --filter '*' typecheck",
|
||||
"lint": "bunx biome check",
|
||||
"lint:fix": "bunx biome check --write --unsafe",
|
||||
"gen:cdp": "bun scripts/codegen/cdp-protocol.ts",
|
||||
"clean": "rimraf dist"
|
||||
},
|
||||
"repository": "browseros-ai/BrowserOS-server",
|
||||
@@ -40,6 +41,7 @@
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.3.14",
|
||||
"@sentry/cli": "^2.42.2",
|
||||
"@types/bun": "^1.3.5",
|
||||
"@types/node": "^24.3.3",
|
||||
"dotenv": "^17.2.3",
|
||||
"globals": "^16.4.0",
|
||||
|
||||
458
packages/cdp-protocol/package.json
Normal file
458
packages/cdp-protocol/package.json
Normal file
@@ -0,0 +1,458 @@
|
||||
{
|
||||
"name": "@browseros/cdp-protocol",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"exports": {
|
||||
"./domains/accessibility": {
|
||||
"types": "./src/generated/domains/accessibility.ts",
|
||||
"default": "./src/generated/domains/accessibility.ts"
|
||||
},
|
||||
"./domain-apis/accessibility": {
|
||||
"types": "./src/generated/domain-apis/accessibility.ts",
|
||||
"default": "./src/generated/domain-apis/accessibility.ts"
|
||||
},
|
||||
"./domains/animation": {
|
||||
"types": "./src/generated/domains/animation.ts",
|
||||
"default": "./src/generated/domains/animation.ts"
|
||||
},
|
||||
"./domain-apis/animation": {
|
||||
"types": "./src/generated/domain-apis/animation.ts",
|
||||
"default": "./src/generated/domain-apis/animation.ts"
|
||||
},
|
||||
"./domains/audits": {
|
||||
"types": "./src/generated/domains/audits.ts",
|
||||
"default": "./src/generated/domains/audits.ts"
|
||||
},
|
||||
"./domain-apis/audits": {
|
||||
"types": "./src/generated/domain-apis/audits.ts",
|
||||
"default": "./src/generated/domain-apis/audits.ts"
|
||||
},
|
||||
"./domains/autofill": {
|
||||
"types": "./src/generated/domains/autofill.ts",
|
||||
"default": "./src/generated/domains/autofill.ts"
|
||||
},
|
||||
"./domain-apis/autofill": {
|
||||
"types": "./src/generated/domain-apis/autofill.ts",
|
||||
"default": "./src/generated/domain-apis/autofill.ts"
|
||||
},
|
||||
"./domains/bookmarks": {
|
||||
"types": "./src/generated/domains/bookmarks.ts",
|
||||
"default": "./src/generated/domains/bookmarks.ts"
|
||||
},
|
||||
"./domain-apis/bookmarks": {
|
||||
"types": "./src/generated/domain-apis/bookmarks.ts",
|
||||
"default": "./src/generated/domain-apis/bookmarks.ts"
|
||||
},
|
||||
"./domains/background-service": {
|
||||
"types": "./src/generated/domains/background-service.ts",
|
||||
"default": "./src/generated/domains/background-service.ts"
|
||||
},
|
||||
"./domain-apis/background-service": {
|
||||
"types": "./src/generated/domain-apis/background-service.ts",
|
||||
"default": "./src/generated/domain-apis/background-service.ts"
|
||||
},
|
||||
"./domains/bluetooth-emulation": {
|
||||
"types": "./src/generated/domains/bluetooth-emulation.ts",
|
||||
"default": "./src/generated/domains/bluetooth-emulation.ts"
|
||||
},
|
||||
"./domain-apis/bluetooth-emulation": {
|
||||
"types": "./src/generated/domain-apis/bluetooth-emulation.ts",
|
||||
"default": "./src/generated/domain-apis/bluetooth-emulation.ts"
|
||||
},
|
||||
"./domains/browser": {
|
||||
"types": "./src/generated/domains/browser.ts",
|
||||
"default": "./src/generated/domains/browser.ts"
|
||||
},
|
||||
"./domain-apis/browser": {
|
||||
"types": "./src/generated/domain-apis/browser.ts",
|
||||
"default": "./src/generated/domain-apis/browser.ts"
|
||||
},
|
||||
"./domains/css": {
|
||||
"types": "./src/generated/domains/css.ts",
|
||||
"default": "./src/generated/domains/css.ts"
|
||||
},
|
||||
"./domain-apis/css": {
|
||||
"types": "./src/generated/domain-apis/css.ts",
|
||||
"default": "./src/generated/domain-apis/css.ts"
|
||||
},
|
||||
"./domains/cache-storage": {
|
||||
"types": "./src/generated/domains/cache-storage.ts",
|
||||
"default": "./src/generated/domains/cache-storage.ts"
|
||||
},
|
||||
"./domain-apis/cache-storage": {
|
||||
"types": "./src/generated/domain-apis/cache-storage.ts",
|
||||
"default": "./src/generated/domain-apis/cache-storage.ts"
|
||||
},
|
||||
"./domains/cast": {
|
||||
"types": "./src/generated/domains/cast.ts",
|
||||
"default": "./src/generated/domains/cast.ts"
|
||||
},
|
||||
"./domain-apis/cast": {
|
||||
"types": "./src/generated/domain-apis/cast.ts",
|
||||
"default": "./src/generated/domain-apis/cast.ts"
|
||||
},
|
||||
"./domains/dom": {
|
||||
"types": "./src/generated/domains/dom.ts",
|
||||
"default": "./src/generated/domains/dom.ts"
|
||||
},
|
||||
"./domain-apis/dom": {
|
||||
"types": "./src/generated/domain-apis/dom.ts",
|
||||
"default": "./src/generated/domain-apis/dom.ts"
|
||||
},
|
||||
"./domains/dom-debugger": {
|
||||
"types": "./src/generated/domains/dom-debugger.ts",
|
||||
"default": "./src/generated/domains/dom-debugger.ts"
|
||||
},
|
||||
"./domain-apis/dom-debugger": {
|
||||
"types": "./src/generated/domain-apis/dom-debugger.ts",
|
||||
"default": "./src/generated/domain-apis/dom-debugger.ts"
|
||||
},
|
||||
"./domains/dom-snapshot": {
|
||||
"types": "./src/generated/domains/dom-snapshot.ts",
|
||||
"default": "./src/generated/domains/dom-snapshot.ts"
|
||||
},
|
||||
"./domain-apis/dom-snapshot": {
|
||||
"types": "./src/generated/domain-apis/dom-snapshot.ts",
|
||||
"default": "./src/generated/domain-apis/dom-snapshot.ts"
|
||||
},
|
||||
"./domains/dom-storage": {
|
||||
"types": "./src/generated/domains/dom-storage.ts",
|
||||
"default": "./src/generated/domains/dom-storage.ts"
|
||||
},
|
||||
"./domain-apis/dom-storage": {
|
||||
"types": "./src/generated/domain-apis/dom-storage.ts",
|
||||
"default": "./src/generated/domain-apis/dom-storage.ts"
|
||||
},
|
||||
"./domains/device-access": {
|
||||
"types": "./src/generated/domains/device-access.ts",
|
||||
"default": "./src/generated/domains/device-access.ts"
|
||||
},
|
||||
"./domain-apis/device-access": {
|
||||
"types": "./src/generated/domain-apis/device-access.ts",
|
||||
"default": "./src/generated/domain-apis/device-access.ts"
|
||||
},
|
||||
"./domains/device-orientation": {
|
||||
"types": "./src/generated/domains/device-orientation.ts",
|
||||
"default": "./src/generated/domains/device-orientation.ts"
|
||||
},
|
||||
"./domain-apis/device-orientation": {
|
||||
"types": "./src/generated/domain-apis/device-orientation.ts",
|
||||
"default": "./src/generated/domain-apis/device-orientation.ts"
|
||||
},
|
||||
"./domains/emulation": {
|
||||
"types": "./src/generated/domains/emulation.ts",
|
||||
"default": "./src/generated/domains/emulation.ts"
|
||||
},
|
||||
"./domain-apis/emulation": {
|
||||
"types": "./src/generated/domain-apis/emulation.ts",
|
||||
"default": "./src/generated/domain-apis/emulation.ts"
|
||||
},
|
||||
"./domains/event-breakpoints": {
|
||||
"types": "./src/generated/domains/event-breakpoints.ts",
|
||||
"default": "./src/generated/domains/event-breakpoints.ts"
|
||||
},
|
||||
"./domain-apis/event-breakpoints": {
|
||||
"types": "./src/generated/domain-apis/event-breakpoints.ts",
|
||||
"default": "./src/generated/domain-apis/event-breakpoints.ts"
|
||||
},
|
||||
"./domains/extensions": {
|
||||
"types": "./src/generated/domains/extensions.ts",
|
||||
"default": "./src/generated/domains/extensions.ts"
|
||||
},
|
||||
"./domain-apis/extensions": {
|
||||
"types": "./src/generated/domain-apis/extensions.ts",
|
||||
"default": "./src/generated/domain-apis/extensions.ts"
|
||||
},
|
||||
"./domains/fed-cm": {
|
||||
"types": "./src/generated/domains/fed-cm.ts",
|
||||
"default": "./src/generated/domains/fed-cm.ts"
|
||||
},
|
||||
"./domain-apis/fed-cm": {
|
||||
"types": "./src/generated/domain-apis/fed-cm.ts",
|
||||
"default": "./src/generated/domain-apis/fed-cm.ts"
|
||||
},
|
||||
"./domains/fetch": {
|
||||
"types": "./src/generated/domains/fetch.ts",
|
||||
"default": "./src/generated/domains/fetch.ts"
|
||||
},
|
||||
"./domain-apis/fetch": {
|
||||
"types": "./src/generated/domain-apis/fetch.ts",
|
||||
"default": "./src/generated/domain-apis/fetch.ts"
|
||||
},
|
||||
"./domains/file-system": {
|
||||
"types": "./src/generated/domains/file-system.ts",
|
||||
"default": "./src/generated/domains/file-system.ts"
|
||||
},
|
||||
"./domain-apis/file-system": {
|
||||
"types": "./src/generated/domain-apis/file-system.ts",
|
||||
"default": "./src/generated/domain-apis/file-system.ts"
|
||||
},
|
||||
"./domains/headless-experimental": {
|
||||
"types": "./src/generated/domains/headless-experimental.ts",
|
||||
"default": "./src/generated/domains/headless-experimental.ts"
|
||||
},
|
||||
"./domain-apis/headless-experimental": {
|
||||
"types": "./src/generated/domain-apis/headless-experimental.ts",
|
||||
"default": "./src/generated/domain-apis/headless-experimental.ts"
|
||||
},
|
||||
"./domains/history": {
|
||||
"types": "./src/generated/domains/history.ts",
|
||||
"default": "./src/generated/domains/history.ts"
|
||||
},
|
||||
"./domain-apis/history": {
|
||||
"types": "./src/generated/domain-apis/history.ts",
|
||||
"default": "./src/generated/domain-apis/history.ts"
|
||||
},
|
||||
"./domains/io": {
|
||||
"types": "./src/generated/domains/io.ts",
|
||||
"default": "./src/generated/domains/io.ts"
|
||||
},
|
||||
"./domain-apis/io": {
|
||||
"types": "./src/generated/domain-apis/io.ts",
|
||||
"default": "./src/generated/domain-apis/io.ts"
|
||||
},
|
||||
"./domains/indexed-db": {
|
||||
"types": "./src/generated/domains/indexed-db.ts",
|
||||
"default": "./src/generated/domains/indexed-db.ts"
|
||||
},
|
||||
"./domain-apis/indexed-db": {
|
||||
"types": "./src/generated/domain-apis/indexed-db.ts",
|
||||
"default": "./src/generated/domain-apis/indexed-db.ts"
|
||||
},
|
||||
"./domains/input": {
|
||||
"types": "./src/generated/domains/input.ts",
|
||||
"default": "./src/generated/domains/input.ts"
|
||||
},
|
||||
"./domain-apis/input": {
|
||||
"types": "./src/generated/domain-apis/input.ts",
|
||||
"default": "./src/generated/domain-apis/input.ts"
|
||||
},
|
||||
"./domains/inspector": {
|
||||
"types": "./src/generated/domains/inspector.ts",
|
||||
"default": "./src/generated/domains/inspector.ts"
|
||||
},
|
||||
"./domain-apis/inspector": {
|
||||
"types": "./src/generated/domain-apis/inspector.ts",
|
||||
"default": "./src/generated/domain-apis/inspector.ts"
|
||||
},
|
||||
"./domains/layer-tree": {
|
||||
"types": "./src/generated/domains/layer-tree.ts",
|
||||
"default": "./src/generated/domains/layer-tree.ts"
|
||||
},
|
||||
"./domain-apis/layer-tree": {
|
||||
"types": "./src/generated/domain-apis/layer-tree.ts",
|
||||
"default": "./src/generated/domain-apis/layer-tree.ts"
|
||||
},
|
||||
"./domains/log": {
|
||||
"types": "./src/generated/domains/log.ts",
|
||||
"default": "./src/generated/domains/log.ts"
|
||||
},
|
||||
"./domain-apis/log": {
|
||||
"types": "./src/generated/domain-apis/log.ts",
|
||||
"default": "./src/generated/domain-apis/log.ts"
|
||||
},
|
||||
"./domains/media": {
|
||||
"types": "./src/generated/domains/media.ts",
|
||||
"default": "./src/generated/domains/media.ts"
|
||||
},
|
||||
"./domain-apis/media": {
|
||||
"types": "./src/generated/domain-apis/media.ts",
|
||||
"default": "./src/generated/domain-apis/media.ts"
|
||||
},
|
||||
"./domains/memory": {
|
||||
"types": "./src/generated/domains/memory.ts",
|
||||
"default": "./src/generated/domains/memory.ts"
|
||||
},
|
||||
"./domain-apis/memory": {
|
||||
"types": "./src/generated/domain-apis/memory.ts",
|
||||
"default": "./src/generated/domain-apis/memory.ts"
|
||||
},
|
||||
"./domains/network": {
|
||||
"types": "./src/generated/domains/network.ts",
|
||||
"default": "./src/generated/domains/network.ts"
|
||||
},
|
||||
"./domain-apis/network": {
|
||||
"types": "./src/generated/domain-apis/network.ts",
|
||||
"default": "./src/generated/domain-apis/network.ts"
|
||||
},
|
||||
"./domains/overlay": {
|
||||
"types": "./src/generated/domains/overlay.ts",
|
||||
"default": "./src/generated/domains/overlay.ts"
|
||||
},
|
||||
"./domain-apis/overlay": {
|
||||
"types": "./src/generated/domain-apis/overlay.ts",
|
||||
"default": "./src/generated/domain-apis/overlay.ts"
|
||||
},
|
||||
"./domains/pwa": {
|
||||
"types": "./src/generated/domains/pwa.ts",
|
||||
"default": "./src/generated/domains/pwa.ts"
|
||||
},
|
||||
"./domain-apis/pwa": {
|
||||
"types": "./src/generated/domain-apis/pwa.ts",
|
||||
"default": "./src/generated/domain-apis/pwa.ts"
|
||||
},
|
||||
"./domains/page": {
|
||||
"types": "./src/generated/domains/page.ts",
|
||||
"default": "./src/generated/domains/page.ts"
|
||||
},
|
||||
"./domain-apis/page": {
|
||||
"types": "./src/generated/domain-apis/page.ts",
|
||||
"default": "./src/generated/domain-apis/page.ts"
|
||||
},
|
||||
"./domains/performance": {
|
||||
"types": "./src/generated/domains/performance.ts",
|
||||
"default": "./src/generated/domains/performance.ts"
|
||||
},
|
||||
"./domain-apis/performance": {
|
||||
"types": "./src/generated/domain-apis/performance.ts",
|
||||
"default": "./src/generated/domain-apis/performance.ts"
|
||||
},
|
||||
"./domains/performance-timeline": {
|
||||
"types": "./src/generated/domains/performance-timeline.ts",
|
||||
"default": "./src/generated/domains/performance-timeline.ts"
|
||||
},
|
||||
"./domain-apis/performance-timeline": {
|
||||
"types": "./src/generated/domain-apis/performance-timeline.ts",
|
||||
"default": "./src/generated/domain-apis/performance-timeline.ts"
|
||||
},
|
||||
"./domains/preload": {
|
||||
"types": "./src/generated/domains/preload.ts",
|
||||
"default": "./src/generated/domains/preload.ts"
|
||||
},
|
||||
"./domain-apis/preload": {
|
||||
"types": "./src/generated/domain-apis/preload.ts",
|
||||
"default": "./src/generated/domain-apis/preload.ts"
|
||||
},
|
||||
"./domains/security": {
|
||||
"types": "./src/generated/domains/security.ts",
|
||||
"default": "./src/generated/domains/security.ts"
|
||||
},
|
||||
"./domain-apis/security": {
|
||||
"types": "./src/generated/domain-apis/security.ts",
|
||||
"default": "./src/generated/domain-apis/security.ts"
|
||||
},
|
||||
"./domains/service-worker": {
|
||||
"types": "./src/generated/domains/service-worker.ts",
|
||||
"default": "./src/generated/domains/service-worker.ts"
|
||||
},
|
||||
"./domain-apis/service-worker": {
|
||||
"types": "./src/generated/domain-apis/service-worker.ts",
|
||||
"default": "./src/generated/domain-apis/service-worker.ts"
|
||||
},
|
||||
"./domains/storage": {
|
||||
"types": "./src/generated/domains/storage.ts",
|
||||
"default": "./src/generated/domains/storage.ts"
|
||||
},
|
||||
"./domain-apis/storage": {
|
||||
"types": "./src/generated/domain-apis/storage.ts",
|
||||
"default": "./src/generated/domain-apis/storage.ts"
|
||||
},
|
||||
"./domains/system-info": {
|
||||
"types": "./src/generated/domains/system-info.ts",
|
||||
"default": "./src/generated/domains/system-info.ts"
|
||||
},
|
||||
"./domain-apis/system-info": {
|
||||
"types": "./src/generated/domain-apis/system-info.ts",
|
||||
"default": "./src/generated/domain-apis/system-info.ts"
|
||||
},
|
||||
"./domains/target": {
|
||||
"types": "./src/generated/domains/target.ts",
|
||||
"default": "./src/generated/domains/target.ts"
|
||||
},
|
||||
"./domain-apis/target": {
|
||||
"types": "./src/generated/domain-apis/target.ts",
|
||||
"default": "./src/generated/domain-apis/target.ts"
|
||||
},
|
||||
"./domains/tethering": {
|
||||
"types": "./src/generated/domains/tethering.ts",
|
||||
"default": "./src/generated/domains/tethering.ts"
|
||||
},
|
||||
"./domain-apis/tethering": {
|
||||
"types": "./src/generated/domain-apis/tethering.ts",
|
||||
"default": "./src/generated/domain-apis/tethering.ts"
|
||||
},
|
||||
"./domains/tracing": {
|
||||
"types": "./src/generated/domains/tracing.ts",
|
||||
"default": "./src/generated/domains/tracing.ts"
|
||||
},
|
||||
"./domain-apis/tracing": {
|
||||
"types": "./src/generated/domain-apis/tracing.ts",
|
||||
"default": "./src/generated/domain-apis/tracing.ts"
|
||||
},
|
||||
"./domains/web-audio": {
|
||||
"types": "./src/generated/domains/web-audio.ts",
|
||||
"default": "./src/generated/domains/web-audio.ts"
|
||||
},
|
||||
"./domain-apis/web-audio": {
|
||||
"types": "./src/generated/domain-apis/web-audio.ts",
|
||||
"default": "./src/generated/domain-apis/web-audio.ts"
|
||||
},
|
||||
"./domains/web-authn": {
|
||||
"types": "./src/generated/domains/web-authn.ts",
|
||||
"default": "./src/generated/domains/web-authn.ts"
|
||||
},
|
||||
"./domain-apis/web-authn": {
|
||||
"types": "./src/generated/domain-apis/web-authn.ts",
|
||||
"default": "./src/generated/domain-apis/web-authn.ts"
|
||||
},
|
||||
"./domains/console": {
|
||||
"types": "./src/generated/domains/console.ts",
|
||||
"default": "./src/generated/domains/console.ts"
|
||||
},
|
||||
"./domain-apis/console": {
|
||||
"types": "./src/generated/domain-apis/console.ts",
|
||||
"default": "./src/generated/domain-apis/console.ts"
|
||||
},
|
||||
"./domains/debugger": {
|
||||
"types": "./src/generated/domains/debugger.ts",
|
||||
"default": "./src/generated/domains/debugger.ts"
|
||||
},
|
||||
"./domain-apis/debugger": {
|
||||
"types": "./src/generated/domain-apis/debugger.ts",
|
||||
"default": "./src/generated/domain-apis/debugger.ts"
|
||||
},
|
||||
"./domains/heap-profiler": {
|
||||
"types": "./src/generated/domains/heap-profiler.ts",
|
||||
"default": "./src/generated/domains/heap-profiler.ts"
|
||||
},
|
||||
"./domain-apis/heap-profiler": {
|
||||
"types": "./src/generated/domain-apis/heap-profiler.ts",
|
||||
"default": "./src/generated/domain-apis/heap-profiler.ts"
|
||||
},
|
||||
"./domains/profiler": {
|
||||
"types": "./src/generated/domains/profiler.ts",
|
||||
"default": "./src/generated/domains/profiler.ts"
|
||||
},
|
||||
"./domain-apis/profiler": {
|
||||
"types": "./src/generated/domain-apis/profiler.ts",
|
||||
"default": "./src/generated/domain-apis/profiler.ts"
|
||||
},
|
||||
"./domains/runtime": {
|
||||
"types": "./src/generated/domains/runtime.ts",
|
||||
"default": "./src/generated/domains/runtime.ts"
|
||||
},
|
||||
"./domain-apis/runtime": {
|
||||
"types": "./src/generated/domain-apis/runtime.ts",
|
||||
"default": "./src/generated/domain-apis/runtime.ts"
|
||||
},
|
||||
"./domains/schema": {
|
||||
"types": "./src/generated/domains/schema.ts",
|
||||
"default": "./src/generated/domains/schema.ts"
|
||||
},
|
||||
"./domain-apis/schema": {
|
||||
"types": "./src/generated/domain-apis/schema.ts",
|
||||
"default": "./src/generated/domain-apis/schema.ts"
|
||||
},
|
||||
"./protocol-api": {
|
||||
"types": "./src/generated/protocol-api.ts",
|
||||
"default": "./src/generated/protocol-api.ts"
|
||||
},
|
||||
"./create-api": {
|
||||
"types": "./src/generated/create-api.ts",
|
||||
"default": "./src/generated/create-api.ts"
|
||||
}
|
||||
}
|
||||
}
|
||||
86
packages/cdp-protocol/src/generated/create-api.ts
Normal file
86
packages/cdp-protocol/src/generated/create-api.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { ProtocolApi } from './protocol-api'
|
||||
|
||||
export type RawSend = (
|
||||
method: string,
|
||||
params?: Record<string, unknown>,
|
||||
) => Promise<unknown>
|
||||
|
||||
export type RawOn = (
|
||||
event: string,
|
||||
handler: (params: unknown) => void,
|
||||
) => () => void
|
||||
|
||||
function createDomainProxy(domain: string, send: RawSend, on: RawOn): unknown {
|
||||
return new Proxy(Object.create(null), {
|
||||
get(_, method: string) {
|
||||
if (method === 'on') {
|
||||
return (event: string, handler: (params: unknown) => void) =>
|
||||
on(`${domain}.${event}`, handler)
|
||||
}
|
||||
return (params?: Record<string, unknown>) =>
|
||||
send(`${domain}.${method}`, params)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export function createProtocolApi(send: RawSend, on: RawOn): ProtocolApi {
|
||||
return {
|
||||
Accessibility: createDomainProxy('Accessibility', send, on),
|
||||
Animation: createDomainProxy('Animation', send, on),
|
||||
Audits: createDomainProxy('Audits', send, on),
|
||||
Autofill: createDomainProxy('Autofill', send, on),
|
||||
Bookmarks: createDomainProxy('Bookmarks', send, on),
|
||||
BackgroundService: createDomainProxy('BackgroundService', send, on),
|
||||
BluetoothEmulation: createDomainProxy('BluetoothEmulation', send, on),
|
||||
Browser: createDomainProxy('Browser', send, on),
|
||||
CSS: createDomainProxy('CSS', send, on),
|
||||
CacheStorage: createDomainProxy('CacheStorage', send, on),
|
||||
Cast: createDomainProxy('Cast', send, on),
|
||||
DOM: createDomainProxy('DOM', send, on),
|
||||
DOMDebugger: createDomainProxy('DOMDebugger', send, on),
|
||||
DOMSnapshot: createDomainProxy('DOMSnapshot', send, on),
|
||||
DOMStorage: createDomainProxy('DOMStorage', send, on),
|
||||
DeviceAccess: createDomainProxy('DeviceAccess', send, on),
|
||||
DeviceOrientation: createDomainProxy('DeviceOrientation', send, on),
|
||||
Emulation: createDomainProxy('Emulation', send, on),
|
||||
EventBreakpoints: createDomainProxy('EventBreakpoints', send, on),
|
||||
Extensions: createDomainProxy('Extensions', send, on),
|
||||
FedCm: createDomainProxy('FedCm', send, on),
|
||||
Fetch: createDomainProxy('Fetch', send, on),
|
||||
FileSystem: createDomainProxy('FileSystem', send, on),
|
||||
HeadlessExperimental: createDomainProxy('HeadlessExperimental', send, on),
|
||||
History: createDomainProxy('History', send, on),
|
||||
IO: createDomainProxy('IO', send, on),
|
||||
IndexedDB: createDomainProxy('IndexedDB', send, on),
|
||||
Input: createDomainProxy('Input', send, on),
|
||||
Inspector: createDomainProxy('Inspector', send, on),
|
||||
LayerTree: createDomainProxy('LayerTree', send, on),
|
||||
Log: createDomainProxy('Log', send, on),
|
||||
Media: createDomainProxy('Media', send, on),
|
||||
Memory: createDomainProxy('Memory', send, on),
|
||||
Network: createDomainProxy('Network', send, on),
|
||||
Overlay: createDomainProxy('Overlay', send, on),
|
||||
PWA: createDomainProxy('PWA', send, on),
|
||||
Page: createDomainProxy('Page', send, on),
|
||||
Performance: createDomainProxy('Performance', send, on),
|
||||
PerformanceTimeline: createDomainProxy('PerformanceTimeline', send, on),
|
||||
Preload: createDomainProxy('Preload', send, on),
|
||||
Security: createDomainProxy('Security', send, on),
|
||||
ServiceWorker: createDomainProxy('ServiceWorker', send, on),
|
||||
Storage: createDomainProxy('Storage', send, on),
|
||||
SystemInfo: createDomainProxy('SystemInfo', send, on),
|
||||
Target: createDomainProxy('Target', send, on),
|
||||
Tethering: createDomainProxy('Tethering', send, on),
|
||||
Tracing: createDomainProxy('Tracing', send, on),
|
||||
WebAudio: createDomainProxy('WebAudio', send, on),
|
||||
WebAuthn: createDomainProxy('WebAuthn', send, on),
|
||||
Console: createDomainProxy('Console', send, on),
|
||||
Debugger: createDomainProxy('Debugger', send, on),
|
||||
HeapProfiler: createDomainProxy('HeapProfiler', send, on),
|
||||
Profiler: createDomainProxy('Profiler', send, on),
|
||||
Runtime: createDomainProxy('Runtime', send, on),
|
||||
Schema: createDomainProxy('Schema', send, on),
|
||||
} as unknown as ProtocolApi
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
GetAXNodeAndAncestorsParams,
|
||||
GetAXNodeAndAncestorsResult,
|
||||
GetChildAXNodesParams,
|
||||
GetChildAXNodesResult,
|
||||
GetFullAXTreeParams,
|
||||
GetFullAXTreeResult,
|
||||
GetPartialAXTreeParams,
|
||||
GetPartialAXTreeResult,
|
||||
GetRootAXNodeParams,
|
||||
GetRootAXNodeResult,
|
||||
LoadCompleteEvent,
|
||||
NodesUpdatedEvent,
|
||||
QueryAXTreeParams,
|
||||
QueryAXTreeResult,
|
||||
} from '../domains/accessibility'
|
||||
|
||||
export interface AccessibilityApi {
|
||||
// ── Commands ──
|
||||
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
getPartialAXTree(
|
||||
params?: GetPartialAXTreeParams,
|
||||
): Promise<GetPartialAXTreeResult>
|
||||
getFullAXTree(params?: GetFullAXTreeParams): Promise<GetFullAXTreeResult>
|
||||
getRootAXNode(params?: GetRootAXNodeParams): Promise<GetRootAXNodeResult>
|
||||
getAXNodeAndAncestors(
|
||||
params?: GetAXNodeAndAncestorsParams,
|
||||
): Promise<GetAXNodeAndAncestorsResult>
|
||||
getChildAXNodes(params: GetChildAXNodesParams): Promise<GetChildAXNodesResult>
|
||||
queryAXTree(params?: QueryAXTreeParams): Promise<QueryAXTreeResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'loadComplete',
|
||||
handler: (params: LoadCompleteEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'nodesUpdated',
|
||||
handler: (params: NodesUpdatedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
54
packages/cdp-protocol/src/generated/domain-apis/animation.ts
Normal file
54
packages/cdp-protocol/src/generated/domain-apis/animation.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AnimationCanceledEvent,
|
||||
AnimationCreatedEvent,
|
||||
AnimationStartedEvent,
|
||||
AnimationUpdatedEvent,
|
||||
GetCurrentTimeParams,
|
||||
GetCurrentTimeResult,
|
||||
GetPlaybackRateResult,
|
||||
ReleaseAnimationsParams,
|
||||
ResolveAnimationParams,
|
||||
ResolveAnimationResult,
|
||||
SeekAnimationsParams,
|
||||
SetPausedParams,
|
||||
SetPlaybackRateParams,
|
||||
SetTimingParams,
|
||||
} from '../domains/animation'
|
||||
|
||||
export interface AnimationApi {
|
||||
// ── Commands ──
|
||||
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
getCurrentTime(params: GetCurrentTimeParams): Promise<GetCurrentTimeResult>
|
||||
getPlaybackRate(): Promise<GetPlaybackRateResult>
|
||||
releaseAnimations(params: ReleaseAnimationsParams): Promise<void>
|
||||
resolveAnimation(
|
||||
params: ResolveAnimationParams,
|
||||
): Promise<ResolveAnimationResult>
|
||||
seekAnimations(params: SeekAnimationsParams): Promise<void>
|
||||
setPaused(params: SetPausedParams): Promise<void>
|
||||
setPlaybackRate(params: SetPlaybackRateParams): Promise<void>
|
||||
setTiming(params: SetTimingParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'animationCanceled',
|
||||
handler: (params: AnimationCanceledEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'animationCreated',
|
||||
handler: (params: AnimationCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'animationStarted',
|
||||
handler: (params: AnimationStartedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'animationUpdated',
|
||||
handler: (params: AnimationUpdatedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
28
packages/cdp-protocol/src/generated/domain-apis/audits.ts
Normal file
28
packages/cdp-protocol/src/generated/domain-apis/audits.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
CheckContrastParams,
|
||||
CheckFormsIssuesResult,
|
||||
GetEncodedResponseParams,
|
||||
GetEncodedResponseResult,
|
||||
IssueAddedEvent,
|
||||
} from '../domains/audits'
|
||||
|
||||
export interface AuditsApi {
|
||||
// ── Commands ──
|
||||
|
||||
getEncodedResponse(
|
||||
params: GetEncodedResponseParams,
|
||||
): Promise<GetEncodedResponseResult>
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
checkContrast(params?: CheckContrastParams): Promise<void>
|
||||
checkFormsIssues(): Promise<CheckFormsIssuesResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'issueAdded',
|
||||
handler: (params: IssueAddedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
23
packages/cdp-protocol/src/generated/domain-apis/autofill.ts
Normal file
23
packages/cdp-protocol/src/generated/domain-apis/autofill.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AddressFormFilledEvent,
|
||||
SetAddressesParams,
|
||||
TriggerParams,
|
||||
} from '../domains/autofill'
|
||||
|
||||
export interface AutofillApi {
|
||||
// ── Commands ──
|
||||
|
||||
trigger(params: TriggerParams): Promise<void>
|
||||
setAddresses(params: SetAddressesParams): Promise<void>
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'addressFormFilled',
|
||||
handler: (params: AddressFormFilledEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
BackgroundServiceEventReceivedEvent,
|
||||
ClearEventsParams,
|
||||
RecordingStateChangedEvent,
|
||||
SetRecordingParams,
|
||||
StartObservingParams,
|
||||
StopObservingParams,
|
||||
} from '../domains/background-service'
|
||||
|
||||
export interface BackgroundServiceApi {
|
||||
// ── Commands ──
|
||||
|
||||
startObserving(params: StartObservingParams): Promise<void>
|
||||
stopObserving(params: StopObservingParams): Promise<void>
|
||||
setRecording(params: SetRecordingParams): Promise<void>
|
||||
clearEvents(params: ClearEventsParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'recordingStateChanged',
|
||||
handler: (params: RecordingStateChangedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'backgroundServiceEventReceived',
|
||||
handler: (params: BackgroundServiceEventReceivedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AddCharacteristicParams,
|
||||
AddCharacteristicResult,
|
||||
AddDescriptorParams,
|
||||
AddDescriptorResult,
|
||||
AddServiceParams,
|
||||
AddServiceResult,
|
||||
CharacteristicOperationReceivedEvent,
|
||||
DescriptorOperationReceivedEvent,
|
||||
EnableParams,
|
||||
GattOperationReceivedEvent,
|
||||
RemoveCharacteristicParams,
|
||||
RemoveDescriptorParams,
|
||||
RemoveServiceParams,
|
||||
SetSimulatedCentralStateParams,
|
||||
SimulateAdvertisementParams,
|
||||
SimulateCharacteristicOperationResponseParams,
|
||||
SimulateDescriptorOperationResponseParams,
|
||||
SimulateGATTDisconnectionParams,
|
||||
SimulateGATTOperationResponseParams,
|
||||
SimulatePreconnectedPeripheralParams,
|
||||
} from '../domains/bluetooth-emulation'
|
||||
|
||||
export interface BluetoothEmulationApi {
|
||||
// ── Commands ──
|
||||
|
||||
enable(params: EnableParams): Promise<void>
|
||||
setSimulatedCentralState(
|
||||
params: SetSimulatedCentralStateParams,
|
||||
): Promise<void>
|
||||
disable(): Promise<void>
|
||||
simulatePreconnectedPeripheral(
|
||||
params: SimulatePreconnectedPeripheralParams,
|
||||
): Promise<void>
|
||||
simulateAdvertisement(params: SimulateAdvertisementParams): Promise<void>
|
||||
simulateGATTOperationResponse(
|
||||
params: SimulateGATTOperationResponseParams,
|
||||
): Promise<void>
|
||||
simulateCharacteristicOperationResponse(
|
||||
params: SimulateCharacteristicOperationResponseParams,
|
||||
): Promise<void>
|
||||
simulateDescriptorOperationResponse(
|
||||
params: SimulateDescriptorOperationResponseParams,
|
||||
): Promise<void>
|
||||
addService(params: AddServiceParams): Promise<AddServiceResult>
|
||||
removeService(params: RemoveServiceParams): Promise<void>
|
||||
addCharacteristic(
|
||||
params: AddCharacteristicParams,
|
||||
): Promise<AddCharacteristicResult>
|
||||
removeCharacteristic(params: RemoveCharacteristicParams): Promise<void>
|
||||
addDescriptor(params: AddDescriptorParams): Promise<AddDescriptorResult>
|
||||
removeDescriptor(params: RemoveDescriptorParams): Promise<void>
|
||||
simulateGATTDisconnection(
|
||||
params: SimulateGATTDisconnectionParams,
|
||||
): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'gattOperationReceived',
|
||||
handler: (params: GattOperationReceivedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'characteristicOperationReceived',
|
||||
handler: (params: CharacteristicOperationReceivedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'descriptorOperationReceived',
|
||||
handler: (params: DescriptorOperationReceivedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
26
packages/cdp-protocol/src/generated/domain-apis/bookmarks.ts
Normal file
26
packages/cdp-protocol/src/generated/domain-apis/bookmarks.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
CreateBookmarkParams,
|
||||
CreateBookmarkResult,
|
||||
GetBookmarksParams,
|
||||
GetBookmarksResult,
|
||||
MoveBookmarkParams,
|
||||
MoveBookmarkResult,
|
||||
RemoveBookmarkParams,
|
||||
SearchBookmarksParams,
|
||||
SearchBookmarksResult,
|
||||
UpdateBookmarkParams,
|
||||
UpdateBookmarkResult,
|
||||
} from '../domains/bookmarks'
|
||||
|
||||
export interface BookmarksApi {
|
||||
// ── Commands ──
|
||||
|
||||
getBookmarks(params?: GetBookmarksParams): Promise<GetBookmarksResult>
|
||||
searchBookmarks(params: SearchBookmarksParams): Promise<SearchBookmarksResult>
|
||||
createBookmark(params: CreateBookmarkParams): Promise<CreateBookmarkResult>
|
||||
updateBookmark(params: UpdateBookmarkParams): Promise<UpdateBookmarkResult>
|
||||
moveBookmark(params: MoveBookmarkParams): Promise<MoveBookmarkResult>
|
||||
removeBookmark(params: RemoveBookmarkParams): Promise<void>
|
||||
}
|
||||
145
packages/cdp-protocol/src/generated/domain-apis/browser.ts
Normal file
145
packages/cdp-protocol/src/generated/domain-apis/browser.ts
Normal file
@@ -0,0 +1,145 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
ActivateTabParams,
|
||||
ActivateWindowParams,
|
||||
AddPrivacySandboxCoordinatorKeyConfigParams,
|
||||
AddPrivacySandboxEnrollmentOverrideParams,
|
||||
AddTabsToGroupParams,
|
||||
AddTabsToGroupResult,
|
||||
CancelDownloadParams,
|
||||
CloseTabGroupParams,
|
||||
CloseTabParams,
|
||||
CloseWindowParams,
|
||||
CreateTabGroupParams,
|
||||
CreateTabGroupResult,
|
||||
CreateTabParams,
|
||||
CreateTabResult,
|
||||
CreateWindowParams,
|
||||
CreateWindowResult,
|
||||
DownloadProgressEvent,
|
||||
DownloadWillBeginEvent,
|
||||
DuplicateTabParams,
|
||||
DuplicateTabResult,
|
||||
ExecuteBrowserCommandParams,
|
||||
GetActiveTabParams,
|
||||
GetActiveTabResult,
|
||||
GetActiveWindowResult,
|
||||
GetBrowserCommandLineResult,
|
||||
GetHistogramParams,
|
||||
GetHistogramResult,
|
||||
GetHistogramsParams,
|
||||
GetHistogramsResult,
|
||||
GetTabForTargetParams,
|
||||
GetTabForTargetResult,
|
||||
GetTabGroupsParams,
|
||||
GetTabGroupsResult,
|
||||
GetTabInfoParams,
|
||||
GetTabInfoResult,
|
||||
GetTabsParams,
|
||||
GetTabsResult,
|
||||
GetTargetForTabParams,
|
||||
GetTargetForTabResult,
|
||||
GetVersionResult,
|
||||
GetWindowBoundsParams,
|
||||
GetWindowBoundsResult,
|
||||
GetWindowForTargetParams,
|
||||
GetWindowForTargetResult,
|
||||
GetWindowsResult,
|
||||
GrantPermissionsParams,
|
||||
HideTabParams,
|
||||
HideTabResult,
|
||||
HideWindowParams,
|
||||
MoveTabGroupParams,
|
||||
MoveTabGroupResult,
|
||||
MoveTabParams,
|
||||
MoveTabResult,
|
||||
PinTabParams,
|
||||
PinTabResult,
|
||||
RemoveTabsFromGroupParams,
|
||||
ResetPermissionsParams,
|
||||
SetContentsSizeParams,
|
||||
SetDockTileParams,
|
||||
SetDownloadBehaviorParams,
|
||||
SetPermissionParams,
|
||||
SetWindowBoundsParams,
|
||||
ShowTabParams,
|
||||
ShowTabResult,
|
||||
ShowWindowParams,
|
||||
UnpinTabParams,
|
||||
UnpinTabResult,
|
||||
UpdateTabGroupParams,
|
||||
UpdateTabGroupResult,
|
||||
} from '../domains/browser'
|
||||
|
||||
export interface BrowserApi {
|
||||
// ── Commands ──
|
||||
|
||||
getWindows(): Promise<GetWindowsResult>
|
||||
getActiveWindow(): Promise<GetActiveWindowResult>
|
||||
createWindow(params?: CreateWindowParams): Promise<CreateWindowResult>
|
||||
closeWindow(params: CloseWindowParams): Promise<void>
|
||||
activateWindow(params: ActivateWindowParams): Promise<void>
|
||||
showWindow(params: ShowWindowParams): Promise<void>
|
||||
hideWindow(params: HideWindowParams): Promise<void>
|
||||
getTabs(params?: GetTabsParams): Promise<GetTabsResult>
|
||||
getActiveTab(params?: GetActiveTabParams): Promise<GetActiveTabResult>
|
||||
getTabInfo(params?: GetTabInfoParams): Promise<GetTabInfoResult>
|
||||
createTab(params?: CreateTabParams): Promise<CreateTabResult>
|
||||
closeTab(params?: CloseTabParams): Promise<void>
|
||||
activateTab(params?: ActivateTabParams): Promise<void>
|
||||
moveTab(params?: MoveTabParams): Promise<MoveTabResult>
|
||||
duplicateTab(params?: DuplicateTabParams): Promise<DuplicateTabResult>
|
||||
pinTab(params?: PinTabParams): Promise<PinTabResult>
|
||||
unpinTab(params?: UnpinTabParams): Promise<UnpinTabResult>
|
||||
showTab(params?: ShowTabParams): Promise<ShowTabResult>
|
||||
hideTab(params?: HideTabParams): Promise<HideTabResult>
|
||||
getTabGroups(params?: GetTabGroupsParams): Promise<GetTabGroupsResult>
|
||||
createTabGroup(params: CreateTabGroupParams): Promise<CreateTabGroupResult>
|
||||
updateTabGroup(params: UpdateTabGroupParams): Promise<UpdateTabGroupResult>
|
||||
closeTabGroup(params: CloseTabGroupParams): Promise<void>
|
||||
addTabsToGroup(params: AddTabsToGroupParams): Promise<AddTabsToGroupResult>
|
||||
removeTabsFromGroup(params: RemoveTabsFromGroupParams): Promise<void>
|
||||
moveTabGroup(params: MoveTabGroupParams): Promise<MoveTabGroupResult>
|
||||
setPermission(params: SetPermissionParams): Promise<void>
|
||||
grantPermissions(params: GrantPermissionsParams): Promise<void>
|
||||
resetPermissions(params?: ResetPermissionsParams): Promise<void>
|
||||
setDownloadBehavior(params: SetDownloadBehaviorParams): Promise<void>
|
||||
cancelDownload(params: CancelDownloadParams): Promise<void>
|
||||
close(): Promise<void>
|
||||
crash(): Promise<void>
|
||||
crashGpuProcess(): Promise<void>
|
||||
getVersion(): Promise<GetVersionResult>
|
||||
getBrowserCommandLine(): Promise<GetBrowserCommandLineResult>
|
||||
getHistograms(params?: GetHistogramsParams): Promise<GetHistogramsResult>
|
||||
getHistogram(params: GetHistogramParams): Promise<GetHistogramResult>
|
||||
getWindowBounds(params: GetWindowBoundsParams): Promise<GetWindowBoundsResult>
|
||||
getWindowForTarget(
|
||||
params?: GetWindowForTargetParams,
|
||||
): Promise<GetWindowForTargetResult>
|
||||
getTabForTarget(
|
||||
params?: GetTabForTargetParams,
|
||||
): Promise<GetTabForTargetResult>
|
||||
getTargetForTab(params: GetTargetForTabParams): Promise<GetTargetForTabResult>
|
||||
setWindowBounds(params: SetWindowBoundsParams): Promise<void>
|
||||
setContentsSize(params: SetContentsSizeParams): Promise<void>
|
||||
setDockTile(params?: SetDockTileParams): Promise<void>
|
||||
executeBrowserCommand(params: ExecuteBrowserCommandParams): Promise<void>
|
||||
addPrivacySandboxEnrollmentOverride(
|
||||
params: AddPrivacySandboxEnrollmentOverrideParams,
|
||||
): Promise<void>
|
||||
addPrivacySandboxCoordinatorKeyConfig(
|
||||
params: AddPrivacySandboxCoordinatorKeyConfigParams,
|
||||
): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'downloadWillBegin',
|
||||
handler: (params: DownloadWillBeginEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'downloadProgress',
|
||||
handler: (params: DownloadProgressEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
DeleteCacheParams,
|
||||
DeleteEntryParams,
|
||||
RequestCachedResponseParams,
|
||||
RequestCachedResponseResult,
|
||||
RequestCacheNamesParams,
|
||||
RequestCacheNamesResult,
|
||||
RequestEntriesParams,
|
||||
RequestEntriesResult,
|
||||
} from '../domains/cache-storage'
|
||||
|
||||
export interface CacheStorageApi {
|
||||
// ── Commands ──
|
||||
|
||||
deleteCache(params: DeleteCacheParams): Promise<void>
|
||||
deleteEntry(params: DeleteEntryParams): Promise<void>
|
||||
requestCacheNames(
|
||||
params?: RequestCacheNamesParams,
|
||||
): Promise<RequestCacheNamesResult>
|
||||
requestCachedResponse(
|
||||
params: RequestCachedResponseParams,
|
||||
): Promise<RequestCachedResponseResult>
|
||||
requestEntries(params: RequestEntriesParams): Promise<RequestEntriesResult>
|
||||
}
|
||||
33
packages/cdp-protocol/src/generated/domain-apis/cast.ts
Normal file
33
packages/cdp-protocol/src/generated/domain-apis/cast.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
EnableParams,
|
||||
IssueUpdatedEvent,
|
||||
SetSinkToUseParams,
|
||||
SinksUpdatedEvent,
|
||||
StartDesktopMirroringParams,
|
||||
StartTabMirroringParams,
|
||||
StopCastingParams,
|
||||
} from '../domains/cast'
|
||||
|
||||
export interface CastApi {
|
||||
// ── Commands ──
|
||||
|
||||
enable(params?: EnableParams): Promise<void>
|
||||
disable(): Promise<void>
|
||||
setSinkToUse(params: SetSinkToUseParams): Promise<void>
|
||||
startDesktopMirroring(params: StartDesktopMirroringParams): Promise<void>
|
||||
startTabMirroring(params: StartTabMirroringParams): Promise<void>
|
||||
stopCasting(params: StopCastingParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'sinksUpdated',
|
||||
handler: (params: SinksUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'issueUpdated',
|
||||
handler: (params: IssueUpdatedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
18
packages/cdp-protocol/src/generated/domain-apis/console.ts
Normal file
18
packages/cdp-protocol/src/generated/domain-apis/console.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { MessageAddedEvent } from '../domains/console'
|
||||
|
||||
export interface ConsoleApi {
|
||||
// ── Commands ──
|
||||
|
||||
clearMessages(): Promise<void>
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'messageAdded',
|
||||
handler: (params: MessageAddedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
168
packages/cdp-protocol/src/generated/domain-apis/css.ts
Normal file
168
packages/cdp-protocol/src/generated/domain-apis/css.ts
Normal file
@@ -0,0 +1,168 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AddRuleParams,
|
||||
AddRuleResult,
|
||||
CollectClassNamesParams,
|
||||
CollectClassNamesResult,
|
||||
ComputedStyleUpdatedEvent,
|
||||
CreateStyleSheetParams,
|
||||
CreateStyleSheetResult,
|
||||
FontsUpdatedEvent,
|
||||
ForcePseudoStateParams,
|
||||
ForceStartingStyleParams,
|
||||
GetAnimatedStylesForNodeParams,
|
||||
GetAnimatedStylesForNodeResult,
|
||||
GetBackgroundColorsParams,
|
||||
GetBackgroundColorsResult,
|
||||
GetComputedStyleForNodeParams,
|
||||
GetComputedStyleForNodeResult,
|
||||
GetEnvironmentVariablesResult,
|
||||
GetInlineStylesForNodeParams,
|
||||
GetInlineStylesForNodeResult,
|
||||
GetLayersForNodeParams,
|
||||
GetLayersForNodeResult,
|
||||
GetLocationForSelectorParams,
|
||||
GetLocationForSelectorResult,
|
||||
GetLonghandPropertiesParams,
|
||||
GetLonghandPropertiesResult,
|
||||
GetMatchedStylesForNodeParams,
|
||||
GetMatchedStylesForNodeResult,
|
||||
GetMediaQueriesResult,
|
||||
GetPlatformFontsForNodeParams,
|
||||
GetPlatformFontsForNodeResult,
|
||||
GetStyleSheetTextParams,
|
||||
GetStyleSheetTextResult,
|
||||
ResolveValuesParams,
|
||||
ResolveValuesResult,
|
||||
SetContainerQueryTextParams,
|
||||
SetContainerQueryTextResult,
|
||||
SetEffectivePropertyValueForNodeParams,
|
||||
SetKeyframeKeyParams,
|
||||
SetKeyframeKeyResult,
|
||||
SetLocalFontsEnabledParams,
|
||||
SetMediaTextParams,
|
||||
SetMediaTextResult,
|
||||
SetPropertyRulePropertyNameParams,
|
||||
SetPropertyRulePropertyNameResult,
|
||||
SetRuleSelectorParams,
|
||||
SetRuleSelectorResult,
|
||||
SetScopeTextParams,
|
||||
SetScopeTextResult,
|
||||
SetStyleSheetTextParams,
|
||||
SetStyleSheetTextResult,
|
||||
SetStyleTextsParams,
|
||||
SetStyleTextsResult,
|
||||
SetSupportsTextParams,
|
||||
SetSupportsTextResult,
|
||||
StopRuleUsageTrackingResult,
|
||||
StyleSheetAddedEvent,
|
||||
StyleSheetChangedEvent,
|
||||
StyleSheetRemovedEvent,
|
||||
TakeComputedStyleUpdatesResult,
|
||||
TakeCoverageDeltaResult,
|
||||
TrackComputedStyleUpdatesForNodeParams,
|
||||
TrackComputedStyleUpdatesParams,
|
||||
} from '../domains/css'
|
||||
|
||||
export interface CSSApi {
|
||||
// ── Commands ──
|
||||
|
||||
addRule(params: AddRuleParams): Promise<AddRuleResult>
|
||||
collectClassNames(
|
||||
params: CollectClassNamesParams,
|
||||
): Promise<CollectClassNamesResult>
|
||||
createStyleSheet(
|
||||
params: CreateStyleSheetParams,
|
||||
): Promise<CreateStyleSheetResult>
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
forcePseudoState(params: ForcePseudoStateParams): Promise<void>
|
||||
forceStartingStyle(params: ForceStartingStyleParams): Promise<void>
|
||||
getBackgroundColors(
|
||||
params: GetBackgroundColorsParams,
|
||||
): Promise<GetBackgroundColorsResult>
|
||||
getComputedStyleForNode(
|
||||
params: GetComputedStyleForNodeParams,
|
||||
): Promise<GetComputedStyleForNodeResult>
|
||||
resolveValues(params: ResolveValuesParams): Promise<ResolveValuesResult>
|
||||
getLonghandProperties(
|
||||
params: GetLonghandPropertiesParams,
|
||||
): Promise<GetLonghandPropertiesResult>
|
||||
getInlineStylesForNode(
|
||||
params: GetInlineStylesForNodeParams,
|
||||
): Promise<GetInlineStylesForNodeResult>
|
||||
getAnimatedStylesForNode(
|
||||
params: GetAnimatedStylesForNodeParams,
|
||||
): Promise<GetAnimatedStylesForNodeResult>
|
||||
getMatchedStylesForNode(
|
||||
params: GetMatchedStylesForNodeParams,
|
||||
): Promise<GetMatchedStylesForNodeResult>
|
||||
getEnvironmentVariables(): Promise<GetEnvironmentVariablesResult>
|
||||
getMediaQueries(): Promise<GetMediaQueriesResult>
|
||||
getPlatformFontsForNode(
|
||||
params: GetPlatformFontsForNodeParams,
|
||||
): Promise<GetPlatformFontsForNodeResult>
|
||||
getStyleSheetText(
|
||||
params: GetStyleSheetTextParams,
|
||||
): Promise<GetStyleSheetTextResult>
|
||||
getLayersForNode(
|
||||
params: GetLayersForNodeParams,
|
||||
): Promise<GetLayersForNodeResult>
|
||||
getLocationForSelector(
|
||||
params: GetLocationForSelectorParams,
|
||||
): Promise<GetLocationForSelectorResult>
|
||||
trackComputedStyleUpdatesForNode(
|
||||
params?: TrackComputedStyleUpdatesForNodeParams,
|
||||
): Promise<void>
|
||||
trackComputedStyleUpdates(
|
||||
params: TrackComputedStyleUpdatesParams,
|
||||
): Promise<void>
|
||||
takeComputedStyleUpdates(): Promise<TakeComputedStyleUpdatesResult>
|
||||
setEffectivePropertyValueForNode(
|
||||
params: SetEffectivePropertyValueForNodeParams,
|
||||
): Promise<void>
|
||||
setPropertyRulePropertyName(
|
||||
params: SetPropertyRulePropertyNameParams,
|
||||
): Promise<SetPropertyRulePropertyNameResult>
|
||||
setKeyframeKey(params: SetKeyframeKeyParams): Promise<SetKeyframeKeyResult>
|
||||
setMediaText(params: SetMediaTextParams): Promise<SetMediaTextResult>
|
||||
setContainerQueryText(
|
||||
params: SetContainerQueryTextParams,
|
||||
): Promise<SetContainerQueryTextResult>
|
||||
setSupportsText(params: SetSupportsTextParams): Promise<SetSupportsTextResult>
|
||||
setScopeText(params: SetScopeTextParams): Promise<SetScopeTextResult>
|
||||
setRuleSelector(params: SetRuleSelectorParams): Promise<SetRuleSelectorResult>
|
||||
setStyleSheetText(
|
||||
params: SetStyleSheetTextParams,
|
||||
): Promise<SetStyleSheetTextResult>
|
||||
setStyleTexts(params: SetStyleTextsParams): Promise<SetStyleTextsResult>
|
||||
startRuleUsageTracking(): Promise<void>
|
||||
stopRuleUsageTracking(): Promise<StopRuleUsageTrackingResult>
|
||||
takeCoverageDelta(): Promise<TakeCoverageDeltaResult>
|
||||
setLocalFontsEnabled(params: SetLocalFontsEnabledParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'fontsUpdated',
|
||||
handler: (params: FontsUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(event: 'mediaQueryResultChanged', handler: () => void): () => void
|
||||
on(
|
||||
event: 'styleSheetAdded',
|
||||
handler: (params: StyleSheetAddedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'styleSheetChanged',
|
||||
handler: (params: StyleSheetChangedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'styleSheetRemoved',
|
||||
handler: (params: StyleSheetRemovedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'computedStyleUpdated',
|
||||
handler: (params: ComputedStyleUpdatedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
124
packages/cdp-protocol/src/generated/domain-apis/debugger.ts
Normal file
124
packages/cdp-protocol/src/generated/domain-apis/debugger.ts
Normal file
@@ -0,0 +1,124 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
BreakpointResolvedEvent,
|
||||
ContinueToLocationParams,
|
||||
DisassembleWasmModuleParams,
|
||||
DisassembleWasmModuleResult,
|
||||
EnableParams,
|
||||
EnableResult,
|
||||
EvaluateOnCallFrameParams,
|
||||
EvaluateOnCallFrameResult,
|
||||
GetPossibleBreakpointsParams,
|
||||
GetPossibleBreakpointsResult,
|
||||
GetScriptSourceParams,
|
||||
GetScriptSourceResult,
|
||||
GetStackTraceParams,
|
||||
GetStackTraceResult,
|
||||
GetWasmBytecodeParams,
|
||||
GetWasmBytecodeResult,
|
||||
NextWasmDisassemblyChunkParams,
|
||||
NextWasmDisassemblyChunkResult,
|
||||
PausedEvent,
|
||||
PauseOnAsyncCallParams,
|
||||
RemoveBreakpointParams,
|
||||
RestartFrameParams,
|
||||
RestartFrameResult,
|
||||
ResumeParams,
|
||||
ScriptFailedToParseEvent,
|
||||
ScriptParsedEvent,
|
||||
SearchInContentParams,
|
||||
SearchInContentResult,
|
||||
SetAsyncCallStackDepthParams,
|
||||
SetBlackboxExecutionContextsParams,
|
||||
SetBlackboxedRangesParams,
|
||||
SetBlackboxPatternsParams,
|
||||
SetBreakpointByUrlParams,
|
||||
SetBreakpointByUrlResult,
|
||||
SetBreakpointOnFunctionCallParams,
|
||||
SetBreakpointOnFunctionCallResult,
|
||||
SetBreakpointParams,
|
||||
SetBreakpointResult,
|
||||
SetBreakpointsActiveParams,
|
||||
SetInstrumentationBreakpointParams,
|
||||
SetInstrumentationBreakpointResult,
|
||||
SetPauseOnExceptionsParams,
|
||||
SetReturnValueParams,
|
||||
SetScriptSourceParams,
|
||||
SetScriptSourceResult,
|
||||
SetSkipAllPausesParams,
|
||||
SetVariableValueParams,
|
||||
StepIntoParams,
|
||||
StepOverParams,
|
||||
} from '../domains/debugger'
|
||||
|
||||
export interface DebuggerApi {
|
||||
// ── Commands ──
|
||||
|
||||
continueToLocation(params: ContinueToLocationParams): Promise<void>
|
||||
disable(): Promise<void>
|
||||
enable(params?: EnableParams): Promise<EnableResult>
|
||||
evaluateOnCallFrame(
|
||||
params: EvaluateOnCallFrameParams,
|
||||
): Promise<EvaluateOnCallFrameResult>
|
||||
getPossibleBreakpoints(
|
||||
params: GetPossibleBreakpointsParams,
|
||||
): Promise<GetPossibleBreakpointsResult>
|
||||
getScriptSource(params: GetScriptSourceParams): Promise<GetScriptSourceResult>
|
||||
disassembleWasmModule(
|
||||
params: DisassembleWasmModuleParams,
|
||||
): Promise<DisassembleWasmModuleResult>
|
||||
nextWasmDisassemblyChunk(
|
||||
params: NextWasmDisassemblyChunkParams,
|
||||
): Promise<NextWasmDisassemblyChunkResult>
|
||||
getWasmBytecode(params: GetWasmBytecodeParams): Promise<GetWasmBytecodeResult>
|
||||
getStackTrace(params: GetStackTraceParams): Promise<GetStackTraceResult>
|
||||
pause(): Promise<void>
|
||||
pauseOnAsyncCall(params: PauseOnAsyncCallParams): Promise<void>
|
||||
removeBreakpoint(params: RemoveBreakpointParams): Promise<void>
|
||||
restartFrame(params: RestartFrameParams): Promise<RestartFrameResult>
|
||||
resume(params?: ResumeParams): Promise<void>
|
||||
searchInContent(params: SearchInContentParams): Promise<SearchInContentResult>
|
||||
setAsyncCallStackDepth(params: SetAsyncCallStackDepthParams): Promise<void>
|
||||
setBlackboxExecutionContexts(
|
||||
params: SetBlackboxExecutionContextsParams,
|
||||
): Promise<void>
|
||||
setBlackboxPatterns(params: SetBlackboxPatternsParams): Promise<void>
|
||||
setBlackboxedRanges(params: SetBlackboxedRangesParams): Promise<void>
|
||||
setBreakpoint(params: SetBreakpointParams): Promise<SetBreakpointResult>
|
||||
setInstrumentationBreakpoint(
|
||||
params: SetInstrumentationBreakpointParams,
|
||||
): Promise<SetInstrumentationBreakpointResult>
|
||||
setBreakpointByUrl(
|
||||
params: SetBreakpointByUrlParams,
|
||||
): Promise<SetBreakpointByUrlResult>
|
||||
setBreakpointOnFunctionCall(
|
||||
params: SetBreakpointOnFunctionCallParams,
|
||||
): Promise<SetBreakpointOnFunctionCallResult>
|
||||
setBreakpointsActive(params: SetBreakpointsActiveParams): Promise<void>
|
||||
setPauseOnExceptions(params: SetPauseOnExceptionsParams): Promise<void>
|
||||
setReturnValue(params: SetReturnValueParams): Promise<void>
|
||||
setScriptSource(params: SetScriptSourceParams): Promise<SetScriptSourceResult>
|
||||
setSkipAllPauses(params: SetSkipAllPausesParams): Promise<void>
|
||||
setVariableValue(params: SetVariableValueParams): Promise<void>
|
||||
stepInto(params?: StepIntoParams): Promise<void>
|
||||
stepOut(): Promise<void>
|
||||
stepOver(params?: StepOverParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'breakpointResolved',
|
||||
handler: (params: BreakpointResolvedEvent) => void,
|
||||
): () => void
|
||||
on(event: 'paused', handler: (params: PausedEvent) => void): () => void
|
||||
on(event: 'resumed', handler: () => void): () => void
|
||||
on(
|
||||
event: 'scriptFailedToParse',
|
||||
handler: (params: ScriptFailedToParseEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'scriptParsed',
|
||||
handler: (params: ScriptParsedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
CancelPromptParams,
|
||||
DeviceRequestPromptedEvent,
|
||||
SelectPromptParams,
|
||||
} from '../domains/device-access'
|
||||
|
||||
export interface DeviceAccessApi {
|
||||
// ── Commands ──
|
||||
|
||||
enable(): Promise<void>
|
||||
disable(): Promise<void>
|
||||
selectPrompt(params: SelectPromptParams): Promise<void>
|
||||
cancelPrompt(params: CancelPromptParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'deviceRequestPrompted',
|
||||
handler: (params: DeviceRequestPromptedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { SetDeviceOrientationOverrideParams } from '../domains/device-orientation'
|
||||
|
||||
export interface DeviceOrientationApi {
|
||||
// ── Commands ──
|
||||
|
||||
clearDeviceOrientationOverride(): Promise<void>
|
||||
setDeviceOrientationOverride(
|
||||
params: SetDeviceOrientationOverrideParams,
|
||||
): Promise<void>
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
GetEventListenersParams,
|
||||
GetEventListenersResult,
|
||||
RemoveDOMBreakpointParams,
|
||||
RemoveEventListenerBreakpointParams,
|
||||
RemoveInstrumentationBreakpointParams,
|
||||
RemoveXHRBreakpointParams,
|
||||
SetBreakOnCSPViolationParams,
|
||||
SetDOMBreakpointParams,
|
||||
SetEventListenerBreakpointParams,
|
||||
SetInstrumentationBreakpointParams,
|
||||
SetXHRBreakpointParams,
|
||||
} from '../domains/dom-debugger'
|
||||
|
||||
export interface DOMDebuggerApi {
|
||||
// ── Commands ──
|
||||
|
||||
getEventListeners(
|
||||
params: GetEventListenersParams,
|
||||
): Promise<GetEventListenersResult>
|
||||
removeDOMBreakpoint(params: RemoveDOMBreakpointParams): Promise<void>
|
||||
removeEventListenerBreakpoint(
|
||||
params: RemoveEventListenerBreakpointParams,
|
||||
): Promise<void>
|
||||
removeInstrumentationBreakpoint(
|
||||
params: RemoveInstrumentationBreakpointParams,
|
||||
): Promise<void>
|
||||
removeXHRBreakpoint(params: RemoveXHRBreakpointParams): Promise<void>
|
||||
setBreakOnCSPViolation(params: SetBreakOnCSPViolationParams): Promise<void>
|
||||
setDOMBreakpoint(params: SetDOMBreakpointParams): Promise<void>
|
||||
setEventListenerBreakpoint(
|
||||
params: SetEventListenerBreakpointParams,
|
||||
): Promise<void>
|
||||
setInstrumentationBreakpoint(
|
||||
params: SetInstrumentationBreakpointParams,
|
||||
): Promise<void>
|
||||
setXHRBreakpoint(params: SetXHRBreakpointParams): Promise<void>
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
CaptureSnapshotParams,
|
||||
CaptureSnapshotResult,
|
||||
GetSnapshotParams,
|
||||
GetSnapshotResult,
|
||||
} from '../domains/dom-snapshot'
|
||||
|
||||
export interface DOMSnapshotApi {
|
||||
// ── Commands ──
|
||||
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
getSnapshot(params: GetSnapshotParams): Promise<GetSnapshotResult>
|
||||
captureSnapshot(params: CaptureSnapshotParams): Promise<CaptureSnapshotResult>
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
ClearParams,
|
||||
DomStorageItemAddedEvent,
|
||||
DomStorageItemRemovedEvent,
|
||||
DomStorageItemsClearedEvent,
|
||||
DomStorageItemUpdatedEvent,
|
||||
GetDOMStorageItemsParams,
|
||||
GetDOMStorageItemsResult,
|
||||
RemoveDOMStorageItemParams,
|
||||
SetDOMStorageItemParams,
|
||||
} from '../domains/dom-storage'
|
||||
|
||||
export interface DOMStorageApi {
|
||||
// ── Commands ──
|
||||
|
||||
clear(params: ClearParams): Promise<void>
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
getDOMStorageItems(
|
||||
params: GetDOMStorageItemsParams,
|
||||
): Promise<GetDOMStorageItemsResult>
|
||||
removeDOMStorageItem(params: RemoveDOMStorageItemParams): Promise<void>
|
||||
setDOMStorageItem(params: SetDOMStorageItemParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'domStorageItemAdded',
|
||||
handler: (params: DomStorageItemAddedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'domStorageItemRemoved',
|
||||
handler: (params: DomStorageItemRemovedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'domStorageItemUpdated',
|
||||
handler: (params: DomStorageItemUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'domStorageItemsCleared',
|
||||
handler: (params: DomStorageItemsClearedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
257
packages/cdp-protocol/src/generated/domain-apis/dom.ts
Normal file
257
packages/cdp-protocol/src/generated/domain-apis/dom.ts
Normal file
@@ -0,0 +1,257 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AdoptedStyleSheetsModifiedEvent,
|
||||
AffectedByStartingStylesFlagUpdatedEvent,
|
||||
AttributeModifiedEvent,
|
||||
AttributeRemovedEvent,
|
||||
CharacterDataModifiedEvent,
|
||||
ChildNodeCountUpdatedEvent,
|
||||
ChildNodeInsertedEvent,
|
||||
ChildNodeRemovedEvent,
|
||||
CollectClassNamesFromSubtreeParams,
|
||||
CollectClassNamesFromSubtreeResult,
|
||||
CopyToParams,
|
||||
CopyToResult,
|
||||
DescribeNodeParams,
|
||||
DescribeNodeResult,
|
||||
DiscardSearchResultsParams,
|
||||
DistributedNodesUpdatedEvent,
|
||||
EnableParams,
|
||||
FocusParams,
|
||||
ForceShowPopoverParams,
|
||||
ForceShowPopoverResult,
|
||||
GetAnchorElementParams,
|
||||
GetAnchorElementResult,
|
||||
GetAttributesParams,
|
||||
GetAttributesResult,
|
||||
GetBoxModelParams,
|
||||
GetBoxModelResult,
|
||||
GetContainerForNodeParams,
|
||||
GetContainerForNodeResult,
|
||||
GetContentQuadsParams,
|
||||
GetContentQuadsResult,
|
||||
GetDetachedDomNodesResult,
|
||||
GetDocumentParams,
|
||||
GetDocumentResult,
|
||||
GetElementByRelationParams,
|
||||
GetElementByRelationResult,
|
||||
GetFileInfoParams,
|
||||
GetFileInfoResult,
|
||||
GetFlattenedDocumentParams,
|
||||
GetFlattenedDocumentResult,
|
||||
GetFrameOwnerParams,
|
||||
GetFrameOwnerResult,
|
||||
GetNodeForLocationParams,
|
||||
GetNodeForLocationResult,
|
||||
GetNodeStackTracesParams,
|
||||
GetNodeStackTracesResult,
|
||||
GetNodesForSubtreeByStyleParams,
|
||||
GetNodesForSubtreeByStyleResult,
|
||||
GetOuterHTMLParams,
|
||||
GetOuterHTMLResult,
|
||||
GetQueryingDescendantsForContainerParams,
|
||||
GetQueryingDescendantsForContainerResult,
|
||||
GetRelayoutBoundaryParams,
|
||||
GetRelayoutBoundaryResult,
|
||||
GetSearchResultsParams,
|
||||
GetSearchResultsResult,
|
||||
GetTopLayerElementsResult,
|
||||
InlineStyleInvalidatedEvent,
|
||||
MoveToParams,
|
||||
MoveToResult,
|
||||
PerformSearchParams,
|
||||
PerformSearchResult,
|
||||
PseudoElementAddedEvent,
|
||||
PseudoElementRemovedEvent,
|
||||
PushNodeByPathToFrontendParams,
|
||||
PushNodeByPathToFrontendResult,
|
||||
PushNodesByBackendIdsToFrontendParams,
|
||||
PushNodesByBackendIdsToFrontendResult,
|
||||
QuerySelectorAllParams,
|
||||
QuerySelectorAllResult,
|
||||
QuerySelectorParams,
|
||||
QuerySelectorResult,
|
||||
RemoveAttributeParams,
|
||||
RemoveNodeParams,
|
||||
RequestChildNodesParams,
|
||||
RequestNodeParams,
|
||||
RequestNodeResult,
|
||||
ResolveNodeParams,
|
||||
ResolveNodeResult,
|
||||
ScrollableFlagUpdatedEvent,
|
||||
ScrollIntoViewIfNeededParams,
|
||||
SetAttributesAsTextParams,
|
||||
SetAttributeValueParams,
|
||||
SetChildNodesEvent,
|
||||
SetFileInputFilesParams,
|
||||
SetInspectedNodeParams,
|
||||
SetNodeNameParams,
|
||||
SetNodeNameResult,
|
||||
SetNodeStackTracesEnabledParams,
|
||||
SetNodeValueParams,
|
||||
SetOuterHTMLParams,
|
||||
ShadowRootPoppedEvent,
|
||||
ShadowRootPushedEvent,
|
||||
} from '../domains/dom'
|
||||
|
||||
export interface DOMApi {
|
||||
// ── Commands ──
|
||||
|
||||
collectClassNamesFromSubtree(
|
||||
params: CollectClassNamesFromSubtreeParams,
|
||||
): Promise<CollectClassNamesFromSubtreeResult>
|
||||
copyTo(params: CopyToParams): Promise<CopyToResult>
|
||||
describeNode(params?: DescribeNodeParams): Promise<DescribeNodeResult>
|
||||
scrollIntoViewIfNeeded(params?: ScrollIntoViewIfNeededParams): Promise<void>
|
||||
disable(): Promise<void>
|
||||
discardSearchResults(params: DiscardSearchResultsParams): Promise<void>
|
||||
enable(params?: EnableParams): Promise<void>
|
||||
focus(params?: FocusParams): Promise<void>
|
||||
getAttributes(params: GetAttributesParams): Promise<GetAttributesResult>
|
||||
getBoxModel(params?: GetBoxModelParams): Promise<GetBoxModelResult>
|
||||
getContentQuads(
|
||||
params?: GetContentQuadsParams,
|
||||
): Promise<GetContentQuadsResult>
|
||||
getDocument(params?: GetDocumentParams): Promise<GetDocumentResult>
|
||||
getFlattenedDocument(
|
||||
params?: GetFlattenedDocumentParams,
|
||||
): Promise<GetFlattenedDocumentResult>
|
||||
getNodesForSubtreeByStyle(
|
||||
params: GetNodesForSubtreeByStyleParams,
|
||||
): Promise<GetNodesForSubtreeByStyleResult>
|
||||
getNodeForLocation(
|
||||
params: GetNodeForLocationParams,
|
||||
): Promise<GetNodeForLocationResult>
|
||||
getOuterHTML(params?: GetOuterHTMLParams): Promise<GetOuterHTMLResult>
|
||||
getRelayoutBoundary(
|
||||
params: GetRelayoutBoundaryParams,
|
||||
): Promise<GetRelayoutBoundaryResult>
|
||||
getSearchResults(
|
||||
params: GetSearchResultsParams,
|
||||
): Promise<GetSearchResultsResult>
|
||||
hideHighlight(): Promise<void>
|
||||
highlightNode(): Promise<void>
|
||||
highlightRect(): Promise<void>
|
||||
markUndoableState(): Promise<void>
|
||||
moveTo(params: MoveToParams): Promise<MoveToResult>
|
||||
performSearch(params: PerformSearchParams): Promise<PerformSearchResult>
|
||||
pushNodeByPathToFrontend(
|
||||
params: PushNodeByPathToFrontendParams,
|
||||
): Promise<PushNodeByPathToFrontendResult>
|
||||
pushNodesByBackendIdsToFrontend(
|
||||
params: PushNodesByBackendIdsToFrontendParams,
|
||||
): Promise<PushNodesByBackendIdsToFrontendResult>
|
||||
querySelector(params: QuerySelectorParams): Promise<QuerySelectorResult>
|
||||
querySelectorAll(
|
||||
params: QuerySelectorAllParams,
|
||||
): Promise<QuerySelectorAllResult>
|
||||
getTopLayerElements(): Promise<GetTopLayerElementsResult>
|
||||
getElementByRelation(
|
||||
params: GetElementByRelationParams,
|
||||
): Promise<GetElementByRelationResult>
|
||||
redo(): Promise<void>
|
||||
removeAttribute(params: RemoveAttributeParams): Promise<void>
|
||||
removeNode(params: RemoveNodeParams): Promise<void>
|
||||
requestChildNodes(params: RequestChildNodesParams): Promise<void>
|
||||
requestNode(params: RequestNodeParams): Promise<RequestNodeResult>
|
||||
resolveNode(params?: ResolveNodeParams): Promise<ResolveNodeResult>
|
||||
setAttributeValue(params: SetAttributeValueParams): Promise<void>
|
||||
setAttributesAsText(params: SetAttributesAsTextParams): Promise<void>
|
||||
setFileInputFiles(params: SetFileInputFilesParams): Promise<void>
|
||||
setNodeStackTracesEnabled(
|
||||
params: SetNodeStackTracesEnabledParams,
|
||||
): Promise<void>
|
||||
getNodeStackTraces(
|
||||
params: GetNodeStackTracesParams,
|
||||
): Promise<GetNodeStackTracesResult>
|
||||
getFileInfo(params: GetFileInfoParams): Promise<GetFileInfoResult>
|
||||
getDetachedDomNodes(): Promise<GetDetachedDomNodesResult>
|
||||
setInspectedNode(params: SetInspectedNodeParams): Promise<void>
|
||||
setNodeName(params: SetNodeNameParams): Promise<SetNodeNameResult>
|
||||
setNodeValue(params: SetNodeValueParams): Promise<void>
|
||||
setOuterHTML(params: SetOuterHTMLParams): Promise<void>
|
||||
undo(): Promise<void>
|
||||
getFrameOwner(params: GetFrameOwnerParams): Promise<GetFrameOwnerResult>
|
||||
getContainerForNode(
|
||||
params: GetContainerForNodeParams,
|
||||
): Promise<GetContainerForNodeResult>
|
||||
getQueryingDescendantsForContainer(
|
||||
params: GetQueryingDescendantsForContainerParams,
|
||||
): Promise<GetQueryingDescendantsForContainerResult>
|
||||
getAnchorElement(
|
||||
params: GetAnchorElementParams,
|
||||
): Promise<GetAnchorElementResult>
|
||||
forceShowPopover(
|
||||
params: ForceShowPopoverParams,
|
||||
): Promise<ForceShowPopoverResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'attributeModified',
|
||||
handler: (params: AttributeModifiedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'adoptedStyleSheetsModified',
|
||||
handler: (params: AdoptedStyleSheetsModifiedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'attributeRemoved',
|
||||
handler: (params: AttributeRemovedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'characterDataModified',
|
||||
handler: (params: CharacterDataModifiedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'childNodeCountUpdated',
|
||||
handler: (params: ChildNodeCountUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'childNodeInserted',
|
||||
handler: (params: ChildNodeInsertedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'childNodeRemoved',
|
||||
handler: (params: ChildNodeRemovedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'distributedNodesUpdated',
|
||||
handler: (params: DistributedNodesUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(event: 'documentUpdated', handler: () => void): () => void
|
||||
on(
|
||||
event: 'inlineStyleInvalidated',
|
||||
handler: (params: InlineStyleInvalidatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'pseudoElementAdded',
|
||||
handler: (params: PseudoElementAddedEvent) => void,
|
||||
): () => void
|
||||
on(event: 'topLayerElementsUpdated', handler: () => void): () => void
|
||||
on(
|
||||
event: 'scrollableFlagUpdated',
|
||||
handler: (params: ScrollableFlagUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'affectedByStartingStylesFlagUpdated',
|
||||
handler: (params: AffectedByStartingStylesFlagUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'pseudoElementRemoved',
|
||||
handler: (params: PseudoElementRemovedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'setChildNodes',
|
||||
handler: (params: SetChildNodesEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'shadowRootPopped',
|
||||
handler: (params: ShadowRootPoppedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'shadowRootPushed',
|
||||
handler: (params: ShadowRootPushedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
140
packages/cdp-protocol/src/generated/domain-apis/emulation.ts
Normal file
140
packages/cdp-protocol/src/generated/domain-apis/emulation.ts
Normal file
@@ -0,0 +1,140 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AddScreenParams,
|
||||
AddScreenResult,
|
||||
CanEmulateResult,
|
||||
GetOverriddenSensorInformationParams,
|
||||
GetOverriddenSensorInformationResult,
|
||||
GetScreenInfosResult,
|
||||
RemoveScreenParams,
|
||||
SetAutoDarkModeOverrideParams,
|
||||
SetAutomationOverrideParams,
|
||||
SetCPUThrottlingRateParams,
|
||||
SetDataSaverOverrideParams,
|
||||
SetDefaultBackgroundColorOverrideParams,
|
||||
SetDeviceMetricsOverrideParams,
|
||||
SetDevicePostureOverrideParams,
|
||||
SetDisabledImageTypesParams,
|
||||
SetDisplayFeaturesOverrideParams,
|
||||
SetDocumentCookieDisabledParams,
|
||||
SetEmitTouchEventsForMouseParams,
|
||||
SetEmulatedMediaParams,
|
||||
SetEmulatedOSTextScaleParams,
|
||||
SetEmulatedVisionDeficiencyParams,
|
||||
SetFocusEmulationEnabledParams,
|
||||
SetGeolocationOverrideParams,
|
||||
SetHardwareConcurrencyOverrideParams,
|
||||
SetIdleOverrideParams,
|
||||
SetLocaleOverrideParams,
|
||||
SetNavigatorOverridesParams,
|
||||
SetPageScaleFactorParams,
|
||||
SetPressureDataOverrideParams,
|
||||
SetPressureSourceOverrideEnabledParams,
|
||||
SetPressureStateOverrideParams,
|
||||
SetSafeAreaInsetsOverrideParams,
|
||||
SetScriptExecutionDisabledParams,
|
||||
SetScrollbarsHiddenParams,
|
||||
SetSensorOverrideEnabledParams,
|
||||
SetSensorOverrideReadingsParams,
|
||||
SetSmallViewportHeightDifferenceOverrideParams,
|
||||
SetTimezoneOverrideParams,
|
||||
SetTouchEmulationEnabledParams,
|
||||
SetUserAgentOverrideParams,
|
||||
SetVirtualTimePolicyParams,
|
||||
SetVirtualTimePolicyResult,
|
||||
SetVisibleSizeParams,
|
||||
} from '../domains/emulation'
|
||||
|
||||
export interface EmulationApi {
|
||||
// ── Commands ──
|
||||
|
||||
canEmulate(): Promise<CanEmulateResult>
|
||||
clearDeviceMetricsOverride(): Promise<void>
|
||||
clearGeolocationOverride(): Promise<void>
|
||||
resetPageScaleFactor(): Promise<void>
|
||||
setFocusEmulationEnabled(
|
||||
params: SetFocusEmulationEnabledParams,
|
||||
): Promise<void>
|
||||
setAutoDarkModeOverride(params?: SetAutoDarkModeOverrideParams): Promise<void>
|
||||
setCPUThrottlingRate(params: SetCPUThrottlingRateParams): Promise<void>
|
||||
setDefaultBackgroundColorOverride(
|
||||
params?: SetDefaultBackgroundColorOverrideParams,
|
||||
): Promise<void>
|
||||
setSafeAreaInsetsOverride(
|
||||
params: SetSafeAreaInsetsOverrideParams,
|
||||
): Promise<void>
|
||||
setDeviceMetricsOverride(
|
||||
params: SetDeviceMetricsOverrideParams,
|
||||
): Promise<void>
|
||||
setDevicePostureOverride(
|
||||
params: SetDevicePostureOverrideParams,
|
||||
): Promise<void>
|
||||
clearDevicePostureOverride(): Promise<void>
|
||||
setDisplayFeaturesOverride(
|
||||
params: SetDisplayFeaturesOverrideParams,
|
||||
): Promise<void>
|
||||
clearDisplayFeaturesOverride(): Promise<void>
|
||||
setScrollbarsHidden(params: SetScrollbarsHiddenParams): Promise<void>
|
||||
setDocumentCookieDisabled(
|
||||
params: SetDocumentCookieDisabledParams,
|
||||
): Promise<void>
|
||||
setEmitTouchEventsForMouse(
|
||||
params: SetEmitTouchEventsForMouseParams,
|
||||
): Promise<void>
|
||||
setEmulatedMedia(params?: SetEmulatedMediaParams): Promise<void>
|
||||
setEmulatedVisionDeficiency(
|
||||
params: SetEmulatedVisionDeficiencyParams,
|
||||
): Promise<void>
|
||||
setEmulatedOSTextScale(params?: SetEmulatedOSTextScaleParams): Promise<void>
|
||||
setGeolocationOverride(params?: SetGeolocationOverrideParams): Promise<void>
|
||||
getOverriddenSensorInformation(
|
||||
params: GetOverriddenSensorInformationParams,
|
||||
): Promise<GetOverriddenSensorInformationResult>
|
||||
setSensorOverrideEnabled(
|
||||
params: SetSensorOverrideEnabledParams,
|
||||
): Promise<void>
|
||||
setSensorOverrideReadings(
|
||||
params: SetSensorOverrideReadingsParams,
|
||||
): Promise<void>
|
||||
setPressureSourceOverrideEnabled(
|
||||
params: SetPressureSourceOverrideEnabledParams,
|
||||
): Promise<void>
|
||||
setPressureStateOverride(
|
||||
params: SetPressureStateOverrideParams,
|
||||
): Promise<void>
|
||||
setPressureDataOverride(params: SetPressureDataOverrideParams): Promise<void>
|
||||
setIdleOverride(params: SetIdleOverrideParams): Promise<void>
|
||||
clearIdleOverride(): Promise<void>
|
||||
setNavigatorOverrides(params: SetNavigatorOverridesParams): Promise<void>
|
||||
setPageScaleFactor(params: SetPageScaleFactorParams): Promise<void>
|
||||
setScriptExecutionDisabled(
|
||||
params: SetScriptExecutionDisabledParams,
|
||||
): Promise<void>
|
||||
setTouchEmulationEnabled(
|
||||
params: SetTouchEmulationEnabledParams,
|
||||
): Promise<void>
|
||||
setVirtualTimePolicy(
|
||||
params: SetVirtualTimePolicyParams,
|
||||
): Promise<SetVirtualTimePolicyResult>
|
||||
setLocaleOverride(params?: SetLocaleOverrideParams): Promise<void>
|
||||
setTimezoneOverride(params: SetTimezoneOverrideParams): Promise<void>
|
||||
setVisibleSize(params: SetVisibleSizeParams): Promise<void>
|
||||
setDisabledImageTypes(params: SetDisabledImageTypesParams): Promise<void>
|
||||
setDataSaverOverride(params?: SetDataSaverOverrideParams): Promise<void>
|
||||
setHardwareConcurrencyOverride(
|
||||
params: SetHardwareConcurrencyOverrideParams,
|
||||
): Promise<void>
|
||||
setUserAgentOverride(params: SetUserAgentOverrideParams): Promise<void>
|
||||
setAutomationOverride(params: SetAutomationOverrideParams): Promise<void>
|
||||
setSmallViewportHeightDifferenceOverride(
|
||||
params: SetSmallViewportHeightDifferenceOverrideParams,
|
||||
): Promise<void>
|
||||
getScreenInfos(): Promise<GetScreenInfosResult>
|
||||
addScreen(params: AddScreenParams): Promise<AddScreenResult>
|
||||
removeScreen(params: RemoveScreenParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(event: 'virtualTimeBudgetExpired', handler: () => void): () => void
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
RemoveInstrumentationBreakpointParams,
|
||||
SetInstrumentationBreakpointParams,
|
||||
} from '../domains/event-breakpoints'
|
||||
|
||||
export interface EventBreakpointsApi {
|
||||
// ── Commands ──
|
||||
|
||||
setInstrumentationBreakpoint(
|
||||
params: SetInstrumentationBreakpointParams,
|
||||
): Promise<void>
|
||||
removeInstrumentationBreakpoint(
|
||||
params: RemoveInstrumentationBreakpointParams,
|
||||
): Promise<void>
|
||||
disable(): Promise<void>
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
ClearStorageItemsParams,
|
||||
GetStorageItemsParams,
|
||||
GetStorageItemsResult,
|
||||
LoadUnpackedParams,
|
||||
LoadUnpackedResult,
|
||||
RemoveStorageItemsParams,
|
||||
SetStorageItemsParams,
|
||||
UninstallParams,
|
||||
} from '../domains/extensions'
|
||||
|
||||
export interface ExtensionsApi {
|
||||
// ── Commands ──
|
||||
|
||||
loadUnpacked(params: LoadUnpackedParams): Promise<LoadUnpackedResult>
|
||||
uninstall(params: UninstallParams): Promise<void>
|
||||
getStorageItems(params: GetStorageItemsParams): Promise<GetStorageItemsResult>
|
||||
removeStorageItems(params: RemoveStorageItemsParams): Promise<void>
|
||||
clearStorageItems(params: ClearStorageItemsParams): Promise<void>
|
||||
setStorageItems(params: SetStorageItemsParams): Promise<void>
|
||||
}
|
||||
34
packages/cdp-protocol/src/generated/domain-apis/fed-cm.ts
Normal file
34
packages/cdp-protocol/src/generated/domain-apis/fed-cm.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
ClickDialogButtonParams,
|
||||
DialogClosedEvent,
|
||||
DialogShownEvent,
|
||||
DismissDialogParams,
|
||||
EnableParams,
|
||||
OpenUrlParams,
|
||||
SelectAccountParams,
|
||||
} from '../domains/fed-cm'
|
||||
|
||||
export interface FedCmApi {
|
||||
// ── Commands ──
|
||||
|
||||
enable(params?: EnableParams): Promise<void>
|
||||
disable(): Promise<void>
|
||||
selectAccount(params: SelectAccountParams): Promise<void>
|
||||
clickDialogButton(params: ClickDialogButtonParams): Promise<void>
|
||||
openUrl(params: OpenUrlParams): Promise<void>
|
||||
dismissDialog(params: DismissDialogParams): Promise<void>
|
||||
resetCooldown(): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'dialogShown',
|
||||
handler: (params: DialogShownEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'dialogClosed',
|
||||
handler: (params: DialogClosedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
43
packages/cdp-protocol/src/generated/domain-apis/fetch.ts
Normal file
43
packages/cdp-protocol/src/generated/domain-apis/fetch.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AuthRequiredEvent,
|
||||
ContinueRequestParams,
|
||||
ContinueResponseParams,
|
||||
ContinueWithAuthParams,
|
||||
EnableParams,
|
||||
FailRequestParams,
|
||||
FulfillRequestParams,
|
||||
GetResponseBodyParams,
|
||||
GetResponseBodyResult,
|
||||
RequestPausedEvent,
|
||||
TakeResponseBodyAsStreamParams,
|
||||
TakeResponseBodyAsStreamResult,
|
||||
} from '../domains/fetch'
|
||||
|
||||
export interface FetchApi {
|
||||
// ── Commands ──
|
||||
|
||||
disable(): Promise<void>
|
||||
enable(params?: EnableParams): Promise<void>
|
||||
failRequest(params: FailRequestParams): Promise<void>
|
||||
fulfillRequest(params: FulfillRequestParams): Promise<void>
|
||||
continueRequest(params: ContinueRequestParams): Promise<void>
|
||||
continueWithAuth(params: ContinueWithAuthParams): Promise<void>
|
||||
continueResponse(params: ContinueResponseParams): Promise<void>
|
||||
getResponseBody(params: GetResponseBodyParams): Promise<GetResponseBodyResult>
|
||||
takeResponseBodyAsStream(
|
||||
params: TakeResponseBodyAsStreamParams,
|
||||
): Promise<TakeResponseBodyAsStreamResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'requestPaused',
|
||||
handler: (params: RequestPausedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'authRequired',
|
||||
handler: (params: AuthRequiredEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
GetDirectoryParams,
|
||||
GetDirectoryResult,
|
||||
} from '../domains/file-system'
|
||||
|
||||
export interface FileSystemApi {
|
||||
// ── Commands ──
|
||||
|
||||
getDirectory(params: GetDirectoryParams): Promise<GetDirectoryResult>
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
BeginFrameParams,
|
||||
BeginFrameResult,
|
||||
} from '../domains/headless-experimental'
|
||||
|
||||
export interface HeadlessExperimentalApi {
|
||||
// ── Commands ──
|
||||
|
||||
beginFrame(params?: BeginFrameParams): Promise<BeginFrameResult>
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AddHeapSnapshotChunkEvent,
|
||||
AddInspectedHeapObjectParams,
|
||||
GetHeapObjectIdParams,
|
||||
GetHeapObjectIdResult,
|
||||
GetObjectByHeapObjectIdParams,
|
||||
GetObjectByHeapObjectIdResult,
|
||||
GetSamplingProfileResult,
|
||||
HeapStatsUpdateEvent,
|
||||
LastSeenObjectIdEvent,
|
||||
ReportHeapSnapshotProgressEvent,
|
||||
StartSamplingParams,
|
||||
StartTrackingHeapObjectsParams,
|
||||
StopSamplingResult,
|
||||
StopTrackingHeapObjectsParams,
|
||||
TakeHeapSnapshotParams,
|
||||
} from '../domains/heap-profiler'
|
||||
|
||||
export interface HeapProfilerApi {
|
||||
// ── Commands ──
|
||||
|
||||
addInspectedHeapObject(params: AddInspectedHeapObjectParams): Promise<void>
|
||||
collectGarbage(): Promise<void>
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
getHeapObjectId(params: GetHeapObjectIdParams): Promise<GetHeapObjectIdResult>
|
||||
getObjectByHeapObjectId(
|
||||
params: GetObjectByHeapObjectIdParams,
|
||||
): Promise<GetObjectByHeapObjectIdResult>
|
||||
getSamplingProfile(): Promise<GetSamplingProfileResult>
|
||||
startSampling(params?: StartSamplingParams): Promise<void>
|
||||
startTrackingHeapObjects(
|
||||
params?: StartTrackingHeapObjectsParams,
|
||||
): Promise<void>
|
||||
stopSampling(): Promise<StopSamplingResult>
|
||||
stopTrackingHeapObjects(params?: StopTrackingHeapObjectsParams): Promise<void>
|
||||
takeHeapSnapshot(params?: TakeHeapSnapshotParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'addHeapSnapshotChunk',
|
||||
handler: (params: AddHeapSnapshotChunkEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'heapStatsUpdate',
|
||||
handler: (params: HeapStatsUpdateEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'lastSeenObjectId',
|
||||
handler: (params: LastSeenObjectIdEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'reportHeapSnapshotProgress',
|
||||
handler: (params: ReportHeapSnapshotProgressEvent) => void,
|
||||
): () => void
|
||||
on(event: 'resetProfiles', handler: () => void): () => void
|
||||
}
|
||||
19
packages/cdp-protocol/src/generated/domain-apis/history.ts
Normal file
19
packages/cdp-protocol/src/generated/domain-apis/history.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
DeleteRangeParams,
|
||||
DeleteUrlParams,
|
||||
GetRecentParams,
|
||||
GetRecentResult,
|
||||
SearchParams,
|
||||
SearchResult,
|
||||
} from '../domains/history'
|
||||
|
||||
export interface HistoryApi {
|
||||
// ── Commands ──
|
||||
|
||||
search(params: SearchParams): Promise<SearchResult>
|
||||
getRecent(params?: GetRecentParams): Promise<GetRecentResult>
|
||||
deleteUrl(params: DeleteUrlParams): Promise<void>
|
||||
deleteRange(params: DeleteRangeParams): Promise<void>
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
ClearObjectStoreParams,
|
||||
DeleteDatabaseParams,
|
||||
DeleteObjectStoreEntriesParams,
|
||||
GetMetadataParams,
|
||||
GetMetadataResult,
|
||||
RequestDatabaseNamesParams,
|
||||
RequestDatabaseNamesResult,
|
||||
RequestDatabaseParams,
|
||||
RequestDatabaseResult,
|
||||
RequestDataParams,
|
||||
RequestDataResult,
|
||||
} from '../domains/indexed-db'
|
||||
|
||||
export interface IndexedDBApi {
|
||||
// ── Commands ──
|
||||
|
||||
clearObjectStore(params: ClearObjectStoreParams): Promise<void>
|
||||
deleteDatabase(params: DeleteDatabaseParams): Promise<void>
|
||||
deleteObjectStoreEntries(
|
||||
params: DeleteObjectStoreEntriesParams,
|
||||
): Promise<void>
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
requestData(params: RequestDataParams): Promise<RequestDataResult>
|
||||
getMetadata(params: GetMetadataParams): Promise<GetMetadataResult>
|
||||
requestDatabase(params: RequestDatabaseParams): Promise<RequestDatabaseResult>
|
||||
requestDatabaseNames(
|
||||
params?: RequestDatabaseNamesParams,
|
||||
): Promise<RequestDatabaseNamesResult>
|
||||
}
|
||||
44
packages/cdp-protocol/src/generated/domain-apis/input.ts
Normal file
44
packages/cdp-protocol/src/generated/domain-apis/input.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
DispatchDragEventParams,
|
||||
DispatchKeyEventParams,
|
||||
DispatchMouseEventParams,
|
||||
DispatchTouchEventParams,
|
||||
DragInterceptedEvent,
|
||||
EmulateTouchFromMouseEventParams,
|
||||
ImeSetCompositionParams,
|
||||
InsertTextParams,
|
||||
SetIgnoreInputEventsParams,
|
||||
SetInterceptDragsParams,
|
||||
SynthesizePinchGestureParams,
|
||||
SynthesizeScrollGestureParams,
|
||||
SynthesizeTapGestureParams,
|
||||
} from '../domains/input'
|
||||
|
||||
export interface InputApi {
|
||||
// ── Commands ──
|
||||
|
||||
dispatchDragEvent(params: DispatchDragEventParams): Promise<void>
|
||||
dispatchKeyEvent(params: DispatchKeyEventParams): Promise<void>
|
||||
insertText(params: InsertTextParams): Promise<void>
|
||||
imeSetComposition(params: ImeSetCompositionParams): Promise<void>
|
||||
dispatchMouseEvent(params: DispatchMouseEventParams): Promise<void>
|
||||
dispatchTouchEvent(params: DispatchTouchEventParams): Promise<void>
|
||||
cancelDragging(): Promise<void>
|
||||
emulateTouchFromMouseEvent(
|
||||
params: EmulateTouchFromMouseEventParams,
|
||||
): Promise<void>
|
||||
setIgnoreInputEvents(params: SetIgnoreInputEventsParams): Promise<void>
|
||||
setInterceptDrags(params: SetInterceptDragsParams): Promise<void>
|
||||
synthesizePinchGesture(params: SynthesizePinchGestureParams): Promise<void>
|
||||
synthesizeScrollGesture(params: SynthesizeScrollGestureParams): Promise<void>
|
||||
synthesizeTapGesture(params: SynthesizeTapGestureParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'dragIntercepted',
|
||||
handler: (params: DragInterceptedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
17
packages/cdp-protocol/src/generated/domain-apis/inspector.ts
Normal file
17
packages/cdp-protocol/src/generated/domain-apis/inspector.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { DetachedEvent } from '../domains/inspector'
|
||||
|
||||
export interface InspectorApi {
|
||||
// ── Commands ──
|
||||
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(event: 'detached', handler: (params: DetachedEvent) => void): () => void
|
||||
on(event: 'targetCrashed', handler: () => void): () => void
|
||||
on(event: 'targetReloadedAfterCrash', handler: () => void): () => void
|
||||
on(event: 'workerScriptLoaded', handler: () => void): () => void
|
||||
}
|
||||
17
packages/cdp-protocol/src/generated/domain-apis/io.ts
Normal file
17
packages/cdp-protocol/src/generated/domain-apis/io.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
CloseParams,
|
||||
ReadParams,
|
||||
ReadResult,
|
||||
ResolveBlobParams,
|
||||
ResolveBlobResult,
|
||||
} from '../domains/io'
|
||||
|
||||
export interface IOApi {
|
||||
// ── Commands ──
|
||||
|
||||
close(params: CloseParams): Promise<void>
|
||||
read(params: ReadParams): Promise<ReadResult>
|
||||
resolveBlob(params: ResolveBlobParams): Promise<ResolveBlobResult>
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
CompositingReasonsParams,
|
||||
CompositingReasonsResult,
|
||||
LayerPaintedEvent,
|
||||
LayerTreeDidChangeEvent,
|
||||
LoadSnapshotParams,
|
||||
LoadSnapshotResult,
|
||||
MakeSnapshotParams,
|
||||
MakeSnapshotResult,
|
||||
ProfileSnapshotParams,
|
||||
ProfileSnapshotResult,
|
||||
ReleaseSnapshotParams,
|
||||
ReplaySnapshotParams,
|
||||
ReplaySnapshotResult,
|
||||
SnapshotCommandLogParams,
|
||||
SnapshotCommandLogResult,
|
||||
} from '../domains/layer-tree'
|
||||
|
||||
export interface LayerTreeApi {
|
||||
// ── Commands ──
|
||||
|
||||
compositingReasons(
|
||||
params: CompositingReasonsParams,
|
||||
): Promise<CompositingReasonsResult>
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
loadSnapshot(params: LoadSnapshotParams): Promise<LoadSnapshotResult>
|
||||
makeSnapshot(params: MakeSnapshotParams): Promise<MakeSnapshotResult>
|
||||
profileSnapshot(params: ProfileSnapshotParams): Promise<ProfileSnapshotResult>
|
||||
releaseSnapshot(params: ReleaseSnapshotParams): Promise<void>
|
||||
replaySnapshot(params: ReplaySnapshotParams): Promise<ReplaySnapshotResult>
|
||||
snapshotCommandLog(
|
||||
params: SnapshotCommandLogParams,
|
||||
): Promise<SnapshotCommandLogResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'layerPainted',
|
||||
handler: (params: LayerPaintedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'layerTreeDidChange',
|
||||
handler: (params: LayerTreeDidChangeEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
23
packages/cdp-protocol/src/generated/domain-apis/log.ts
Normal file
23
packages/cdp-protocol/src/generated/domain-apis/log.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
EntryAddedEvent,
|
||||
StartViolationsReportParams,
|
||||
} from '../domains/log'
|
||||
|
||||
export interface LogApi {
|
||||
// ── Commands ──
|
||||
|
||||
clear(): Promise<void>
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
startViolationsReport(params: StartViolationsReportParams): Promise<void>
|
||||
stopViolationsReport(): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'entryAdded',
|
||||
handler: (params: EntryAddedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
39
packages/cdp-protocol/src/generated/domain-apis/media.ts
Normal file
39
packages/cdp-protocol/src/generated/domain-apis/media.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
PlayerCreatedEvent,
|
||||
PlayerErrorsRaisedEvent,
|
||||
PlayerEventsAddedEvent,
|
||||
PlayerMessagesLoggedEvent,
|
||||
PlayerPropertiesChangedEvent,
|
||||
} from '../domains/media'
|
||||
|
||||
export interface MediaApi {
|
||||
// ── Commands ──
|
||||
|
||||
enable(): Promise<void>
|
||||
disable(): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'playerPropertiesChanged',
|
||||
handler: (params: PlayerPropertiesChangedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'playerEventsAdded',
|
||||
handler: (params: PlayerEventsAddedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'playerMessagesLogged',
|
||||
handler: (params: PlayerMessagesLoggedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'playerErrorsRaised',
|
||||
handler: (params: PlayerErrorsRaisedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'playerCreated',
|
||||
handler: (params: PlayerCreatedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
32
packages/cdp-protocol/src/generated/domain-apis/memory.ts
Normal file
32
packages/cdp-protocol/src/generated/domain-apis/memory.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
GetAllTimeSamplingProfileResult,
|
||||
GetBrowserSamplingProfileResult,
|
||||
GetDOMCountersForLeakDetectionResult,
|
||||
GetDOMCountersResult,
|
||||
GetSamplingProfileResult,
|
||||
SetPressureNotificationsSuppressedParams,
|
||||
SimulatePressureNotificationParams,
|
||||
StartSamplingParams,
|
||||
} from '../domains/memory'
|
||||
|
||||
export interface MemoryApi {
|
||||
// ── Commands ──
|
||||
|
||||
getDOMCounters(): Promise<GetDOMCountersResult>
|
||||
getDOMCountersForLeakDetection(): Promise<GetDOMCountersForLeakDetectionResult>
|
||||
prepareForLeakDetection(): Promise<void>
|
||||
forciblyPurgeJavaScriptMemory(): Promise<void>
|
||||
setPressureNotificationsSuppressed(
|
||||
params: SetPressureNotificationsSuppressedParams,
|
||||
): Promise<void>
|
||||
simulatePressureNotification(
|
||||
params: SimulatePressureNotificationParams,
|
||||
): Promise<void>
|
||||
startSampling(params?: StartSamplingParams): Promise<void>
|
||||
stopSampling(): Promise<void>
|
||||
getAllTimeSamplingProfile(): Promise<GetAllTimeSamplingProfileResult>
|
||||
getBrowserSamplingProfile(): Promise<GetBrowserSamplingProfileResult>
|
||||
getSamplingProfile(): Promise<GetSamplingProfileResult>
|
||||
}
|
||||
343
packages/cdp-protocol/src/generated/domain-apis/network.ts
Normal file
343
packages/cdp-protocol/src/generated/domain-apis/network.ts
Normal file
@@ -0,0 +1,343 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
CanClearBrowserCacheResult,
|
||||
CanClearBrowserCookiesResult,
|
||||
CanEmulateNetworkConditionsResult,
|
||||
ConfigureDurableMessagesParams,
|
||||
ContinueInterceptedRequestParams,
|
||||
DataReceivedEvent,
|
||||
DeleteCookiesParams,
|
||||
DeviceBoundSessionEventOccurredEvent,
|
||||
DeviceBoundSessionsAddedEvent,
|
||||
DirectTCPSocketAbortedEvent,
|
||||
DirectTCPSocketChunkReceivedEvent,
|
||||
DirectTCPSocketChunkSentEvent,
|
||||
DirectTCPSocketClosedEvent,
|
||||
DirectTCPSocketCreatedEvent,
|
||||
DirectTCPSocketOpenedEvent,
|
||||
DirectUDPSocketAbortedEvent,
|
||||
DirectUDPSocketChunkReceivedEvent,
|
||||
DirectUDPSocketChunkSentEvent,
|
||||
DirectUDPSocketClosedEvent,
|
||||
DirectUDPSocketCreatedEvent,
|
||||
DirectUDPSocketJoinedMulticastGroupEvent,
|
||||
DirectUDPSocketLeftMulticastGroupEvent,
|
||||
DirectUDPSocketOpenedEvent,
|
||||
EmulateNetworkConditionsByRuleParams,
|
||||
EmulateNetworkConditionsByRuleResult,
|
||||
EmulateNetworkConditionsParams,
|
||||
EnableDeviceBoundSessionsParams,
|
||||
EnableParams,
|
||||
EnableReportingApiParams,
|
||||
EventSourceMessageReceivedEvent,
|
||||
FetchSchemefulSiteParams,
|
||||
FetchSchemefulSiteResult,
|
||||
GetAllCookiesResult,
|
||||
GetCertificateParams,
|
||||
GetCertificateResult,
|
||||
GetCookiesParams,
|
||||
GetCookiesResult,
|
||||
GetRequestPostDataParams,
|
||||
GetRequestPostDataResult,
|
||||
GetResponseBodyForInterceptionParams,
|
||||
GetResponseBodyForInterceptionResult,
|
||||
GetResponseBodyParams,
|
||||
GetResponseBodyResult,
|
||||
GetSecurityIsolationStatusParams,
|
||||
GetSecurityIsolationStatusResult,
|
||||
LoadingFailedEvent,
|
||||
LoadingFinishedEvent,
|
||||
LoadNetworkResourceParams,
|
||||
LoadNetworkResourceResult,
|
||||
OverrideNetworkStateParams,
|
||||
ReplayXHRParams,
|
||||
ReportingApiEndpointsChangedForOriginEvent,
|
||||
ReportingApiReportAddedEvent,
|
||||
ReportingApiReportUpdatedEvent,
|
||||
RequestInterceptedEvent,
|
||||
RequestServedFromCacheEvent,
|
||||
RequestWillBeSentEvent,
|
||||
RequestWillBeSentExtraInfoEvent,
|
||||
ResourceChangedPriorityEvent,
|
||||
ResponseReceivedEarlyHintsEvent,
|
||||
ResponseReceivedEvent,
|
||||
ResponseReceivedExtraInfoEvent,
|
||||
SearchInResponseBodyParams,
|
||||
SearchInResponseBodyResult,
|
||||
SetAcceptedEncodingsParams,
|
||||
SetAttachDebugStackParams,
|
||||
SetBlockedURLsParams,
|
||||
SetBypassServiceWorkerParams,
|
||||
SetCacheDisabledParams,
|
||||
SetCookieControlsParams,
|
||||
SetCookieParams,
|
||||
SetCookieResult,
|
||||
SetCookiesParams,
|
||||
SetExtraHTTPHeadersParams,
|
||||
SetRequestInterceptionParams,
|
||||
SetUserAgentOverrideParams,
|
||||
SignedExchangeReceivedEvent,
|
||||
StreamResourceContentParams,
|
||||
StreamResourceContentResult,
|
||||
TakeResponseBodyForInterceptionAsStreamParams,
|
||||
TakeResponseBodyForInterceptionAsStreamResult,
|
||||
TrustTokenOperationDoneEvent,
|
||||
WebSocketClosedEvent,
|
||||
WebSocketCreatedEvent,
|
||||
WebSocketFrameErrorEvent,
|
||||
WebSocketFrameReceivedEvent,
|
||||
WebSocketFrameSentEvent,
|
||||
WebSocketHandshakeResponseReceivedEvent,
|
||||
WebSocketWillSendHandshakeRequestEvent,
|
||||
WebTransportClosedEvent,
|
||||
WebTransportConnectionEstablishedEvent,
|
||||
WebTransportCreatedEvent,
|
||||
} from '../domains/network'
|
||||
|
||||
export interface NetworkApi {
|
||||
// ── Commands ──
|
||||
|
||||
setAcceptedEncodings(params: SetAcceptedEncodingsParams): Promise<void>
|
||||
clearAcceptedEncodingsOverride(): Promise<void>
|
||||
canClearBrowserCache(): Promise<CanClearBrowserCacheResult>
|
||||
canClearBrowserCookies(): Promise<CanClearBrowserCookiesResult>
|
||||
canEmulateNetworkConditions(): Promise<CanEmulateNetworkConditionsResult>
|
||||
clearBrowserCache(): Promise<void>
|
||||
clearBrowserCookies(): Promise<void>
|
||||
continueInterceptedRequest(
|
||||
params: ContinueInterceptedRequestParams,
|
||||
): Promise<void>
|
||||
deleteCookies(params: DeleteCookiesParams): Promise<void>
|
||||
disable(): Promise<void>
|
||||
emulateNetworkConditions(
|
||||
params: EmulateNetworkConditionsParams,
|
||||
): Promise<void>
|
||||
emulateNetworkConditionsByRule(
|
||||
params: EmulateNetworkConditionsByRuleParams,
|
||||
): Promise<EmulateNetworkConditionsByRuleResult>
|
||||
overrideNetworkState(params: OverrideNetworkStateParams): Promise<void>
|
||||
enable(params?: EnableParams): Promise<void>
|
||||
configureDurableMessages(
|
||||
params?: ConfigureDurableMessagesParams,
|
||||
): Promise<void>
|
||||
getAllCookies(): Promise<GetAllCookiesResult>
|
||||
getCertificate(params: GetCertificateParams): Promise<GetCertificateResult>
|
||||
getCookies(params?: GetCookiesParams): Promise<GetCookiesResult>
|
||||
getResponseBody(params: GetResponseBodyParams): Promise<GetResponseBodyResult>
|
||||
getRequestPostData(
|
||||
params: GetRequestPostDataParams,
|
||||
): Promise<GetRequestPostDataResult>
|
||||
getResponseBodyForInterception(
|
||||
params: GetResponseBodyForInterceptionParams,
|
||||
): Promise<GetResponseBodyForInterceptionResult>
|
||||
takeResponseBodyForInterceptionAsStream(
|
||||
params: TakeResponseBodyForInterceptionAsStreamParams,
|
||||
): Promise<TakeResponseBodyForInterceptionAsStreamResult>
|
||||
replayXHR(params: ReplayXHRParams): Promise<void>
|
||||
searchInResponseBody(
|
||||
params: SearchInResponseBodyParams,
|
||||
): Promise<SearchInResponseBodyResult>
|
||||
setBlockedURLs(params?: SetBlockedURLsParams): Promise<void>
|
||||
setBypassServiceWorker(params: SetBypassServiceWorkerParams): Promise<void>
|
||||
setCacheDisabled(params: SetCacheDisabledParams): Promise<void>
|
||||
setCookie(params: SetCookieParams): Promise<SetCookieResult>
|
||||
setCookies(params: SetCookiesParams): Promise<void>
|
||||
setExtraHTTPHeaders(params: SetExtraHTTPHeadersParams): Promise<void>
|
||||
setAttachDebugStack(params: SetAttachDebugStackParams): Promise<void>
|
||||
setRequestInterception(params: SetRequestInterceptionParams): Promise<void>
|
||||
setUserAgentOverride(params: SetUserAgentOverrideParams): Promise<void>
|
||||
streamResourceContent(
|
||||
params: StreamResourceContentParams,
|
||||
): Promise<StreamResourceContentResult>
|
||||
getSecurityIsolationStatus(
|
||||
params?: GetSecurityIsolationStatusParams,
|
||||
): Promise<GetSecurityIsolationStatusResult>
|
||||
enableReportingApi(params: EnableReportingApiParams): Promise<void>
|
||||
enableDeviceBoundSessions(
|
||||
params: EnableDeviceBoundSessionsParams,
|
||||
): Promise<void>
|
||||
fetchSchemefulSite(
|
||||
params: FetchSchemefulSiteParams,
|
||||
): Promise<FetchSchemefulSiteResult>
|
||||
loadNetworkResource(
|
||||
params: LoadNetworkResourceParams,
|
||||
): Promise<LoadNetworkResourceResult>
|
||||
setCookieControls(params: SetCookieControlsParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'dataReceived',
|
||||
handler: (params: DataReceivedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'eventSourceMessageReceived',
|
||||
handler: (params: EventSourceMessageReceivedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'loadingFailed',
|
||||
handler: (params: LoadingFailedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'loadingFinished',
|
||||
handler: (params: LoadingFinishedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'requestIntercepted',
|
||||
handler: (params: RequestInterceptedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'requestServedFromCache',
|
||||
handler: (params: RequestServedFromCacheEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'requestWillBeSent',
|
||||
handler: (params: RequestWillBeSentEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'resourceChangedPriority',
|
||||
handler: (params: ResourceChangedPriorityEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'signedExchangeReceived',
|
||||
handler: (params: SignedExchangeReceivedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'responseReceived',
|
||||
handler: (params: ResponseReceivedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'webSocketClosed',
|
||||
handler: (params: WebSocketClosedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'webSocketCreated',
|
||||
handler: (params: WebSocketCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'webSocketFrameError',
|
||||
handler: (params: WebSocketFrameErrorEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'webSocketFrameReceived',
|
||||
handler: (params: WebSocketFrameReceivedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'webSocketFrameSent',
|
||||
handler: (params: WebSocketFrameSentEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'webSocketHandshakeResponseReceived',
|
||||
handler: (params: WebSocketHandshakeResponseReceivedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'webSocketWillSendHandshakeRequest',
|
||||
handler: (params: WebSocketWillSendHandshakeRequestEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'webTransportCreated',
|
||||
handler: (params: WebTransportCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'webTransportConnectionEstablished',
|
||||
handler: (params: WebTransportConnectionEstablishedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'webTransportClosed',
|
||||
handler: (params: WebTransportClosedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directTCPSocketCreated',
|
||||
handler: (params: DirectTCPSocketCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directTCPSocketOpened',
|
||||
handler: (params: DirectTCPSocketOpenedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directTCPSocketAborted',
|
||||
handler: (params: DirectTCPSocketAbortedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directTCPSocketClosed',
|
||||
handler: (params: DirectTCPSocketClosedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directTCPSocketChunkSent',
|
||||
handler: (params: DirectTCPSocketChunkSentEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directTCPSocketChunkReceived',
|
||||
handler: (params: DirectTCPSocketChunkReceivedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directUDPSocketJoinedMulticastGroup',
|
||||
handler: (params: DirectUDPSocketJoinedMulticastGroupEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directUDPSocketLeftMulticastGroup',
|
||||
handler: (params: DirectUDPSocketLeftMulticastGroupEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directUDPSocketCreated',
|
||||
handler: (params: DirectUDPSocketCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directUDPSocketOpened',
|
||||
handler: (params: DirectUDPSocketOpenedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directUDPSocketAborted',
|
||||
handler: (params: DirectUDPSocketAbortedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directUDPSocketClosed',
|
||||
handler: (params: DirectUDPSocketClosedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directUDPSocketChunkSent',
|
||||
handler: (params: DirectUDPSocketChunkSentEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'directUDPSocketChunkReceived',
|
||||
handler: (params: DirectUDPSocketChunkReceivedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'requestWillBeSentExtraInfo',
|
||||
handler: (params: RequestWillBeSentExtraInfoEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'responseReceivedExtraInfo',
|
||||
handler: (params: ResponseReceivedExtraInfoEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'responseReceivedEarlyHints',
|
||||
handler: (params: ResponseReceivedEarlyHintsEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'trustTokenOperationDone',
|
||||
handler: (params: TrustTokenOperationDoneEvent) => void,
|
||||
): () => void
|
||||
on(event: 'policyUpdated', handler: () => void): () => void
|
||||
on(
|
||||
event: 'reportingApiReportAdded',
|
||||
handler: (params: ReportingApiReportAddedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'reportingApiReportUpdated',
|
||||
handler: (params: ReportingApiReportUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'reportingApiEndpointsChangedForOrigin',
|
||||
handler: (params: ReportingApiEndpointsChangedForOriginEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'deviceBoundSessionsAdded',
|
||||
handler: (params: DeviceBoundSessionsAddedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'deviceBoundSessionEventOccurred',
|
||||
handler: (params: DeviceBoundSessionEventOccurredEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
106
packages/cdp-protocol/src/generated/domain-apis/overlay.ts
Normal file
106
packages/cdp-protocol/src/generated/domain-apis/overlay.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
GetGridHighlightObjectsForTestParams,
|
||||
GetGridHighlightObjectsForTestResult,
|
||||
GetHighlightObjectForTestParams,
|
||||
GetHighlightObjectForTestResult,
|
||||
GetSourceOrderHighlightObjectForTestParams,
|
||||
GetSourceOrderHighlightObjectForTestResult,
|
||||
HighlightFrameParams,
|
||||
HighlightNodeParams,
|
||||
HighlightQuadParams,
|
||||
HighlightRectParams,
|
||||
HighlightSourceOrderParams,
|
||||
InspectNodeRequestedEvent,
|
||||
NodeHighlightRequestedEvent,
|
||||
ScreenshotRequestedEvent,
|
||||
SetInspectModeParams,
|
||||
SetPausedInDebuggerMessageParams,
|
||||
SetShowAdHighlightsParams,
|
||||
SetShowContainerQueryOverlaysParams,
|
||||
SetShowDebugBordersParams,
|
||||
SetShowFlexOverlaysParams,
|
||||
SetShowFPSCounterParams,
|
||||
SetShowGridOverlaysParams,
|
||||
SetShowHingeParams,
|
||||
SetShowHitTestBordersParams,
|
||||
SetShowIsolatedElementsParams,
|
||||
SetShowLayoutShiftRegionsParams,
|
||||
SetShowPaintRectsParams,
|
||||
SetShowScrollBottleneckRectsParams,
|
||||
SetShowScrollSnapOverlaysParams,
|
||||
SetShowViewportSizeOnResizeParams,
|
||||
SetShowWebVitalsParams,
|
||||
SetShowWindowControlsOverlayParams,
|
||||
} from '../domains/overlay'
|
||||
|
||||
export interface OverlayApi {
|
||||
// ── Commands ──
|
||||
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
getHighlightObjectForTest(
|
||||
params: GetHighlightObjectForTestParams,
|
||||
): Promise<GetHighlightObjectForTestResult>
|
||||
getGridHighlightObjectsForTest(
|
||||
params: GetGridHighlightObjectsForTestParams,
|
||||
): Promise<GetGridHighlightObjectsForTestResult>
|
||||
getSourceOrderHighlightObjectForTest(
|
||||
params: GetSourceOrderHighlightObjectForTestParams,
|
||||
): Promise<GetSourceOrderHighlightObjectForTestResult>
|
||||
hideHighlight(): Promise<void>
|
||||
highlightFrame(params: HighlightFrameParams): Promise<void>
|
||||
highlightNode(params: HighlightNodeParams): Promise<void>
|
||||
highlightQuad(params: HighlightQuadParams): Promise<void>
|
||||
highlightRect(params: HighlightRectParams): Promise<void>
|
||||
highlightSourceOrder(params: HighlightSourceOrderParams): Promise<void>
|
||||
setInspectMode(params: SetInspectModeParams): Promise<void>
|
||||
setShowAdHighlights(params: SetShowAdHighlightsParams): Promise<void>
|
||||
setPausedInDebuggerMessage(
|
||||
params?: SetPausedInDebuggerMessageParams,
|
||||
): Promise<void>
|
||||
setShowDebugBorders(params: SetShowDebugBordersParams): Promise<void>
|
||||
setShowFPSCounter(params: SetShowFPSCounterParams): Promise<void>
|
||||
setShowGridOverlays(params: SetShowGridOverlaysParams): Promise<void>
|
||||
setShowFlexOverlays(params: SetShowFlexOverlaysParams): Promise<void>
|
||||
setShowScrollSnapOverlays(
|
||||
params: SetShowScrollSnapOverlaysParams,
|
||||
): Promise<void>
|
||||
setShowContainerQueryOverlays(
|
||||
params: SetShowContainerQueryOverlaysParams,
|
||||
): Promise<void>
|
||||
setShowPaintRects(params: SetShowPaintRectsParams): Promise<void>
|
||||
setShowLayoutShiftRegions(
|
||||
params: SetShowLayoutShiftRegionsParams,
|
||||
): Promise<void>
|
||||
setShowScrollBottleneckRects(
|
||||
params: SetShowScrollBottleneckRectsParams,
|
||||
): Promise<void>
|
||||
setShowHitTestBorders(params: SetShowHitTestBordersParams): Promise<void>
|
||||
setShowWebVitals(params: SetShowWebVitalsParams): Promise<void>
|
||||
setShowViewportSizeOnResize(
|
||||
params: SetShowViewportSizeOnResizeParams,
|
||||
): Promise<void>
|
||||
setShowHinge(params?: SetShowHingeParams): Promise<void>
|
||||
setShowIsolatedElements(params: SetShowIsolatedElementsParams): Promise<void>
|
||||
setShowWindowControlsOverlay(
|
||||
params?: SetShowWindowControlsOverlayParams,
|
||||
): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'inspectNodeRequested',
|
||||
handler: (params: InspectNodeRequestedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'nodeHighlightRequested',
|
||||
handler: (params: NodeHighlightRequestedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'screenshotRequested',
|
||||
handler: (params: ScreenshotRequestedEvent) => void,
|
||||
): () => void
|
||||
on(event: 'inspectModeCanceled', handler: () => void): () => void
|
||||
}
|
||||
298
packages/cdp-protocol/src/generated/domain-apis/page.ts
Normal file
298
packages/cdp-protocol/src/generated/domain-apis/page.ts
Normal file
@@ -0,0 +1,298 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AddCompilationCacheParams,
|
||||
AddScriptToEvaluateOnLoadParams,
|
||||
AddScriptToEvaluateOnLoadResult,
|
||||
AddScriptToEvaluateOnNewDocumentParams,
|
||||
AddScriptToEvaluateOnNewDocumentResult,
|
||||
BackForwardCacheNotUsedEvent,
|
||||
CaptureScreenshotParams,
|
||||
CaptureScreenshotResult,
|
||||
CaptureSnapshotParams,
|
||||
CaptureSnapshotResult,
|
||||
CompilationCacheProducedEvent,
|
||||
CreateIsolatedWorldParams,
|
||||
CreateIsolatedWorldResult,
|
||||
DeleteCookieParams,
|
||||
DocumentOpenedEvent,
|
||||
DomContentEventFiredEvent,
|
||||
DownloadProgressEvent,
|
||||
DownloadWillBeginEvent,
|
||||
EnableParams,
|
||||
FileChooserOpenedEvent,
|
||||
FrameAttachedEvent,
|
||||
FrameClearedScheduledNavigationEvent,
|
||||
FrameDetachedEvent,
|
||||
FrameNavigatedEvent,
|
||||
FrameRequestedNavigationEvent,
|
||||
FrameScheduledNavigationEvent,
|
||||
FrameStartedLoadingEvent,
|
||||
FrameStartedNavigatingEvent,
|
||||
FrameStoppedLoadingEvent,
|
||||
FrameSubtreeWillBeDetachedEvent,
|
||||
GenerateTestReportParams,
|
||||
GetAdScriptAncestryParams,
|
||||
GetAdScriptAncestryResult,
|
||||
GetAnnotatedPageContentParams,
|
||||
GetAnnotatedPageContentResult,
|
||||
GetAppIdResult,
|
||||
GetAppManifestParams,
|
||||
GetAppManifestResult,
|
||||
GetFrameTreeResult,
|
||||
GetInstallabilityErrorsResult,
|
||||
GetLayoutMetricsResult,
|
||||
GetManifestIconsResult,
|
||||
GetNavigationHistoryResult,
|
||||
GetOriginTrialsParams,
|
||||
GetOriginTrialsResult,
|
||||
GetPermissionsPolicyStateParams,
|
||||
GetPermissionsPolicyStateResult,
|
||||
GetResourceContentParams,
|
||||
GetResourceContentResult,
|
||||
GetResourceTreeResult,
|
||||
HandleJavaScriptDialogParams,
|
||||
JavascriptDialogClosedEvent,
|
||||
JavascriptDialogOpeningEvent,
|
||||
LifecycleEventEvent,
|
||||
LoadEventFiredEvent,
|
||||
NavigatedWithinDocumentEvent,
|
||||
NavigateParams,
|
||||
NavigateResult,
|
||||
NavigateToHistoryEntryParams,
|
||||
PrintToPDFParams,
|
||||
PrintToPDFResult,
|
||||
ProduceCompilationCacheParams,
|
||||
ReloadParams,
|
||||
RemoveScriptToEvaluateOnLoadParams,
|
||||
RemoveScriptToEvaluateOnNewDocumentParams,
|
||||
ScreencastFrameAckParams,
|
||||
ScreencastFrameEvent,
|
||||
ScreencastVisibilityChangedEvent,
|
||||
SearchInResourceParams,
|
||||
SearchInResourceResult,
|
||||
SetAdBlockingEnabledParams,
|
||||
SetBypassCSPParams,
|
||||
SetDeviceMetricsOverrideParams,
|
||||
SetDeviceOrientationOverrideParams,
|
||||
SetDocumentContentParams,
|
||||
SetDownloadBehaviorParams,
|
||||
SetFontFamiliesParams,
|
||||
SetFontSizesParams,
|
||||
SetGeolocationOverrideParams,
|
||||
SetInterceptFileChooserDialogParams,
|
||||
SetLifecycleEventsEnabledParams,
|
||||
SetPrerenderingAllowedParams,
|
||||
SetRPHRegistrationModeParams,
|
||||
SetSPCTransactionModeParams,
|
||||
SetTouchEmulationEnabledParams,
|
||||
SetWebLifecycleStateParams,
|
||||
StartScreencastParams,
|
||||
WindowOpenEvent,
|
||||
} from '../domains/page'
|
||||
|
||||
export interface PageApi {
|
||||
// ── Commands ──
|
||||
|
||||
addScriptToEvaluateOnLoad(
|
||||
params: AddScriptToEvaluateOnLoadParams,
|
||||
): Promise<AddScriptToEvaluateOnLoadResult>
|
||||
addScriptToEvaluateOnNewDocument(
|
||||
params: AddScriptToEvaluateOnNewDocumentParams,
|
||||
): Promise<AddScriptToEvaluateOnNewDocumentResult>
|
||||
bringToFront(): Promise<void>
|
||||
captureScreenshot(
|
||||
params?: CaptureScreenshotParams,
|
||||
): Promise<CaptureScreenshotResult>
|
||||
captureSnapshot(
|
||||
params?: CaptureSnapshotParams,
|
||||
): Promise<CaptureSnapshotResult>
|
||||
clearDeviceMetricsOverride(): Promise<void>
|
||||
clearDeviceOrientationOverride(): Promise<void>
|
||||
clearGeolocationOverride(): Promise<void>
|
||||
createIsolatedWorld(
|
||||
params: CreateIsolatedWorldParams,
|
||||
): Promise<CreateIsolatedWorldResult>
|
||||
deleteCookie(params: DeleteCookieParams): Promise<void>
|
||||
disable(): Promise<void>
|
||||
enable(params?: EnableParams): Promise<void>
|
||||
getAppManifest(params?: GetAppManifestParams): Promise<GetAppManifestResult>
|
||||
getInstallabilityErrors(): Promise<GetInstallabilityErrorsResult>
|
||||
getManifestIcons(): Promise<GetManifestIconsResult>
|
||||
getAppId(): Promise<GetAppIdResult>
|
||||
getAdScriptAncestry(
|
||||
params: GetAdScriptAncestryParams,
|
||||
): Promise<GetAdScriptAncestryResult>
|
||||
getFrameTree(): Promise<GetFrameTreeResult>
|
||||
getLayoutMetrics(): Promise<GetLayoutMetricsResult>
|
||||
getNavigationHistory(): Promise<GetNavigationHistoryResult>
|
||||
resetNavigationHistory(): Promise<void>
|
||||
getResourceContent(
|
||||
params: GetResourceContentParams,
|
||||
): Promise<GetResourceContentResult>
|
||||
getResourceTree(): Promise<GetResourceTreeResult>
|
||||
handleJavaScriptDialog(params: HandleJavaScriptDialogParams): Promise<void>
|
||||
navigate(params: NavigateParams): Promise<NavigateResult>
|
||||
navigateToHistoryEntry(params: NavigateToHistoryEntryParams): Promise<void>
|
||||
printToPDF(params?: PrintToPDFParams): Promise<PrintToPDFResult>
|
||||
reload(params?: ReloadParams): Promise<void>
|
||||
removeScriptToEvaluateOnLoad(
|
||||
params: RemoveScriptToEvaluateOnLoadParams,
|
||||
): Promise<void>
|
||||
removeScriptToEvaluateOnNewDocument(
|
||||
params: RemoveScriptToEvaluateOnNewDocumentParams,
|
||||
): Promise<void>
|
||||
screencastFrameAck(params: ScreencastFrameAckParams): Promise<void>
|
||||
searchInResource(
|
||||
params: SearchInResourceParams,
|
||||
): Promise<SearchInResourceResult>
|
||||
setAdBlockingEnabled(params: SetAdBlockingEnabledParams): Promise<void>
|
||||
setBypassCSP(params: SetBypassCSPParams): Promise<void>
|
||||
getPermissionsPolicyState(
|
||||
params: GetPermissionsPolicyStateParams,
|
||||
): Promise<GetPermissionsPolicyStateResult>
|
||||
getOriginTrials(params: GetOriginTrialsParams): Promise<GetOriginTrialsResult>
|
||||
setDeviceMetricsOverride(
|
||||
params: SetDeviceMetricsOverrideParams,
|
||||
): Promise<void>
|
||||
setDeviceOrientationOverride(
|
||||
params: SetDeviceOrientationOverrideParams,
|
||||
): Promise<void>
|
||||
setFontFamilies(params: SetFontFamiliesParams): Promise<void>
|
||||
setFontSizes(params: SetFontSizesParams): Promise<void>
|
||||
setDocumentContent(params: SetDocumentContentParams): Promise<void>
|
||||
setDownloadBehavior(params: SetDownloadBehaviorParams): Promise<void>
|
||||
setGeolocationOverride(params?: SetGeolocationOverrideParams): Promise<void>
|
||||
setLifecycleEventsEnabled(
|
||||
params: SetLifecycleEventsEnabledParams,
|
||||
): Promise<void>
|
||||
setTouchEmulationEnabled(
|
||||
params: SetTouchEmulationEnabledParams,
|
||||
): Promise<void>
|
||||
startScreencast(params?: StartScreencastParams): Promise<void>
|
||||
stopLoading(): Promise<void>
|
||||
crash(): Promise<void>
|
||||
close(): Promise<void>
|
||||
setWebLifecycleState(params: SetWebLifecycleStateParams): Promise<void>
|
||||
stopScreencast(): Promise<void>
|
||||
produceCompilationCache(params: ProduceCompilationCacheParams): Promise<void>
|
||||
addCompilationCache(params: AddCompilationCacheParams): Promise<void>
|
||||
clearCompilationCache(): Promise<void>
|
||||
setSPCTransactionMode(params: SetSPCTransactionModeParams): Promise<void>
|
||||
setRPHRegistrationMode(params: SetRPHRegistrationModeParams): Promise<void>
|
||||
generateTestReport(params: GenerateTestReportParams): Promise<void>
|
||||
waitForDebugger(): Promise<void>
|
||||
setInterceptFileChooserDialog(
|
||||
params: SetInterceptFileChooserDialogParams,
|
||||
): Promise<void>
|
||||
setPrerenderingAllowed(params: SetPrerenderingAllowedParams): Promise<void>
|
||||
getAnnotatedPageContent(
|
||||
params?: GetAnnotatedPageContentParams,
|
||||
): Promise<GetAnnotatedPageContentResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'domContentEventFired',
|
||||
handler: (params: DomContentEventFiredEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'fileChooserOpened',
|
||||
handler: (params: FileChooserOpenedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'frameAttached',
|
||||
handler: (params: FrameAttachedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'frameClearedScheduledNavigation',
|
||||
handler: (params: FrameClearedScheduledNavigationEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'frameDetached',
|
||||
handler: (params: FrameDetachedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'frameSubtreeWillBeDetached',
|
||||
handler: (params: FrameSubtreeWillBeDetachedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'frameNavigated',
|
||||
handler: (params: FrameNavigatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'documentOpened',
|
||||
handler: (params: DocumentOpenedEvent) => void,
|
||||
): () => void
|
||||
on(event: 'frameResized', handler: () => void): () => void
|
||||
on(
|
||||
event: 'frameStartedNavigating',
|
||||
handler: (params: FrameStartedNavigatingEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'frameRequestedNavigation',
|
||||
handler: (params: FrameRequestedNavigationEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'frameScheduledNavigation',
|
||||
handler: (params: FrameScheduledNavigationEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'frameStartedLoading',
|
||||
handler: (params: FrameStartedLoadingEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'frameStoppedLoading',
|
||||
handler: (params: FrameStoppedLoadingEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'downloadWillBegin',
|
||||
handler: (params: DownloadWillBeginEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'downloadProgress',
|
||||
handler: (params: DownloadProgressEvent) => void,
|
||||
): () => void
|
||||
on(event: 'interstitialHidden', handler: () => void): () => void
|
||||
on(event: 'interstitialShown', handler: () => void): () => void
|
||||
on(
|
||||
event: 'javascriptDialogClosed',
|
||||
handler: (params: JavascriptDialogClosedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'javascriptDialogOpening',
|
||||
handler: (params: JavascriptDialogOpeningEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'lifecycleEvent',
|
||||
handler: (params: LifecycleEventEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'backForwardCacheNotUsed',
|
||||
handler: (params: BackForwardCacheNotUsedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'loadEventFired',
|
||||
handler: (params: LoadEventFiredEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'navigatedWithinDocument',
|
||||
handler: (params: NavigatedWithinDocumentEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'screencastFrame',
|
||||
handler: (params: ScreencastFrameEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'screencastVisibilityChanged',
|
||||
handler: (params: ScreencastVisibilityChangedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'windowOpen',
|
||||
handler: (params: WindowOpenEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'compilationCacheProduced',
|
||||
handler: (params: CompilationCacheProducedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
EnableParams,
|
||||
TimelineEventAddedEvent,
|
||||
} from '../domains/performance-timeline'
|
||||
|
||||
export interface PerformanceTimelineApi {
|
||||
// ── Commands ──
|
||||
|
||||
enable(params: EnableParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'timelineEventAdded',
|
||||
handler: (params: TimelineEventAddedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
EnableParams,
|
||||
GetMetricsResult,
|
||||
MetricsEvent,
|
||||
SetTimeDomainParams,
|
||||
} from '../domains/performance'
|
||||
|
||||
export interface PerformanceApi {
|
||||
// ── Commands ──
|
||||
|
||||
disable(): Promise<void>
|
||||
enable(params?: EnableParams): Promise<void>
|
||||
setTimeDomain(params: SetTimeDomainParams): Promise<void>
|
||||
getMetrics(): Promise<GetMetricsResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(event: 'metrics', handler: (params: MetricsEvent) => void): () => void
|
||||
}
|
||||
44
packages/cdp-protocol/src/generated/domain-apis/preload.ts
Normal file
44
packages/cdp-protocol/src/generated/domain-apis/preload.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
PrefetchStatusUpdatedEvent,
|
||||
PreloadEnabledStateUpdatedEvent,
|
||||
PreloadingAttemptSourcesUpdatedEvent,
|
||||
PrerenderStatusUpdatedEvent,
|
||||
RuleSetRemovedEvent,
|
||||
RuleSetUpdatedEvent,
|
||||
} from '../domains/preload'
|
||||
|
||||
export interface PreloadApi {
|
||||
// ── Commands ──
|
||||
|
||||
enable(): Promise<void>
|
||||
disable(): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'ruleSetUpdated',
|
||||
handler: (params: RuleSetUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'ruleSetRemoved',
|
||||
handler: (params: RuleSetRemovedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'preloadEnabledStateUpdated',
|
||||
handler: (params: PreloadEnabledStateUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'prefetchStatusUpdated',
|
||||
handler: (params: PrefetchStatusUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'prerenderStatusUpdated',
|
||||
handler: (params: PrerenderStatusUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'preloadingAttemptSourcesUpdated',
|
||||
handler: (params: PreloadingAttemptSourcesUpdatedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
44
packages/cdp-protocol/src/generated/domain-apis/profiler.ts
Normal file
44
packages/cdp-protocol/src/generated/domain-apis/profiler.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
ConsoleProfileFinishedEvent,
|
||||
ConsoleProfileStartedEvent,
|
||||
GetBestEffortCoverageResult,
|
||||
PreciseCoverageDeltaUpdateEvent,
|
||||
SetSamplingIntervalParams,
|
||||
StartPreciseCoverageParams,
|
||||
StartPreciseCoverageResult,
|
||||
StopResult,
|
||||
TakePreciseCoverageResult,
|
||||
} from '../domains/profiler'
|
||||
|
||||
export interface ProfilerApi {
|
||||
// ── Commands ──
|
||||
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
getBestEffortCoverage(): Promise<GetBestEffortCoverageResult>
|
||||
setSamplingInterval(params: SetSamplingIntervalParams): Promise<void>
|
||||
start(): Promise<void>
|
||||
startPreciseCoverage(
|
||||
params?: StartPreciseCoverageParams,
|
||||
): Promise<StartPreciseCoverageResult>
|
||||
stop(): Promise<StopResult>
|
||||
stopPreciseCoverage(): Promise<void>
|
||||
takePreciseCoverage(): Promise<TakePreciseCoverageResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'consoleProfileFinished',
|
||||
handler: (params: ConsoleProfileFinishedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'consoleProfileStarted',
|
||||
handler: (params: ConsoleProfileStartedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'preciseCoverageDeltaUpdate',
|
||||
handler: (params: PreciseCoverageDeltaUpdateEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
28
packages/cdp-protocol/src/generated/domain-apis/pwa.ts
Normal file
28
packages/cdp-protocol/src/generated/domain-apis/pwa.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
ChangeAppUserSettingsParams,
|
||||
GetOsAppStateParams,
|
||||
GetOsAppStateResult,
|
||||
InstallParams,
|
||||
LaunchFilesInAppParams,
|
||||
LaunchFilesInAppResult,
|
||||
LaunchParams,
|
||||
LaunchResult,
|
||||
OpenCurrentPageInAppParams,
|
||||
UninstallParams,
|
||||
} from '../domains/pwa'
|
||||
|
||||
export interface PWAApi {
|
||||
// ── Commands ──
|
||||
|
||||
getOsAppState(params: GetOsAppStateParams): Promise<GetOsAppStateResult>
|
||||
install(params: InstallParams): Promise<void>
|
||||
uninstall(params: UninstallParams): Promise<void>
|
||||
launch(params: LaunchParams): Promise<LaunchResult>
|
||||
launchFilesInApp(
|
||||
params: LaunchFilesInAppParams,
|
||||
): Promise<LaunchFilesInAppResult>
|
||||
openCurrentPageInApp(params: OpenCurrentPageInAppParams): Promise<void>
|
||||
changeAppUserSettings(params: ChangeAppUserSettingsParams): Promise<void>
|
||||
}
|
||||
106
packages/cdp-protocol/src/generated/domain-apis/runtime.ts
Normal file
106
packages/cdp-protocol/src/generated/domain-apis/runtime.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AddBindingParams,
|
||||
AwaitPromiseParams,
|
||||
AwaitPromiseResult,
|
||||
BindingCalledEvent,
|
||||
CallFunctionOnParams,
|
||||
CallFunctionOnResult,
|
||||
CompileScriptParams,
|
||||
CompileScriptResult,
|
||||
ConsoleAPICalledEvent,
|
||||
EvaluateParams,
|
||||
EvaluateResult,
|
||||
ExceptionRevokedEvent,
|
||||
ExceptionThrownEvent,
|
||||
ExecutionContextCreatedEvent,
|
||||
ExecutionContextDestroyedEvent,
|
||||
GetExceptionDetailsParams,
|
||||
GetExceptionDetailsResult,
|
||||
GetHeapUsageResult,
|
||||
GetIsolateIdResult,
|
||||
GetPropertiesParams,
|
||||
GetPropertiesResult,
|
||||
GlobalLexicalScopeNamesParams,
|
||||
GlobalLexicalScopeNamesResult,
|
||||
InspectRequestedEvent,
|
||||
QueryObjectsParams,
|
||||
QueryObjectsResult,
|
||||
ReleaseObjectGroupParams,
|
||||
ReleaseObjectParams,
|
||||
RemoveBindingParams,
|
||||
RunScriptParams,
|
||||
RunScriptResult,
|
||||
SetAsyncCallStackDepthParams,
|
||||
SetCustomObjectFormatterEnabledParams,
|
||||
SetMaxCallStackSizeToCaptureParams,
|
||||
} from '../domains/runtime'
|
||||
|
||||
export interface RuntimeApi {
|
||||
// ── Commands ──
|
||||
|
||||
awaitPromise(params: AwaitPromiseParams): Promise<AwaitPromiseResult>
|
||||
callFunctionOn(params: CallFunctionOnParams): Promise<CallFunctionOnResult>
|
||||
compileScript(params: CompileScriptParams): Promise<CompileScriptResult>
|
||||
disable(): Promise<void>
|
||||
discardConsoleEntries(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
evaluate(params: EvaluateParams): Promise<EvaluateResult>
|
||||
getIsolateId(): Promise<GetIsolateIdResult>
|
||||
getHeapUsage(): Promise<GetHeapUsageResult>
|
||||
getProperties(params: GetPropertiesParams): Promise<GetPropertiesResult>
|
||||
globalLexicalScopeNames(
|
||||
params?: GlobalLexicalScopeNamesParams,
|
||||
): Promise<GlobalLexicalScopeNamesResult>
|
||||
queryObjects(params: QueryObjectsParams): Promise<QueryObjectsResult>
|
||||
releaseObject(params: ReleaseObjectParams): Promise<void>
|
||||
releaseObjectGroup(params: ReleaseObjectGroupParams): Promise<void>
|
||||
runIfWaitingForDebugger(): Promise<void>
|
||||
runScript(params: RunScriptParams): Promise<RunScriptResult>
|
||||
setAsyncCallStackDepth(params: SetAsyncCallStackDepthParams): Promise<void>
|
||||
setCustomObjectFormatterEnabled(
|
||||
params: SetCustomObjectFormatterEnabledParams,
|
||||
): Promise<void>
|
||||
setMaxCallStackSizeToCapture(
|
||||
params: SetMaxCallStackSizeToCaptureParams,
|
||||
): Promise<void>
|
||||
terminateExecution(): Promise<void>
|
||||
addBinding(params: AddBindingParams): Promise<void>
|
||||
removeBinding(params: RemoveBindingParams): Promise<void>
|
||||
getExceptionDetails(
|
||||
params: GetExceptionDetailsParams,
|
||||
): Promise<GetExceptionDetailsResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'bindingCalled',
|
||||
handler: (params: BindingCalledEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'consoleAPICalled',
|
||||
handler: (params: ConsoleAPICalledEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'exceptionRevoked',
|
||||
handler: (params: ExceptionRevokedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'exceptionThrown',
|
||||
handler: (params: ExceptionThrownEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'executionContextCreated',
|
||||
handler: (params: ExecutionContextCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'executionContextDestroyed',
|
||||
handler: (params: ExecutionContextDestroyedEvent) => void,
|
||||
): () => void
|
||||
on(event: 'executionContextsCleared', handler: () => void): () => void
|
||||
on(
|
||||
event: 'inspectRequested',
|
||||
handler: (params: InspectRequestedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { GetDomainsResult } from '../domains/schema'
|
||||
|
||||
export interface SchemaApi {
|
||||
// ── Commands ──
|
||||
|
||||
getDomains(): Promise<GetDomainsResult>
|
||||
}
|
||||
39
packages/cdp-protocol/src/generated/domain-apis/security.ts
Normal file
39
packages/cdp-protocol/src/generated/domain-apis/security.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
CertificateErrorEvent,
|
||||
HandleCertificateErrorParams,
|
||||
SecurityStateChangedEvent,
|
||||
SetIgnoreCertificateErrorsParams,
|
||||
SetOverrideCertificateErrorsParams,
|
||||
VisibleSecurityStateChangedEvent,
|
||||
} from '../domains/security'
|
||||
|
||||
export interface SecurityApi {
|
||||
// ── Commands ──
|
||||
|
||||
disable(): Promise<void>
|
||||
enable(): Promise<void>
|
||||
setIgnoreCertificateErrors(
|
||||
params: SetIgnoreCertificateErrorsParams,
|
||||
): Promise<void>
|
||||
handleCertificateError(params: HandleCertificateErrorParams): Promise<void>
|
||||
setOverrideCertificateErrors(
|
||||
params: SetOverrideCertificateErrorsParams,
|
||||
): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'certificateError',
|
||||
handler: (params: CertificateErrorEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'visibleSecurityStateChanged',
|
||||
handler: (params: VisibleSecurityStateChangedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'securityStateChanged',
|
||||
handler: (params: SecurityStateChangedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
DeliverPushMessageParams,
|
||||
DispatchPeriodicSyncEventParams,
|
||||
DispatchSyncEventParams,
|
||||
SetForceUpdateOnPageLoadParams,
|
||||
SkipWaitingParams,
|
||||
StartWorkerParams,
|
||||
StopWorkerParams,
|
||||
UnregisterParams,
|
||||
UpdateRegistrationParams,
|
||||
WorkerErrorReportedEvent,
|
||||
WorkerRegistrationUpdatedEvent,
|
||||
WorkerVersionUpdatedEvent,
|
||||
} from '../domains/service-worker'
|
||||
|
||||
export interface ServiceWorkerApi {
|
||||
// ── Commands ──
|
||||
|
||||
deliverPushMessage(params: DeliverPushMessageParams): Promise<void>
|
||||
disable(): Promise<void>
|
||||
dispatchSyncEvent(params: DispatchSyncEventParams): Promise<void>
|
||||
dispatchPeriodicSyncEvent(
|
||||
params: DispatchPeriodicSyncEventParams,
|
||||
): Promise<void>
|
||||
enable(): Promise<void>
|
||||
setForceUpdateOnPageLoad(
|
||||
params: SetForceUpdateOnPageLoadParams,
|
||||
): Promise<void>
|
||||
skipWaiting(params: SkipWaitingParams): Promise<void>
|
||||
startWorker(params: StartWorkerParams): Promise<void>
|
||||
stopAllWorkers(): Promise<void>
|
||||
stopWorker(params: StopWorkerParams): Promise<void>
|
||||
unregister(params: UnregisterParams): Promise<void>
|
||||
updateRegistration(params: UpdateRegistrationParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'workerErrorReported',
|
||||
handler: (params: WorkerErrorReportedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'workerRegistrationUpdated',
|
||||
handler: (params: WorkerRegistrationUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'workerVersionUpdated',
|
||||
handler: (params: WorkerVersionUpdatedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
222
packages/cdp-protocol/src/generated/domain-apis/storage.ts
Normal file
222
packages/cdp-protocol/src/generated/domain-apis/storage.ts
Normal file
@@ -0,0 +1,222 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AttributionReportingReportSentEvent,
|
||||
AttributionReportingSourceRegisteredEvent,
|
||||
AttributionReportingTriggerRegisteredEvent,
|
||||
AttributionReportingVerboseDebugReportSentEvent,
|
||||
CacheStorageContentUpdatedEvent,
|
||||
CacheStorageListUpdatedEvent,
|
||||
ClearCookiesParams,
|
||||
ClearDataForOriginParams,
|
||||
ClearDataForStorageKeyParams,
|
||||
ClearSharedStorageEntriesParams,
|
||||
ClearTrustTokensParams,
|
||||
ClearTrustTokensResult,
|
||||
DeleteSharedStorageEntryParams,
|
||||
DeleteStorageBucketParams,
|
||||
GetAffectedUrlsForThirdPartyCookieMetadataParams,
|
||||
GetAffectedUrlsForThirdPartyCookieMetadataResult,
|
||||
GetCookiesParams,
|
||||
GetCookiesResult,
|
||||
GetInterestGroupDetailsParams,
|
||||
GetInterestGroupDetailsResult,
|
||||
GetRelatedWebsiteSetsResult,
|
||||
GetSharedStorageEntriesParams,
|
||||
GetSharedStorageEntriesResult,
|
||||
GetSharedStorageMetadataParams,
|
||||
GetSharedStorageMetadataResult,
|
||||
GetStorageKeyForFrameParams,
|
||||
GetStorageKeyForFrameResult,
|
||||
GetStorageKeyParams,
|
||||
GetStorageKeyResult,
|
||||
GetTrustTokensResult,
|
||||
GetUsageAndQuotaParams,
|
||||
GetUsageAndQuotaResult,
|
||||
IndexedDBContentUpdatedEvent,
|
||||
IndexedDBListUpdatedEvent,
|
||||
InterestGroupAccessedEvent,
|
||||
InterestGroupAuctionEventOccurredEvent,
|
||||
InterestGroupAuctionNetworkRequestCreatedEvent,
|
||||
OverrideQuotaForOriginParams,
|
||||
ResetSharedStorageBudgetParams,
|
||||
RunBounceTrackingMitigationsResult,
|
||||
SendPendingAttributionReportsResult,
|
||||
SetAttributionReportingLocalTestingModeParams,
|
||||
SetAttributionReportingTrackingParams,
|
||||
SetCookiesParams,
|
||||
SetInterestGroupAuctionTrackingParams,
|
||||
SetInterestGroupTrackingParams,
|
||||
SetProtectedAudienceKAnonymityParams,
|
||||
SetSharedStorageEntryParams,
|
||||
SetSharedStorageTrackingParams,
|
||||
SetStorageBucketTrackingParams,
|
||||
SharedStorageAccessedEvent,
|
||||
SharedStorageWorkletOperationExecutionFinishedEvent,
|
||||
StorageBucketCreatedOrUpdatedEvent,
|
||||
StorageBucketDeletedEvent,
|
||||
TrackCacheStorageForOriginParams,
|
||||
TrackCacheStorageForStorageKeyParams,
|
||||
TrackIndexedDBForOriginParams,
|
||||
TrackIndexedDBForStorageKeyParams,
|
||||
UntrackCacheStorageForOriginParams,
|
||||
UntrackCacheStorageForStorageKeyParams,
|
||||
UntrackIndexedDBForOriginParams,
|
||||
UntrackIndexedDBForStorageKeyParams,
|
||||
} from '../domains/storage'
|
||||
|
||||
export interface StorageApi {
|
||||
// ── Commands ──
|
||||
|
||||
getStorageKeyForFrame(
|
||||
params: GetStorageKeyForFrameParams,
|
||||
): Promise<GetStorageKeyForFrameResult>
|
||||
getStorageKey(params?: GetStorageKeyParams): Promise<GetStorageKeyResult>
|
||||
clearDataForOrigin(params: ClearDataForOriginParams): Promise<void>
|
||||
clearDataForStorageKey(params: ClearDataForStorageKeyParams): Promise<void>
|
||||
getCookies(params?: GetCookiesParams): Promise<GetCookiesResult>
|
||||
setCookies(params: SetCookiesParams): Promise<void>
|
||||
clearCookies(params?: ClearCookiesParams): Promise<void>
|
||||
getUsageAndQuota(
|
||||
params: GetUsageAndQuotaParams,
|
||||
): Promise<GetUsageAndQuotaResult>
|
||||
overrideQuotaForOrigin(params: OverrideQuotaForOriginParams): Promise<void>
|
||||
trackCacheStorageForOrigin(
|
||||
params: TrackCacheStorageForOriginParams,
|
||||
): Promise<void>
|
||||
trackCacheStorageForStorageKey(
|
||||
params: TrackCacheStorageForStorageKeyParams,
|
||||
): Promise<void>
|
||||
trackIndexedDBForOrigin(params: TrackIndexedDBForOriginParams): Promise<void>
|
||||
trackIndexedDBForStorageKey(
|
||||
params: TrackIndexedDBForStorageKeyParams,
|
||||
): Promise<void>
|
||||
untrackCacheStorageForOrigin(
|
||||
params: UntrackCacheStorageForOriginParams,
|
||||
): Promise<void>
|
||||
untrackCacheStorageForStorageKey(
|
||||
params: UntrackCacheStorageForStorageKeyParams,
|
||||
): Promise<void>
|
||||
untrackIndexedDBForOrigin(
|
||||
params: UntrackIndexedDBForOriginParams,
|
||||
): Promise<void>
|
||||
untrackIndexedDBForStorageKey(
|
||||
params: UntrackIndexedDBForStorageKeyParams,
|
||||
): Promise<void>
|
||||
getTrustTokens(): Promise<GetTrustTokensResult>
|
||||
clearTrustTokens(
|
||||
params: ClearTrustTokensParams,
|
||||
): Promise<ClearTrustTokensResult>
|
||||
getInterestGroupDetails(
|
||||
params: GetInterestGroupDetailsParams,
|
||||
): Promise<GetInterestGroupDetailsResult>
|
||||
setInterestGroupTracking(
|
||||
params: SetInterestGroupTrackingParams,
|
||||
): Promise<void>
|
||||
setInterestGroupAuctionTracking(
|
||||
params: SetInterestGroupAuctionTrackingParams,
|
||||
): Promise<void>
|
||||
getSharedStorageMetadata(
|
||||
params: GetSharedStorageMetadataParams,
|
||||
): Promise<GetSharedStorageMetadataResult>
|
||||
getSharedStorageEntries(
|
||||
params: GetSharedStorageEntriesParams,
|
||||
): Promise<GetSharedStorageEntriesResult>
|
||||
setSharedStorageEntry(params: SetSharedStorageEntryParams): Promise<void>
|
||||
deleteSharedStorageEntry(
|
||||
params: DeleteSharedStorageEntryParams,
|
||||
): Promise<void>
|
||||
clearSharedStorageEntries(
|
||||
params: ClearSharedStorageEntriesParams,
|
||||
): Promise<void>
|
||||
resetSharedStorageBudget(
|
||||
params: ResetSharedStorageBudgetParams,
|
||||
): Promise<void>
|
||||
setSharedStorageTracking(
|
||||
params: SetSharedStorageTrackingParams,
|
||||
): Promise<void>
|
||||
setStorageBucketTracking(
|
||||
params: SetStorageBucketTrackingParams,
|
||||
): Promise<void>
|
||||
deleteStorageBucket(params: DeleteStorageBucketParams): Promise<void>
|
||||
runBounceTrackingMitigations(): Promise<RunBounceTrackingMitigationsResult>
|
||||
setAttributionReportingLocalTestingMode(
|
||||
params: SetAttributionReportingLocalTestingModeParams,
|
||||
): Promise<void>
|
||||
setAttributionReportingTracking(
|
||||
params: SetAttributionReportingTrackingParams,
|
||||
): Promise<void>
|
||||
sendPendingAttributionReports(): Promise<SendPendingAttributionReportsResult>
|
||||
getRelatedWebsiteSets(): Promise<GetRelatedWebsiteSetsResult>
|
||||
getAffectedUrlsForThirdPartyCookieMetadata(
|
||||
params: GetAffectedUrlsForThirdPartyCookieMetadataParams,
|
||||
): Promise<GetAffectedUrlsForThirdPartyCookieMetadataResult>
|
||||
setProtectedAudienceKAnonymity(
|
||||
params: SetProtectedAudienceKAnonymityParams,
|
||||
): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'cacheStorageContentUpdated',
|
||||
handler: (params: CacheStorageContentUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'cacheStorageListUpdated',
|
||||
handler: (params: CacheStorageListUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'indexedDBContentUpdated',
|
||||
handler: (params: IndexedDBContentUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'indexedDBListUpdated',
|
||||
handler: (params: IndexedDBListUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'interestGroupAccessed',
|
||||
handler: (params: InterestGroupAccessedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'interestGroupAuctionEventOccurred',
|
||||
handler: (params: InterestGroupAuctionEventOccurredEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'interestGroupAuctionNetworkRequestCreated',
|
||||
handler: (params: InterestGroupAuctionNetworkRequestCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'sharedStorageAccessed',
|
||||
handler: (params: SharedStorageAccessedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'sharedStorageWorkletOperationExecutionFinished',
|
||||
handler: (
|
||||
params: SharedStorageWorkletOperationExecutionFinishedEvent,
|
||||
) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'storageBucketCreatedOrUpdated',
|
||||
handler: (params: StorageBucketCreatedOrUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'storageBucketDeleted',
|
||||
handler: (params: StorageBucketDeletedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'attributionReportingSourceRegistered',
|
||||
handler: (params: AttributionReportingSourceRegisteredEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'attributionReportingTriggerRegistered',
|
||||
handler: (params: AttributionReportingTriggerRegisteredEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'attributionReportingReportSent',
|
||||
handler: (params: AttributionReportingReportSentEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'attributionReportingVerboseDebugReportSent',
|
||||
handler: (params: AttributionReportingVerboseDebugReportSentEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
GetFeatureStateParams,
|
||||
GetFeatureStateResult,
|
||||
GetInfoResult,
|
||||
GetProcessInfoResult,
|
||||
} from '../domains/system-info'
|
||||
|
||||
export interface SystemInfoApi {
|
||||
// ── Commands ──
|
||||
|
||||
getInfo(): Promise<GetInfoResult>
|
||||
getFeatureState(params: GetFeatureStateParams): Promise<GetFeatureStateResult>
|
||||
getProcessInfo(): Promise<GetProcessInfoResult>
|
||||
}
|
||||
97
packages/cdp-protocol/src/generated/domain-apis/target.ts
Normal file
97
packages/cdp-protocol/src/generated/domain-apis/target.ts
Normal file
@@ -0,0 +1,97 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
ActivateTargetParams,
|
||||
AttachedToTargetEvent,
|
||||
AttachToBrowserTargetResult,
|
||||
AttachToTargetParams,
|
||||
AttachToTargetResult,
|
||||
AutoAttachRelatedParams,
|
||||
CloseTargetParams,
|
||||
CloseTargetResult,
|
||||
CreateBrowserContextParams,
|
||||
CreateBrowserContextResult,
|
||||
CreateTargetParams,
|
||||
CreateTargetResult,
|
||||
DetachedFromTargetEvent,
|
||||
DetachFromTargetParams,
|
||||
DisposeBrowserContextParams,
|
||||
ExposeDevToolsProtocolParams,
|
||||
GetBrowserContextsResult,
|
||||
GetDevToolsTargetParams,
|
||||
GetDevToolsTargetResult,
|
||||
GetTargetInfoParams,
|
||||
GetTargetInfoResult,
|
||||
GetTargetsParams,
|
||||
GetTargetsResult,
|
||||
OpenDevToolsParams,
|
||||
OpenDevToolsResult,
|
||||
ReceivedMessageFromTargetEvent,
|
||||
SendMessageToTargetParams,
|
||||
SetAutoAttachParams,
|
||||
SetDiscoverTargetsParams,
|
||||
SetRemoteLocationsParams,
|
||||
TargetCrashedEvent,
|
||||
TargetCreatedEvent,
|
||||
TargetDestroyedEvent,
|
||||
TargetInfoChangedEvent,
|
||||
} from '../domains/target'
|
||||
|
||||
export interface TargetApi {
|
||||
// ── Commands ──
|
||||
|
||||
activateTarget(params: ActivateTargetParams): Promise<void>
|
||||
attachToTarget(params: AttachToTargetParams): Promise<AttachToTargetResult>
|
||||
attachToBrowserTarget(): Promise<AttachToBrowserTargetResult>
|
||||
closeTarget(params: CloseTargetParams): Promise<CloseTargetResult>
|
||||
exposeDevToolsProtocol(params: ExposeDevToolsProtocolParams): Promise<void>
|
||||
createBrowserContext(
|
||||
params?: CreateBrowserContextParams,
|
||||
): Promise<CreateBrowserContextResult>
|
||||
getBrowserContexts(): Promise<GetBrowserContextsResult>
|
||||
createTarget(params: CreateTargetParams): Promise<CreateTargetResult>
|
||||
detachFromTarget(params?: DetachFromTargetParams): Promise<void>
|
||||
disposeBrowserContext(params: DisposeBrowserContextParams): Promise<void>
|
||||
getTargetInfo(params?: GetTargetInfoParams): Promise<GetTargetInfoResult>
|
||||
getTargets(params?: GetTargetsParams): Promise<GetTargetsResult>
|
||||
sendMessageToTarget(params: SendMessageToTargetParams): Promise<void>
|
||||
setAutoAttach(params: SetAutoAttachParams): Promise<void>
|
||||
autoAttachRelated(params: AutoAttachRelatedParams): Promise<void>
|
||||
setDiscoverTargets(params: SetDiscoverTargetsParams): Promise<void>
|
||||
setRemoteLocations(params: SetRemoteLocationsParams): Promise<void>
|
||||
getDevToolsTarget(
|
||||
params: GetDevToolsTargetParams,
|
||||
): Promise<GetDevToolsTargetResult>
|
||||
openDevTools(params: OpenDevToolsParams): Promise<OpenDevToolsResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'attachedToTarget',
|
||||
handler: (params: AttachedToTargetEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'detachedFromTarget',
|
||||
handler: (params: DetachedFromTargetEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'receivedMessageFromTarget',
|
||||
handler: (params: ReceivedMessageFromTargetEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'targetCreated',
|
||||
handler: (params: TargetCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'targetDestroyed',
|
||||
handler: (params: TargetDestroyedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'targetCrashed',
|
||||
handler: (params: TargetCrashedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'targetInfoChanged',
|
||||
handler: (params: TargetInfoChangedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
18
packages/cdp-protocol/src/generated/domain-apis/tethering.ts
Normal file
18
packages/cdp-protocol/src/generated/domain-apis/tethering.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AcceptedEvent,
|
||||
BindParams,
|
||||
UnbindParams,
|
||||
} from '../domains/tethering'
|
||||
|
||||
export interface TetheringApi {
|
||||
// ── Commands ──
|
||||
|
||||
bind(params: BindParams): Promise<void>
|
||||
unbind(params: UnbindParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(event: 'accepted', handler: (params: AcceptedEvent) => void): () => void
|
||||
}
|
||||
41
packages/cdp-protocol/src/generated/domain-apis/tracing.ts
Normal file
41
packages/cdp-protocol/src/generated/domain-apis/tracing.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
BufferUsageEvent,
|
||||
DataCollectedEvent,
|
||||
GetCategoriesResult,
|
||||
GetTrackEventDescriptorResult,
|
||||
RecordClockSyncMarkerParams,
|
||||
RequestMemoryDumpParams,
|
||||
RequestMemoryDumpResult,
|
||||
StartParams,
|
||||
TracingCompleteEvent,
|
||||
} from '../domains/tracing'
|
||||
|
||||
export interface TracingApi {
|
||||
// ── Commands ──
|
||||
|
||||
end(): Promise<void>
|
||||
getCategories(): Promise<GetCategoriesResult>
|
||||
getTrackEventDescriptor(): Promise<GetTrackEventDescriptorResult>
|
||||
recordClockSyncMarker(params: RecordClockSyncMarkerParams): Promise<void>
|
||||
requestMemoryDump(
|
||||
params?: RequestMemoryDumpParams,
|
||||
): Promise<RequestMemoryDumpResult>
|
||||
start(params?: StartParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'bufferUsage',
|
||||
handler: (params: BufferUsageEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'dataCollected',
|
||||
handler: (params: DataCollectedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'tracingComplete',
|
||||
handler: (params: TracingCompleteEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
82
packages/cdp-protocol/src/generated/domain-apis/web-audio.ts
Normal file
82
packages/cdp-protocol/src/generated/domain-apis/web-audio.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AudioListenerCreatedEvent,
|
||||
AudioListenerWillBeDestroyedEvent,
|
||||
AudioNodeCreatedEvent,
|
||||
AudioNodeWillBeDestroyedEvent,
|
||||
AudioParamCreatedEvent,
|
||||
AudioParamWillBeDestroyedEvent,
|
||||
ContextChangedEvent,
|
||||
ContextCreatedEvent,
|
||||
ContextWillBeDestroyedEvent,
|
||||
GetRealtimeDataParams,
|
||||
GetRealtimeDataResult,
|
||||
NodeParamConnectedEvent,
|
||||
NodeParamDisconnectedEvent,
|
||||
NodesConnectedEvent,
|
||||
NodesDisconnectedEvent,
|
||||
} from '../domains/web-audio'
|
||||
|
||||
export interface WebAudioApi {
|
||||
// ── Commands ──
|
||||
|
||||
enable(): Promise<void>
|
||||
disable(): Promise<void>
|
||||
getRealtimeData(params: GetRealtimeDataParams): Promise<GetRealtimeDataResult>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'contextCreated',
|
||||
handler: (params: ContextCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'contextWillBeDestroyed',
|
||||
handler: (params: ContextWillBeDestroyedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'contextChanged',
|
||||
handler: (params: ContextChangedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'audioListenerCreated',
|
||||
handler: (params: AudioListenerCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'audioListenerWillBeDestroyed',
|
||||
handler: (params: AudioListenerWillBeDestroyedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'audioNodeCreated',
|
||||
handler: (params: AudioNodeCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'audioNodeWillBeDestroyed',
|
||||
handler: (params: AudioNodeWillBeDestroyedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'audioParamCreated',
|
||||
handler: (params: AudioParamCreatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'audioParamWillBeDestroyed',
|
||||
handler: (params: AudioParamWillBeDestroyedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'nodesConnected',
|
||||
handler: (params: NodesConnectedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'nodesDisconnected',
|
||||
handler: (params: NodesDisconnectedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'nodeParamConnected',
|
||||
handler: (params: NodeParamConnectedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'nodeParamDisconnected',
|
||||
handler: (params: NodeParamDisconnectedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
66
packages/cdp-protocol/src/generated/domain-apis/web-authn.ts
Normal file
66
packages/cdp-protocol/src/generated/domain-apis/web-authn.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
AddCredentialParams,
|
||||
AddVirtualAuthenticatorParams,
|
||||
AddVirtualAuthenticatorResult,
|
||||
ClearCredentialsParams,
|
||||
CredentialAddedEvent,
|
||||
CredentialAssertedEvent,
|
||||
CredentialDeletedEvent,
|
||||
CredentialUpdatedEvent,
|
||||
EnableParams,
|
||||
GetCredentialParams,
|
||||
GetCredentialResult,
|
||||
GetCredentialsParams,
|
||||
GetCredentialsResult,
|
||||
RemoveCredentialParams,
|
||||
RemoveVirtualAuthenticatorParams,
|
||||
SetAutomaticPresenceSimulationParams,
|
||||
SetCredentialPropertiesParams,
|
||||
SetResponseOverrideBitsParams,
|
||||
SetUserVerifiedParams,
|
||||
} from '../domains/web-authn'
|
||||
|
||||
export interface WebAuthnApi {
|
||||
// ── Commands ──
|
||||
|
||||
enable(params?: EnableParams): Promise<void>
|
||||
disable(): Promise<void>
|
||||
addVirtualAuthenticator(
|
||||
params: AddVirtualAuthenticatorParams,
|
||||
): Promise<AddVirtualAuthenticatorResult>
|
||||
setResponseOverrideBits(params: SetResponseOverrideBitsParams): Promise<void>
|
||||
removeVirtualAuthenticator(
|
||||
params: RemoveVirtualAuthenticatorParams,
|
||||
): Promise<void>
|
||||
addCredential(params: AddCredentialParams): Promise<void>
|
||||
getCredential(params: GetCredentialParams): Promise<GetCredentialResult>
|
||||
getCredentials(params: GetCredentialsParams): Promise<GetCredentialsResult>
|
||||
removeCredential(params: RemoveCredentialParams): Promise<void>
|
||||
clearCredentials(params: ClearCredentialsParams): Promise<void>
|
||||
setUserVerified(params: SetUserVerifiedParams): Promise<void>
|
||||
setAutomaticPresenceSimulation(
|
||||
params: SetAutomaticPresenceSimulationParams,
|
||||
): Promise<void>
|
||||
setCredentialProperties(params: SetCredentialPropertiesParams): Promise<void>
|
||||
|
||||
// ── Events ──
|
||||
|
||||
on(
|
||||
event: 'credentialAdded',
|
||||
handler: (params: CredentialAddedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'credentialDeleted',
|
||||
handler: (params: CredentialDeletedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'credentialUpdated',
|
||||
handler: (params: CredentialUpdatedEvent) => void,
|
||||
): () => void
|
||||
on(
|
||||
event: 'credentialAsserted',
|
||||
handler: (params: CredentialAssertedEvent) => void,
|
||||
): () => void
|
||||
}
|
||||
225
packages/cdp-protocol/src/generated/domains/accessibility.ts
Normal file
225
packages/cdp-protocol/src/generated/domains/accessibility.ts
Normal file
@@ -0,0 +1,225 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { BackendNodeId, NodeId } from './dom'
|
||||
import type { FrameId } from './page'
|
||||
import type { RemoteObjectId } from './runtime'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type AXNodeId = string
|
||||
|
||||
export type AXValueType =
|
||||
| 'boolean'
|
||||
| 'tristate'
|
||||
| 'booleanOrUndefined'
|
||||
| 'idref'
|
||||
| 'idrefList'
|
||||
| 'integer'
|
||||
| 'node'
|
||||
| 'nodeList'
|
||||
| 'number'
|
||||
| 'string'
|
||||
| 'computedString'
|
||||
| 'token'
|
||||
| 'tokenList'
|
||||
| 'domRelation'
|
||||
| 'role'
|
||||
| 'internalRole'
|
||||
| 'valueUndefined'
|
||||
|
||||
export type AXValueSourceType =
|
||||
| 'attribute'
|
||||
| 'implicit'
|
||||
| 'style'
|
||||
| 'contents'
|
||||
| 'placeholder'
|
||||
| 'relatedElement'
|
||||
|
||||
export type AXValueNativeSourceType =
|
||||
| 'description'
|
||||
| 'figcaption'
|
||||
| 'label'
|
||||
| 'labelfor'
|
||||
| 'labelwrapped'
|
||||
| 'legend'
|
||||
| 'rubyannotation'
|
||||
| 'tablecaption'
|
||||
| 'title'
|
||||
| 'other'
|
||||
|
||||
export interface AXValueSource {
|
||||
type: AXValueSourceType
|
||||
value?: AXValue
|
||||
attribute?: string
|
||||
attributeValue?: AXValue
|
||||
superseded?: boolean
|
||||
nativeSource?: AXValueNativeSourceType
|
||||
nativeSourceValue?: AXValue
|
||||
invalid?: boolean
|
||||
invalidReason?: string
|
||||
}
|
||||
|
||||
export interface AXRelatedNode {
|
||||
backendDOMNodeId: BackendNodeId
|
||||
idref?: string
|
||||
text?: string
|
||||
}
|
||||
|
||||
export interface AXProperty {
|
||||
name: AXPropertyName
|
||||
value: AXValue
|
||||
}
|
||||
|
||||
export interface AXValue {
|
||||
type: AXValueType
|
||||
value?: unknown
|
||||
relatedNodes?: AXRelatedNode[]
|
||||
sources?: AXValueSource[]
|
||||
}
|
||||
|
||||
export type AXPropertyName =
|
||||
| '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'
|
||||
|
||||
export interface AXNode {
|
||||
nodeId: AXNodeId
|
||||
ignored: boolean
|
||||
ignoredReasons?: AXProperty[]
|
||||
role?: AXValue
|
||||
chromeRole?: AXValue
|
||||
name?: AXValue
|
||||
description?: AXValue
|
||||
value?: AXValue
|
||||
properties?: AXProperty[]
|
||||
parentId?: AXNodeId
|
||||
childIds?: AXNodeId[]
|
||||
backendDOMNodeId?: BackendNodeId
|
||||
frameId?: FrameId
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface GetPartialAXTreeParams {
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectId?: RemoteObjectId
|
||||
fetchRelatives?: boolean
|
||||
}
|
||||
|
||||
export interface GetPartialAXTreeResult {
|
||||
nodes: AXNode[]
|
||||
}
|
||||
|
||||
export interface GetFullAXTreeParams {
|
||||
depth?: number
|
||||
frameId?: FrameId
|
||||
}
|
||||
|
||||
export interface GetFullAXTreeResult {
|
||||
nodes: AXNode[]
|
||||
}
|
||||
|
||||
export interface GetRootAXNodeParams {
|
||||
frameId?: FrameId
|
||||
}
|
||||
|
||||
export interface GetRootAXNodeResult {
|
||||
node: AXNode
|
||||
}
|
||||
|
||||
export interface GetAXNodeAndAncestorsParams {
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectId?: RemoteObjectId
|
||||
}
|
||||
|
||||
export interface GetAXNodeAndAncestorsResult {
|
||||
nodes: AXNode[]
|
||||
}
|
||||
|
||||
export interface GetChildAXNodesParams {
|
||||
id: AXNodeId
|
||||
frameId?: FrameId
|
||||
}
|
||||
|
||||
export interface GetChildAXNodesResult {
|
||||
nodes: AXNode[]
|
||||
}
|
||||
|
||||
export interface QueryAXTreeParams {
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectId?: RemoteObjectId
|
||||
accessibleName?: string
|
||||
role?: string
|
||||
}
|
||||
|
||||
export interface QueryAXTreeResult {
|
||||
nodes: AXNode[]
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface LoadCompleteEvent {
|
||||
root: AXNode
|
||||
}
|
||||
|
||||
export interface NodesUpdatedEvent {
|
||||
nodes: AXNode[]
|
||||
}
|
||||
115
packages/cdp-protocol/src/generated/domains/animation.ts
Normal file
115
packages/cdp-protocol/src/generated/domains/animation.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { BackendNodeId, ScrollOrientation } from './dom'
|
||||
import type { RemoteObject } from './runtime'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface Animation {
|
||||
id: string
|
||||
name: string
|
||||
pausedState: boolean
|
||||
playState: string
|
||||
playbackRate: number
|
||||
startTime: number
|
||||
currentTime: number
|
||||
type: 'CSSTransition' | 'CSSAnimation' | 'WebAnimation'
|
||||
source?: AnimationEffect
|
||||
cssId?: string
|
||||
viewOrScrollTimeline?: ViewOrScrollTimeline
|
||||
}
|
||||
|
||||
export interface ViewOrScrollTimeline {
|
||||
sourceNodeId?: BackendNodeId
|
||||
startOffset?: number
|
||||
endOffset?: number
|
||||
subjectNodeId?: BackendNodeId
|
||||
axis: ScrollOrientation
|
||||
}
|
||||
|
||||
export interface AnimationEffect {
|
||||
delay: number
|
||||
endDelay: number
|
||||
iterationStart: number
|
||||
iterations?: number
|
||||
duration: number
|
||||
direction: string
|
||||
fill: string
|
||||
backendNodeId?: BackendNodeId
|
||||
keyframesRule?: KeyframesRule
|
||||
easing: string
|
||||
}
|
||||
|
||||
export interface KeyframesRule {
|
||||
name?: string
|
||||
keyframes: KeyframeStyle[]
|
||||
}
|
||||
|
||||
export interface KeyframeStyle {
|
||||
offset: string
|
||||
easing: string
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface GetCurrentTimeParams {
|
||||
id: string
|
||||
}
|
||||
|
||||
export interface GetCurrentTimeResult {
|
||||
currentTime: number
|
||||
}
|
||||
|
||||
export interface GetPlaybackRateResult {
|
||||
playbackRate: number
|
||||
}
|
||||
|
||||
export interface ReleaseAnimationsParams {
|
||||
animations: string[]
|
||||
}
|
||||
|
||||
export interface ResolveAnimationParams {
|
||||
animationId: string
|
||||
}
|
||||
|
||||
export interface ResolveAnimationResult {
|
||||
remoteObject: RemoteObject
|
||||
}
|
||||
|
||||
export interface SeekAnimationsParams {
|
||||
animations: string[]
|
||||
currentTime: number
|
||||
}
|
||||
|
||||
export interface SetPausedParams {
|
||||
animations: string[]
|
||||
paused: boolean
|
||||
}
|
||||
|
||||
export interface SetPlaybackRateParams {
|
||||
playbackRate: number
|
||||
}
|
||||
|
||||
export interface SetTimingParams {
|
||||
animationId: string
|
||||
duration: number
|
||||
delay: number
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface AnimationCanceledEvent {
|
||||
id: string
|
||||
}
|
||||
|
||||
export interface AnimationCreatedEvent {
|
||||
id: string
|
||||
}
|
||||
|
||||
export interface AnimationStartedEvent {
|
||||
animation: Animation
|
||||
}
|
||||
|
||||
export interface AnimationUpdatedEvent {
|
||||
animation: Animation
|
||||
}
|
||||
634
packages/cdp-protocol/src/generated/domains/audits.ts
Normal file
634
packages/cdp-protocol/src/generated/domains/audits.ts
Normal file
@@ -0,0 +1,634 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { BackendNodeId } from './dom'
|
||||
import type {
|
||||
ClientSecurityState,
|
||||
CorsErrorStatus,
|
||||
IPAddressSpace,
|
||||
LoaderId,
|
||||
RequestId,
|
||||
} from './network'
|
||||
import type { FrameId } from './page'
|
||||
import type { ScriptId } from './runtime'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface AffectedCookie {
|
||||
name: string
|
||||
path: string
|
||||
domain: string
|
||||
}
|
||||
|
||||
export interface AffectedRequest {
|
||||
requestId?: RequestId
|
||||
url: string
|
||||
}
|
||||
|
||||
export interface AffectedFrame {
|
||||
frameId: FrameId
|
||||
}
|
||||
|
||||
export type CookieExclusionReason =
|
||||
| 'ExcludeSameSiteUnspecifiedTreatedAsLax'
|
||||
| 'ExcludeSameSiteNoneInsecure'
|
||||
| 'ExcludeSameSiteLax'
|
||||
| 'ExcludeSameSiteStrict'
|
||||
| 'ExcludeInvalidSameParty'
|
||||
| 'ExcludeSamePartyCrossPartyContext'
|
||||
| 'ExcludeDomainNonASCII'
|
||||
| 'ExcludeThirdPartyCookieBlockedInFirstPartySet'
|
||||
| 'ExcludeThirdPartyPhaseout'
|
||||
| 'ExcludePortMismatch'
|
||||
| 'ExcludeSchemeMismatch'
|
||||
|
||||
export type CookieWarningReason =
|
||||
| 'WarnSameSiteUnspecifiedCrossSiteContext'
|
||||
| 'WarnSameSiteNoneInsecure'
|
||||
| 'WarnSameSiteUnspecifiedLaxAllowUnsafe'
|
||||
| 'WarnSameSiteStrictLaxDowngradeStrict'
|
||||
| 'WarnSameSiteStrictCrossDowngradeStrict'
|
||||
| 'WarnSameSiteStrictCrossDowngradeLax'
|
||||
| 'WarnSameSiteLaxCrossDowngradeStrict'
|
||||
| 'WarnSameSiteLaxCrossDowngradeLax'
|
||||
| 'WarnAttributeValueExceedsMaxSize'
|
||||
| 'WarnDomainNonASCII'
|
||||
| 'WarnThirdPartyPhaseout'
|
||||
| 'WarnCrossSiteRedirectDowngradeChangesInclusion'
|
||||
| 'WarnDeprecationTrialMetadata'
|
||||
| 'WarnThirdPartyCookieHeuristic'
|
||||
|
||||
export type CookieOperation = 'SetCookie' | 'ReadCookie'
|
||||
|
||||
export type InsightType = 'GitHubResource' | 'GracePeriod' | 'Heuristics'
|
||||
|
||||
export interface CookieIssueInsight {
|
||||
type: InsightType
|
||||
tableEntryUrl?: string
|
||||
}
|
||||
|
||||
export interface CookieIssueDetails {
|
||||
cookie?: AffectedCookie
|
||||
rawCookieLine?: string
|
||||
cookieWarningReasons: CookieWarningReason[]
|
||||
cookieExclusionReasons: CookieExclusionReason[]
|
||||
operation: CookieOperation
|
||||
siteForCookies?: string
|
||||
cookieUrl?: string
|
||||
request?: AffectedRequest
|
||||
insight?: CookieIssueInsight
|
||||
}
|
||||
|
||||
export type MixedContentResolutionStatus =
|
||||
| 'MixedContentBlocked'
|
||||
| 'MixedContentAutomaticallyUpgraded'
|
||||
| 'MixedContentWarning'
|
||||
|
||||
export type MixedContentResourceType =
|
||||
| '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'
|
||||
|
||||
export interface MixedContentIssueDetails {
|
||||
resourceType?: MixedContentResourceType
|
||||
resolutionStatus: MixedContentResolutionStatus
|
||||
insecureURL: string
|
||||
mainResourceURL: string
|
||||
request?: AffectedRequest
|
||||
frame?: AffectedFrame
|
||||
}
|
||||
|
||||
export type BlockedByResponseReason =
|
||||
| 'CoepFrameResourceNeedsCoepHeader'
|
||||
| 'CoopSandboxedIFrameCannotNavigateToCoopPage'
|
||||
| 'CorpNotSameOrigin'
|
||||
| 'CorpNotSameOriginAfterDefaultedToSameOriginByCoep'
|
||||
| 'CorpNotSameOriginAfterDefaultedToSameOriginByDip'
|
||||
| 'CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip'
|
||||
| 'CorpNotSameSite'
|
||||
| 'SRIMessageSignatureMismatch'
|
||||
|
||||
export interface BlockedByResponseIssueDetails {
|
||||
request: AffectedRequest
|
||||
parentFrame?: AffectedFrame
|
||||
blockedFrame?: AffectedFrame
|
||||
reason: BlockedByResponseReason
|
||||
}
|
||||
|
||||
export type HeavyAdResolutionStatus = 'HeavyAdBlocked' | 'HeavyAdWarning'
|
||||
|
||||
export type HeavyAdReason =
|
||||
| 'NetworkTotalLimit'
|
||||
| 'CpuTotalLimit'
|
||||
| 'CpuPeakLimit'
|
||||
|
||||
export interface HeavyAdIssueDetails {
|
||||
resolution: HeavyAdResolutionStatus
|
||||
reason: HeavyAdReason
|
||||
frame: AffectedFrame
|
||||
}
|
||||
|
||||
export type ContentSecurityPolicyViolationType =
|
||||
| 'kInlineViolation'
|
||||
| 'kEvalViolation'
|
||||
| 'kURLViolation'
|
||||
| 'kSRIViolation'
|
||||
| 'kTrustedTypesSinkViolation'
|
||||
| 'kTrustedTypesPolicyViolation'
|
||||
| 'kWasmEvalViolation'
|
||||
|
||||
export interface SourceCodeLocation {
|
||||
scriptId?: ScriptId
|
||||
url: string
|
||||
lineNumber: number
|
||||
columnNumber: number
|
||||
}
|
||||
|
||||
export interface ContentSecurityPolicyIssueDetails {
|
||||
blockedURL?: string
|
||||
violatedDirective: string
|
||||
isReportOnly: boolean
|
||||
contentSecurityPolicyViolationType: ContentSecurityPolicyViolationType
|
||||
frameAncestor?: AffectedFrame
|
||||
sourceCodeLocation?: SourceCodeLocation
|
||||
violatingNodeId?: BackendNodeId
|
||||
}
|
||||
|
||||
export type SharedArrayBufferIssueType = 'TransferIssue' | 'CreationIssue'
|
||||
|
||||
export interface SharedArrayBufferIssueDetails {
|
||||
sourceCodeLocation: SourceCodeLocation
|
||||
isWarning: boolean
|
||||
type: SharedArrayBufferIssueType
|
||||
}
|
||||
|
||||
export interface LowTextContrastIssueDetails {
|
||||
violatingNodeId: BackendNodeId
|
||||
violatingNodeSelector: string
|
||||
contrastRatio: number
|
||||
thresholdAA: number
|
||||
thresholdAAA: number
|
||||
fontSize: string
|
||||
fontWeight: string
|
||||
}
|
||||
|
||||
export interface CorsIssueDetails {
|
||||
corsErrorStatus: CorsErrorStatus
|
||||
isWarning: boolean
|
||||
request: AffectedRequest
|
||||
location?: SourceCodeLocation
|
||||
initiatorOrigin?: string
|
||||
resourceIPAddressSpace?: IPAddressSpace
|
||||
clientSecurityState?: ClientSecurityState
|
||||
}
|
||||
|
||||
export type AttributionReportingIssueType =
|
||||
| 'PermissionPolicyDisabled'
|
||||
| 'UntrustworthyReportingOrigin'
|
||||
| 'InsecureContext'
|
||||
| 'InvalidHeader'
|
||||
| 'InvalidRegisterTriggerHeader'
|
||||
| 'SourceAndTriggerHeaders'
|
||||
| 'SourceIgnored'
|
||||
| 'TriggerIgnored'
|
||||
| 'OsSourceIgnored'
|
||||
| 'OsTriggerIgnored'
|
||||
| 'InvalidRegisterOsSourceHeader'
|
||||
| 'InvalidRegisterOsTriggerHeader'
|
||||
| 'WebAndOsHeaders'
|
||||
| 'NoWebOrOsSupport'
|
||||
| 'NavigationRegistrationWithoutTransientUserActivation'
|
||||
| 'InvalidInfoHeader'
|
||||
| 'NoRegisterSourceHeader'
|
||||
| 'NoRegisterTriggerHeader'
|
||||
| 'NoRegisterOsSourceHeader'
|
||||
| 'NoRegisterOsTriggerHeader'
|
||||
| 'NavigationRegistrationUniqueScopeAlreadySet'
|
||||
|
||||
export type SharedDictionaryError =
|
||||
| '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'
|
||||
|
||||
export type SRIMessageSignatureError =
|
||||
| 'MissingSignatureHeader'
|
||||
| 'MissingSignatureInputHeader'
|
||||
| 'InvalidSignatureHeader'
|
||||
| 'InvalidSignatureInputHeader'
|
||||
| 'SignatureHeaderValueIsNotByteSequence'
|
||||
| 'SignatureHeaderValueIsParameterized'
|
||||
| 'SignatureHeaderValueIsIncorrectLength'
|
||||
| 'SignatureInputHeaderMissingLabel'
|
||||
| 'SignatureInputHeaderValueNotInnerList'
|
||||
| 'SignatureInputHeaderValueMissingComponents'
|
||||
| 'SignatureInputHeaderInvalidComponentType'
|
||||
| 'SignatureInputHeaderInvalidComponentName'
|
||||
| 'SignatureInputHeaderInvalidHeaderComponentParameter'
|
||||
| 'SignatureInputHeaderInvalidDerivedComponentParameter'
|
||||
| 'SignatureInputHeaderKeyIdLength'
|
||||
| 'SignatureInputHeaderInvalidParameter'
|
||||
| 'SignatureInputHeaderMissingRequiredParameters'
|
||||
| 'ValidationFailedSignatureExpired'
|
||||
| 'ValidationFailedInvalidLength'
|
||||
| 'ValidationFailedSignatureMismatch'
|
||||
| 'ValidationFailedIntegrityMismatch'
|
||||
|
||||
export type UnencodedDigestError =
|
||||
| 'MalformedDictionary'
|
||||
| 'UnknownAlgorithm'
|
||||
| 'IncorrectDigestType'
|
||||
| 'IncorrectDigestLength'
|
||||
|
||||
export interface AttributionReportingIssueDetails {
|
||||
violationType: AttributionReportingIssueType
|
||||
request?: AffectedRequest
|
||||
violatingNodeId?: BackendNodeId
|
||||
invalidParameter?: string
|
||||
}
|
||||
|
||||
export interface QuirksModeIssueDetails {
|
||||
isLimitedQuirksMode: boolean
|
||||
documentNodeId: BackendNodeId
|
||||
url: string
|
||||
frameId: FrameId
|
||||
loaderId: LoaderId
|
||||
}
|
||||
|
||||
export interface NavigatorUserAgentIssueDetails {
|
||||
url: string
|
||||
location?: SourceCodeLocation
|
||||
}
|
||||
|
||||
export interface SharedDictionaryIssueDetails {
|
||||
sharedDictionaryError: SharedDictionaryError
|
||||
request: AffectedRequest
|
||||
}
|
||||
|
||||
export interface SRIMessageSignatureIssueDetails {
|
||||
error: SRIMessageSignatureError
|
||||
signatureBase: string
|
||||
integrityAssertions: string[]
|
||||
request: AffectedRequest
|
||||
}
|
||||
|
||||
export interface UnencodedDigestIssueDetails {
|
||||
error: UnencodedDigestError
|
||||
request: AffectedRequest
|
||||
}
|
||||
|
||||
export type GenericIssueErrorType =
|
||||
| 'FormLabelForNameError'
|
||||
| 'FormDuplicateIdForInputError'
|
||||
| 'FormInputWithNoLabelError'
|
||||
| 'FormAutocompleteAttributeEmptyError'
|
||||
| 'FormEmptyIdAndNameAttributesForInputError'
|
||||
| 'FormAriaLabelledByToNonExistingIdError'
|
||||
| 'FormInputAssignedAutocompleteValueToIdOrNameAttributeError'
|
||||
| 'FormLabelHasNeitherForNorNestedInputError'
|
||||
| 'FormLabelForMatchesNonExistingIdError'
|
||||
| 'FormInputHasWrongButWellIntendedAutocompleteValueError'
|
||||
| 'ResponseWasBlockedByORB'
|
||||
| 'NavigationEntryMarkedSkippable'
|
||||
| 'AutofillAndManualTextPolicyControlledFeaturesInfo'
|
||||
| 'AutofillPolicyControlledFeatureInfo'
|
||||
| 'ManualTextPolicyControlledFeatureInfo'
|
||||
|
||||
export interface GenericIssueDetails {
|
||||
errorType: GenericIssueErrorType
|
||||
frameId?: FrameId
|
||||
violatingNodeId?: BackendNodeId
|
||||
violatingNodeAttribute?: string
|
||||
request?: AffectedRequest
|
||||
}
|
||||
|
||||
export interface DeprecationIssueDetails {
|
||||
affectedFrame?: AffectedFrame
|
||||
sourceCodeLocation: SourceCodeLocation
|
||||
type: string
|
||||
}
|
||||
|
||||
export interface BounceTrackingIssueDetails {
|
||||
trackingSites: string[]
|
||||
}
|
||||
|
||||
export interface CookieDeprecationMetadataIssueDetails {
|
||||
allowedSites: string[]
|
||||
optOutPercentage: number
|
||||
isOptOutTopLevel: boolean
|
||||
operation: CookieOperation
|
||||
}
|
||||
|
||||
export type ClientHintIssueReason =
|
||||
| 'MetaTagAllowListInvalidOrigin'
|
||||
| 'MetaTagModifiedHTML'
|
||||
|
||||
export interface FederatedAuthRequestIssueDetails {
|
||||
federatedAuthRequestIssueReason: FederatedAuthRequestIssueReason
|
||||
}
|
||||
|
||||
export type FederatedAuthRequestIssueReason =
|
||||
| 'ShouldEmbargo'
|
||||
| 'TooManyRequests'
|
||||
| 'WellKnownHttpNotFound'
|
||||
| 'WellKnownNoResponse'
|
||||
| 'WellKnownInvalidResponse'
|
||||
| 'WellKnownListEmpty'
|
||||
| 'WellKnownInvalidContentType'
|
||||
| 'ConfigNotInWellKnown'
|
||||
| 'WellKnownTooBig'
|
||||
| 'ConfigHttpNotFound'
|
||||
| 'ConfigNoResponse'
|
||||
| 'ConfigInvalidResponse'
|
||||
| 'ConfigInvalidContentType'
|
||||
| 'ClientMetadataHttpNotFound'
|
||||
| 'ClientMetadataNoResponse'
|
||||
| 'ClientMetadataInvalidResponse'
|
||||
| 'ClientMetadataInvalidContentType'
|
||||
| 'IdpNotPotentiallyTrustworthy'
|
||||
| 'DisabledInSettings'
|
||||
| 'DisabledInFlags'
|
||||
| 'ErrorFetchingSignin'
|
||||
| 'InvalidSigninResponse'
|
||||
| 'AccountsHttpNotFound'
|
||||
| 'AccountsNoResponse'
|
||||
| 'AccountsInvalidResponse'
|
||||
| 'AccountsListEmpty'
|
||||
| 'AccountsInvalidContentType'
|
||||
| 'IdTokenHttpNotFound'
|
||||
| 'IdTokenNoResponse'
|
||||
| 'IdTokenInvalidResponse'
|
||||
| 'IdTokenIdpErrorResponse'
|
||||
| 'IdTokenCrossSiteIdpErrorResponse'
|
||||
| 'IdTokenInvalidRequest'
|
||||
| 'IdTokenInvalidContentType'
|
||||
| 'ErrorIdToken'
|
||||
| 'Canceled'
|
||||
| 'RpPageNotVisible'
|
||||
| 'SilentMediationFailure'
|
||||
| 'ThirdPartyCookiesBlocked'
|
||||
| 'NotSignedInWithIdp'
|
||||
| 'MissingTransientUserActivation'
|
||||
| 'ReplacedByActiveMode'
|
||||
| 'InvalidFieldsSpecified'
|
||||
| 'RelyingPartyOriginIsOpaque'
|
||||
| 'TypeNotMatching'
|
||||
| 'UiDismissedNoEmbargo'
|
||||
| 'CorsError'
|
||||
| 'SuppressedBySegmentationPlatform'
|
||||
|
||||
export interface FederatedAuthUserInfoRequestIssueDetails {
|
||||
federatedAuthUserInfoRequestIssueReason: FederatedAuthUserInfoRequestIssueReason
|
||||
}
|
||||
|
||||
export type FederatedAuthUserInfoRequestIssueReason =
|
||||
| 'NotSameOrigin'
|
||||
| 'NotIframe'
|
||||
| 'NotPotentiallyTrustworthy'
|
||||
| 'NoApiPermission'
|
||||
| 'NotSignedInWithIdp'
|
||||
| 'NoAccountSharingPermission'
|
||||
| 'InvalidConfigOrWellKnown'
|
||||
| 'InvalidAccountsResponse'
|
||||
| 'NoReturningUserFromFetchedAccounts'
|
||||
|
||||
export interface ClientHintIssueDetails {
|
||||
sourceCodeLocation: SourceCodeLocation
|
||||
clientHintIssueReason: ClientHintIssueReason
|
||||
}
|
||||
|
||||
export interface FailedRequestInfo {
|
||||
url: string
|
||||
failureMessage: string
|
||||
requestId?: RequestId
|
||||
}
|
||||
|
||||
export type PartitioningBlobURLInfo =
|
||||
| 'BlockedCrossPartitionFetching'
|
||||
| 'EnforceNoopenerForNavigation'
|
||||
|
||||
export interface PartitioningBlobURLIssueDetails {
|
||||
url: string
|
||||
partitioningBlobURLInfo: PartitioningBlobURLInfo
|
||||
}
|
||||
|
||||
export type ElementAccessibilityIssueReason =
|
||||
| 'DisallowedSelectChild'
|
||||
| 'DisallowedOptGroupChild'
|
||||
| 'NonPhrasingContentOptionChild'
|
||||
| 'InteractiveContentOptionChild'
|
||||
| 'InteractiveContentLegendChild'
|
||||
| 'InteractiveContentSummaryDescendant'
|
||||
|
||||
export interface ElementAccessibilityIssueDetails {
|
||||
nodeId: BackendNodeId
|
||||
elementAccessibilityIssueReason: ElementAccessibilityIssueReason
|
||||
hasDisallowedAttributes: boolean
|
||||
}
|
||||
|
||||
export type StyleSheetLoadingIssueReason = 'LateImportRule' | 'RequestFailed'
|
||||
|
||||
export interface StylesheetLoadingIssueDetails {
|
||||
sourceCodeLocation: SourceCodeLocation
|
||||
styleSheetLoadingIssueReason: StyleSheetLoadingIssueReason
|
||||
failedRequestInfo?: FailedRequestInfo
|
||||
}
|
||||
|
||||
export type PropertyRuleIssueReason =
|
||||
| 'InvalidSyntax'
|
||||
| 'InvalidInitialValue'
|
||||
| 'InvalidInherits'
|
||||
| 'InvalidName'
|
||||
|
||||
export interface PropertyRuleIssueDetails {
|
||||
sourceCodeLocation: SourceCodeLocation
|
||||
propertyRuleIssueReason: PropertyRuleIssueReason
|
||||
propertyValue?: string
|
||||
}
|
||||
|
||||
export type UserReidentificationIssueType =
|
||||
| 'BlockedFrameNavigation'
|
||||
| 'BlockedSubresource'
|
||||
| 'NoisedCanvasReadback'
|
||||
|
||||
export interface UserReidentificationIssueDetails {
|
||||
type: UserReidentificationIssueType
|
||||
request?: AffectedRequest
|
||||
sourceCodeLocation?: SourceCodeLocation
|
||||
}
|
||||
|
||||
export type PermissionElementIssueType =
|
||||
| 'InvalidType'
|
||||
| 'FencedFrameDisallowed'
|
||||
| 'CspFrameAncestorsMissing'
|
||||
| 'PermissionsPolicyBlocked'
|
||||
| 'PaddingRightUnsupported'
|
||||
| 'PaddingBottomUnsupported'
|
||||
| 'InsetBoxShadowUnsupported'
|
||||
| 'RequestInProgress'
|
||||
| 'UntrustedEvent'
|
||||
| 'RegistrationFailed'
|
||||
| 'TypeNotSupported'
|
||||
| 'InvalidTypeActivation'
|
||||
| 'SecurityChecksFailed'
|
||||
| 'ActivationDisabled'
|
||||
| 'GeolocationDeprecated'
|
||||
| 'InvalidDisplayStyle'
|
||||
| 'NonOpaqueColor'
|
||||
| 'LowContrast'
|
||||
| 'FontSizeTooSmall'
|
||||
| 'FontSizeTooLarge'
|
||||
| 'InvalidSizeValue'
|
||||
|
||||
export interface PermissionElementIssueDetails {
|
||||
issueType: PermissionElementIssueType
|
||||
type?: string
|
||||
nodeId?: BackendNodeId
|
||||
isWarning?: boolean
|
||||
permissionName?: string
|
||||
occluderNodeInfo?: string
|
||||
occluderParentNodeInfo?: string
|
||||
disableReason?: string
|
||||
}
|
||||
|
||||
export type InspectorIssueCode =
|
||||
| 'CookieIssue'
|
||||
| 'MixedContentIssue'
|
||||
| 'BlockedByResponseIssue'
|
||||
| 'HeavyAdIssue'
|
||||
| 'ContentSecurityPolicyIssue'
|
||||
| 'SharedArrayBufferIssue'
|
||||
| 'LowTextContrastIssue'
|
||||
| 'CorsIssue'
|
||||
| 'AttributionReportingIssue'
|
||||
| 'QuirksModeIssue'
|
||||
| 'PartitioningBlobURLIssue'
|
||||
| 'NavigatorUserAgentIssue'
|
||||
| 'GenericIssue'
|
||||
| 'DeprecationIssue'
|
||||
| 'ClientHintIssue'
|
||||
| 'FederatedAuthRequestIssue'
|
||||
| 'BounceTrackingIssue'
|
||||
| 'CookieDeprecationMetadataIssue'
|
||||
| 'StylesheetLoadingIssue'
|
||||
| 'FederatedAuthUserInfoRequestIssue'
|
||||
| 'PropertyRuleIssue'
|
||||
| 'SharedDictionaryIssue'
|
||||
| 'ElementAccessibilityIssue'
|
||||
| 'SRIMessageSignatureIssue'
|
||||
| 'UnencodedDigestIssue'
|
||||
| 'UserReidentificationIssue'
|
||||
| 'PermissionElementIssue'
|
||||
|
||||
export interface InspectorIssueDetails {
|
||||
cookieIssueDetails?: CookieIssueDetails
|
||||
mixedContentIssueDetails?: MixedContentIssueDetails
|
||||
blockedByResponseIssueDetails?: BlockedByResponseIssueDetails
|
||||
heavyAdIssueDetails?: HeavyAdIssueDetails
|
||||
contentSecurityPolicyIssueDetails?: ContentSecurityPolicyIssueDetails
|
||||
sharedArrayBufferIssueDetails?: SharedArrayBufferIssueDetails
|
||||
lowTextContrastIssueDetails?: LowTextContrastIssueDetails
|
||||
corsIssueDetails?: CorsIssueDetails
|
||||
attributionReportingIssueDetails?: AttributionReportingIssueDetails
|
||||
quirksModeIssueDetails?: QuirksModeIssueDetails
|
||||
partitioningBlobURLIssueDetails?: PartitioningBlobURLIssueDetails
|
||||
navigatorUserAgentIssueDetails?: NavigatorUserAgentIssueDetails
|
||||
genericIssueDetails?: GenericIssueDetails
|
||||
deprecationIssueDetails?: DeprecationIssueDetails
|
||||
clientHintIssueDetails?: ClientHintIssueDetails
|
||||
federatedAuthRequestIssueDetails?: FederatedAuthRequestIssueDetails
|
||||
bounceTrackingIssueDetails?: BounceTrackingIssueDetails
|
||||
cookieDeprecationMetadataIssueDetails?: CookieDeprecationMetadataIssueDetails
|
||||
stylesheetLoadingIssueDetails?: StylesheetLoadingIssueDetails
|
||||
propertyRuleIssueDetails?: PropertyRuleIssueDetails
|
||||
federatedAuthUserInfoRequestIssueDetails?: FederatedAuthUserInfoRequestIssueDetails
|
||||
sharedDictionaryIssueDetails?: SharedDictionaryIssueDetails
|
||||
elementAccessibilityIssueDetails?: ElementAccessibilityIssueDetails
|
||||
sriMessageSignatureIssueDetails?: SRIMessageSignatureIssueDetails
|
||||
unencodedDigestIssueDetails?: UnencodedDigestIssueDetails
|
||||
userReidentificationIssueDetails?: UserReidentificationIssueDetails
|
||||
permissionElementIssueDetails?: PermissionElementIssueDetails
|
||||
}
|
||||
|
||||
export type IssueId = string
|
||||
|
||||
export interface InspectorIssue {
|
||||
code: InspectorIssueCode
|
||||
details: InspectorIssueDetails
|
||||
issueId?: IssueId
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface GetEncodedResponseParams {
|
||||
requestId: RequestId
|
||||
encoding: 'webp' | 'jpeg' | 'png'
|
||||
quality?: number
|
||||
sizeOnly?: boolean
|
||||
}
|
||||
|
||||
export interface GetEncodedResponseResult {
|
||||
body?: string
|
||||
originalSize: number
|
||||
encodedSize: number
|
||||
}
|
||||
|
||||
export interface CheckContrastParams {
|
||||
reportAAA?: boolean
|
||||
}
|
||||
|
||||
export interface CheckFormsIssuesResult {
|
||||
formIssues: GenericIssueDetails[]
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface IssueAddedEvent {
|
||||
issue: InspectorIssue
|
||||
}
|
||||
64
packages/cdp-protocol/src/generated/domains/autofill.ts
Normal file
64
packages/cdp-protocol/src/generated/domains/autofill.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { BackendNodeId } from './dom'
|
||||
import type { FrameId } from './page'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface CreditCard {
|
||||
number: string
|
||||
name: string
|
||||
expiryMonth: string
|
||||
expiryYear: string
|
||||
cvc: string
|
||||
}
|
||||
|
||||
export interface AddressField {
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface AddressFields {
|
||||
fields: AddressField[]
|
||||
}
|
||||
|
||||
export interface Address {
|
||||
fields: AddressField[]
|
||||
}
|
||||
|
||||
export interface AddressUI {
|
||||
addressFields: AddressFields[]
|
||||
}
|
||||
|
||||
export type FillingStrategy = 'autocompleteAttribute' | 'autofillInferred'
|
||||
|
||||
export interface FilledField {
|
||||
htmlType: string
|
||||
id: string
|
||||
name: string
|
||||
value: string
|
||||
autofillType: string
|
||||
fillingStrategy: FillingStrategy
|
||||
frameId: FrameId
|
||||
fieldId: BackendNodeId
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface TriggerParams {
|
||||
fieldId: BackendNodeId
|
||||
frameId?: FrameId
|
||||
card?: CreditCard
|
||||
address?: Address
|
||||
}
|
||||
|
||||
export interface SetAddressesParams {
|
||||
addresses: Address[]
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface AddressFormFilledEvent {
|
||||
filledFields: FilledField[]
|
||||
addressUi: AddressUI
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { TimeSinceEpoch } from './network'
|
||||
import type { RegistrationID } from './service-worker'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type ServiceName =
|
||||
| 'backgroundFetch'
|
||||
| 'backgroundSync'
|
||||
| 'pushMessaging'
|
||||
| 'notifications'
|
||||
| 'paymentHandler'
|
||||
| 'periodicBackgroundSync'
|
||||
|
||||
export interface EventMetadata {
|
||||
key: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface BackgroundServiceEvent {
|
||||
timestamp: TimeSinceEpoch
|
||||
origin: string
|
||||
serviceWorkerRegistrationId: RegistrationID
|
||||
service: ServiceName
|
||||
eventName: string
|
||||
instanceId: string
|
||||
eventMetadata: EventMetadata[]
|
||||
storageKey: string
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface StartObservingParams {
|
||||
service: ServiceName
|
||||
}
|
||||
|
||||
export interface StopObservingParams {
|
||||
service: ServiceName
|
||||
}
|
||||
|
||||
export interface SetRecordingParams {
|
||||
shouldRecord: boolean
|
||||
service: ServiceName
|
||||
}
|
||||
|
||||
export interface ClearEventsParams {
|
||||
service: ServiceName
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface RecordingStateChangedEvent {
|
||||
isRecording: boolean
|
||||
service: ServiceName
|
||||
}
|
||||
|
||||
export interface BackgroundServiceEventReceivedEvent {
|
||||
backgroundServiceEvent: BackgroundServiceEvent
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type CentralState = 'absent' | 'powered-off' | 'powered-on'
|
||||
|
||||
export type GATTOperationType = 'connection' | 'discovery'
|
||||
|
||||
export type CharacteristicWriteType =
|
||||
| 'write-default-deprecated'
|
||||
| 'write-with-response'
|
||||
| 'write-without-response'
|
||||
|
||||
export type CharacteristicOperationType =
|
||||
| 'read'
|
||||
| 'write'
|
||||
| 'subscribe-to-notifications'
|
||||
| 'unsubscribe-from-notifications'
|
||||
|
||||
export type DescriptorOperationType = 'read' | 'write'
|
||||
|
||||
export interface ManufacturerData {
|
||||
key: number
|
||||
data: string
|
||||
}
|
||||
|
||||
export interface ScanRecord {
|
||||
name?: string
|
||||
uuids?: string[]
|
||||
appearance?: number
|
||||
txPower?: number
|
||||
manufacturerData?: ManufacturerData[]
|
||||
}
|
||||
|
||||
export interface ScanEntry {
|
||||
deviceAddress: string
|
||||
rssi: number
|
||||
scanRecord: ScanRecord
|
||||
}
|
||||
|
||||
export interface CharacteristicProperties {
|
||||
broadcast?: boolean
|
||||
read?: boolean
|
||||
writeWithoutResponse?: boolean
|
||||
write?: boolean
|
||||
notify?: boolean
|
||||
indicate?: boolean
|
||||
authenticatedSignedWrites?: boolean
|
||||
extendedProperties?: boolean
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface EnableParams {
|
||||
state: CentralState
|
||||
leSupported: boolean
|
||||
}
|
||||
|
||||
export interface SetSimulatedCentralStateParams {
|
||||
state: CentralState
|
||||
}
|
||||
|
||||
export interface SimulatePreconnectedPeripheralParams {
|
||||
address: string
|
||||
name: string
|
||||
manufacturerData: ManufacturerData[]
|
||||
knownServiceUuids: string[]
|
||||
}
|
||||
|
||||
export interface SimulateAdvertisementParams {
|
||||
entry: ScanEntry
|
||||
}
|
||||
|
||||
export interface SimulateGATTOperationResponseParams {
|
||||
address: string
|
||||
type: GATTOperationType
|
||||
code: number
|
||||
}
|
||||
|
||||
export interface SimulateCharacteristicOperationResponseParams {
|
||||
characteristicId: string
|
||||
type: CharacteristicOperationType
|
||||
code: number
|
||||
data?: string
|
||||
}
|
||||
|
||||
export interface SimulateDescriptorOperationResponseParams {
|
||||
descriptorId: string
|
||||
type: DescriptorOperationType
|
||||
code: number
|
||||
data?: string
|
||||
}
|
||||
|
||||
export interface AddServiceParams {
|
||||
address: string
|
||||
serviceUuid: string
|
||||
}
|
||||
|
||||
export interface AddServiceResult {
|
||||
serviceId: string
|
||||
}
|
||||
|
||||
export interface RemoveServiceParams {
|
||||
serviceId: string
|
||||
}
|
||||
|
||||
export interface AddCharacteristicParams {
|
||||
serviceId: string
|
||||
characteristicUuid: string
|
||||
properties: CharacteristicProperties
|
||||
}
|
||||
|
||||
export interface AddCharacteristicResult {
|
||||
characteristicId: string
|
||||
}
|
||||
|
||||
export interface RemoveCharacteristicParams {
|
||||
characteristicId: string
|
||||
}
|
||||
|
||||
export interface AddDescriptorParams {
|
||||
characteristicId: string
|
||||
descriptorUuid: string
|
||||
}
|
||||
|
||||
export interface AddDescriptorResult {
|
||||
descriptorId: string
|
||||
}
|
||||
|
||||
export interface RemoveDescriptorParams {
|
||||
descriptorId: string
|
||||
}
|
||||
|
||||
export interface SimulateGATTDisconnectionParams {
|
||||
address: string
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface GattOperationReceivedEvent {
|
||||
address: string
|
||||
type: GATTOperationType
|
||||
}
|
||||
|
||||
export interface CharacteristicOperationReceivedEvent {
|
||||
characteristicId: string
|
||||
type: CharacteristicOperationType
|
||||
data?: string
|
||||
writeType?: CharacteristicWriteType
|
||||
}
|
||||
|
||||
export interface DescriptorOperationReceivedEvent {
|
||||
descriptorId: string
|
||||
type: DescriptorOperationType
|
||||
data?: string
|
||||
}
|
||||
72
packages/cdp-protocol/src/generated/domains/bookmarks.ts
Normal file
72
packages/cdp-protocol/src/generated/domains/bookmarks.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type BookmarkID = string
|
||||
|
||||
export type BookmarkNodeType = 'url' | 'folder'
|
||||
|
||||
export interface BookmarkNode {
|
||||
id: BookmarkID
|
||||
parentId?: BookmarkID
|
||||
index?: number
|
||||
title: string
|
||||
url?: string
|
||||
type: BookmarkNodeType
|
||||
dateAdded: number
|
||||
dateLastUsed?: number
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface GetBookmarksParams {
|
||||
folderId?: BookmarkID
|
||||
}
|
||||
|
||||
export interface GetBookmarksResult {
|
||||
nodes: BookmarkNode[]
|
||||
}
|
||||
|
||||
export interface SearchBookmarksParams {
|
||||
query: string
|
||||
maxResults?: number
|
||||
}
|
||||
|
||||
export interface SearchBookmarksResult {
|
||||
results: BookmarkNode[]
|
||||
}
|
||||
|
||||
export interface CreateBookmarkParams {
|
||||
title: string
|
||||
url?: string
|
||||
parentId?: BookmarkID
|
||||
index?: number
|
||||
}
|
||||
|
||||
export interface CreateBookmarkResult {
|
||||
node: BookmarkNode
|
||||
}
|
||||
|
||||
export interface UpdateBookmarkParams {
|
||||
id: BookmarkID
|
||||
title?: string
|
||||
url?: string
|
||||
}
|
||||
|
||||
export interface UpdateBookmarkResult {
|
||||
node: BookmarkNode
|
||||
}
|
||||
|
||||
export interface MoveBookmarkParams {
|
||||
id: BookmarkID
|
||||
parentId?: BookmarkID
|
||||
index?: number
|
||||
}
|
||||
|
||||
export interface MoveBookmarkResult {
|
||||
node: BookmarkNode
|
||||
}
|
||||
|
||||
export interface RemoveBookmarkParams {
|
||||
id: BookmarkID
|
||||
}
|
||||
482
packages/cdp-protocol/src/generated/domains/browser.ts
Normal file
482
packages/cdp-protocol/src/generated/domains/browser.ts
Normal file
@@ -0,0 +1,482 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { FrameId } from './page'
|
||||
import type { TargetID } from './target'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type BrowserContextID = string
|
||||
|
||||
export type WindowID = number
|
||||
|
||||
export type TabID = number
|
||||
|
||||
export type WindowType =
|
||||
| 'normal'
|
||||
| 'popup'
|
||||
| 'app'
|
||||
| 'devtools'
|
||||
| 'app_popup'
|
||||
| 'picture_in_picture'
|
||||
|
||||
export type WindowState = 'normal' | 'minimized' | 'maximized' | 'fullscreen'
|
||||
|
||||
export interface Bounds {
|
||||
left?: number
|
||||
top?: number
|
||||
width?: number
|
||||
height?: number
|
||||
windowState?: WindowState
|
||||
}
|
||||
|
||||
export interface WindowInfo {
|
||||
windowId: WindowID
|
||||
windowType: WindowType
|
||||
bounds: Bounds
|
||||
isActive: boolean
|
||||
isVisible: boolean
|
||||
tabCount: number
|
||||
activeTabId?: TabID
|
||||
browserContextId?: BrowserContextID
|
||||
}
|
||||
|
||||
export interface TabInfo {
|
||||
tabId: TabID
|
||||
targetId: TargetID
|
||||
url: string
|
||||
title: string
|
||||
isActive: boolean
|
||||
isLoading: boolean
|
||||
loadProgress: number
|
||||
isPinned: boolean
|
||||
isHidden: boolean
|
||||
windowId?: WindowID
|
||||
index?: number
|
||||
browserContextId?: BrowserContextID
|
||||
groupId?: TabGroupID
|
||||
}
|
||||
|
||||
export type TabGroupID = string
|
||||
|
||||
export interface TabGroupInfo {
|
||||
groupId: TabGroupID
|
||||
windowId: WindowID
|
||||
title: string
|
||||
color: string
|
||||
collapsed: boolean
|
||||
tabIds: TabID[]
|
||||
}
|
||||
|
||||
export type PermissionType =
|
||||
| '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'
|
||||
|
||||
export type PermissionSetting = 'granted' | 'denied' | 'prompt'
|
||||
|
||||
export interface PermissionDescriptor {
|
||||
name: string
|
||||
sysex?: boolean
|
||||
userVisibleOnly?: boolean
|
||||
allowWithoutSanitization?: boolean
|
||||
allowWithoutGesture?: boolean
|
||||
panTiltZoom?: boolean
|
||||
}
|
||||
|
||||
export type BrowserCommandId = 'openTabSearch' | 'closeTabSearch' | 'openGlic'
|
||||
|
||||
export interface Bucket {
|
||||
low: number
|
||||
high: number
|
||||
count: number
|
||||
}
|
||||
|
||||
export interface Histogram {
|
||||
name: string
|
||||
sum: number
|
||||
count: number
|
||||
buckets: Bucket[]
|
||||
}
|
||||
|
||||
export type PrivacySandboxAPI = 'BiddingAndAuctionServices' | 'TrustedKeyValue'
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface GetWindowsResult {
|
||||
windows: WindowInfo[]
|
||||
}
|
||||
|
||||
export interface GetActiveWindowResult {
|
||||
window?: WindowInfo
|
||||
}
|
||||
|
||||
export interface CreateWindowParams {
|
||||
url?: string
|
||||
bounds?: Bounds
|
||||
windowType?: WindowType
|
||||
hidden?: boolean
|
||||
browserContextId?: BrowserContextID
|
||||
}
|
||||
|
||||
export interface CreateWindowResult {
|
||||
window: WindowInfo
|
||||
}
|
||||
|
||||
export interface CloseWindowParams {
|
||||
windowId: WindowID
|
||||
}
|
||||
|
||||
export interface ActivateWindowParams {
|
||||
windowId: WindowID
|
||||
}
|
||||
|
||||
export interface ShowWindowParams {
|
||||
windowId: WindowID
|
||||
}
|
||||
|
||||
export interface HideWindowParams {
|
||||
windowId: WindowID
|
||||
}
|
||||
|
||||
export interface GetTabsParams {
|
||||
windowId?: WindowID
|
||||
includeHidden?: boolean
|
||||
}
|
||||
|
||||
export interface GetTabsResult {
|
||||
tabs: TabInfo[]
|
||||
}
|
||||
|
||||
export interface GetActiveTabParams {
|
||||
windowId?: WindowID
|
||||
}
|
||||
|
||||
export interface GetActiveTabResult {
|
||||
tab?: TabInfo
|
||||
}
|
||||
|
||||
export interface GetTabInfoParams {
|
||||
targetId?: TargetID
|
||||
tabId?: TabID
|
||||
}
|
||||
|
||||
export interface GetTabInfoResult {
|
||||
tab: TabInfo
|
||||
}
|
||||
|
||||
export interface CreateTabParams {
|
||||
url?: string
|
||||
windowId?: WindowID
|
||||
index?: number
|
||||
background?: boolean
|
||||
pinned?: boolean
|
||||
hidden?: boolean
|
||||
browserContextId?: BrowserContextID
|
||||
}
|
||||
|
||||
export interface CreateTabResult {
|
||||
tab: TabInfo
|
||||
}
|
||||
|
||||
export interface CloseTabParams {
|
||||
targetId?: TargetID
|
||||
tabId?: TabID
|
||||
}
|
||||
|
||||
export interface ActivateTabParams {
|
||||
targetId?: TargetID
|
||||
tabId?: TabID
|
||||
}
|
||||
|
||||
export interface MoveTabParams {
|
||||
targetId?: TargetID
|
||||
tabId?: TabID
|
||||
windowId?: WindowID
|
||||
index?: number
|
||||
}
|
||||
|
||||
export interface MoveTabResult {
|
||||
tab: TabInfo
|
||||
}
|
||||
|
||||
export interface DuplicateTabParams {
|
||||
targetId?: TargetID
|
||||
tabId?: TabID
|
||||
}
|
||||
|
||||
export interface DuplicateTabResult {
|
||||
tab: TabInfo
|
||||
}
|
||||
|
||||
export interface PinTabParams {
|
||||
targetId?: TargetID
|
||||
tabId?: TabID
|
||||
}
|
||||
|
||||
export interface PinTabResult {
|
||||
tab: TabInfo
|
||||
}
|
||||
|
||||
export interface UnpinTabParams {
|
||||
targetId?: TargetID
|
||||
tabId?: TabID
|
||||
}
|
||||
|
||||
export interface UnpinTabResult {
|
||||
tab: TabInfo
|
||||
}
|
||||
|
||||
export interface ShowTabParams {
|
||||
targetId?: TargetID
|
||||
tabId?: TabID
|
||||
windowId?: WindowID
|
||||
index?: number
|
||||
activate?: boolean
|
||||
}
|
||||
|
||||
export interface ShowTabResult {
|
||||
tab: TabInfo
|
||||
}
|
||||
|
||||
export interface HideTabParams {
|
||||
targetId?: TargetID
|
||||
tabId?: TabID
|
||||
}
|
||||
|
||||
export interface HideTabResult {
|
||||
tab: TabInfo
|
||||
}
|
||||
|
||||
export interface GetTabGroupsParams {
|
||||
windowId?: WindowID
|
||||
}
|
||||
|
||||
export interface GetTabGroupsResult {
|
||||
groups: TabGroupInfo[]
|
||||
}
|
||||
|
||||
export interface CreateTabGroupParams {
|
||||
tabIds: TabID[]
|
||||
title?: string
|
||||
}
|
||||
|
||||
export interface CreateTabGroupResult {
|
||||
group: TabGroupInfo
|
||||
}
|
||||
|
||||
export interface UpdateTabGroupParams {
|
||||
groupId: TabGroupID
|
||||
title?: string
|
||||
color?: string
|
||||
collapsed?: boolean
|
||||
}
|
||||
|
||||
export interface UpdateTabGroupResult {
|
||||
group: TabGroupInfo
|
||||
}
|
||||
|
||||
export interface CloseTabGroupParams {
|
||||
groupId: TabGroupID
|
||||
}
|
||||
|
||||
export interface AddTabsToGroupParams {
|
||||
groupId: TabGroupID
|
||||
tabIds: TabID[]
|
||||
}
|
||||
|
||||
export interface AddTabsToGroupResult {
|
||||
group: TabGroupInfo
|
||||
}
|
||||
|
||||
export interface RemoveTabsFromGroupParams {
|
||||
tabIds: TabID[]
|
||||
}
|
||||
|
||||
export interface MoveTabGroupParams {
|
||||
groupId: TabGroupID
|
||||
windowId?: WindowID
|
||||
index?: number
|
||||
}
|
||||
|
||||
export interface MoveTabGroupResult {
|
||||
group: TabGroupInfo
|
||||
}
|
||||
|
||||
export interface SetPermissionParams {
|
||||
permission: PermissionDescriptor
|
||||
setting: PermissionSetting
|
||||
origin?: string
|
||||
embeddedOrigin?: string
|
||||
browserContextId?: BrowserContextID
|
||||
}
|
||||
|
||||
export interface GrantPermissionsParams {
|
||||
permissions: PermissionType[]
|
||||
origin?: string
|
||||
browserContextId?: BrowserContextID
|
||||
}
|
||||
|
||||
export interface ResetPermissionsParams {
|
||||
browserContextId?: BrowserContextID
|
||||
}
|
||||
|
||||
export interface SetDownloadBehaviorParams {
|
||||
behavior: 'deny' | 'allow' | 'allowAndName' | 'default'
|
||||
browserContextId?: BrowserContextID
|
||||
downloadPath?: string
|
||||
eventsEnabled?: boolean
|
||||
}
|
||||
|
||||
export interface CancelDownloadParams {
|
||||
guid: string
|
||||
browserContextId?: BrowserContextID
|
||||
}
|
||||
|
||||
export interface GetVersionResult {
|
||||
protocolVersion: string
|
||||
product: string
|
||||
revision: string
|
||||
userAgent: string
|
||||
jsVersion: string
|
||||
}
|
||||
|
||||
export interface GetBrowserCommandLineResult {
|
||||
arguments: string[]
|
||||
}
|
||||
|
||||
export interface GetHistogramsParams {
|
||||
query?: string
|
||||
delta?: boolean
|
||||
}
|
||||
|
||||
export interface GetHistogramsResult {
|
||||
histograms: Histogram[]
|
||||
}
|
||||
|
||||
export interface GetHistogramParams {
|
||||
name: string
|
||||
delta?: boolean
|
||||
}
|
||||
|
||||
export interface GetHistogramResult {
|
||||
histogram: Histogram
|
||||
}
|
||||
|
||||
export interface GetWindowBoundsParams {
|
||||
windowId: WindowID
|
||||
}
|
||||
|
||||
export interface GetWindowBoundsResult {
|
||||
bounds: Bounds
|
||||
}
|
||||
|
||||
export interface GetWindowForTargetParams {
|
||||
targetId?: TargetID
|
||||
}
|
||||
|
||||
export interface GetWindowForTargetResult {
|
||||
windowId: WindowID
|
||||
bounds: Bounds
|
||||
}
|
||||
|
||||
export interface GetTabForTargetParams {
|
||||
targetId?: TargetID
|
||||
}
|
||||
|
||||
export interface GetTabForTargetResult {
|
||||
tabId: TabID
|
||||
windowId: WindowID
|
||||
}
|
||||
|
||||
export interface GetTargetForTabParams {
|
||||
tabId: TabID
|
||||
}
|
||||
|
||||
export interface GetTargetForTabResult {
|
||||
targetId: TargetID
|
||||
windowId: WindowID
|
||||
}
|
||||
|
||||
export interface SetWindowBoundsParams {
|
||||
windowId: WindowID
|
||||
bounds: Bounds
|
||||
}
|
||||
|
||||
export interface SetContentsSizeParams {
|
||||
windowId: WindowID
|
||||
width?: number
|
||||
height?: number
|
||||
}
|
||||
|
||||
export interface SetDockTileParams {
|
||||
badgeLabel?: string
|
||||
image?: string
|
||||
}
|
||||
|
||||
export interface ExecuteBrowserCommandParams {
|
||||
commandId: BrowserCommandId
|
||||
}
|
||||
|
||||
export interface AddPrivacySandboxEnrollmentOverrideParams {
|
||||
url: string
|
||||
}
|
||||
|
||||
export interface AddPrivacySandboxCoordinatorKeyConfigParams {
|
||||
api: PrivacySandboxAPI
|
||||
coordinatorOrigin: string
|
||||
keyConfig: string
|
||||
browserContextId?: BrowserContextID
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface DownloadWillBeginEvent {
|
||||
frameId: FrameId
|
||||
guid: string
|
||||
url: string
|
||||
suggestedFilename: string
|
||||
}
|
||||
|
||||
export interface DownloadProgressEvent {
|
||||
guid: string
|
||||
totalBytes: number
|
||||
receivedBytes: number
|
||||
state: 'inProgress' | 'completed' | 'canceled'
|
||||
filePath?: string
|
||||
}
|
||||
86
packages/cdp-protocol/src/generated/domains/cache-storage.ts
Normal file
86
packages/cdp-protocol/src/generated/domains/cache-storage.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { StorageBucket } from './storage'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type CacheId = string
|
||||
|
||||
export type CachedResponseType =
|
||||
| 'basic'
|
||||
| 'cors'
|
||||
| 'default'
|
||||
| 'error'
|
||||
| 'opaqueResponse'
|
||||
| 'opaqueRedirect'
|
||||
|
||||
export interface DataEntry {
|
||||
requestURL: string
|
||||
requestMethod: string
|
||||
requestHeaders: Header[]
|
||||
responseTime: number
|
||||
responseStatus: number
|
||||
responseStatusText: string
|
||||
responseType: CachedResponseType
|
||||
responseHeaders: Header[]
|
||||
}
|
||||
|
||||
export interface Cache {
|
||||
cacheId: CacheId
|
||||
securityOrigin: string
|
||||
storageKey: string
|
||||
storageBucket?: StorageBucket
|
||||
cacheName: string
|
||||
}
|
||||
|
||||
export interface Header {
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface CachedResponse {
|
||||
body: string
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface DeleteCacheParams {
|
||||
cacheId: CacheId
|
||||
}
|
||||
|
||||
export interface DeleteEntryParams {
|
||||
cacheId: CacheId
|
||||
request: string
|
||||
}
|
||||
|
||||
export interface RequestCacheNamesParams {
|
||||
securityOrigin?: string
|
||||
storageKey?: string
|
||||
storageBucket?: StorageBucket
|
||||
}
|
||||
|
||||
export interface RequestCacheNamesResult {
|
||||
caches: Cache[]
|
||||
}
|
||||
|
||||
export interface RequestCachedResponseParams {
|
||||
cacheId: CacheId
|
||||
requestURL: string
|
||||
requestHeaders: Header[]
|
||||
}
|
||||
|
||||
export interface RequestCachedResponseResult {
|
||||
response: CachedResponse
|
||||
}
|
||||
|
||||
export interface RequestEntriesParams {
|
||||
cacheId: CacheId
|
||||
skipCount?: number
|
||||
pageSize?: number
|
||||
pathFilter?: string
|
||||
}
|
||||
|
||||
export interface RequestEntriesResult {
|
||||
cacheDataEntries: DataEntry[]
|
||||
returnCount: number
|
||||
}
|
||||
41
packages/cdp-protocol/src/generated/domains/cast.ts
Normal file
41
packages/cdp-protocol/src/generated/domains/cast.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface Sink {
|
||||
name: string
|
||||
id: string
|
||||
session?: string
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface EnableParams {
|
||||
presentationUrl?: string
|
||||
}
|
||||
|
||||
export interface SetSinkToUseParams {
|
||||
sinkName: string
|
||||
}
|
||||
|
||||
export interface StartDesktopMirroringParams {
|
||||
sinkName: string
|
||||
}
|
||||
|
||||
export interface StartTabMirroringParams {
|
||||
sinkName: string
|
||||
}
|
||||
|
||||
export interface StopCastingParams {
|
||||
sinkName: string
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface SinksUpdatedEvent {
|
||||
sinks: Sink[]
|
||||
}
|
||||
|
||||
export interface IssueUpdatedEvent {
|
||||
issueMessage: string
|
||||
}
|
||||
31
packages/cdp-protocol/src/generated/domains/console.ts
Normal file
31
packages/cdp-protocol/src/generated/domains/console.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface ConsoleMessage {
|
||||
source:
|
||||
| 'xml'
|
||||
| 'javascript'
|
||||
| 'network'
|
||||
| 'console-api'
|
||||
| 'storage'
|
||||
| 'appcache'
|
||||
| 'rendering'
|
||||
| 'security'
|
||||
| 'other'
|
||||
| 'deprecation'
|
||||
| 'worker'
|
||||
level: 'log' | 'warning' | 'error' | 'debug' | 'info'
|
||||
text: string
|
||||
url?: string
|
||||
line?: number
|
||||
column?: number
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface MessageAddedEvent {
|
||||
message: ConsoleMessage
|
||||
}
|
||||
641
packages/cdp-protocol/src/generated/domains/css.ts
Normal file
641
packages/cdp-protocol/src/generated/domains/css.ts
Normal file
@@ -0,0 +1,641 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
BackendNodeId,
|
||||
LogicalAxes,
|
||||
NodeId,
|
||||
PhysicalAxes,
|
||||
PseudoType,
|
||||
StyleSheetId,
|
||||
} from './dom'
|
||||
import type { FrameId } from './page'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type StyleSheetOrigin =
|
||||
| 'injected'
|
||||
| 'user-agent'
|
||||
| 'inspector'
|
||||
| 'regular'
|
||||
|
||||
export interface PseudoElementMatches {
|
||||
pseudoType: PseudoType
|
||||
pseudoIdentifier?: string
|
||||
matches: RuleMatch[]
|
||||
}
|
||||
|
||||
export interface CSSAnimationStyle {
|
||||
name?: string
|
||||
style: CSSStyle
|
||||
}
|
||||
|
||||
export interface InheritedStyleEntry {
|
||||
inlineStyle?: CSSStyle
|
||||
matchedCSSRules: RuleMatch[]
|
||||
}
|
||||
|
||||
export interface InheritedAnimatedStyleEntry {
|
||||
animationStyles?: CSSAnimationStyle[]
|
||||
transitionsStyle?: CSSStyle
|
||||
}
|
||||
|
||||
export interface InheritedPseudoElementMatches {
|
||||
pseudoElements: PseudoElementMatches[]
|
||||
}
|
||||
|
||||
export interface RuleMatch {
|
||||
rule: CSSRule
|
||||
matchingSelectors: number[]
|
||||
}
|
||||
|
||||
export interface Value {
|
||||
text: string
|
||||
range?: SourceRange
|
||||
specificity?: Specificity
|
||||
}
|
||||
|
||||
export interface Specificity {
|
||||
a: number
|
||||
b: number
|
||||
c: number
|
||||
}
|
||||
|
||||
export interface SelectorList {
|
||||
selectors: Value[]
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface CSSStyleSheetHeader {
|
||||
styleSheetId: StyleSheetId
|
||||
frameId: FrameId
|
||||
sourceURL: string
|
||||
sourceMapURL?: string
|
||||
origin: StyleSheetOrigin
|
||||
title: string
|
||||
ownerNode?: BackendNodeId
|
||||
disabled: boolean
|
||||
hasSourceURL?: boolean
|
||||
isInline: boolean
|
||||
isMutable: boolean
|
||||
isConstructed: boolean
|
||||
startLine: number
|
||||
startColumn: number
|
||||
length: number
|
||||
endLine: number
|
||||
endColumn: number
|
||||
loadingFailed?: boolean
|
||||
}
|
||||
|
||||
export interface CSSRule {
|
||||
styleSheetId?: StyleSheetId
|
||||
selectorList: SelectorList
|
||||
nestingSelectors?: string[]
|
||||
origin: StyleSheetOrigin
|
||||
style: CSSStyle
|
||||
originTreeScopeNodeId?: BackendNodeId
|
||||
media?: CSSMedia[]
|
||||
containerQueries?: CSSContainerQuery[]
|
||||
supports?: CSSSupports[]
|
||||
layers?: CSSLayer[]
|
||||
scopes?: CSSScope[]
|
||||
ruleTypes?: CSSRuleType[]
|
||||
startingStyles?: CSSStartingStyle[]
|
||||
}
|
||||
|
||||
export type CSSRuleType =
|
||||
| 'MediaRule'
|
||||
| 'SupportsRule'
|
||||
| 'ContainerRule'
|
||||
| 'LayerRule'
|
||||
| 'ScopeRule'
|
||||
| 'StyleRule'
|
||||
| 'StartingStyleRule'
|
||||
|
||||
export interface RuleUsage {
|
||||
styleSheetId: StyleSheetId
|
||||
startOffset: number
|
||||
endOffset: number
|
||||
used: boolean
|
||||
}
|
||||
|
||||
export interface SourceRange {
|
||||
startLine: number
|
||||
startColumn: number
|
||||
endLine: number
|
||||
endColumn: number
|
||||
}
|
||||
|
||||
export interface ShorthandEntry {
|
||||
name: string
|
||||
value: string
|
||||
important?: boolean
|
||||
}
|
||||
|
||||
export interface CSSComputedStyleProperty {
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface ComputedStyleExtraFields {
|
||||
isAppearanceBase: boolean
|
||||
}
|
||||
|
||||
export interface CSSStyle {
|
||||
styleSheetId?: StyleSheetId
|
||||
cssProperties: CSSProperty[]
|
||||
shorthandEntries: ShorthandEntry[]
|
||||
cssText?: string
|
||||
range?: SourceRange
|
||||
}
|
||||
|
||||
export interface CSSProperty {
|
||||
name: string
|
||||
value: string
|
||||
important?: boolean
|
||||
implicit?: boolean
|
||||
text?: string
|
||||
parsedOk?: boolean
|
||||
disabled?: boolean
|
||||
range?: SourceRange
|
||||
longhandProperties?: CSSProperty[]
|
||||
}
|
||||
|
||||
export interface CSSMedia {
|
||||
text: string
|
||||
source: 'mediaRule' | 'importRule' | 'linkedSheet' | 'inlineSheet'
|
||||
sourceURL?: string
|
||||
range?: SourceRange
|
||||
styleSheetId?: StyleSheetId
|
||||
mediaList?: MediaQuery[]
|
||||
}
|
||||
|
||||
export interface MediaQuery {
|
||||
expressions: MediaQueryExpression[]
|
||||
active: boolean
|
||||
}
|
||||
|
||||
export interface MediaQueryExpression {
|
||||
value: number
|
||||
unit: string
|
||||
feature: string
|
||||
valueRange?: SourceRange
|
||||
computedLength?: number
|
||||
}
|
||||
|
||||
export interface CSSContainerQuery {
|
||||
text: string
|
||||
range?: SourceRange
|
||||
styleSheetId?: StyleSheetId
|
||||
name?: string
|
||||
physicalAxes?: PhysicalAxes
|
||||
logicalAxes?: LogicalAxes
|
||||
queriesScrollState?: boolean
|
||||
queriesAnchored?: boolean
|
||||
}
|
||||
|
||||
export interface CSSSupports {
|
||||
text: string
|
||||
active: boolean
|
||||
range?: SourceRange
|
||||
styleSheetId?: StyleSheetId
|
||||
}
|
||||
|
||||
export interface CSSScope {
|
||||
text: string
|
||||
range?: SourceRange
|
||||
styleSheetId?: StyleSheetId
|
||||
}
|
||||
|
||||
export interface CSSLayer {
|
||||
text: string
|
||||
range?: SourceRange
|
||||
styleSheetId?: StyleSheetId
|
||||
}
|
||||
|
||||
export interface CSSStartingStyle {
|
||||
range?: SourceRange
|
||||
styleSheetId?: StyleSheetId
|
||||
}
|
||||
|
||||
export interface CSSLayerData {
|
||||
name: string
|
||||
subLayers?: CSSLayerData[]
|
||||
order: number
|
||||
}
|
||||
|
||||
export interface PlatformFontUsage {
|
||||
familyName: string
|
||||
postScriptName: string
|
||||
isCustomFont: boolean
|
||||
glyphCount: number
|
||||
}
|
||||
|
||||
export interface FontVariationAxis {
|
||||
tag: string
|
||||
name: string
|
||||
minValue: number
|
||||
maxValue: number
|
||||
defaultValue: number
|
||||
}
|
||||
|
||||
export interface FontFace {
|
||||
fontFamily: string
|
||||
fontStyle: string
|
||||
fontVariant: string
|
||||
fontWeight: string
|
||||
fontStretch: string
|
||||
fontDisplay: string
|
||||
unicodeRange: string
|
||||
src: string
|
||||
platformFontFamily: string
|
||||
fontVariationAxes?: FontVariationAxis[]
|
||||
}
|
||||
|
||||
export interface CSSTryRule {
|
||||
styleSheetId?: StyleSheetId
|
||||
origin: StyleSheetOrigin
|
||||
style: CSSStyle
|
||||
}
|
||||
|
||||
export interface CSSPositionTryRule {
|
||||
name: Value
|
||||
styleSheetId?: StyleSheetId
|
||||
origin: StyleSheetOrigin
|
||||
style: CSSStyle
|
||||
active: boolean
|
||||
}
|
||||
|
||||
export interface CSSKeyframesRule {
|
||||
animationName: Value
|
||||
keyframes: CSSKeyframeRule[]
|
||||
}
|
||||
|
||||
export interface CSSPropertyRegistration {
|
||||
propertyName: string
|
||||
initialValue?: Value
|
||||
inherits: boolean
|
||||
syntax: string
|
||||
}
|
||||
|
||||
export interface CSSAtRule {
|
||||
type: 'font-face' | 'font-feature-values' | 'font-palette-values'
|
||||
subsection?:
|
||||
| 'swash'
|
||||
| 'annotation'
|
||||
| 'ornaments'
|
||||
| 'stylistic'
|
||||
| 'styleset'
|
||||
| 'character-variant'
|
||||
name?: Value
|
||||
styleSheetId?: StyleSheetId
|
||||
origin: StyleSheetOrigin
|
||||
style: CSSStyle
|
||||
}
|
||||
|
||||
export interface CSSPropertyRule {
|
||||
styleSheetId?: StyleSheetId
|
||||
origin: StyleSheetOrigin
|
||||
propertyName: Value
|
||||
style: CSSStyle
|
||||
}
|
||||
|
||||
export interface CSSFunctionParameter {
|
||||
name: string
|
||||
type: string
|
||||
}
|
||||
|
||||
export interface CSSFunctionConditionNode {
|
||||
media?: CSSMedia
|
||||
containerQueries?: CSSContainerQuery
|
||||
supports?: CSSSupports
|
||||
children: CSSFunctionNode[]
|
||||
conditionText: string
|
||||
}
|
||||
|
||||
export interface CSSFunctionNode {
|
||||
condition?: CSSFunctionConditionNode
|
||||
style?: CSSStyle
|
||||
}
|
||||
|
||||
export interface CSSFunctionRule {
|
||||
name: Value
|
||||
styleSheetId?: StyleSheetId
|
||||
origin: StyleSheetOrigin
|
||||
parameters: CSSFunctionParameter[]
|
||||
children: CSSFunctionNode[]
|
||||
}
|
||||
|
||||
export interface CSSKeyframeRule {
|
||||
styleSheetId?: StyleSheetId
|
||||
origin: StyleSheetOrigin
|
||||
keyText: Value
|
||||
style: CSSStyle
|
||||
}
|
||||
|
||||
export interface StyleDeclarationEdit {
|
||||
styleSheetId: StyleSheetId
|
||||
range: SourceRange
|
||||
text: string
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface AddRuleParams {
|
||||
styleSheetId: StyleSheetId
|
||||
ruleText: string
|
||||
location: SourceRange
|
||||
nodeForPropertySyntaxValidation?: NodeId
|
||||
}
|
||||
|
||||
export interface AddRuleResult {
|
||||
rule: CSSRule
|
||||
}
|
||||
|
||||
export interface CollectClassNamesParams {
|
||||
styleSheetId: StyleSheetId
|
||||
}
|
||||
|
||||
export interface CollectClassNamesResult {
|
||||
classNames: string[]
|
||||
}
|
||||
|
||||
export interface CreateStyleSheetParams {
|
||||
frameId: FrameId
|
||||
force?: boolean
|
||||
}
|
||||
|
||||
export interface CreateStyleSheetResult {
|
||||
styleSheetId: StyleSheetId
|
||||
}
|
||||
|
||||
export interface ForcePseudoStateParams {
|
||||
nodeId: NodeId
|
||||
forcedPseudoClasses: string[]
|
||||
}
|
||||
|
||||
export interface ForceStartingStyleParams {
|
||||
nodeId: NodeId
|
||||
forced: boolean
|
||||
}
|
||||
|
||||
export interface GetBackgroundColorsParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetBackgroundColorsResult {
|
||||
backgroundColors?: string[]
|
||||
computedFontSize?: string
|
||||
computedFontWeight?: string
|
||||
}
|
||||
|
||||
export interface GetComputedStyleForNodeParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetComputedStyleForNodeResult {
|
||||
computedStyle: CSSComputedStyleProperty[]
|
||||
extraFields: ComputedStyleExtraFields
|
||||
}
|
||||
|
||||
export interface ResolveValuesParams {
|
||||
values: string[]
|
||||
nodeId: NodeId
|
||||
propertyName?: string
|
||||
pseudoType?: PseudoType
|
||||
pseudoIdentifier?: string
|
||||
}
|
||||
|
||||
export interface ResolveValuesResult {
|
||||
results: string[]
|
||||
}
|
||||
|
||||
export interface GetLonghandPropertiesParams {
|
||||
shorthandName: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface GetLonghandPropertiesResult {
|
||||
longhandProperties: CSSProperty[]
|
||||
}
|
||||
|
||||
export interface GetInlineStylesForNodeParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetInlineStylesForNodeResult {
|
||||
inlineStyle?: CSSStyle
|
||||
attributesStyle?: CSSStyle
|
||||
}
|
||||
|
||||
export interface GetAnimatedStylesForNodeParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetAnimatedStylesForNodeResult {
|
||||
animationStyles?: CSSAnimationStyle[]
|
||||
transitionsStyle?: CSSStyle
|
||||
inherited?: InheritedAnimatedStyleEntry[]
|
||||
}
|
||||
|
||||
export interface GetMatchedStylesForNodeParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetMatchedStylesForNodeResult {
|
||||
inlineStyle?: CSSStyle
|
||||
attributesStyle?: CSSStyle
|
||||
matchedCSSRules?: RuleMatch[]
|
||||
pseudoElements?: PseudoElementMatches[]
|
||||
inherited?: InheritedStyleEntry[]
|
||||
inheritedPseudoElements?: InheritedPseudoElementMatches[]
|
||||
cssKeyframesRules?: CSSKeyframesRule[]
|
||||
cssPositionTryRules?: CSSPositionTryRule[]
|
||||
activePositionFallbackIndex?: number
|
||||
cssPropertyRules?: CSSPropertyRule[]
|
||||
cssPropertyRegistrations?: CSSPropertyRegistration[]
|
||||
cssAtRules?: CSSAtRule[]
|
||||
parentLayoutNodeId?: NodeId
|
||||
cssFunctionRules?: CSSFunctionRule[]
|
||||
}
|
||||
|
||||
export interface GetEnvironmentVariablesResult {
|
||||
environmentVariables: Record<string, unknown>
|
||||
}
|
||||
|
||||
export interface GetMediaQueriesResult {
|
||||
medias: CSSMedia[]
|
||||
}
|
||||
|
||||
export interface GetPlatformFontsForNodeParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetPlatformFontsForNodeResult {
|
||||
fonts: PlatformFontUsage[]
|
||||
}
|
||||
|
||||
export interface GetStyleSheetTextParams {
|
||||
styleSheetId: StyleSheetId
|
||||
}
|
||||
|
||||
export interface GetStyleSheetTextResult {
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface GetLayersForNodeParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetLayersForNodeResult {
|
||||
rootLayer: CSSLayerData
|
||||
}
|
||||
|
||||
export interface GetLocationForSelectorParams {
|
||||
styleSheetId: StyleSheetId
|
||||
selectorText: string
|
||||
}
|
||||
|
||||
export interface GetLocationForSelectorResult {
|
||||
ranges: SourceRange[]
|
||||
}
|
||||
|
||||
export interface TrackComputedStyleUpdatesForNodeParams {
|
||||
nodeId?: NodeId
|
||||
}
|
||||
|
||||
export interface TrackComputedStyleUpdatesParams {
|
||||
propertiesToTrack: CSSComputedStyleProperty[]
|
||||
}
|
||||
|
||||
export interface TakeComputedStyleUpdatesResult {
|
||||
nodeIds: NodeId[]
|
||||
}
|
||||
|
||||
export interface SetEffectivePropertyValueForNodeParams {
|
||||
nodeId: NodeId
|
||||
propertyName: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface SetPropertyRulePropertyNameParams {
|
||||
styleSheetId: StyleSheetId
|
||||
range: SourceRange
|
||||
propertyName: string
|
||||
}
|
||||
|
||||
export interface SetPropertyRulePropertyNameResult {
|
||||
propertyName: Value
|
||||
}
|
||||
|
||||
export interface SetKeyframeKeyParams {
|
||||
styleSheetId: StyleSheetId
|
||||
range: SourceRange
|
||||
keyText: string
|
||||
}
|
||||
|
||||
export interface SetKeyframeKeyResult {
|
||||
keyText: Value
|
||||
}
|
||||
|
||||
export interface SetMediaTextParams {
|
||||
styleSheetId: StyleSheetId
|
||||
range: SourceRange
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface SetMediaTextResult {
|
||||
media: CSSMedia
|
||||
}
|
||||
|
||||
export interface SetContainerQueryTextParams {
|
||||
styleSheetId: StyleSheetId
|
||||
range: SourceRange
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface SetContainerQueryTextResult {
|
||||
containerQuery: CSSContainerQuery
|
||||
}
|
||||
|
||||
export interface SetSupportsTextParams {
|
||||
styleSheetId: StyleSheetId
|
||||
range: SourceRange
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface SetSupportsTextResult {
|
||||
supports: CSSSupports
|
||||
}
|
||||
|
||||
export interface SetScopeTextParams {
|
||||
styleSheetId: StyleSheetId
|
||||
range: SourceRange
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface SetScopeTextResult {
|
||||
scope: CSSScope
|
||||
}
|
||||
|
||||
export interface SetRuleSelectorParams {
|
||||
styleSheetId: StyleSheetId
|
||||
range: SourceRange
|
||||
selector: string
|
||||
}
|
||||
|
||||
export interface SetRuleSelectorResult {
|
||||
selectorList: SelectorList
|
||||
}
|
||||
|
||||
export interface SetStyleSheetTextParams {
|
||||
styleSheetId: StyleSheetId
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface SetStyleSheetTextResult {
|
||||
sourceMapURL?: string
|
||||
}
|
||||
|
||||
export interface SetStyleTextsParams {
|
||||
edits: StyleDeclarationEdit[]
|
||||
nodeForPropertySyntaxValidation?: NodeId
|
||||
}
|
||||
|
||||
export interface SetStyleTextsResult {
|
||||
styles: CSSStyle[]
|
||||
}
|
||||
|
||||
export interface StopRuleUsageTrackingResult {
|
||||
ruleUsage: RuleUsage[]
|
||||
}
|
||||
|
||||
export interface TakeCoverageDeltaResult {
|
||||
coverage: RuleUsage[]
|
||||
timestamp: number
|
||||
}
|
||||
|
||||
export interface SetLocalFontsEnabledParams {
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface FontsUpdatedEvent {
|
||||
font?: FontFace
|
||||
}
|
||||
|
||||
export interface StyleSheetAddedEvent {
|
||||
header: CSSStyleSheetHeader
|
||||
}
|
||||
|
||||
export interface StyleSheetChangedEvent {
|
||||
styleSheetId: StyleSheetId
|
||||
}
|
||||
|
||||
export interface StyleSheetRemovedEvent {
|
||||
styleSheetId: StyleSheetId
|
||||
}
|
||||
|
||||
export interface ComputedStyleUpdatedEvent {
|
||||
nodeId: NodeId
|
||||
}
|
||||
405
packages/cdp-protocol/src/generated/domains/debugger.ts
Normal file
405
packages/cdp-protocol/src/generated/domains/debugger.ts
Normal file
@@ -0,0 +1,405 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type {
|
||||
CallArgument,
|
||||
ExceptionDetails,
|
||||
ExecutionContextId,
|
||||
RemoteObject,
|
||||
RemoteObjectId,
|
||||
ScriptId,
|
||||
StackTrace,
|
||||
StackTraceId,
|
||||
TimeDelta,
|
||||
UniqueDebuggerId,
|
||||
} from './runtime'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type BreakpointId = string
|
||||
|
||||
export type CallFrameId = string
|
||||
|
||||
export interface Location {
|
||||
scriptId: ScriptId
|
||||
lineNumber: number
|
||||
columnNumber?: number
|
||||
}
|
||||
|
||||
export interface ScriptPosition {
|
||||
lineNumber: number
|
||||
columnNumber: number
|
||||
}
|
||||
|
||||
export interface LocationRange {
|
||||
scriptId: ScriptId
|
||||
start: ScriptPosition
|
||||
end: ScriptPosition
|
||||
}
|
||||
|
||||
export interface CallFrame {
|
||||
callFrameId: CallFrameId
|
||||
functionName: string
|
||||
functionLocation?: Location
|
||||
location: Location
|
||||
url: string
|
||||
scopeChain: Scope[]
|
||||
this: RemoteObject
|
||||
returnValue?: RemoteObject
|
||||
canBeRestarted?: boolean
|
||||
}
|
||||
|
||||
export interface Scope {
|
||||
type:
|
||||
| 'global'
|
||||
| 'local'
|
||||
| 'with'
|
||||
| 'closure'
|
||||
| 'catch'
|
||||
| 'block'
|
||||
| 'script'
|
||||
| 'eval'
|
||||
| 'module'
|
||||
| 'wasm-expression-stack'
|
||||
object: RemoteObject
|
||||
name?: string
|
||||
startLocation?: Location
|
||||
endLocation?: Location
|
||||
}
|
||||
|
||||
export interface SearchMatch {
|
||||
lineNumber: number
|
||||
lineContent: string
|
||||
}
|
||||
|
||||
export interface BreakLocation {
|
||||
scriptId: ScriptId
|
||||
lineNumber: number
|
||||
columnNumber?: number
|
||||
type?: 'debuggerStatement' | 'call' | 'return'
|
||||
}
|
||||
|
||||
export interface WasmDisassemblyChunk {
|
||||
lines: string[]
|
||||
bytecodeOffsets: number[]
|
||||
}
|
||||
|
||||
export type ScriptLanguage = 'JavaScript' | 'WebAssembly'
|
||||
|
||||
export interface DebugSymbols {
|
||||
type: 'SourceMap' | 'EmbeddedDWARF' | 'ExternalDWARF'
|
||||
externalURL?: string
|
||||
}
|
||||
|
||||
export interface ResolvedBreakpoint {
|
||||
breakpointId: BreakpointId
|
||||
location: Location
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface ContinueToLocationParams {
|
||||
location: Location
|
||||
targetCallFrames?: 'any' | 'current'
|
||||
}
|
||||
|
||||
export interface EnableParams {
|
||||
maxScriptsCacheSize?: number
|
||||
}
|
||||
|
||||
export interface EnableResult {
|
||||
debuggerId: UniqueDebuggerId
|
||||
}
|
||||
|
||||
export interface EvaluateOnCallFrameParams {
|
||||
callFrameId: CallFrameId
|
||||
expression: string
|
||||
objectGroup?: string
|
||||
includeCommandLineAPI?: boolean
|
||||
silent?: boolean
|
||||
returnByValue?: boolean
|
||||
generatePreview?: boolean
|
||||
throwOnSideEffect?: boolean
|
||||
timeout?: TimeDelta
|
||||
}
|
||||
|
||||
export interface EvaluateOnCallFrameResult {
|
||||
result: RemoteObject
|
||||
exceptionDetails?: ExceptionDetails
|
||||
}
|
||||
|
||||
export interface GetPossibleBreakpointsParams {
|
||||
start: Location
|
||||
end?: Location
|
||||
restrictToFunction?: boolean
|
||||
}
|
||||
|
||||
export interface GetPossibleBreakpointsResult {
|
||||
locations: BreakLocation[]
|
||||
}
|
||||
|
||||
export interface GetScriptSourceParams {
|
||||
scriptId: ScriptId
|
||||
}
|
||||
|
||||
export interface GetScriptSourceResult {
|
||||
scriptSource: string
|
||||
bytecode?: string
|
||||
}
|
||||
|
||||
export interface DisassembleWasmModuleParams {
|
||||
scriptId: ScriptId
|
||||
}
|
||||
|
||||
export interface DisassembleWasmModuleResult {
|
||||
streamId?: string
|
||||
totalNumberOfLines: number
|
||||
functionBodyOffsets: number[]
|
||||
chunk: WasmDisassemblyChunk
|
||||
}
|
||||
|
||||
export interface NextWasmDisassemblyChunkParams {
|
||||
streamId: string
|
||||
}
|
||||
|
||||
export interface NextWasmDisassemblyChunkResult {
|
||||
chunk: WasmDisassemblyChunk
|
||||
}
|
||||
|
||||
export interface GetWasmBytecodeParams {
|
||||
scriptId: ScriptId
|
||||
}
|
||||
|
||||
export interface GetWasmBytecodeResult {
|
||||
bytecode: string
|
||||
}
|
||||
|
||||
export interface GetStackTraceParams {
|
||||
stackTraceId: StackTraceId
|
||||
}
|
||||
|
||||
export interface GetStackTraceResult {
|
||||
stackTrace: StackTrace
|
||||
}
|
||||
|
||||
export interface PauseOnAsyncCallParams {
|
||||
parentStackTraceId: StackTraceId
|
||||
}
|
||||
|
||||
export interface RemoveBreakpointParams {
|
||||
breakpointId: BreakpointId
|
||||
}
|
||||
|
||||
export interface RestartFrameParams {
|
||||
callFrameId: CallFrameId
|
||||
mode?: 'StepInto'
|
||||
}
|
||||
|
||||
export interface RestartFrameResult {
|
||||
callFrames: CallFrame[]
|
||||
asyncStackTrace?: StackTrace
|
||||
asyncStackTraceId?: StackTraceId
|
||||
}
|
||||
|
||||
export interface ResumeParams {
|
||||
terminateOnResume?: boolean
|
||||
}
|
||||
|
||||
export interface SearchInContentParams {
|
||||
scriptId: ScriptId
|
||||
query: string
|
||||
caseSensitive?: boolean
|
||||
isRegex?: boolean
|
||||
}
|
||||
|
||||
export interface SearchInContentResult {
|
||||
result: SearchMatch[]
|
||||
}
|
||||
|
||||
export interface SetAsyncCallStackDepthParams {
|
||||
maxDepth: number
|
||||
}
|
||||
|
||||
export interface SetBlackboxExecutionContextsParams {
|
||||
uniqueIds: string[]
|
||||
}
|
||||
|
||||
export interface SetBlackboxPatternsParams {
|
||||
patterns: string[]
|
||||
skipAnonymous?: boolean
|
||||
}
|
||||
|
||||
export interface SetBlackboxedRangesParams {
|
||||
scriptId: ScriptId
|
||||
positions: ScriptPosition[]
|
||||
}
|
||||
|
||||
export interface SetBreakpointParams {
|
||||
location: Location
|
||||
condition?: string
|
||||
}
|
||||
|
||||
export interface SetBreakpointResult {
|
||||
breakpointId: BreakpointId
|
||||
actualLocation: Location
|
||||
}
|
||||
|
||||
export interface SetInstrumentationBreakpointParams {
|
||||
instrumentation:
|
||||
| 'beforeScriptExecution'
|
||||
| 'beforeScriptWithSourceMapExecution'
|
||||
}
|
||||
|
||||
export interface SetInstrumentationBreakpointResult {
|
||||
breakpointId: BreakpointId
|
||||
}
|
||||
|
||||
export interface SetBreakpointByUrlParams {
|
||||
lineNumber: number
|
||||
url?: string
|
||||
urlRegex?: string
|
||||
scriptHash?: string
|
||||
columnNumber?: number
|
||||
condition?: string
|
||||
}
|
||||
|
||||
export interface SetBreakpointByUrlResult {
|
||||
breakpointId: BreakpointId
|
||||
locations: Location[]
|
||||
}
|
||||
|
||||
export interface SetBreakpointOnFunctionCallParams {
|
||||
objectId: RemoteObjectId
|
||||
condition?: string
|
||||
}
|
||||
|
||||
export interface SetBreakpointOnFunctionCallResult {
|
||||
breakpointId: BreakpointId
|
||||
}
|
||||
|
||||
export interface SetBreakpointsActiveParams {
|
||||
active: boolean
|
||||
}
|
||||
|
||||
export interface SetPauseOnExceptionsParams {
|
||||
state: 'none' | 'caught' | 'uncaught' | 'all'
|
||||
}
|
||||
|
||||
export interface SetReturnValueParams {
|
||||
newValue: CallArgument
|
||||
}
|
||||
|
||||
export interface SetScriptSourceParams {
|
||||
scriptId: ScriptId
|
||||
scriptSource: string
|
||||
dryRun?: boolean
|
||||
allowTopFrameEditing?: boolean
|
||||
}
|
||||
|
||||
export interface SetScriptSourceResult {
|
||||
callFrames?: CallFrame[]
|
||||
stackChanged?: boolean
|
||||
asyncStackTrace?: StackTrace
|
||||
asyncStackTraceId?: StackTraceId
|
||||
status:
|
||||
| 'Ok'
|
||||
| 'CompileError'
|
||||
| 'BlockedByActiveGenerator'
|
||||
| 'BlockedByActiveFunction'
|
||||
| 'BlockedByTopLevelEsModuleChange'
|
||||
exceptionDetails?: ExceptionDetails
|
||||
}
|
||||
|
||||
export interface SetSkipAllPausesParams {
|
||||
skip: boolean
|
||||
}
|
||||
|
||||
export interface SetVariableValueParams {
|
||||
scopeNumber: number
|
||||
variableName: string
|
||||
newValue: CallArgument
|
||||
callFrameId: CallFrameId
|
||||
}
|
||||
|
||||
export interface StepIntoParams {
|
||||
breakOnAsyncCall?: boolean
|
||||
skipList?: LocationRange[]
|
||||
}
|
||||
|
||||
export interface StepOverParams {
|
||||
skipList?: LocationRange[]
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface BreakpointResolvedEvent {
|
||||
breakpointId: BreakpointId
|
||||
location: Location
|
||||
}
|
||||
|
||||
export interface PausedEvent {
|
||||
callFrames: CallFrame[]
|
||||
reason:
|
||||
| 'ambiguous'
|
||||
| 'assert'
|
||||
| 'CSPViolation'
|
||||
| 'debugCommand'
|
||||
| 'DOM'
|
||||
| 'EventListener'
|
||||
| 'exception'
|
||||
| 'instrumentation'
|
||||
| 'OOM'
|
||||
| 'other'
|
||||
| 'promiseRejection'
|
||||
| 'XHR'
|
||||
| 'step'
|
||||
data?: Record<string, unknown>
|
||||
hitBreakpoints?: string[]
|
||||
asyncStackTrace?: StackTrace
|
||||
asyncStackTraceId?: StackTraceId
|
||||
asyncCallStackTraceId?: StackTraceId
|
||||
}
|
||||
|
||||
export interface ScriptFailedToParseEvent {
|
||||
scriptId: ScriptId
|
||||
url: string
|
||||
startLine: number
|
||||
startColumn: number
|
||||
endLine: number
|
||||
endColumn: number
|
||||
executionContextId: ExecutionContextId
|
||||
hash: string
|
||||
buildId: string
|
||||
executionContextAuxData?: Record<string, unknown>
|
||||
sourceMapURL?: string
|
||||
hasSourceURL?: boolean
|
||||
isModule?: boolean
|
||||
length?: number
|
||||
stackTrace?: StackTrace
|
||||
codeOffset?: number
|
||||
scriptLanguage?: ScriptLanguage
|
||||
embedderName?: string
|
||||
}
|
||||
|
||||
export interface ScriptParsedEvent {
|
||||
scriptId: ScriptId
|
||||
url: string
|
||||
startLine: number
|
||||
startColumn: number
|
||||
endLine: number
|
||||
endColumn: number
|
||||
executionContextId: ExecutionContextId
|
||||
hash: string
|
||||
buildId: string
|
||||
executionContextAuxData?: Record<string, unknown>
|
||||
isLiveEdit?: boolean
|
||||
sourceMapURL?: string
|
||||
hasSourceURL?: boolean
|
||||
isModule?: boolean
|
||||
length?: number
|
||||
stackTrace?: StackTrace
|
||||
codeOffset?: number
|
||||
scriptLanguage?: ScriptLanguage
|
||||
debugSymbols?: DebugSymbols[]
|
||||
embedderName?: string
|
||||
resolvedBreakpoints?: ResolvedBreakpoint[]
|
||||
}
|
||||
30
packages/cdp-protocol/src/generated/domains/device-access.ts
Normal file
30
packages/cdp-protocol/src/generated/domains/device-access.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type RequestId = string
|
||||
|
||||
export type DeviceId = string
|
||||
|
||||
export interface PromptDevice {
|
||||
id: DeviceId
|
||||
name: string
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface SelectPromptParams {
|
||||
id: RequestId
|
||||
deviceId: DeviceId
|
||||
}
|
||||
|
||||
export interface CancelPromptParams {
|
||||
id: RequestId
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface DeviceRequestPromptedEvent {
|
||||
id: RequestId
|
||||
devices: PromptDevice[]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface SetDeviceOrientationOverrideParams {
|
||||
alpha: number
|
||||
beta: number
|
||||
gamma: number
|
||||
}
|
||||
80
packages/cdp-protocol/src/generated/domains/dom-debugger.ts
Normal file
80
packages/cdp-protocol/src/generated/domains/dom-debugger.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { BackendNodeId, NodeId } from './dom'
|
||||
import type { RemoteObject, RemoteObjectId, ScriptId } from './runtime'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type DOMBreakpointType =
|
||||
| 'subtree-modified'
|
||||
| 'attribute-modified'
|
||||
| 'node-removed'
|
||||
|
||||
export type CSPViolationType =
|
||||
| 'trustedtype-sink-violation'
|
||||
| 'trustedtype-policy-violation'
|
||||
|
||||
export interface EventListener {
|
||||
type: string
|
||||
useCapture: boolean
|
||||
passive: boolean
|
||||
once: boolean
|
||||
scriptId: ScriptId
|
||||
lineNumber: number
|
||||
columnNumber: number
|
||||
handler?: RemoteObject
|
||||
originalHandler?: RemoteObject
|
||||
backendNodeId?: BackendNodeId
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface GetEventListenersParams {
|
||||
objectId: RemoteObjectId
|
||||
depth?: number
|
||||
pierce?: boolean
|
||||
}
|
||||
|
||||
export interface GetEventListenersResult {
|
||||
listeners: EventListener[]
|
||||
}
|
||||
|
||||
export interface RemoveDOMBreakpointParams {
|
||||
nodeId: NodeId
|
||||
type: DOMBreakpointType
|
||||
}
|
||||
|
||||
export interface RemoveEventListenerBreakpointParams {
|
||||
eventName: string
|
||||
targetName?: string
|
||||
}
|
||||
|
||||
export interface RemoveInstrumentationBreakpointParams {
|
||||
eventName: string
|
||||
}
|
||||
|
||||
export interface RemoveXHRBreakpointParams {
|
||||
url: string
|
||||
}
|
||||
|
||||
export interface SetBreakOnCSPViolationParams {
|
||||
violationTypes: CSPViolationType[]
|
||||
}
|
||||
|
||||
export interface SetDOMBreakpointParams {
|
||||
nodeId: NodeId
|
||||
type: DOMBreakpointType
|
||||
}
|
||||
|
||||
export interface SetEventListenerBreakpointParams {
|
||||
eventName: string
|
||||
targetName?: string
|
||||
}
|
||||
|
||||
export interface SetInstrumentationBreakpointParams {
|
||||
eventName: string
|
||||
}
|
||||
|
||||
export interface SetXHRBreakpointParams {
|
||||
url: string
|
||||
}
|
||||
170
packages/cdp-protocol/src/generated/domains/dom-snapshot.ts
Normal file
170
packages/cdp-protocol/src/generated/domains/dom-snapshot.ts
Normal file
@@ -0,0 +1,170 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { BackendNodeId, PseudoType, Rect, ShadowRootType } from './dom'
|
||||
import type { EventListener } from './dom-debugger'
|
||||
import type { FrameId } from './page'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface DOMNode {
|
||||
nodeType: number
|
||||
nodeName: string
|
||||
nodeValue: string
|
||||
textValue?: string
|
||||
inputValue?: string
|
||||
inputChecked?: boolean
|
||||
optionSelected?: boolean
|
||||
backendNodeId: BackendNodeId
|
||||
childNodeIndexes?: number[]
|
||||
attributes?: NameValue[]
|
||||
pseudoElementIndexes?: number[]
|
||||
layoutNodeIndex?: number
|
||||
documentURL?: string
|
||||
baseURL?: string
|
||||
contentLanguage?: string
|
||||
documentEncoding?: string
|
||||
publicId?: string
|
||||
systemId?: string
|
||||
frameId?: FrameId
|
||||
contentDocumentIndex?: number
|
||||
pseudoType?: PseudoType
|
||||
shadowRootType?: ShadowRootType
|
||||
isClickable?: boolean
|
||||
eventListeners?: EventListener[]
|
||||
currentSourceURL?: string
|
||||
originURL?: string
|
||||
scrollOffsetX?: number
|
||||
scrollOffsetY?: number
|
||||
}
|
||||
|
||||
export interface InlineTextBox {
|
||||
boundingBox: Rect
|
||||
startCharacterIndex: number
|
||||
numCharacters: number
|
||||
}
|
||||
|
||||
export interface LayoutTreeNode {
|
||||
domNodeIndex: number
|
||||
boundingBox: Rect
|
||||
layoutText?: string
|
||||
inlineTextNodes?: InlineTextBox[]
|
||||
styleIndex?: number
|
||||
paintOrder?: number
|
||||
isStackingContext?: boolean
|
||||
}
|
||||
|
||||
export interface ComputedStyle {
|
||||
properties: NameValue[]
|
||||
}
|
||||
|
||||
export interface NameValue {
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export type StringIndex = number
|
||||
|
||||
export type ArrayOfStrings = StringIndex[]
|
||||
|
||||
export interface RareStringData {
|
||||
index: number[]
|
||||
value: StringIndex[]
|
||||
}
|
||||
|
||||
export interface RareBooleanData {
|
||||
index: number[]
|
||||
}
|
||||
|
||||
export interface RareIntegerData {
|
||||
index: number[]
|
||||
value: number[]
|
||||
}
|
||||
|
||||
export type Rectangle = number[]
|
||||
|
||||
export interface DocumentSnapshot {
|
||||
documentURL: StringIndex
|
||||
title: StringIndex
|
||||
baseURL: StringIndex
|
||||
contentLanguage: StringIndex
|
||||
encodingName: StringIndex
|
||||
publicId: StringIndex
|
||||
systemId: StringIndex
|
||||
frameId: StringIndex
|
||||
nodes: NodeTreeSnapshot
|
||||
layout: LayoutTreeSnapshot
|
||||
textBoxes: TextBoxSnapshot
|
||||
scrollOffsetX?: number
|
||||
scrollOffsetY?: number
|
||||
contentWidth?: number
|
||||
contentHeight?: number
|
||||
}
|
||||
|
||||
export interface NodeTreeSnapshot {
|
||||
parentIndex?: number[]
|
||||
nodeType?: number[]
|
||||
shadowRootType?: RareStringData
|
||||
nodeName?: StringIndex[]
|
||||
nodeValue?: StringIndex[]
|
||||
backendNodeId?: BackendNodeId[]
|
||||
attributes?: ArrayOfStrings[]
|
||||
textValue?: RareStringData
|
||||
inputValue?: RareStringData
|
||||
inputChecked?: RareBooleanData
|
||||
optionSelected?: RareBooleanData
|
||||
contentDocumentIndex?: RareIntegerData
|
||||
pseudoType?: RareStringData
|
||||
pseudoIdentifier?: RareStringData
|
||||
isClickable?: RareBooleanData
|
||||
currentSourceURL?: RareStringData
|
||||
originURL?: RareStringData
|
||||
}
|
||||
|
||||
export interface LayoutTreeSnapshot {
|
||||
nodeIndex: number[]
|
||||
styles: ArrayOfStrings[]
|
||||
bounds: Rectangle[]
|
||||
text: StringIndex[]
|
||||
stackingContexts: RareBooleanData
|
||||
paintOrders?: number[]
|
||||
offsetRects?: Rectangle[]
|
||||
scrollRects?: Rectangle[]
|
||||
clientRects?: Rectangle[]
|
||||
blendedBackgroundColors?: StringIndex[]
|
||||
textColorOpacities?: number[]
|
||||
}
|
||||
|
||||
export interface TextBoxSnapshot {
|
||||
layoutIndex: number[]
|
||||
bounds: Rectangle[]
|
||||
start: number[]
|
||||
length: number[]
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface GetSnapshotParams {
|
||||
computedStyleWhitelist: string[]
|
||||
includeEventListeners?: boolean
|
||||
includePaintOrder?: boolean
|
||||
includeUserAgentShadowTree?: boolean
|
||||
}
|
||||
|
||||
export interface GetSnapshotResult {
|
||||
domNodes: DOMNode[]
|
||||
layoutTreeNodes: LayoutTreeNode[]
|
||||
computedStyles: ComputedStyle[]
|
||||
}
|
||||
|
||||
export interface CaptureSnapshotParams {
|
||||
computedStyles: string[]
|
||||
includePaintOrder?: boolean
|
||||
includeDOMRects?: boolean
|
||||
includeBlendedBackgroundColors?: boolean
|
||||
includeTextColorOpacities?: boolean
|
||||
}
|
||||
|
||||
export interface CaptureSnapshotResult {
|
||||
documents: DocumentSnapshot[]
|
||||
strings: string[]
|
||||
}
|
||||
62
packages/cdp-protocol/src/generated/domains/dom-storage.ts
Normal file
62
packages/cdp-protocol/src/generated/domains/dom-storage.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type SerializedStorageKey = string
|
||||
|
||||
export interface StorageId {
|
||||
securityOrigin?: string
|
||||
storageKey?: SerializedStorageKey
|
||||
isLocalStorage: boolean
|
||||
}
|
||||
|
||||
export type Item = string[]
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface ClearParams {
|
||||
storageId: StorageId
|
||||
}
|
||||
|
||||
export interface GetDOMStorageItemsParams {
|
||||
storageId: StorageId
|
||||
}
|
||||
|
||||
export interface GetDOMStorageItemsResult {
|
||||
entries: Item[]
|
||||
}
|
||||
|
||||
export interface RemoveDOMStorageItemParams {
|
||||
storageId: StorageId
|
||||
key: string
|
||||
}
|
||||
|
||||
export interface SetDOMStorageItemParams {
|
||||
storageId: StorageId
|
||||
key: string
|
||||
value: string
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface DomStorageItemAddedEvent {
|
||||
storageId: StorageId
|
||||
key: string
|
||||
newValue: string
|
||||
}
|
||||
|
||||
export interface DomStorageItemRemovedEvent {
|
||||
storageId: StorageId
|
||||
key: string
|
||||
}
|
||||
|
||||
export interface DomStorageItemUpdatedEvent {
|
||||
storageId: StorageId
|
||||
key: string
|
||||
oldValue: string
|
||||
newValue: string
|
||||
}
|
||||
|
||||
export interface DomStorageItemsClearedEvent {
|
||||
storageId: StorageId
|
||||
}
|
||||
606
packages/cdp-protocol/src/generated/domains/dom.ts
Normal file
606
packages/cdp-protocol/src/generated/domains/dom.ts
Normal file
@@ -0,0 +1,606 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { FrameId } from './page'
|
||||
import type {
|
||||
ExecutionContextId,
|
||||
RemoteObject,
|
||||
RemoteObjectId,
|
||||
StackTrace,
|
||||
} from './runtime'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type NodeId = number
|
||||
|
||||
export type BackendNodeId = number
|
||||
|
||||
export type StyleSheetId = string
|
||||
|
||||
export interface BackendNode {
|
||||
nodeType: number
|
||||
nodeName: string
|
||||
backendNodeId: BackendNodeId
|
||||
}
|
||||
|
||||
export type PseudoType =
|
||||
| 'first-line'
|
||||
| 'first-letter'
|
||||
| 'checkmark'
|
||||
| 'before'
|
||||
| 'after'
|
||||
| 'picker-icon'
|
||||
| 'interest-hint'
|
||||
| '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'
|
||||
|
||||
export type ShadowRootType = 'user-agent' | 'open' | 'closed'
|
||||
|
||||
export type CompatibilityMode =
|
||||
| 'QuirksMode'
|
||||
| 'LimitedQuirksMode'
|
||||
| 'NoQuirksMode'
|
||||
|
||||
export type PhysicalAxes = 'Horizontal' | 'Vertical' | 'Both'
|
||||
|
||||
export type LogicalAxes = 'Inline' | 'Block' | 'Both'
|
||||
|
||||
export type ScrollOrientation = 'horizontal' | 'vertical'
|
||||
|
||||
export interface Node {
|
||||
nodeId: NodeId
|
||||
parentId?: NodeId
|
||||
backendNodeId: BackendNodeId
|
||||
nodeType: number
|
||||
nodeName: string
|
||||
localName: string
|
||||
nodeValue: string
|
||||
childNodeCount?: number
|
||||
children?: Node[]
|
||||
attributes?: string[]
|
||||
documentURL?: string
|
||||
baseURL?: string
|
||||
publicId?: string
|
||||
systemId?: string
|
||||
internalSubset?: string
|
||||
xmlVersion?: string
|
||||
name?: string
|
||||
value?: string
|
||||
pseudoType?: PseudoType
|
||||
pseudoIdentifier?: string
|
||||
shadowRootType?: ShadowRootType
|
||||
frameId?: FrameId
|
||||
contentDocument?: Node
|
||||
shadowRoots?: Node[]
|
||||
templateContent?: Node
|
||||
pseudoElements?: Node[]
|
||||
importedDocument?: Node
|
||||
distributedNodes?: BackendNode[]
|
||||
isSVG?: boolean
|
||||
compatibilityMode?: CompatibilityMode
|
||||
assignedSlot?: BackendNode
|
||||
isScrollable?: boolean
|
||||
affectedByStartingStyles?: boolean
|
||||
adoptedStyleSheets?: StyleSheetId[]
|
||||
}
|
||||
|
||||
export interface DetachedElementInfo {
|
||||
treeNode: Node
|
||||
retainedNodeIds: NodeId[]
|
||||
}
|
||||
|
||||
export interface RGBA {
|
||||
r: number
|
||||
g: number
|
||||
b: number
|
||||
a?: number
|
||||
}
|
||||
|
||||
export type Quad = number[]
|
||||
|
||||
export interface BoxModel {
|
||||
content: Quad
|
||||
padding: Quad
|
||||
border: Quad
|
||||
margin: Quad
|
||||
width: number
|
||||
height: number
|
||||
shapeOutside?: ShapeOutsideInfo
|
||||
}
|
||||
|
||||
export interface ShapeOutsideInfo {
|
||||
bounds: Quad
|
||||
shape: unknown[]
|
||||
marginShape: unknown[]
|
||||
}
|
||||
|
||||
export interface Rect {
|
||||
x: number
|
||||
y: number
|
||||
width: number
|
||||
height: number
|
||||
}
|
||||
|
||||
export interface CSSComputedStyleProperty {
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface CollectClassNamesFromSubtreeParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface CollectClassNamesFromSubtreeResult {
|
||||
classNames: string[]
|
||||
}
|
||||
|
||||
export interface CopyToParams {
|
||||
nodeId: NodeId
|
||||
targetNodeId: NodeId
|
||||
insertBeforeNodeId?: NodeId
|
||||
}
|
||||
|
||||
export interface CopyToResult {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface DescribeNodeParams {
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectId?: RemoteObjectId
|
||||
depth?: number
|
||||
pierce?: boolean
|
||||
}
|
||||
|
||||
export interface DescribeNodeResult {
|
||||
node: Node
|
||||
}
|
||||
|
||||
export interface ScrollIntoViewIfNeededParams {
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectId?: RemoteObjectId
|
||||
rect?: Rect
|
||||
}
|
||||
|
||||
export interface DiscardSearchResultsParams {
|
||||
searchId: string
|
||||
}
|
||||
|
||||
export interface EnableParams {
|
||||
includeWhitespace?: 'none' | 'all'
|
||||
}
|
||||
|
||||
export interface FocusParams {
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectId?: RemoteObjectId
|
||||
}
|
||||
|
||||
export interface GetAttributesParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetAttributesResult {
|
||||
attributes: string[]
|
||||
}
|
||||
|
||||
export interface GetBoxModelParams {
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectId?: RemoteObjectId
|
||||
}
|
||||
|
||||
export interface GetBoxModelResult {
|
||||
model: BoxModel
|
||||
}
|
||||
|
||||
export interface GetContentQuadsParams {
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectId?: RemoteObjectId
|
||||
}
|
||||
|
||||
export interface GetContentQuadsResult {
|
||||
quads: Quad[]
|
||||
}
|
||||
|
||||
export interface GetDocumentParams {
|
||||
depth?: number
|
||||
pierce?: boolean
|
||||
}
|
||||
|
||||
export interface GetDocumentResult {
|
||||
root: Node
|
||||
}
|
||||
|
||||
export interface GetFlattenedDocumentParams {
|
||||
depth?: number
|
||||
pierce?: boolean
|
||||
}
|
||||
|
||||
export interface GetFlattenedDocumentResult {
|
||||
nodes: Node[]
|
||||
}
|
||||
|
||||
export interface GetNodesForSubtreeByStyleParams {
|
||||
nodeId: NodeId
|
||||
computedStyles: CSSComputedStyleProperty[]
|
||||
pierce?: boolean
|
||||
}
|
||||
|
||||
export interface GetNodesForSubtreeByStyleResult {
|
||||
nodeIds: NodeId[]
|
||||
}
|
||||
|
||||
export interface GetNodeForLocationParams {
|
||||
x: number
|
||||
y: number
|
||||
includeUserAgentShadowDOM?: boolean
|
||||
ignorePointerEventsNone?: boolean
|
||||
}
|
||||
|
||||
export interface GetNodeForLocationResult {
|
||||
backendNodeId: BackendNodeId
|
||||
frameId: FrameId
|
||||
nodeId?: NodeId
|
||||
}
|
||||
|
||||
export interface GetOuterHTMLParams {
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectId?: RemoteObjectId
|
||||
includeShadowDOM?: boolean
|
||||
}
|
||||
|
||||
export interface GetOuterHTMLResult {
|
||||
outerHTML: string
|
||||
}
|
||||
|
||||
export interface GetRelayoutBoundaryParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetRelayoutBoundaryResult {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetSearchResultsParams {
|
||||
searchId: string
|
||||
fromIndex: number
|
||||
toIndex: number
|
||||
}
|
||||
|
||||
export interface GetSearchResultsResult {
|
||||
nodeIds: NodeId[]
|
||||
}
|
||||
|
||||
export interface MoveToParams {
|
||||
nodeId: NodeId
|
||||
targetNodeId: NodeId
|
||||
insertBeforeNodeId?: NodeId
|
||||
}
|
||||
|
||||
export interface MoveToResult {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface PerformSearchParams {
|
||||
query: string
|
||||
includeUserAgentShadowDOM?: boolean
|
||||
}
|
||||
|
||||
export interface PerformSearchResult {
|
||||
searchId: string
|
||||
resultCount: number
|
||||
}
|
||||
|
||||
export interface PushNodeByPathToFrontendParams {
|
||||
path: string
|
||||
}
|
||||
|
||||
export interface PushNodeByPathToFrontendResult {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface PushNodesByBackendIdsToFrontendParams {
|
||||
backendNodeIds: BackendNodeId[]
|
||||
}
|
||||
|
||||
export interface PushNodesByBackendIdsToFrontendResult {
|
||||
nodeIds: NodeId[]
|
||||
}
|
||||
|
||||
export interface QuerySelectorParams {
|
||||
nodeId: NodeId
|
||||
selector: string
|
||||
}
|
||||
|
||||
export interface QuerySelectorResult {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface QuerySelectorAllParams {
|
||||
nodeId: NodeId
|
||||
selector: string
|
||||
}
|
||||
|
||||
export interface QuerySelectorAllResult {
|
||||
nodeIds: NodeId[]
|
||||
}
|
||||
|
||||
export interface GetTopLayerElementsResult {
|
||||
nodeIds: NodeId[]
|
||||
}
|
||||
|
||||
export interface GetElementByRelationParams {
|
||||
nodeId: NodeId
|
||||
relation: 'PopoverTarget' | 'InterestTarget' | 'CommandFor'
|
||||
}
|
||||
|
||||
export interface GetElementByRelationResult {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface RemoveAttributeParams {
|
||||
nodeId: NodeId
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface RemoveNodeParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface RequestChildNodesParams {
|
||||
nodeId: NodeId
|
||||
depth?: number
|
||||
pierce?: boolean
|
||||
}
|
||||
|
||||
export interface RequestNodeParams {
|
||||
objectId: RemoteObjectId
|
||||
}
|
||||
|
||||
export interface RequestNodeResult {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface ResolveNodeParams {
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectGroup?: string
|
||||
executionContextId?: ExecutionContextId
|
||||
}
|
||||
|
||||
export interface ResolveNodeResult {
|
||||
object: RemoteObject
|
||||
}
|
||||
|
||||
export interface SetAttributeValueParams {
|
||||
nodeId: NodeId
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface SetAttributesAsTextParams {
|
||||
nodeId: NodeId
|
||||
text: string
|
||||
name?: string
|
||||
}
|
||||
|
||||
export interface SetFileInputFilesParams {
|
||||
files: string[]
|
||||
nodeId?: NodeId
|
||||
backendNodeId?: BackendNodeId
|
||||
objectId?: RemoteObjectId
|
||||
}
|
||||
|
||||
export interface SetNodeStackTracesEnabledParams {
|
||||
enable: boolean
|
||||
}
|
||||
|
||||
export interface GetNodeStackTracesParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetNodeStackTracesResult {
|
||||
creation?: StackTrace
|
||||
}
|
||||
|
||||
export interface GetFileInfoParams {
|
||||
objectId: RemoteObjectId
|
||||
}
|
||||
|
||||
export interface GetFileInfoResult {
|
||||
path: string
|
||||
}
|
||||
|
||||
export interface GetDetachedDomNodesResult {
|
||||
detachedNodes: DetachedElementInfo[]
|
||||
}
|
||||
|
||||
export interface SetInspectedNodeParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface SetNodeNameParams {
|
||||
nodeId: NodeId
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface SetNodeNameResult {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface SetNodeValueParams {
|
||||
nodeId: NodeId
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface SetOuterHTMLParams {
|
||||
nodeId: NodeId
|
||||
outerHTML: string
|
||||
}
|
||||
|
||||
export interface GetFrameOwnerParams {
|
||||
frameId: FrameId
|
||||
}
|
||||
|
||||
export interface GetFrameOwnerResult {
|
||||
backendNodeId: BackendNodeId
|
||||
nodeId?: NodeId
|
||||
}
|
||||
|
||||
export interface GetContainerForNodeParams {
|
||||
nodeId: NodeId
|
||||
containerName?: string
|
||||
physicalAxes?: PhysicalAxes
|
||||
logicalAxes?: LogicalAxes
|
||||
queriesScrollState?: boolean
|
||||
queriesAnchored?: boolean
|
||||
}
|
||||
|
||||
export interface GetContainerForNodeResult {
|
||||
nodeId?: NodeId
|
||||
}
|
||||
|
||||
export interface GetQueryingDescendantsForContainerParams {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface GetQueryingDescendantsForContainerResult {
|
||||
nodeIds: NodeId[]
|
||||
}
|
||||
|
||||
export interface GetAnchorElementParams {
|
||||
nodeId: NodeId
|
||||
anchorSpecifier?: string
|
||||
}
|
||||
|
||||
export interface GetAnchorElementResult {
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface ForceShowPopoverParams {
|
||||
nodeId: NodeId
|
||||
enable: boolean
|
||||
}
|
||||
|
||||
export interface ForceShowPopoverResult {
|
||||
nodeIds: NodeId[]
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface AttributeModifiedEvent {
|
||||
nodeId: NodeId
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface AdoptedStyleSheetsModifiedEvent {
|
||||
nodeId: NodeId
|
||||
adoptedStyleSheets: StyleSheetId[]
|
||||
}
|
||||
|
||||
export interface AttributeRemovedEvent {
|
||||
nodeId: NodeId
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface CharacterDataModifiedEvent {
|
||||
nodeId: NodeId
|
||||
characterData: string
|
||||
}
|
||||
|
||||
export interface ChildNodeCountUpdatedEvent {
|
||||
nodeId: NodeId
|
||||
childNodeCount: number
|
||||
}
|
||||
|
||||
export interface ChildNodeInsertedEvent {
|
||||
parentNodeId: NodeId
|
||||
previousNodeId: NodeId
|
||||
node: Node
|
||||
}
|
||||
|
||||
export interface ChildNodeRemovedEvent {
|
||||
parentNodeId: NodeId
|
||||
nodeId: NodeId
|
||||
}
|
||||
|
||||
export interface DistributedNodesUpdatedEvent {
|
||||
insertionPointId: NodeId
|
||||
distributedNodes: BackendNode[]
|
||||
}
|
||||
|
||||
export interface InlineStyleInvalidatedEvent {
|
||||
nodeIds: NodeId[]
|
||||
}
|
||||
|
||||
export interface PseudoElementAddedEvent {
|
||||
parentId: NodeId
|
||||
pseudoElement: Node
|
||||
}
|
||||
|
||||
export interface ScrollableFlagUpdatedEvent {
|
||||
nodeId: NodeId
|
||||
isScrollable: boolean
|
||||
}
|
||||
|
||||
export interface AffectedByStartingStylesFlagUpdatedEvent {
|
||||
nodeId: NodeId
|
||||
affectedByStartingStyles: boolean
|
||||
}
|
||||
|
||||
export interface PseudoElementRemovedEvent {
|
||||
parentId: NodeId
|
||||
pseudoElementId: NodeId
|
||||
}
|
||||
|
||||
export interface SetChildNodesEvent {
|
||||
parentId: NodeId
|
||||
nodes: Node[]
|
||||
}
|
||||
|
||||
export interface ShadowRootPoppedEvent {
|
||||
hostId: NodeId
|
||||
rootId: NodeId
|
||||
}
|
||||
|
||||
export interface ShadowRootPushedEvent {
|
||||
hostId: NodeId
|
||||
root: Node
|
||||
}
|
||||
373
packages/cdp-protocol/src/generated/domains/emulation.ts
Normal file
373
packages/cdp-protocol/src/generated/domains/emulation.ts
Normal file
@@ -0,0 +1,373 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { RGBA } from './dom'
|
||||
import type { TimeSinceEpoch } from './network'
|
||||
import type { Viewport } from './page'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface SafeAreaInsets {
|
||||
top?: number
|
||||
topMax?: number
|
||||
left?: number
|
||||
leftMax?: number
|
||||
bottom?: number
|
||||
bottomMax?: number
|
||||
right?: number
|
||||
rightMax?: number
|
||||
}
|
||||
|
||||
export interface ScreenOrientation {
|
||||
type:
|
||||
| 'portraitPrimary'
|
||||
| 'portraitSecondary'
|
||||
| 'landscapePrimary'
|
||||
| 'landscapeSecondary'
|
||||
angle: number
|
||||
}
|
||||
|
||||
export interface DisplayFeature {
|
||||
orientation: 'vertical' | 'horizontal'
|
||||
offset: number
|
||||
maskLength: number
|
||||
}
|
||||
|
||||
export interface DevicePosture {
|
||||
type: 'continuous' | 'folded'
|
||||
}
|
||||
|
||||
export interface MediaFeature {
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export type VirtualTimePolicy =
|
||||
| 'advance'
|
||||
| 'pause'
|
||||
| 'pauseIfNetworkFetchesPending'
|
||||
|
||||
export interface UserAgentBrandVersion {
|
||||
brand: string
|
||||
version: string
|
||||
}
|
||||
|
||||
export interface UserAgentMetadata {
|
||||
brands?: UserAgentBrandVersion[]
|
||||
fullVersionList?: UserAgentBrandVersion[]
|
||||
fullVersion?: string
|
||||
platform: string
|
||||
platformVersion: string
|
||||
architecture: string
|
||||
model: string
|
||||
mobile: boolean
|
||||
bitness?: string
|
||||
wow64?: boolean
|
||||
formFactors?: string[]
|
||||
}
|
||||
|
||||
export type SensorType =
|
||||
| 'absolute-orientation'
|
||||
| 'accelerometer'
|
||||
| 'ambient-light'
|
||||
| 'gravity'
|
||||
| 'gyroscope'
|
||||
| 'linear-acceleration'
|
||||
| 'magnetometer'
|
||||
| 'relative-orientation'
|
||||
|
||||
export interface SensorMetadata {
|
||||
available?: boolean
|
||||
minimumFrequency?: number
|
||||
maximumFrequency?: number
|
||||
}
|
||||
|
||||
export interface SensorReadingSingle {
|
||||
value: number
|
||||
}
|
||||
|
||||
export interface SensorReadingXYZ {
|
||||
x: number
|
||||
y: number
|
||||
z: number
|
||||
}
|
||||
|
||||
export interface SensorReadingQuaternion {
|
||||
x: number
|
||||
y: number
|
||||
z: number
|
||||
w: number
|
||||
}
|
||||
|
||||
export interface SensorReading {
|
||||
single?: SensorReadingSingle
|
||||
xyz?: SensorReadingXYZ
|
||||
quaternion?: SensorReadingQuaternion
|
||||
}
|
||||
|
||||
export type PressureSource = 'cpu'
|
||||
|
||||
export type PressureState = 'nominal' | 'fair' | 'serious' | 'critical'
|
||||
|
||||
export interface PressureMetadata {
|
||||
available?: boolean
|
||||
}
|
||||
|
||||
export interface WorkAreaInsets {
|
||||
top?: number
|
||||
left?: number
|
||||
bottom?: number
|
||||
right?: number
|
||||
}
|
||||
|
||||
export type ScreenId = string
|
||||
|
||||
export interface ScreenInfo {
|
||||
left: number
|
||||
top: number
|
||||
width: number
|
||||
height: number
|
||||
availLeft: number
|
||||
availTop: number
|
||||
availWidth: number
|
||||
availHeight: number
|
||||
devicePixelRatio: number
|
||||
orientation: ScreenOrientation
|
||||
colorDepth: number
|
||||
isExtended: boolean
|
||||
isInternal: boolean
|
||||
isPrimary: boolean
|
||||
label: string
|
||||
id: ScreenId
|
||||
}
|
||||
|
||||
export type DisabledImageType = 'avif' | 'webp'
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface CanEmulateResult {
|
||||
result: boolean
|
||||
}
|
||||
|
||||
export interface SetFocusEmulationEnabledParams {
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
export interface SetAutoDarkModeOverrideParams {
|
||||
enabled?: boolean
|
||||
}
|
||||
|
||||
export interface SetCPUThrottlingRateParams {
|
||||
rate: number
|
||||
}
|
||||
|
||||
export interface SetDefaultBackgroundColorOverrideParams {
|
||||
color?: RGBA
|
||||
}
|
||||
|
||||
export interface SetSafeAreaInsetsOverrideParams {
|
||||
insets: SafeAreaInsets
|
||||
}
|
||||
|
||||
export interface SetDeviceMetricsOverrideParams {
|
||||
width: number
|
||||
height: number
|
||||
deviceScaleFactor: number
|
||||
mobile: boolean
|
||||
scale?: number
|
||||
screenWidth?: number
|
||||
screenHeight?: number
|
||||
positionX?: number
|
||||
positionY?: number
|
||||
dontSetVisibleSize?: boolean
|
||||
screenOrientation?: ScreenOrientation
|
||||
viewport?: Viewport
|
||||
displayFeature?: DisplayFeature
|
||||
devicePosture?: DevicePosture
|
||||
}
|
||||
|
||||
export interface SetDevicePostureOverrideParams {
|
||||
posture: DevicePosture
|
||||
}
|
||||
|
||||
export interface SetDisplayFeaturesOverrideParams {
|
||||
features: DisplayFeature[]
|
||||
}
|
||||
|
||||
export interface SetScrollbarsHiddenParams {
|
||||
hidden: boolean
|
||||
}
|
||||
|
||||
export interface SetDocumentCookieDisabledParams {
|
||||
disabled: boolean
|
||||
}
|
||||
|
||||
export interface SetEmitTouchEventsForMouseParams {
|
||||
enabled: boolean
|
||||
configuration?: 'mobile' | 'desktop'
|
||||
}
|
||||
|
||||
export interface SetEmulatedMediaParams {
|
||||
media?: string
|
||||
features?: MediaFeature[]
|
||||
}
|
||||
|
||||
export interface SetEmulatedVisionDeficiencyParams {
|
||||
type:
|
||||
| 'none'
|
||||
| 'blurredVision'
|
||||
| 'reducedContrast'
|
||||
| 'achromatopsia'
|
||||
| 'deuteranopia'
|
||||
| 'protanopia'
|
||||
| 'tritanopia'
|
||||
}
|
||||
|
||||
export interface SetEmulatedOSTextScaleParams {
|
||||
scale?: number
|
||||
}
|
||||
|
||||
export interface SetGeolocationOverrideParams {
|
||||
latitude?: number
|
||||
longitude?: number
|
||||
accuracy?: number
|
||||
altitude?: number
|
||||
altitudeAccuracy?: number
|
||||
heading?: number
|
||||
speed?: number
|
||||
}
|
||||
|
||||
export interface GetOverriddenSensorInformationParams {
|
||||
type: SensorType
|
||||
}
|
||||
|
||||
export interface GetOverriddenSensorInformationResult {
|
||||
requestedSamplingFrequency: number
|
||||
}
|
||||
|
||||
export interface SetSensorOverrideEnabledParams {
|
||||
enabled: boolean
|
||||
type: SensorType
|
||||
metadata?: SensorMetadata
|
||||
}
|
||||
|
||||
export interface SetSensorOverrideReadingsParams {
|
||||
type: SensorType
|
||||
reading: SensorReading
|
||||
}
|
||||
|
||||
export interface SetPressureSourceOverrideEnabledParams {
|
||||
enabled: boolean
|
||||
source: PressureSource
|
||||
metadata?: PressureMetadata
|
||||
}
|
||||
|
||||
export interface SetPressureStateOverrideParams {
|
||||
source: PressureSource
|
||||
state: PressureState
|
||||
}
|
||||
|
||||
export interface SetPressureDataOverrideParams {
|
||||
source: PressureSource
|
||||
state: PressureState
|
||||
ownContributionEstimate?: number
|
||||
}
|
||||
|
||||
export interface SetIdleOverrideParams {
|
||||
isUserActive: boolean
|
||||
isScreenUnlocked: boolean
|
||||
}
|
||||
|
||||
export interface SetNavigatorOverridesParams {
|
||||
platform: string
|
||||
}
|
||||
|
||||
export interface SetPageScaleFactorParams {
|
||||
pageScaleFactor: number
|
||||
}
|
||||
|
||||
export interface SetScriptExecutionDisabledParams {
|
||||
value: boolean
|
||||
}
|
||||
|
||||
export interface SetTouchEmulationEnabledParams {
|
||||
enabled: boolean
|
||||
maxTouchPoints?: number
|
||||
}
|
||||
|
||||
export interface SetVirtualTimePolicyParams {
|
||||
policy: VirtualTimePolicy
|
||||
budget?: number
|
||||
maxVirtualTimeTaskStarvationCount?: number
|
||||
initialVirtualTime?: TimeSinceEpoch
|
||||
}
|
||||
|
||||
export interface SetVirtualTimePolicyResult {
|
||||
virtualTimeTicksBase: number
|
||||
}
|
||||
|
||||
export interface SetLocaleOverrideParams {
|
||||
locale?: string
|
||||
}
|
||||
|
||||
export interface SetTimezoneOverrideParams {
|
||||
timezoneId: string
|
||||
}
|
||||
|
||||
export interface SetVisibleSizeParams {
|
||||
width: number
|
||||
height: number
|
||||
}
|
||||
|
||||
export interface SetDisabledImageTypesParams {
|
||||
imageTypes: DisabledImageType[]
|
||||
}
|
||||
|
||||
export interface SetDataSaverOverrideParams {
|
||||
dataSaverEnabled?: boolean
|
||||
}
|
||||
|
||||
export interface SetHardwareConcurrencyOverrideParams {
|
||||
hardwareConcurrency: number
|
||||
}
|
||||
|
||||
export interface SetUserAgentOverrideParams {
|
||||
userAgent: string
|
||||
acceptLanguage?: string
|
||||
platform?: string
|
||||
userAgentMetadata?: UserAgentMetadata
|
||||
}
|
||||
|
||||
export interface SetAutomationOverrideParams {
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
export interface SetSmallViewportHeightDifferenceOverrideParams {
|
||||
difference: number
|
||||
}
|
||||
|
||||
export interface GetScreenInfosResult {
|
||||
screenInfos: ScreenInfo[]
|
||||
}
|
||||
|
||||
export interface AddScreenParams {
|
||||
left: number
|
||||
top: number
|
||||
width: number
|
||||
height: number
|
||||
workAreaInsets?: WorkAreaInsets
|
||||
devicePixelRatio?: number
|
||||
rotation?: number
|
||||
colorDepth?: number
|
||||
label?: string
|
||||
isInternal?: boolean
|
||||
}
|
||||
|
||||
export interface AddScreenResult {
|
||||
screenInfo: ScreenInfo
|
||||
}
|
||||
|
||||
export interface RemoveScreenParams {
|
||||
screenId: ScreenId
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
@@ -0,0 +1,11 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface SetInstrumentationBreakpointParams {
|
||||
eventName: string
|
||||
}
|
||||
|
||||
export interface RemoveInstrumentationBreakpointParams {
|
||||
eventName: string
|
||||
}
|
||||
46
packages/cdp-protocol/src/generated/domains/extensions.ts
Normal file
46
packages/cdp-protocol/src/generated/domains/extensions.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type StorageArea = 'session' | 'local' | 'sync' | 'managed'
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface LoadUnpackedParams {
|
||||
path: string
|
||||
}
|
||||
|
||||
export interface LoadUnpackedResult {
|
||||
id: string
|
||||
}
|
||||
|
||||
export interface UninstallParams {
|
||||
id: string
|
||||
}
|
||||
|
||||
export interface GetStorageItemsParams {
|
||||
id: string
|
||||
storageArea: StorageArea
|
||||
keys?: string[]
|
||||
}
|
||||
|
||||
export interface GetStorageItemsResult {
|
||||
data: Record<string, unknown>
|
||||
}
|
||||
|
||||
export interface RemoveStorageItemsParams {
|
||||
id: string
|
||||
storageArea: StorageArea
|
||||
keys: string[]
|
||||
}
|
||||
|
||||
export interface ClearStorageItemsParams {
|
||||
id: string
|
||||
storageArea: StorageArea
|
||||
}
|
||||
|
||||
export interface SetStorageItemsParams {
|
||||
id: string
|
||||
storageArea: StorageArea
|
||||
values: Record<string, unknown>
|
||||
}
|
||||
72
packages/cdp-protocol/src/generated/domains/fed-cm.ts
Normal file
72
packages/cdp-protocol/src/generated/domains/fed-cm.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type LoginState = 'SignIn' | 'SignUp'
|
||||
|
||||
export type DialogType =
|
||||
| 'AccountChooser'
|
||||
| 'AutoReauthn'
|
||||
| 'ConfirmIdpLogin'
|
||||
| 'Error'
|
||||
|
||||
export type DialogButton =
|
||||
| 'ConfirmIdpLoginContinue'
|
||||
| 'ErrorGotIt'
|
||||
| 'ErrorMoreDetails'
|
||||
|
||||
export type AccountUrlType = 'TermsOfService' | 'PrivacyPolicy'
|
||||
|
||||
export interface Account {
|
||||
accountId: string
|
||||
email: string
|
||||
name: string
|
||||
givenName: string
|
||||
pictureUrl: string
|
||||
idpConfigUrl: string
|
||||
idpLoginUrl: string
|
||||
loginState: LoginState
|
||||
termsOfServiceUrl?: string
|
||||
privacyPolicyUrl?: string
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface EnableParams {
|
||||
disableRejectionDelay?: boolean
|
||||
}
|
||||
|
||||
export interface SelectAccountParams {
|
||||
dialogId: string
|
||||
accountIndex: number
|
||||
}
|
||||
|
||||
export interface ClickDialogButtonParams {
|
||||
dialogId: string
|
||||
dialogButton: DialogButton
|
||||
}
|
||||
|
||||
export interface OpenUrlParams {
|
||||
dialogId: string
|
||||
accountIndex: number
|
||||
accountUrlType: AccountUrlType
|
||||
}
|
||||
|
||||
export interface DismissDialogParams {
|
||||
dialogId: string
|
||||
triggerCooldown?: boolean
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface DialogShownEvent {
|
||||
dialogId: string
|
||||
dialogType: DialogType
|
||||
accounts: Account[]
|
||||
title: string
|
||||
subtitle?: string
|
||||
}
|
||||
|
||||
export interface DialogClosedEvent {
|
||||
dialogId: string
|
||||
}
|
||||
123
packages/cdp-protocol/src/generated/domains/fetch.ts
Normal file
123
packages/cdp-protocol/src/generated/domains/fetch.ts
Normal file
@@ -0,0 +1,123 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { StreamHandle } from './io'
|
||||
import type {
|
||||
ErrorReason,
|
||||
RequestId as NetworkRequestId,
|
||||
Request,
|
||||
ResourceType,
|
||||
} from './network'
|
||||
import type { FrameId } from './page'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type RequestId = string
|
||||
|
||||
export type RequestStage = 'Request' | 'Response'
|
||||
|
||||
export interface RequestPattern {
|
||||
urlPattern?: string
|
||||
resourceType?: ResourceType
|
||||
requestStage?: RequestStage
|
||||
}
|
||||
|
||||
export interface HeaderEntry {
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface AuthChallenge {
|
||||
source?: 'Server' | 'Proxy'
|
||||
origin: string
|
||||
scheme: string
|
||||
realm: string
|
||||
}
|
||||
|
||||
export interface AuthChallengeResponse {
|
||||
response: 'Default' | 'CancelAuth' | 'ProvideCredentials'
|
||||
username?: string
|
||||
password?: string
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface EnableParams {
|
||||
patterns?: RequestPattern[]
|
||||
handleAuthRequests?: boolean
|
||||
}
|
||||
|
||||
export interface FailRequestParams {
|
||||
requestId: RequestId
|
||||
errorReason: ErrorReason
|
||||
}
|
||||
|
||||
export interface FulfillRequestParams {
|
||||
requestId: RequestId
|
||||
responseCode: number
|
||||
responseHeaders?: HeaderEntry[]
|
||||
binaryResponseHeaders?: string
|
||||
body?: string
|
||||
responsePhrase?: string
|
||||
}
|
||||
|
||||
export interface ContinueRequestParams {
|
||||
requestId: RequestId
|
||||
url?: string
|
||||
method?: string
|
||||
postData?: string
|
||||
headers?: HeaderEntry[]
|
||||
interceptResponse?: boolean
|
||||
}
|
||||
|
||||
export interface ContinueWithAuthParams {
|
||||
requestId: RequestId
|
||||
authChallengeResponse: AuthChallengeResponse
|
||||
}
|
||||
|
||||
export interface ContinueResponseParams {
|
||||
requestId: RequestId
|
||||
responseCode?: number
|
||||
responsePhrase?: string
|
||||
responseHeaders?: HeaderEntry[]
|
||||
binaryResponseHeaders?: string
|
||||
}
|
||||
|
||||
export interface GetResponseBodyParams {
|
||||
requestId: RequestId
|
||||
}
|
||||
|
||||
export interface GetResponseBodyResult {
|
||||
body: string
|
||||
base64Encoded: boolean
|
||||
}
|
||||
|
||||
export interface TakeResponseBodyAsStreamParams {
|
||||
requestId: RequestId
|
||||
}
|
||||
|
||||
export interface TakeResponseBodyAsStreamResult {
|
||||
stream: StreamHandle
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface RequestPausedEvent {
|
||||
requestId: RequestId
|
||||
request: Request
|
||||
frameId: FrameId
|
||||
resourceType: ResourceType
|
||||
responseErrorReason?: ErrorReason
|
||||
responseStatusCode?: number
|
||||
responseStatusText?: string
|
||||
responseHeaders?: HeaderEntry[]
|
||||
networkId?: NetworkRequestId
|
||||
redirectedRequestId?: RequestId
|
||||
}
|
||||
|
||||
export interface AuthRequiredEvent {
|
||||
requestId: RequestId
|
||||
request: Request
|
||||
frameId: FrameId
|
||||
resourceType: ResourceType
|
||||
authChallenge: AuthChallenge
|
||||
}
|
||||
35
packages/cdp-protocol/src/generated/domains/file-system.ts
Normal file
35
packages/cdp-protocol/src/generated/domains/file-system.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { TimeSinceEpoch } from './network'
|
||||
import type { SerializedStorageKey } from './storage'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface File {
|
||||
name: string
|
||||
lastModified: TimeSinceEpoch
|
||||
size: number
|
||||
type: string
|
||||
}
|
||||
|
||||
export interface Directory {
|
||||
name: string
|
||||
nestedDirectories: string[]
|
||||
nestedFiles: File[]
|
||||
}
|
||||
|
||||
export interface BucketFileSystemLocator {
|
||||
storageKey: SerializedStorageKey
|
||||
bucketName?: string
|
||||
pathComponents: string[]
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface GetDirectoryParams {
|
||||
bucketFileSystemLocator: BucketFileSystemLocator
|
||||
}
|
||||
|
||||
export interface GetDirectoryResult {
|
||||
directory: Directory
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface ScreenshotParams {
|
||||
format?: 'jpeg' | 'png' | 'webp'
|
||||
quality?: number
|
||||
optimizeForSpeed?: boolean
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface BeginFrameParams {
|
||||
frameTimeTicks?: number
|
||||
interval?: number
|
||||
noDisplayUpdates?: boolean
|
||||
screenshot?: ScreenshotParams
|
||||
}
|
||||
|
||||
export interface BeginFrameResult {
|
||||
hasDamage: boolean
|
||||
screenshotData?: string
|
||||
}
|
||||
102
packages/cdp-protocol/src/generated/domains/heap-profiler.ts
Normal file
102
packages/cdp-protocol/src/generated/domains/heap-profiler.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { CallFrame, RemoteObject, RemoteObjectId } from './runtime'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type HeapSnapshotObjectId = string
|
||||
|
||||
export interface SamplingHeapProfileNode {
|
||||
callFrame: CallFrame
|
||||
selfSize: number
|
||||
id: number
|
||||
children: SamplingHeapProfileNode[]
|
||||
}
|
||||
|
||||
export interface SamplingHeapProfileSample {
|
||||
size: number
|
||||
nodeId: number
|
||||
ordinal: number
|
||||
}
|
||||
|
||||
export interface SamplingHeapProfile {
|
||||
head: SamplingHeapProfileNode
|
||||
samples: SamplingHeapProfileSample[]
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface AddInspectedHeapObjectParams {
|
||||
heapObjectId: HeapSnapshotObjectId
|
||||
}
|
||||
|
||||
export interface GetHeapObjectIdParams {
|
||||
objectId: RemoteObjectId
|
||||
}
|
||||
|
||||
export interface GetHeapObjectIdResult {
|
||||
heapSnapshotObjectId: HeapSnapshotObjectId
|
||||
}
|
||||
|
||||
export interface GetObjectByHeapObjectIdParams {
|
||||
objectId: HeapSnapshotObjectId
|
||||
objectGroup?: string
|
||||
}
|
||||
|
||||
export interface GetObjectByHeapObjectIdResult {
|
||||
result: RemoteObject
|
||||
}
|
||||
|
||||
export interface GetSamplingProfileResult {
|
||||
profile: SamplingHeapProfile
|
||||
}
|
||||
|
||||
export interface StartSamplingParams {
|
||||
samplingInterval?: number
|
||||
stackDepth?: number
|
||||
includeObjectsCollectedByMajorGC?: boolean
|
||||
includeObjectsCollectedByMinorGC?: boolean
|
||||
}
|
||||
|
||||
export interface StartTrackingHeapObjectsParams {
|
||||
trackAllocations?: boolean
|
||||
}
|
||||
|
||||
export interface StopSamplingResult {
|
||||
profile: SamplingHeapProfile
|
||||
}
|
||||
|
||||
export interface StopTrackingHeapObjectsParams {
|
||||
reportProgress?: boolean
|
||||
treatGlobalObjectsAsRoots?: boolean
|
||||
captureNumericValue?: boolean
|
||||
exposeInternals?: boolean
|
||||
}
|
||||
|
||||
export interface TakeHeapSnapshotParams {
|
||||
reportProgress?: boolean
|
||||
treatGlobalObjectsAsRoots?: boolean
|
||||
captureNumericValue?: boolean
|
||||
exposeInternals?: boolean
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface AddHeapSnapshotChunkEvent {
|
||||
chunk: string
|
||||
}
|
||||
|
||||
export interface HeapStatsUpdateEvent {
|
||||
statsUpdate: number[]
|
||||
}
|
||||
|
||||
export interface LastSeenObjectIdEvent {
|
||||
lastSeenObjectId: number
|
||||
timestamp: number
|
||||
}
|
||||
|
||||
export interface ReportHeapSnapshotProgressEvent {
|
||||
done: number
|
||||
total: number
|
||||
finished?: boolean
|
||||
}
|
||||
44
packages/cdp-protocol/src/generated/domains/history.ts
Normal file
44
packages/cdp-protocol/src/generated/domains/history.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export type HistoryEntryID = string
|
||||
|
||||
export interface HistoryEntry {
|
||||
id: HistoryEntryID
|
||||
url: string
|
||||
title: string
|
||||
lastVisitTime: number
|
||||
visitCount: number
|
||||
typedCount: number
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface SearchParams {
|
||||
query: string
|
||||
maxResults?: number
|
||||
startTime?: number
|
||||
endTime?: number
|
||||
}
|
||||
|
||||
export interface SearchResult {
|
||||
entries: HistoryEntry[]
|
||||
}
|
||||
|
||||
export interface GetRecentParams {
|
||||
maxResults?: number
|
||||
}
|
||||
|
||||
export interface GetRecentResult {
|
||||
entries: HistoryEntry[]
|
||||
}
|
||||
|
||||
export interface DeleteUrlParams {
|
||||
url: string
|
||||
}
|
||||
|
||||
export interface DeleteRangeParams {
|
||||
startTime: number
|
||||
endTime: number
|
||||
}
|
||||
130
packages/cdp-protocol/src/generated/domains/indexed-db.ts
Normal file
130
packages/cdp-protocol/src/generated/domains/indexed-db.ts
Normal file
@@ -0,0 +1,130 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
import type { RemoteObject } from './runtime'
|
||||
import type { StorageBucket } from './storage'
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface DatabaseWithObjectStores {
|
||||
name: string
|
||||
version: number
|
||||
objectStores: ObjectStore[]
|
||||
}
|
||||
|
||||
export interface ObjectStore {
|
||||
name: string
|
||||
keyPath: KeyPath
|
||||
autoIncrement: boolean
|
||||
indexes: ObjectStoreIndex[]
|
||||
}
|
||||
|
||||
export interface ObjectStoreIndex {
|
||||
name: string
|
||||
keyPath: KeyPath
|
||||
unique: boolean
|
||||
multiEntry: boolean
|
||||
}
|
||||
|
||||
export interface Key {
|
||||
type: 'number' | 'string' | 'date' | 'array'
|
||||
number?: number
|
||||
string?: string
|
||||
date?: number
|
||||
array?: Key[]
|
||||
}
|
||||
|
||||
export interface KeyRange {
|
||||
lower?: Key
|
||||
upper?: Key
|
||||
lowerOpen: boolean
|
||||
upperOpen: boolean
|
||||
}
|
||||
|
||||
export interface DataEntry {
|
||||
key: RemoteObject
|
||||
primaryKey: RemoteObject
|
||||
value: RemoteObject
|
||||
}
|
||||
|
||||
export interface KeyPath {
|
||||
type: 'null' | 'string' | 'array'
|
||||
string?: string
|
||||
array?: string[]
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface ClearObjectStoreParams {
|
||||
securityOrigin?: string
|
||||
storageKey?: string
|
||||
storageBucket?: StorageBucket
|
||||
databaseName: string
|
||||
objectStoreName: string
|
||||
}
|
||||
|
||||
export interface DeleteDatabaseParams {
|
||||
securityOrigin?: string
|
||||
storageKey?: string
|
||||
storageBucket?: StorageBucket
|
||||
databaseName: string
|
||||
}
|
||||
|
||||
export interface DeleteObjectStoreEntriesParams {
|
||||
securityOrigin?: string
|
||||
storageKey?: string
|
||||
storageBucket?: StorageBucket
|
||||
databaseName: string
|
||||
objectStoreName: string
|
||||
keyRange: KeyRange
|
||||
}
|
||||
|
||||
export interface RequestDataParams {
|
||||
securityOrigin?: string
|
||||
storageKey?: string
|
||||
storageBucket?: StorageBucket
|
||||
databaseName: string
|
||||
objectStoreName: string
|
||||
indexName?: string
|
||||
skipCount: number
|
||||
pageSize: number
|
||||
keyRange?: KeyRange
|
||||
}
|
||||
|
||||
export interface RequestDataResult {
|
||||
objectStoreDataEntries: DataEntry[]
|
||||
hasMore: boolean
|
||||
}
|
||||
|
||||
export interface GetMetadataParams {
|
||||
securityOrigin?: string
|
||||
storageKey?: string
|
||||
storageBucket?: StorageBucket
|
||||
databaseName: string
|
||||
objectStoreName: string
|
||||
}
|
||||
|
||||
export interface GetMetadataResult {
|
||||
entriesCount: number
|
||||
keyGeneratorValue: number
|
||||
}
|
||||
|
||||
export interface RequestDatabaseParams {
|
||||
securityOrigin?: string
|
||||
storageKey?: string
|
||||
storageBucket?: StorageBucket
|
||||
databaseName: string
|
||||
}
|
||||
|
||||
export interface RequestDatabaseResult {
|
||||
databaseWithObjectStores: DatabaseWithObjectStores
|
||||
}
|
||||
|
||||
export interface RequestDatabaseNamesParams {
|
||||
securityOrigin?: string
|
||||
storageKey?: string
|
||||
storageBucket?: StorageBucket
|
||||
}
|
||||
|
||||
export interface RequestDatabaseNamesResult {
|
||||
databaseNames: string[]
|
||||
}
|
||||
165
packages/cdp-protocol/src/generated/domains/input.ts
Normal file
165
packages/cdp-protocol/src/generated/domains/input.ts
Normal file
@@ -0,0 +1,165 @@
|
||||
// ── AUTO-GENERATED from CDP protocol. DO NOT EDIT. ──
|
||||
|
||||
// ══ Types ══
|
||||
|
||||
export interface TouchPoint {
|
||||
x: number
|
||||
y: number
|
||||
radiusX?: number
|
||||
radiusY?: number
|
||||
rotationAngle?: number
|
||||
force?: number
|
||||
tangentialPressure?: number
|
||||
tiltX?: number
|
||||
tiltY?: number
|
||||
twist?: number
|
||||
id?: number
|
||||
}
|
||||
|
||||
export type GestureSourceType = 'default' | 'touch' | 'mouse'
|
||||
|
||||
export type MouseButton =
|
||||
| 'none'
|
||||
| 'left'
|
||||
| 'middle'
|
||||
| 'right'
|
||||
| 'back'
|
||||
| 'forward'
|
||||
|
||||
export type TimeSinceEpoch = number
|
||||
|
||||
export interface DragDataItem {
|
||||
mimeType: string
|
||||
data: string
|
||||
title?: string
|
||||
baseURL?: string
|
||||
}
|
||||
|
||||
export interface DragData {
|
||||
items: DragDataItem[]
|
||||
files?: string[]
|
||||
dragOperationsMask: number
|
||||
}
|
||||
|
||||
// ══ Commands ══
|
||||
|
||||
export interface DispatchDragEventParams {
|
||||
type: 'dragEnter' | 'dragOver' | 'drop' | 'dragCancel'
|
||||
x: number
|
||||
y: number
|
||||
data: DragData
|
||||
modifiers?: number
|
||||
}
|
||||
|
||||
export interface DispatchKeyEventParams {
|
||||
type: 'keyDown' | 'keyUp' | 'rawKeyDown' | 'char'
|
||||
modifiers?: number
|
||||
timestamp?: TimeSinceEpoch
|
||||
text?: string
|
||||
unmodifiedText?: string
|
||||
keyIdentifier?: string
|
||||
code?: string
|
||||
key?: string
|
||||
windowsVirtualKeyCode?: number
|
||||
nativeVirtualKeyCode?: number
|
||||
autoRepeat?: boolean
|
||||
isKeypad?: boolean
|
||||
isSystemKey?: boolean
|
||||
location?: number
|
||||
commands?: string[]
|
||||
}
|
||||
|
||||
export interface InsertTextParams {
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface ImeSetCompositionParams {
|
||||
text: string
|
||||
selectionStart: number
|
||||
selectionEnd: number
|
||||
replacementStart?: number
|
||||
replacementEnd?: number
|
||||
}
|
||||
|
||||
export interface DispatchMouseEventParams {
|
||||
type: 'mousePressed' | 'mouseReleased' | 'mouseMoved' | 'mouseWheel'
|
||||
x: number
|
||||
y: number
|
||||
modifiers?: number
|
||||
timestamp?: TimeSinceEpoch
|
||||
button?: MouseButton
|
||||
buttons?: number
|
||||
clickCount?: number
|
||||
force?: number
|
||||
tangentialPressure?: number
|
||||
tiltX?: number
|
||||
tiltY?: number
|
||||
twist?: number
|
||||
deltaX?: number
|
||||
deltaY?: number
|
||||
pointerType?: 'mouse' | 'pen'
|
||||
}
|
||||
|
||||
export interface DispatchTouchEventParams {
|
||||
type: 'touchStart' | 'touchEnd' | 'touchMove' | 'touchCancel'
|
||||
touchPoints: TouchPoint[]
|
||||
modifiers?: number
|
||||
timestamp?: TimeSinceEpoch
|
||||
}
|
||||
|
||||
export interface EmulateTouchFromMouseEventParams {
|
||||
type: 'mousePressed' | 'mouseReleased' | 'mouseMoved' | 'mouseWheel'
|
||||
x: number
|
||||
y: number
|
||||
button: MouseButton
|
||||
timestamp?: TimeSinceEpoch
|
||||
deltaX?: number
|
||||
deltaY?: number
|
||||
modifiers?: number
|
||||
clickCount?: number
|
||||
}
|
||||
|
||||
export interface SetIgnoreInputEventsParams {
|
||||
ignore: boolean
|
||||
}
|
||||
|
||||
export interface SetInterceptDragsParams {
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
export interface SynthesizePinchGestureParams {
|
||||
x: number
|
||||
y: number
|
||||
scaleFactor: number
|
||||
relativeSpeed?: number
|
||||
gestureSourceType?: GestureSourceType
|
||||
}
|
||||
|
||||
export interface SynthesizeScrollGestureParams {
|
||||
x: number
|
||||
y: number
|
||||
xDistance?: number
|
||||
yDistance?: number
|
||||
xOverscroll?: number
|
||||
yOverscroll?: number
|
||||
preventFling?: boolean
|
||||
speed?: number
|
||||
gestureSourceType?: GestureSourceType
|
||||
repeatCount?: number
|
||||
repeatDelayMs?: number
|
||||
interactionMarkerName?: string
|
||||
}
|
||||
|
||||
export interface SynthesizeTapGestureParams {
|
||||
x: number
|
||||
y: number
|
||||
duration?: number
|
||||
tapCount?: number
|
||||
gestureSourceType?: GestureSourceType
|
||||
}
|
||||
|
||||
// ══ Events ══
|
||||
|
||||
export interface DragInterceptedEvent {
|
||||
data: DragData
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user