@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/experimental/index.d.ts
CHANGED
|
@@ -12883,87 +12883,6 @@ declare abstract class BrowserRun {
|
|
|
12883
12883
|
options: BrowserRunMarkdownOptions,
|
|
12884
12884
|
): Promise<Response>;
|
|
12885
12885
|
}
|
|
12886
|
-
interface BasicImageTransformations {
|
|
12887
|
-
/**
|
|
12888
|
-
* Maximum width in image pixels. The value must be an integer.
|
|
12889
|
-
*/
|
|
12890
|
-
width?: number;
|
|
12891
|
-
/**
|
|
12892
|
-
* Maximum height in image pixels. The value must be an integer.
|
|
12893
|
-
*/
|
|
12894
|
-
height?: number;
|
|
12895
|
-
/**
|
|
12896
|
-
* Resizing mode as a string. It affects interpretation of width and height
|
|
12897
|
-
* options:
|
|
12898
|
-
* - scale-down: Similar to contain, but the image is never enlarged. If
|
|
12899
|
-
* the image is larger than given width or height, it will be resized.
|
|
12900
|
-
* Otherwise its original size will be kept.
|
|
12901
|
-
* - contain: Resizes to maximum size that fits within the given width and
|
|
12902
|
-
* height. If only a single dimension is given (e.g. only width), the
|
|
12903
|
-
* image will be shrunk or enlarged to exactly match that dimension.
|
|
12904
|
-
* Aspect ratio is always preserved.
|
|
12905
|
-
* - cover: Resizes (shrinks or enlarges) to fill the entire area of width
|
|
12906
|
-
* and height. If the image has an aspect ratio different from the ratio
|
|
12907
|
-
* of width and height, it will be cropped to fit.
|
|
12908
|
-
* - crop: The image will be shrunk and cropped to fit within the area
|
|
12909
|
-
* specified by width and height. The image will not be enlarged. For images
|
|
12910
|
-
* smaller than the given dimensions it's the same as scale-down. For
|
|
12911
|
-
* images larger than the given dimensions, it's the same as cover.
|
|
12912
|
-
* See also trim.
|
|
12913
|
-
* - pad: Resizes to the maximum size that fits within the given width and
|
|
12914
|
-
* height, and then fills the remaining area with a background color
|
|
12915
|
-
* (white by default). Use of this mode is not recommended, as the same
|
|
12916
|
-
* effect can be more efficiently achieved with the contain mode and the
|
|
12917
|
-
* CSS object-fit: contain property.
|
|
12918
|
-
* - squeeze: Stretches and deforms to the width and height given, even if it
|
|
12919
|
-
* breaks aspect ratio
|
|
12920
|
-
*/
|
|
12921
|
-
fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
|
|
12922
|
-
/**
|
|
12923
|
-
* Image segmentation using artificial intelligence models. Sets pixels not
|
|
12924
|
-
* within selected segment area to transparent e.g "foreground" sets every
|
|
12925
|
-
* background pixel as transparent.
|
|
12926
|
-
*/
|
|
12927
|
-
segment?: "foreground";
|
|
12928
|
-
/**
|
|
12929
|
-
* When cropping with fit: "cover", this defines the side or point that should
|
|
12930
|
-
* be left uncropped. The value is either a string
|
|
12931
|
-
* "left", "right", "top", "bottom", "auto", or "center" (the default),
|
|
12932
|
-
* or an object {x, y} containing focal point coordinates in the original
|
|
12933
|
-
* image expressed as fractions ranging from 0.0 (top or left) to 1.0
|
|
12934
|
-
* (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
|
|
12935
|
-
* crop bottom or left and right sides as necessary, but won’t crop anything
|
|
12936
|
-
* from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
|
|
12937
|
-
* preserve as much as possible around a point at 20% of the height of the
|
|
12938
|
-
* source image.
|
|
12939
|
-
*/
|
|
12940
|
-
gravity?:
|
|
12941
|
-
| "face"
|
|
12942
|
-
| "left"
|
|
12943
|
-
| "right"
|
|
12944
|
-
| "top"
|
|
12945
|
-
| "bottom"
|
|
12946
|
-
| "center"
|
|
12947
|
-
| "auto"
|
|
12948
|
-
| "entropy"
|
|
12949
|
-
| BasicImageTransformationsGravityCoordinates;
|
|
12950
|
-
/**
|
|
12951
|
-
* Background color to add underneath the image. Applies only to images with
|
|
12952
|
-
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
|
12953
|
-
* hsl(…), etc.)
|
|
12954
|
-
*/
|
|
12955
|
-
background?: string;
|
|
12956
|
-
/**
|
|
12957
|
-
* Number of degrees (90, 180, 270) to rotate the image by. width and height
|
|
12958
|
-
* options refer to axes after rotation.
|
|
12959
|
-
*/
|
|
12960
|
-
rotate?: 0 | 90 | 180 | 270 | 360;
|
|
12961
|
-
}
|
|
12962
|
-
interface BasicImageTransformationsGravityCoordinates {
|
|
12963
|
-
x?: number;
|
|
12964
|
-
y?: number;
|
|
12965
|
-
mode?: "remainder" | "box-center";
|
|
12966
|
-
}
|
|
12967
12886
|
/**
|
|
12968
12887
|
* In addition to the properties you can set in the RequestInit dict
|
|
12969
12888
|
* that you pass as an argument to the Request constructor, you can
|
|
@@ -13059,6 +12978,209 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
13059
12978
|
*/
|
|
13060
12979
|
resolveOverride?: string;
|
|
13061
12980
|
}
|
|
12981
|
+
interface BasicImageTransformations {
|
|
12982
|
+
/**
|
|
12983
|
+
* Maximum width in image pixels. The value must be an integer.
|
|
12984
|
+
*/
|
|
12985
|
+
width?: number;
|
|
12986
|
+
/**
|
|
12987
|
+
* Maximum height in image pixels. The value must be an integer.
|
|
12988
|
+
*/
|
|
12989
|
+
height?: number;
|
|
12990
|
+
/**
|
|
12991
|
+
* When cropping with fit: "cover", this defines the side or point that should
|
|
12992
|
+
* be left uncropped. The value is either a string
|
|
12993
|
+
* "left", "right", "top", "bottom", "auto", or "center" (the default),
|
|
12994
|
+
* or an object {x, y} containing focal point coordinates in the original
|
|
12995
|
+
* image expressed as fractions ranging from 0.0 (top or left) to 1.0
|
|
12996
|
+
* (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
|
|
12997
|
+
* crop bottom or left and right sides as necessary, but won’t crop anything
|
|
12998
|
+
* from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
|
|
12999
|
+
* preserve as much as possible around a point at 20% of the height of the
|
|
13000
|
+
* source image.
|
|
13001
|
+
*/
|
|
13002
|
+
gravity?:
|
|
13003
|
+
| "face"
|
|
13004
|
+
| "left"
|
|
13005
|
+
| "right"
|
|
13006
|
+
| "top"
|
|
13007
|
+
| "bottom"
|
|
13008
|
+
| "center"
|
|
13009
|
+
| "auto"
|
|
13010
|
+
| "entropy"
|
|
13011
|
+
| BasicImageTransformationsGravityCoordinates;
|
|
13012
|
+
/**
|
|
13013
|
+
* Specifies how closely the image is cropped toward detected faces when combined
|
|
13014
|
+
* with the gravity=face option. Accepts a valid range between 0.0 (includes as much
|
|
13015
|
+
* of the background as possible) and 1.0 (crops the image as closely to the face as
|
|
13016
|
+
* possible). The default is 0.
|
|
13017
|
+
*/
|
|
13018
|
+
zoom?: number;
|
|
13019
|
+
/**
|
|
13020
|
+
* Resizing mode as a string. It affects interpretation of width and height
|
|
13021
|
+
* options:
|
|
13022
|
+
* - scale-down: Similar to contain, but the image is never enlarged. If
|
|
13023
|
+
* the image is larger than given width or height, it will be resized.
|
|
13024
|
+
* Otherwise its original size will be kept.
|
|
13025
|
+
* - scale-up: Similar to contain, but the image is never shrunk. If the
|
|
13026
|
+
* image is smaller than the given width or height, it will be resized.
|
|
13027
|
+
* Otherwise its original size will be kept.
|
|
13028
|
+
* - contain: Resizes to maximum size that fits within the given width and
|
|
13029
|
+
* height. If only a single dimension is given (e.g. only width), the
|
|
13030
|
+
* image will be shrunk or enlarged to exactly match that dimension.
|
|
13031
|
+
* Aspect ratio is always preserved.
|
|
13032
|
+
* - cover: Resizes (shrinks or enlarges) to fill the entire area of width
|
|
13033
|
+
* and height. If the image has an aspect ratio different from the ratio
|
|
13034
|
+
* of width and height, it will be cropped to fit.
|
|
13035
|
+
* - crop: The image will be shrunk and cropped to fit within the area
|
|
13036
|
+
* specified by width and height. The image will not be enlarged. For images
|
|
13037
|
+
* smaller than the given dimensions it's the same as scale-down. For
|
|
13038
|
+
* images larger than the given dimensions, it's the same as cover.
|
|
13039
|
+
* See also trim.
|
|
13040
|
+
* - pad: Resizes to the maximum size that fits within the given width and
|
|
13041
|
+
* height, and then fills the remaining area with a background color
|
|
13042
|
+
* (white by default). Use of this mode is not recommended, as the same
|
|
13043
|
+
* effect can be more efficiently achieved with the contain mode and the
|
|
13044
|
+
* CSS object-fit: contain property.
|
|
13045
|
+
* - squeeze: Stretches and deforms to the width and height given, even if it
|
|
13046
|
+
* breaks aspect ratio
|
|
13047
|
+
*/
|
|
13048
|
+
fit?:
|
|
13049
|
+
| "scale-down"
|
|
13050
|
+
| "scale-up"
|
|
13051
|
+
| "contain"
|
|
13052
|
+
| "cover"
|
|
13053
|
+
| "crop"
|
|
13054
|
+
| "pad"
|
|
13055
|
+
| "squeeze";
|
|
13056
|
+
/**
|
|
13057
|
+
* Allows you to trim your image. Takes dpr into account and is performed before
|
|
13058
|
+
* resizing or rotation.
|
|
13059
|
+
*
|
|
13060
|
+
* It can be used as:
|
|
13061
|
+
* - left, top, right, bottom - it will specify the number of pixels to cut
|
|
13062
|
+
* off each side
|
|
13063
|
+
* - width, height - the width/height you'd like to end up with - can be used
|
|
13064
|
+
* in combination with the properties above
|
|
13065
|
+
* - border - this will automatically trim the surroundings of an image based on
|
|
13066
|
+
* it's color. It consists of three properties:
|
|
13067
|
+
* - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
|
|
13068
|
+
* - tolerance: difference from color to treat as color
|
|
13069
|
+
* - keep: the number of pixels of border to keep
|
|
13070
|
+
*/
|
|
13071
|
+
trim?:
|
|
13072
|
+
| "border"
|
|
13073
|
+
| {
|
|
13074
|
+
top?: number;
|
|
13075
|
+
bottom?: number;
|
|
13076
|
+
left?: number;
|
|
13077
|
+
right?: number;
|
|
13078
|
+
width?: number;
|
|
13079
|
+
height?: number;
|
|
13080
|
+
border?:
|
|
13081
|
+
| boolean
|
|
13082
|
+
| {
|
|
13083
|
+
color?: string;
|
|
13084
|
+
tolerance?: number;
|
|
13085
|
+
keep?: number;
|
|
13086
|
+
};
|
|
13087
|
+
};
|
|
13088
|
+
/**
|
|
13089
|
+
* Background color to add underneath the image. Applies only to images with
|
|
13090
|
+
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
|
13091
|
+
* hsl(…), etc.)
|
|
13092
|
+
*/
|
|
13093
|
+
background?: string;
|
|
13094
|
+
/**
|
|
13095
|
+
* Flips the images horizontally, vertically, or both. Flipping is applied before
|
|
13096
|
+
* rotation, so if you apply flip=h,rotate=90 then the image will be flipped
|
|
13097
|
+
* horizontally, then rotated by 90 degrees.
|
|
13098
|
+
*/
|
|
13099
|
+
flip?: "h" | "v" | "hv";
|
|
13100
|
+
/**
|
|
13101
|
+
* Number of degrees (90, 180, 270) to rotate the image by. width and height
|
|
13102
|
+
* options refer to axes after rotation.
|
|
13103
|
+
*/
|
|
13104
|
+
rotate?: 0 | 90 | 180 | 270 | 360;
|
|
13105
|
+
/**
|
|
13106
|
+
* Strength of sharpening filter to apply to the image. Floating-point
|
|
13107
|
+
* number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
|
|
13108
|
+
* recommended value for downscaled images.
|
|
13109
|
+
*/
|
|
13110
|
+
sharpen?: number;
|
|
13111
|
+
/**
|
|
13112
|
+
* Radius of a blur filter (approximate gaussian). Maximum supported radius
|
|
13113
|
+
* is 250.
|
|
13114
|
+
*/
|
|
13115
|
+
blur?: number;
|
|
13116
|
+
/**
|
|
13117
|
+
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
13118
|
+
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
13119
|
+
* ignored.
|
|
13120
|
+
*/
|
|
13121
|
+
contrast?: number;
|
|
13122
|
+
/**
|
|
13123
|
+
* Increase brightness by a factor. A value of 1.0 equals no change, a value
|
|
13124
|
+
* of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
|
|
13125
|
+
* 0 is ignored.
|
|
13126
|
+
*/
|
|
13127
|
+
brightness?: number;
|
|
13128
|
+
/**
|
|
13129
|
+
* Increase exposure by a factor. A value of 1.0 equals no change, a value of
|
|
13130
|
+
* 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
|
|
13131
|
+
*/
|
|
13132
|
+
gamma?: number;
|
|
13133
|
+
/**
|
|
13134
|
+
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
13135
|
+
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
13136
|
+
* ignored.
|
|
13137
|
+
*/
|
|
13138
|
+
saturation?: number;
|
|
13139
|
+
/**
|
|
13140
|
+
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
|
13141
|
+
* easier to specify higher-DPI sizes in <img srcset>.
|
|
13142
|
+
*/
|
|
13143
|
+
dpr?: number;
|
|
13144
|
+
/**
|
|
13145
|
+
* Adds a border around the image. The border is added after resizing. Border
|
|
13146
|
+
* width takes dpr into account, and can be specified either using a single
|
|
13147
|
+
* width property, or individually for each side.
|
|
13148
|
+
*/
|
|
13149
|
+
border?:
|
|
13150
|
+
| {
|
|
13151
|
+
color: string;
|
|
13152
|
+
width: number;
|
|
13153
|
+
}
|
|
13154
|
+
| {
|
|
13155
|
+
color: string;
|
|
13156
|
+
top: number;
|
|
13157
|
+
right: number;
|
|
13158
|
+
bottom: number;
|
|
13159
|
+
left: number;
|
|
13160
|
+
};
|
|
13161
|
+
/**
|
|
13162
|
+
* Image segmentation using artificial intelligence models. Sets pixels not
|
|
13163
|
+
* within selected segment area to transparent e.g "foreground" sets every
|
|
13164
|
+
* background pixel as transparent.
|
|
13165
|
+
*/
|
|
13166
|
+
segment?: "foreground";
|
|
13167
|
+
/**
|
|
13168
|
+
* Controls the algorithm used when an image needs to be enlarged. This
|
|
13169
|
+
* parameter works with any fit mode that upscales, such as `contain`,
|
|
13170
|
+
* `cover`, and `scale-up`. It has no effect when `fit=scale-down` or when
|
|
13171
|
+
* the target dimensions are smaller than the source.
|
|
13172
|
+
* - interpolate: Uses bicubic interpolation, which may reduce image quality.
|
|
13173
|
+
* This is the default behavior when `upscale` is not specified.
|
|
13174
|
+
* - generate: Uses AI upscaling to produce sharper, more detailed results
|
|
13175
|
+
* when enlarging images.
|
|
13176
|
+
*/
|
|
13177
|
+
upscale?: "interpolate" | "generate";
|
|
13178
|
+
}
|
|
13179
|
+
interface BasicImageTransformationsGravityCoordinates {
|
|
13180
|
+
x?: number;
|
|
13181
|
+
y?: number;
|
|
13182
|
+
mode?: "remainder" | "box-center";
|
|
13183
|
+
}
|
|
13062
13184
|
interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
|
|
13063
13185
|
/**
|
|
13064
13186
|
* Absolute URL of the image file to use for the drawing. It can be any of
|
|
@@ -13112,43 +13234,6 @@ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
|
|
|
13112
13234
|
right?: number;
|
|
13113
13235
|
}
|
|
13114
13236
|
interface RequestInitCfPropertiesImage extends BasicImageTransformations {
|
|
13115
|
-
/**
|
|
13116
|
-
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
|
13117
|
-
* easier to specify higher-DPI sizes in <img srcset>.
|
|
13118
|
-
*/
|
|
13119
|
-
dpr?: number;
|
|
13120
|
-
/**
|
|
13121
|
-
* Allows you to trim your image. Takes dpr into account and is performed before
|
|
13122
|
-
* resizing or rotation.
|
|
13123
|
-
*
|
|
13124
|
-
* It can be used as:
|
|
13125
|
-
* - left, top, right, bottom - it will specify the number of pixels to cut
|
|
13126
|
-
* off each side
|
|
13127
|
-
* - width, height - the width/height you'd like to end up with - can be used
|
|
13128
|
-
* in combination with the properties above
|
|
13129
|
-
* - border - this will automatically trim the surroundings of an image based on
|
|
13130
|
-
* it's color. It consists of three properties:
|
|
13131
|
-
* - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
|
|
13132
|
-
* - tolerance: difference from color to treat as color
|
|
13133
|
-
* - keep: the number of pixels of border to keep
|
|
13134
|
-
*/
|
|
13135
|
-
trim?:
|
|
13136
|
-
| "border"
|
|
13137
|
-
| {
|
|
13138
|
-
top?: number;
|
|
13139
|
-
bottom?: number;
|
|
13140
|
-
left?: number;
|
|
13141
|
-
right?: number;
|
|
13142
|
-
width?: number;
|
|
13143
|
-
height?: number;
|
|
13144
|
-
border?:
|
|
13145
|
-
| boolean
|
|
13146
|
-
| {
|
|
13147
|
-
color?: string;
|
|
13148
|
-
tolerance?: number;
|
|
13149
|
-
keep?: number;
|
|
13150
|
-
};
|
|
13151
|
-
};
|
|
13152
13237
|
/**
|
|
13153
13238
|
* Quality setting from 1-100 (useful values are in 60-90 range). Lower values
|
|
13154
13239
|
* make images look worse, but load faster. The default is 85. It applies only
|
|
@@ -13198,17 +13283,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
|
|
|
13198
13283
|
* output formats always discard metadata.
|
|
13199
13284
|
*/
|
|
13200
13285
|
metadata?: "keep" | "copyright" | "none";
|
|
13201
|
-
/**
|
|
13202
|
-
* Strength of sharpening filter to apply to the image. Floating-point
|
|
13203
|
-
* number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
|
|
13204
|
-
* recommended value for downscaled images.
|
|
13205
|
-
*/
|
|
13206
|
-
sharpen?: number;
|
|
13207
|
-
/**
|
|
13208
|
-
* Radius of a blur filter (approximate gaussian). Maximum supported radius
|
|
13209
|
-
* is 250.
|
|
13210
|
-
*/
|
|
13211
|
-
blur?: number;
|
|
13212
13286
|
/**
|
|
13213
13287
|
* Overlays are drawn in the order they appear in the array (last array
|
|
13214
13288
|
* entry is the topmost layer).
|
|
@@ -13220,52 +13294,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
|
|
|
13220
13294
|
* the origin.
|
|
13221
13295
|
*/
|
|
13222
13296
|
"origin-auth"?: "share-publicly";
|
|
13223
|
-
/**
|
|
13224
|
-
* Adds a border around the image. The border is added after resizing. Border
|
|
13225
|
-
* width takes dpr into account, and can be specified either using a single
|
|
13226
|
-
* width property, or individually for each side.
|
|
13227
|
-
*/
|
|
13228
|
-
border?:
|
|
13229
|
-
| {
|
|
13230
|
-
color: string;
|
|
13231
|
-
width: number;
|
|
13232
|
-
}
|
|
13233
|
-
| {
|
|
13234
|
-
color: string;
|
|
13235
|
-
top: number;
|
|
13236
|
-
right: number;
|
|
13237
|
-
bottom: number;
|
|
13238
|
-
left: number;
|
|
13239
|
-
};
|
|
13240
|
-
/**
|
|
13241
|
-
* Increase brightness by a factor. A value of 1.0 equals no change, a value
|
|
13242
|
-
* of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
|
|
13243
|
-
* 0 is ignored.
|
|
13244
|
-
*/
|
|
13245
|
-
brightness?: number;
|
|
13246
|
-
/**
|
|
13247
|
-
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
13248
|
-
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
13249
|
-
* ignored.
|
|
13250
|
-
*/
|
|
13251
|
-
contrast?: number;
|
|
13252
|
-
/**
|
|
13253
|
-
* Increase exposure by a factor. A value of 1.0 equals no change, a value of
|
|
13254
|
-
* 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
|
|
13255
|
-
*/
|
|
13256
|
-
gamma?: number;
|
|
13257
|
-
/**
|
|
13258
|
-
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
13259
|
-
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
13260
|
-
* ignored.
|
|
13261
|
-
*/
|
|
13262
|
-
saturation?: number;
|
|
13263
|
-
/**
|
|
13264
|
-
* Flips the images horizontally, vertically, or both. Flipping is applied before
|
|
13265
|
-
* rotation, so if you apply flip=h,rotate=90 then the image will be flipped
|
|
13266
|
-
* horizontally, then rotated by 90 degrees.
|
|
13267
|
-
*/
|
|
13268
|
-
flip?: "h" | "v" | "hv";
|
|
13269
13297
|
/**
|
|
13270
13298
|
* Slightly reduces latency on a cache miss by selecting a
|
|
13271
13299
|
* quickest-to-compress file format, at a cost of increased file size and
|
|
@@ -15205,6 +15233,10 @@ declare namespace CloudflareWorkersModule {
|
|
|
15205
15233
|
timeout?: WorkflowTimeoutDuration | number;
|
|
15206
15234
|
sensitive?: WorkflowStepSensitivity;
|
|
15207
15235
|
};
|
|
15236
|
+
export type WorkflowStepRollbackConfig = Pick<
|
|
15237
|
+
WorkflowStepConfig,
|
|
15238
|
+
"retries" | "timeout"
|
|
15239
|
+
>;
|
|
15208
15240
|
export type WorkflowCronSchedule = {
|
|
15209
15241
|
/** Cron expression that triggered this event. */
|
|
15210
15242
|
cron: string;
|
|
@@ -15233,16 +15265,18 @@ declare namespace CloudflareWorkersModule {
|
|
|
15233
15265
|
config: WorkflowStepConfig;
|
|
15234
15266
|
};
|
|
15235
15267
|
export type WorkflowRollbackContext<T = unknown> = {
|
|
15268
|
+
ctx: WorkflowStepContext;
|
|
15236
15269
|
error: Error;
|
|
15237
15270
|
output: T | undefined;
|
|
15271
|
+
/** @deprecated Use `ctx.step.name` and `ctx.step.count` instead. */
|
|
15238
15272
|
stepName: string;
|
|
15239
15273
|
};
|
|
15240
15274
|
export type WorkflowRollbackHandler<T = unknown> = (
|
|
15241
15275
|
ctx: WorkflowRollbackContext<T>,
|
|
15242
15276
|
) => Promise<void>;
|
|
15243
15277
|
export type WorkflowStepRollbackOptions<T = unknown> = {
|
|
15244
|
-
rollback
|
|
15245
|
-
rollbackConfig?:
|
|
15278
|
+
rollback: WorkflowRollbackHandler<T>;
|
|
15279
|
+
rollbackConfig?: WorkflowStepRollbackConfig;
|
|
15246
15280
|
};
|
|
15247
15281
|
export abstract class WorkflowStep {
|
|
15248
15282
|
do<T extends Rpc.Serializable<T>>(
|