@onkernel/sdk 0.55.0 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.mjs.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/decoders/line.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/lib/browser-fetch.d.mts.map +1 -1
- package/lib/browser-fetch.d.ts.map +1 -1
- package/lib/browser-fetch.mjs.map +1 -1
- package/lib/browser-routing.d.mts.map +1 -1
- package/lib/browser-routing.d.ts.map +1 -1
- package/lib/browser-routing.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/api-keys.d.mts +146 -0
- package/resources/api-keys.d.mts.map +1 -0
- package/resources/api-keys.d.ts +146 -0
- package/resources/api-keys.d.ts.map +1 -0
- package/resources/api-keys.js +81 -0
- package/resources/api-keys.js.map +1 -0
- package/resources/api-keys.mjs +77 -0
- package/resources/api-keys.mjs.map +1 -0
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/auth/auth.d.mts.map +1 -1
- package/resources/auth/auth.d.ts.map +1 -1
- package/resources/auth/auth.mjs.map +1 -1
- package/resources/auth/connections.d.mts +35 -5
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +35 -5
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/auth/connections.mjs.map +1 -1
- package/resources/auth/index.d.mts.map +1 -1
- package/resources/auth/index.d.ts.map +1 -1
- package/resources/auth/index.mjs.map +1 -1
- package/resources/auth.d.mts.map +1 -1
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.mjs.map +1 -1
- package/resources/browser-pools.d.mts +33 -15
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +33 -15
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browser-pools.js.map +1 -1
- package/resources/browser-pools.mjs.map +1 -1
- package/resources/browsers/browsers.d.mts +144 -53
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +144 -53
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js +4 -14
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs +4 -14
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/browsers/computer.d.mts.map +1 -1
- package/resources/browsers/computer.d.ts.map +1 -1
- package/resources/browsers/computer.mjs.map +1 -1
- package/resources/browsers/fs/fs.d.mts.map +1 -1
- package/resources/browsers/fs/fs.d.ts.map +1 -1
- package/resources/browsers/fs/fs.mjs.map +1 -1
- package/resources/browsers/fs/index.d.mts.map +1 -1
- package/resources/browsers/fs/index.d.ts.map +1 -1
- package/resources/browsers/fs/index.mjs.map +1 -1
- package/resources/browsers/fs/watch.d.mts.map +1 -1
- package/resources/browsers/fs/watch.d.ts.map +1 -1
- package/resources/browsers/fs/watch.mjs.map +1 -1
- package/resources/browsers/fs.d.mts.map +1 -1
- package/resources/browsers/fs.d.ts.map +1 -1
- package/resources/browsers/fs.mjs.map +1 -1
- package/resources/browsers/index.d.mts +2 -1
- package/resources/browsers/index.d.mts.map +1 -1
- package/resources/browsers/index.d.ts +2 -1
- package/resources/browsers/index.d.ts.map +1 -1
- package/resources/browsers/index.js +3 -1
- package/resources/browsers/index.js.map +1 -1
- package/resources/browsers/index.mjs +1 -0
- package/resources/browsers/index.mjs.map +1 -1
- package/resources/browsers/logs.d.mts.map +1 -1
- package/resources/browsers/logs.d.ts.map +1 -1
- package/resources/browsers/logs.mjs.map +1 -1
- package/resources/browsers/playwright.d.mts.map +1 -1
- package/resources/browsers/playwright.d.ts.map +1 -1
- package/resources/browsers/playwright.mjs.map +1 -1
- package/resources/browsers/process.d.mts.map +1 -1
- package/resources/browsers/process.d.ts.map +1 -1
- package/resources/browsers/process.mjs.map +1 -1
- package/resources/browsers/replays.d.mts.map +1 -1
- package/resources/browsers/replays.d.ts.map +1 -1
- package/resources/browsers/replays.mjs.map +1 -1
- package/resources/browsers/telemetry.d.mts +1230 -0
- package/resources/browsers/telemetry.d.mts.map +1 -0
- package/resources/browsers/telemetry.d.ts +1230 -0
- package/resources/browsers/telemetry.d.ts.map +1 -0
- package/resources/browsers/telemetry.js +45 -0
- package/resources/browsers/telemetry.js.map +1 -0
- package/resources/browsers/telemetry.mjs +41 -0
- package/resources/browsers/telemetry.mjs.map +1 -0
- package/resources/browsers.d.mts.map +1 -1
- package/resources/browsers.d.ts.map +1 -1
- package/resources/browsers.mjs.map +1 -1
- package/resources/credential-providers.d.mts.map +1 -1
- package/resources/credential-providers.d.ts.map +1 -1
- package/resources/credential-providers.mjs.map +1 -1
- package/resources/credentials.d.mts.map +1 -1
- package/resources/credentials.d.ts.map +1 -1
- package/resources/credentials.mjs.map +1 -1
- package/resources/deployments.d.mts.map +1 -1
- package/resources/deployments.d.ts.map +1 -1
- package/resources/deployments.mjs.map +1 -1
- package/resources/extensions.d.mts.map +1 -1
- package/resources/extensions.d.ts.map +1 -1
- package/resources/extensions.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invocations.d.mts +18 -6
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +18 -6
- package/resources/invocations.d.ts.map +1 -1
- package/resources/invocations.js.map +1 -1
- package/resources/invocations.mjs.map +1 -1
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.mjs.map +1 -1
- package/resources/projects/index.d.mts.map +1 -1
- package/resources/projects/index.d.ts.map +1 -1
- package/resources/projects/index.mjs.map +1 -1
- package/resources/projects/limits.d.mts +0 -15
- package/resources/projects/limits.d.mts.map +1 -1
- package/resources/projects/limits.d.ts +0 -15
- package/resources/projects/limits.d.ts.map +1 -1
- package/resources/projects/limits.js +2 -2
- package/resources/projects/limits.js.map +1 -1
- package/resources/projects/limits.mjs +2 -2
- package/resources/projects/limits.mjs.map +1 -1
- package/resources/projects/projects.d.mts +1 -2
- package/resources/projects/projects.d.mts.map +1 -1
- package/resources/projects/projects.d.ts +1 -2
- package/resources/projects/projects.d.ts.map +1 -1
- package/resources/projects/projects.js +6 -7
- package/resources/projects/projects.js.map +1 -1
- package/resources/projects/projects.mjs +6 -7
- package/resources/projects/projects.mjs.map +1 -1
- package/resources/projects.d.mts.map +1 -1
- package/resources/projects.d.ts.map +1 -1
- package/resources/projects.mjs.map +1 -1
- package/resources/proxies.d.mts +3 -1
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +3 -1
- package/resources/proxies.d.ts.map +1 -1
- package/resources/proxies.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +24 -4
- package/src/resources/api-keys.ts +195 -0
- package/src/resources/auth/connections.ts +49 -5
- package/src/resources/browser-pools.ts +33 -16
- package/src/resources/browsers/browsers.ts +218 -69
- package/src/resources/browsers/index.ts +35 -2
- package/src/resources/browsers/telemetry.ts +1521 -0
- package/src/resources/index.ts +9 -2
- package/src/resources/invocations.ts +18 -7
- package/src/resources/projects/limits.ts +2 -20
- package/src/resources/projects/projects.ts +6 -7
- package/src/resources/proxies.ts +3 -1
- package/src/version.ts +1 -1
- package/streaming.d.mts +1 -0
- package/streaming.d.mts.map +1 -1
- package/streaming.d.ts +1 -0
- package/streaming.d.ts.map +1 -1
- package/streaming.mjs +1 -0
- package/streaming.mjs.map +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,1230 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as TelemetryAPI from "./telemetry.js";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
4
|
+
import { Stream } from "../../core/streaming.js";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
+
/**
|
|
7
|
+
* Stream live telemetry events from a browser session.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Telemetry extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Streams browser telemetry events as a server-sent events (SSE) stream. The
|
|
12
|
+
* stream closes when the browser session terminates. Each event frame includes an
|
|
13
|
+
* id: field containing a monotonically increasing sequence number; pass it as
|
|
14
|
+
* Last-Event-ID on reconnect to resume without gaps. The event: field is never
|
|
15
|
+
* set; all frames carry JSON in the data: field. A keepalive comment frame is sent
|
|
16
|
+
* every 15 seconds when no events arrive. Returns 404 if the browser session does
|
|
17
|
+
* not exist. If telemetry was not enabled on the session, the stream opens but no
|
|
18
|
+
* events are delivered.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const response = await client.browsers.telemetry.stream(
|
|
23
|
+
* 'id',
|
|
24
|
+
* );
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
stream(id: string, params?: TelemetryStreamParams | undefined, options?: RequestOptions): APIPromise<Stream<TelemetryStreamResponse>>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* CDP Runtime.StackTrace representing the JavaScript call stack at the time of an
|
|
31
|
+
* event. Fields use CDP naming conventions rather than snake_case to match the
|
|
32
|
+
* Chrome DevTools Protocol wire format.
|
|
33
|
+
*/
|
|
34
|
+
export interface BrowserCallStack {
|
|
35
|
+
/**
|
|
36
|
+
* Ordered list of call frames, outermost first.
|
|
37
|
+
*/
|
|
38
|
+
callFrames: Array<BrowserCallStack.CallFrame>;
|
|
39
|
+
/**
|
|
40
|
+
* Optional label for the stack trace (e.g. async cause).
|
|
41
|
+
*/
|
|
42
|
+
description?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Parent stack trace for async stacks.
|
|
45
|
+
*/
|
|
46
|
+
parent?: BrowserCallStack;
|
|
47
|
+
}
|
|
48
|
+
export declare namespace BrowserCallStack {
|
|
49
|
+
interface CallFrame {
|
|
50
|
+
/**
|
|
51
|
+
* Zero-based column number within the line.
|
|
52
|
+
*/
|
|
53
|
+
columnNumber: number;
|
|
54
|
+
/**
|
|
55
|
+
* JavaScript function name, or empty string for anonymous functions.
|
|
56
|
+
*/
|
|
57
|
+
functionName: string;
|
|
58
|
+
/**
|
|
59
|
+
* Zero-based line number within the script.
|
|
60
|
+
*/
|
|
61
|
+
lineNumber: number;
|
|
62
|
+
/**
|
|
63
|
+
* CDP script identifier.
|
|
64
|
+
*/
|
|
65
|
+
scriptId: string;
|
|
66
|
+
/**
|
|
67
|
+
* URL or name of the script file.
|
|
68
|
+
*/
|
|
69
|
+
url: string;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* A browser console error or uncaught JavaScript exception event. Emitted from two
|
|
74
|
+
* distinct CDP sources with different data shapes. Runtime.consoleAPICalled
|
|
75
|
+
* (console.error calls) produces level, text, args, and stack_trace.
|
|
76
|
+
* Runtime.exceptionThrown (uncaught exceptions) produces text, line, column,
|
|
77
|
+
* source_url, and stack_trace. Fields not applicable to the source are absent.
|
|
78
|
+
*/
|
|
79
|
+
export interface BrowserConsoleErrorEvent {
|
|
80
|
+
/**
|
|
81
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
82
|
+
*/
|
|
83
|
+
source: BrowserEventSource;
|
|
84
|
+
/**
|
|
85
|
+
* Event timestamp in Unix microseconds.
|
|
86
|
+
*/
|
|
87
|
+
ts: number;
|
|
88
|
+
type: 'console_error';
|
|
89
|
+
/**
|
|
90
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
91
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
92
|
+
* occurred.
|
|
93
|
+
*/
|
|
94
|
+
data?: BrowserConsoleErrorEvent.Data;
|
|
95
|
+
/**
|
|
96
|
+
* True if the data field was truncated due to size limits.
|
|
97
|
+
*/
|
|
98
|
+
truncated?: boolean;
|
|
99
|
+
}
|
|
100
|
+
export declare namespace BrowserConsoleErrorEvent {
|
|
101
|
+
/**
|
|
102
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
103
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
104
|
+
* occurred.
|
|
105
|
+
*/
|
|
106
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
107
|
+
/**
|
|
108
|
+
* Error message text. Present in both source paths.
|
|
109
|
+
*/
|
|
110
|
+
text: string;
|
|
111
|
+
/**
|
|
112
|
+
* All console arguments coerced to strings. Present only when sourced from
|
|
113
|
+
* Runtime.consoleAPICalled.
|
|
114
|
+
*/
|
|
115
|
+
args?: Array<string>;
|
|
116
|
+
/**
|
|
117
|
+
* Column number in the script where the exception was thrown. Present only when
|
|
118
|
+
* sourced from Runtime.exceptionThrown.
|
|
119
|
+
*/
|
|
120
|
+
column?: number;
|
|
121
|
+
/**
|
|
122
|
+
* CDP console type value, always "error". Present only when sourced from
|
|
123
|
+
* Runtime.consoleAPICalled.
|
|
124
|
+
*/
|
|
125
|
+
level?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Line number in the script where the exception was thrown. Present only when
|
|
128
|
+
* sourced from Runtime.exceptionThrown.
|
|
129
|
+
*/
|
|
130
|
+
line?: number;
|
|
131
|
+
/**
|
|
132
|
+
* URL of the script file that threw the exception. Present only when sourced from
|
|
133
|
+
* Runtime.exceptionThrown.
|
|
134
|
+
*/
|
|
135
|
+
source_url?: string;
|
|
136
|
+
/**
|
|
137
|
+
* CDP Runtime.StackTrace representing the JavaScript call stack at the time of an
|
|
138
|
+
* event. Fields use CDP naming conventions rather than snake_case to match the
|
|
139
|
+
* Chrome DevTools Protocol wire format.
|
|
140
|
+
*/
|
|
141
|
+
stack_trace?: TelemetryAPI.BrowserCallStack;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* A browser console log event (console.log, console.info, console.warn, etc.).
|
|
146
|
+
*/
|
|
147
|
+
export interface BrowserConsoleLogEvent {
|
|
148
|
+
/**
|
|
149
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
150
|
+
*/
|
|
151
|
+
source: BrowserEventSource;
|
|
152
|
+
/**
|
|
153
|
+
* Event timestamp in Unix microseconds.
|
|
154
|
+
*/
|
|
155
|
+
ts: number;
|
|
156
|
+
type: 'console_log';
|
|
157
|
+
/**
|
|
158
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
159
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
160
|
+
* occurred.
|
|
161
|
+
*/
|
|
162
|
+
data?: BrowserConsoleLogEvent.Data;
|
|
163
|
+
/**
|
|
164
|
+
* True if the data field was truncated due to size limits.
|
|
165
|
+
*/
|
|
166
|
+
truncated?: boolean;
|
|
167
|
+
}
|
|
168
|
+
export declare namespace BrowserConsoleLogEvent {
|
|
169
|
+
/**
|
|
170
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
171
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
172
|
+
* occurred.
|
|
173
|
+
*/
|
|
174
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
175
|
+
/**
|
|
176
|
+
* All console arguments coerced to strings.
|
|
177
|
+
*/
|
|
178
|
+
args?: Array<string>;
|
|
179
|
+
/**
|
|
180
|
+
* CDP Runtime.consoleAPICalled type, passed through unfiltered from Chrome. error
|
|
181
|
+
* is routed to console_error events instead; all other CDP console types appear
|
|
182
|
+
* here. See CDP spec for the full enum.
|
|
183
|
+
*/
|
|
184
|
+
level?: string;
|
|
185
|
+
/**
|
|
186
|
+
* CDP Runtime.StackTrace representing the JavaScript call stack at the time of an
|
|
187
|
+
* event. Fields use CDP naming conventions rather than snake_case to match the
|
|
188
|
+
* Chrome DevTools Protocol wire format.
|
|
189
|
+
*/
|
|
190
|
+
stack_trace?: TelemetryAPI.BrowserCallStack;
|
|
191
|
+
/**
|
|
192
|
+
* First console argument coerced to string.
|
|
193
|
+
*/
|
|
194
|
+
text?: string;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
199
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
200
|
+
* occurred.
|
|
201
|
+
*/
|
|
202
|
+
export interface BrowserEventContext {
|
|
203
|
+
/**
|
|
204
|
+
* CDP frame identifier within the target.
|
|
205
|
+
*/
|
|
206
|
+
frame_id?: string;
|
|
207
|
+
/**
|
|
208
|
+
* CDP document loader identifier, reset on each navigation.
|
|
209
|
+
*/
|
|
210
|
+
loader_id?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Monotonically increasing navigation sequence number, incremented on each
|
|
213
|
+
* top-level navigation within the target.
|
|
214
|
+
*/
|
|
215
|
+
nav_seq?: number;
|
|
216
|
+
/**
|
|
217
|
+
* CDP session identifier for the target connection.
|
|
218
|
+
*/
|
|
219
|
+
session_id?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Browser target identifier (stable across navigations within a tab).
|
|
222
|
+
*/
|
|
223
|
+
target_id?: string;
|
|
224
|
+
/**
|
|
225
|
+
* CDP target type of the page that produced the event.
|
|
226
|
+
*/
|
|
227
|
+
target_type?: 'page' | 'background_page' | 'service_worker' | 'shared_worker' | 'other';
|
|
228
|
+
/**
|
|
229
|
+
* URL relevant to this event — page URL for navigation and page events, request
|
|
230
|
+
* URL for network events.
|
|
231
|
+
*/
|
|
232
|
+
url?: string;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
236
|
+
*/
|
|
237
|
+
export interface BrowserEventSource {
|
|
238
|
+
/**
|
|
239
|
+
* Event producer. cdp: Chrome DevTools Protocol events from the browser.
|
|
240
|
+
* kernel_api: Kernel API server. extension: injected Chrome extension.
|
|
241
|
+
* local_process: system process running alongside the browser.
|
|
242
|
+
*/
|
|
243
|
+
kind: 'cdp' | 'kernel_api' | 'extension' | 'local_process';
|
|
244
|
+
/**
|
|
245
|
+
* Producer-specific event name (e.g. Runtime.consoleAPICalled for CDP-sourced
|
|
246
|
+
* console events, Runtime.exceptionThrown for uncaught exceptions).
|
|
247
|
+
*/
|
|
248
|
+
event?: string;
|
|
249
|
+
/**
|
|
250
|
+
* Producer-specific context (e.g. CDP target/session/frame IDs).
|
|
251
|
+
*/
|
|
252
|
+
metadata?: {
|
|
253
|
+
[key: string]: string;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* HTTP headers map forwarded as-is from CDP without normalization. Values are
|
|
258
|
+
* typically strings but may be any JSON type.
|
|
259
|
+
*/
|
|
260
|
+
export type BrowserHTTPHeaders = {
|
|
261
|
+
[key: string]: unknown;
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* A browser user click event captured via injected page script.
|
|
265
|
+
*/
|
|
266
|
+
export interface BrowserInteractionClickEvent {
|
|
267
|
+
/**
|
|
268
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
269
|
+
*/
|
|
270
|
+
source: BrowserEventSource;
|
|
271
|
+
/**
|
|
272
|
+
* Event timestamp in Unix microseconds.
|
|
273
|
+
*/
|
|
274
|
+
ts: number;
|
|
275
|
+
type: 'interaction_click';
|
|
276
|
+
/**
|
|
277
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
278
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
279
|
+
* occurred.
|
|
280
|
+
*/
|
|
281
|
+
data?: BrowserInteractionClickEvent.Data;
|
|
282
|
+
/**
|
|
283
|
+
* True if the data field was truncated due to size limits.
|
|
284
|
+
*/
|
|
285
|
+
truncated?: boolean;
|
|
286
|
+
}
|
|
287
|
+
export declare namespace BrowserInteractionClickEvent {
|
|
288
|
+
/**
|
|
289
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
290
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
291
|
+
* occurred.
|
|
292
|
+
*/
|
|
293
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
294
|
+
/**
|
|
295
|
+
* CSS selector path to the clicked element.
|
|
296
|
+
*/
|
|
297
|
+
selector?: string;
|
|
298
|
+
/**
|
|
299
|
+
* HTML tag name of the clicked element in uppercase (e.g. BUTTON, A, DIV).
|
|
300
|
+
*/
|
|
301
|
+
tag?: string;
|
|
302
|
+
/**
|
|
303
|
+
* Visible text content of the clicked element, trimmed.
|
|
304
|
+
*/
|
|
305
|
+
text?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Viewport x-coordinate of the click in CSS pixels.
|
|
308
|
+
*/
|
|
309
|
+
x?: number;
|
|
310
|
+
/**
|
|
311
|
+
* Viewport y-coordinate of the click in CSS pixels.
|
|
312
|
+
*/
|
|
313
|
+
y?: number;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* A browser keyboard event captured via injected page script.
|
|
318
|
+
*/
|
|
319
|
+
export interface BrowserInteractionKeyEvent {
|
|
320
|
+
/**
|
|
321
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
322
|
+
*/
|
|
323
|
+
source: BrowserEventSource;
|
|
324
|
+
/**
|
|
325
|
+
* Event timestamp in Unix microseconds.
|
|
326
|
+
*/
|
|
327
|
+
ts: number;
|
|
328
|
+
type: 'interaction_key';
|
|
329
|
+
/**
|
|
330
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
331
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
332
|
+
* occurred.
|
|
333
|
+
*/
|
|
334
|
+
data?: BrowserInteractionKeyEvent.Data;
|
|
335
|
+
/**
|
|
336
|
+
* True if the data field was truncated due to size limits.
|
|
337
|
+
*/
|
|
338
|
+
truncated?: boolean;
|
|
339
|
+
}
|
|
340
|
+
export declare namespace BrowserInteractionKeyEvent {
|
|
341
|
+
/**
|
|
342
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
343
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
344
|
+
* occurred.
|
|
345
|
+
*/
|
|
346
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
347
|
+
/**
|
|
348
|
+
* Key value from the KeyboardEvent (e.g. Enter, Backspace, a).
|
|
349
|
+
*/
|
|
350
|
+
key?: string;
|
|
351
|
+
/**
|
|
352
|
+
* CSS selector path to the element that had focus when the key was pressed.
|
|
353
|
+
*/
|
|
354
|
+
selector?: string;
|
|
355
|
+
/**
|
|
356
|
+
* HTML tag name of the focused element in uppercase (e.g. INPUT, TEXTAREA, DIV).
|
|
357
|
+
*/
|
|
358
|
+
tag?: string;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* A browser scroll settled event emitted after scroll position stops changing,
|
|
363
|
+
* captured via injected page script.
|
|
364
|
+
*/
|
|
365
|
+
export interface BrowserInteractionScrollSettledEvent {
|
|
366
|
+
/**
|
|
367
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
368
|
+
*/
|
|
369
|
+
source: BrowserEventSource;
|
|
370
|
+
/**
|
|
371
|
+
* Event timestamp in Unix microseconds.
|
|
372
|
+
*/
|
|
373
|
+
ts: number;
|
|
374
|
+
type: 'interaction_scroll_settled';
|
|
375
|
+
/**
|
|
376
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
377
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
378
|
+
* occurred.
|
|
379
|
+
*/
|
|
380
|
+
data?: BrowserInteractionScrollSettledEvent.Data;
|
|
381
|
+
/**
|
|
382
|
+
* True if the data field was truncated due to size limits.
|
|
383
|
+
*/
|
|
384
|
+
truncated?: boolean;
|
|
385
|
+
}
|
|
386
|
+
export declare namespace BrowserInteractionScrollSettledEvent {
|
|
387
|
+
/**
|
|
388
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
389
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
390
|
+
* occurred.
|
|
391
|
+
*/
|
|
392
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
393
|
+
/**
|
|
394
|
+
* Scroll x-position at the start of the scroll gesture in CSS pixels.
|
|
395
|
+
*/
|
|
396
|
+
from_x?: number;
|
|
397
|
+
/**
|
|
398
|
+
* Scroll y-position at the start of the scroll gesture in CSS pixels.
|
|
399
|
+
*/
|
|
400
|
+
from_y?: number;
|
|
401
|
+
/**
|
|
402
|
+
* CSS selector path to the scrolled element.
|
|
403
|
+
*/
|
|
404
|
+
target_selector?: string;
|
|
405
|
+
/**
|
|
406
|
+
* Final scroll x-position after the gesture settled in CSS pixels.
|
|
407
|
+
*/
|
|
408
|
+
to_x?: number;
|
|
409
|
+
/**
|
|
410
|
+
* Final scroll y-position after the gesture settled in CSS pixels.
|
|
411
|
+
*/
|
|
412
|
+
to_y?: number;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* The CDP connection to Chrome was lost. Telemetry events may be dropped until
|
|
417
|
+
* monitor_reconnected arrives. Treat any in-progress computed state (network_idle,
|
|
418
|
+
* page_layout_settled) as unreliable until then.
|
|
419
|
+
*/
|
|
420
|
+
export interface BrowserMonitorDisconnectedEvent {
|
|
421
|
+
/**
|
|
422
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
423
|
+
*/
|
|
424
|
+
source: BrowserEventSource;
|
|
425
|
+
/**
|
|
426
|
+
* Event timestamp in Unix microseconds.
|
|
427
|
+
*/
|
|
428
|
+
ts: number;
|
|
429
|
+
type: 'monitor_disconnected';
|
|
430
|
+
data?: BrowserMonitorDisconnectedEvent.Data;
|
|
431
|
+
/**
|
|
432
|
+
* True if the data field was truncated due to size limits.
|
|
433
|
+
*/
|
|
434
|
+
truncated?: boolean;
|
|
435
|
+
}
|
|
436
|
+
export declare namespace BrowserMonitorDisconnectedEvent {
|
|
437
|
+
interface Data {
|
|
438
|
+
/**
|
|
439
|
+
* Reason for the disconnection. chrome_restarted: Chrome process restarted.
|
|
440
|
+
*/
|
|
441
|
+
reason?: 'chrome_restarted';
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* The CDP session could not be initialized.
|
|
446
|
+
*/
|
|
447
|
+
export interface BrowserMonitorInitFailedEvent {
|
|
448
|
+
/**
|
|
449
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
450
|
+
*/
|
|
451
|
+
source: BrowserEventSource;
|
|
452
|
+
/**
|
|
453
|
+
* Event timestamp in Unix microseconds.
|
|
454
|
+
*/
|
|
455
|
+
ts: number;
|
|
456
|
+
type: 'monitor_init_failed';
|
|
457
|
+
data?: BrowserMonitorInitFailedEvent.Data;
|
|
458
|
+
/**
|
|
459
|
+
* True if the data field was truncated due to size limits.
|
|
460
|
+
*/
|
|
461
|
+
truncated?: boolean;
|
|
462
|
+
}
|
|
463
|
+
export declare namespace BrowserMonitorInitFailedEvent {
|
|
464
|
+
interface Data {
|
|
465
|
+
/**
|
|
466
|
+
* The CDP method or initialization step that failed (e.g. Target.setAutoAttach).
|
|
467
|
+
*/
|
|
468
|
+
step?: string;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* The CDP connection to Chrome could not be re-established after exhausting all
|
|
473
|
+
* reconnection attempts. No further telemetry events will arrive on this session.
|
|
474
|
+
*/
|
|
475
|
+
export interface BrowserMonitorReconnectFailedEvent {
|
|
476
|
+
/**
|
|
477
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
478
|
+
*/
|
|
479
|
+
source: BrowserEventSource;
|
|
480
|
+
/**
|
|
481
|
+
* Event timestamp in Unix microseconds.
|
|
482
|
+
*/
|
|
483
|
+
ts: number;
|
|
484
|
+
type: 'monitor_reconnect_failed';
|
|
485
|
+
data?: BrowserMonitorReconnectFailedEvent.Data;
|
|
486
|
+
/**
|
|
487
|
+
* True if the data field was truncated due to size limits.
|
|
488
|
+
*/
|
|
489
|
+
truncated?: boolean;
|
|
490
|
+
}
|
|
491
|
+
export declare namespace BrowserMonitorReconnectFailedEvent {
|
|
492
|
+
interface Data {
|
|
493
|
+
/**
|
|
494
|
+
* Reason for the reconnection failure. reconnect_exhausted: all retry attempts
|
|
495
|
+
* were used up without successfully restoring the CDP connection.
|
|
496
|
+
*/
|
|
497
|
+
reason?: 'reconnect_exhausted';
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* The CDP connection to Chrome was successfully re-established after a
|
|
502
|
+
* disconnection. Events emitted during the gap are lost. Computed state is reset,
|
|
503
|
+
* so navigation and network tracking restart fresh from this point.
|
|
504
|
+
*/
|
|
505
|
+
export interface BrowserMonitorReconnectedEvent {
|
|
506
|
+
/**
|
|
507
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
508
|
+
*/
|
|
509
|
+
source: BrowserEventSource;
|
|
510
|
+
/**
|
|
511
|
+
* Event timestamp in Unix microseconds.
|
|
512
|
+
*/
|
|
513
|
+
ts: number;
|
|
514
|
+
type: 'monitor_reconnected';
|
|
515
|
+
data?: BrowserMonitorReconnectedEvent.Data;
|
|
516
|
+
/**
|
|
517
|
+
* True if the data field was truncated due to size limits.
|
|
518
|
+
*/
|
|
519
|
+
truncated?: boolean;
|
|
520
|
+
}
|
|
521
|
+
export declare namespace BrowserMonitorReconnectedEvent {
|
|
522
|
+
interface Data {
|
|
523
|
+
/**
|
|
524
|
+
* Wall-clock time in milliseconds taken to reconnect after the disconnection.
|
|
525
|
+
*/
|
|
526
|
+
reconnect_duration_ms?: number;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* A periodic screenshot of the browser viewport.
|
|
531
|
+
*/
|
|
532
|
+
export interface BrowserMonitorScreenshotEvent {
|
|
533
|
+
/**
|
|
534
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
535
|
+
*/
|
|
536
|
+
source: BrowserEventSource;
|
|
537
|
+
/**
|
|
538
|
+
* Event timestamp in Unix microseconds.
|
|
539
|
+
*/
|
|
540
|
+
ts: number;
|
|
541
|
+
type: 'monitor_screenshot';
|
|
542
|
+
data?: BrowserMonitorScreenshotEvent.Data;
|
|
543
|
+
/**
|
|
544
|
+
* True if the data field was truncated due to size limits.
|
|
545
|
+
*/
|
|
546
|
+
truncated?: boolean;
|
|
547
|
+
}
|
|
548
|
+
export declare namespace BrowserMonitorScreenshotEvent {
|
|
549
|
+
interface Data {
|
|
550
|
+
/**
|
|
551
|
+
* Base64-encoded PNG screenshot of the browser viewport.
|
|
552
|
+
*/
|
|
553
|
+
png?: string;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* A browser network idle event emitted after a 500ms quiet period with no
|
|
558
|
+
* in-flight HTTP requests.
|
|
559
|
+
*/
|
|
560
|
+
export interface BrowserNetworkIdleEvent {
|
|
561
|
+
/**
|
|
562
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
563
|
+
*/
|
|
564
|
+
source: BrowserEventSource;
|
|
565
|
+
/**
|
|
566
|
+
* Event timestamp in Unix microseconds.
|
|
567
|
+
*/
|
|
568
|
+
ts: number;
|
|
569
|
+
type: 'network_idle';
|
|
570
|
+
/**
|
|
571
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
572
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
573
|
+
* occurred.
|
|
574
|
+
*/
|
|
575
|
+
data?: BrowserEventContext;
|
|
576
|
+
/**
|
|
577
|
+
* True if the data field was truncated due to size limits.
|
|
578
|
+
*/
|
|
579
|
+
truncated?: boolean;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* A browser network loading failed event. If the request was already in flight
|
|
583
|
+
* when CDP attached (no prior network_request was emitted for it), url, frame_id,
|
|
584
|
+
* loader_id, and resource_type are absent; BrowserEventContext is partially
|
|
585
|
+
* populated in that case.
|
|
586
|
+
*/
|
|
587
|
+
export interface BrowserNetworkLoadingFailedEvent {
|
|
588
|
+
/**
|
|
589
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
590
|
+
*/
|
|
591
|
+
source: BrowserEventSource;
|
|
592
|
+
/**
|
|
593
|
+
* Event timestamp in Unix microseconds.
|
|
594
|
+
*/
|
|
595
|
+
ts: number;
|
|
596
|
+
type: 'network_loading_failed';
|
|
597
|
+
/**
|
|
598
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
599
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
600
|
+
* occurred.
|
|
601
|
+
*/
|
|
602
|
+
data?: BrowserNetworkLoadingFailedEvent.Data;
|
|
603
|
+
/**
|
|
604
|
+
* True if the data field was truncated due to size limits.
|
|
605
|
+
*/
|
|
606
|
+
truncated?: boolean;
|
|
607
|
+
}
|
|
608
|
+
export declare namespace BrowserNetworkLoadingFailedEvent {
|
|
609
|
+
/**
|
|
610
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
611
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
612
|
+
* occurred.
|
|
613
|
+
*/
|
|
614
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
615
|
+
/**
|
|
616
|
+
* True if the request was canceled by the browser or page script.
|
|
617
|
+
*/
|
|
618
|
+
canceled?: boolean;
|
|
619
|
+
/**
|
|
620
|
+
* Network error description (e.g. net::ERR_CONNECTION_REFUSED).
|
|
621
|
+
*/
|
|
622
|
+
error_text?: string;
|
|
623
|
+
/**
|
|
624
|
+
* CDP request identifier matching the originating network_request event.
|
|
625
|
+
*/
|
|
626
|
+
request_id?: string;
|
|
627
|
+
/**
|
|
628
|
+
* CDP Network.ResourceType for the request, passed through as-is from Chrome.
|
|
629
|
+
* Known values include Document, Fetch, XHR, Script, Stylesheet, Image, Media,
|
|
630
|
+
* Font, TextTrack, EventSource, WebSocket, Manifest, Prefetch, Other, and more.
|
|
631
|
+
*/
|
|
632
|
+
resource_type?: string;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* A browser network request sent event.
|
|
637
|
+
*/
|
|
638
|
+
export interface BrowserNetworkRequestEvent {
|
|
639
|
+
/**
|
|
640
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
641
|
+
*/
|
|
642
|
+
source: BrowserEventSource;
|
|
643
|
+
/**
|
|
644
|
+
* Event timestamp in Unix microseconds.
|
|
645
|
+
*/
|
|
646
|
+
ts: number;
|
|
647
|
+
type: 'network_request';
|
|
648
|
+
/**
|
|
649
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
650
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
651
|
+
* occurred.
|
|
652
|
+
*/
|
|
653
|
+
data?: BrowserNetworkRequestEvent.Data;
|
|
654
|
+
/**
|
|
655
|
+
* True if the data field was truncated due to size limits.
|
|
656
|
+
*/
|
|
657
|
+
truncated?: boolean;
|
|
658
|
+
}
|
|
659
|
+
export declare namespace BrowserNetworkRequestEvent {
|
|
660
|
+
/**
|
|
661
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
662
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
663
|
+
* occurred.
|
|
664
|
+
*/
|
|
665
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
666
|
+
/**
|
|
667
|
+
* URL of the document that initiated the request.
|
|
668
|
+
*/
|
|
669
|
+
document_url?: string;
|
|
670
|
+
/**
|
|
671
|
+
* Request headers.
|
|
672
|
+
*/
|
|
673
|
+
headers?: TelemetryAPI.BrowserHTTPHeaders;
|
|
674
|
+
/**
|
|
675
|
+
* CDP Initiator.type indicating what caused the request, passed through as-is from
|
|
676
|
+
* Chrome. Known values include script, parser, preload, and other.
|
|
677
|
+
*/
|
|
678
|
+
initiator_type?: string;
|
|
679
|
+
/**
|
|
680
|
+
* True if this request is the result of a redirect.
|
|
681
|
+
*/
|
|
682
|
+
is_redirect?: boolean;
|
|
683
|
+
/**
|
|
684
|
+
* HTTP method as sent on the wire (e.g. GET, POST).
|
|
685
|
+
*/
|
|
686
|
+
method?: string;
|
|
687
|
+
/**
|
|
688
|
+
* Request body for POST/PUT requests, if available.
|
|
689
|
+
*/
|
|
690
|
+
post_data?: string;
|
|
691
|
+
/**
|
|
692
|
+
* Original URL before the redirect, present when is_redirect is true.
|
|
693
|
+
*/
|
|
694
|
+
redirect_url?: string;
|
|
695
|
+
/**
|
|
696
|
+
* CDP request identifier, unique within the session.
|
|
697
|
+
*/
|
|
698
|
+
request_id?: string;
|
|
699
|
+
/**
|
|
700
|
+
* CDP Network.ResourceType for the request, passed through as-is from Chrome.
|
|
701
|
+
* Known values include Document, Fetch, XHR, Script, Stylesheet, Image, Media,
|
|
702
|
+
* Font, TextTrack, EventSource, WebSocket, Manifest, Prefetch, Other, and more.
|
|
703
|
+
*/
|
|
704
|
+
resource_type?: string;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* A browser network response received event. Fired after the response body is
|
|
709
|
+
* fully received, not when headers arrive.
|
|
710
|
+
*/
|
|
711
|
+
export interface BrowserNetworkResponseEvent {
|
|
712
|
+
/**
|
|
713
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
714
|
+
*/
|
|
715
|
+
source: BrowserEventSource;
|
|
716
|
+
/**
|
|
717
|
+
* Event timestamp in Unix microseconds.
|
|
718
|
+
*/
|
|
719
|
+
ts: number;
|
|
720
|
+
type: 'network_response';
|
|
721
|
+
/**
|
|
722
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
723
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
724
|
+
* occurred.
|
|
725
|
+
*/
|
|
726
|
+
data?: BrowserNetworkResponseEvent.Data;
|
|
727
|
+
/**
|
|
728
|
+
* True if the data field was truncated due to size limits.
|
|
729
|
+
*/
|
|
730
|
+
truncated?: boolean;
|
|
731
|
+
}
|
|
732
|
+
export declare namespace BrowserNetworkResponseEvent {
|
|
733
|
+
/**
|
|
734
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
735
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
736
|
+
* occurred.
|
|
737
|
+
*/
|
|
738
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
739
|
+
/**
|
|
740
|
+
* Truncated response body, present only for text MIME types.
|
|
741
|
+
*/
|
|
742
|
+
body?: string;
|
|
743
|
+
/**
|
|
744
|
+
* Response headers.
|
|
745
|
+
*/
|
|
746
|
+
headers?: TelemetryAPI.BrowserHTTPHeaders;
|
|
747
|
+
/**
|
|
748
|
+
* HTTP method of the original request.
|
|
749
|
+
*/
|
|
750
|
+
method?: string;
|
|
751
|
+
/**
|
|
752
|
+
* MIME type of the response (e.g. text/html, application/json).
|
|
753
|
+
*/
|
|
754
|
+
mime_type?: string;
|
|
755
|
+
/**
|
|
756
|
+
* CDP request identifier matching the originating network_request event.
|
|
757
|
+
*/
|
|
758
|
+
request_id?: string;
|
|
759
|
+
/**
|
|
760
|
+
* CDP Network.ResourceType for the request, passed through as-is from Chrome.
|
|
761
|
+
* Known values include Document, Fetch, XHR, Script, Stylesheet, Image, Media,
|
|
762
|
+
* Font, TextTrack, EventSource, WebSocket, Manifest, Prefetch, Other, and more.
|
|
763
|
+
*/
|
|
764
|
+
resource_type?: string;
|
|
765
|
+
/**
|
|
766
|
+
* HTTP response status code.
|
|
767
|
+
*/
|
|
768
|
+
status?: number;
|
|
769
|
+
/**
|
|
770
|
+
* HTTP response status text (e.g. OK, Not Found).
|
|
771
|
+
*/
|
|
772
|
+
status_text?: string;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* A browser DOMContentLoaded event (CDP Page.domContentEventFired).
|
|
777
|
+
*/
|
|
778
|
+
export interface BrowserPageDomContentLoadedEvent {
|
|
779
|
+
/**
|
|
780
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
781
|
+
*/
|
|
782
|
+
source: BrowserEventSource;
|
|
783
|
+
/**
|
|
784
|
+
* Event timestamp in Unix microseconds.
|
|
785
|
+
*/
|
|
786
|
+
ts: number;
|
|
787
|
+
type: 'page_dom_content_loaded';
|
|
788
|
+
/**
|
|
789
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
790
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
791
|
+
* occurred.
|
|
792
|
+
*/
|
|
793
|
+
data?: BrowserPageDomContentLoadedEvent.Data;
|
|
794
|
+
/**
|
|
795
|
+
* True if the data field was truncated due to size limits.
|
|
796
|
+
*/
|
|
797
|
+
truncated?: boolean;
|
|
798
|
+
}
|
|
799
|
+
export declare namespace BrowserPageDomContentLoadedEvent {
|
|
800
|
+
/**
|
|
801
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
802
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
803
|
+
* occurred.
|
|
804
|
+
*/
|
|
805
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
806
|
+
/**
|
|
807
|
+
* Chrome monotonic clock value in seconds at which DOMContentLoaded fired,
|
|
808
|
+
* relative to browser process start (not Unix epoch). Use ts for wall-clock time.
|
|
809
|
+
*/
|
|
810
|
+
cdp_timestamp?: number;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* A browser layout settled event emitted 1 second after page load with no
|
|
815
|
+
* intervening layout shifts, indicating visual stability. Each layout shift resets
|
|
816
|
+
* the 1-second timer.
|
|
817
|
+
*/
|
|
818
|
+
export interface BrowserPageLayoutSettledEvent {
|
|
819
|
+
/**
|
|
820
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
821
|
+
*/
|
|
822
|
+
source: BrowserEventSource;
|
|
823
|
+
/**
|
|
824
|
+
* Event timestamp in Unix microseconds.
|
|
825
|
+
*/
|
|
826
|
+
ts: number;
|
|
827
|
+
type: 'page_layout_settled';
|
|
828
|
+
/**
|
|
829
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
830
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
831
|
+
* occurred.
|
|
832
|
+
*/
|
|
833
|
+
data?: BrowserEventContext;
|
|
834
|
+
/**
|
|
835
|
+
* True if the data field was truncated due to size limits.
|
|
836
|
+
*/
|
|
837
|
+
truncated?: boolean;
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* A browser cumulative layout shift (CLS) event from the Performance Timeline API.
|
|
841
|
+
*/
|
|
842
|
+
export interface BrowserPageLayoutShiftEvent {
|
|
843
|
+
/**
|
|
844
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
845
|
+
*/
|
|
846
|
+
source: BrowserEventSource;
|
|
847
|
+
/**
|
|
848
|
+
* Event timestamp in Unix microseconds.
|
|
849
|
+
*/
|
|
850
|
+
ts: number;
|
|
851
|
+
type: 'page_layout_shift';
|
|
852
|
+
/**
|
|
853
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
854
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
855
|
+
* occurred.
|
|
856
|
+
*/
|
|
857
|
+
data?: BrowserPageLayoutShiftEvent.Data;
|
|
858
|
+
/**
|
|
859
|
+
* True if the data field was truncated due to size limits.
|
|
860
|
+
*/
|
|
861
|
+
truncated?: boolean;
|
|
862
|
+
}
|
|
863
|
+
export declare namespace BrowserPageLayoutShiftEvent {
|
|
864
|
+
/**
|
|
865
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
866
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
867
|
+
* occurred.
|
|
868
|
+
*/
|
|
869
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
870
|
+
/**
|
|
871
|
+
* Duration of the layout shift entry in milliseconds (always 0 for layout shifts
|
|
872
|
+
* per spec).
|
|
873
|
+
*/
|
|
874
|
+
duration?: number;
|
|
875
|
+
/**
|
|
876
|
+
* PerformanceLayoutShift attributes from the Performance Timeline entry.
|
|
877
|
+
*/
|
|
878
|
+
layout_shift_details?: Data.LayoutShiftDetails;
|
|
879
|
+
/**
|
|
880
|
+
* CDP frame identifier of the frame where the layout shift occurred.
|
|
881
|
+
*/
|
|
882
|
+
source_frame_id?: string;
|
|
883
|
+
/**
|
|
884
|
+
* Performance Timeline timestamp of the layout shift in milliseconds.
|
|
885
|
+
*/
|
|
886
|
+
time?: number;
|
|
887
|
+
}
|
|
888
|
+
namespace Data {
|
|
889
|
+
/**
|
|
890
|
+
* PerformanceLayoutShift attributes from the Performance Timeline entry.
|
|
891
|
+
*/
|
|
892
|
+
interface LayoutShiftDetails {
|
|
893
|
+
/**
|
|
894
|
+
* True if the layout shift was preceded by user input within 500ms, excluding it
|
|
895
|
+
* from CLS.
|
|
896
|
+
*/
|
|
897
|
+
had_recent_input?: boolean;
|
|
898
|
+
/**
|
|
899
|
+
* Layout shift score for this entry (contribution to CLS).
|
|
900
|
+
*/
|
|
901
|
+
value?: number;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* A browser Largest Contentful Paint (LCP) event from the Performance Timeline
|
|
907
|
+
* API.
|
|
908
|
+
*/
|
|
909
|
+
export interface BrowserPageLcpEvent {
|
|
910
|
+
/**
|
|
911
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
912
|
+
*/
|
|
913
|
+
source: BrowserEventSource;
|
|
914
|
+
/**
|
|
915
|
+
* Event timestamp in Unix microseconds.
|
|
916
|
+
*/
|
|
917
|
+
ts: number;
|
|
918
|
+
type: 'page_lcp';
|
|
919
|
+
/**
|
|
920
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
921
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
922
|
+
* occurred.
|
|
923
|
+
*/
|
|
924
|
+
data?: BrowserPageLcpEvent.Data;
|
|
925
|
+
/**
|
|
926
|
+
* True if the data field was truncated due to size limits.
|
|
927
|
+
*/
|
|
928
|
+
truncated?: boolean;
|
|
929
|
+
}
|
|
930
|
+
export declare namespace BrowserPageLcpEvent {
|
|
931
|
+
/**
|
|
932
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
933
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
934
|
+
* occurred.
|
|
935
|
+
*/
|
|
936
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
937
|
+
/**
|
|
938
|
+
* LargestContentfulPaint attributes from the Performance Timeline entry.
|
|
939
|
+
*/
|
|
940
|
+
lcp_details?: Data.LcpDetails;
|
|
941
|
+
/**
|
|
942
|
+
* CDP frame identifier of the frame where the LCP element was rendered.
|
|
943
|
+
*/
|
|
944
|
+
source_frame_id?: string;
|
|
945
|
+
/**
|
|
946
|
+
* Performance Timeline timestamp of the LCP entry in milliseconds.
|
|
947
|
+
*/
|
|
948
|
+
time?: number;
|
|
949
|
+
}
|
|
950
|
+
namespace Data {
|
|
951
|
+
/**
|
|
952
|
+
* LargestContentfulPaint attributes from the Performance Timeline entry.
|
|
953
|
+
*/
|
|
954
|
+
interface LcpDetails {
|
|
955
|
+
/**
|
|
956
|
+
* id attribute of the LCP element, if present.
|
|
957
|
+
*/
|
|
958
|
+
element_id?: string;
|
|
959
|
+
/**
|
|
960
|
+
* Load time of the LCP element in milliseconds.
|
|
961
|
+
*/
|
|
962
|
+
load_time?: number;
|
|
963
|
+
/**
|
|
964
|
+
* CDP DOM node identifier of the LCP element.
|
|
965
|
+
*/
|
|
966
|
+
node_id?: number;
|
|
967
|
+
/**
|
|
968
|
+
* Render time of the LCP element in milliseconds; 0 for cross-origin images
|
|
969
|
+
* without Timing-Allow-Origin.
|
|
970
|
+
*/
|
|
971
|
+
render_time?: number;
|
|
972
|
+
/**
|
|
973
|
+
* Visible area of the LCP element in pixels squared.
|
|
974
|
+
*/
|
|
975
|
+
size?: number;
|
|
976
|
+
/**
|
|
977
|
+
* URL of the LCP element for image or video elements.
|
|
978
|
+
*/
|
|
979
|
+
url?: string;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* A browser page load event (CDP Page.loadEventFired).
|
|
985
|
+
*/
|
|
986
|
+
export interface BrowserPageLoadEvent {
|
|
987
|
+
/**
|
|
988
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
989
|
+
*/
|
|
990
|
+
source: BrowserEventSource;
|
|
991
|
+
/**
|
|
992
|
+
* Event timestamp in Unix microseconds.
|
|
993
|
+
*/
|
|
994
|
+
ts: number;
|
|
995
|
+
type: 'page_load';
|
|
996
|
+
/**
|
|
997
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
998
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
999
|
+
* occurred.
|
|
1000
|
+
*/
|
|
1001
|
+
data?: BrowserPageLoadEvent.Data;
|
|
1002
|
+
/**
|
|
1003
|
+
* True if the data field was truncated due to size limits.
|
|
1004
|
+
*/
|
|
1005
|
+
truncated?: boolean;
|
|
1006
|
+
}
|
|
1007
|
+
export declare namespace BrowserPageLoadEvent {
|
|
1008
|
+
/**
|
|
1009
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
1010
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
1011
|
+
* occurred.
|
|
1012
|
+
*/
|
|
1013
|
+
interface Data extends TelemetryAPI.BrowserEventContext {
|
|
1014
|
+
/**
|
|
1015
|
+
* Chrome monotonic clock value in seconds at which the load event fired, relative
|
|
1016
|
+
* to browser process start (not Unix epoch). Use ts for wall-clock time.
|
|
1017
|
+
*/
|
|
1018
|
+
cdp_timestamp?: number;
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* A browser page navigation started event (CDP Page.frameNavigated). Carries nav
|
|
1023
|
+
* context fields inline but not nav_seq, as this event resets the navigation
|
|
1024
|
+
* epoch.
|
|
1025
|
+
*/
|
|
1026
|
+
export interface BrowserPageNavigationEvent {
|
|
1027
|
+
/**
|
|
1028
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
1029
|
+
*/
|
|
1030
|
+
source: BrowserEventSource;
|
|
1031
|
+
/**
|
|
1032
|
+
* Event timestamp in Unix microseconds.
|
|
1033
|
+
*/
|
|
1034
|
+
ts: number;
|
|
1035
|
+
type: 'page_navigation';
|
|
1036
|
+
data?: BrowserPageNavigationEvent.Data;
|
|
1037
|
+
/**
|
|
1038
|
+
* True if the data field was truncated due to size limits.
|
|
1039
|
+
*/
|
|
1040
|
+
truncated?: boolean;
|
|
1041
|
+
}
|
|
1042
|
+
export declare namespace BrowserPageNavigationEvent {
|
|
1043
|
+
interface Data {
|
|
1044
|
+
/**
|
|
1045
|
+
* CDP frame identifier of the navigated frame.
|
|
1046
|
+
*/
|
|
1047
|
+
frame_id?: string;
|
|
1048
|
+
/**
|
|
1049
|
+
* New CDP document loader identifier assigned for this navigation.
|
|
1050
|
+
*/
|
|
1051
|
+
loader_id?: string;
|
|
1052
|
+
/**
|
|
1053
|
+
* Parent frame identifier for subframe navigations; absent for top-level
|
|
1054
|
+
* navigations.
|
|
1055
|
+
*/
|
|
1056
|
+
parent_frame_id?: string;
|
|
1057
|
+
/**
|
|
1058
|
+
* CDP session identifier.
|
|
1059
|
+
*/
|
|
1060
|
+
session_id?: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* Browser target identifier.
|
|
1063
|
+
*/
|
|
1064
|
+
target_id?: string;
|
|
1065
|
+
/**
|
|
1066
|
+
* CDP target type of the page that produced the event.
|
|
1067
|
+
*/
|
|
1068
|
+
target_type?: 'page' | 'background_page' | 'service_worker' | 'shared_worker' | 'other';
|
|
1069
|
+
/**
|
|
1070
|
+
* URL navigated to.
|
|
1071
|
+
*/
|
|
1072
|
+
url?: string;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Emitted when page_dom_content_loaded and page_layout_settled have both fired for
|
|
1077
|
+
* the same navigation, indicating the page is loaded and visually stable.
|
|
1078
|
+
* Independent of network_idle; a single pending request does not block it.
|
|
1079
|
+
*/
|
|
1080
|
+
export interface BrowserPageNavigationSettledEvent {
|
|
1081
|
+
/**
|
|
1082
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
1083
|
+
*/
|
|
1084
|
+
source: BrowserEventSource;
|
|
1085
|
+
/**
|
|
1086
|
+
* Event timestamp in Unix microseconds.
|
|
1087
|
+
*/
|
|
1088
|
+
ts: number;
|
|
1089
|
+
type: 'page_navigation_settled';
|
|
1090
|
+
/**
|
|
1091
|
+
* Browser event context stamped by the browser monitor onto all CDP-sourced
|
|
1092
|
+
* events. Identifies the target, frame, and navigation epoch in which the event
|
|
1093
|
+
* occurred.
|
|
1094
|
+
*/
|
|
1095
|
+
data?: BrowserEventContext;
|
|
1096
|
+
/**
|
|
1097
|
+
* True if the data field was truncated due to size limits.
|
|
1098
|
+
*/
|
|
1099
|
+
truncated?: boolean;
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* A new browser tab or target was opened (CDP Target.attachedToTarget for page
|
|
1103
|
+
* targets). Fires before a CDP session is attached to the new target, so
|
|
1104
|
+
* session_id, frame_id, loader_id, and nav_seq are absent; this event does not
|
|
1105
|
+
* compose BrowserEventContext. Consumers reading context fields generically should
|
|
1106
|
+
* treat it as a special case.
|
|
1107
|
+
*/
|
|
1108
|
+
export interface BrowserPageTabOpenedEvent {
|
|
1109
|
+
/**
|
|
1110
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
1111
|
+
*/
|
|
1112
|
+
source: BrowserEventSource;
|
|
1113
|
+
/**
|
|
1114
|
+
* Event timestamp in Unix microseconds.
|
|
1115
|
+
*/
|
|
1116
|
+
ts: number;
|
|
1117
|
+
type: 'page_tab_opened';
|
|
1118
|
+
data?: BrowserPageTabOpenedEvent.Data;
|
|
1119
|
+
/**
|
|
1120
|
+
* True if the data field was truncated due to size limits.
|
|
1121
|
+
*/
|
|
1122
|
+
truncated?: boolean;
|
|
1123
|
+
}
|
|
1124
|
+
export declare namespace BrowserPageTabOpenedEvent {
|
|
1125
|
+
interface Data {
|
|
1126
|
+
/**
|
|
1127
|
+
* Target identifier of the tab that opened this one, if any.
|
|
1128
|
+
*/
|
|
1129
|
+
opener_id?: string;
|
|
1130
|
+
/**
|
|
1131
|
+
* CDP target identifier for the newly opened tab.
|
|
1132
|
+
*/
|
|
1133
|
+
target_id?: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* CDP target type of the page that produced the event.
|
|
1136
|
+
*/
|
|
1137
|
+
target_type?: 'page' | 'background_page' | 'service_worker' | 'shared_worker' | 'other';
|
|
1138
|
+
/**
|
|
1139
|
+
* Initial page title of the new tab.
|
|
1140
|
+
*/
|
|
1141
|
+
title?: string;
|
|
1142
|
+
/**
|
|
1143
|
+
* Initial URL of the new tab.
|
|
1144
|
+
*/
|
|
1145
|
+
url?: string;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Per-category telemetry capture settings.
|
|
1150
|
+
*/
|
|
1151
|
+
export interface BrowserTelemetryCategoriesConfig {
|
|
1152
|
+
/**
|
|
1153
|
+
* Console output (log, warn, error) and uncaught exceptions.
|
|
1154
|
+
*/
|
|
1155
|
+
console?: BrowserTelemetryCategoryConfig;
|
|
1156
|
+
/**
|
|
1157
|
+
* User interaction events including clicks, keydowns, and scroll-settled events.
|
|
1158
|
+
*/
|
|
1159
|
+
interaction?: BrowserTelemetryCategoryConfig;
|
|
1160
|
+
/**
|
|
1161
|
+
* HTTP request and response metadata including URL, method, status code, and
|
|
1162
|
+
* timing. Request post data is forwarded as-is from CDP. Text response bodies are
|
|
1163
|
+
* truncated at 8 KB for structured types (JSON, XML, form data) and 4 KB for other
|
|
1164
|
+
* text types. Binary responses (images, fonts, media) are excluded.
|
|
1165
|
+
*/
|
|
1166
|
+
network?: BrowserTelemetryCategoryConfig;
|
|
1167
|
+
/**
|
|
1168
|
+
* Page lifecycle events including navigation, DOMContentLoaded, load, layout
|
|
1169
|
+
* shifts, and LCP.
|
|
1170
|
+
*/
|
|
1171
|
+
page?: BrowserTelemetryCategoryConfig;
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* Per-category telemetry configuration.
|
|
1175
|
+
*/
|
|
1176
|
+
export interface BrowserTelemetryCategoryConfig {
|
|
1177
|
+
/**
|
|
1178
|
+
* Whether this category is captured. Defaults to true if omitted.
|
|
1179
|
+
*/
|
|
1180
|
+
enabled?: boolean;
|
|
1181
|
+
}
|
|
1182
|
+
/**
|
|
1183
|
+
* Active telemetry configuration for a browser session.
|
|
1184
|
+
*/
|
|
1185
|
+
export interface BrowserTelemetryConfig {
|
|
1186
|
+
/**
|
|
1187
|
+
* Per-category enable/disable flags.
|
|
1188
|
+
*/
|
|
1189
|
+
browser?: BrowserTelemetryCategoriesConfig;
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* Union type representing any browser telemetry event. Discriminated on `type`.
|
|
1193
|
+
* Events with a `monitor_` prefix (monitor_screenshot, monitor_disconnected,
|
|
1194
|
+
* monitor_reconnected, monitor_reconnect_failed, monitor_init_failed) are always
|
|
1195
|
+
* emitted regardless of the category configuration in BrowserTelemetryConfig. All
|
|
1196
|
+
* other event types are controlled by the per-category enable/disable flags.
|
|
1197
|
+
*/
|
|
1198
|
+
export type BrowserTelemetryEvent = BrowserConsoleLogEvent | BrowserConsoleErrorEvent | BrowserNetworkRequestEvent | BrowserNetworkResponseEvent | BrowserNetworkLoadingFailedEvent | BrowserNetworkIdleEvent | BrowserPageNavigationEvent | BrowserPageDomContentLoadedEvent | BrowserPageLoadEvent | BrowserPageTabOpenedEvent | BrowserPageLayoutShiftEvent | BrowserPageLcpEvent | BrowserPageLayoutSettledEvent | BrowserPageNavigationSettledEvent | BrowserInteractionClickEvent | BrowserInteractionKeyEvent | BrowserInteractionScrollSettledEvent | BrowserMonitorScreenshotEvent | BrowserMonitorDisconnectedEvent | BrowserMonitorReconnectedEvent | BrowserMonitorReconnectFailedEvent | BrowserMonitorInitFailedEvent;
|
|
1199
|
+
/**
|
|
1200
|
+
* Envelope wrapping a browser telemetry event with its monotonic sequence number.
|
|
1201
|
+
* Each SSE data: frame carries one envelope as JSON. The seq value is also emitted
|
|
1202
|
+
* as the SSE id: field so clients can pass it as Last-Event-ID on reconnect.
|
|
1203
|
+
*/
|
|
1204
|
+
export interface TelemetryStreamResponse {
|
|
1205
|
+
/**
|
|
1206
|
+
* Union type representing any browser telemetry event. Discriminated on `type`.
|
|
1207
|
+
* Events with a `monitor_` prefix (monitor_screenshot, monitor_disconnected,
|
|
1208
|
+
* monitor_reconnected, monitor_reconnect_failed, monitor_init_failed) are always
|
|
1209
|
+
* emitted regardless of the category configuration in BrowserTelemetryConfig. All
|
|
1210
|
+
* other event types are controlled by the per-category enable/disable flags.
|
|
1211
|
+
*/
|
|
1212
|
+
event: BrowserTelemetryEvent;
|
|
1213
|
+
/**
|
|
1214
|
+
* Process-monotonic sequence number assigned by the browser VM. Pass as
|
|
1215
|
+
* Last-Event-ID on reconnect to resume without gaps. Gaps in received seq values
|
|
1216
|
+
* indicate dropped events.
|
|
1217
|
+
*/
|
|
1218
|
+
seq: number;
|
|
1219
|
+
}
|
|
1220
|
+
export interface TelemetryStreamParams {
|
|
1221
|
+
/**
|
|
1222
|
+
* Last event sequence number for SSE reconnection (sent by SSE clients on
|
|
1223
|
+
* reconnect)
|
|
1224
|
+
*/
|
|
1225
|
+
'Last-Event-ID'?: string;
|
|
1226
|
+
}
|
|
1227
|
+
export declare namespace Telemetry {
|
|
1228
|
+
export { type BrowserCallStack as BrowserCallStack, type BrowserConsoleErrorEvent as BrowserConsoleErrorEvent, type BrowserConsoleLogEvent as BrowserConsoleLogEvent, type BrowserEventContext as BrowserEventContext, type BrowserEventSource as BrowserEventSource, type BrowserHTTPHeaders as BrowserHTTPHeaders, type BrowserInteractionClickEvent as BrowserInteractionClickEvent, type BrowserInteractionKeyEvent as BrowserInteractionKeyEvent, type BrowserInteractionScrollSettledEvent as BrowserInteractionScrollSettledEvent, type BrowserMonitorDisconnectedEvent as BrowserMonitorDisconnectedEvent, type BrowserMonitorInitFailedEvent as BrowserMonitorInitFailedEvent, type BrowserMonitorReconnectFailedEvent as BrowserMonitorReconnectFailedEvent, type BrowserMonitorReconnectedEvent as BrowserMonitorReconnectedEvent, type BrowserMonitorScreenshotEvent as BrowserMonitorScreenshotEvent, type BrowserNetworkIdleEvent as BrowserNetworkIdleEvent, type BrowserNetworkLoadingFailedEvent as BrowserNetworkLoadingFailedEvent, type BrowserNetworkRequestEvent as BrowserNetworkRequestEvent, type BrowserNetworkResponseEvent as BrowserNetworkResponseEvent, type BrowserPageDomContentLoadedEvent as BrowserPageDomContentLoadedEvent, type BrowserPageLayoutSettledEvent as BrowserPageLayoutSettledEvent, type BrowserPageLayoutShiftEvent as BrowserPageLayoutShiftEvent, type BrowserPageLcpEvent as BrowserPageLcpEvent, type BrowserPageLoadEvent as BrowserPageLoadEvent, type BrowserPageNavigationEvent as BrowserPageNavigationEvent, type BrowserPageNavigationSettledEvent as BrowserPageNavigationSettledEvent, type BrowserPageTabOpenedEvent as BrowserPageTabOpenedEvent, type BrowserTelemetryCategoriesConfig as BrowserTelemetryCategoriesConfig, type BrowserTelemetryCategoryConfig as BrowserTelemetryCategoryConfig, type BrowserTelemetryConfig as BrowserTelemetryConfig, type BrowserTelemetryEvent as BrowserTelemetryEvent, type TelemetryStreamResponse as TelemetryStreamResponse, type TelemetryStreamParams as TelemetryStreamParams, };
|
|
1229
|
+
}
|
|
1230
|
+
//# sourceMappingURL=telemetry.d.ts.map
|