@cloudflare/workers-types 4.20260616.1 → 4.20260619.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2021-11-03/index.d.ts +307 -179
- package/2021-11-03/index.ts +307 -179
- package/2022-01-31/index.d.ts +307 -179
- package/2022-01-31/index.ts +307 -179
- package/2022-03-21/index.d.ts +307 -179
- package/2022-03-21/index.ts +307 -179
- package/2022-08-04/index.d.ts +307 -179
- package/2022-08-04/index.ts +307 -179
- package/2022-10-31/index.d.ts +307 -179
- package/2022-10-31/index.ts +307 -179
- package/2022-11-30/index.d.ts +307 -179
- package/2022-11-30/index.ts +307 -179
- package/2023-03-01/index.d.ts +307 -179
- package/2023-03-01/index.ts +307 -179
- package/2023-07-01/index.d.ts +307 -179
- package/2023-07-01/index.ts +307 -179
- package/experimental/index.d.ts +286 -179
- package/experimental/index.ts +286 -179
- package/index.d.ts +307 -179
- package/index.ts +307 -179
- package/latest/index.d.ts +307 -179
- package/latest/index.ts +307 -179
- package/oldest/index.d.ts +307 -179
- package/oldest/index.ts +307 -179
- package/package.json +1 -1
package/2022-11-30/index.d.ts
CHANGED
|
@@ -477,7 +477,8 @@ interface ExecutionContext<Props = unknown> {
|
|
|
477
477
|
passThroughOnException(): void;
|
|
478
478
|
readonly props: Props;
|
|
479
479
|
cache?: CacheContext;
|
|
480
|
-
|
|
480
|
+
readonly access?: CloudflareAccessContext;
|
|
481
|
+
tracing: Tracing;
|
|
481
482
|
}
|
|
482
483
|
type ExportedHandlerFetchHandler<
|
|
483
484
|
Env = unknown,
|
|
@@ -576,6 +577,10 @@ interface CachePurgeOptions {
|
|
|
576
577
|
interface CacheContext {
|
|
577
578
|
purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
|
|
578
579
|
}
|
|
580
|
+
interface CloudflareAccessContext {
|
|
581
|
+
readonly aud: string;
|
|
582
|
+
getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
|
|
583
|
+
}
|
|
579
584
|
declare abstract class ColoLocalActorNamespace {
|
|
580
585
|
get(actorId: string): Fetcher;
|
|
581
586
|
}
|
|
@@ -641,6 +646,8 @@ type DurableObjectLocationHint =
|
|
|
641
646
|
| "weur"
|
|
642
647
|
| "eeur"
|
|
643
648
|
| "apac"
|
|
649
|
+
| "apac-ne"
|
|
650
|
+
| "apac-se"
|
|
644
651
|
| "oc"
|
|
645
652
|
| "afr"
|
|
646
653
|
| "me";
|
|
@@ -782,6 +789,7 @@ interface DurableObjectFacets {
|
|
|
782
789
|
): Fetcher<T>;
|
|
783
790
|
abort(name: string, reason: any): void;
|
|
784
791
|
delete(name: string): void;
|
|
792
|
+
clone(src: string, dst: string): void;
|
|
785
793
|
}
|
|
786
794
|
interface FacetStartupOptions<
|
|
787
795
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
@@ -3830,6 +3838,28 @@ interface EventSourceEventSourceInit {
|
|
|
3830
3838
|
withCredentials?: boolean;
|
|
3831
3839
|
fetcher?: Fetcher;
|
|
3832
3840
|
}
|
|
3841
|
+
interface ExecOutput {
|
|
3842
|
+
readonly stdout: ArrayBuffer;
|
|
3843
|
+
readonly stderr: ArrayBuffer;
|
|
3844
|
+
readonly exitCode: number;
|
|
3845
|
+
}
|
|
3846
|
+
interface ContainerExecOptions {
|
|
3847
|
+
cwd?: string;
|
|
3848
|
+
env?: Record<string, string>;
|
|
3849
|
+
user?: string;
|
|
3850
|
+
stdin?: ReadableStream | "pipe";
|
|
3851
|
+
stdout?: "pipe" | "ignore";
|
|
3852
|
+
stderr?: "pipe" | "ignore" | "combined";
|
|
3853
|
+
}
|
|
3854
|
+
interface ExecProcess {
|
|
3855
|
+
readonly stdin: WritableStream | null;
|
|
3856
|
+
readonly stdout: ReadableStream | null;
|
|
3857
|
+
readonly stderr: ReadableStream | null;
|
|
3858
|
+
readonly pid: number;
|
|
3859
|
+
readonly exitCode: Promise<number>;
|
|
3860
|
+
output(): Promise<ExecOutput>;
|
|
3861
|
+
kill(signal?: number): void;
|
|
3862
|
+
}
|
|
3833
3863
|
interface Container {
|
|
3834
3864
|
get running(): boolean;
|
|
3835
3865
|
start(options?: ContainerStartupOptions): void;
|
|
@@ -3847,6 +3877,7 @@ interface Container {
|
|
|
3847
3877
|
options: ContainerSnapshotOptions,
|
|
3848
3878
|
): Promise<ContainerSnapshot>;
|
|
3849
3879
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3880
|
+
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
3850
3881
|
}
|
|
3851
3882
|
interface ContainerDirectorySnapshot {
|
|
3852
3883
|
id: string;
|
|
@@ -4021,11 +4052,62 @@ interface Tracing {
|
|
|
4021
4052
|
callback: (span: Span, ...args: A) => T,
|
|
4022
4053
|
...args: A
|
|
4023
4054
|
): T;
|
|
4055
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
4056
|
+
name: string,
|
|
4057
|
+
callback: (span: Span, ...args: A) => T,
|
|
4058
|
+
...args: A
|
|
4059
|
+
): T;
|
|
4024
4060
|
Span: typeof Span;
|
|
4025
4061
|
}
|
|
4026
4062
|
declare abstract class Span {
|
|
4027
4063
|
get isTraced(): boolean;
|
|
4028
4064
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
4065
|
+
end(): void;
|
|
4066
|
+
}
|
|
4067
|
+
/**
|
|
4068
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
4069
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
4070
|
+
*
|
|
4071
|
+
* The exact structure of the returned object depends on the identity provider
|
|
4072
|
+
* configuration for the Access application. The fields below represent commonly
|
|
4073
|
+
* available properties, but additional provider-specific fields may be present.
|
|
4074
|
+
*/
|
|
4075
|
+
interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
4076
|
+
/** The user's email address, if available from the identity provider. */
|
|
4077
|
+
email?: string;
|
|
4078
|
+
/** The user's display name. */
|
|
4079
|
+
name?: string;
|
|
4080
|
+
/** The user's unique identifier. */
|
|
4081
|
+
user_uuid?: string;
|
|
4082
|
+
/** The Cloudflare account ID. */
|
|
4083
|
+
account_id?: string;
|
|
4084
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
4085
|
+
iat?: number;
|
|
4086
|
+
/** The user's IP address at authentication time. */
|
|
4087
|
+
ip?: string;
|
|
4088
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
4089
|
+
amr?: string[];
|
|
4090
|
+
/** Identity provider information. */
|
|
4091
|
+
idp?: {
|
|
4092
|
+
id: string;
|
|
4093
|
+
type: string;
|
|
4094
|
+
};
|
|
4095
|
+
/** Geographic information about where the user authenticated. */
|
|
4096
|
+
geo?: {
|
|
4097
|
+
country: string;
|
|
4098
|
+
};
|
|
4099
|
+
/** Group memberships from the identity provider. */
|
|
4100
|
+
groups?: Array<{
|
|
4101
|
+
id: string;
|
|
4102
|
+
name: string;
|
|
4103
|
+
email?: string;
|
|
4104
|
+
}>;
|
|
4105
|
+
/** Device posture check results, keyed by check ID. */
|
|
4106
|
+
devicePosture?: Record<string, unknown>;
|
|
4107
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4108
|
+
is_warp?: boolean;
|
|
4109
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4110
|
+
is_gateway?: boolean;
|
|
4029
4111
|
}
|
|
4030
4112
|
// ============================================================================
|
|
4031
4113
|
// Agent Memory
|
|
@@ -12176,87 +12258,6 @@ declare abstract class BrowserRun {
|
|
|
12176
12258
|
options: BrowserRunMarkdownOptions,
|
|
12177
12259
|
): Promise<Response>;
|
|
12178
12260
|
}
|
|
12179
|
-
interface BasicImageTransformations {
|
|
12180
|
-
/**
|
|
12181
|
-
* Maximum width in image pixels. The value must be an integer.
|
|
12182
|
-
*/
|
|
12183
|
-
width?: number;
|
|
12184
|
-
/**
|
|
12185
|
-
* Maximum height in image pixels. The value must be an integer.
|
|
12186
|
-
*/
|
|
12187
|
-
height?: number;
|
|
12188
|
-
/**
|
|
12189
|
-
* Resizing mode as a string. It affects interpretation of width and height
|
|
12190
|
-
* options:
|
|
12191
|
-
* - scale-down: Similar to contain, but the image is never enlarged. If
|
|
12192
|
-
* the image is larger than given width or height, it will be resized.
|
|
12193
|
-
* Otherwise its original size will be kept.
|
|
12194
|
-
* - contain: Resizes to maximum size that fits within the given width and
|
|
12195
|
-
* height. If only a single dimension is given (e.g. only width), the
|
|
12196
|
-
* image will be shrunk or enlarged to exactly match that dimension.
|
|
12197
|
-
* Aspect ratio is always preserved.
|
|
12198
|
-
* - cover: Resizes (shrinks or enlarges) to fill the entire area of width
|
|
12199
|
-
* and height. If the image has an aspect ratio different from the ratio
|
|
12200
|
-
* of width and height, it will be cropped to fit.
|
|
12201
|
-
* - crop: The image will be shrunk and cropped to fit within the area
|
|
12202
|
-
* specified by width and height. The image will not be enlarged. For images
|
|
12203
|
-
* smaller than the given dimensions it's the same as scale-down. For
|
|
12204
|
-
* images larger than the given dimensions, it's the same as cover.
|
|
12205
|
-
* See also trim.
|
|
12206
|
-
* - pad: Resizes to the maximum size that fits within the given width and
|
|
12207
|
-
* height, and then fills the remaining area with a background color
|
|
12208
|
-
* (white by default). Use of this mode is not recommended, as the same
|
|
12209
|
-
* effect can be more efficiently achieved with the contain mode and the
|
|
12210
|
-
* CSS object-fit: contain property.
|
|
12211
|
-
* - squeeze: Stretches and deforms to the width and height given, even if it
|
|
12212
|
-
* breaks aspect ratio
|
|
12213
|
-
*/
|
|
12214
|
-
fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
|
|
12215
|
-
/**
|
|
12216
|
-
* Image segmentation using artificial intelligence models. Sets pixels not
|
|
12217
|
-
* within selected segment area to transparent e.g "foreground" sets every
|
|
12218
|
-
* background pixel as transparent.
|
|
12219
|
-
*/
|
|
12220
|
-
segment?: "foreground";
|
|
12221
|
-
/**
|
|
12222
|
-
* When cropping with fit: "cover", this defines the side or point that should
|
|
12223
|
-
* be left uncropped. The value is either a string
|
|
12224
|
-
* "left", "right", "top", "bottom", "auto", or "center" (the default),
|
|
12225
|
-
* or an object {x, y} containing focal point coordinates in the original
|
|
12226
|
-
* image expressed as fractions ranging from 0.0 (top or left) to 1.0
|
|
12227
|
-
* (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
|
|
12228
|
-
* crop bottom or left and right sides as necessary, but won’t crop anything
|
|
12229
|
-
* from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
|
|
12230
|
-
* preserve as much as possible around a point at 20% of the height of the
|
|
12231
|
-
* source image.
|
|
12232
|
-
*/
|
|
12233
|
-
gravity?:
|
|
12234
|
-
| "face"
|
|
12235
|
-
| "left"
|
|
12236
|
-
| "right"
|
|
12237
|
-
| "top"
|
|
12238
|
-
| "bottom"
|
|
12239
|
-
| "center"
|
|
12240
|
-
| "auto"
|
|
12241
|
-
| "entropy"
|
|
12242
|
-
| BasicImageTransformationsGravityCoordinates;
|
|
12243
|
-
/**
|
|
12244
|
-
* Background color to add underneath the image. Applies only to images with
|
|
12245
|
-
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
|
12246
|
-
* hsl(…), etc.)
|
|
12247
|
-
*/
|
|
12248
|
-
background?: string;
|
|
12249
|
-
/**
|
|
12250
|
-
* Number of degrees (90, 180, 270) to rotate the image by. width and height
|
|
12251
|
-
* options refer to axes after rotation.
|
|
12252
|
-
*/
|
|
12253
|
-
rotate?: 0 | 90 | 180 | 270 | 360;
|
|
12254
|
-
}
|
|
12255
|
-
interface BasicImageTransformationsGravityCoordinates {
|
|
12256
|
-
x?: number;
|
|
12257
|
-
y?: number;
|
|
12258
|
-
mode?: "remainder" | "box-center";
|
|
12259
|
-
}
|
|
12260
12261
|
/**
|
|
12261
12262
|
* In addition to the properties you can set in the RequestInit dict
|
|
12262
12263
|
* that you pass as an argument to the Request constructor, you can
|
|
@@ -12332,6 +12333,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12332
12333
|
cacheReserveMinimumFileSize?: number;
|
|
12333
12334
|
scrapeShield?: boolean;
|
|
12334
12335
|
apps?: boolean;
|
|
12336
|
+
/**
|
|
12337
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
12338
|
+
* converted to gRPC at the Cloudflare edge.
|
|
12339
|
+
*
|
|
12340
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
12341
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
12342
|
+
*
|
|
12343
|
+
* Provides per-request control over the same edge conversion behavior
|
|
12344
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
12345
|
+
*/
|
|
12346
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12335
12347
|
image?: RequestInitCfPropertiesImage;
|
|
12336
12348
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12337
12349
|
mirage?: boolean;
|
|
@@ -12352,6 +12364,209 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12352
12364
|
*/
|
|
12353
12365
|
resolveOverride?: string;
|
|
12354
12366
|
}
|
|
12367
|
+
interface BasicImageTransformations {
|
|
12368
|
+
/**
|
|
12369
|
+
* Maximum width in image pixels. The value must be an integer.
|
|
12370
|
+
*/
|
|
12371
|
+
width?: number;
|
|
12372
|
+
/**
|
|
12373
|
+
* Maximum height in image pixels. The value must be an integer.
|
|
12374
|
+
*/
|
|
12375
|
+
height?: number;
|
|
12376
|
+
/**
|
|
12377
|
+
* When cropping with fit: "cover", this defines the side or point that should
|
|
12378
|
+
* be left uncropped. The value is either a string
|
|
12379
|
+
* "left", "right", "top", "bottom", "auto", or "center" (the default),
|
|
12380
|
+
* or an object {x, y} containing focal point coordinates in the original
|
|
12381
|
+
* image expressed as fractions ranging from 0.0 (top or left) to 1.0
|
|
12382
|
+
* (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
|
|
12383
|
+
* crop bottom or left and right sides as necessary, but won’t crop anything
|
|
12384
|
+
* from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
|
|
12385
|
+
* preserve as much as possible around a point at 20% of the height of the
|
|
12386
|
+
* source image.
|
|
12387
|
+
*/
|
|
12388
|
+
gravity?:
|
|
12389
|
+
| "face"
|
|
12390
|
+
| "left"
|
|
12391
|
+
| "right"
|
|
12392
|
+
| "top"
|
|
12393
|
+
| "bottom"
|
|
12394
|
+
| "center"
|
|
12395
|
+
| "auto"
|
|
12396
|
+
| "entropy"
|
|
12397
|
+
| BasicImageTransformationsGravityCoordinates;
|
|
12398
|
+
/**
|
|
12399
|
+
* Specifies how closely the image is cropped toward detected faces when combined
|
|
12400
|
+
* with the gravity=face option. Accepts a valid range between 0.0 (includes as much
|
|
12401
|
+
* of the background as possible) and 1.0 (crops the image as closely to the face as
|
|
12402
|
+
* possible). The default is 0.
|
|
12403
|
+
*/
|
|
12404
|
+
zoom?: number;
|
|
12405
|
+
/**
|
|
12406
|
+
* Resizing mode as a string. It affects interpretation of width and height
|
|
12407
|
+
* options:
|
|
12408
|
+
* - scale-down: Similar to contain, but the image is never enlarged. If
|
|
12409
|
+
* the image is larger than given width or height, it will be resized.
|
|
12410
|
+
* Otherwise its original size will be kept.
|
|
12411
|
+
* - scale-up: Similar to contain, but the image is never shrunk. If the
|
|
12412
|
+
* image is smaller than the given width or height, it will be resized.
|
|
12413
|
+
* Otherwise its original size will be kept.
|
|
12414
|
+
* - contain: Resizes to maximum size that fits within the given width and
|
|
12415
|
+
* height. If only a single dimension is given (e.g. only width), the
|
|
12416
|
+
* image will be shrunk or enlarged to exactly match that dimension.
|
|
12417
|
+
* Aspect ratio is always preserved.
|
|
12418
|
+
* - cover: Resizes (shrinks or enlarges) to fill the entire area of width
|
|
12419
|
+
* and height. If the image has an aspect ratio different from the ratio
|
|
12420
|
+
* of width and height, it will be cropped to fit.
|
|
12421
|
+
* - crop: The image will be shrunk and cropped to fit within the area
|
|
12422
|
+
* specified by width and height. The image will not be enlarged. For images
|
|
12423
|
+
* smaller than the given dimensions it's the same as scale-down. For
|
|
12424
|
+
* images larger than the given dimensions, it's the same as cover.
|
|
12425
|
+
* See also trim.
|
|
12426
|
+
* - pad: Resizes to the maximum size that fits within the given width and
|
|
12427
|
+
* height, and then fills the remaining area with a background color
|
|
12428
|
+
* (white by default). Use of this mode is not recommended, as the same
|
|
12429
|
+
* effect can be more efficiently achieved with the contain mode and the
|
|
12430
|
+
* CSS object-fit: contain property.
|
|
12431
|
+
* - squeeze: Stretches and deforms to the width and height given, even if it
|
|
12432
|
+
* breaks aspect ratio
|
|
12433
|
+
*/
|
|
12434
|
+
fit?:
|
|
12435
|
+
| "scale-down"
|
|
12436
|
+
| "scale-up"
|
|
12437
|
+
| "contain"
|
|
12438
|
+
| "cover"
|
|
12439
|
+
| "crop"
|
|
12440
|
+
| "pad"
|
|
12441
|
+
| "squeeze";
|
|
12442
|
+
/**
|
|
12443
|
+
* Allows you to trim your image. Takes dpr into account and is performed before
|
|
12444
|
+
* resizing or rotation.
|
|
12445
|
+
*
|
|
12446
|
+
* It can be used as:
|
|
12447
|
+
* - left, top, right, bottom - it will specify the number of pixels to cut
|
|
12448
|
+
* off each side
|
|
12449
|
+
* - width, height - the width/height you'd like to end up with - can be used
|
|
12450
|
+
* in combination with the properties above
|
|
12451
|
+
* - border - this will automatically trim the surroundings of an image based on
|
|
12452
|
+
* it's color. It consists of three properties:
|
|
12453
|
+
* - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
|
|
12454
|
+
* - tolerance: difference from color to treat as color
|
|
12455
|
+
* - keep: the number of pixels of border to keep
|
|
12456
|
+
*/
|
|
12457
|
+
trim?:
|
|
12458
|
+
| "border"
|
|
12459
|
+
| {
|
|
12460
|
+
top?: number;
|
|
12461
|
+
bottom?: number;
|
|
12462
|
+
left?: number;
|
|
12463
|
+
right?: number;
|
|
12464
|
+
width?: number;
|
|
12465
|
+
height?: number;
|
|
12466
|
+
border?:
|
|
12467
|
+
| boolean
|
|
12468
|
+
| {
|
|
12469
|
+
color?: string;
|
|
12470
|
+
tolerance?: number;
|
|
12471
|
+
keep?: number;
|
|
12472
|
+
};
|
|
12473
|
+
};
|
|
12474
|
+
/**
|
|
12475
|
+
* Background color to add underneath the image. Applies only to images with
|
|
12476
|
+
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
|
12477
|
+
* hsl(…), etc.)
|
|
12478
|
+
*/
|
|
12479
|
+
background?: string;
|
|
12480
|
+
/**
|
|
12481
|
+
* Flips the images horizontally, vertically, or both. Flipping is applied before
|
|
12482
|
+
* rotation, so if you apply flip=h,rotate=90 then the image will be flipped
|
|
12483
|
+
* horizontally, then rotated by 90 degrees.
|
|
12484
|
+
*/
|
|
12485
|
+
flip?: "h" | "v" | "hv";
|
|
12486
|
+
/**
|
|
12487
|
+
* Number of degrees (90, 180, 270) to rotate the image by. width and height
|
|
12488
|
+
* options refer to axes after rotation.
|
|
12489
|
+
*/
|
|
12490
|
+
rotate?: 0 | 90 | 180 | 270 | 360;
|
|
12491
|
+
/**
|
|
12492
|
+
* Strength of sharpening filter to apply to the image. Floating-point
|
|
12493
|
+
* number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
|
|
12494
|
+
* recommended value for downscaled images.
|
|
12495
|
+
*/
|
|
12496
|
+
sharpen?: number;
|
|
12497
|
+
/**
|
|
12498
|
+
* Radius of a blur filter (approximate gaussian). Maximum supported radius
|
|
12499
|
+
* is 250.
|
|
12500
|
+
*/
|
|
12501
|
+
blur?: number;
|
|
12502
|
+
/**
|
|
12503
|
+
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12504
|
+
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12505
|
+
* ignored.
|
|
12506
|
+
*/
|
|
12507
|
+
contrast?: number;
|
|
12508
|
+
/**
|
|
12509
|
+
* Increase brightness by a factor. A value of 1.0 equals no change, a value
|
|
12510
|
+
* of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
|
|
12511
|
+
* 0 is ignored.
|
|
12512
|
+
*/
|
|
12513
|
+
brightness?: number;
|
|
12514
|
+
/**
|
|
12515
|
+
* Increase exposure by a factor. A value of 1.0 equals no change, a value of
|
|
12516
|
+
* 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
|
|
12517
|
+
*/
|
|
12518
|
+
gamma?: number;
|
|
12519
|
+
/**
|
|
12520
|
+
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12521
|
+
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12522
|
+
* ignored.
|
|
12523
|
+
*/
|
|
12524
|
+
saturation?: number;
|
|
12525
|
+
/**
|
|
12526
|
+
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
|
12527
|
+
* easier to specify higher-DPI sizes in <img srcset>.
|
|
12528
|
+
*/
|
|
12529
|
+
dpr?: number;
|
|
12530
|
+
/**
|
|
12531
|
+
* Adds a border around the image. The border is added after resizing. Border
|
|
12532
|
+
* width takes dpr into account, and can be specified either using a single
|
|
12533
|
+
* width property, or individually for each side.
|
|
12534
|
+
*/
|
|
12535
|
+
border?:
|
|
12536
|
+
| {
|
|
12537
|
+
color: string;
|
|
12538
|
+
width: number;
|
|
12539
|
+
}
|
|
12540
|
+
| {
|
|
12541
|
+
color: string;
|
|
12542
|
+
top: number;
|
|
12543
|
+
right: number;
|
|
12544
|
+
bottom: number;
|
|
12545
|
+
left: number;
|
|
12546
|
+
};
|
|
12547
|
+
/**
|
|
12548
|
+
* Image segmentation using artificial intelligence models. Sets pixels not
|
|
12549
|
+
* within selected segment area to transparent e.g "foreground" sets every
|
|
12550
|
+
* background pixel as transparent.
|
|
12551
|
+
*/
|
|
12552
|
+
segment?: "foreground";
|
|
12553
|
+
/**
|
|
12554
|
+
* Controls the algorithm used when an image needs to be enlarged. This
|
|
12555
|
+
* parameter works with any fit mode that upscales, such as `contain`,
|
|
12556
|
+
* `cover`, and `scale-up`. It has no effect when `fit=scale-down` or when
|
|
12557
|
+
* the target dimensions are smaller than the source.
|
|
12558
|
+
* - interpolate: Uses bicubic interpolation, which may reduce image quality.
|
|
12559
|
+
* This is the default behavior when `upscale` is not specified.
|
|
12560
|
+
* - generate: Uses AI upscaling to produce sharper, more detailed results
|
|
12561
|
+
* when enlarging images.
|
|
12562
|
+
*/
|
|
12563
|
+
upscale?: "interpolate" | "generate";
|
|
12564
|
+
}
|
|
12565
|
+
interface BasicImageTransformationsGravityCoordinates {
|
|
12566
|
+
x?: number;
|
|
12567
|
+
y?: number;
|
|
12568
|
+
mode?: "remainder" | "box-center";
|
|
12569
|
+
}
|
|
12355
12570
|
interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
|
|
12356
12571
|
/**
|
|
12357
12572
|
* Absolute URL of the image file to use for the drawing. It can be any of
|
|
@@ -12405,43 +12620,6 @@ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
|
|
|
12405
12620
|
right?: number;
|
|
12406
12621
|
}
|
|
12407
12622
|
interface RequestInitCfPropertiesImage extends BasicImageTransformations {
|
|
12408
|
-
/**
|
|
12409
|
-
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
|
12410
|
-
* easier to specify higher-DPI sizes in <img srcset>.
|
|
12411
|
-
*/
|
|
12412
|
-
dpr?: number;
|
|
12413
|
-
/**
|
|
12414
|
-
* Allows you to trim your image. Takes dpr into account and is performed before
|
|
12415
|
-
* resizing or rotation.
|
|
12416
|
-
*
|
|
12417
|
-
* It can be used as:
|
|
12418
|
-
* - left, top, right, bottom - it will specify the number of pixels to cut
|
|
12419
|
-
* off each side
|
|
12420
|
-
* - width, height - the width/height you'd like to end up with - can be used
|
|
12421
|
-
* in combination with the properties above
|
|
12422
|
-
* - border - this will automatically trim the surroundings of an image based on
|
|
12423
|
-
* it's color. It consists of three properties:
|
|
12424
|
-
* - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit)
|
|
12425
|
-
* - tolerance: difference from color to treat as color
|
|
12426
|
-
* - keep: the number of pixels of border to keep
|
|
12427
|
-
*/
|
|
12428
|
-
trim?:
|
|
12429
|
-
| "border"
|
|
12430
|
-
| {
|
|
12431
|
-
top?: number;
|
|
12432
|
-
bottom?: number;
|
|
12433
|
-
left?: number;
|
|
12434
|
-
right?: number;
|
|
12435
|
-
width?: number;
|
|
12436
|
-
height?: number;
|
|
12437
|
-
border?:
|
|
12438
|
-
| boolean
|
|
12439
|
-
| {
|
|
12440
|
-
color?: string;
|
|
12441
|
-
tolerance?: number;
|
|
12442
|
-
keep?: number;
|
|
12443
|
-
};
|
|
12444
|
-
};
|
|
12445
12623
|
/**
|
|
12446
12624
|
* Quality setting from 1-100 (useful values are in 60-90 range). Lower values
|
|
12447
12625
|
* make images look worse, but load faster. The default is 85. It applies only
|
|
@@ -12491,17 +12669,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
|
|
|
12491
12669
|
* output formats always discard metadata.
|
|
12492
12670
|
*/
|
|
12493
12671
|
metadata?: "keep" | "copyright" | "none";
|
|
12494
|
-
/**
|
|
12495
|
-
* Strength of sharpening filter to apply to the image. Floating-point
|
|
12496
|
-
* number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
|
|
12497
|
-
* recommended value for downscaled images.
|
|
12498
|
-
*/
|
|
12499
|
-
sharpen?: number;
|
|
12500
|
-
/**
|
|
12501
|
-
* Radius of a blur filter (approximate gaussian). Maximum supported radius
|
|
12502
|
-
* is 250.
|
|
12503
|
-
*/
|
|
12504
|
-
blur?: number;
|
|
12505
12672
|
/**
|
|
12506
12673
|
* Overlays are drawn in the order they appear in the array (last array
|
|
12507
12674
|
* entry is the topmost layer).
|
|
@@ -12513,52 +12680,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
|
|
|
12513
12680
|
* the origin.
|
|
12514
12681
|
*/
|
|
12515
12682
|
"origin-auth"?: "share-publicly";
|
|
12516
|
-
/**
|
|
12517
|
-
* Adds a border around the image. The border is added after resizing. Border
|
|
12518
|
-
* width takes dpr into account, and can be specified either using a single
|
|
12519
|
-
* width property, or individually for each side.
|
|
12520
|
-
*/
|
|
12521
|
-
border?:
|
|
12522
|
-
| {
|
|
12523
|
-
color: string;
|
|
12524
|
-
width: number;
|
|
12525
|
-
}
|
|
12526
|
-
| {
|
|
12527
|
-
color: string;
|
|
12528
|
-
top: number;
|
|
12529
|
-
right: number;
|
|
12530
|
-
bottom: number;
|
|
12531
|
-
left: number;
|
|
12532
|
-
};
|
|
12533
|
-
/**
|
|
12534
|
-
* Increase brightness by a factor. A value of 1.0 equals no change, a value
|
|
12535
|
-
* of 0.5 equals half brightness, and a value of 2.0 equals twice as bright.
|
|
12536
|
-
* 0 is ignored.
|
|
12537
|
-
*/
|
|
12538
|
-
brightness?: number;
|
|
12539
|
-
/**
|
|
12540
|
-
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12541
|
-
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12542
|
-
* ignored.
|
|
12543
|
-
*/
|
|
12544
|
-
contrast?: number;
|
|
12545
|
-
/**
|
|
12546
|
-
* Increase exposure by a factor. A value of 1.0 equals no change, a value of
|
|
12547
|
-
* 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored.
|
|
12548
|
-
*/
|
|
12549
|
-
gamma?: number;
|
|
12550
|
-
/**
|
|
12551
|
-
* Increase contrast by a factor. A value of 1.0 equals no change, a value of
|
|
12552
|
-
* 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is
|
|
12553
|
-
* ignored.
|
|
12554
|
-
*/
|
|
12555
|
-
saturation?: number;
|
|
12556
|
-
/**
|
|
12557
|
-
* Flips the images horizontally, vertically, or both. Flipping is applied before
|
|
12558
|
-
* rotation, so if you apply flip=h,rotate=90 then the image will be flipped
|
|
12559
|
-
* horizontally, then rotated by 90 degrees.
|
|
12560
|
-
*/
|
|
12561
|
-
flip?: "h" | "v" | "hv";
|
|
12562
12683
|
/**
|
|
12563
12684
|
* Slightly reduces latency on a cache miss by selecting a
|
|
12564
12685
|
* quickest-to-compress file format, at a cost of increased file size and
|
|
@@ -14498,6 +14619,10 @@ declare namespace CloudflareWorkersModule {
|
|
|
14498
14619
|
timeout?: WorkflowTimeoutDuration | number;
|
|
14499
14620
|
sensitive?: WorkflowStepSensitivity;
|
|
14500
14621
|
};
|
|
14622
|
+
export type WorkflowStepRollbackConfig = Pick<
|
|
14623
|
+
WorkflowStepConfig,
|
|
14624
|
+
"retries" | "timeout"
|
|
14625
|
+
>;
|
|
14501
14626
|
export type WorkflowCronSchedule = {
|
|
14502
14627
|
/** Cron expression that triggered this event. */
|
|
14503
14628
|
cron: string;
|
|
@@ -14526,16 +14651,18 @@ declare namespace CloudflareWorkersModule {
|
|
|
14526
14651
|
config: WorkflowStepConfig;
|
|
14527
14652
|
};
|
|
14528
14653
|
export type WorkflowRollbackContext<T = unknown> = {
|
|
14654
|
+
ctx: WorkflowStepContext;
|
|
14529
14655
|
error: Error;
|
|
14530
14656
|
output: T | undefined;
|
|
14657
|
+
/** @deprecated Use `ctx.step.name` and `ctx.step.count` instead. */
|
|
14531
14658
|
stepName: string;
|
|
14532
14659
|
};
|
|
14533
14660
|
export type WorkflowRollbackHandler<T = unknown> = (
|
|
14534
14661
|
ctx: WorkflowRollbackContext<T>,
|
|
14535
14662
|
) => Promise<void>;
|
|
14536
14663
|
export type WorkflowStepRollbackOptions<T = unknown> = {
|
|
14537
|
-
rollback
|
|
14538
|
-
rollbackConfig?:
|
|
14664
|
+
rollback: WorkflowRollbackHandler<T>;
|
|
14665
|
+
rollbackConfig?: WorkflowStepRollbackConfig;
|
|
14539
14666
|
};
|
|
14540
14667
|
export abstract class WorkflowStep {
|
|
14541
14668
|
do<T extends Rpc.Serializable<T>>(
|
|
@@ -15504,7 +15631,8 @@ declare namespace TailStream {
|
|
|
15504
15631
|
| "loadShed"
|
|
15505
15632
|
| "responseStreamDisconnected"
|
|
15506
15633
|
| "scriptNotFound"
|
|
15507
|
-
| "internalError"
|
|
15634
|
+
| "internalError"
|
|
15635
|
+
| "exceededWallTime";
|
|
15508
15636
|
interface ScriptVersion {
|
|
15509
15637
|
readonly id: string;
|
|
15510
15638
|
readonly tag?: string;
|