browserscale-ts 1.9.0 → 1.10.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.
@@ -2362,14 +2362,15 @@ export type StartNetworkCaptureRequest = Message<"browserscale.v1.StartNetworkCa
2362
2362
  */
2363
2363
  patterns: string[];
2364
2364
  /**
2365
- * Response body capture: "none" (default), "text" or "all".
2365
+ * Response body capture: "none" (default), "text" or "all". Request bodies
2366
+ * are kept whenever a request has one.
2366
2367
  *
2367
2368
  * @generated from field: string bodies = 4;
2368
2369
  */
2369
2370
  bodies: string;
2370
2371
  /**
2371
- * Narrows body capture further; empty applies `bodies` to every captured
2372
- * exchange.
2372
+ * Narrows response body capture further; empty applies `bodies` to every
2373
+ * captured exchange.
2373
2374
  *
2374
2375
  * @generated from field: repeated string body_patterns = 5;
2375
2376
  */
@@ -2540,13 +2541,22 @@ export type NetworkExchange = Message<"browserscale.v1.NetworkExchange"> & {
2540
2541
  */
2541
2542
  requestHeadersAreWire: boolean;
2542
2543
  /**
2543
- * Inline request body, capped by the browser. File and streamed uploads are
2544
- * not included; request_body_truncated is set when anything was left out.
2544
+ * Bodies never travel with the exchange. Pass the id to GetNetworkBody to
2545
+ * read the bytes; empty when the request had no body.
2545
2546
  *
2546
- * @generated from field: bytes request_body = 12;
2547
+ * @generated from field: string request_body_id = 28;
2547
2548
  */
2548
- requestBody: Uint8Array;
2549
+ requestBodyId: string;
2549
2550
  /**
2551
+ * Bytes kept for the request body.
2552
+ *
2553
+ * @generated from field: int64 request_body_size = 29;
2554
+ */
2555
+ requestBodySize: bigint;
2556
+ /**
2557
+ * True when part of the request body is missing: it hit the per-body cap, or
2558
+ * it was a file or streamed upload, which are not kept.
2559
+ *
2550
2560
  * @generated from field: bool request_body_truncated = 13;
2551
2561
  */
2552
2562
  requestBodyTruncated: boolean;
@@ -2593,21 +2603,25 @@ export type NetworkExchange = Message<"browserscale.v1.NetworkExchange"> & {
2593
2603
  */
2594
2604
  responseHeadersAreWire: boolean;
2595
2605
  /**
2596
- * Populated only when body capture was requested and applied. Bodies cross
2597
- * the browser boundary as text, so binary content (bodies="all" on an image)
2598
- * does not arrive intact.
2606
+ * Pass to GetNetworkBody to read the response body. Empty when body capture
2607
+ * did not apply to this exchange.
2599
2608
  *
2600
- * @generated from field: bytes response_body = 23;
2609
+ * @generated from field: string response_body_id = 30;
2601
2610
  */
2602
- responseBody: Uint8Array;
2611
+ responseBodyId: string;
2603
2612
  /**
2604
- * @generated from field: bool response_body_truncated = 24;
2613
+ * Bytes kept for the response body, after content decoding.
2614
+ *
2615
+ * @generated from field: int64 response_body_size = 31;
2605
2616
  */
2606
- responseBodyTruncated: boolean;
2617
+ responseBodySize: bigint;
2607
2618
  /**
2608
- * @generated from field: bool response_body_captured = 25;
2619
+ * True when the kept body is shorter than the one the page received: it hit
2620
+ * the per-body cap, the load ended early, or the host's disk fell behind.
2621
+ *
2622
+ * @generated from field: bool response_body_truncated = 24;
2609
2623
  */
2610
- responseBodyCaptured: boolean;
2624
+ responseBodyTruncated: boolean;
2611
2625
  /**
2612
2626
  * @generated from field: int64 encoded_data_length = 26;
2613
2627
  */
@@ -2624,6 +2638,84 @@ export type NetworkExchange = Message<"browserscale.v1.NetworkExchange"> & {
2624
2638
  * Use `create(NetworkExchangeSchema)` to create a new message.
2625
2639
  */
2626
2640
  export declare const NetworkExchangeSchema: GenMessage<NetworkExchange>;
2641
+ /**
2642
+ * @generated from message browserscale.v1.GetNetworkBodyRequest
2643
+ */
2644
+ export type GetNetworkBodyRequest = Message<"browserscale.v1.GetNetworkBodyRequest"> & {
2645
+ /**
2646
+ * @generated from field: string session_id = 1;
2647
+ */
2648
+ sessionId: string;
2649
+ /**
2650
+ * @generated from field: string api_key = 2;
2651
+ */
2652
+ apiKey: string;
2653
+ /**
2654
+ * request_body_id or response_body_id of an exchange.
2655
+ *
2656
+ * @generated from field: string body_id = 3;
2657
+ */
2658
+ bodyId: string;
2659
+ /**
2660
+ * First byte to read; 0 when unset.
2661
+ *
2662
+ * @generated from field: optional int64 offset = 4;
2663
+ */
2664
+ offset?: bigint;
2665
+ /**
2666
+ * Bytes to read. Unset or larger than the per-call limit (2 MiB) reads up to
2667
+ * that limit; larger bodies are read in ranges.
2668
+ *
2669
+ * @generated from field: optional int64 length = 5;
2670
+ */
2671
+ length?: bigint;
2672
+ };
2673
+ /**
2674
+ * Describes the message browserscale.v1.GetNetworkBodyRequest.
2675
+ * Use `create(GetNetworkBodyRequestSchema)` to create a new message.
2676
+ */
2677
+ export declare const GetNetworkBodyRequestSchema: GenMessage<GetNetworkBodyRequest>;
2678
+ /**
2679
+ * @generated from message browserscale.v1.GetNetworkBodyResponse
2680
+ */
2681
+ export type GetNetworkBodyResponse = Message<"browserscale.v1.GetNetworkBodyResponse"> & {
2682
+ /**
2683
+ * The bytes read; empty past the end of the body.
2684
+ *
2685
+ * @generated from field: bytes data = 1;
2686
+ */
2687
+ data: Uint8Array;
2688
+ /**
2689
+ * Bytes kept for this body in total.
2690
+ *
2691
+ * @generated from field: int64 total_size = 2;
2692
+ */
2693
+ totalSize: bigint;
2694
+ /**
2695
+ * Same as the exchange's truncated flag for this body.
2696
+ *
2697
+ * @generated from field: bool truncated = 3;
2698
+ */
2699
+ truncated: boolean;
2700
+ /**
2701
+ * False iff the body cannot be read; then error carries the code:
2702
+ * "not_found" — no body with this id was kept in this session.
2703
+ * "evicted" — the body was dropped to stay within the session's quota.
2704
+ * "unavailable" — the body could not be stored or read back.
2705
+ *
2706
+ * @generated from field: bool success = 4;
2707
+ */
2708
+ success: boolean;
2709
+ /**
2710
+ * @generated from field: optional browserscale.v1.CommandError error = 5;
2711
+ */
2712
+ error?: CommandError;
2713
+ };
2714
+ /**
2715
+ * Describes the message browserscale.v1.GetNetworkBodyResponse.
2716
+ * Use `create(GetNetworkBodyResponseSchema)` to create a new message.
2717
+ */
2718
+ export declare const GetNetworkBodyResponseSchema: GenMessage<GetNetworkBodyResponse>;
2627
2719
  /**
2628
2720
  * @generated from message browserscale.v1.GetCookiesRequest
2629
2721
  */
@@ -4921,7 +5013,8 @@ export declare const Browser: GenService<{
4921
5013
  * Network capture — every matching request in the session, reported as it
4922
5014
  * completes. Start/Stop are session state; the stream is a separate
4923
5015
  * subscription, so a capture survives a reader reconnect and two readers
4924
- * can watch one capture.
5016
+ * can watch one capture. Exchanges only name their bodies; GetNetworkBody
5017
+ * reads them.
4925
5018
  *
4926
5019
  * @generated from rpc browserscale.v1.Browser.StartNetworkCapture
4927
5020
  */
@@ -4946,6 +5039,14 @@ export declare const Browser: GenService<{
4946
5039
  input: typeof StreamNetworkExchangesRequestSchema;
4947
5040
  output: typeof NetworkExchangeEventSchema;
4948
5041
  };
5042
+ /**
5043
+ * @generated from rpc browserscale.v1.Browser.GetNetworkBody
5044
+ */
5045
+ getNetworkBody: {
5046
+ methodKind: "unary";
5047
+ input: typeof GetNetworkBodyRequestSchema;
5048
+ output: typeof GetNetworkBodyResponseSchema;
5049
+ };
4949
5050
  /**
4950
5051
  * Cookies
4951
5052
  *