@cloudflare/workers-types 4.20260615.1 → 4.20260617.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/2021-11-03/index.d.ts +211 -177
- package/2021-11-03/index.ts +211 -177
- package/2022-01-31/index.d.ts +211 -177
- package/2022-01-31/index.ts +211 -177
- package/2022-03-21/index.d.ts +211 -177
- package/2022-03-21/index.ts +211 -177
- package/2022-08-04/index.d.ts +211 -177
- package/2022-08-04/index.ts +211 -177
- package/2022-10-31/index.d.ts +211 -177
- package/2022-10-31/index.ts +211 -177
- package/2022-11-30/index.d.ts +211 -177
- package/2022-11-30/index.ts +211 -177
- package/2023-03-01/index.d.ts +211 -177
- package/2023-03-01/index.ts +211 -177
- package/2023-07-01/index.d.ts +211 -177
- package/2023-07-01/index.ts +211 -177
- package/experimental/index.d.ts +211 -177
- package/experimental/index.ts +211 -177
- package/index.d.ts +211 -177
- package/index.ts +211 -177
- package/latest/index.d.ts +211 -177
- package/latest/index.ts +211 -177
- package/oldest/index.d.ts +211 -177
- package/oldest/index.ts +211 -177
- package/package.json +1 -1
package/2023-03-01/index.ts
CHANGED
|
@@ -12194,87 +12194,6 @@ export declare abstract class BrowserRun {
|
|
|
12194
12194
|
options: BrowserRunMarkdownOptions,
|
|
12195
12195
|
): Promise<Response>;
|
|
12196
12196
|
}
|
|
12197
|
-
export interface BasicImageTransformations {
|
|
12198
|
-
/**
|
|
12199
|
-
* Maximum width in image pixels. The value must be an integer.
|
|
12200
|
-
*/
|
|
12201
|
-
width?: number;
|
|
12202
|
-
/**
|
|
12203
|
-
* Maximum height in image pixels. The value must be an integer.
|
|
12204
|
-
*/
|
|
12205
|
-
height?: number;
|
|
12206
|
-
/**
|
|
12207
|
-
* Resizing mode as a string. It affects interpretation of width and height
|
|
12208
|
-
* options:
|
|
12209
|
-
* - scale-down: Similar to contain, but the image is never enlarged. If
|
|
12210
|
-
* the image is larger than given width or height, it will be resized.
|
|
12211
|
-
* Otherwise its original size will be kept.
|
|
12212
|
-
* - contain: Resizes to maximum size that fits within the given width and
|
|
12213
|
-
* height. If only a single dimension is given (e.g. only width), the
|
|
12214
|
-
* image will be shrunk or enlarged to exactly match that dimension.
|
|
12215
|
-
* Aspect ratio is always preserved.
|
|
12216
|
-
* - cover: Resizes (shrinks or enlarges) to fill the entire area of width
|
|
12217
|
-
* and height. If the image has an aspect ratio different from the ratio
|
|
12218
|
-
* of width and height, it will be cropped to fit.
|
|
12219
|
-
* - crop: The image will be shrunk and cropped to fit within the area
|
|
12220
|
-
* specified by width and height. The image will not be enlarged. For images
|
|
12221
|
-
* smaller than the given dimensions it's the same as scale-down. For
|
|
12222
|
-
* images larger than the given dimensions, it's the same as cover.
|
|
12223
|
-
* See also trim.
|
|
12224
|
-
* - pad: Resizes to the maximum size that fits within the given width and
|
|
12225
|
-
* height, and then fills the remaining area with a background color
|
|
12226
|
-
* (white by default). Use of this mode is not recommended, as the same
|
|
12227
|
-
* effect can be more efficiently achieved with the contain mode and the
|
|
12228
|
-
* CSS object-fit: contain property.
|
|
12229
|
-
* - squeeze: Stretches and deforms to the width and height given, even if it
|
|
12230
|
-
* breaks aspect ratio
|
|
12231
|
-
*/
|
|
12232
|
-
fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
|
|
12233
|
-
/**
|
|
12234
|
-
* Image segmentation using artificial intelligence models. Sets pixels not
|
|
12235
|
-
* within selected segment area to transparent e.g "foreground" sets every
|
|
12236
|
-
* background pixel as transparent.
|
|
12237
|
-
*/
|
|
12238
|
-
segment?: "foreground";
|
|
12239
|
-
/**
|
|
12240
|
-
* When cropping with fit: "cover", this defines the side or point that should
|
|
12241
|
-
* be left uncropped. The value is either a string
|
|
12242
|
-
* "left", "right", "top", "bottom", "auto", or "center" (the default),
|
|
12243
|
-
* or an object {x, y} containing focal point coordinates in the original
|
|
12244
|
-
* image expressed as fractions ranging from 0.0 (top or left) to 1.0
|
|
12245
|
-
* (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
|
|
12246
|
-
* crop bottom or left and right sides as necessary, but won’t crop anything
|
|
12247
|
-
* from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
|
|
12248
|
-
* preserve as much as possible around a point at 20% of the height of the
|
|
12249
|
-
* source image.
|
|
12250
|
-
*/
|
|
12251
|
-
gravity?:
|
|
12252
|
-
| "face"
|
|
12253
|
-
| "left"
|
|
12254
|
-
| "right"
|
|
12255
|
-
| "top"
|
|
12256
|
-
| "bottom"
|
|
12257
|
-
| "center"
|
|
12258
|
-
| "auto"
|
|
12259
|
-
| "entropy"
|
|
12260
|
-
| BasicImageTransformationsGravityCoordinates;
|
|
12261
|
-
/**
|
|
12262
|
-
* Background color to add underneath the image. Applies only to images with
|
|
12263
|
-
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
|
12264
|
-
* hsl(…), etc.)
|
|
12265
|
-
*/
|
|
12266
|
-
background?: string;
|
|
12267
|
-
/**
|
|
12268
|
-
* Number of degrees (90, 180, 270) to rotate the image by. width and height
|
|
12269
|
-
* options refer to axes after rotation.
|
|
12270
|
-
*/
|
|
12271
|
-
rotate?: 0 | 90 | 180 | 270 | 360;
|
|
12272
|
-
}
|
|
12273
|
-
export interface BasicImageTransformationsGravityCoordinates {
|
|
12274
|
-
x?: number;
|
|
12275
|
-
y?: number;
|
|
12276
|
-
mode?: "remainder" | "box-center";
|
|
12277
|
-
}
|
|
12278
12197
|
/**
|
|
12279
12198
|
* In addition to the properties you can set in the RequestInit dict
|
|
12280
12199
|
* that you pass as an argument to the Request constructor, you can
|
|
@@ -12370,6 +12289,209 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12370
12289
|
*/
|
|
12371
12290
|
resolveOverride?: string;
|
|
12372
12291
|
}
|
|
12292
|
+
export interface BasicImageTransformations {
|
|
12293
|
+
/**
|
|
12294
|
+
* Maximum width in image pixels. The value must be an integer.
|
|
12295
|
+
*/
|
|
12296
|
+
width?: number;
|
|
12297
|
+
/**
|
|
12298
|
+
* Maximum height in image pixels. The value must be an integer.
|
|
12299
|
+
*/
|
|
12300
|
+
height?: number;
|
|
12301
|
+
/**
|
|
12302
|
+
* When cropping with fit: "cover", this defines the side or point that should
|
|
12303
|
+
* be left uncropped. The value is either a string
|
|
12304
|
+
* "left", "right", "top", "bottom", "auto", or "center" (the default),
|
|
12305
|
+
* or an object {x, y} containing focal point coordinates in the original
|
|
12306
|
+
* image expressed as fractions ranging from 0.0 (top or left) to 1.0
|
|
12307
|
+
* (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
|
|
12308
|
+
* crop bottom or left and right sides as necessary, but won’t crop anything
|
|
12309
|
+
* from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
|
|
12310
|
+
* preserve as much as possible around a point at 20% of the height of the
|
|
12311
|
+
* source image.
|
|
12312
|
+
*/
|
|
12313
|
+
gravity?:
|
|
12314
|
+
| "face"
|
|
12315
|
+
| "left"
|
|
12316
|
+
| "right"
|
|
12317
|
+
| "top"
|
|
12318
|
+
| "bottom"
|
|
12319
|
+
| "center"
|
|
12320
|
+
| "auto"
|
|
12321
|
+
| "entropy"
|
|
12322
|
+
| BasicImageTransformationsGravityCoordinates;
|
|
12323
|
+
/**
|
|
12324
|
+
* Specifies how closely the image is cropped toward detected faces when combined
|
|
12325
|
+
* with the gravity=face option. Accepts a valid range between 0.0 (includes as much
|
|
12326
|
+
* of the background as possible) and 1.0 (crops the image as closely to the face as
|
|
12327
|
+
* possible). The default is 0.
|
|
12328
|
+
*/
|
|
12329
|
+
zoom?: number;
|
|
12330
|
+
/**
|
|
12331
|
+
* Resizing mode as a string. It affects interpretation of width and height
|
|
12332
|
+
* options:
|
|
12333
|
+
* - scale-down: Similar to contain, but the image is never enlarged. If
|
|
12334
|
+
* the image is larger than given width or height, it will be resized.
|
|
12335
|
+
* Otherwise its original size will be kept.
|
|
12336
|
+
* - scale-up: Similar to contain, but the image is never shrunk. If the
|
|
12337
|
+
* image is smaller than the given width or height, it will be resized.
|
|
12338
|
+
* Otherwise its original size will be kept.
|
|
12339
|
+
* - contain: Resizes to maximum size that fits within the given width and
|
|
12340
|
+
* height. If only a single dimension is given (e.g. only width), the
|
|
12341
|
+
* image will be shrunk or enlarged to exactly match that dimension.
|
|
12342
|
+
* Aspect ratio is always preserved.
|
|
12343
|
+
* - cover: Resizes (shrinks or enlarges) to fill the entire area of width
|
|
12344
|
+
* and height. If the image has an aspect ratio different from the ratio
|
|
12345
|
+
* of width and height, it will be cropped to fit.
|
|
12346
|
+
* - crop: The image will be shrunk and cropped to fit within the area
|
|
12347
|
+
* specified by width and height. The image will not be enlarged. For images
|
|
12348
|
+
* smaller than the given dimensions it's the same as scale-down. For
|
|
12349
|
+
* images larger than the given dimensions, it's the same as cover.
|
|
12350
|
+
* See also trim.
|
|
12351
|
+
* - pad: Resizes to the maximum size that fits within the given width and
|
|
12352
|
+
* height, and then fills the remaining area with a background color
|
|
12353
|
+
* (white by default). Use of this mode is not recommended, as the same
|
|
12354
|
+
* effect can be more efficiently achieved with the contain mode and the
|
|
12355
|
+
* CSS object-fit: contain property.
|
|
12356
|
+
* - squeeze: Stretches and deforms to the width and height given, even if it
|
|
12357
|
+
* breaks aspect ratio
|
|
12358
|
+
*/
|
|
12359
|
+
fit?:
|
|
12360
|
+
| "scale-down"
|
|
12361
|
+
| "scale-up"
|
|
12362
|
+
| "contain"
|
|
12363
|
+
| "cover"
|
|
12364
|
+
| "crop"
|
|
12365
|
+
| "pad"
|
|
12366
|
+
| "squeeze";
|
|
12367
|
+
/**
|
|
12368
|
+
* Allows you to trim your image. Takes dpr into account and is performed before
|
|
12369
|
+
* resizing or rotation.
|
|
12370
|
+
*
|
|
12371
|
+
* It can be used as:
|
|
12372
|
+
* - left, top, right, bottom - it will specify the number of pixels to cut
|
|
12373
|
+
* off each side
|
|
12374
|
+
* - width, height - the width/height you'd like to end up with - can be used
|
|
12375
|
+
* in combination with the properties above
|
|
12376
|
+
* - border - this will automatically trim the surroundings of an image based on
|
|
12377
|
+
* it's color. It consists of three properties:
|
|
12378
|
+
* - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
|
|
12379
|
+
* - tolerance: difference from color to treat as color
|
|
12380
|
+
* - keep: the number of pixels of border to keep
|
|
12381
|
+
*/
|
|
12382
|
+
trim?:
|
|
12383
|
+
| "border"
|
|
12384
|
+
| {
|
|
12385
|
+
top?: number;
|
|
12386
|
+
bottom?: number;
|
|
12387
|
+
left?: number;
|
|
12388
|
+
right?: number;
|
|
12389
|
+
width?: number;
|
|
12390
|
+
height?: number;
|
|
12391
|
+
border?:
|
|
12392
|
+
| boolean
|
|
12393
|
+
| {
|
|
12394
|
+
color?: string;
|
|
12395
|
+
tolerance?: number;
|
|
12396
|
+
keep?: number;
|
|
12397
|
+
};
|
|
12398
|
+
};
|
|
12399
|
+
/**
|
|
12400
|
+
* Background color to add underneath the image. Applies only to images with
|
|
12401
|
+
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
|
12402
|
+
* hsl(…), etc.)
|
|
12403
|
+
*/
|
|
12404
|
+
background?: string;
|
|
12405
|
+
/**
|
|
12406
|
+
* Flips the images horizontally, vertically, or both. Flipping is applied before
|
|
12407
|
+
* rotation, so if you apply flip=h,rotate=90 then the image will be flipped
|
|
12408
|
+
* horizontally, then rotated by 90 degrees.
|
|
12409
|
+
*/
|
|
12410
|
+
flip?: "h" | "v" | "hv";
|
|
12411
|
+
/**
|
|
12412
|
+
* Number of degrees (90, 180, 270) to rotate the image by. width and height
|
|
12413
|
+
* options refer to axes after rotation.
|
|
12414
|
+
*/
|
|
12415
|
+
rotate?: 0 | 90 | 180 | 270 | 360;
|
|
12416
|
+
/**
|
|
12417
|
+
* Strength of sharpening filter to apply to the image. Floating-point
|
|
12418
|
+
* number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
|
|
12419
|
+
* recommended value for downscaled images.
|
|
12420
|
+
*/
|
|
12421
|
+
sharpen?: number;
|
|
12422
|
+
/**
|
|
12423
|
+
* Radius of a blur filter (approximate gaussian). Maximum supported radius
|
|
12424
|
+
* is 250.
|
|
12425
|
+
*/
|
|
12426
|
+
blur?: number;
|
|
12427
|
+
/**
|
|
12428
|
+
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12429
|
+
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12430
|
+
* ignored.
|
|
12431
|
+
*/
|
|
12432
|
+
contrast?: number;
|
|
12433
|
+
/**
|
|
12434
|
+
* Increase brightness by a factor. A value of 1.0 equals no change, a value
|
|
12435
|
+
* of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
|
|
12436
|
+
* 0 is ignored.
|
|
12437
|
+
*/
|
|
12438
|
+
brightness?: number;
|
|
12439
|
+
/**
|
|
12440
|
+
* Increase exposure by a factor. A value of 1.0 equals no change, a value of
|
|
12441
|
+
* 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
|
|
12442
|
+
*/
|
|
12443
|
+
gamma?: number;
|
|
12444
|
+
/**
|
|
12445
|
+
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12446
|
+
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12447
|
+
* ignored.
|
|
12448
|
+
*/
|
|
12449
|
+
saturation?: number;
|
|
12450
|
+
/**
|
|
12451
|
+
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
|
12452
|
+
* easier to specify higher-DPI sizes in <img srcset>.
|
|
12453
|
+
*/
|
|
12454
|
+
dpr?: number;
|
|
12455
|
+
/**
|
|
12456
|
+
* Adds a border around the image. The border is added after resizing. Border
|
|
12457
|
+
* width takes dpr into account, and can be specified either using a single
|
|
12458
|
+
* width property, or individually for each side.
|
|
12459
|
+
*/
|
|
12460
|
+
border?:
|
|
12461
|
+
| {
|
|
12462
|
+
color: string;
|
|
12463
|
+
width: number;
|
|
12464
|
+
}
|
|
12465
|
+
| {
|
|
12466
|
+
color: string;
|
|
12467
|
+
top: number;
|
|
12468
|
+
right: number;
|
|
12469
|
+
bottom: number;
|
|
12470
|
+
left: number;
|
|
12471
|
+
};
|
|
12472
|
+
/**
|
|
12473
|
+
* Image segmentation using artificial intelligence models. Sets pixels not
|
|
12474
|
+
* within selected segment area to transparent e.g "foreground" sets every
|
|
12475
|
+
* background pixel as transparent.
|
|
12476
|
+
*/
|
|
12477
|
+
segment?: "foreground";
|
|
12478
|
+
/**
|
|
12479
|
+
* Controls the algorithm used when an image needs to be enlarged. This
|
|
12480
|
+
* parameter works with any fit mode that upscales, such as `contain`,
|
|
12481
|
+
* `cover`, and `scale-up`. It has no effect when `fit=scale-down` or when
|
|
12482
|
+
* the target dimensions are smaller than the source.
|
|
12483
|
+
* - interpolate: Uses bicubic interpolation, which may reduce image quality.
|
|
12484
|
+
* This is the default behavior when `upscale` is not specified.
|
|
12485
|
+
* - generate: Uses AI upscaling to produce sharper, more detailed results
|
|
12486
|
+
* when enlarging images.
|
|
12487
|
+
*/
|
|
12488
|
+
upscale?: "interpolate" | "generate";
|
|
12489
|
+
}
|
|
12490
|
+
export interface BasicImageTransformationsGravityCoordinates {
|
|
12491
|
+
x?: number;
|
|
12492
|
+
y?: number;
|
|
12493
|
+
mode?: "remainder" | "box-center";
|
|
12494
|
+
}
|
|
12373
12495
|
export interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
|
|
12374
12496
|
/**
|
|
12375
12497
|
* Absolute URL of the image file to use for the drawing. It can be any of
|
|
@@ -12423,43 +12545,6 @@ export interface RequestInitCfPropertiesImageDraw extends BasicImageTransformati
|
|
|
12423
12545
|
right?: number;
|
|
12424
12546
|
}
|
|
12425
12547
|
export interface RequestInitCfPropertiesImage extends BasicImageTransformations {
|
|
12426
|
-
/**
|
|
12427
|
-
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
|
12428
|
-
* easier to specify higher-DPI sizes in <img srcset>.
|
|
12429
|
-
*/
|
|
12430
|
-
dpr?: number;
|
|
12431
|
-
/**
|
|
12432
|
-
* Allows you to trim your image. Takes dpr into account and is performed before
|
|
12433
|
-
* resizing or rotation.
|
|
12434
|
-
*
|
|
12435
|
-
* It can be used as:
|
|
12436
|
-
* - left, top, right, bottom - it will specify the number of pixels to cut
|
|
12437
|
-
* off each side
|
|
12438
|
-
* - width, height - the width/height you'd like to end up with - can be used
|
|
12439
|
-
* in combination with the properties above
|
|
12440
|
-
* - border - this will automatically trim the surroundings of an image based on
|
|
12441
|
-
* it's color. It consists of three properties:
|
|
12442
|
-
* - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
|
|
12443
|
-
* - tolerance: difference from color to treat as color
|
|
12444
|
-
* - keep: the number of pixels of border to keep
|
|
12445
|
-
*/
|
|
12446
|
-
trim?:
|
|
12447
|
-
| "border"
|
|
12448
|
-
| {
|
|
12449
|
-
top?: number;
|
|
12450
|
-
bottom?: number;
|
|
12451
|
-
left?: number;
|
|
12452
|
-
right?: number;
|
|
12453
|
-
width?: number;
|
|
12454
|
-
height?: number;
|
|
12455
|
-
border?:
|
|
12456
|
-
| boolean
|
|
12457
|
-
| {
|
|
12458
|
-
color?: string;
|
|
12459
|
-
tolerance?: number;
|
|
12460
|
-
keep?: number;
|
|
12461
|
-
};
|
|
12462
|
-
};
|
|
12463
12548
|
/**
|
|
12464
12549
|
* Quality setting from 1-100 (useful values are in 60-90 range). Lower values
|
|
12465
12550
|
* make images look worse, but load faster. The default is 85. It applies only
|
|
@@ -12509,17 +12594,6 @@ export interface RequestInitCfPropertiesImage extends BasicImageTransformations
|
|
|
12509
12594
|
* output formats always discard metadata.
|
|
12510
12595
|
*/
|
|
12511
12596
|
metadata?: "keep" | "copyright" | "none";
|
|
12512
|
-
/**
|
|
12513
|
-
* Strength of sharpening filter to apply to the image. Floating-point
|
|
12514
|
-
* number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
|
|
12515
|
-
* recommended value for downscaled images.
|
|
12516
|
-
*/
|
|
12517
|
-
sharpen?: number;
|
|
12518
|
-
/**
|
|
12519
|
-
* Radius of a blur filter (approximate gaussian). Maximum supported radius
|
|
12520
|
-
* is 250.
|
|
12521
|
-
*/
|
|
12522
|
-
blur?: number;
|
|
12523
12597
|
/**
|
|
12524
12598
|
* Overlays are drawn in the order they appear in the array (last array
|
|
12525
12599
|
* entry is the topmost layer).
|
|
@@ -12531,52 +12605,6 @@ export interface RequestInitCfPropertiesImage extends BasicImageTransformations
|
|
|
12531
12605
|
* the origin.
|
|
12532
12606
|
*/
|
|
12533
12607
|
"origin-auth"?: "share-publicly";
|
|
12534
|
-
/**
|
|
12535
|
-
* Adds a border around the image. The border is added after resizing. Border
|
|
12536
|
-
* width takes dpr into account, and can be specified either using a single
|
|
12537
|
-
* width property, or individually for each side.
|
|
12538
|
-
*/
|
|
12539
|
-
border?:
|
|
12540
|
-
| {
|
|
12541
|
-
color: string;
|
|
12542
|
-
width: number;
|
|
12543
|
-
}
|
|
12544
|
-
| {
|
|
12545
|
-
color: string;
|
|
12546
|
-
top: number;
|
|
12547
|
-
right: number;
|
|
12548
|
-
bottom: number;
|
|
12549
|
-
left: number;
|
|
12550
|
-
};
|
|
12551
|
-
/**
|
|
12552
|
-
* Increase brightness by a factor. A value of 1.0 equals no change, a value
|
|
12553
|
-
* of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
|
|
12554
|
-
* 0 is ignored.
|
|
12555
|
-
*/
|
|
12556
|
-
brightness?: number;
|
|
12557
|
-
/**
|
|
12558
|
-
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12559
|
-
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12560
|
-
* ignored.
|
|
12561
|
-
*/
|
|
12562
|
-
contrast?: number;
|
|
12563
|
-
/**
|
|
12564
|
-
* Increase exposure by a factor. A value of 1.0 equals no change, a value of
|
|
12565
|
-
* 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
|
|
12566
|
-
*/
|
|
12567
|
-
gamma?: number;
|
|
12568
|
-
/**
|
|
12569
|
-
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12570
|
-
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12571
|
-
* ignored.
|
|
12572
|
-
*/
|
|
12573
|
-
saturation?: number;
|
|
12574
|
-
/**
|
|
12575
|
-
* Flips the images horizontally, vertically, or both. Flipping is applied before
|
|
12576
|
-
* rotation, so if you apply flip=h,rotate=90 then the image will be flipped
|
|
12577
|
-
* horizontally, then rotated by 90 degrees.
|
|
12578
|
-
*/
|
|
12579
|
-
flip?: "h" | "v" | "hv";
|
|
12580
12608
|
/**
|
|
12581
12609
|
* Slightly reduces latency on a cache miss by selecting a
|
|
12582
12610
|
* quickest-to-compress file format, at a cost of increased file size and
|
|
@@ -14475,6 +14503,10 @@ export declare namespace CloudflareWorkersModule {
|
|
|
14475
14503
|
timeout?: WorkflowTimeoutDuration | number;
|
|
14476
14504
|
sensitive?: WorkflowStepSensitivity;
|
|
14477
14505
|
};
|
|
14506
|
+
export type WorkflowStepRollbackConfig = Pick<
|
|
14507
|
+
WorkflowStepConfig,
|
|
14508
|
+
"retries" | "timeout"
|
|
14509
|
+
>;
|
|
14478
14510
|
export type WorkflowCronSchedule = {
|
|
14479
14511
|
/** Cron expression that triggered this event. */
|
|
14480
14512
|
cron: string;
|
|
@@ -14503,16 +14535,18 @@ export declare namespace CloudflareWorkersModule {
|
|
|
14503
14535
|
config: WorkflowStepConfig;
|
|
14504
14536
|
};
|
|
14505
14537
|
export type WorkflowRollbackContext<T = unknown> = {
|
|
14538
|
+
ctx: WorkflowStepContext;
|
|
14506
14539
|
error: Error;
|
|
14507
14540
|
output: T | undefined;
|
|
14541
|
+
/** @deprecated Use `ctx.step.name` and `ctx.step.count` instead. */
|
|
14508
14542
|
stepName: string;
|
|
14509
14543
|
};
|
|
14510
14544
|
export type WorkflowRollbackHandler<T = unknown> = (
|
|
14511
14545
|
ctx: WorkflowRollbackContext<T>,
|
|
14512
14546
|
) => Promise<void>;
|
|
14513
14547
|
export type WorkflowStepRollbackOptions<T = unknown> = {
|
|
14514
|
-
rollback
|
|
14515
|
-
rollbackConfig?:
|
|
14548
|
+
rollback: WorkflowRollbackHandler<T>;
|
|
14549
|
+
rollbackConfig?: WorkflowStepRollbackConfig;
|
|
14516
14550
|
};
|
|
14517
14551
|
export abstract class WorkflowStep {
|
|
14518
14552
|
do<T extends Rpc.Serializable<T>>(
|