@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/index.ts CHANGED
@@ -471,7 +471,8 @@ export interface ExecutionContext<Props = unknown> {
471
471
  passThroughOnException(): void;
472
472
  readonly props: Props;
473
473
  cache?: CacheContext;
474
- tracing?: Tracing;
474
+ readonly access?: CloudflareAccessContext;
475
+ tracing: Tracing;
475
476
  }
476
477
  export type ExportedHandlerFetchHandler<
477
478
  Env = unknown,
@@ -564,6 +565,10 @@ export interface CachePurgeOptions {
564
565
  export interface CacheContext {
565
566
  purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
566
567
  }
568
+ export interface CloudflareAccessContext {
569
+ readonly aud: string;
570
+ getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
571
+ }
567
572
  export declare abstract class ColoLocalActorNamespace {
568
573
  get(actorId: string): Fetcher;
569
574
  }
@@ -629,6 +634,8 @@ export type DurableObjectLocationHint =
629
634
  | "weur"
630
635
  | "eeur"
631
636
  | "apac"
637
+ | "apac-ne"
638
+ | "apac-se"
632
639
  | "oc"
633
640
  | "afr"
634
641
  | "me";
@@ -770,6 +777,7 @@ export interface DurableObjectFacets {
770
777
  ): Fetcher<T>;
771
778
  abort(name: string, reason: any): void;
772
779
  delete(name: string): void;
780
+ clone(src: string, dst: string): void;
773
781
  }
774
782
  export interface FacetStartupOptions<
775
783
  T extends Rpc.DurableObjectBranded | undefined = undefined,
@@ -3734,6 +3742,28 @@ export interface EventSourceEventSourceInit {
3734
3742
  withCredentials?: boolean;
3735
3743
  fetcher?: Fetcher;
3736
3744
  }
3745
+ export interface ExecOutput {
3746
+ readonly stdout: ArrayBuffer;
3747
+ readonly stderr: ArrayBuffer;
3748
+ readonly exitCode: number;
3749
+ }
3750
+ export interface ContainerExecOptions {
3751
+ cwd?: string;
3752
+ env?: Record<string, string>;
3753
+ user?: string;
3754
+ stdin?: ReadableStream | "pipe";
3755
+ stdout?: "pipe" | "ignore";
3756
+ stderr?: "pipe" | "ignore" | "combined";
3757
+ }
3758
+ export interface ExecProcess {
3759
+ readonly stdin: WritableStream | null;
3760
+ readonly stdout: ReadableStream | null;
3761
+ readonly stderr: ReadableStream | null;
3762
+ readonly pid: number;
3763
+ readonly exitCode: Promise<number>;
3764
+ output(): Promise<ExecOutput>;
3765
+ kill(signal?: number): void;
3766
+ }
3737
3767
  export interface Container {
3738
3768
  get running(): boolean;
3739
3769
  start(options?: ContainerStartupOptions): void;
@@ -3751,6 +3781,7 @@ export interface Container {
3751
3781
  options: ContainerSnapshotOptions,
3752
3782
  ): Promise<ContainerSnapshot>;
3753
3783
  interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3784
+ exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
3754
3785
  }
3755
3786
  export interface ContainerDirectorySnapshot {
3756
3787
  id: string;
@@ -3925,11 +3956,62 @@ export interface Tracing {
3925
3956
  callback: (span: Span, ...args: A) => T,
3926
3957
  ...args: A
3927
3958
  ): T;
3959
+ startActiveSpan<T, A extends unknown[]>(
3960
+ name: string,
3961
+ callback: (span: Span, ...args: A) => T,
3962
+ ...args: A
3963
+ ): T;
3928
3964
  Span: typeof Span;
3929
3965
  }
