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