@cloudflare/workers-types 4.20260616.1 → 4.20260619.1

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/latest/index.d.ts CHANGED
@@ -480,7 +480,8 @@ interface ExecutionContext<Props = unknown> {
480
480
  readonly exports: Cloudflare.Exports;
481
481
  readonly props: Props;
482
482
  cache?: CacheContext;
483
- tracing?: Tracing;
483
+ readonly access?: CloudflareAccessContext;
484
+ tracing: Tracing;
484
485
  }
485
486
  type ExportedHandlerFetchHandler<
486
487
  Env = unknown,
@@ -581,6 +582,10 @@ interface CachePurgeOptions {
581
582
  interface CacheContext {
582
583
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
583
584
  }
585
+ interface CloudflareAccessContext {
586
+ readonly aud: string;
587
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
588
+ }
584
589
  declare abstract class ColoLocalActorNamespace {
585
590
  get(actorId: string): Fetcher;
586
591
  }
@@ -646,6 +651,8 @@ type DurableObjectLocationHint =
646
651
  | "weur"
647
652
  | "eeur"
648
653
  | "apac"
654
+ | "apac-ne"
655
+ | "apac-se"
649
656
  | "oc"
650
657
  | "afr"
651
658
  | "me";
@@ -788,6 +795,7 @@ interface DurableObjectFacets {
788
795
  ): Fetcher<T>;
789
796
  abort(name: string, reason: any): void;
790
797
  delete(name: string): void;
798
+ clone(src: string, dst: string): void;
791
799
  }
792
800
  interface FacetStartupOptions<
793
801
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3849,6 +3857,28 @@ interface EventSourceEventSourceInit {
3849
3857
  withCredentials?: boolean;
3850
3858
  fetcher?: Fetcher;
3851
3859
  }
3860
+ interface ExecOutput {
3861
+ readonly stdout: ArrayBuffer;
3862
+ readonly stderr: ArrayBuffer;
3863
+ readonly exitCode: number;
3864
+ }
3865
+ interface ContainerExecOptions {
3866
+ cwd?: string;
3867
+ env?: Record<string, string>;
3868
+ user?: string;
3869
+ stdin?: ReadableStream | "pipe";
3870
+ stdout?: "pipe" | "ignore";
3871
+ stderr?: "pipe" | "ignore" | "combined";
3872
+ }
3873
+ interface ExecProcess {
3874
+ readonly stdin: WritableStream | null;
3875
+ readonly stdout: ReadableStream | null;
3876
+ readonly stderr: ReadableStream | null;
3877
+ readonly pid: number;
3878
+ readonly exitCode: Promise<number>;
3879
+ output(): Promise<ExecOutput>;
3880
+ kill(signal?: number): void;
3881
+ }
3852
3882
  interface Container {
3853
3883
  get running(): boolean;
3854
3884
  start(options?: ContainerStartupOptions): void;
@@ -3866,6 +3896,7 @@ interface Container {
3866
3896
  options: ContainerSnapshotOptions,
3867
3897
  ): Promise<ContainerSnapshot>;
3868
3898
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3899
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3869
3900
  }
3870
3901
  interface ContainerDirectorySnapshot {
3871
3902
  id: string;
@@ -4060,11 +4091,62 @@ interface Tracing {
4060
4091
  callback: (span: Span, ...args: A) => T,
4061
4092
  ...args: A
4062
4093
  ): T;
4094
+ startActiveSpan<T, A extends unknown[]>(
4095
+ name: string,
4096
+ callback: (span: Span, ...args: A) => T,
4097
+ ...args: A
4098
+ ): T;
4063
4099
  Span: typeof Span;
4064
4100
  }