3930
3966
  export declare abstract class Span {
3931
3967
  get isTraced(): boolean;
3932
3968
  setAttribute(key: string, value?: boolean | number | string): void;
3969
+ end(): void;
3970
+ }
3971
+ /**
3972
+ * Represents the identity of a user authenticated via Cloudflare Access.
3973
+ * This matches the result of calling /cdn-cgi/access/get-identity.
3974
+ *
3975
+ * The exact structure of the returned object depends on the identity provider
3976
+ * configuration for the Access application. The fields below represent commonly
3977
+ * available properties, but additional provider-specific fields may be present.
3978
+ */
3979
+ export interface CloudflareAccessIdentity extends Record<string, unknown> {
3980
+ /** The user's email address, if available from the identity provider. */
3981
+ email?: string;
3982
+ /** The user's display name. */
3983
+ name?: string;
3984
+ /** The user's unique identifier. */
3985
+ user_uuid?: string;
3986
+ /** The Cloudflare account ID. */
3987
+ account_id?: string;
3988
+ /** Login timestamp (Unix epoch seconds). */
3989
+ iat?: number;
3990
+ /** The user's IP address at authentication time. */
3991
+ ip?: string;
3992
+ /** Authentication methods used (e.g., "pwd"). */
3993
+ amr?: string[];
3994
+ /** Identity provider information. */
3995
+ idp?: {
3996
+ id: string;
3997
+ type: string;
3998
+ };
3999
+ /** Geographic information about where the user authenticated. */
4000
+ geo?: {
4001
+ country: string;
4002
+ };
4003
+ /** Group memberships from the identity provider. */
4004
+ groups?: Array<{
4005
+ id: string;
4006
+ name: string;
4007
+ email?: string;
4008
+ }>;
4009
+ /** Device posture check results, keyed by check ID. */
4010
+ devicePosture?: Record<string, unknown>;
4011
+ /** True if the user connected via Cloudflare WARP. */
4012
+ is_warp?: boolean;
4013
+ /** True if the user is authenticated via Cloudflare Gateway. */
4014
+ is_gateway?: boolean;
3933
4015
  }
3934
4016
  // ============================================================================
3935
4017
  // Agent Memory
@@ -12086,87 +12168,6 @@ export declare abstract class BrowserRun {
12086
12168
  options: BrowserRunMarkdownOptions,
12087
12169
  ): Promise<Response>;
12088
12170
  }
12089
- export interface BasicImageTransformations {
12090
- /**
12091
- * Maximum width in image pixels. The value must be an integer.
12092
- */
12093
- width?: number;
12094
- /**
12095
- * Maximum height in image pixels. The value must be an integer.
12096
- */
12097
- height?: number;
12098
- /**
12099
- * Resizing mode as a string. It affects interpretation of width and height
12100
- * options:
12101
- * - scale-down: Similar to contain, but the image is never enlarged. If
12102
- * the image is larger than given width or height, it will be resized.
12103
- * Otherwise its original size will be kept.
12104
- * - contain: Resizes to maximum size that fits within the given width and
12105
- * height. If only a single dimension is given (e.g. only width), the
12106
- * image will be shrunk or enlarged to exactly match that dimension.
12107
- * Aspect ratio is always preserved.
12108
- * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12109
- * and height. If the image has an aspect ratio different from the ratio
12110
- * of width and height, it will be cropped to fit.
12111
- * - crop: The image will be shrunk and cropped to fit within the area
12112
- * specified by width and height. The image will not be enlarged. For images
12113
- * smaller than the given dimensions it's the same as scale-down. For
12114
- * images larger than the given dimensions, it's the same as cover.
12115
- * See also trim.
12116
- * - pad: Resizes to the maximum size that fits within the given width and
12117
- * height, and then fills the remaining area with a background color
12118
- * (white by default). Use of this mode is not recommended, as the same
12119
- * effect can be more efficiently achieved with the contain mode and the
12120
- * CSS object-fit: contain property.
12121
- * - squeeze: Stretches and deforms to the width and height given, even if it
12122
- * breaks aspect ratio
12123
- */
12124
- fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
12125
- /**
12126
- * Image segmentation using artificial intelligence models. Sets pixels not
12127
- * within selected segment area to transparent e.g "foreground" sets every
12128
- * background pixel as transparent.
12129
- */
12130
- segment?: "foreground";
12131
- /**
12132
- * When cropping with fit: "cover", this defines the side or point that should
12133
- * be left uncropped. The value is either a string
12134
- * "left", "right", "top", "bottom", "auto", or "center" (the default),
12135
- * or an object {x, y} containing focal point coordinates in the original
12136
- * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12137
- * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12138
- * crop bottom or left and right sides as necessary, but won’t crop anything
12139
- * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12140
- * preserve as much as possible around a point at 20% of the height of the
12141
- * source image.
12142
- */
12143
- gravity?:
12144
- | "face"
12145
- | "left"
12146
- | "right"
12147
- | "top"
12148
- | "bottom"
12149
- | "center"
12150
- | "auto"
12151
- | "entropy"
12152
- | BasicImageTransformationsGravityCoordinates;
12153
- /**
12154
- * Background color to add underneath the image. Applies only to images with
12155
- * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12156
- * hsl(…), etc.)
12157
- */
12158
- background?: string;
12159
- /**
12160
- * Number of degrees (90, 180, 270) to rotate the image by. width and height
12161
- * options refer to axes after rotation.
12162
- */
12163
- rotate?: 0 | 90 | 180 | 270 | 360;
12164
- }
12165
- export interface BasicImageTransformationsGravityCoordinates {
12166
- x?: number;
12167
- y?: number;
12168
- mode?: "remainder" | "box-center";
12169
- }
12170
12171
  /**
12171
12172
  * In addition to the properties you can set in the RequestInit dict
12172
12173
  * that you pass as an argument to the Request constructor, you can
@@ -12242,6 +12243,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
12242
12243
  cacheReserveMinimumFileSize?: number;
12243
12244
  scrapeShield?: boolean;
12244
12245
  apps?: boolean;
12246
+ /**
12247
+ * Controls whether an outbound gRPC-web subrequest from this Worker is
12248
+ * converted to gRPC at the Cloudflare edge.
12249
+ *
12250
+ * - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
12251
+ * - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
12252
+ *
12253
+ * Provides per-request control over the same edge conversion behavior
12254
+ * gated by the `auto_grpc_convert` compatibility flag.
12255
+ */
12256
+ grpcWeb?: "passthrough" | "convert";
12245
12257
  image?: RequestInitCfPropertiesImage;
