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