4065
4101
  declare abstract class Span {
4066
4102
  get isTraced(): boolean;
4067
4103
  setAttribute(key: string, value?: boolean | number | string): void;
4104
+ end(): void;
4105
+ }
4106
+ /**
4107
+ * Represents the identity of a user authenticated via Cloudflare Access.
4108
+ * This matches the result of calling /cdn-cgi/access/get-identity.
4109
+ *
4110
+ * The exact structure of the returned object depends on the identity provider
4111
+ * configuration for the Access application. The fields below represent commonly
4112
+ * available properties, but additional provider-specific fields may be present.
4113
+ */
4114
+ interface CloudflareAccessIdentity extends Record<string, unknown> {
4115
+ /** The user's email address, if available from the identity provider. */
4116
+ email?: string;
4117
+ /** The user's display name. */
4118
+ name?: string;
4119
+ /** The user's unique identifier. */
4120
+ user_uuid?: string;
4121
+ /** The Cloudflare account ID. */
4122
+ account_id?: string;
4123
+ /** Login timestamp (Unix epoch seconds). */
4124
+ iat?: number;
4125
+ /** The user's IP address at authentication time. */
4126
+ ip?: string;
4127
+ /** Authentication methods used (e.g., "pwd"). */
4128
+ amr?: string[];
4129
+ /** Identity provider information. */
4130
+ idp?: {
4131
+ id: string;
4132
+ type: string;
4133
+ };
4134
+ /** Geographic information about where the user authenticated. */
4135
+ geo?: {
4136
+ country: string;
4137
+ };
4138
+ /** Group memberships from the identity provider. */
4139
+ groups?: Array<{
4140
+ id: string;
4141
+ name: string;
4142
+ email?: string;
4143
+ }>;
4144
+ /** Device posture check results, keyed by check ID. */
4145
+ devicePosture?: Record<string, unknown>;
4146
+ /** True if the user connected via Cloudflare WARP. */
4147
+ is_warp?: boolean;
4148
+ /** True if the user is authenticated via Cloudflare Gateway. */
4149
+ is_gateway?: boolean;
4068
4150
  }
4069
4151
  // ============================================================================
4070
4152
  // Agent Memory
@@ -12215,87 +12297,6 @@ declare abstract class BrowserRun {
12215
12297
  options: BrowserRunMarkdownOptions,
12216
12298
  ): Promise<Response>;
12217
12299
  }