12246
12258
  minify?: RequestInitCfPropertiesImageMinify;
12247
12259
  mirage?: boolean;
@@ -12262,6 +12274,209 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
12262
12274
  */
12263
12275
  resolveOverride?: string;
12264
12276
  }
12277
+ export interface BasicImageTransformations {
12278
+ /**
12279
+ * Maximum width in image pixels. The value must be an integer.
12280
+ */
12281
+ width?: number;
12282
+ /**
12283
+ * Maximum height in image pixels. The value must be an integer.
12284
+ */
12285
+ height?: number;
12286
+ /**
12287
+ * When cropping with fit: "cover", this defines the side or point that should
12288
+ * be left uncropped. The value is either a string
12289
+ * "left", "right", "top", "bottom", "auto", or "center" (the default),
12290
+ * or an object {x, y} containing focal point coordinates in the original
12291
+ * image expressed as fractions ranging from 0.0 (top or left) to 1.0
12292
+ * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
12293
+ * crop bottom or left and right sides as necessary, but won’t crop anything
12294
+ * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
12295
+ * preserve as much as possible around a point at 20% of the height of the
12296
+ * source image.
12297
+ */
12298
+ gravity?:
12299
+ | "face"
12300
+ | "left"
12301
+ | "right"
12302
+ | "top"
12303
+ | "bottom"
12304
+ | "center"
12305
+ | "auto"
12306
+ | "entropy"
12307
+ | BasicImageTransformationsGravityCoordinates;
12308
+ /**
12309
+ * Specifies how closely the image is cropped toward detected faces when combined
12310
+ * with the gravity=face option. Accepts a valid range between 0.0 (includes as much
12311
+ * of the background as possible) and 1.0 (crops the image as closely to the face as
12312
+ * possible). The default is 0.
12313
+ */
12314
+ zoom?: number;
12315
+ /**
12316
+ * Resizing mode as a string. It affects interpretation of width and height
12317
+ * options:
12318
+ * - scale-down: Similar to contain, but the image is never enlarged. If
12319
+ * the image is larger than given width or height, it will be resized.
12320
+ * Otherwise its original size will be kept.
12321
+ * - scale-up: Similar to contain, but the image is never shrunk. If the
12322
+ * image is smaller than the given width or height, it will be resized.
12323
+ * Otherwise its original size will be kept.
12324
+ * - contain: Resizes to maximum size that fits within the given width and
12325
+ * height. If only a single dimension is given (e.g. only width), the
12326
+ * image will be shrunk or enlarged to exactly match that dimension.
12327
+ * Aspect ratio is always preserved.
12328
+ * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
12329
+ * and height. If the image has an aspect ratio different from the ratio
12330
+ * of width and height, it will be cropped to fit.
12331
+ * - crop: The image will be shrunk and cropped to fit within the area
12332
+ * specified by width and height. The image will not be enlarged. For images
12333
+ * smaller than the given dimensions it's the same as scale-down. For
12334
+ * images larger than the given dimensions, it's the same as cover.
12335
+ * See also trim.
12336
+ * - pad: Resizes to the maximum size that fits within the given width and
12337
+ * height, and then fills the remaining area with a background color
12338
+ * (white by default). Use of this mode is not recommended, as the same
12339
+ * effect can be more efficiently achieved with the contain mode and the
12340
+ * CSS object-fit: contain property.
12341
+ * - squeeze: Stretches and deforms to the width and height given, even if it
12342
+ * breaks aspect ratio
12343
+ */
12344
+ fit?:
12345
+ | "scale-down"
12346
+ | "scale-up"
12347
+ | "contain"
12348
+ | "cover"
12349
+ | "crop"
12350
+ | "pad"
12351
+ | "squeeze";
12352
+ /**
12353
+ * Allows you to trim your image. Takes dpr into account and is performed before
12354
+ * resizing or rotation.
12355
+ *
12356
+ * It can be used as:
12357
+ * - left, top, right, bottom - it will specify the number of pixels to cut
12358
+ * off each side
12359
+ * - width, height - the width/height you'd like to end up with - can be used
12360
+ * in combination with the properties above
12361
+ * - border - this will automatically trim the surroundings of an image based on
12362
+ * it's color. It consists of three properties:
12363
+ * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12364
+ * - tolerance: difference from color to treat as color
12365
+ * - keep: the number of pixels of border to keep
12366
+ */
12367
+ trim?:
12368
+ | "border"
12369
+ | {
12370
+ top?: number;
12371
+ bottom?: number;
12372
+ left?: number;
12373
+ right?: number;
12374
+ width?: number;
12375
+ height?: number;
12376
+ border?:
12377
+ | boolean
12378
+ | {
12379
+ color?: string;
12380
+ tolerance?: number;
12381
+ keep?: number;
12382
+ };
12383
+ };
12384
+ /**
12385
+ * Background color to add underneath the image. Applies only to images with
12386
+ * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
12387
+ * hsl(…), etc.)
12388
+ */
12389
+ background?: string;
12390
+ /**
12391
+ * Flips the images horizontally, vertically, or both. Flipping is applied before
12392
+ * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12393
+ * horizontally, then rotated by 90 degrees.
12394
+ */
12395
+ flip?: "h" | "v" | "hv";
12396
+ /**
12397
+ * Number of degrees (90, 180, 270) to rotate the image by. width and height
12398
+ * options refer to axes after rotation.
12399
+ */
12400
+ rotate?: 0 | 90 | 180 | 270 | 360;
12401
+ /**
12402
+ * Strength of sharpening filter to apply to the image. Floating-point
12403
+ * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12404
+ * recommended value for downscaled images.
12405
+ */
12406
+ sharpen?: number;
12407
+ /**
12408
+ * Radius of a blur filter (approximate gaussian). Maximum supported radius
12409
+ * is 250.
12410
+ */
12411
+ blur?: number;
12412
+ /**
12413
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12414
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12415
+ * ignored.
12416
+ */
12417
+ contrast?: number;
12418
+ /**
12419
+ * Increase brightness by a factor. A value of 1.0 equals no change, a value
12420
+ * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12421
+ * 0 is ignored.
12422
+ */
12423
+ brightness?: number;
12424
+ /**
12425
+ * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12426
+ * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12427
+ */
12428
+ gamma?: number;
12429
+ /**
12430
+ * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12431
+ * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12432
+ * ignored.
12433
+ */
12434
+ saturation?: number;
12435
+ /**
12436
+ * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12437
+ * easier to specify higher-DPI sizes in <img srcset>.
12438
+ */
12439
+ dpr?: number;
12440
+ /**
12441
+ * Adds a border around the image. The border is added after resizing. Border
12442
+ * width takes dpr into account, and can be specified either using a single
12443
+ * width property, or individually for each side.
12444
+ */
12445
+ border?:
12446
+ | {
12447
+ color: string;
12448
+ width: number;
12449
+ }
12450
+ | {
12451
+ color: string;
12452
+ top: number;
12453
+ right: number;
12454
+ bottom: number;
12455
+ left: number;
12456
+ };
12457
+ /**
12458
+ * Image segmentation using artificial intelligence models. Sets pixels not
12459
+ * within selected segment area to transparent e.g "foreground" sets every
12460
+ * background pixel as transparent.
12461
+ */
12462
+ segment?: "foreground";
12463
+ /**
12464
+ * Controls the algorithm used when an image needs to be enlarged. This
12465
+ * parameter works with any fit mode that upscales, such as `contain`,
12466
+ * `cover`, and `scale-up`. It has no effect when `fit=scale-down` or when
12467
+ * the target dimensions are smaller than the source.
12468
+ * - interpolate: Uses bicubic interpolation, which may reduce image quality.
12469
+ * This is the default behavior when `upscale` is not specified.
12470
+ * - generate: Uses AI upscaling to produce sharper, more detailed results
12471
+ * when enlarging images.
12472
+ */
12473
+ upscale?: "interpolate" | "generate";
12474
+ }
12475
+ export interface BasicImageTransformationsGravityCoordinates {
12476
+ x?: number;
12477
+ y?: number;
12478
+ mode?: "remainder" | "box-center";
12479
+ }
12265
12480
  export interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
