browserscale-ts 1.5.0 → 1.7.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/README.md +30 -0
- package/dist/browser.d.ts +4 -1
- package/dist/browser.js +5 -0
- package/dist/browserscale.browser.js +1581 -46
- package/dist/client.d.ts +316 -7
- package/dist/client.js +588 -7
- package/dist/dom-mirror.d.ts +271 -0
- package/dist/dom-mirror.js +613 -0
- package/dist/gen/wrc_pb.d.ts +1251 -87
- package/dist/gen/wrc_pb.js +214 -44
- package/dist/index.d.ts +31 -1
- package/dist/index.js +61 -0
- package/dist/internal/convert.d.ts +8 -2
- package/dist/internal/convert.js +39 -0
- package/dist/network-capture.d.ts +84 -0
- package/dist/network-capture.js +107 -0
- package/dist/scripts.d.ts +205 -0
- package/dist/scripts.js +234 -0
- package/dist/types.d.ts +157 -0
- package/dist/ws-transport.d.ts +15 -1
- package/dist/ws-transport.js +155 -10
- package/package.json +1 -1
package/dist/gen/wrc_pb.d.ts
CHANGED
|
@@ -2129,6 +2129,276 @@ export type ModifyRequestResponse = Message<"browserscale.v1.ModifyRequestRespon
|
|
|
2129
2129
|
* Use `create(ModifyRequestResponseSchema)` to create a new message.
|
|
2130
2130
|
*/
|
|
2131
2131
|
export declare const ModifyRequestResponseSchema: GenMessage<ModifyRequestResponse>;
|
|
2132
|
+
/**
|
|
2133
|
+
* @generated from message browserscale.v1.StartNetworkCaptureRequest
|
|
2134
|
+
*/
|
|
2135
|
+
export type StartNetworkCaptureRequest = Message<"browserscale.v1.StartNetworkCaptureRequest"> & {
|
|
2136
|
+
/**
|
|
2137
|
+
* @generated from field: string session_id = 1;
|
|
2138
|
+
*/
|
|
2139
|
+
sessionId: string;
|
|
2140
|
+
/**
|
|
2141
|
+
* @generated from field: string api_key = 2;
|
|
2142
|
+
*/
|
|
2143
|
+
apiKey: string;
|
|
2144
|
+
/**
|
|
2145
|
+
* URL wildcards to capture; empty captures everything in the session.
|
|
2146
|
+
* Prefix an entry with "!" to exclude it.
|
|
2147
|
+
*
|
|
2148
|
+
* @generated from field: repeated string patterns = 3;
|
|
2149
|
+
*/
|
|
2150
|
+
patterns: string[];
|
|
2151
|
+
/**
|
|
2152
|
+
* Response body capture: "none" (default), "text" or "all".
|
|
2153
|
+
*
|
|
2154
|
+
* @generated from field: string bodies = 4;
|
|
2155
|
+
*/
|
|
2156
|
+
bodies: string;
|
|
2157
|
+
/**
|
|
2158
|
+
* Narrows body capture further; empty applies `bodies` to every captured
|
|
2159
|
+
* exchange.
|
|
2160
|
+
*
|
|
2161
|
+
* @generated from field: repeated string body_patterns = 5;
|
|
2162
|
+
*/
|
|
2163
|
+
bodyPatterns: string[];
|
|
2164
|
+
};
|
|
2165
|
+
/**
|
|
2166
|
+
* Describes the message browserscale.v1.StartNetworkCaptureRequest.
|
|
2167
|
+
* Use `create(StartNetworkCaptureRequestSchema)` to create a new message.
|
|
2168
|
+
*/
|
|
2169
|
+
export declare const StartNetworkCaptureRequestSchema: GenMessage<StartNetworkCaptureRequest>;
|
|
2170
|
+
/**
|
|
2171
|
+
* @generated from message browserscale.v1.StopNetworkCaptureRequest
|
|
2172
|
+
*/
|
|
2173
|
+
export type StopNetworkCaptureRequest = Message<"browserscale.v1.StopNetworkCaptureRequest"> & {
|
|
2174
|
+
/**
|
|
2175
|
+
* @generated from field: string session_id = 1;
|
|
2176
|
+
*/
|
|
2177
|
+
sessionId: string;
|
|
2178
|
+
/**
|
|
2179
|
+
* @generated from field: string api_key = 2;
|
|
2180
|
+
*/
|
|
2181
|
+
apiKey: string;
|
|
2182
|
+
};
|
|
2183
|
+
/**
|
|
2184
|
+
* Describes the message browserscale.v1.StopNetworkCaptureRequest.
|
|
2185
|
+
* Use `create(StopNetworkCaptureRequestSchema)` to create a new message.
|
|
2186
|
+
*/
|
|
2187
|
+
export declare const StopNetworkCaptureRequestSchema: GenMessage<StopNetworkCaptureRequest>;
|
|
2188
|
+
/**
|
|
2189
|
+
* @generated from message browserscale.v1.StopNetworkCaptureResponse
|
|
2190
|
+
*/
|
|
2191
|
+
export type StopNetworkCaptureResponse = Message<"browserscale.v1.StopNetworkCaptureResponse"> & {
|
|
2192
|
+
/**
|
|
2193
|
+
* False if no capture was running for this session.
|
|
2194
|
+
*
|
|
2195
|
+
* @generated from field: bool stopped = 1;
|
|
2196
|
+
*/
|
|
2197
|
+
stopped: boolean;
|
|
2198
|
+
};
|
|
2199
|
+
/**
|
|
2200
|
+
* Describes the message browserscale.v1.StopNetworkCaptureResponse.
|
|
2201
|
+
* Use `create(StopNetworkCaptureResponseSchema)` to create a new message.
|
|
2202
|
+
*/
|
|
2203
|
+
export declare const StopNetworkCaptureResponseSchema: GenMessage<StopNetworkCaptureResponse>;
|
|
2204
|
+
/**
|
|
2205
|
+
* @generated from message browserscale.v1.StreamNetworkExchangesRequest
|
|
2206
|
+
*/
|
|
2207
|
+
export type StreamNetworkExchangesRequest = Message<"browserscale.v1.StreamNetworkExchangesRequest"> & {
|
|
2208
|
+
/**
|
|
2209
|
+
* @generated from field: string session_id = 1;
|
|
2210
|
+
*/
|
|
2211
|
+
sessionId: string;
|
|
2212
|
+
/**
|
|
2213
|
+
* @generated from field: string api_key = 2;
|
|
2214
|
+
*/
|
|
2215
|
+
apiKey: string;
|
|
2216
|
+
};
|
|
2217
|
+
/**
|
|
2218
|
+
* Describes the message browserscale.v1.StreamNetworkExchangesRequest.
|
|
2219
|
+
* Use `create(StreamNetworkExchangesRequestSchema)` to create a new message.
|
|
2220
|
+
*/
|
|
2221
|
+
export declare const StreamNetworkExchangesRequestSchema: GenMessage<StreamNetworkExchangesRequest>;
|
|
2222
|
+
/**
|
|
2223
|
+
* @generated from message browserscale.v1.NetworkExchangeEvent
|
|
2224
|
+
*/
|
|
2225
|
+
export type NetworkExchangeEvent = Message<"browserscale.v1.NetworkExchangeEvent"> & {
|
|
2226
|
+
/**
|
|
2227
|
+
* @generated from field: browserscale.v1.NetworkExchange exchange = 1;
|
|
2228
|
+
*/
|
|
2229
|
+
exchange?: NetworkExchange;
|
|
2230
|
+
/**
|
|
2231
|
+
* Cumulative exchanges dropped for this subscriber because it read slower
|
|
2232
|
+
* than the page produced them. Non-zero means the log has holes.
|
|
2233
|
+
*
|
|
2234
|
+
* @generated from field: uint64 dropped = 2;
|
|
2235
|
+
*/
|
|
2236
|
+
dropped: bigint;
|
|
2237
|
+
};
|
|
2238
|
+
/**
|
|
2239
|
+
* Describes the message browserscale.v1.NetworkExchangeEvent.
|
|
2240
|
+
* Use `create(NetworkExchangeEventSchema)` to create a new message.
|
|
2241
|
+
*/
|
|
2242
|
+
export declare const NetworkExchangeEventSchema: GenMessage<NetworkExchangeEvent>;
|
|
2243
|
+
/**
|
|
2244
|
+
* One request together with the response it received.
|
|
2245
|
+
*
|
|
2246
|
+
* A redirect is not a special case: every hop is reported as its own exchange,
|
|
2247
|
+
* sharing chain_id with its siblings and counting up redirect_index.
|
|
2248
|
+
*
|
|
2249
|
+
* @generated from message browserscale.v1.NetworkExchange
|
|
2250
|
+
*/
|
|
2251
|
+
export type NetworkExchange = Message<"browserscale.v1.NetworkExchange"> & {
|
|
2252
|
+
/**
|
|
2253
|
+
* Unique per hop.
|
|
2254
|
+
*
|
|
2255
|
+
* @generated from field: string request_id = 1;
|
|
2256
|
+
*/
|
|
2257
|
+
requestId: string;
|
|
2258
|
+
/**
|
|
2259
|
+
* Shared by every hop of one redirect chain.
|
|
2260
|
+
*
|
|
2261
|
+
* @generated from field: string chain_id = 2;
|
|
2262
|
+
*/
|
|
2263
|
+
chainId: string;
|
|
2264
|
+
/**
|
|
2265
|
+
* 0 for the original request, incremented once per redirect followed.
|
|
2266
|
+
*
|
|
2267
|
+
* @generated from field: int32 redirect_index = 3;
|
|
2268
|
+
*/
|
|
2269
|
+
redirectIndex: number;
|
|
2270
|
+
/**
|
|
2271
|
+
* DevTools frame token of the originating frame; empty for workers.
|
|
2272
|
+
*
|
|
2273
|
+
* @generated from field: string frame_id = 4;
|
|
2274
|
+
*/
|
|
2275
|
+
frameId: string;
|
|
2276
|
+
/**
|
|
2277
|
+
* Whether that frame runs in its own process.
|
|
2278
|
+
*
|
|
2279
|
+
* @generated from field: bool is_oopif = 5;
|
|
2280
|
+
*/
|
|
2281
|
+
isOopif: boolean;
|
|
2282
|
+
/**
|
|
2283
|
+
* "document" | "subframe" | "script" | "stylesheet" | "image" | "font" |
|
|
2284
|
+
* "media" | "fetch" | "worker" | "manifest" | "object" | "csp-report" |
|
|
2285
|
+
* "other". fetch(), XMLHttpRequest and EventSource all report "fetch" —
|
|
2286
|
+
* they are indistinguishable in the browser process.
|
|
2287
|
+
*
|
|
2288
|
+
* @generated from field: string resource_type = 6;
|
|
2289
|
+
*/
|
|
2290
|
+
resourceType: string;
|
|
2291
|
+
/**
|
|
2292
|
+
* @generated from field: string method = 7;
|
|
2293
|
+
*/
|
|
2294
|
+
method: string;
|
|
2295
|
+
/**
|
|
2296
|
+
* @generated from field: string url = 8;
|
|
2297
|
+
*/
|
|
2298
|
+
url: string;
|
|
2299
|
+
/**
|
|
2300
|
+
* Origin that initiated the request; empty if browser-initiated.
|
|
2301
|
+
*
|
|
2302
|
+
* @generated from field: string initiator_url = 9;
|
|
2303
|
+
*/
|
|
2304
|
+
initiatorUrl: string;
|
|
2305
|
+
/**
|
|
2306
|
+
* @generated from field: repeated browserscale.v1.Header request_headers = 10;
|
|
2307
|
+
*/
|
|
2308
|
+
requestHeaders: Header[];
|
|
2309
|
+
/**
|
|
2310
|
+
* True when request_headers are the bytes actually put on the wire —
|
|
2311
|
+
* Cookie, User-Agent, Sec-* and encoding included. False means they are what
|
|
2312
|
+
* the renderer asked for, before the network service filled in the rest.
|
|
2313
|
+
*
|
|
2314
|
+
* @generated from field: bool request_headers_are_wire = 11;
|
|
2315
|
+
*/
|
|
2316
|
+
requestHeadersAreWire: boolean;
|
|
2317
|
+
/**
|
|
2318
|
+
* Inline request body, capped by the browser. File and streamed uploads are
|
|
2319
|
+
* not included; request_body_truncated is set when anything was left out.
|
|
2320
|
+
*
|
|
2321
|
+
* @generated from field: bytes request_body = 12;
|
|
2322
|
+
*/
|
|
2323
|
+
requestBody: Uint8Array;
|
|
2324
|
+
/**
|
|
2325
|
+
* @generated from field: bool request_body_truncated = 13;
|
|
2326
|
+
*/
|
|
2327
|
+
requestBodyTruncated: boolean;
|
|
2328
|
+
/**
|
|
2329
|
+
* False when the request failed before any response arrived.
|
|
2330
|
+
*
|
|
2331
|
+
* @generated from field: bool has_response = 14;
|
|
2332
|
+
*/
|
|
2333
|
+
hasResponse: boolean;
|
|
2334
|
+
/**
|
|
2335
|
+
* @generated from field: int32 status_code = 15;
|
|
2336
|
+
*/
|
|
2337
|
+
statusCode: number;
|
|
2338
|
+
/**
|
|
2339
|
+
* @generated from field: string status_text = 16;
|
|
2340
|
+
*/
|
|
2341
|
+
statusText: string;
|
|
2342
|
+
/**
|
|
2343
|
+
* @generated from field: string mime_type = 17;
|
|
2344
|
+
*/
|
|
2345
|
+
mimeType: string;
|
|
2346
|
+
/**
|
|
2347
|
+
* Negotiated ALPN protocol, e.g. "h2" or "http/1.1".
|
|
2348
|
+
*
|
|
2349
|
+
* @generated from field: string protocol = 18;
|
|
2350
|
+
*/
|
|
2351
|
+
protocol: string;
|
|
2352
|
+
/**
|
|
2353
|
+
* @generated from field: string remote_address = 19;
|
|
2354
|
+
*/
|
|
2355
|
+
remoteAddress: string;
|
|
2356
|
+
/**
|
|
2357
|
+
* "network" | "cache" | "serviceWorker" | "wrcStaticCache" | "wrcSynthetic"
|
|
2358
|
+
*
|
|
2359
|
+
* @generated from field: string served_from = 20;
|
|
2360
|
+
*/
|
|
2361
|
+
servedFrom: string;
|
|
2362
|
+
/**
|
|
2363
|
+
* @generated from field: repeated browserscale.v1.Header response_headers = 21;
|
|
2364
|
+
*/
|
|
2365
|
+
responseHeaders: Header[];
|
|
2366
|
+
/**
|
|
2367
|
+
* @generated from field: bool response_headers_are_wire = 22;
|
|
2368
|
+
*/
|
|
2369
|
+
responseHeadersAreWire: boolean;
|
|
2370
|
+
/**
|
|
2371
|
+
* Populated only when body capture was requested and applied. Bodies cross
|
|
2372
|
+
* the browser boundary as text, so binary content (bodies="all" on an image)
|
|
2373
|
+
* does not arrive intact.
|
|
2374
|
+
*
|
|
2375
|
+
* @generated from field: bytes response_body = 23;
|
|
2376
|
+
*/
|
|
2377
|
+
responseBody: Uint8Array;
|
|
2378
|
+
/**
|
|
2379
|
+
* @generated from field: bool response_body_truncated = 24;
|
|
2380
|
+
*/
|
|
2381
|
+
responseBodyTruncated: boolean;
|
|
2382
|
+
/**
|
|
2383
|
+
* @generated from field: bool response_body_captured = 25;
|
|
2384
|
+
*/
|
|
2385
|
+
responseBodyCaptured: boolean;
|
|
2386
|
+
/**
|
|
2387
|
+
* @generated from field: int64 encoded_data_length = 26;
|
|
2388
|
+
*/
|
|
2389
|
+
encodedDataLength: bigint;
|
|
2390
|
+
/**
|
|
2391
|
+
* Net error name (e.g. "net::ERR_ABORTED"); empty on success.
|
|
2392
|
+
*
|
|
2393
|
+
* @generated from field: string error = 27;
|
|
2394
|
+
*/
|
|
2395
|
+
error: string;
|
|
2396
|
+
};
|
|
2397
|
+
/**
|
|
2398
|
+
* Describes the message browserscale.v1.NetworkExchange.
|
|
2399
|
+
* Use `create(NetworkExchangeSchema)` to create a new message.
|
|
2400
|
+
*/
|
|
2401
|
+
export declare const NetworkExchangeSchema: GenMessage<NetworkExchange>;
|
|
2132
2402
|
/**
|
|
2133
2403
|
* @generated from message browserscale.v1.GetCookiesRequest
|
|
2134
2404
|
*/
|
|
@@ -2680,9 +2950,9 @@ export type GetDOMHashResponse = Message<"browserscale.v1.GetDOMHashResponse"> &
|
|
|
2680
2950
|
*/
|
|
2681
2951
|
export declare const GetDOMHashResponseSchema: GenMessage<GetDOMHashResponse>;
|
|
2682
2952
|
/**
|
|
2683
|
-
* @generated from message browserscale.v1.
|
|
2953
|
+
* @generated from message browserscale.v1.StartDomMirrorRequest
|
|
2684
2954
|
*/
|
|
2685
|
-
export type
|
|
2955
|
+
export type StartDomMirrorRequest = Message<"browserscale.v1.StartDomMirrorRequest"> & {
|
|
2686
2956
|
/**
|
|
2687
2957
|
* @generated from field: string session_id = 1;
|
|
2688
2958
|
*/
|
|
@@ -2692,67 +2962,81 @@ export type InspectAtPositionRequest = Message<"browserscale.v1.InspectAtPositio
|
|
|
2692
2962
|
*/
|
|
2693
2963
|
apiKey: string;
|
|
2694
2964
|
/**
|
|
2695
|
-
*
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
/**
|
|
2699
|
-
* Viewport-relative CSS pixels.
|
|
2965
|
+
* Levels to serialize up front. Default 2 (#document -> <html> ->
|
|
2966
|
+
* <head>/<body>) — enough to draw a collapsed tree. -1 walks everything and
|
|
2967
|
+
* defeats the point of the mirror.
|
|
2700
2968
|
*
|
|
2701
|
-
* @generated from field:
|
|
2969
|
+
* @generated from field: optional int32 depth = 4;
|
|
2702
2970
|
*/
|
|
2703
|
-
|
|
2971
|
+
depth?: number;
|
|
2704
2972
|
/**
|
|
2705
|
-
*
|
|
2973
|
+
* Descend into author shadow roots. Fixed for the life of the mirror.
|
|
2974
|
+
*
|
|
2975
|
+
* @generated from field: optional bool pierce = 5;
|
|
2706
2976
|
*/
|
|
2707
|
-
|
|
2977
|
+
pierce?: boolean;
|
|
2708
2978
|
};
|
|
2709
2979
|
/**
|
|
2710
|
-
* Describes the message browserscale.v1.
|
|
2711
|
-
* Use `create(
|
|
2980
|
+
* Describes the message browserscale.v1.StartDomMirrorRequest.
|
|
2981
|
+
* Use `create(StartDomMirrorRequestSchema)` to create a new message.
|
|
2712
2982
|
*/
|
|
2713
|
-
export declare const
|
|
2983
|
+
export declare const StartDomMirrorRequestSchema: GenMessage<StartDomMirrorRequest>;
|
|
2714
2984
|
/**
|
|
2715
|
-
* @generated from message browserscale.v1.
|
|
2985
|
+
* @generated from message browserscale.v1.StartDomMirrorResponse
|
|
2716
2986
|
*/
|
|
2717
|
-
export type
|
|
2987
|
+
export type StartDomMirrorResponse = Message<"browserscale.v1.StartDomMirrorResponse"> & {
|
|
2718
2988
|
/**
|
|
2719
|
-
*
|
|
2989
|
+
* The MAIN frame's document, CDP DOM.Node-shaped JSON, the same format
|
|
2990
|
+
* GetDOM returns.
|
|
2720
2991
|
*
|
|
2721
|
-
*
|
|
2992
|
+
* An <iframe> in it reports child_node_count 1 without carrying that child:
|
|
2993
|
+
* the document it hosts is fetched with GetDomChildren like any other child
|
|
2994
|
+
* list, and asking is also what starts mirroring that frame.
|
|
2995
|
+
*
|
|
2996
|
+
* @generated from field: string root = 1;
|
|
2722
2997
|
*/
|
|
2723
|
-
|
|
2998
|
+
root: string;
|
|
2724
2999
|
/**
|
|
3000
|
+
* The page's main frame.
|
|
3001
|
+
*
|
|
2725
3002
|
* @generated from field: string frame_id = 2;
|
|
2726
3003
|
*/
|
|
2727
3004
|
frameId: string;
|
|
2728
3005
|
/**
|
|
2729
|
-
*
|
|
2730
|
-
|
|
2731
|
-
tagName: string;
|
|
2732
|
-
/**
|
|
2733
|
-
* Trimmed text content (max ~200 chars, server-imposed).
|
|
3006
|
+
* The page sequence this snapshot is the baseline for. Every DomUpdate after
|
|
3007
|
+
* it carries a higher one.
|
|
2734
3008
|
*
|
|
2735
|
-
* @generated from field:
|
|
3009
|
+
* @generated from field: uint64 seq = 3;
|
|
2736
3010
|
*/
|
|
2737
|
-
|
|
3011
|
+
seq: bigint;
|
|
3012
|
+
};
|
|
3013
|
+
/**
|
|
3014
|
+
* Describes the message browserscale.v1.StartDomMirrorResponse.
|
|
3015
|
+
* Use `create(StartDomMirrorResponseSchema)` to create a new message.
|
|
3016
|
+
*/
|
|
3017
|
+
export declare const StartDomMirrorResponseSchema: GenMessage<StartDomMirrorResponse>;
|
|
3018
|
+
/**
|
|
3019
|
+
* @generated from message browserscale.v1.StopDomMirrorRequest
|
|
3020
|
+
*/
|
|
3021
|
+
export type StopDomMirrorRequest = Message<"browserscale.v1.StopDomMirrorRequest"> & {
|
|
2738
3022
|
/**
|
|
2739
|
-
* @generated from field:
|
|
3023
|
+
* @generated from field: string session_id = 1;
|
|
2740
3024
|
*/
|
|
2741
|
-
|
|
3025
|
+
sessionId: string;
|
|
2742
3026
|
/**
|
|
2743
|
-
* @generated from field:
|
|
3027
|
+
* @generated from field: string api_key = 2;
|
|
2744
3028
|
*/
|
|
2745
|
-
|
|
3029
|
+
apiKey: string;
|
|
2746
3030
|
};
|
|
2747
3031
|
/**
|
|
2748
|
-
* Describes the message browserscale.v1.
|
|
2749
|
-
* Use `create(
|
|
3032
|
+
* Describes the message browserscale.v1.StopDomMirrorRequest.
|
|
3033
|
+
* Use `create(StopDomMirrorRequestSchema)` to create a new message.
|
|
2750
3034
|
*/
|
|
2751
|
-
export declare const
|
|
3035
|
+
export declare const StopDomMirrorRequestSchema: GenMessage<StopDomMirrorRequest>;
|
|
2752
3036
|
/**
|
|
2753
|
-
* @generated from message browserscale.v1.
|
|
3037
|
+
* @generated from message browserscale.v1.GetDomChildrenRequest
|
|
2754
3038
|
*/
|
|
2755
|
-
export type
|
|
3039
|
+
export type GetDomChildrenRequest = Message<"browserscale.v1.GetDomChildrenRequest"> & {
|
|
2756
3040
|
/**
|
|
2757
3041
|
* @generated from field: string session_id = 1;
|
|
2758
3042
|
*/
|
|
@@ -2762,32 +3046,55 @@ export type HighlightNodeRequest = Message<"browserscale.v1.HighlightNodeRequest
|
|
|
2762
3046
|
*/
|
|
2763
3047
|
apiKey: string;
|
|
2764
3048
|
/**
|
|
2765
|
-
* @generated from field:
|
|
3049
|
+
* @generated from field: int32 backend_node_id = 3;
|
|
2766
3050
|
*/
|
|
2767
|
-
|
|
3051
|
+
backendNodeId: number;
|
|
2768
3052
|
/**
|
|
2769
|
-
*
|
|
3053
|
+
* @generated from field: optional string frame_id = 4;
|
|
3054
|
+
*/
|
|
3055
|
+
frameId?: string;
|
|
3056
|
+
/**
|
|
3057
|
+
* Levels below the node. Default 1.
|
|
2770
3058
|
*
|
|
2771
|
-
* @generated from field: int32
|
|
3059
|
+
* @generated from field: optional int32 depth = 5;
|
|
2772
3060
|
*/
|
|
2773
|
-
|
|
3061
|
+
depth?: number;
|
|
3062
|
+
};
|
|
3063
|
+
/**
|
|
3064
|
+
* Describes the message browserscale.v1.GetDomChildrenRequest.
|
|
3065
|
+
* Use `create(GetDomChildrenRequestSchema)` to create a new message.
|
|
3066
|
+
*/
|
|
3067
|
+
export declare const GetDomChildrenRequestSchema: GenMessage<GetDomChildrenRequest>;
|
|
3068
|
+
/**
|
|
3069
|
+
* @generated from message browserscale.v1.GetDomChildrenResponse
|
|
3070
|
+
*/
|
|
3071
|
+
export type GetDomChildrenResponse = Message<"browserscale.v1.GetDomChildrenResponse"> & {
|
|
2774
3072
|
/**
|
|
2775
|
-
*
|
|
3073
|
+
* JSON array of DOM.Node. Empty for an id this mirror never handed out,
|
|
3074
|
+
* which is also what a stale id from before a resync looks like.
|
|
3075
|
+
*
|
|
3076
|
+
* On an <iframe>/<frame>/<object> the one child is the document it hosts,
|
|
3077
|
+
* and this call is what starts mirroring that frame.
|
|
3078
|
+
*
|
|
3079
|
+
* @generated from field: string children = 1;
|
|
2776
3080
|
*/
|
|
2777
|
-
|
|
3081
|
+
children: string;
|
|
3082
|
+
/**
|
|
3083
|
+
* Page sequence this payload is valid as of.
|
|
3084
|
+
*
|
|
3085
|
+
* @generated from field: uint64 seq = 2;
|
|
3086
|
+
*/
|
|
3087
|
+
seq: bigint;
|
|
2778
3088
|
};
|
|
2779
3089
|
/**
|
|
2780
|
-
* Describes the message browserscale.v1.
|
|
2781
|
-
* Use `create(
|
|
3090
|
+
* Describes the message browserscale.v1.GetDomChildrenResponse.
|
|
3091
|
+
* Use `create(GetDomChildrenResponseSchema)` to create a new message.
|
|
2782
3092
|
*/
|
|
2783
|
-
export declare const
|
|
3093
|
+
export declare const GetDomChildrenResponseSchema: GenMessage<GetDomChildrenResponse>;
|
|
2784
3094
|
/**
|
|
2785
|
-
*
|
|
2786
|
-
* key events. Targets whatever element currently has focus.
|
|
2787
|
-
*
|
|
2788
|
-
* @generated from message browserscale.v1.InsertTextRequest
|
|
3095
|
+
* @generated from message browserscale.v1.ReleaseDomSubtreeRequest
|
|
2789
3096
|
*/
|
|
2790
|
-
export type
|
|
3097
|
+
export type ReleaseDomSubtreeRequest = Message<"browserscale.v1.ReleaseDomSubtreeRequest"> & {
|
|
2791
3098
|
/**
|
|
2792
3099
|
* @generated from field: string session_id = 1;
|
|
2793
3100
|
*/
|
|
@@ -2797,29 +3104,23 @@ export type InsertTextRequest = Message<"browserscale.v1.InsertTextRequest"> & {
|
|
|
2797
3104
|
*/
|
|
2798
3105
|
apiKey: string;
|
|
2799
3106
|
/**
|
|
2800
|
-
* @generated from field:
|
|
3107
|
+
* @generated from field: int32 backend_node_id = 3;
|
|
2801
3108
|
*/
|
|
2802
|
-
|
|
3109
|
+
backendNodeId: number;
|
|
2803
3110
|
/**
|
|
2804
|
-
* @generated from field: string
|
|
3111
|
+
* @generated from field: optional string frame_id = 4;
|
|
2805
3112
|
*/
|
|
2806
|
-
|
|
3113
|
+
frameId?: string;
|
|
2807
3114
|
};
|
|
2808
3115
|
/**
|
|
2809
|
-
* Describes the message browserscale.v1.
|
|
2810
|
-
* Use `create(
|
|
3116
|
+
* Describes the message browserscale.v1.ReleaseDomSubtreeRequest.
|
|
3117
|
+
* Use `create(ReleaseDomSubtreeRequestSchema)` to create a new message.
|
|
2811
3118
|
*/
|
|
2812
|
-
export declare const
|
|
3119
|
+
export declare const ReleaseDomSubtreeRequestSchema: GenMessage<ReleaseDomSubtreeRequest>;
|
|
2813
3120
|
/**
|
|
2814
|
-
*
|
|
2815
|
-
* currently focused element (untargeted, no focus pinning) — unlike InsertText,
|
|
2816
|
-
* which is a single IME-style commit. Focus may move between fields mid-stream
|
|
2817
|
-
* (e.g. OTP inputs that auto-advance on each digit). For a strict, target-bound
|
|
2818
|
-
* value that must stay focused, use Fill instead.
|
|
2819
|
-
*
|
|
2820
|
-
* @generated from message browserscale.v1.TypeRequest
|
|
3121
|
+
* @generated from message browserscale.v1.RevealDomNodeRequest
|
|
2821
3122
|
*/
|
|
2822
|
-
export type
|
|
3123
|
+
export type RevealDomNodeRequest = Message<"browserscale.v1.RevealDomNodeRequest"> & {
|
|
2823
3124
|
/**
|
|
2824
3125
|
* @generated from field: string session_id = 1;
|
|
2825
3126
|
*/
|
|
@@ -2829,11 +3130,359 @@ export type TypeRequest = Message<"browserscale.v1.TypeRequest"> & {
|
|
|
2829
3130
|
*/
|
|
2830
3131
|
apiKey: string;
|
|
2831
3132
|
/**
|
|
2832
|
-
* @generated from field:
|
|
3133
|
+
* @generated from field: int32 backend_node_id = 3;
|
|
2833
3134
|
*/
|
|
2834
|
-
|
|
3135
|
+
backendNodeId: number;
|
|
2835
3136
|
/**
|
|
2836
|
-
* @generated from field: string
|
|
3137
|
+
* @generated from field: optional string frame_id = 4;
|
|
3138
|
+
*/
|
|
3139
|
+
frameId?: string;
|
|
3140
|
+
};
|
|
3141
|
+
/**
|
|
3142
|
+
* Describes the message browserscale.v1.RevealDomNodeRequest.
|
|
3143
|
+
* Use `create(RevealDomNodeRequestSchema)` to create a new message.
|
|
3144
|
+
*/
|
|
3145
|
+
export declare const RevealDomNodeRequestSchema: GenMessage<RevealDomNodeRequest>;
|
|
3146
|
+
/**
|
|
3147
|
+
* @generated from message browserscale.v1.RevealDomNodeResponse
|
|
3148
|
+
*/
|
|
3149
|
+
export type RevealDomNodeResponse = Message<"browserscale.v1.RevealDomNodeResponse"> & {
|
|
3150
|
+
/**
|
|
3151
|
+
* JSON array of DOM.Node, the MAIN document first, each carrying one level
|
|
3152
|
+
* of children, crossing into frames at the document nodes along it. A
|
|
3153
|
+
* document's frame_id is the id space its own backend_node_id and everything
|
|
3154
|
+
* after it counts in. Empty if the node is not on the page.
|
|
3155
|
+
*
|
|
3156
|
+
* @generated from field: string path = 1;
|
|
3157
|
+
*/
|
|
3158
|
+
path: string;
|
|
3159
|
+
/**
|
|
3160
|
+
* Page sequence this payload is valid as of.
|
|
3161
|
+
*
|
|
3162
|
+
* @generated from field: uint64 seq = 2;
|
|
3163
|
+
*/
|
|
3164
|
+
seq: bigint;
|
|
3165
|
+
};
|
|
3166
|
+
/**
|
|
3167
|
+
* Describes the message browserscale.v1.RevealDomNodeResponse.
|
|
3168
|
+
* Use `create(RevealDomNodeResponseSchema)` to create a new message.
|
|
3169
|
+
*/
|
|
3170
|
+
export declare const RevealDomNodeResponseSchema: GenMessage<RevealDomNodeResponse>;
|
|
3171
|
+
/**
|
|
3172
|
+
* @generated from message browserscale.v1.GetDomRevisionRequest
|
|
3173
|
+
*/
|
|
3174
|
+
export type GetDomRevisionRequest = Message<"browserscale.v1.GetDomRevisionRequest"> & {
|
|
3175
|
+
/**
|
|
3176
|
+
* @generated from field: string session_id = 1;
|
|
3177
|
+
*/
|
|
3178
|
+
sessionId: string;
|
|
3179
|
+
/**
|
|
3180
|
+
* @generated from field: string api_key = 2;
|
|
3181
|
+
*/
|
|
3182
|
+
apiKey: string;
|
|
3183
|
+
/**
|
|
3184
|
+
* @generated from field: optional string frame_id = 3;
|
|
3185
|
+
*/
|
|
3186
|
+
frameId?: string;
|
|
3187
|
+
};
|
|
3188
|
+
/**
|
|
3189
|
+
* Describes the message browserscale.v1.GetDomRevisionRequest.
|
|
3190
|
+
* Use `create(GetDomRevisionRequestSchema)` to create a new message.
|
|
3191
|
+
*/
|
|
3192
|
+
export declare const GetDomRevisionRequestSchema: GenMessage<GetDomRevisionRequest>;
|
|
3193
|
+
/**
|
|
3194
|
+
* @generated from message browserscale.v1.GetDomRevisionResponse
|
|
3195
|
+
*/
|
|
3196
|
+
export type GetDomRevisionResponse = Message<"browserscale.v1.GetDomRevisionResponse"> & {
|
|
3197
|
+
/**
|
|
3198
|
+
* Monotonic counter, meaningful only within the current document.
|
|
3199
|
+
*
|
|
3200
|
+
* @generated from field: uint64 revision = 1;
|
|
3201
|
+
*/
|
|
3202
|
+
revision: bigint;
|
|
3203
|
+
};
|
|
3204
|
+
/**
|
|
3205
|
+
* Describes the message browserscale.v1.GetDomRevisionResponse.
|
|
3206
|
+
* Use `create(GetDomRevisionResponseSchema)` to create a new message.
|
|
3207
|
+
*/
|
|
3208
|
+
export declare const GetDomRevisionResponseSchema: GenMessage<GetDomRevisionResponse>;
|
|
3209
|
+
/**
|
|
3210
|
+
* @generated from message browserscale.v1.StreamDomEventsRequest
|
|
3211
|
+
*/
|
|
3212
|
+
export type StreamDomEventsRequest = Message<"browserscale.v1.StreamDomEventsRequest"> & {
|
|
3213
|
+
/**
|
|
3214
|
+
* @generated from field: string session_id = 1;
|
|
3215
|
+
*/
|
|
3216
|
+
sessionId: string;
|
|
3217
|
+
/**
|
|
3218
|
+
* @generated from field: string api_key = 2;
|
|
3219
|
+
*/
|
|
3220
|
+
apiKey: string;
|
|
3221
|
+
};
|
|
3222
|
+
/**
|
|
3223
|
+
* Describes the message browserscale.v1.StreamDomEventsRequest.
|
|
3224
|
+
* Use `create(StreamDomEventsRequestSchema)` to create a new message.
|
|
3225
|
+
*/
|
|
3226
|
+
export declare const StreamDomEventsRequestSchema: GenMessage<StreamDomEventsRequest>;
|
|
3227
|
+
/**
|
|
3228
|
+
* One batch of edits to the revealed part of the page's DOM.
|
|
3229
|
+
*
|
|
3230
|
+
* @generated from message browserscale.v1.DomUpdate
|
|
3231
|
+
*/
|
|
3232
|
+
export type DomUpdate = Message<"browserscale.v1.DomUpdate"> & {
|
|
3233
|
+
/**
|
|
3234
|
+
* The id space these entries' node ids live in. Node ids restart per frame,
|
|
3235
|
+
* so this is half of every address in the batch.
|
|
3236
|
+
*
|
|
3237
|
+
* @generated from field: string frame_id = 1;
|
|
3238
|
+
*/
|
|
3239
|
+
frameId: string;
|
|
3240
|
+
/**
|
|
3241
|
+
* Page sequence AFTER applying this batch. One clock for the whole page: an
|
|
3242
|
+
* edit in an OOPIF and one in the main document are ordered against each
|
|
3243
|
+
* other because both passed through the browser in the order it saw them.
|
|
3244
|
+
*
|
|
3245
|
+
* @generated from field: uint64 seq = 2;
|
|
3246
|
+
*/
|
|
3247
|
+
seq: bigint;
|
|
3248
|
+
/**
|
|
3249
|
+
* JSON array of entries, ordered, to be applied in order. See the domUpdate
|
|
3250
|
+
* event in WRC.pdl for the entry shapes.
|
|
3251
|
+
*
|
|
3252
|
+
* A frame's document arriving or being replaced is an edit like any other: a
|
|
3253
|
+
* childNodeInserted or childNodeRemoved on the <iframe> that hosts it, both
|
|
3254
|
+
* in the same batch when it is a replacement.
|
|
3255
|
+
*
|
|
3256
|
+
* @generated from field: string edits = 3;
|
|
3257
|
+
*/
|
|
3258
|
+
edits: string;
|
|
3259
|
+
};
|
|
3260
|
+
/**
|
|
3261
|
+
* Describes the message browserscale.v1.DomUpdate.
|
|
3262
|
+
* Use `create(DomUpdateSchema)` to create a new message.
|
|
3263
|
+
*/
|
|
3264
|
+
export declare const DomUpdateSchema: GenMessage<DomUpdate>;
|
|
3265
|
+
/**
|
|
3266
|
+
* The client's copy of the page is void and must be rebuilt by calling
|
|
3267
|
+
* StartDomMirror again.
|
|
3268
|
+
*
|
|
3269
|
+
* Page-wide, because only the MAIN frame can void everything. A child frame
|
|
3270
|
+
* losing its document is a childNodeRemoved plus a childNodeInserted on its
|
|
3271
|
+
* owner, which costs that subtree rather than the page. Worth the distinction
|
|
3272
|
+
* on any page carrying ad frames, where the page-wide version would otherwise
|
|
3273
|
+
* fire continuously.
|
|
3274
|
+
*
|
|
3275
|
+
* @generated from message browserscale.v1.DomResync
|
|
3276
|
+
*/
|
|
3277
|
+
export type DomResync = Message<"browserscale.v1.DomResync"> & {
|
|
3278
|
+
/**
|
|
3279
|
+
* "documentReplaced", "overflow", "rendererGone" from the browser, or
|
|
3280
|
+
* "slowReader" when this relay could not hold the backlog.
|
|
3281
|
+
*
|
|
3282
|
+
* @generated from field: string reason = 2;
|
|
3283
|
+
*/
|
|
3284
|
+
reason: string;
|
|
3285
|
+
};
|
|
3286
|
+
/**
|
|
3287
|
+
* Describes the message browserscale.v1.DomResync.
|
|
3288
|
+
* Use `create(DomResyncSchema)` to create a new message.
|
|
3289
|
+
*/
|
|
3290
|
+
export declare const DomResyncSchema: GenMessage<DomResync>;
|
|
3291
|
+
/**
|
|
3292
|
+
* Updates and resyncs share one stream because they are only meaningful
|
|
3293
|
+
* relative to each other. On two streams a client could apply a batch that the
|
|
3294
|
+
* resync it has not read yet already invalidated, and no amount of sequence
|
|
3295
|
+
* bookkeeping recovers that ordering after the fact.
|
|
3296
|
+
*
|
|
3297
|
+
* There is deliberately no dropped-message counter, which the network exchange
|
|
3298
|
+
* stream does have. A dropped exchange leaves a log with a hole in it; a
|
|
3299
|
+
* dropped edit leaves a TREE THAT IS WRONG, and a client cannot tell the
|
|
3300
|
+
* difference by looking at it. So a backlog this relay cannot hold is
|
|
3301
|
+
* converted into a resync instead of being counted.
|
|
3302
|
+
*
|
|
3303
|
+
* @generated from message browserscale.v1.DomEvent
|
|
3304
|
+
*/
|
|
3305
|
+
export type DomEvent = Message<"browserscale.v1.DomEvent"> & {
|
|
3306
|
+
/**
|
|
3307
|
+
* @generated from oneof browserscale.v1.DomEvent.event
|
|
3308
|
+
*/
|
|
3309
|
+
event: {
|
|
3310
|
+
/**
|
|
3311
|
+
* @generated from field: browserscale.v1.DomUpdate update = 1;
|
|
3312
|
+
*/
|
|
3313
|
+
value: DomUpdate;
|
|
3314
|
+
case: "update";
|
|
3315
|
+
} | {
|
|
3316
|
+
/**
|
|
3317
|
+
* @generated from field: browserscale.v1.DomResync resync = 2;
|
|
3318
|
+
*/
|
|
3319
|
+
value: DomResync;
|
|
3320
|
+
case: "resync";
|
|
3321
|
+
} | {
|
|
3322
|
+
case: undefined;
|
|
3323
|
+
value?: undefined;
|
|
3324
|
+
};
|
|
3325
|
+
};
|
|
3326
|
+
/**
|
|
3327
|
+
* Describes the message browserscale.v1.DomEvent.
|
|
3328
|
+
* Use `create(DomEventSchema)` to create a new message.
|
|
3329
|
+
*/
|
|
3330
|
+
export declare const DomEventSchema: GenMessage<DomEvent>;
|
|
3331
|
+
/**
|
|
3332
|
+
* @generated from message browserscale.v1.InspectAtPositionRequest
|
|
3333
|
+
*/
|
|
3334
|
+
export type InspectAtPositionRequest = Message<"browserscale.v1.InspectAtPositionRequest"> & {
|
|
3335
|
+
/**
|
|
3336
|
+
* @generated from field: string session_id = 1;
|
|
3337
|
+
*/
|
|
3338
|
+
sessionId: string;
|
|
3339
|
+
/**
|
|
3340
|
+
* @generated from field: string api_key = 2;
|
|
3341
|
+
*/
|
|
3342
|
+
apiKey: string;
|
|
3343
|
+
/**
|
|
3344
|
+
* @generated from field: string page_id = 3;
|
|
3345
|
+
*/
|
|
3346
|
+
pageId: string;
|
|
3347
|
+
/**
|
|
3348
|
+
* Viewport-relative CSS pixels.
|
|
3349
|
+
*
|
|
3350
|
+
* @generated from field: double x = 4;
|
|
3351
|
+
*/
|
|
3352
|
+
x: number;
|
|
3353
|
+
/**
|
|
3354
|
+
* @generated from field: double y = 5;
|
|
3355
|
+
*/
|
|
3356
|
+
y: number;
|
|
3357
|
+
};
|
|
3358
|
+
/**
|
|
3359
|
+
* Describes the message browserscale.v1.InspectAtPositionRequest.
|
|
3360
|
+
* Use `create(InspectAtPositionRequestSchema)` to create a new message.
|
|
3361
|
+
*/
|
|
3362
|
+
export declare const InspectAtPositionRequestSchema: GenMessage<InspectAtPositionRequest>;
|
|
3363
|
+
/**
|
|
3364
|
+
* @generated from message browserscale.v1.InspectAtPositionResponse
|
|
3365
|
+
*/
|
|
3366
|
+
export type InspectAtPositionResponse = Message<"browserscale.v1.InspectAtPositionResponse"> & {
|
|
3367
|
+
/**
|
|
3368
|
+
* 0 if nothing was found at (x, y).
|
|
3369
|
+
*
|
|
3370
|
+
* @generated from field: int32 backend_node_id = 1;
|
|
3371
|
+
*/
|
|
3372
|
+
backendNodeId: number;
|
|
3373
|
+
/**
|
|
3374
|
+
* @generated from field: string frame_id = 2;
|
|
3375
|
+
*/
|
|
3376
|
+
frameId: string;
|
|
3377
|
+
/**
|
|
3378
|
+
* @generated from field: string tag_name = 3;
|
|
3379
|
+
*/
|
|
3380
|
+
tagName: string;
|
|
3381
|
+
/**
|
|
3382
|
+
* Trimmed text content (max ~200 chars, server-imposed).
|
|
3383
|
+
*
|
|
3384
|
+
* @generated from field: string text_content = 4;
|
|
3385
|
+
*/
|
|
3386
|
+
textContent: string;
|
|
3387
|
+
/**
|
|
3388
|
+
* @generated from field: bool is_visible = 5;
|
|
3389
|
+
*/
|
|
3390
|
+
isVisible: boolean;
|
|
3391
|
+
/**
|
|
3392
|
+
* @generated from field: browserscale.v1.Rect bounds = 6;
|
|
3393
|
+
*/
|
|
3394
|
+
bounds?: Rect;
|
|
3395
|
+
};
|
|
3396
|
+
/**
|
|
3397
|
+
* Describes the message browserscale.v1.InspectAtPositionResponse.
|
|
3398
|
+
* Use `create(InspectAtPositionResponseSchema)` to create a new message.
|
|
3399
|
+
*/
|
|
3400
|
+
export declare const InspectAtPositionResponseSchema: GenMessage<InspectAtPositionResponse>;
|
|
3401
|
+
/**
|
|
3402
|
+
* @generated from message browserscale.v1.HighlightNodeRequest
|
|
3403
|
+
*/
|
|
3404
|
+
export type HighlightNodeRequest = Message<"browserscale.v1.HighlightNodeRequest"> & {
|
|
3405
|
+
/**
|
|
3406
|
+
* @generated from field: string session_id = 1;
|
|
3407
|
+
*/
|
|
3408
|
+
sessionId: string;
|
|
3409
|
+
/**
|
|
3410
|
+
* @generated from field: string api_key = 2;
|
|
3411
|
+
*/
|
|
3412
|
+
apiKey: string;
|
|
3413
|
+
/**
|
|
3414
|
+
* @generated from field: string page_id = 3;
|
|
3415
|
+
*/
|
|
3416
|
+
pageId: string;
|
|
3417
|
+
/**
|
|
3418
|
+
* <= 0 clears all highlights.
|
|
3419
|
+
*
|
|
3420
|
+
* @generated from field: int32 backend_node_id = 4;
|
|
3421
|
+
*/
|
|
3422
|
+
backendNodeId: number;
|
|
3423
|
+
/**
|
|
3424
|
+
* @generated from field: optional string frame_id = 5;
|
|
3425
|
+
*/
|
|
3426
|
+
frameId?: string;
|
|
3427
|
+
};
|
|
3428
|
+
/**
|
|
3429
|
+
* Describes the message browserscale.v1.HighlightNodeRequest.
|
|
3430
|
+
* Use `create(HighlightNodeRequestSchema)` to create a new message.
|
|
3431
|
+
*/
|
|
3432
|
+
export declare const HighlightNodeRequestSchema: GenMessage<HighlightNodeRequest>;
|
|
3433
|
+
/**
|
|
3434
|
+
* IME-style text insertion at the current cursor position — no individual
|
|
3435
|
+
* key events. Targets whatever element currently has focus.
|
|
3436
|
+
*
|
|
3437
|
+
* @generated from message browserscale.v1.InsertTextRequest
|
|
3438
|
+
*/
|
|
3439
|
+
export type InsertTextRequest = Message<"browserscale.v1.InsertTextRequest"> & {
|
|
3440
|
+
/**
|
|
3441
|
+
* @generated from field: string session_id = 1;
|
|
3442
|
+
*/
|
|
3443
|
+
sessionId: string;
|
|
3444
|
+
/**
|
|
3445
|
+
* @generated from field: string api_key = 2;
|
|
3446
|
+
*/
|
|
3447
|
+
apiKey: string;
|
|
3448
|
+
/**
|
|
3449
|
+
* @generated from field: string page_id = 3;
|
|
3450
|
+
*/
|
|
3451
|
+
pageId: string;
|
|
3452
|
+
/**
|
|
3453
|
+
* @generated from field: string text = 4;
|
|
3454
|
+
*/
|
|
3455
|
+
text: string;
|
|
3456
|
+
};
|
|
3457
|
+
/**
|
|
3458
|
+
* Describes the message browserscale.v1.InsertTextRequest.
|
|
3459
|
+
* Use `create(InsertTextRequestSchema)` to create a new message.
|
|
3460
|
+
*/
|
|
3461
|
+
export declare const InsertTextRequestSchema: GenMessage<InsertTextRequest>;
|
|
3462
|
+
/**
|
|
3463
|
+
* Type dispatches `text` as a per-key stream of real keyboard events to the
|
|
3464
|
+
* currently focused element (untargeted, no focus pinning) — unlike InsertText,
|
|
3465
|
+
* which is a single IME-style commit. Focus may move between fields mid-stream
|
|
3466
|
+
* (e.g. OTP inputs that auto-advance on each digit). For a strict, target-bound
|
|
3467
|
+
* value that must stay focused, use Fill instead.
|
|
3468
|
+
*
|
|
3469
|
+
* @generated from message browserscale.v1.TypeRequest
|
|
3470
|
+
*/
|
|
3471
|
+
export type TypeRequest = Message<"browserscale.v1.TypeRequest"> & {
|
|
3472
|
+
/**
|
|
3473
|
+
* @generated from field: string session_id = 1;
|
|
3474
|
+
*/
|
|
3475
|
+
sessionId: string;
|
|
3476
|
+
/**
|
|
3477
|
+
* @generated from field: string api_key = 2;
|
|
3478
|
+
*/
|
|
3479
|
+
apiKey: string;
|
|
3480
|
+
/**
|
|
3481
|
+
* @generated from field: string page_id = 3;
|
|
3482
|
+
*/
|
|
3483
|
+
pageId: string;
|
|
3484
|
+
/**
|
|
3485
|
+
* @generated from field: string text = 4;
|
|
2837
3486
|
*/
|
|
2838
3487
|
text: string;
|
|
2839
3488
|
/**
|
|
@@ -3042,11 +3691,10 @@ export type ScreenshotResponse = Message<"browserscale.v1.ScreenshotResponse"> &
|
|
|
3042
3691
|
*/
|
|
3043
3692
|
export declare const ScreenshotResponseSchema: GenMessage<ScreenshotResponse>;
|
|
3044
3693
|
/**
|
|
3045
|
-
* ReadCanvas reads the pixels of a
|
|
3046
|
-
*
|
|
3047
|
-
*
|
|
3048
|
-
*
|
|
3049
|
-
* target: by selector, js_expression, or backend_node_id.
|
|
3694
|
+
* ReadCanvas reads the pixels of a <canvas> directly in the renderer, bypassing
|
|
3695
|
+
* the origin-clean (tainted) security check and without executing page JS.
|
|
3696
|
+
* Cross-origin/tainted canvases read fine. Targeted like click: by
|
|
3697
|
+
* backendNodeId (preferred), CSS selector, or JS expression.
|
|
3050
3698
|
*
|
|
3051
3699
|
* @generated from message browserscale.v1.ReadCanvasRequest
|
|
3052
3700
|
*/
|
|
@@ -3076,14 +3724,12 @@ export type ReadCanvasRequest = Message<"browserscale.v1.ReadCanvasRequest"> & {
|
|
|
3076
3724
|
*/
|
|
3077
3725
|
jsExpression?: string;
|
|
3078
3726
|
/**
|
|
3079
|
-
* Specific frameId, empty/omitted for main frame, or "ALL_FRAMES".
|
|
3080
|
-
*
|
|
3081
3727
|
* @generated from field: optional string frame_id = 7;
|
|
3082
3728
|
*/
|
|
3083
3729
|
frameId?: string;
|
|
3084
3730
|
/**
|
|
3085
|
-
* Output
|
|
3086
|
-
*
|
|
3731
|
+
* Output format: "png" (default), "jpeg", "webp", or "rgba" for the raw
|
|
3732
|
+
* unencoded RGBA pixel buffer.
|
|
3087
3733
|
*
|
|
3088
3734
|
* @generated from field: optional string format = 8;
|
|
3089
3735
|
*/
|
|
@@ -3095,8 +3741,8 @@ export type ReadCanvasRequest = Message<"browserscale.v1.ReadCanvasRequest"> & {
|
|
|
3095
3741
|
*/
|
|
3096
3742
|
quality?: number;
|
|
3097
3743
|
/**
|
|
3098
|
-
* Optional sub-rectangle in canvas pixels (mirrors getImageData).
|
|
3099
|
-
*
|
|
3744
|
+
* Optional sub-rectangle in canvas pixels (mirrors getImageData(sx,sy,sw,sh)).
|
|
3745
|
+
* Omit sw/sh (or set <= 0) to read the full canvas.
|
|
3100
3746
|
*
|
|
3101
3747
|
* @generated from field: optional int32 sx = 10;
|
|
3102
3748
|
*/
|
|
@@ -3124,43 +3770,44 @@ export declare const ReadCanvasRequestSchema: GenMessage<ReadCanvasRequest>;
|
|
|
3124
3770
|
*/
|
|
3125
3771
|
export type ReadCanvasResponse = Message<"browserscale.v1.ReadCanvasResponse"> & {
|
|
3126
3772
|
/**
|
|
3773
|
+
* Whether a <canvas> was found and read.
|
|
3774
|
+
*
|
|
3127
3775
|
* @generated from field: bool success = 1;
|
|
3128
3776
|
*/
|
|
3129
3777
|
success: boolean;
|
|
3130
3778
|
/**
|
|
3131
|
-
*
|
|
3779
|
+
* The frameId that contained the canvas.
|
|
3132
3780
|
*
|
|
3133
3781
|
* @generated from field: string frame_id = 2;
|
|
3134
3782
|
*/
|
|
3135
3783
|
frameId: string;
|
|
3136
3784
|
/**
|
|
3137
|
-
*
|
|
3785
|
+
* Backend node ID of the canvas that was read.
|
|
3138
3786
|
*
|
|
3139
3787
|
* @generated from field: int32 backend_node_id = 3;
|
|
3140
3788
|
*/
|
|
3141
3789
|
backendNodeId: number;
|
|
3142
3790
|
/**
|
|
3143
|
-
* Encoded image bytes as base64 (
|
|
3144
|
-
* when format
|
|
3791
|
+
* Encoded image bytes as base64 (png/jpeg/webp), or the raw RGBA buffer as
|
|
3792
|
+
* base64 when format is "rgba".
|
|
3145
3793
|
*
|
|
3146
3794
|
* @generated from field: string data_base64 = 4;
|
|
3147
3795
|
*/
|
|
3148
3796
|
dataBase64: string;
|
|
3149
3797
|
/**
|
|
3150
|
-
*
|
|
3798
|
+
* Pixel width of the returned image (canvas width, or sw if clipped).
|
|
3151
3799
|
*
|
|
3152
3800
|
* @generated from field: int32 width = 5;
|
|
3153
3801
|
*/
|
|
3154
3802
|
width: number;
|
|
3155
3803
|
/**
|
|
3156
|
-
*
|
|
3804
|
+
* Pixel height of the returned image (canvas height, or sh if clipped).
|
|
3157
3805
|
*
|
|
3158
3806
|
* @generated from field: int32 height = 6;
|
|
3159
3807
|
*/
|
|
3160
3808
|
height: number;
|
|
3161
3809
|
/**
|
|
3162
|
-
* Whether the canvas was origin-clean
|
|
3163
|
-
* the read succeeds regardless.
|
|
3810
|
+
* Whether the canvas was actually origin-clean. Informational only.
|
|
3164
3811
|
*
|
|
3165
3812
|
* @generated from field: bool origin_clean = 7;
|
|
3166
3813
|
*/
|
|
@@ -3316,6 +3963,16 @@ export type StartStreamResponse = Message<"browserscale.v1.StartStreamResponse">
|
|
|
3316
3963
|
* @generated from field: string answer_sdp = 1;
|
|
3317
3964
|
*/
|
|
3318
3965
|
answerSdp: string;
|
|
3966
|
+
/**
|
|
3967
|
+
* Root-viewport size in CSS pixels — the coordinate space the input data
|
|
3968
|
+
* channels expect. Delivered with the answer so the client can map pointer
|
|
3969
|
+
* coordinates from the first frame on, without a getPages() round trip that
|
|
3970
|
+
* races the stream. x/y are always 0. Later changes arrive as
|
|
3971
|
+
* {"type":"viewport","width":W,"height":H} on the reliable "input" channel.
|
|
3972
|
+
*
|
|
3973
|
+
* @generated from field: browserscale.v1.Rect viewport = 2;
|
|
3974
|
+
*/
|
|
3975
|
+
viewport?: Rect;
|
|
3319
3976
|
};
|
|
3320
3977
|
/**
|
|
3321
3978
|
* Describes the message browserscale.v1.StartStreamResponse.
|
|
@@ -3349,6 +4006,354 @@ export type StopStreamResponse = Message<"browserscale.v1.StopStreamResponse"> &
|
|
|
3349
4006
|
* Use `create(StopStreamResponseSchema)` to create a new message.
|
|
3350
4007
|
*/
|
|
3351
4008
|
export declare const StopStreamResponseSchema: GenMessage<StopStreamResponse>;
|
|
4009
|
+
/**
|
|
4010
|
+
* One console line a script printed.
|
|
4011
|
+
*
|
|
4012
|
+
* @generated from message browserscale.v1.ScriptLogEntry
|
|
4013
|
+
*/
|
|
4014
|
+
export type ScriptLogEntry = Message<"browserscale.v1.ScriptLogEntry"> & {
|
|
4015
|
+
/**
|
|
4016
|
+
* "info", "warning" or "error", from console.log / .warn / .error.
|
|
4017
|
+
*
|
|
4018
|
+
* @generated from field: string level = 1;
|
|
4019
|
+
*/
|
|
4020
|
+
level: string;
|
|
4021
|
+
/**
|
|
4022
|
+
* The arguments, already stringified the way console does it.
|
|
4023
|
+
*
|
|
4024
|
+
* @generated from field: string message = 2;
|
|
4025
|
+
*/
|
|
4026
|
+
message: string;
|
|
4027
|
+
/**
|
|
4028
|
+
* Unix milliseconds, stamped where the script printed rather than where the
|
|
4029
|
+
* line was received, so the log stays ordered across a reconnect.
|
|
4030
|
+
*
|
|
4031
|
+
* @generated from field: int64 timestamp = 3;
|
|
4032
|
+
*/
|
|
4033
|
+
timestamp: bigint;
|
|
4034
|
+
};
|
|
4035
|
+
/**
|
|
4036
|
+
* Describes the message browserscale.v1.ScriptLogEntry.
|
|
4037
|
+
* Use `create(ScriptLogEntrySchema)` to create a new message.
|
|
4038
|
+
*/
|
|
4039
|
+
export declare const ScriptLogEntrySchema: GenMessage<ScriptLogEntry>;
|
|
4040
|
+
/**
|
|
4041
|
+
* @generated from message browserscale.v1.RunScriptRequest
|
|
4042
|
+
*/
|
|
4043
|
+
export type RunScriptRequest = Message<"browserscale.v1.RunScriptRequest"> & {
|
|
4044
|
+
/**
|
|
4045
|
+
* @generated from field: string session_id = 1;
|
|
4046
|
+
*/
|
|
4047
|
+
sessionId: string;
|
|
4048
|
+
/**
|
|
4049
|
+
* @generated from field: string api_key = 2;
|
|
4050
|
+
*/
|
|
4051
|
+
apiKey: string;
|
|
4052
|
+
/**
|
|
4053
|
+
* JavaScript source. Runs with `browser` bound to the session, so the script
|
|
4054
|
+
* needs no setup of its own.
|
|
4055
|
+
*
|
|
4056
|
+
* @generated from field: string source = 3;
|
|
4057
|
+
*/
|
|
4058
|
+
source: string;
|
|
4059
|
+
};
|
|
4060
|
+
/**
|
|
4061
|
+
* Describes the message browserscale.v1.RunScriptRequest.
|
|
4062
|
+
* Use `create(RunScriptRequestSchema)` to create a new message.
|
|
4063
|
+
*/
|
|
4064
|
+
export declare const RunScriptRequestSchema: GenMessage<RunScriptRequest>;
|
|
4065
|
+
/**
|
|
4066
|
+
* There is deliberately no timeout on RunScript. A deadline is only useful if
|
|
4067
|
+
* it can cancel, and cancelling needs the run id — which this call does not
|
|
4068
|
+
* learn until the reply it is waiting for. A caller who needs a bound uses
|
|
4069
|
+
* StartScript, which hands the id over first, and StopScripts when the bound is
|
|
4070
|
+
* hit. A caller who just wants out can StopScripts with no id.
|
|
4071
|
+
*
|
|
4072
|
+
* @generated from message browserscale.v1.RunScriptResponse
|
|
4073
|
+
*/
|
|
4074
|
+
export type RunScriptResponse = Message<"browserscale.v1.RunScriptResponse"> & {
|
|
4075
|
+
/**
|
|
4076
|
+
* @generated from field: bool success = 1;
|
|
4077
|
+
*/
|
|
4078
|
+
success: boolean;
|
|
4079
|
+
/**
|
|
4080
|
+
* The script's return value as JSON, "undefined" when it returned nothing,
|
|
4081
|
+
* or the error message when success is false.
|
|
4082
|
+
*
|
|
4083
|
+
* @generated from field: string result = 2;
|
|
4084
|
+
*/
|
|
4085
|
+
result: string;
|
|
4086
|
+
/**
|
|
4087
|
+
* The run's id. Arrives too late to follow the run, but names it for a caller
|
|
4088
|
+
* that wants to match up log lines it already saw on the stream.
|
|
4089
|
+
*
|
|
4090
|
+
* @generated from field: string run_id = 3;
|
|
4091
|
+
*/
|
|
4092
|
+
runId: string;
|
|
4093
|
+
/**
|
|
4094
|
+
* Everything the script logged, in order — whether or not anyone subscribed.
|
|
4095
|
+
*
|
|
4096
|
+
* @generated from field: repeated browserscale.v1.ScriptLogEntry log = 4;
|
|
4097
|
+
*/
|
|
4098
|
+
log: ScriptLogEntry[];
|
|
4099
|
+
/**
|
|
4100
|
+
* True when the script printed more than the reply holds, in which case log
|
|
4101
|
+
* is the tail of the output rather than all of it.
|
|
4102
|
+
*
|
|
4103
|
+
* @generated from field: bool truncated = 5;
|
|
4104
|
+
*/
|
|
4105
|
+
truncated: boolean;
|
|
4106
|
+
};
|
|
4107
|
+
/**
|
|
4108
|
+
* Describes the message browserscale.v1.RunScriptResponse.
|
|
4109
|
+
* Use `create(RunScriptResponseSchema)` to create a new message.
|
|
4110
|
+
*/
|
|
4111
|
+
export declare const RunScriptResponseSchema: GenMessage<RunScriptResponse>;
|
|
4112
|
+
/**
|
|
4113
|
+
* @generated from message browserscale.v1.StartScriptRequest
|
|
4114
|
+
*/
|
|
4115
|
+
export type StartScriptRequest = Message<"browserscale.v1.StartScriptRequest"> & {
|
|
4116
|
+
/**
|
|
4117
|
+
* @generated from field: string session_id = 1;
|
|
4118
|
+
*/
|
|
4119
|
+
sessionId: string;
|
|
4120
|
+
/**
|
|
4121
|
+
* @generated from field: string api_key = 2;
|
|
4122
|
+
*/
|
|
4123
|
+
apiKey: string;
|
|
4124
|
+
/**
|
|
4125
|
+
* @generated from field: string source = 3;
|
|
4126
|
+
*/
|
|
4127
|
+
source: string;
|
|
4128
|
+
};
|
|
4129
|
+
/**
|
|
4130
|
+
* Describes the message browserscale.v1.StartScriptRequest.
|
|
4131
|
+
* Use `create(StartScriptRequestSchema)` to create a new message.
|
|
4132
|
+
*/
|
|
4133
|
+
export declare const StartScriptRequestSchema: GenMessage<StartScriptRequest>;
|
|
4134
|
+
/**
|
|
4135
|
+
* @generated from message browserscale.v1.StartScriptResponse
|
|
4136
|
+
*/
|
|
4137
|
+
export type StartScriptResponse = Message<"browserscale.v1.StartScriptResponse"> & {
|
|
4138
|
+
/**
|
|
4139
|
+
* Identifies the run for StopScripts, ListScriptRuns and the event stream.
|
|
4140
|
+
*
|
|
4141
|
+
* @generated from field: string run_id = 1;
|
|
4142
|
+
*/
|
|
4143
|
+
runId: string;
|
|
4144
|
+
};
|
|
4145
|
+
/**
|
|
4146
|
+
* Describes the message browserscale.v1.StartScriptResponse.
|
|
4147
|
+
* Use `create(StartScriptResponseSchema)` to create a new message.
|
|
4148
|
+
*/
|
|
4149
|
+
export declare const StartScriptResponseSchema: GenMessage<StartScriptResponse>;
|
|
4150
|
+
/**
|
|
4151
|
+
* @generated from message browserscale.v1.StopScriptsRequest
|
|
4152
|
+
*/
|
|
4153
|
+
export type StopScriptsRequest = Message<"browserscale.v1.StopScriptsRequest"> & {
|
|
4154
|
+
/**
|
|
4155
|
+
* @generated from field: string session_id = 1;
|
|
4156
|
+
*/
|
|
4157
|
+
sessionId: string;
|
|
4158
|
+
/**
|
|
4159
|
+
* @generated from field: string api_key = 2;
|
|
4160
|
+
*/
|
|
4161
|
+
apiKey: string;
|
|
4162
|
+
/**
|
|
4163
|
+
* The run to cancel. Empty cancels every run in this session — the
|
|
4164
|
+
* distinction is deliberately explicit, because there is no undo for either.
|
|
4165
|
+
*
|
|
4166
|
+
* @generated from field: string run_id = 3;
|
|
4167
|
+
*/
|
|
4168
|
+
runId: string;
|
|
4169
|
+
};
|
|
4170
|
+
/**
|
|
4171
|
+
* Describes the message browserscale.v1.StopScriptsRequest.
|
|
4172
|
+
* Use `create(StopScriptsRequestSchema)` to create a new message.
|
|
4173
|
+
*/
|
|
4174
|
+
export declare const StopScriptsRequestSchema: GenMessage<StopScriptsRequest>;
|
|
4175
|
+
/**
|
|
4176
|
+
* @generated from message browserscale.v1.StopScriptsResponse
|
|
4177
|
+
*/
|
|
4178
|
+
export type StopScriptsResponse = Message<"browserscale.v1.StopScriptsResponse"> & {
|
|
4179
|
+
/**
|
|
4180
|
+
* @generated from field: int32 stopped = 1;
|
|
4181
|
+
*/
|
|
4182
|
+
stopped: number;
|
|
4183
|
+
};
|
|
4184
|
+
/**
|
|
4185
|
+
* Describes the message browserscale.v1.StopScriptsResponse.
|
|
4186
|
+
* Use `create(StopScriptsResponseSchema)` to create a new message.
|
|
4187
|
+
*/
|
|
4188
|
+
export declare const StopScriptsResponseSchema: GenMessage<StopScriptsResponse>;
|
|
4189
|
+
/**
|
|
4190
|
+
* @generated from message browserscale.v1.ScriptRun
|
|
4191
|
+
*/
|
|
4192
|
+
export type ScriptRun = Message<"browserscale.v1.ScriptRun"> & {
|
|
4193
|
+
/**
|
|
4194
|
+
* @generated from field: string run_id = 1;
|
|
4195
|
+
*/
|
|
4196
|
+
runId: string;
|
|
4197
|
+
/**
|
|
4198
|
+
* How long the run has been going, in ms. Reported as an age rather than a
|
|
4199
|
+
* start time because that is what the browser knows — it counts from when the
|
|
4200
|
+
* run was accepted, with no clock shared with the caller.
|
|
4201
|
+
*
|
|
4202
|
+
* @generated from field: int64 running_ms = 2;
|
|
4203
|
+
*/
|
|
4204
|
+
runningMs: bigint;
|
|
4205
|
+
};
|
|
4206
|
+
/**
|
|
4207
|
+
* Describes the message browserscale.v1.ScriptRun.
|
|
4208
|
+
* Use `create(ScriptRunSchema)` to create a new message.
|
|
4209
|
+
*/
|
|
4210
|
+
export declare const ScriptRunSchema: GenMessage<ScriptRun>;
|
|
4211
|
+
/**
|
|
4212
|
+
* @generated from message browserscale.v1.ListScriptRunsRequest
|
|
4213
|
+
*/
|
|
4214
|
+
export type ListScriptRunsRequest = Message<"browserscale.v1.ListScriptRunsRequest"> & {
|
|
4215
|
+
/**
|
|
4216
|
+
* @generated from field: string session_id = 1;
|
|
4217
|
+
*/
|
|
4218
|
+
sessionId: string;
|
|
4219
|
+
/**
|
|
4220
|
+
* @generated from field: string api_key = 2;
|
|
4221
|
+
*/
|
|
4222
|
+
apiKey: string;
|
|
4223
|
+
};
|
|
4224
|
+
/**
|
|
4225
|
+
* Describes the message browserscale.v1.ListScriptRunsRequest.
|
|
4226
|
+
* Use `create(ListScriptRunsRequestSchema)` to create a new message.
|
|
4227
|
+
*/
|
|
4228
|
+
export declare const ListScriptRunsRequestSchema: GenMessage<ListScriptRunsRequest>;
|
|
4229
|
+
/**
|
|
4230
|
+
* @generated from message browserscale.v1.ListScriptRunsResponse
|
|
4231
|
+
*/
|
|
4232
|
+
export type ListScriptRunsResponse = Message<"browserscale.v1.ListScriptRunsResponse"> & {
|
|
4233
|
+
/**
|
|
4234
|
+
* Only runs still executing. A finished run is reported once on the event
|
|
4235
|
+
* stream and then forgotten; this is not a history.
|
|
4236
|
+
*
|
|
4237
|
+
* @generated from field: repeated browserscale.v1.ScriptRun runs = 1;
|
|
4238
|
+
*/
|
|
4239
|
+
runs: ScriptRun[];
|
|
4240
|
+
};
|
|
4241
|
+
/**
|
|
4242
|
+
* Describes the message browserscale.v1.ListScriptRunsResponse.
|
|
4243
|
+
* Use `create(ListScriptRunsResponseSchema)` to create a new message.
|
|
4244
|
+
*/
|
|
4245
|
+
export declare const ListScriptRunsResponseSchema: GenMessage<ListScriptRunsResponse>;
|
|
4246
|
+
/**
|
|
4247
|
+
* @generated from message browserscale.v1.StreamScriptEventsRequest
|
|
4248
|
+
*/
|
|
4249
|
+
export type StreamScriptEventsRequest = Message<"browserscale.v1.StreamScriptEventsRequest"> & {
|
|
4250
|
+
/**
|
|
4251
|
+
* @generated from field: string session_id = 1;
|
|
4252
|
+
*/
|
|
4253
|
+
sessionId: string;
|
|
4254
|
+
/**
|
|
4255
|
+
* @generated from field: string api_key = 2;
|
|
4256
|
+
*/
|
|
4257
|
+
apiKey: string;
|
|
4258
|
+
/**
|
|
4259
|
+
* Report only this run. Empty reports every run in the session, which is what
|
|
4260
|
+
* a dashboard wants and what a single follower does not.
|
|
4261
|
+
*
|
|
4262
|
+
* @generated from field: string run_id = 3;
|
|
4263
|
+
*/
|
|
4264
|
+
runId: string;
|
|
4265
|
+
};
|
|
4266
|
+
/**
|
|
4267
|
+
* Describes the message browserscale.v1.StreamScriptEventsRequest.
|
|
4268
|
+
* Use `create(StreamScriptEventsRequestSchema)` to create a new message.
|
|
4269
|
+
*/
|
|
4270
|
+
export declare const StreamScriptEventsRequestSchema: GenMessage<StreamScriptEventsRequest>;
|
|
4271
|
+
/**
|
|
4272
|
+
* @generated from message browserscale.v1.ScriptLog
|
|
4273
|
+
*/
|
|
4274
|
+
export type ScriptLog = Message<"browserscale.v1.ScriptLog"> & {
|
|
4275
|
+
/**
|
|
4276
|
+
* @generated from field: string run_id = 1;
|
|
4277
|
+
*/
|
|
4278
|
+
runId: string;
|
|
4279
|
+
/**
|
|
4280
|
+
* @generated from field: browserscale.v1.ScriptLogEntry line = 2;
|
|
4281
|
+
*/
|
|
4282
|
+
line?: ScriptLogEntry;
|
|
4283
|
+
};
|
|
4284
|
+
/**
|
|
4285
|
+
* Describes the message browserscale.v1.ScriptLog.
|
|
4286
|
+
* Use `create(ScriptLogSchema)` to create a new message.
|
|
4287
|
+
*/
|
|
4288
|
+
export declare const ScriptLogSchema: GenMessage<ScriptLog>;
|
|
4289
|
+
/**
|
|
4290
|
+
* @generated from message browserscale.v1.ScriptFinished
|
|
4291
|
+
*/
|
|
4292
|
+
export type ScriptFinished = Message<"browserscale.v1.ScriptFinished"> & {
|
|
4293
|
+
/**
|
|
4294
|
+
* @generated from field: string run_id = 1;
|
|
4295
|
+
*/
|
|
4296
|
+
runId: string;
|
|
4297
|
+
/**
|
|
4298
|
+
* @generated from field: bool success = 2;
|
|
4299
|
+
*/
|
|
4300
|
+
success: boolean;
|
|
4301
|
+
/**
|
|
4302
|
+
* The return value as JSON, or the error message when success is false — the
|
|
4303
|
+
* same one field as in RunScriptResponse.
|
|
4304
|
+
*
|
|
4305
|
+
* @generated from field: string result = 3;
|
|
4306
|
+
*/
|
|
4307
|
+
result: string;
|
|
4308
|
+
/**
|
|
4309
|
+
* True when the run ended because StopScripts cancelled it, or because the VM
|
|
4310
|
+
* was torn down under it, rather than on its own.
|
|
4311
|
+
*
|
|
4312
|
+
* @generated from field: bool stopped = 4;
|
|
4313
|
+
*/
|
|
4314
|
+
stopped: boolean;
|
|
4315
|
+
};
|
|
4316
|
+
/**
|
|
4317
|
+
* Describes the message browserscale.v1.ScriptFinished.
|
|
4318
|
+
* Use `create(ScriptFinishedSchema)` to create a new message.
|
|
4319
|
+
*/
|
|
4320
|
+
export declare const ScriptFinishedSchema: GenMessage<ScriptFinished>;
|
|
4321
|
+
/**
|
|
4322
|
+
* @generated from message browserscale.v1.ScriptEvent
|
|
4323
|
+
*/
|
|
4324
|
+
export type ScriptEvent = Message<"browserscale.v1.ScriptEvent"> & {
|
|
4325
|
+
/**
|
|
4326
|
+
* @generated from oneof browserscale.v1.ScriptEvent.event
|
|
4327
|
+
*/
|
|
4328
|
+
event: {
|
|
4329
|
+
/**
|
|
4330
|
+
* @generated from field: browserscale.v1.ScriptLog log = 1;
|
|
4331
|
+
*/
|
|
4332
|
+
value: ScriptLog;
|
|
4333
|
+
case: "log";
|
|
4334
|
+
} | {
|
|
4335
|
+
/**
|
|
4336
|
+
* @generated from field: browserscale.v1.ScriptFinished finished = 2;
|
|
4337
|
+
*/
|
|
4338
|
+
value: ScriptFinished;
|
|
4339
|
+
case: "finished";
|
|
4340
|
+
} | {
|
|
4341
|
+
case: undefined;
|
|
4342
|
+
value?: undefined;
|
|
4343
|
+
};
|
|
4344
|
+
/**
|
|
4345
|
+
* Cumulative events dropped for this subscriber because it read slower than
|
|
4346
|
+
* the scripts produced them. Non-zero means the log has holes.
|
|
4347
|
+
*
|
|
4348
|
+
* @generated from field: uint64 dropped = 3;
|
|
4349
|
+
*/
|
|
4350
|
+
dropped: bigint;
|
|
4351
|
+
};
|
|
4352
|
+
/**
|
|
4353
|
+
* Describes the message browserscale.v1.ScriptEvent.
|
|
4354
|
+
* Use `create(ScriptEventSchema)` to create a new message.
|
|
4355
|
+
*/
|
|
4356
|
+
export declare const ScriptEventSchema: GenMessage<ScriptEvent>;
|
|
3352
4357
|
/**
|
|
3353
4358
|
* @generated from service browserscale.v1.Browser
|
|
3354
4359
|
*/
|
|
@@ -3537,6 +4542,35 @@ export declare const Browser: GenService<{
|
|
|
3537
4542
|
input: typeof ModifyRequestRequestSchema;
|
|
3538
4543
|
output: typeof ModifyRequestResponseSchema;
|
|
3539
4544
|
};
|
|
4545
|
+
/**
|
|
4546
|
+
* Network capture — every matching request in the session, reported as it
|
|
4547
|
+
* completes. Start/Stop are session state; the stream is a separate
|
|
4548
|
+
* subscription, so a capture survives a reader reconnect and two readers
|
|
4549
|
+
* can watch one capture.
|
|
4550
|
+
*
|
|
4551
|
+
* @generated from rpc browserscale.v1.Browser.StartNetworkCapture
|
|
4552
|
+
*/
|
|
4553
|
+
startNetworkCapture: {
|
|
4554
|
+
methodKind: "unary";
|
|
4555
|
+
input: typeof StartNetworkCaptureRequestSchema;
|
|
4556
|
+
output: typeof EmptySchema;
|
|
4557
|
+
};
|
|
4558
|
+
/**
|
|
4559
|
+
* @generated from rpc browserscale.v1.Browser.StopNetworkCapture
|
|
4560
|
+
*/
|
|
4561
|
+
stopNetworkCapture: {
|
|
4562
|
+
methodKind: "unary";
|
|
4563
|
+
input: typeof StopNetworkCaptureRequestSchema;
|
|
4564
|
+
output: typeof StopNetworkCaptureResponseSchema;
|
|
4565
|
+
};
|
|
4566
|
+
/**
|
|
4567
|
+
* @generated from rpc browserscale.v1.Browser.StreamNetworkExchanges
|
|
4568
|
+
*/
|
|
4569
|
+
streamNetworkExchanges: {
|
|
4570
|
+
methodKind: "server_streaming";
|
|
4571
|
+
input: typeof StreamNetworkExchangesRequestSchema;
|
|
4572
|
+
output: typeof NetworkExchangeEventSchema;
|
|
4573
|
+
};
|
|
3540
4574
|
/**
|
|
3541
4575
|
* Cookies
|
|
3542
4576
|
*
|
|
@@ -3649,6 +4683,80 @@ export declare const Browser: GenService<{
|
|
|
3649
4683
|
input: typeof HighlightNodeRequestSchema;
|
|
3650
4684
|
output: typeof EmptySchema;
|
|
3651
4685
|
};
|
|
4686
|
+
/**
|
|
4687
|
+
* DOM mirror — an incremental view of the page's DOM, as ONE tree.
|
|
4688
|
+
* StartDomMirror returns the top of the main document and from then on the
|
|
4689
|
+
* browser reports changes to the part the client has actually expanded; the
|
|
4690
|
+
* reads grow and shrink that part. Together they replace polling GetDOMHash
|
|
4691
|
+
* and re-fetching GetDOM.
|
|
4692
|
+
*
|
|
4693
|
+
* An <iframe> is an ordinary element whose one child is the document it
|
|
4694
|
+
* hosts, fetched by expanding it — which is also what starts mirroring that
|
|
4695
|
+
* frame, so frames cost nothing until someone opens one. There is no frame
|
|
4696
|
+
* lifecycle to subscribe to. RevealDomNode reaches into a frame nobody
|
|
4697
|
+
* opened and starts the ones on the way, which is what makes a hit test
|
|
4698
|
+
* usable against a lazily loaded tree.
|
|
4699
|
+
*
|
|
4700
|
+
* Like network capture, the stream is a separate subscription so a mirror
|
|
4701
|
+
* survives a reader reconnect. Unlike it, the stream carries both updates
|
|
4702
|
+
* and resyncs on ONE channel: a resync means "everything you hold is void",
|
|
4703
|
+
* which is only interpretable in order against the batches around it.
|
|
4704
|
+
*
|
|
4705
|
+
* @generated from rpc browserscale.v1.Browser.StartDomMirror
|
|
4706
|
+
*/
|
|
4707
|
+
startDomMirror: {
|
|
4708
|
+
methodKind: "unary";
|
|
4709
|
+
input: typeof StartDomMirrorRequestSchema;
|
|
4710
|
+
output: typeof StartDomMirrorResponseSchema;
|
|
4711
|
+
};
|
|
4712
|
+
/**
|
|
4713
|
+
* @generated from rpc browserscale.v1.Browser.StopDomMirror
|
|
4714
|
+
*/
|
|
4715
|
+
stopDomMirror: {
|
|
4716
|
+
methodKind: "unary";
|
|
4717
|
+
input: typeof StopDomMirrorRequestSchema;
|
|
4718
|
+
output: typeof EmptySchema;
|
|
4719
|
+
};
|
|
4720
|
+
/**
|
|
4721
|
+
* @generated from rpc browserscale.v1.Browser.GetDomChildren
|
|
4722
|
+
*/
|
|
4723
|
+
getDomChildren: {
|
|
4724
|
+
methodKind: "unary";
|
|
4725
|
+
input: typeof GetDomChildrenRequestSchema;
|
|
4726
|
+
output: typeof GetDomChildrenResponseSchema;
|
|
4727
|
+
};
|
|
4728
|
+
/**
|
|
4729
|
+
* @generated from rpc browserscale.v1.Browser.ReleaseDomSubtree
|
|
4730
|
+
*/
|
|
4731
|
+
releaseDomSubtree: {
|
|
4732
|
+
methodKind: "unary";
|
|
4733
|
+
input: typeof ReleaseDomSubtreeRequestSchema;
|
|
4734
|
+
output: typeof EmptySchema;
|
|
4735
|
+
};
|
|
4736
|
+
/**
|
|
4737
|
+
* @generated from rpc browserscale.v1.Browser.RevealDomNode
|
|
4738
|
+
*/
|
|
4739
|
+
revealDomNode: {
|
|
4740
|
+
methodKind: "unary";
|
|
4741
|
+
input: typeof RevealDomNodeRequestSchema;
|
|
4742
|
+
output: typeof RevealDomNodeResponseSchema;
|
|
4743
|
+
};
|
|
4744
|
+
/**
|
|
4745
|
+
* @generated from rpc browserscale.v1.Browser.GetDomRevision
|
|
4746
|
+
*/
|
|
4747
|
+
getDomRevision: {
|
|
4748
|
+
methodKind: "unary";
|
|
4749
|
+
input: typeof GetDomRevisionRequestSchema;
|
|
4750
|
+
output: typeof GetDomRevisionResponseSchema;
|
|
4751
|
+
};
|
|
4752
|
+
/**
|
|
4753
|
+
* @generated from rpc browserscale.v1.Browser.StreamDomEvents
|
|
4754
|
+
*/
|
|
4755
|
+
streamDomEvents: {
|
|
4756
|
+
methodKind: "server_streaming";
|
|
4757
|
+
input: typeof StreamDomEventsRequestSchema;
|
|
4758
|
+
output: typeof DomEventSchema;
|
|
4759
|
+
};
|
|
3652
4760
|
/**
|
|
3653
4761
|
* Screenshot / capture
|
|
3654
4762
|
*
|
|
@@ -3749,4 +4857,60 @@ export declare const Browser: GenService<{
|
|
|
3749
4857
|
input: typeof StopStreamRequestSchema;
|
|
3750
4858
|
output: typeof StopStreamResponseSchema;
|
|
3751
4859
|
};
|
|
4860
|
+
/**
|
|
4861
|
+
* Scripts — automation that runs inside the browser process rather than
|
|
4862
|
+
* across the network. The script gets the same `browser.*` surface this
|
|
4863
|
+
* service exposes, but each call is a function call in the browser instead of
|
|
4864
|
+
* a gRPC round trip, so a loop that is unusable at ~50ms per step costs
|
|
4865
|
+
* microseconds. Worth it for anything chatty: waiting for a selector,
|
|
4866
|
+
* scraping a list, walking pagination.
|
|
4867
|
+
*
|
|
4868
|
+
* Two modes, because a script is either something you wait for or something
|
|
4869
|
+
* you leave running. RunScript blocks and hands back the return value with
|
|
4870
|
+
* the whole log, which is what a one-shot caller wants. StartScript returns a
|
|
4871
|
+
* run id immediately and the output arrives on the event stream, which is the
|
|
4872
|
+
* only workable shape for a script that outlives the request.
|
|
4873
|
+
*
|
|
4874
|
+
* Like network capture the stream is a separate subscription, so output
|
|
4875
|
+
* survives a reader reconnect and two readers can watch one run.
|
|
4876
|
+
*
|
|
4877
|
+
* @generated from rpc browserscale.v1.Browser.RunScript
|
|
4878
|
+
*/
|
|
4879
|
+
runScript: {
|
|
4880
|
+
methodKind: "unary";
|
|
4881
|
+
input: typeof RunScriptRequestSchema;
|
|
4882
|
+
output: typeof RunScriptResponseSchema;
|
|
4883
|
+
};
|
|
4884
|
+
/**
|
|
4885
|
+
* @generated from rpc browserscale.v1.Browser.StartScript
|
|
4886
|
+
*/
|
|
4887
|
+
startScript: {
|
|
4888
|
+
methodKind: "unary";
|
|
4889
|
+
input: typeof StartScriptRequestSchema;
|
|
4890
|
+
output: typeof StartScriptResponseSchema;
|
|
4891
|
+
};
|
|
4892
|
+
/**
|
|
4893
|
+
* @generated from rpc browserscale.v1.Browser.StopScripts
|
|
4894
|
+
*/
|
|
4895
|
+
stopScripts: {
|
|
4896
|
+
methodKind: "unary";
|
|
4897
|
+
input: typeof StopScriptsRequestSchema;
|
|
4898
|
+
output: typeof StopScriptsResponseSchema;
|
|
4899
|
+
};
|
|
4900
|
+
/**
|
|
4901
|
+
* @generated from rpc browserscale.v1.Browser.ListScriptRuns
|
|
4902
|
+
*/
|
|
4903
|
+
listScriptRuns: {
|
|
4904
|
+
methodKind: "unary";
|
|
4905
|
+
input: typeof ListScriptRunsRequestSchema;
|
|
4906
|
+
output: typeof ListScriptRunsResponseSchema;
|
|
4907
|
+
};
|
|
4908
|
+
/**
|
|
4909
|
+
* @generated from rpc browserscale.v1.Browser.StreamScriptEvents
|
|
4910
|
+
*/
|
|
4911
|
+
streamScriptEvents: {
|
|
4912
|
+
methodKind: "server_streaming";
|
|
4913
|
+
input: typeof StreamScriptEventsRequestSchema;
|
|
4914
|
+
output: typeof ScriptEventSchema;
|
|
4915
|
+
};
|
|
3752
4916
|
}>;
|