12218
- interface BasicImageTransformations {
12219
- /**
12220
- * Maximum width in image pixels. The value must be an integer.
12221
- */
12222
- width?: number;
12223
- /**
12224
- * Maximum height in image pixels. The value must be an integer.
12225
- */
12226
- height?: number;
12227
- /**
12228
- * Resizing mode as a string. It affects interpretation of width and height
12229
- * options:
12230
- * - scale-down: Similar to contain, but the image is never enlarged. If
12231
- * the image is larger than given width or height, it will be resized.
12232
- * Otherwise its original size will be kept.
12233
- * - contain: Resizes to maximum size that fits within the given width and
12234
- * height. If only a single dimension is given (e.g. only width), the
12235
- * image will be shrunk or enlarged to exactly match that dimension.
12236
- * Aspect ratio is always preserved.
12237
- * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12238
- * and height. If the image has an aspect ratio different from the ratio
12239
- * of width and height, it will be cropped to fit.
12240
- * - crop: The image will be shrunk and cropped to fit within the area
12241
- * specified by width and height. The image will not be enlarged. For images
12242
- * smaller than the given dimensions it's the same as scale-down. For
12243
- * images larger than the given dimensions, it's the same as cover.
12244
- * See also trim.
12245
- * - pad: Resizes to the maximum size that fits within the given width and
12246
- * height, and then fills the remaining area with a background color
12247
- * (white by default). Use of this mode is not recommended, as the same
12248
- * effect can be more efficiently achieved with the contain mode and the
12249
- * CSS object-fit: contain property.
12250
- * - squeeze: Stretches and deforms to the width and height given, even if it
12251
- * breaks aspect ratio
12252
- */
12253
- fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
12254
- /**
12255
- * Image segmentation using artificial intelligence models. Sets pixels not
12256
- * within selected segment area to transparent e.g "foreground" sets every
12257
- * background pixel as transparent.
12258
- */
12259
- segment?: "foreground";
12260
- /**
12261
- * When cropping with fit: "cover", this defines the side or point that should
12262
- * be left uncropped. The value is either a string
12263
- * "left", "right", "top", "bottom", "auto", or "center" (the default),
12264
- * or an object {x, y} containing focal point coordinates in the original
12265
- * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12266
- * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12267
- * crop bottom or left and right sides as necessary, but won’t crop anything
12268
- * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12269
- * preserve as much as possible around a point at 20% of the height of the
12270
- * source image.
12271
- */
12272
- gravity?:
12273
- | "face"
12274
- | "left"
12275
- | "right"
12276
- | "top"
12277
- | "bottom"
12278
- | "center"
12279
- | "auto"
12280
- | "entropy"
12281
- | BasicImageTransformationsGravityCoordinates;
12282
- /**
12283
- * Background color to add underneath the image. Applies only to images with
12284
- * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12285
- * hsl(…), etc.)
12286
- */
12287
- background?: string;
12288
- /**
12289
- * Number of degrees (90, 180, 270) to rotate the image by. width and height
12290
- * options refer to axes after rotation.
12291
- */
12292
- rotate?: 0 | 90 | 180 | 270 | 360;
12293
- }
12294
- interface BasicImageTransformationsGravityCoordinates {
12295
- x?: number;
12296
- y?: number;
12297
- mode?: "remainder" | "box-center";
12298
- }
12299
12300
  /**
12300
12301
  * In addition to the properties you can set in the RequestInit dict
12301
12302
  * that you pass as an argument to the Request constructor, you can
@@ -12371,6 +12372,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12371
12372
  cacheReserveMinimumFileSize?: number;
12372
12373
  scrapeShield?: boolean;
12373
12374
  apps?: boolean;
12375
+ /**
12376
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12377
+ * converted to gRPC at the Cloudflare edge.
12378
+ *
12379
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12380
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12381
+ *
12382
+ * Provides per-request control over the same edge conversion behavior
12383
+ * gated by the `auto_grpc_convert` compatibility flag.
12384
+ */
12385
+ grpcWeb?: "passthrough" | "convert";
12374
12386
  image?: RequestInitCfPropertiesImage;
12375
12387
  minify?: RequestInitCfPropertiesImageMinify;
12376
12388
  mirage?: boolean;
@@ -12391,6 +12403,209 @@ interface RequestInitCfProperties extends Record<string, unknown> {
12391
12403
  */
12392
12404
  resolveOverride?: string;
12393
12405
  }