12266
12481
  /**
12267
12482
  * Absolute URL of the image file to use for the drawing. It can be any of
@@ -12315,43 +12530,6 @@ export interface RequestInitCfPropertiesImageDraw extends BasicImageTransformati
12315
12530
  right?: number;
12316
12531
  }
12317
12532
  export interface RequestInitCfPropertiesImage extends BasicImageTransformations {
12318
- /**
12319
- * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
12320
- * easier to specify higher-DPI sizes in <img srcset>.
12321
- */
12322
- dpr?: number;
12323
- /**
12324
- * Allows you to trim your image. Takes dpr into account and is performed before
12325
- * resizing or rotation.
12326
- *
12327
- * It can be used as:
12328
- * - left, top, right, bottom - it will specify the number of pixels to cut
12329
- * off each side
12330
- * - width, height - the width/height you'd like to end up with - can be used
12331
- * in combination with the properties above
12332
- * - border - this will automatically trim the surroundings of an image based on
12333
- * it's color. It consists of three properties:
12334
- * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
12335
- * - tolerance: difference from color to treat as color
12336
- * - keep: the number of pixels of border to keep
12337
- */
12338
- trim?:
12339
- | "border"
12340
- | {
12341
- top?: number;
12342
- bottom?: number;
12343
- left?: number;
12344
- right?: number;
12345
- width?: number;
12346
- height?: number;
12347
- border?:
12348
- | boolean
12349
- | {
12350
- color?: string;
12351
- tolerance?: number;
12352
- keep?: number;
12353
- };
12354
- };
12355
12533
  /**
12356
12534
  * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
12357
12535
  * make images look worse, but load faster. The default is 85. It applies only
@@ -12401,17 +12579,6 @@ export interface RequestInitCfPropertiesImage extends BasicImageTransformations
12401
12579
  * output formats always discard metadata.
12402
12580
  */
