@cloudflare/workers-types 4.20260304.0 → 4.20260305.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 +96 -0
- package/2021-11-03/index.ts +96 -0
- package/2022-01-31/index.d.ts +96 -0
- package/2022-01-31/index.ts +96 -0
- package/2022-03-21/index.d.ts +96 -0
- package/2022-03-21/index.ts +96 -0
- package/2022-08-04/index.d.ts +96 -0
- package/2022-08-04/index.ts +96 -0
- package/2022-10-31/index.d.ts +96 -0
- package/2022-10-31/index.ts +96 -0
- package/2022-11-30/index.d.ts +96 -0
- package/2022-11-30/index.ts +96 -0
- package/2023-03-01/index.d.ts +96 -0
- package/2023-03-01/index.ts +96 -0
- package/2023-07-01/index.d.ts +96 -0
- package/2023-07-01/index.ts +96 -0
- package/experimental/index.d.ts +122 -6
- package/experimental/index.ts +122 -6
- package/index.d.ts +96 -0
- package/index.ts +96 -0
- package/latest/index.d.ts +96 -0
- package/latest/index.ts +96 -0
- package/oldest/index.d.ts +96 -0
- package/oldest/index.ts +96 -0
- package/package.json +1 -1
package/2023-07-01/index.ts
CHANGED
|
@@ -3609,6 +3609,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3609
3609
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3610
3610
|
*/
|
|
3611
3611
|
extensions: string | null;
|
|
3612
|
+
/**
|
|
3613
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3614
|
+
*
|
|
3615
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3616
|
+
*/
|
|
3617
|
+
binaryType: "blob" | "arraybuffer";
|
|
3612
3618
|
}
|
|
3613
3619
|
export declare const WebSocketPair: {
|
|
3614
3620
|
new (): {
|
|
@@ -3857,6 +3863,12 @@ export declare abstract class Performance {
|
|
|
3857
3863
|
get timeOrigin(): number;
|
|
3858
3864
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3859
3865
|
now(): number;
|
|
3866
|
+
/**
|
|
3867
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
3868
|
+
*
|
|
3869
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3870
|
+
*/
|
|
3871
|
+
toJSON(): object;
|
|
3860
3872
|
}
|
|
3861
3873
|
// AI Search V2 API Error Interfaces
|
|
3862
3874
|
export interface AiSearchInternalError extends Error {}
|
|
@@ -11273,6 +11285,86 @@ export type ImageOutputOptions = {
|
|
|
11273
11285
|
background?: string;
|
|
11274
11286
|
anim?: boolean;
|
|
11275
11287
|
};
|
|
11288
|
+
export interface ImageMetadata {
|
|
11289
|
+
id: string;
|
|
11290
|
+
filename?: string;
|
|
11291
|
+
uploaded?: string;
|
|
11292
|
+
requireSignedURLs: boolean;
|
|
11293
|
+
meta?: Record<string, unknown>;
|
|
11294
|
+
variants: string[];
|
|
11295
|
+
draft?: boolean;
|
|
11296
|
+
creator?: string;
|
|
11297
|
+
}
|
|
11298
|
+
export interface ImageUploadOptions {
|
|
11299
|
+
id?: string;
|
|
11300
|
+
filename?: string;
|
|
11301
|
+
requireSignedURLs?: boolean;
|
|
11302
|
+
metadata?: Record<string, unknown>;
|
|
11303
|
+
creator?: string;
|
|
11304
|
+
encoding?: "base64";
|
|
11305
|
+
}
|
|
11306
|
+
export interface ImageUpdateOptions {
|
|
11307
|
+
requireSignedURLs?: boolean;
|
|
11308
|
+
metadata?: Record<string, unknown>;
|
|
11309
|
+
creator?: string;
|
|
11310
|
+
}
|
|
11311
|
+
export interface ImageListOptions {
|
|
11312
|
+
limit?: number;
|
|
11313
|
+
cursor?: string;
|
|
11314
|
+
sortOrder?: "asc" | "desc";
|
|
11315
|
+
creator?: string;
|
|
11316
|
+
}
|
|
11317
|
+
export interface ImageList {
|
|
11318
|
+
images: ImageMetadata[];
|
|
11319
|
+
cursor?: string;
|
|
11320
|
+
listComplete: boolean;
|
|
11321
|
+
}
|
|
11322
|
+
export interface HostedImagesBinding {
|
|
11323
|
+
/**
|
|
11324
|
+
* Get detailed metadata for a hosted image
|
|
11325
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11326
|
+
* @returns Image metadata, or null if not found
|
|
11327
|
+
*/
|
|
11328
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11329
|
+
/**
|
|
11330
|
+
* Get the raw image data for a hosted image
|
|
11331
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11332
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11333
|
+
*/
|
|
11334
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11335
|
+
/**
|
|
11336
|
+
* Upload a new hosted image
|
|
11337
|
+
* @param image The image file to upload
|
|
11338
|
+
* @param options Upload configuration
|
|
11339
|
+
* @returns Metadata for the uploaded image
|
|
11340
|
+
* @throws {@link ImagesError} if upload fails
|
|
11341
|
+
*/
|
|
11342
|
+
upload(
|
|
11343
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11344
|
+
options?: ImageUploadOptions,
|
|
11345
|
+
): Promise<ImageMetadata>;
|
|
11346
|
+
/**
|
|
11347
|
+
* Update hosted image metadata
|
|
11348
|
+
* @param imageId The ID of the image
|
|
11349
|
+
* @param options Properties to update
|
|
11350
|
+
* @returns Updated image metadata
|
|
11351
|
+
* @throws {@link ImagesError} if update fails
|
|
11352
|
+
*/
|
|
11353
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11354
|
+
/**
|
|
11355
|
+
* Delete a hosted image
|
|
11356
|
+
* @param imageId The ID of the image
|
|
11357
|
+
* @returns True if deleted, false if not found
|
|
11358
|
+
*/
|
|
11359
|
+
delete(imageId: string): Promise<boolean>;
|
|
11360
|
+
/**
|
|
11361
|
+
* List hosted images with pagination
|
|
11362
|
+
* @param options List configuration
|
|
11363
|
+
* @returns List of images with pagination info
|
|
11364
|
+
* @throws {@link ImagesError} if list fails
|
|
11365
|
+
*/
|
|
11366
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11367
|
+
}
|
|
11276
11368
|
export interface ImagesBinding {
|
|
11277
11369
|
/**
|
|
11278
11370
|
* Get image metadata (type, width and height)
|
|
@@ -11292,6 +11384,10 @@ export interface ImagesBinding {
|
|
|
11292
11384
|
stream: ReadableStream<Uint8Array>,
|
|
11293
11385
|
options?: ImageInputOptions,
|
|
11294
11386
|
): ImageTransformer;
|
|
11387
|
+
/**
|
|
11388
|
+
* Access hosted images CRUD operations
|
|
11389
|
+
*/
|
|
11390
|
+
readonly hosted: HostedImagesBinding;
|
|
11295
11391
|
}
|
|
11296
11392
|
export interface ImageTransformer {
|
|
11297
11393
|
/**
|
package/experimental/index.d.ts
CHANGED
|
@@ -635,10 +635,16 @@ type DurableObjectRoutingMode = "primary-only";
|
|
|
635
635
|
interface DurableObjectNamespaceGetDurableObjectOptions {
|
|
636
636
|
locationHint?: DurableObjectLocationHint;
|
|
637
637
|
routingMode?: DurableObjectRoutingMode;
|
|
638
|
+
version?: {
|
|
639
|
+
cohort?: string;
|
|
640
|
+
};
|
|
638
641
|
}
|
|
639
642
|
interface DurableObjectClass<
|
|
640
643
|
_T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
641
644
|
> {}
|
|
645
|
+
interface DurableObjectNamespaceGetDurableObjectOptionsVersionOptions {
|
|
646
|
+
cohort?: string;
|
|
647
|
+
}
|
|
642
648
|
interface DurableObjectState<Props = unknown> {
|
|
643
649
|
waitUntil(promise: Promise<any>): void;
|
|
644
650
|
readonly exports: Cloudflare.Exports;
|
|
@@ -647,6 +653,7 @@ interface DurableObjectState<Props = unknown> {
|
|
|
647
653
|
readonly storage: DurableObjectStorage;
|
|
648
654
|
container?: Container;
|
|
649
655
|
facets: DurableObjectFacets;
|
|
656
|
+
version?: DurableObjectStateVersion;
|
|
650
657
|
blockConcurrencyWhile<T>(callback: () => Promise<T>): Promise<T>;
|
|
651
658
|
acceptWebSocket(ws: WebSocket, tags?: string[]): void;
|
|
652
659
|
getWebSockets(tag?: string): WebSocket[];
|
|
@@ -781,6 +788,9 @@ interface FacetStartupOptions<
|
|
|
781
788
|
id?: DurableObjectId | string;
|
|
782
789
|
class: DurableObjectClass<T>;
|
|
783
790
|
}
|
|
791
|
+
interface DurableObjectStateVersion {
|
|
792
|
+
cohort?: string;
|
|
793
|
+
}
|
|
784
794
|
interface AnalyticsEngineDataset {
|
|
785
795
|
writeDataPoint(event?: AnalyticsEngineDataPoint): void;
|
|
786
796
|
}
|
|
@@ -3707,6 +3717,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3707
3717
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3708
3718
|
*/
|
|
3709
3719
|
extensions: string | null;
|
|
3720
|
+
/**
|
|
3721
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3722
|
+
*
|
|
3723
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3724
|
+
*/
|
|
3725
|
+
binaryType: "blob" | "arraybuffer";
|
|
3710
3726
|
}
|
|
3711
3727
|
declare const WebSocketPair: {
|
|
3712
3728
|
new (): {
|
|
@@ -4089,8 +4105,18 @@ type LoopbackServiceStub<
|
|
|
4089
4105
|
T extends Rpc.WorkerEntrypointBranded | undefined = undefined,
|
|
4090
4106
|
> = Fetcher<T> &
|
|
4091
4107
|
(T extends CloudflareWorkersModule.WorkerEntrypoint<any, infer Props>
|
|
4092
|
-
? (opts: {
|
|
4093
|
-
|
|
4108
|
+
? (opts: {
|
|
4109
|
+
props?: Props;
|
|
4110
|
+
version?: {
|
|
4111
|
+
cohort?: string | null;
|
|
4112
|
+
};
|
|
4113
|
+
}) => Fetcher<T>
|
|
4114
|
+
: (opts: {
|
|
4115
|
+
props?: any;
|
|
4116
|
+
version?: {
|
|
4117
|
+
cohort?: string | null;
|
|
4118
|
+
};
|
|
4119
|
+
}) => Fetcher<T>);
|
|
4094
4120
|
type LoopbackDurableObjectClass<
|
|
4095
4121
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
4096
4122
|
> = DurableObjectClass<T> &
|
|
@@ -4222,6 +4248,12 @@ declare abstract class Performance extends EventTarget {
|
|
|
4222
4248
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize)
|
|
4223
4249
|
*/
|
|
4224
4250
|
setResourceTimingBufferSize(size: number): void;
|
|
4251
|
+
/**
|
|
4252
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
4253
|
+
*
|
|
4254
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
4255
|
+
*/
|
|
4256
|
+
toJSON(): object;
|
|
4225
4257
|
get nodeTiming(): PerformanceNodeTiming;
|
|
4226
4258
|
eventLoopUtilization(): PerformanceEventLoopUtilization;
|
|
4227
4259
|
markResourceTiming(): void;
|
|
@@ -4241,7 +4273,7 @@ interface PerformanceNodeTiming extends PerformanceEntry {
|
|
|
4241
4273
|
readonly loopExit: number;
|
|
4242
4274
|
readonly idleTime: number;
|
|
4243
4275
|
readonly uvMetricsInfo: UvMetricsInfo;
|
|
4244
|
-
toJSON():
|
|
4276
|
+
toJSON(): object;
|
|
4245
4277
|
}
|
|
4246
4278
|
interface UvMetricsInfo {
|
|
4247
4279
|
loopCount: number;
|
|
@@ -4261,7 +4293,7 @@ declare class PerformanceMark extends PerformanceEntry {
|
|
|
4261
4293
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail)
|
|
4262
4294
|
*/
|
|
4263
4295
|
get detail(): any;
|
|
4264
|
-
toJSON():
|
|
4296
|
+
toJSON(): object;
|
|
4265
4297
|
}
|
|
4266
4298
|
/**
|
|
4267
4299
|
* **`PerformanceMeasure`** is an _abstract_ interface for PerformanceEntry objects with an PerformanceEntry.entryType of `'measure'`.
|
|
@@ -4275,7 +4307,7 @@ declare abstract class PerformanceMeasure extends PerformanceEntry {
|
|
|
4275
4307
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail)
|
|
4276
4308
|
*/
|
|
4277
4309
|
get detail(): any;
|
|
4278
|
-
toJSON():
|
|
4310
|
+
toJSON(): object;
|
|
4279
4311
|
}
|
|
4280
4312
|
interface PerformanceMarkOptions {
|
|
4281
4313
|
detail?: any;
|
|
@@ -4347,7 +4379,7 @@ declare abstract class PerformanceEntry {
|
|
|
4347
4379
|
*
|
|
4348
4380
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON)
|
|
4349
4381
|
*/
|
|
4350
|
-
toJSON():
|
|
4382
|
+
toJSON(): object;
|
|
4351
4383
|
}
|
|
4352
4384
|
/**
|
|
4353
4385
|
* The **`PerformanceResourceTiming`** interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources.
|
|
@@ -11917,6 +11949,86 @@ type ImageOutputOptions = {
|
|
|
11917
11949
|
background?: string;
|
|
11918
11950
|
anim?: boolean;
|
|
11919
11951
|
};
|
|
11952
|
+
interface ImageMetadata {
|
|
11953
|
+
id: string;
|
|
11954
|
+
filename?: string;
|
|
11955
|
+
uploaded?: string;
|
|
11956
|
+
requireSignedURLs: boolean;
|
|
11957
|
+
meta?: Record<string, unknown>;
|
|
11958
|
+
variants: string[];
|
|
11959
|
+
draft?: boolean;
|
|
11960
|
+
creator?: string;
|
|
11961
|
+
}
|
|
11962
|
+
interface ImageUploadOptions {
|
|
11963
|
+
id?: string;
|
|
11964
|
+
filename?: string;
|
|
11965
|
+
requireSignedURLs?: boolean;
|
|
11966
|
+
metadata?: Record<string, unknown>;
|
|
11967
|
+
creator?: string;
|
|
11968
|
+
encoding?: "base64";
|
|
11969
|
+
}
|
|
11970
|
+
interface ImageUpdateOptions {
|
|
11971
|
+
requireSignedURLs?: boolean;
|
|
11972
|
+
metadata?: Record<string, unknown>;
|
|
11973
|
+
creator?: string;
|
|
11974
|
+
}
|
|
11975
|
+
interface ImageListOptions {
|
|
11976
|
+
limit?: number;
|
|
11977
|
+
cursor?: string;
|
|
11978
|
+
sortOrder?: "asc" | "desc";
|
|
11979
|
+
creator?: string;
|
|
11980
|
+
}
|
|
11981
|
+
interface ImageList {
|
|
11982
|
+
images: ImageMetadata[];
|
|
11983
|
+
cursor?: string;
|
|
11984
|
+
listComplete: boolean;
|
|
11985
|
+
}
|
|
11986
|
+
interface HostedImagesBinding {
|
|
11987
|
+
/**
|
|
11988
|
+
* Get detailed metadata for a hosted image
|
|
11989
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11990
|
+
* @returns Image metadata, or null if not found
|
|
11991
|
+
*/
|
|
11992
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11993
|
+
/**
|
|
11994
|
+
* Get the raw image data for a hosted image
|
|
11995
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11996
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11997
|
+
*/
|
|
11998
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11999
|
+
/**
|
|
12000
|
+
* Upload a new hosted image
|
|
12001
|
+
* @param image The image file to upload
|
|
12002
|
+
* @param options Upload configuration
|
|
12003
|
+
* @returns Metadata for the uploaded image
|
|
12004
|
+
* @throws {@link ImagesError} if upload fails
|
|
12005
|
+
*/
|
|
12006
|
+
upload(
|
|
12007
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
12008
|
+
options?: ImageUploadOptions,
|
|
12009
|
+
): Promise<ImageMetadata>;
|
|
12010
|
+
/**
|
|
12011
|
+
* Update hosted image metadata
|
|
12012
|
+
* @param imageId The ID of the image
|
|
12013
|
+
* @param options Properties to update
|
|
12014
|
+
* @returns Updated image metadata
|
|
12015
|
+
* @throws {@link ImagesError} if update fails
|
|
12016
|
+
*/
|
|
12017
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12018
|
+
/**
|
|
12019
|
+
* Delete a hosted image
|
|
12020
|
+
* @param imageId The ID of the image
|
|
12021
|
+
* @returns True if deleted, false if not found
|
|
12022
|
+
*/
|
|
12023
|
+
delete(imageId: string): Promise<boolean>;
|
|
12024
|
+
/**
|
|
12025
|
+
* List hosted images with pagination
|
|
12026
|
+
* @param options List configuration
|
|
12027
|
+
* @returns List of images with pagination info
|
|
12028
|
+
* @throws {@link ImagesError} if list fails
|
|
12029
|
+
*/
|
|
12030
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
12031
|
+
}
|
|
11920
12032
|
interface ImagesBinding {
|
|
11921
12033
|
/**
|
|
11922
12034
|
* Get image metadata (type, width and height)
|
|
@@ -11936,6 +12048,10 @@ interface ImagesBinding {
|
|
|
11936
12048
|
stream: ReadableStream<Uint8Array>,
|
|
11937
12049
|
options?: ImageInputOptions,
|
|
11938
12050
|
): ImageTransformer;
|
|
12051
|
+
/**
|
|
12052
|
+
* Access hosted images CRUD operations
|
|
12053
|
+
*/
|
|
12054
|
+
readonly hosted: HostedImagesBinding;
|
|
11939
12055
|
}
|
|
11940
12056
|
interface ImageTransformer {
|
|
11941
12057
|
/**
|
package/experimental/index.ts
CHANGED
|
@@ -640,10 +640,16 @@ export type DurableObjectRoutingMode = "primary-only";
|
|
|
640
640
|
export interface DurableObjectNamespaceGetDurableObjectOptions {
|
|
641
641
|
locationHint?: DurableObjectLocationHint;
|
|
642
642
|
routingMode?: DurableObjectRoutingMode;
|
|
643
|
+
version?: {
|
|
644
|
+
cohort?: string;
|
|
645
|
+
};
|
|
643
646
|
}
|
|
644
647
|
export interface DurableObjectClass<
|
|
645
648
|
_T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
646
649
|
> {}
|
|
650
|
+
export interface DurableObjectNamespaceGetDurableObjectOptionsVersionOptions {
|
|
651
|
+
cohort?: string;
|
|
652
|
+
}
|
|
647
653
|
export interface DurableObjectState<Props = unknown> {
|
|
648
654
|
waitUntil(promise: Promise<any>): void;
|
|
649
655
|
readonly exports: Cloudflare.Exports;
|
|
@@ -652,6 +658,7 @@ export interface DurableObjectState<Props = unknown> {
|
|
|
652
658
|
readonly storage: DurableObjectStorage;
|
|
653
659
|
container?: Container;
|
|
654
660
|
facets: DurableObjectFacets;
|
|
661
|
+
version?: DurableObjectStateVersion;
|
|
655
662
|
blockConcurrencyWhile<T>(callback: () => Promise<T>): Promise<T>;
|
|
656
663
|
acceptWebSocket(ws: WebSocket, tags?: string[]): void;
|
|
657
664
|
getWebSockets(tag?: string): WebSocket[];
|
|
@@ -786,6 +793,9 @@ export interface FacetStartupOptions<
|
|
|
786
793
|
id?: DurableObjectId | string;
|
|
787
794
|
class: DurableObjectClass<T>;
|
|
788
795
|
}
|
|
796
|
+
export interface DurableObjectStateVersion {
|
|
797
|
+
cohort?: string;
|
|
798
|
+
}
|
|
789
799
|
export interface AnalyticsEngineDataset {
|
|
790
800
|
writeDataPoint(event?: AnalyticsEngineDataPoint): void;
|
|
791
801
|
}
|
|
@@ -3716,6 +3726,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3716
3726
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3717
3727
|
*/
|
|
3718
3728
|
extensions: string | null;
|
|
3729
|
+
/**
|
|
3730
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3731
|
+
*
|
|
3732
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3733
|
+
*/
|
|
3734
|
+
binaryType: "blob" | "arraybuffer";
|
|
3719
3735
|
}
|
|
3720
3736
|
export declare const WebSocketPair: {
|
|
3721
3737
|
new (): {
|
|
@@ -4098,8 +4114,18 @@ export type LoopbackServiceStub<
|
|
|
4098
4114
|
T extends Rpc.WorkerEntrypointBranded | undefined = undefined,
|
|
4099
4115
|
> = Fetcher<T> &
|
|
4100
4116
|
(T extends CloudflareWorkersModule.WorkerEntrypoint<any, infer Props>
|
|
4101
|
-
? (opts: {
|
|
4102
|
-
|
|
4117
|
+
? (opts: {
|
|
4118
|
+
props?: Props;
|
|
4119
|
+
version?: {
|
|
4120
|
+
cohort?: string | null;
|
|
4121
|
+
};
|
|
4122
|
+
}) => Fetcher<T>
|
|
4123
|
+
: (opts: {
|
|
4124
|
+
props?: any;
|
|
4125
|
+
version?: {
|
|
4126
|
+
cohort?: string | null;
|
|
4127
|
+
};
|
|
4128
|
+
}) => Fetcher<T>);
|
|
4103
4129
|
export type LoopbackDurableObjectClass<
|
|
4104
4130
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
4105
4131
|
> = DurableObjectClass<T> &
|
|
@@ -4231,6 +4257,12 @@ export declare abstract class Performance extends EventTarget {
|
|
|
4231
4257
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize)
|
|
4232
4258
|
*/
|
|
4233
4259
|
setResourceTimingBufferSize(size: number): void;
|
|
4260
|
+
/**
|
|
4261
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
4262
|
+
*
|
|
4263
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
4264
|
+
*/
|
|
4265
|
+
toJSON(): object;
|
|
4234
4266
|
get nodeTiming(): PerformanceNodeTiming;
|
|
4235
4267
|
eventLoopUtilization(): PerformanceEventLoopUtilization;
|
|
4236
4268
|
markResourceTiming(): void;
|
|
@@ -4250,7 +4282,7 @@ export interface PerformanceNodeTiming extends PerformanceEntry {
|
|
|
4250
4282
|
readonly loopExit: number;
|
|
4251
4283
|
readonly idleTime: number;
|
|
4252
4284
|
readonly uvMetricsInfo: UvMetricsInfo;
|
|
4253
|
-
toJSON():
|
|
4285
|
+
toJSON(): object;
|
|
4254
4286
|
}
|
|
4255
4287
|
export interface UvMetricsInfo {
|
|
4256
4288
|
loopCount: number;
|
|
@@ -4270,7 +4302,7 @@ export declare class PerformanceMark extends PerformanceEntry {
|
|
|
4270
4302
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail)
|
|
4271
4303
|
*/
|
|
4272
4304
|
get detail(): any;
|
|
4273
|
-
toJSON():
|
|
4305
|
+
toJSON(): object;
|
|
4274
4306
|
}
|
|
4275
4307
|
/**
|
|
4276
4308
|
* **`PerformanceMeasure`** is an _abstract_ interface for PerformanceEntry objects with an PerformanceEntry.entryType of `'measure'`.
|
|
@@ -4284,7 +4316,7 @@ export declare abstract class PerformanceMeasure extends PerformanceEntry {
|
|
|
4284
4316
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail)
|
|
4285
4317
|
*/
|
|
4286
4318
|
get detail(): any;
|
|
4287
|
-
toJSON():
|
|
4319
|
+
toJSON(): object;
|
|
4288
4320
|
}
|
|
4289
4321
|
export interface PerformanceMarkOptions {
|
|
4290
4322
|
detail?: any;
|
|
@@ -4356,7 +4388,7 @@ export declare abstract class PerformanceEntry {
|
|
|
4356
4388
|
*
|
|
4357
4389
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON)
|
|
4358
4390
|
*/
|
|
4359
|
-
toJSON():
|
|
4391
|
+
toJSON(): object;
|
|
4360
4392
|
}
|
|
4361
4393
|
/**
|
|
4362
4394
|
* The **`PerformanceResourceTiming`** interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources.
|
|
@@ -11934,6 +11966,86 @@ export type ImageOutputOptions = {
|
|
|
11934
11966
|
background?: string;
|
|
11935
11967
|
anim?: boolean;
|
|
11936
11968
|
};
|
|
11969
|
+
export interface ImageMetadata {
|
|
11970
|
+
id: string;
|
|
11971
|
+
filename?: string;
|
|
11972
|
+
uploaded?: string;
|
|
11973
|
+
requireSignedURLs: boolean;
|
|
11974
|
+
meta?: Record<string, unknown>;
|
|
11975
|
+
variants: string[];
|
|
11976
|
+
draft?: boolean;
|
|
11977
|
+
creator?: string;
|
|
11978
|
+
}
|
|
11979
|
+
export interface ImageUploadOptions {
|
|
11980
|
+
id?: string;
|
|
11981
|
+
filename?: string;
|
|
11982
|
+
requireSignedURLs?: boolean;
|
|
11983
|
+
metadata?: Record<string, unknown>;
|
|
11984
|
+
creator?: string;
|
|
11985
|
+
encoding?: "base64";
|
|
11986
|
+
}
|
|
11987
|
+
export interface ImageUpdateOptions {
|
|
11988
|
+
requireSignedURLs?: boolean;
|
|
11989
|
+
metadata?: Record<string, unknown>;
|
|
11990
|
+
creator?: string;
|
|
11991
|
+
}
|
|
11992
|
+
export interface ImageListOptions {
|
|
11993
|
+
limit?: number;
|
|
11994
|
+
cursor?: string;
|
|
11995
|
+
sortOrder?: "asc" | "desc";
|
|
11996
|
+
creator?: string;
|
|
11997
|
+
}
|
|
11998
|
+
export interface ImageList {
|
|
11999
|
+
images: ImageMetadata[];
|
|
12000
|
+
cursor?: string;
|
|
12001
|
+
listComplete: boolean;
|
|
12002
|
+
}
|
|
12003
|
+
export interface HostedImagesBinding {
|
|
12004
|
+
/**
|
|
12005
|
+
* Get detailed metadata for a hosted image
|
|
12006
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
12007
|
+
* @returns Image metadata, or null if not found
|
|
12008
|
+
*/
|
|
12009
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
12010
|
+
/**
|
|
12011
|
+
* Get the raw image data for a hosted image
|
|
12012
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
12013
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
12014
|
+
*/
|
|
12015
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
12016
|
+
/**
|
|
12017
|
+
* Upload a new hosted image
|
|
12018
|
+
* @param image The image file to upload
|
|
12019
|
+
* @param options Upload configuration
|
|
12020
|
+
* @returns Metadata for the uploaded image
|
|
12021
|
+
* @throws {@link ImagesError} if upload fails
|
|
12022
|
+
*/
|
|
12023
|
+
upload(
|
|
12024
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
12025
|
+
options?: ImageUploadOptions,
|
|
12026
|
+
): Promise<ImageMetadata>;
|
|
12027
|
+
/**
|
|
12028
|
+
* Update hosted image metadata
|
|
12029
|
+
* @param imageId The ID of the image
|
|
12030
|
+
* @param options Properties to update
|
|
12031
|
+
* @returns Updated image metadata
|
|
12032
|
+
* @throws {@link ImagesError} if update fails
|
|
12033
|
+
*/
|
|
12034
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12035
|
+
/**
|
|
12036
|
+
* Delete a hosted image
|
|
12037
|
+
* @param imageId The ID of the image
|
|
12038
|
+
* @returns True if deleted, false if not found
|
|
12039
|
+
*/
|
|
12040
|
+
delete(imageId: string): Promise<boolean>;
|
|
12041
|
+
/**
|
|
12042
|
+
* List hosted images with pagination
|
|
12043
|
+
* @param options List configuration
|
|
12044
|
+
* @returns List of images with pagination info
|
|
12045
|
+
* @throws {@link ImagesError} if list fails
|
|
12046
|
+
*/
|
|
12047
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
12048
|
+
}
|
|
11937
12049
|
export interface ImagesBinding {
|
|
11938
12050
|
/**
|
|
11939
12051
|
* Get image metadata (type, width and height)
|
|
@@ -11953,6 +12065,10 @@ export interface ImagesBinding {
|
|
|
11953
12065
|
stream: ReadableStream<Uint8Array>,
|
|
11954
12066
|
options?: ImageInputOptions,
|
|
11955
12067
|
): ImageTransformer;
|
|
12068
|
+
/**
|
|
12069
|
+
* Access hosted images CRUD operations
|
|
12070
|
+
*/
|
|
12071
|
+
readonly hosted: HostedImagesBinding;
|
|
11956
12072
|
}
|
|
11957
12073
|
export interface ImageTransformer {
|
|
11958
12074
|
/**
|
package/index.d.ts
CHANGED
|
@@ -3493,6 +3493,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3493
3493
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3494
3494
|
*/
|
|
3495
3495
|
readonly extensions: string | null;
|
|
3496
|
+
/**
|
|
3497
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3498
|
+
*
|
|
3499
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3500
|
+
*/
|
|
3501
|
+
binaryType: "blob" | "arraybuffer";
|
|
3496
3502
|
}
|
|
3497
3503
|
declare const WebSocketPair: {
|
|
3498
3504
|
new (): {
|
|
@@ -3741,6 +3747,12 @@ declare abstract class Performance {
|
|
|
3741
3747
|
get timeOrigin(): number;
|
|
3742
3748
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3743
3749
|
now(): number;
|
|
3750
|
+
/**
|
|
3751
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
3752
|
+
*
|
|
3753
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3754
|
+
*/
|
|
3755
|
+
toJSON(): object;
|
|
3744
3756
|
}
|
|
3745
3757
|
// AI Search V2 API Error Interfaces
|
|
3746
3758
|
interface AiSearchInternalError extends Error {}
|
|
@@ -11149,6 +11161,86 @@ type ImageOutputOptions = {
|
|
|
11149
11161
|
background?: string;
|
|
11150
11162
|
anim?: boolean;
|
|
11151
11163
|
};
|
|
11164
|
+
interface ImageMetadata {
|
|
11165
|
+
id: string;
|
|
11166
|
+
filename?: string;
|
|
11167
|
+
uploaded?: string;
|
|
11168
|
+
requireSignedURLs: boolean;
|
|
11169
|
+
meta?: Record<string, unknown>;
|
|
11170
|
+
variants: string[];
|
|
11171
|
+
draft?: boolean;
|
|
11172
|
+
creator?: string;
|
|
11173
|
+
}
|
|
11174
|
+
interface ImageUploadOptions {
|
|
11175
|
+
id?: string;
|
|
11176
|
+
filename?: string;
|
|
11177
|
+
requireSignedURLs?: boolean;
|
|
11178
|
+
metadata?: Record<string, unknown>;
|
|
11179
|
+
creator?: string;
|
|
11180
|
+
encoding?: "base64";
|
|
11181
|
+
}
|
|
11182
|
+
interface ImageUpdateOptions {
|
|
11183
|
+
requireSignedURLs?: boolean;
|
|
11184
|
+
metadata?: Record<string, unknown>;
|
|
11185
|
+
creator?: string;
|
|
11186
|
+
}
|
|
11187
|
+
interface ImageListOptions {
|
|
11188
|
+
limit?: number;
|
|
11189
|
+
cursor?: string;
|
|
11190
|
+
sortOrder?: "asc" | "desc";
|
|
11191
|
+
creator?: string;
|
|
11192
|
+
}
|
|
11193
|
+
interface ImageList {
|
|
11194
|
+
images: ImageMetadata[];
|
|
11195
|
+
cursor?: string;
|
|
11196
|
+
listComplete: boolean;
|
|
11197
|
+
}
|
|
11198
|
+
interface HostedImagesBinding {
|
|
11199
|
+
/**
|
|
11200
|
+
* Get detailed metadata for a hosted image
|
|
11201
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11202
|
+
* @returns Image metadata, or null if not found
|
|
11203
|
+
*/
|
|
11204
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11205
|
+
/**
|
|
11206
|
+
* Get the raw image data for a hosted image
|
|
11207
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11208
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11209
|
+
*/
|
|
11210
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11211
|
+
/**
|
|
11212
|
+
* Upload a new hosted image
|
|
11213
|
+
* @param image The image file to upload
|
|
11214
|
+
* @param options Upload configuration
|
|
11215
|
+
* @returns Metadata for the uploaded image
|
|
11216
|
+
* @throws {@link ImagesError} if upload fails
|
|
11217
|
+
*/
|
|
11218
|
+
upload(
|
|
11219
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11220
|
+
options?: ImageUploadOptions,
|
|
11221
|
+
): Promise<ImageMetadata>;
|
|
11222
|
+
/**
|
|
11223
|
+
* Update hosted image metadata
|
|
11224
|
+
* @param imageId The ID of the image
|
|
11225
|
+
* @param options Properties to update
|
|
11226
|
+
* @returns Updated image metadata
|
|
11227
|
+
* @throws {@link ImagesError} if update fails
|
|
11228
|
+
*/
|
|
11229
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11230
|
+
/**
|
|
11231
|
+
* Delete a hosted image
|
|
11232
|
+
* @param imageId The ID of the image
|
|
11233
|
+
* @returns True if deleted, false if not found
|
|
11234
|
+
*/
|
|
11235
|
+
delete(imageId: string): Promise<boolean>;
|
|
11236
|
+
/**
|
|
11237
|
+
* List hosted images with pagination
|
|
11238
|
+
* @param options List configuration
|
|
11239
|
+
* @returns List of images with pagination info
|
|
11240
|
+
* @throws {@link ImagesError} if list fails
|
|
11241
|
+
*/
|
|
11242
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11243
|
+
}
|
|
11152
11244
|
interface ImagesBinding {
|
|
11153
11245
|
/**
|
|
11154
11246
|
* Get image metadata (type, width and height)
|
|
@@ -11168,6 +11260,10 @@ interface ImagesBinding {
|
|
|
11168
11260
|
stream: ReadableStream<Uint8Array>,
|
|
11169
11261
|
options?: ImageInputOptions,
|
|
11170
11262
|
): ImageTransformer;
|
|
11263
|
+
/**
|
|
11264
|
+
* Access hosted images CRUD operations
|
|
11265
|
+
*/
|
|
11266
|
+
readonly hosted: HostedImagesBinding;
|
|
11171
11267
|
}
|
|
11172
11268
|
interface ImageTransformer {
|
|
11173
11269
|
/**
|