@cloudflare/workers-types 4.20260616.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/2022-01-31/index.ts
CHANGED
|
@@ -12153,87 +12153,6 @@ export declare abstract class BrowserRun {
|
|
|
12153
12153
|
options: BrowserRunMarkdownOptions,
|
|
12154
12154
|
): Promise<Response>;
|
|
12155
12155
|
}
|
|
12156
|
-
export interface BasicImageTransformations {
|
|
12157
|
-
/**
|
|
12158
|
-
* Maximum width in image pixels. The value must be an integer.
|
|
12159
|
-
*/
|
|
12160
|
-
width?: number;
|
|
12161
|
-
/**
|
|
12162
|
-
* Maximum height in image pixels. The value must be an integer.
|
|
12163
|
-
*/
|
|
12164
|
-
height?: number;
|
|
12165
|
-
/**
|
|
12166
|
-
* Resizing mode as a string. It affects interpretation of width and height
|
|
12167
|
-
* options:
|
|
12168
|
-
* - scale-down: Similar to contain, but the image is never enlarged. If
|
|
12169
|
-
* the image is larger than given width or height, it will be resized.
|
|
12170
|
-
* Otherwise its original size will be kept.
|
|
12171
|
-
* - contain: Resizes to maximum size that fits within the given width and
|
|
12172
|
-
* height. If only a single dimension is given (e.g. only width), the
|
|
12173
|
-
* image will be shrunk or enlarged to exactly match that dimension.
|
|
12174
|
-
* Aspect ratio is always preserved.
|
|
12175
|
-
* - cover: Resizes (shrinks or enlarges) to fill the entire area of width
|
|
12176
|
-
* and height. If the image has an aspect ratio different from the ratio
|
|
12177
|
-
* of width and height, it will be cropped to fit.
|
|
12178
|
-
* - crop: The image will be shrunk and cropped to fit within the area
|
|
12179
|
-
* specified by width and height. The image will not be enlarged. For images
|
|
12180
|
-
* smaller than the given dimensions it's the same as scale-down. For
|
|
12181
|
-
* images larger than the given dimensions, it's the same as cover.
|
|
12182
|
-
* See also trim.
|
|
12183
|
-
* - pad: Resizes to the maximum size that fits within the given width and
|
|
12184
|
-
* height, and then fills the remaining area with a background color
|
|
12185
|
-
* (white by default). Use of this mode is not recommended, as the same
|
|
12186
|
-
* effect can be more efficiently achieved with the contain mode and the
|
|
12187
|
-
* CSS object-fit: contain property.
|
|
12188
|
-
* - squeeze: Stretches and deforms to the width and height given, even if it
|
|
12189
|
-
* breaks aspect ratio
|
|
12190
|
-
*/
|
|
12191
|
-
fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
|
|
12192
|
-
/**
|
|
12193
|
-
* Image segmentation using artificial intelligence models. Sets pixels not
|
|
12194
|
-
* within selected segment area to transparent e.g "foreground" sets every
|
|
12195
|
-
* background pixel as transparent.
|
|
12196
|
-
*/
|
|
12197
|
-
segment?: "foreground";
|
|
12198
|
-
/**
|
|
12199
|
-
* When cropping with fit: "cover", this defines the side or point that should
|
|
12200
|
-
* be left uncropped. The value is either a string
|
|
12201
|
-
* "left", "right", "top", "bottom", "auto", or "center" (the default),
|
|
12202
|
-
* or an object {x, y} containing focal point coordinates in the original
|
|
12203
|
-
* image expressed as fractions ranging from 0.0 (top or left) to 1.0
|
|
12204
|
-
* (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
|
|
12205
|
-
* crop bottom or left and right sides as necessary, but won’t crop anything
|
|
12206
|
-
* from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
|
|
12207
|
-
* preserve as much as possible around a point at 20% of the height of the
|
|
12208
|
-
* source image.
|
|
12209
|
-
*/
|
|
12210
|
-
gravity?:
|
|
12211
|
-
| "face"
|
|
12212
|
-
| "left"
|
|
12213
|
-
| "right"
|
|
12214
|
-
| "top"
|
|
12215
|
-
| "bottom"
|
|
12216
|
-
| "center"
|
|
12217
|
-
| "auto"
|
|
12218
|
-
| "entropy"
|
|
12219
|
-
| BasicImageTransformationsGravityCoordinates;
|
|
12220
|
-
/**
|
|
12221
|
-
* Background color to add underneath the image. Applies only to images with
|
|
12222
|
-
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
|
12223
|
-
* hsl(…), etc.)
|
|
12224
|
-
*/
|
|
12225
|
-
background?: string;
|
|
12226
|
-
/**
|
|
12227
|
-
* Number of degrees (90, 180, 270) to rotate the image by. width and height
|
|
12228
|
-
* options refer to axes after rotation.
|
|
12229
|
-
*/
|
|
12230
|
-
rotate?: 0 | 90 | 180 | 270 | 360;
|
|
12231
|
-
}
|
|
12232
|
-
export interface BasicImageTransformationsGravityCoordinates {
|
|
12233
|
-
x?: number;
|
|
12234
|
-
y?: number;
|
|
12235
|
-
mode?: "remainder" | "box-center";
|
|
12236
|
-
}
|
|
12237
12156
|
/**
|
|
12238
12157
|
* In addition to the properties you can set in the RequestInit dict
|
|
12239
12158
|
* that you pass as an argument to the Request constructor, you can
|
|
@@ -12329,6 +12248,209 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12329
12248
|
*/
|
|
12330
12249
|
resolveOverride?: string;
|
|
12331
12250
|
}
|
|
12251
|
+
export interface BasicImageTransformations {
|
|
12252
|
+
/**
|
|
12253
|
+
* Maximum width in image pixels. The value must be an integer.
|
|
12254
|
+
*/
|
|
12255
|
+
width?: number;
|
|
12256
|
+
/**
|
|
12257
|
+
* Maximum height in image pixels. The value must be an integer.
|
|
12258
|
+
*/
|
|
12259
|
+
height?: number;
|
|
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
|
+
* Specifies how closely the image is cropped toward detected faces when combined
|
|
12284
|
+
* with the gravity=face option. Accepts a valid range between 0.0 (includes as much
|
|
12285
|
+
* of the background as possible) and 1.0 (crops the image as closely to the face as
|
|
12286
|
+
* possible). The default is 0.
|
|
12287
|
+
*/
|
|
12288
|
+
zoom?: number;
|
|
12289
|
+
/**
|
|
12290
|
+
* Resizing mode as a string. It affects interpretation of width and height
|
|
12291
|
+
* options:
|
|
12292
|
+
* - scale-down: Similar to contain, but the image is never enlarged. If
|
|
12293
|
+
* the image is larger than given width or height, it will be resized.
|
|
12294
|
+
* Otherwise its original size will be kept.
|
|
12295
|
+
* - scale-up: Similar to contain, but the image is never shrunk. If the
|
|
12296
|
+
* image is smaller than the given width or height, it will be resized.
|
|
12297
|
+
* Otherwise its original size will be kept.
|
|
12298
|
+
* - contain: Resizes to maximum size that fits within the given width and
|
|
12299
|
+
* height. If only a single dimension is given (e.g. only width), the
|
|
12300
|
+
* image will be shrunk or enlarged to exactly match that dimension.
|
|
12301
|
+
* Aspect ratio is always preserved.
|
|
12302
|
+
* - cover: Resizes (shrinks or enlarges) to fill the entire area of width
|
|
12303
|
+
* and height. If the image has an aspect ratio different from the ratio
|
|
12304
|
+
* of width and height, it will be cropped to fit.
|
|
12305
|
+
* - crop: The image will be shrunk and cropped to fit within the area
|
|
12306
|
+
* specified by width and height. The image will not be enlarged. For images
|
|
12307
|
+
* smaller than the given dimensions it's the same as scale-down. For
|
|
12308
|
+
* images larger than the given dimensions, it's the same as cover.
|
|
12309
|
+
* See also trim.
|
|
12310
|
+
* - pad: Resizes to the maximum size that fits within the given width and
|
|
12311
|
+
* height, and then fills the remaining area with a background color
|
|
12312
|
+
* (white by default). Use of this mode is not recommended, as the same
|
|
12313
|
+
* effect can be more efficiently achieved with the contain mode and the
|
|
12314
|
+
* CSS object-fit: contain property.
|
|
12315
|
+
* - squeeze: Stretches and deforms to the width and height given, even if it
|
|
12316
|
+
* breaks aspect ratio
|
|
12317
|
+
*/
|
|
12318
|
+
fit?:
|
|
12319
|
+
| "scale-down"
|
|
12320
|
+
| "scale-up"
|
|
12321
|
+
| "contain"
|
|
12322
|
+
| "cover"
|
|
12323
|
+
| "crop"
|
|
12324
|
+
| "pad"
|
|
12325
|
+
| "squeeze";
|
|
12326
|
+
/**
|
|
12327
|
+
* Allows you to trim your image. Takes dpr into account and is performed before
|
|
12328
|
+
* resizing or rotation.
|
|
12329
|
+
*
|
|
12330
|
+
* It can be used as:
|
|
12331
|
+
* - left, top, right, bottom - it will specify the number of pixels to cut
|
|
12332
|
+
* off each side
|
|
12333
|
+
* - width, height - the width/height you'd like to end up with - can be used
|
|
12334
|
+
* in combination with the properties above
|
|
12335
|
+
* - border - this will automatically trim the surroundings of an image based on
|
|
12336
|
+
* it's color. It consists of three properties:
|
|
12337
|
+
* - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
|
|
12338
|
+
* - tolerance: difference from color to treat as color
|
|
12339
|
+
* - keep: the number of pixels of border to keep
|
|
12340
|
+
*/
|
|
12341
|
+
trim?:
|
|
12342
|
+
| "border"
|
|
12343
|
+
| {
|
|
12344
|
+
top?: number;
|
|
12345
|
+
bottom?: number;
|
|
12346
|
+
left?: number;
|
|
12347
|
+
right?: number;
|
|
12348
|
+
width?: number;
|
|
12349
|
+
height?: number;
|
|
12350
|
+
border?:
|
|
12351
|
+
| boolean
|
|
12352
|
+
| {
|
|
12353
|
+
color?: string;
|
|
12354
|
+
tolerance?: number;
|
|
12355
|
+
keep?: number;
|
|
12356
|
+
};
|
|
12357
|
+
};
|
|
12358
|
+
/**
|
|
12359
|
+
* Background color to add underneath the image. Applies only to images with
|
|
12360
|
+
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
|
12361
|
+
* hsl(…), etc.)
|
|
12362
|
+
*/
|
|
12363
|
+
background?: string;
|
|
12364
|
+
/**
|
|
12365
|
+
* Flips the images horizontally, vertically, or both. Flipping is applied before
|
|
12366
|
+
* rotation, so if you apply flip=h,rotate=90 then the image will be flipped
|
|
12367
|
+
* horizontally, then rotated by 90 degrees.
|
|
12368
|
+
*/
|
|
12369
|
+
flip?: "h" | "v" | "hv";
|
|
12370
|
+
/**
|
|
12371
|
+
* Number of degrees (90, 180, 270) to rotate the image by. width and height
|
|
12372
|
+
* options refer to axes after rotation.
|
|
12373
|
+
*/
|
|
12374
|
+
rotate?: 0 | 90 | 180 | 270 | 360;
|
|
12375
|
+
/**
|
|
12376
|
+
* Strength of sharpening filter to apply to the image. Floating-point
|
|
12377
|
+
* number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
|
|
12378
|
+
* recommended value for downscaled images.
|
|
12379
|
+
*/
|
|
12380
|
+
sharpen?: number;
|
|
12381
|
+
/**
|
|
12382
|
+
* Radius of a blur filter (approximate gaussian). Maximum supported radius
|
|
12383
|
+
* is 250.
|
|
12384
|
+
*/
|
|
12385
|
+
blur?: number;
|
|
12386
|
+
/**
|
|
12387
|
+
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12388
|
+
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12389
|
+
* ignored.
|
|
12390
|
+
*/
|
|
12391
|
+
contrast?: number;
|
|
12392
|
+
/**
|
|
12393
|
+
* Increase brightness by a factor. A value of 1.0 equals no change, a value
|
|
12394
|
+
* of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
|
|
12395
|
+
* 0 is ignored.
|
|
12396
|
+
*/
|
|
12397
|
+
brightness?: number;
|
|
12398
|
+
/**
|
|
12399
|
+
* Increase exposure by a factor. A value of 1.0 equals no change, a value of
|
|
12400
|
+
* 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
|
|
12401
|
+
*/
|
|
12402
|
+
gamma?: number;
|
|
12403
|
+
/**
|
|
12404
|
+
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12405
|
+
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12406
|
+
* ignored.
|
|
12407
|
+
*/
|
|
12408
|
+
saturation?: number;
|
|
12409
|
+
/**
|
|
12410
|
+
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
|
12411
|
+
* easier to specify higher-DPI sizes in <img srcset>.
|
|
12412
|
+
*/
|
|
12413
|
+
dpr?: number;
|
|
12414
|
+
/**
|
|
12415
|
+
* Adds a border around the image. The border is added after resizing. Border
|
|
12416
|
+
* width takes dpr into account, and can be specified either using a single
|
|
12417
|
+
* width property, or individually for each side.
|
|
12418
|
+
*/
|
|
12419
|
+
border?:
|
|
12420
|
+
| {
|
|
12421
|
+
color: string;
|
|
12422
|
+
width: number;
|
|
12423
|
+
}
|
|
12424
|
+
| {
|
|
12425
|
+
color: string;
|
|
12426
|
+
top: number;
|
|
12427
|
+
right: number;
|
|
12428
|
+
bottom: number;
|
|
12429
|
+
left: number;
|
|
12430
|
+
};
|
|
12431
|
+
/**
|
|
12432
|
+
* Image segmentation using artificial intelligence models. Sets pixels not
|
|
12433
|
+
* within selected segment area to transparent e.g "foreground" sets every
|
|
12434
|
+
* background pixel as transparent.
|
|
12435
|
+
*/
|
|
12436
|
+
segment?: "foreground";
|
|
12437
|
+
/**
|
|
12438
|
+
* Controls the algorithm used when an image needs to be enlarged. This
|
|
12439
|
+
* parameter works with any fit mode that upscales, such as `contain`,
|
|
12440
|
+
* `cover`, and `scale-up`. It has no effect when `fit=scale-down` or when
|
|
12441
|
+
* the target dimensions are smaller than the source.
|
|
12442
|
+
* - interpolate: Uses bicubic interpolation, which may reduce image quality.
|
|
12443
|
+
* This is the default behavior when `upscale` is not specified.
|
|
12444
|
+
* - generate: Uses AI upscaling to produce sharper, more detailed results
|
|
12445
|
+
* when enlarging images.
|
|
12446
|
+
*/
|
|
12447
|
+
upscale?: "interpolate" | "generate";
|
|
12448
|
+
}
|
|
12449
|
+
export interface BasicImageTransformationsGravityCoordinates {
|
|
12450
|
+
x?: number;
|
|
12451
|
+
y?: number;
|
|
12452
|
+
mode?: "remainder" | "box-center";
|
|
12453
|
+
}
|
|
12332
12454
|
export interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
|
|
12333
12455
|
/**
|
|
12334
12456
|
* Absolute URL of the image file to use for the drawing. It can be any of
|
|
@@ -12382,43 +12504,6 @@ export interface RequestInitCfPropertiesImageDraw extends BasicImageTransformati
|
|
|
12382
12504
|
right?: number;
|
|
12383
12505
|
}
|
|
12384
12506
|
export interface RequestInitCfPropertiesImage extends BasicImageTransformations {
|
|
12385
|
-
/**
|
|
12386
|
-
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
|
12387
|
-
* easier to specify higher-DPI sizes in <img srcset>.
|
|
12388
|
-
*/
|
|
12389
|
-
dpr?: number;
|
|
12390
|
-
/**
|
|
12391
|
-
* Allows you to trim your image. Takes dpr into account and is performed before
|
|
12392
|
-
* resizing or rotation.
|
|
12393
|
-
*
|
|
12394
|
-
* It can be used as:
|
|
12395
|
-
* - left, top, right, bottom - it will specify the number of pixels to cut
|
|
12396
|
-
* off each side
|
|
12397
|
-
* - width, height - the width/height you'd like to end up with - can be used
|
|
12398
|
-
* in combination with the properties above
|
|
12399
|
-
* - border - this will automatically trim the surroundings of an image based on
|
|
12400
|
-
* it's color. It consists of three properties:
|
|
12401
|
-
* - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
|
|
12402
|
-
* - tolerance: difference from color to treat as color
|
|
12403
|
-
* - keep: the number of pixels of border to keep
|
|
12404
|
-
*/
|
|
12405
|
-
trim?:
|
|
12406
|
-
| "border"
|
|
12407
|
-
| {
|
|
12408
|
-
top?: number;
|
|
12409
|
-
bottom?: number;
|
|
12410
|
-
left?: number;
|
|
12411
|
-
right?: number;
|
|
12412
|
-
width?: number;
|
|
12413
|
-
height?: number;
|
|
12414
|
-
border?:
|
|
12415
|
-
| boolean
|
|
12416
|
-
| {
|
|
12417
|
-
color?: string;
|
|
12418
|
-
tolerance?: number;
|
|
12419
|
-
keep?: number;
|
|
12420
|
-
};
|
|
12421
|
-
};
|
|
12422
12507
|
/**
|
|
12423
12508
|
* Quality setting from 1-100 (useful values are in 60-90 range). Lower values
|
|
12424
12509
|
* make images look worse, but load faster. The default is 85. It applies only
|
|
@@ -12468,17 +12553,6 @@ export interface RequestInitCfPropertiesImage extends BasicImageTransformations
|
|
|
12468
12553
|
* output formats always discard metadata.
|
|
12469
12554
|
*/
|
|
12470
12555
|
metadata?: "keep" | "copyright" | "none";
|
|
12471
|
-
/**
|
|
12472
|
-
* Strength of sharpening filter to apply to the image. Floating-point
|
|
12473
|
-
* number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
|
|
12474
|
-
* recommended value for downscaled images.
|
|
12475
|
-
*/
|
|
12476
|
-
sharpen?: number;
|
|
12477
|
-
/**
|
|
12478
|
-
* Radius of a blur filter (approximate gaussian). Maximum supported radius
|
|
12479
|
-
* is 250.
|
|
12480
|
-
*/
|
|
12481
|
-
blur?: number;
|
|
12482
12556
|
/**
|
|
12483
12557
|
* Overlays are drawn in the order they appear in the array (last array
|
|
12484
12558
|
* entry is the topmost layer).
|
|
@@ -12490,52 +12564,6 @@ export interface RequestInitCfPropertiesImage extends BasicImageTransformations
|
|
|
12490
12564
|
* the origin.
|
|
12491
12565
|
*/
|
|
12492
12566
|
"origin-auth"?: "share-publicly";
|
|
12493
|
-
/**
|
|
12494
|
-
* Adds a border around the image. The border is added after resizing. Border
|
|
12495
|
-
* width takes dpr into account, and can be specified either using a single
|
|
12496
|
-
* width property, or individually for each side.
|
|
12497
|
-
*/
|
|
12498
|
-
border?:
|
|
12499
|
-
| {
|
|
12500
|
-
color: string;
|
|
12501
|
-
width: number;
|
|
12502
|
-
}
|
|
12503
|
-
| {
|
|
12504
|
-
color: string;
|
|
12505
|
-
top: number;
|
|
12506
|
-
right: number;
|
|
12507
|
-
bottom: number;
|
|
12508
|
-
left: number;
|
|
12509
|
-
};
|
|
12510
|
-
/**
|
|
12511
|
-
* Increase brightness by a factor. A value of 1.0 equals no change, a value
|
|
12512
|
-
* of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
|
|
12513
|
-
* 0 is ignored.
|
|
12514
|
-
*/
|
|
12515
|
-
brightness?: number;
|
|
12516
|
-
/**
|
|
12517
|
-
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12518
|
-
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12519
|
-
* ignored.
|
|
12520
|
-
*/
|
|
12521
|
-
contrast?: number;
|
|
12522
|
-
/**
|
|
12523
|
-
* Increase exposure by a factor. A value of 1.0 equals no change, a value of
|
|
12524
|
-
* 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
|
|
12525
|
-
*/
|
|
12526
|
-
gamma?: number;
|
|
12527
|
-
/**
|
|
12528
|
-
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12529
|
-
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12530
|
-
* ignored.
|
|
12531
|
-
*/
|
|
12532
|
-
saturation?: number;
|
|
12533
|
-
/**
|
|
12534
|
-
* Flips the images horizontally, vertically, or both. Flipping is applied before
|
|
12535
|
-
* rotation, so if you apply flip=h,rotate=90 then the image will be flipped
|
|
12536
|
-
* horizontally, then rotated by 90 degrees.
|
|
12537
|
-
*/
|
|
12538
|
-
flip?: "h" | "v" | "hv";
|
|
12539
12567
|
/**
|
|
12540
12568
|
* Slightly reduces latency on a cache miss by selecting a
|
|
12541
12569
|
* quickest-to-compress file format, at a cost of increased file size and
|
|
@@ -14434,6 +14462,10 @@ export declare namespace CloudflareWorkersModule {
|
|
|
14434
14462
|
timeout?: WorkflowTimeoutDuration | number;
|
|
14435
14463
|
sensitive?: WorkflowStepSensitivity;
|
|
14436
14464
|
};
|
|
14465
|
+
export type WorkflowStepRollbackConfig = Pick<
|
|
14466
|
+
WorkflowStepConfig,
|
|
14467
|
+
"retries" | "timeout"
|
|
14468
|
+
>;
|
|
14437
14469
|
export type WorkflowCronSchedule = {
|
|
14438
14470
|
/** Cron expression that triggered this event. */
|
|
14439
14471
|
cron: string;
|
|
@@ -14462,16 +14494,18 @@ export declare namespace CloudflareWorkersModule {
|
|
|
14462
14494
|
config: WorkflowStepConfig;
|
|
14463
14495
|
};
|
|
14464
14496
|
export type WorkflowRollbackContext<T = unknown> = {
|
|
14497
|
+
ctx: WorkflowStepContext;
|
|
14465
14498
|
error: Error;
|
|
14466
14499
|
output: T | undefined;
|
|
14500
|
+
/** @deprecated Use `ctx.step.name` and `ctx.step.count` instead. */
|
|
14467
14501
|
stepName: string;
|
|
14468
14502
|
};
|
|
14469
14503
|
export type WorkflowRollbackHandler<T = unknown> = (
|
|
14470
14504
|
ctx: WorkflowRollbackContext<T>,
|
|
14471
14505
|
) => Promise<void>;
|
|
14472
14506
|
export type WorkflowStepRollbackOptions<T = unknown> = {
|
|
14473
|
-
rollback
|
|
14474
|
-
rollbackConfig?:
|
|
14507
|
+
rollback: WorkflowRollbackHandler<T>;
|
|
14508
|
+
rollbackConfig?: WorkflowStepRollbackConfig;
|
|
14475
14509
|
};
|
|
14476
14510
|
export abstract class WorkflowStep {
|
|
14477
14511
|
do<T extends Rpc.Serializable<T>>(
|