12406
+ interface BasicImageTransformations {
12407
+ /**
12408
+ * Maximum width in image pixels. The value must be an integer.
12409
+ */
12410
+ width?: number;
12411
+ /**
12412
+ * Maximum height in image pixels. The value must be an integer.
12413
+ */
12414
+ height?: number;
12415
+ /**
12416
+ * When cropping with fit: "cover", this defines the side or point that should
12417
+ * be left uncropped. The value is either a string
12418
+ * "left", "right", "top", "bottom", "auto", or "center" (the default),
12419
+ * or an object {x, y} containing focal point coordinates in the original
12420
+ * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12421
+ * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12422
+ * crop bottom or left and right sides as necessary, but won’t crop anything
12423
+ * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12424
+ * preserve as much as possible around a point at 20% of the height of the
12425
+ * source image.
12426
+ */
12427
+ gravity?:
12428
+ | "face"
12429
+ | "left"
12430
+ | "right"
12431
+ | "top"
12432
+ | "bottom"
12433
+ | "center"
12434
+ | "auto"
12435
+ | "entropy"
12436
+ | BasicImageTransformationsGravityCoordinates;
12437
+ /**
12438
+ * Specifies how closely the image is cropped toward detected faces when combined
12439
+ * with the gravity=face option. Accepts a valid range between 0.0 (includes as much
12440
+ * of the background as possible) and 1.0 (crops the image as closely to the face as
12441
+ * possible). The default is 0.
12442
+ */
12443
+ zoom?: number;
12444
+ /**
12445
+ * Resizing mode as a string. It affects interpretation of width and height
12446
+ * options:
12447
+ * - scale-down: Similar to contain, but the image is never enlarged. If
12448
+ * the image is larger than given width or height, it will be resized.
12449
+ * Otherwise its original size will be kept.
12450
+ * - scale-up: Similar to contain, but the image is never shrunk. If the
12451
+ * image is smaller than the given width or height, it will be resized.
12452
+ * Otherwise its original size will be kept.
12453
+ * - contain: Resizes to maximum size that fits within the given width and
12454
+ * height. If only a single dimension is given (e.g. only width), the
12455
+ * image will be shrunk or enlarged to exactly match that dimension.
12456
+ * Aspect ratio is always preserved.
12457
+ * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12458
+ * and height. If the image has an aspect ratio different from the ratio
12459
+ * of width and height, it will be cropped to fit.
12460
+ * - crop: The image will be shrunk and cropped to fit within the area
12461
+ * specified by width and height. The image will not be enlarged. For images
12462
+ * smaller than the given dimensions it's the same as scale-down. For
12463
+ * images larger than the given dimensions, it's the same as cover.
12464
+ * See also trim.
12465
+ * - pad: Resizes to the maximum size that fits within the given width and
12466
+ * height, and then fills the remaining area with a background color
12467
+ * (white by default). Use of this mode is not recommended, as the same
12468
+ * effect can be more efficiently achieved with the contain mode and the
12469
+ * CSS object-fit: contain property.
12470
+ * - squeeze: Stretches and deforms to the width and height given, even if it
12471
+ * breaks aspect ratio
12472
+ */
12473
+ fit?:
12474
+ | "scale-down"
12475
+ | "scale-up"
12476
+ | "contain"
12477
+ | "cover"
12478
+ | "crop"
12479
+ | "pad"
12480
+ | "squeeze";
12481
+ /**
12482
+ * Allows you to trim your image. Takes dpr into account and is performed before
12483
+ * resizing or rotation.
12484
+ *
12485
+ * It can be used as:
12486
+ * - left, top, right, bottom - it will specify the number of pixels to cut
12487
+ * off each side
12488
+ * - width, height - the width/height you'd like to end up with - can be used
12489
+ * in combination with the properties above
12490
+ * - border - this will automatically trim the surroundings of an image based on
12491
+ * it's color. It consists of three properties:
12492
+ * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12493
+ * - tolerance: difference from color to treat as color
12494
+ * - keep: the number of pixels of border to keep
12495
+ */
12496
+ trim?:
12497
+ | "border"
12498
+ | {
12499
+ top?: number;
12500
+ bottom?: number;
12501
+ left?: number;
12502
+ right?: number;
12503
+ width?: number;
12504
+ height?: number;
12505
+ border?:
12506
+ | boolean
12507
+ | {
12508
+ color?: string;
12509
+ tolerance?: number;
12510
+ keep?: number;
12511
+ };
12512
+ };
12513
+ /**
12514
+ * Background color to add underneath the image. Applies only to images with
12515
+ * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12516
+ * hsl(…), etc.)
12517
+ */
12518
+ background?: string;
12519
+ /**
12520
+ * Flips the images horizontally, vertically, or both. Flipping is applied before
12521
+ * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12522
+ * horizontally, then rotated by 90 degrees.
12523
+ */
12524
+ flip?: "h" | "v" | "hv";
12525
+ /**
12526
+ * Number of degrees (90, 180, 270) to rotate the image by. width and height
12527
+ * options refer to axes after rotation.
12528
+ */
12529
+ rotate?: 0 | 90 | 180 | 270 | 360;
12530
+ /**
12531
+ * Strength of sharpening filter to apply to the image. Floating-point
12532
+ * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12533
+ * recommended value for downscaled images.
12534
+ */
12535
+ sharpen?: number;
12536
+ /**
12537
+ * Radius of a blur filter (approximate gaussian). Maximum supported radius
12538
+ * is 250.
12539
+ */
12540
+ blur?: number;
12541
+ /**
12542
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12543
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12544
+ * ignored.
12545
+ */
12546
+ contrast?: number;
12547
+ /**
12548
+ * Increase brightness by a factor. A value of 1.0 equals no change, a value
12549
+ * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12550
+ * 0 is ignored.
12551
+ */
12552
+ brightness?: number;
12553
+ /**
12554
+ * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12555
+ * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12556
+ */
12557
+ gamma?: number;
12558
+ /**
12559
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12560
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12561
+ * ignored.
12562
+ */
12563
+ saturation?: number;
12564
+ /**
12565
+ * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12566
+ * easier to specify higher-DPI sizes in <img srcset>.
12567
+ */
12568
+ dpr?: number;
12569
+ /**
12570
+ * Adds a border around the image. The border is added after resizing. Border
12571
+ * width takes dpr into account, and can be specified either using a single
12572
+ * width property, or individually for each side.
12573
+ */
12574
+ border?:
12575
+ | {
12576
+ color: string;
12577
+ width: number;
12578
+ }
12579
+ | {
12580
+ color: string;
12581
+ top: number;
12582
+ right: number;
12583
+ bottom: number;
12584
+ left: number;
12585
+ };
12586
+ /**
12587
+ * Image segmentation using artificial intelligence models. Sets pixels not
12588
+ * within selected segment area to transparent e.g "foreground" sets every
12589
+ * background pixel as transparent.
12590
+ */
12591
+ segment?: "foreground";
12592
+ /**
12593
+ * Controls the algorithm used when an image needs to be enlarged. This
12594
+ * parameter works with any fit mode that upscales, such as `contain`,
12595
+ * `cover`, and `scale-up`. It has no effect when `fit=scale-down` or when
12596
+ * the target dimensions are smaller than the source.
12597
+ * - interpolate: Uses bicubic interpolation, which may reduce image quality.
12598
+ * This is the default behavior when `upscale` is not specified.
12599
+ * - generate: Uses AI upscaling to produce sharper, more detailed results
12600
+ * when enlarging images.
12601
+ */
12602
+ upscale?: "interpolate" | "generate";
12603
+ }
12604
+ interface BasicImageTransformationsGravityCoordinates {
12605
+ x?: number;
12606
+ y?: number;
12607
+ mode?: "remainder" | "box-center";
12608
+ }
12394
12609
  interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12395