12403
12581
  metadata?: "keep" | "copyright" | "none";
12404
- /**
12405
- * Strength of sharpening filter to apply to the image. Floating-point
12406
- * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
12407
- * recommended value for downscaled images.
12408
- */
12409
- sharpen?: number;
12410
- /**
12411
- * Radius of a blur filter (approximate gaussian). Maximum supported radius
12412
- * is 250.
12413
- */
12414
- blur?: number;
12415
12582
  /**
12416
12583
  * Overlays are drawn in the order they appear in the array (last array
12417
12584
  * entry is the topmost layer).
@@ -12423,52 +12590,6 @@ export interface RequestInitCfPropertiesImage extends BasicImageTransformations
12423
12590
  * the origin.
12424
12591
  */
12425
12592
  "origin-auth"?: "share-publicly";
12426
- /**
12427
- * Adds a border around the image. The border is added after resizing. Border
12428
- * width takes dpr into account, and can be specified either using a single
12429
- * width property, or individually for each side.
12430
- */
12431
- border?:
12432
- | {
12433
- color: string;
12434
- width: number;
12435
- }
12436
- | {
12437
- color: string;
12438
- top: number;
12439
- right: number;
12440
- bottom: number;
12441
- left: number;
12442
- };
12443
- /**
12444
- * Increase brightness by a factor. A value of 1.0 equals no change, a value
12445
- * of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
12446
- * 0 is ignored.
12447
- */
12448
- brightness?: number;
12449
- /**
12450
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12451
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12452
- * ignored.
12453
- */
12454
- contrast?: number;
12455
- /**
12456
- * Increase exposure by a factor. A value of 1.0 equals no change, a value of
12457
- * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
12458
- */
12459
- gamma?: number;
12460
- /**
12461
- * Increase contrast by a factor. A value of 1.0 equals no change, a value of
12462
- * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
12463
- * ignored.
12464
- */
12465
- saturation?: number;
12466
- /**
12467
- * Flips the images horizontally, vertically, or both. Flipping is applied before
12468
- * rotation, so if you apply flip=h,rotate=90 then the image will be flipped
12469
- * horizontally, then rotated by 90 degrees.
12470
- */
12471
- flip?: "h" | "v" | "hv";
12472
12593
  /**
12473
12594
  * Slightly reduces latency on a cache miss by selecting a
12474
12595
  * quickest-to-compress file format, at a cost of increased file size and
@@ -14367,6 +14488,10 @@ export declare namespace CloudflareWorkersModule {
14367
14488
  timeout?: WorkflowTimeoutDuration | number;
14368
14489
  sensitive?: WorkflowStepSensitivity;
14369
14490
  };
14491
+ export type WorkflowStepRollbackConfig = Pick<
14492
+ WorkflowStepConfig,
14493
+ "retries" | "timeout"
14494
+ >;
14370
14495
  export type WorkflowCronSchedule = {
14371
14496
  /** Cron expression that triggered this event. */
