@cloudflare/workers-types 4.20250715.0 → 4.20250719.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.
@@ -716,7 +716,7 @@ declare class Event {
716
716
  *
717
717
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
718
718
  */
719
- readonly srcElement?: EventTarget;
719
+ readonly srcElement: EventTarget | null;
720
720
  /**
721
721
  * Returns the event's timestamp as the number of milliseconds measured relative to the time origin.
722
722
  *
@@ -7364,6 +7364,9 @@ type ImageDrawOptions = {
7364
7364
  bottom?: number;
7365
7365
  right?: number;
7366
7366
  };
7367
+ type ImageInputOptions = {
7368
+ encoding?: "base64";
7369
+ };
7367
7370
  type ImageOutputOptions = {
7368
7371
  format:
7369
7372
  | "image/jpeg"
@@ -7382,13 +7385,19 @@ interface ImagesBinding {
7382
7385
  * @throws {@link ImagesError} with code 9412 if input is not an image
7383
7386
  * @param stream The image bytes
7384
7387
  */
7385
- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
7388
+ info(
7389
+ stream: ReadableStream<Uint8Array>,
7390
+ options?: ImageInputOptions,
7391
+ ): Promise<ImageInfoResponse>;
7386
7392
  /**
7387
7393
  * Begin applying a series of transformations to an image
7388
7394
  * @param stream The image bytes
7389
7395
  * @returns A transform handle
7390
7396
  */
7391
- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
7397
+ input(
7398
+ stream: ReadableStream<Uint8Array>,
7399
+ options?: ImageInputOptions,
7400
+ ): ImageTransformer;
7392
7401
  }
7393
7402
  interface ImageTransformer {
7394
7403
  /**
@@ -7414,6 +7423,9 @@ interface ImageTransformer {
7414
7423
  */
7415
7424
  output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
7416
7425
  }
7426
+ type ImageTransformationOutputOptions = {
7427
+ encoding?: "base64";
7428
+ };
7417
7429
  interface ImageTransformationResult {
7418
7430
  /**
7419
7431
  * The image as a response, ready to store in cache or return to users
@@ -7426,7 +7438,7 @@ interface ImageTransformationResult {
7426
7438
  /**
7427
7439
  * The bytes of the response
7428
7440
  */
7429
- image(): ReadableStream<Uint8Array>;
7441
+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
7430
7442
  }