12610
  /**
12396
12611
  * Absolute URL of the image file to use for the drawing. It can be any of
@@ -12444,43 +12659,6 @@ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12444
12659
  right?: number;
12445
12660
  }
12446
12661
  interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12447
- /**
12448
- * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12449
- * easier to specify higher-DPI sizes in <img srcset>.
12450
- */
12451
- dpr?: number;
12452
- /**
12453
- * Allows you to trim your image. Takes dpr into account and is performed before
12454
- * resizing or rotation.
12455
- *
12456
- * It can be used as:
12457
- * - left, top, right, bottom - it will specify the number of pixels to cut
12458
- * off each side
12459
- * - width, height - the width/height you'd like to end up with - can be used
12460
- * in combination with the properties above
12461
- * - border - this will automatically trim the surroundings of an image based on
12462
- * it's color. It consists of three properties:
12463
- * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12464
- * - tolerance: difference from color to treat as color
12465
- * - keep: the number of pixels of border to keep
12466
- */
12467
- trim?:
12468
- | "border"
12469
- | {
12470
- top?: number;
12471
- bottom?: number;
12472
- left?: number;
12473
- right?: number;
12474
- width?: number;
12475
- height?: number;
12476
- border?:
12477
- | boolean
12478
- | {
12479
- color?: string;
12480
- tolerance?: number;
12481
- keep?: number;
12482
- };
12483
- };
12484
12662
  /**
12485
12663
  * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
12486
12664
  * make images look worse, but load faster. The default is 85. It applies only
@@ -12530,17 +12708,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12530
12708
  * output formats always discard metadata.
12531
12709
  */
12532
12710
  metadata?: "keep" | "copyright" | "none";