14372
14497
  cron: string;
@@ -14395,16 +14520,18 @@ export declare namespace CloudflareWorkersModule {
14395
14520
  config: WorkflowStepConfig;
14396
14521
  };
14397
14522
  export type WorkflowRollbackContext<T = unknown> = {
14523
+ ctx: WorkflowStepContext;
14398
14524
  error: Error;
14399
14525
  output: T | undefined;
14526
+ /** @deprecated Use `ctx.step.name` and `ctx.step.count` instead. */
14400
14527
  stepName: string;
14401
14528
  };
14402
14529
  export type WorkflowRollbackHandler<T = unknown> = (
14403
14530
  ctx: WorkflowRollbackContext<T>,
14404
14531
  ) => Promise<void>;
14405
14532
  export type WorkflowStepRollbackOptions<T = unknown> = {
14406
- rollback?: WorkflowRollbackHandler<T>;
14407
- rollbackConfig?: WorkflowStepConfig;
14533
+ rollback: WorkflowRollbackHandler<T>;
14534
+ rollbackConfig?: WorkflowStepRollbackConfig;
14408
14535
  };
14409
14536
  export abstract class WorkflowStep {
14410
14537
  do<T extends Rpc.Serializable<T>>(
@@ -15363,7 +15490,8 @@ export declare namespace TailStream {
15363
15490
  | "loadShed"
15364
15491
  | "responseStreamDisconnected"
15365
15492
  | "scriptNotFound"
15366
- | "internalError";
15493
+ | "internalError"
15494
+ | "exceededWallTime";
15367
15495
  interface ScriptVersion {
15368
15496
  readonly id: string;
15369
15497
  readonly tag?: string;