7431
7443
  interface ImagesError extends Error {
7432
7444
  readonly code: number;
@@ -7868,7 +7880,7 @@ declare namespace TailStream {
7868
7880
  readonly type: "fetch";
7869
7881
  readonly method: string;
7870
7882
  readonly url: string;
7871
- readonly cfJson: string;
7883
+ readonly cfJson?: object;
7872
7884
  readonly headers: Header[];
7873
7885
  }
7874
7886
  interface JsRpcEventInfo {
@@ -8003,7 +8015,7 @@ declare namespace TailStream {
8003
8015
  interface Log {
8004
8016
  readonly type: "log";
8005
8017
  readonly level: "debug" | "error" | "info" | "log" | "warn";
8006
- readonly message: string;
8018
+ readonly message: object;
8007
8019
  }
8008
8020
  interface Return {
8009
8021
  readonly type: "return";
@@ -721,7 +721,7 @@ export declare class Event {
721
721
  *
722
722
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
723
723
  */
724
- readonly srcElement?: EventTarget;
724
+ readonly srcElement: EventTarget | null;
725
725
  /**
726
726
  * Returns the event's timestamp as the number of milliseconds measured relative to the time origin.
727
727
  *
@@ -7385,6 +7385,9 @@ export type ImageDrawOptions = {
7385
7385
  bottom?: number;
7386
7386
  right?: number;
7387
7387
  };
7388
+ export type ImageInputOptions = {
7389
+ encoding?: "base64";
7390
+ };
7388
7391
  export type ImageOutputOptions = {
7389
7392
  format:
7390
7393
  | "image/jpeg"
@@ -7403,13 +7406,19 @@ export interface ImagesBinding {
7403
7406
  * @throws {@link ImagesError} with code 9412 if input is not an image
7404
7407
  * @param stream The image bytes
7405
7408
  */
7406
- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
7409
+ info(
7410
+ stream: ReadableStream<Uint8Array>,
7411
+ options?: ImageInputOptions,
7412
+ ): Promise<ImageInfoResponse>;
7407
7413
  /**
7408
7414
  * Begin applying a series of transformations to an image
7409
7415
  * @param stream The image bytes
7410
7416
  * @returns A transform handle
7411
7417
  */
7412
- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
7418
+ input(
7419
+ stream: ReadableStream<Uint8Array>,
7420
+ options?: ImageInputOptions,
7421
+ ): ImageTransformer;
7413
7422
  }
7414
7423
  export interface ImageTransformer {
7415
7424
  /**
@@ -7435,6 +7444,9 @@ export interface ImageTransformer {
7435
7444
  */
7436
7445
  output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
7437
7446
  }
7447
+ export type ImageTransformationOutputOptions = {
7448
+ encoding?: "base64";
7449
+ };
7438
7450
  export interface ImageTransformationResult {
7439
7451
  /**
7440
7452
  * The image as a response, ready to store in cache or return to users
@@ -7447,7 +7459,7 @@ export interface ImageTransformationResult {
7447
7459
  /**
7448
7460
  * The bytes of the response
7449
7461
  */
7450
- image(): ReadableStream<Uint8Array>;
7462
+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
7451
7463
  }
7452
7464
  export interface ImagesError extends Error {
7453
7465
  readonly code: number;
@@ -7731,7 +7743,7 @@ export declare namespace TailStream {
7731
7743
  readonly type: "fetch";
7732
7744
  readonly method: string;
7733
7745
  readonly url: string;
7734
- readonly cfJson: string;
7746
+ readonly cfJson?: object;
7735
7747
  readonly headers: Header[];
7736
7748
  }
7737
7749
  interface JsRpcEventInfo {
@@ -7866,7 +7878,7 @@ export declare namespace TailStream {
7866
7878
  interface Log {
7867
7879
  readonly type: "log";
7868
7880
  readonly level: "debug" | "error" | "info" | "log" | "warn";
7869
- readonly message: string;
7881
+ readonly message: object;
7870
7882
  }
7871
7883
  interface Return {
7872
7884
  readonly type: "return";
@@ -7390,6 +7390,9 @@ type ImageDrawOptions = {
7390
7390
  bottom?: number;
7391
7391
  right?: number;
7392
7392
  };
7393
+ type ImageInputOptions = {
7394
+ encoding?: "base64";
7395
+ };
7393
7396
  type ImageOutputOptions = {
7394
7397
  format:
7395
7398
  | "image/jpeg"
@@ -7408,13 +7411,19 @@ interface ImagesBinding {
7408
7411
  * @throws {@link ImagesError} with code 9412 if input is not an image
7409
7412
  * @param stream The image bytes
7410
7413
  */
7411
- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
7414
+ info(
7415
+ stream: ReadableStream<Uint8Array>,
7416
+ options?: ImageInputOptions,
7417
+ ): Promise<ImageInfoResponse>;
7412
7418
  /**
7413
7419
  * Begin applying a series of transformations to an image
7414
7420
  * @param stream The image bytes
7415
7421
  * @returns A transform handle
7416
7422
  */
7417
- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
7423
+ input(
7424
+ stream: ReadableStream<Uint8Array>,
7425
+ options?: ImageInputOptions,
7426
+ ): ImageTransformer;
7418
7427
  }
7419
7428
  interface ImageTransformer {
7420
7429
  /**
@@ -7440,6 +7449,9 @@ interface ImageTransformer {
7440
7449
  */
7441
7450
  output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
7442
7451
  }
7452
+ type ImageTransformationOutputOptions = {
7453
+ encoding?: "base64";
7454
+ };
7443
7455
  interface ImageTransformationResult {
7444
7456
  /**
7445
7457
  * The image as a response, ready to store in cache or return to users
@@ -7452,7 +7464,7 @@ interface ImageTransformationResult {
7452
7464
  /**
7453
7465
  * The bytes of the response
7454
7466
  */
7455
- image(): ReadableStream<Uint8Array>;
7467
+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
7456
7468
  }
7457
7469
  interface ImagesError extends Error {
7458
7470
  readonly code: number;
@@ -7894,7 +7906,7 @@ declare namespace TailStream {
7894
7906
  readonly type: "fetch";
7895
7907
  readonly method: string;
7896
7908
  readonly url: string;
7897
- readonly cfJson: string;
7909
+ readonly cfJson?: object;
7898
7910
  readonly headers: Header[];
7899
7911
  }
7900
7912
  interface JsRpcEventInfo {
@@ -8029,7 +8041,7 @@ declare namespace TailStream {
8029
8041
  interface Log {
8030
8042
  readonly type: "log";
8031
8043
  readonly level: "debug" | "error" | "info" | "log" | "warn";
8032
- readonly message: string;
8044
+ readonly message: object;
8033
8045
  }
8034
8046
  interface Return {
8035
8047
  readonly type: "return";
@@ -7411,6 +7411,9 @@ export type ImageDrawOptions = {
7411
7411
  bottom?: number;
7412
7412
  right?: number;
7413
7413
  };
7414
+ export type ImageInputOptions = {
7415
+ encoding?: "base64";
7416
+ };
7414
7417
  export type ImageOutputOptions = {
7415
7418
  format:
7416
7419
  | "image/jpeg"
@@ -7429,13 +7432,19 @@ export interface ImagesBinding {
7429
7432
  * @throws {@link ImagesError} with code 9412 if input is not an image
7430
7433
  * @param stream The image bytes
7431
7434
  */
7432
- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
7435
+ info(
7436
+ stream: ReadableStream<Uint8Array>,
7437
+ options?: ImageInputOptions,
7438
+ ): Promise<ImageInfoResponse>;
7433
7439
  /**
7434
7440
  * Begin applying a series of transformations to an image
7435
7441
  * @param stream The image bytes
7436
7442
  * @returns A transform handle
7437
7443
  */
7438
- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
7444
+ input(
7445
+ stream: ReadableStream<Uint8Array>,
7446
+ options?: ImageInputOptions,
7447
+ ): ImageTransformer;
7439
7448
  }
7440
7449
  export interface ImageTransformer {
7441
7450
  /**
@@ -7461,6 +7470,9 @@ export interface ImageTransformer {
7461
7470
  */
7462
7471
  output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
7463
7472
  }
7473
+ export type ImageTransformationOutputOptions = {
7474
+ encoding?: "base64";
7475
+ };
7464
7476
  export interface ImageTransformationResult {
7465
7477
  /**
7466
7478
  * The image as a response, ready to store in cache or return to users
@@ -7473,7 +7485,7 @@ export interface ImageTransformationResult {
7473
7485
  /**
7474
7486
  * The bytes of the response
7475
7487
  */
7476
- image(): ReadableStream<Uint8Array>;
7488
+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
7477
7489
  }
7478
7490
  export interface ImagesError extends Error {
7479
7491
  readonly code: number;
@@ -7757,7 +7769,7 @@ export declare namespace TailStream {
7757
7769
  readonly type: "fetch";
7758
7770
  readonly method: string;
7759
7771
  readonly url: string;
7760
- readonly cfJson: string;
7772
+ readonly cfJson?: object;
7761
7773
  readonly headers: Header[];
7762
7774
  }
7763
7775
  interface JsRpcEventInfo {
@@ -7892,7 +7904,7 @@ export declare namespace TailStream {
7892
7904
  interface Log {
7893
7905
  readonly type: "log";
7894
7906
  readonly level: "debug" | "error" | "info" | "log" | "warn";
7895
- readonly message: string;
7907
+ readonly message: object;
7896
7908
  }
7897
7909
  interface Return {
7898
7910
  readonly type: "return";
@@ -7408,6 +7408,9 @@ type ImageDrawOptions = {
7408
7408
  bottom?: number;
7409
7409
  right?: number;
7410
7410
  };
7411
+ type ImageInputOptions = {
7412
+ encoding?: "base64";
7413
+ };
7411
7414
  type ImageOutputOptions = {
7412
7415
  format:
7413
7416
  | "image/jpeg"
@@ -7426,13 +7429,19 @@ interface ImagesBinding {
7426
7429
  * @throws {@link ImagesError} with code 9412 if input is not an image
7427
7430
  * @param stream The image bytes
7428
7431
  */
7429
- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
7432
+ info(
7433
+ stream: ReadableStream<Uint8Array>,
7434
+ options?: ImageInputOptions,
7435
+ ): Promise<ImageInfoResponse>;
7430
7436
  /**
7431
7437
  * Begin applying a series of transformations to an image
7432
7438
  * @param stream The image bytes
7433
7439
  * @returns A transform handle
7434
7440
  */
7435
- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
7441
+ input(
7442
+ stream: ReadableStream<Uint8Array>,
7443
+ options?: ImageInputOptions,
7444
+ ): ImageTransformer;
7436
7445
  }
7437
7446
  interface ImageTransformer {
7438
7447
  /**
@@ -7458,6 +7467,9 @@ interface ImageTransformer {
7458
7467
  */
7459
7468
  output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
7460
7469
  }
7470
+ type ImageTransformationOutputOptions = {
7471
+ encoding?: "base64";
7472
+ };
7461
7473
  interface ImageTransformationResult {
7462
7474
  /**
7463
7475
  * The image as a response, ready to store in cache or return to users
@@ -7470,7 +7482,7 @@ interface ImageTransformationResult {
7470
7482
  /**
7471
7483
  * The bytes of the response
7472
7484
  */
7473
- image(): ReadableStream<Uint8Array>;
7485
+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
7474
7486
  }
7475
7487
  interface ImagesError extends Error {
7476
7488
  readonly code: number;
@@ -7912,7 +7924,7 @@ declare namespace TailStream {
7912
7924
  readonly type: "fetch";
7913
7925
  readonly method: string;
7914
7926
  readonly url: string;
7915
- readonly cfJson: string;
7927
+ readonly cfJson?: object;
7916
7928
  readonly headers: Header[];
7917
7929
  }
7918
7930
  interface JsRpcEventInfo {
@@ -8047,7 +8059,7 @@ declare namespace TailStream {
8047
8059
  interface Log {
8048
8060
  readonly type: "log";
8049
8061
  readonly level: "debug" | "error" | "info" | "log" | "warn";
8050
- readonly message: string;
8062
+ readonly message: object;
8051
8063
  }
8052
8064
  interface Return {
8053
8065
  readonly type: "return";
@@ -7429,6 +7429,9 @@ export type ImageDrawOptions = {
7429
7429
  bottom?: number;
7430
7430
  right?: number;
7431
7431
  };
7432
+ export type ImageInputOptions = {
7433
+ encoding?: "base64";
7434
+ };
7432
7435
  export type ImageOutputOptions = {
7433
7436
  format:
7434
7437
  | "image/jpeg"
@@ -7447,13 +7450,19 @@ export interface ImagesBinding {
7447
7450
  * @throws {@link ImagesError} with code 9412 if input is not an image
7448
7451
  * @param stream The image bytes
7449
7452
  */
7450
- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
7453
+ info(
7454
+ stream: ReadableStream<Uint8Array>,
7455
+ options?: ImageInputOptions,
7456
+ ): Promise<ImageInfoResponse>;
7451
7457
  /**
7452
7458
  * Begin applying a series of transformations to an image
7453
7459
  * @param stream The image bytes
7454
7460
  * @returns A transform handle
7455
7461
  */
7456
- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
7462
+ input(
7463
+ stream: ReadableStream<Uint8Array>,
7464
+ options?: ImageInputOptions,
7465
+ ): ImageTransformer;
7457
7466
  }
7458
7467
  export interface ImageTransformer {
7459
7468
  /**
@@ -7479,6 +7488,9 @@ export interface ImageTransformer {
7479
7488
  */
7480
7489
  output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
7481
7490
  }
7491
+ export type ImageTransformationOutputOptions = {
7492
+ encoding?: "base64";
7493
+ };
7482
7494
  export interface ImageTransformationResult {
7483
7495
  /**
7484
7496
  * The image as a response, ready to store in cache or return to users
@@ -7491,7 +7503,7 @@ export interface ImageTransformationResult {
7491
7503
  /**
7492
7504
  * The bytes of the response
7493
7505
  */
7494
- image(): ReadableStream<Uint8Array>;
7506
+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
7495
7507
  }
7496
7508
  export interface ImagesError extends Error {
7497
7509
  readonly code: number;
@@ -7775,7 +7787,7 @@ export declare namespace TailStream {
7775
7787
  readonly type: "fetch";
7776
7788
  readonly method: string;
7777
7789
  readonly url: string;
7778
- readonly cfJson: string;
7790
+ readonly cfJson?: object;
7779
7791
  readonly headers: Header[];
7780
7792
  }
7781
7793
  interface JsRpcEventInfo {
@@ -7910,7 +7922,7 @@ export declare namespace TailStream {
7910
7922
  interface Log {
7911
7923
  readonly type: "log";
7912
7924
  readonly level: "debug" | "error" | "info" | "log" | "warn";
7913
- readonly message: string;
7925
+ readonly message: object;
7914
7926
  }
7915
7927
  interface Return {
7916
7928
  readonly type: "return";
@@ -7409,6 +7409,9 @@ type ImageDrawOptions = {
7409
7409
  bottom?: number;
7410
7410
  right?: number;
7411
7411
  };
7412
+ type ImageInputOptions = {
7413
+ encoding?: "base64";
7414
+ };
7412
7415
  type ImageOutputOptions = {
7413
7416
  format:
7414
7417
  | "image/jpeg"
@@ -7427,13 +7430,19 @@ interface ImagesBinding {
7427
7430
  * @throws {@link ImagesError} with code 9412 if input is not an image
7428
7431
  * @param stream The image bytes
7429
7432
  */
7430
- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
7433
+ info(
7434
+ stream: ReadableStream<Uint8Array>,
7435
+ options?: ImageInputOptions,
7436
+ ): Promise<ImageInfoResponse>;
7431
7437
  /**
7432
7438
  * Begin applying a series of transformations to an image
7433
7439
  * @param stream The image bytes
7434
7440
  * @returns A transform handle
7435
7441
  */
7436
- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
7442
+ input(
7443
+ stream: ReadableStream<Uint8Array>,
7444
+ options?: ImageInputOptions,
7445
+ ): ImageTransformer;
7437
7446
  }
7438
7447
  interface ImageTransformer {
7439
7448
  /**
@@ -7459,6 +7468,9 @@ interface ImageTransformer {
7459
7468
  */
7460
7469
  output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
7461
7470
  }
7471
+ type ImageTransformationOutputOptions = {
7472
+ encoding?: "base64";
7473
+ };
7462
7474
  interface ImageTransformationResult {
7463
7475
  /**
7464
7476
  * The image as a response, ready to store in cache or return to users
@@ -7471,7 +7483,7 @@ interface ImageTransformationResult {
7471
7483
  /**
7472
7484
  * The bytes of the response
7473
7485
  */
7474
- image(): ReadableStream<Uint8Array>;
7486
+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
7475
7487
  }
7476
7488
  interface ImagesError extends Error {
7477
7489
  readonly code: number;
@@ -7913,7 +7925,7 @@ declare namespace TailStream {
7913
7925
  readonly type: "fetch";
7914
7926
  readonly method: string;
7915
7927
  readonly url: string;
7916
- readonly cfJson: string;
7928
+ readonly cfJson?: object;
7917
7929
  readonly headers: Header[];
7918
7930
  }
7919
7931
  interface JsRpcEventInfo {
@@ -8048,7 +8060,7 @@ declare namespace TailStream {
8048
8060
  interface Log {
8049
8061
  readonly type: "log";
8050
8062
  readonly level: "debug" | "error" | "info" | "log" | "warn";
8051
- readonly message: string;
8063
+ readonly message: object;
8052
8064
  }
8053
8065
  interface Return {
8054
8066
  readonly type: "return";
@@ -7430,6 +7430,9 @@ export type ImageDrawOptions = {
7430
7430
  bottom?: number;
7431
7431
  right?: number;
7432
7432
  };
7433
+ export type ImageInputOptions = {
7434
+ encoding?: "base64";
7435
+ };
7433
7436
  export type ImageOutputOptions = {
7434
7437
  format:
7435
7438
  | "image/jpeg"
@@ -7448,13 +7451,19 @@ export interface ImagesBinding {
7448
7451
  * @throws {@link ImagesError} with code 9412 if input is not an image
7449
7452
  * @param stream The image bytes
7450
7453
  */
7451
- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
7454
+ info(
7455
+ stream: ReadableStream<Uint8Array>,
7456
+ options?: ImageInputOptions,
7457
+ ): Promise<ImageInfoResponse>;
7452
7458
  /**
7453
7459
  * Begin applying a series of transformations to an image
7454
7460
  * @param stream The image bytes
7455
7461
  * @returns A transform handle
7456
7462
  */
7457
- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
7463
+ input(
7464
+ stream: ReadableStream<Uint8Array>,
7465
+ options?: ImageInputOptions,
7466
+ ): ImageTransformer;
7458
7467
  }
7459
7468
  export interface ImageTransformer {
7460
7469
  /**
@@ -7480,6 +7489,9 @@ export interface ImageTransformer {
7480
7489
  */
7481
7490
  output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
7482
7491
  }
7492
+ export type ImageTransformationOutputOptions = {
7493
+ encoding?: "base64";
7494
+ };
7483
7495
  export interface ImageTransformationResult {
7484
7496
  /**
7485
7497
  * The image as a response, ready to store in cache or return to users
@@ -7492,7 +7504,7 @@ export interface ImageTransformationResult {
7492
7504
  /**
7493
7505
  * The bytes of the response
7494
7506
  */
7495
- image(): ReadableStream<Uint8Array>;
7507
+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
7496
7508
  }
7497
7509
  export interface ImagesError extends Error {
7498
7510
  readonly code: number;
@@ -7776,7 +7788,7 @@ export declare namespace TailStream {
7776
7788
  readonly type: "fetch";
7777
7789
  readonly method: string;
7778
7790
  readonly url: string;
7779
- readonly cfJson: string;
7791
+ readonly cfJson?: object;
7780
7792
  readonly headers: Header[];
7781
7793
  }
7782
7794
  interface JsRpcEventInfo {
@@ -7911,7 +7923,7 @@ export declare namespace TailStream {
7911
7923
  interface Log {
7912
7924
  readonly type: "log";
7913
7925
  readonly level: "debug" | "error" | "info" | "log" | "warn";
7914
- readonly message: string;
7926
+ readonly message: object;
7915
7927
  }
7916
7928
  interface Return {
7917
7929
  readonly type: "return";
@@ -7413,6 +7413,9 @@ type ImageDrawOptions = {
7413
7413
  bottom?: number;
7414
7414
  right?: number;
7415
7415
  };
7416
+ type ImageInputOptions = {
7417
+ encoding?: "base64";
7418
+ };
7416
7419
  type ImageOutputOptions = {
7417
7420
  format:
7418
7421
  | "image/jpeg"
@@ -7431,13 +7434,19 @@ interface ImagesBinding {
7431
7434
  * @throws {@link ImagesError} with code 9412 if input is not an image
7432
7435
  * @param stream The image bytes
7433
7436
  */
7434
- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
7437
+ info(
7438
+ stream: ReadableStream<Uint8Array>,
7439
+ options?: ImageInputOptions,
7440
+ ): Promise<ImageInfoResponse>;
7435
7441
  /**
7436
7442
  * Begin applying a series of transformations to an image
7437
7443
  * @param stream The image bytes
7438
7444
  * @returns A transform handle
7439
7445
  */
7440
- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
7446
+ input(
7447
+ stream: ReadableStream<Uint8Array>,
7448
+ options?: ImageInputOptions,
7449
+ ): ImageTransformer;
7441
7450
  }
7442
7451
  interface ImageTransformer {
7443
7452
  /**
@@ -7463,6 +7472,9 @@ interface ImageTransformer {
7463
7472
  */
7464
7473
  output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
7465
7474
  }
7475
+ type ImageTransformationOutputOptions = {
7476
+ encoding?: "base64";
7477
+ };
7466
7478
  interface ImageTransformationResult {
7467
7479
  /**
7468
7480
  * The image as a response, ready to store in cache or return to users
@@ -7475,7 +7487,7 @@ interface ImageTransformationResult {
7475
7487
  /**
7476
7488
  * The bytes of the response
7477
7489
  */
7478
- image(): ReadableStream<Uint8Array>;
7490
+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
7479
7491
  }
7480
7492
  interface ImagesError extends Error {
7481
7493
  readonly code: number;
@@ -7917,7 +7929,7 @@ declare namespace TailStream {
7917
7929
  readonly type: "fetch";
7918
7930
  readonly method: string;
7919
7931
  readonly url: string;
7920
- readonly cfJson: string;
7932
+ readonly cfJson?: object;
7921
7933
  readonly headers: Header[];
7922
7934
  }
7923
7935
  interface JsRpcEventInfo {
@@ -8052,7 +8064,7 @@ declare namespace TailStream {
8052
8064
  interface Log {
8053
8065
  readonly type: "log";
8054
8066
  readonly level: "debug" | "error" | "info" | "log" | "warn";
8055
- readonly message: string;
8067
+ readonly message: object;
8056
8068
  }
8057
8069
  interface Return {
8058
8070
  readonly type: "return";
@@ -7434,6 +7434,9 @@ export type ImageDrawOptions = {
7434
7434
  bottom?: number;
7435
7435
  right?: number;
7436
7436
  };
7437
+ export type ImageInputOptions = {
7438
+ encoding?: "base64";
7439
+ };
7437
7440
  export type ImageOutputOptions = {
7438
7441
  format:
7439
7442
  | "image/jpeg"
@@ -7452,13 +7455,19 @@ export interface ImagesBinding {
7452
7455
  * @throws {@link ImagesError} with code 9412 if input is not an image
7453
7456
  * @param stream The image bytes
7454
7457
  */
7455
- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
7458
+ info(
7459
+ stream: ReadableStream<Uint8Array>,
7460
+ options?: ImageInputOptions,
7461
+ ): Promise<ImageInfoResponse>;
7456
7462
  /**
7457
7463
  * Begin applying a series of transformations to an image
7458
7464
  * @param stream The image bytes
7459
7465
  * @returns A transform handle
7460
7466
  */
7461
- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
7467
+ input(
7468
+ stream: ReadableStream<Uint8Array>,
7469
+ options?: ImageInputOptions,
7470
+ ): ImageTransformer;
7462
7471
  }
7463
7472
  export interface ImageTransformer {
7464
7473
  /**
@@ -7484,6 +7493,9 @@ export interface ImageTransformer {
7484
7493
  */
7485
7494
  output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
7486
7495
  }
7496
+ export type ImageTransformationOutputOptions = {
7497
+ encoding?: "base64";
7498
+ };
7487
7499
  export interface ImageTransformationResult {
7488
7500
  /**
7489
7501
  * The image as a response, ready to store in cache or return to users
@@ -7496,7 +7508,7 @@ export interface ImageTransformationResult {
7496
7508
  /**
7497
7509
  * The bytes of the response
7498
7510
  */
7499
- image(): ReadableStream<Uint8Array>;
7511
+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
7500
7512
  }
7501
7513
  export interface ImagesError extends Error {
7502
7514
  readonly code: number;
@@ -7780,7 +7792,7 @@ export declare namespace TailStream {
7780
7792
  readonly type: "fetch";
7781
7793
  readonly method: string;
7782
7794
  readonly url: string;
7783
- readonly cfJson: string;
7795
+ readonly cfJson?: object;
7784
7796
  readonly headers: Header[];
7785
7797
  }
7786
7798
  interface JsRpcEventInfo {
@@ -7915,7 +7927,7 @@ export declare namespace TailStream {
7915
7927
  interface Log {
7916
7928
  readonly type: "log";
7917
7929
  readonly level: "debug" | "error" | "info" | "log" | "warn";
7918
- readonly message: string;
7930
+ readonly message: object;
7919
7931
  }
7920
7932
  interface Return {
7921
7933
  readonly type: "return";