12533
- /**
12534
- * Strength of sharpening filter to apply to the image. Floating-point
12535
- * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12536
- * recommended value for downscaled images.
12537
- */
12538
- sharpen?: number;
12539
- /**
12540
- * Radius of a blur filter (approximate gaussian). Maximum supported radius
12541
- * is 250.
12542
- */
12543
- blur?: number;
12544
12711
  /**
12545
12712
  * Overlays are drawn in the order they appear in the array (last array
12546
12713
  * entry is the topmost layer).
@@ -12552,52 +12719,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12552
12719
  * the origin.
12553
12720
  */
12554
12721
  "origin-auth"?: "share-publicly";
12555
- /**
12556
- * Adds a border around the image. The border is added after resizing. Border
12557
- * width takes dpr into account, and can be specified either using a single
12558
- * width property, or individually for each side.
12559
- */
12560
- border?:
12561
- | {
12562
- color: string;
12563
- width: number;
12564
- }
12565
- | {
12566
- color: string;
12567
- top: number;
12568
- right: number;
12569
- bottom: number;
12570
- left: number;
12571
- };
12572
- /**
12573
- * Increase brightness by a factor. A value of 1.0 equals no change, a value
12574
- * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12575
- * 0 is ignored.
12576
- */
12577
- brightness?: number;
12578
- /**
12579
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12580
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12581
- * ignored.
12582
- */
12583
- contrast?: number;
12584
- /**
12585
- * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12586
- * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12587
- */
12588
- gamma?: number;
12589
- /**
12590
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12591
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12592
- * ignored.
12593
- */
12594
- saturation?: number;
12595
- /**
12596
- * Flips the images horizontally, vertically, or both. Flipping is applied before
12597
- * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12598
- * horizontally, then rotated by 90 degrees.
12599
- */
12600
- flip?: "h" | "v" | "hv";
12601
12722
  /**
12602
12723
  * Slightly reduces latency on a cache miss by selecting a
12603
12724
  * quickest-to-compress file format, at a cost of increased file size and
@@ -14537,6 +14658,10 @@ declare namespace CloudflareWorkersModule {
14537
14658
  timeout?: WorkflowTimeoutDuration | number;
14538
14659
  sensitive?: WorkflowStepSensitivity;
14539
14660
  };
14661
+ export type WorkflowStepRollbackConfig = Pick<
14662
+ WorkflowStepConfig,
14663
+ "retries" | "timeout"
14664
+ >;
14540
14665
  export type WorkflowCronSchedule = {
14541
14666
  /** Cron expression that triggered this event. */
14542
14667
  cron: string;
@@ -14565,16 +14690,18 @@ declare namespace CloudflareWorkersModule {
14565
14690
  config: WorkflowStepConfig;
14566
14691
  };
14567
14692
  export type WorkflowRollbackContext<T = unknown> = {
14693
+ ctx: WorkflowStepContext;
14568
14694
  error: Error;
14569
14695
  output: T | undefined;
14696
+ /** @deprecated Use `ctx.step.name` and `ctx.step.count` instead. */
14570
14697
  stepName: string;
14571
14698
  };
14572
14699
  export type WorkflowRollbackHandler<T = unknown> = (
14573
14700
  ctx: WorkflowRollbackContext<T>,
14574
14701
  ) => Promise<void>;
14575
14702
  export type WorkflowStepRollbackOptions<T = unknown> = {
14576
- rollback?: WorkflowRollbackHandler<T>;
14577
- rollbackConfig?: WorkflowStepConfig;
14703
+ rollback: WorkflowRollbackHandler<T>;
14704
+ rollbackConfig?: WorkflowStepRollbackConfig;
14578
14705
  };
14579
14706
  export abstract class WorkflowStep {
14580
14707
  do<T extends Rpc.Serializable<T>>(
@@ -15543,7 +15670,8 @@ declare namespace TailStream {
15543
15670
  | "loadShed"
15544
15671
  | "responseStreamDisconnected"
15545
15672
  | "scriptNotFound"
15546
- | "internalError";
15673
+ | "internalError"
15674
+ | "exceededWallTime";
15547
15675
  interface ScriptVersion {
15548
15676
  readonly id: string;
15549
15677
  readonly tag?: string;