@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/2022-11-30/index.d.ts
CHANGED
|
@@ -3594,6 +3594,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3594
3594
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3595
3595
|
*/
|
|
3596
3596
|
extensions: string | null;
|
|
3597
|
+
/**
|
|
3598
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3599
|
+
*
|
|
3600
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3601
|
+
*/
|
|
3602
|
+
binaryType: "blob" | "arraybuffer";
|
|
3597
3603
|
}
|
|
3598
3604
|
declare const WebSocketPair: {
|
|
3599
3605
|
new (): {
|
|
@@ -3842,6 +3848,12 @@ declare abstract class Performance {
|
|
|
3842
3848
|
get timeOrigin(): number;
|
|
3843
3849
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3844
3850
|
now(): number;
|
|
3851
|
+
/**
|
|
3852
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
3853
|
+
*
|
|
3854
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3855
|
+
*/
|
|
3856
|
+
toJSON(): object;
|
|
3845
3857
|
}
|
|
3846
3858
|
// AI Search V2 API Error Interfaces
|
|
3847
3859
|
interface AiSearchInternalError extends Error {}
|
|
@@ -11250,6 +11262,86 @@ type ImageOutputOptions = {
|
|
|
11250
11262
|
background?: string;
|
|
11251
11263
|
anim?: boolean;
|
|
11252
11264
|
};
|
|
11265
|
+
interface ImageMetadata {
|
|
11266
|
+
id: string;
|
|
11267
|
+
filename?: string;
|
|
11268
|
+
uploaded?: string;
|
|
11269
|
+
requireSignedURLs: boolean;
|
|
11270
|
+
meta?: Record<string, unknown>;
|
|
11271
|
+
variants: string[];
|
|
11272
|
+
draft?: boolean;
|
|
11273
|
+
creator?: string;
|
|
11274
|
+
}
|
|
11275
|
+
interface ImageUploadOptions {
|
|
11276
|
+
id?: string;
|
|
11277
|
+
filename?: string;
|
|
11278
|
+
requireSignedURLs?: boolean;
|
|
11279
|
+
metadata?: Record<string, unknown>;
|
|
11280
|
+
creator?: string;
|
|
11281
|
+
encoding?: "base64";
|
|
11282
|
+
}
|
|
11283
|
+
interface ImageUpdateOptions {
|
|
11284
|
+
requireSignedURLs?: boolean;
|
|
11285
|
+
metadata?: Record<string, unknown>;
|
|
11286
|
+
creator?: string;
|
|
11287
|
+
}
|
|
11288
|
+
interface ImageListOptions {
|
|
11289
|
+
limit?: number;
|
|
11290
|
+
cursor?: string;
|
|
11291
|
+
sortOrder?: "asc" | "desc";
|
|
11292
|
+
creator?: string;
|
|
11293
|
+
}
|
|
11294
|
+
interface ImageList {
|
|
11295
|
+
images: ImageMetadata[];
|
|
11296
|
+
cursor?: string;
|
|
11297
|
+
listComplete: boolean;
|
|
11298
|
+
}
|
|
11299
|
+
interface HostedImagesBinding {
|
|
11300
|
+
/**
|
|
11301
|
+
* Get detailed metadata for a hosted image
|
|
11302
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11303
|
+
* @returns Image metadata, or null if not found
|
|
11304
|
+
*/
|
|
11305
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11306
|
+
/**
|
|
11307
|
+
* Get the raw image data for a hosted image
|
|
11308
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11309
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11310
|
+
*/
|
|
11311
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11312
|
+
/**
|
|
11313
|
+
* Upload a new hosted image
|
|
11314
|
+
* @param image The image file to upload
|
|
11315
|
+
* @param options Upload configuration
|
|
11316
|
+
* @returns Metadata for the uploaded image
|
|
11317
|
+
* @throws {@link ImagesError} if upload fails
|
|
11318
|
+
*/
|
|
11319
|
+
upload(
|
|
11320
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11321
|
+
options?: ImageUploadOptions,
|
|
11322
|
+
): Promise<ImageMetadata>;
|
|
11323
|
+
/**
|
|
11324
|
+
* Update hosted image metadata
|
|
11325
|
+
* @param imageId The ID of the image
|
|
11326
|
+
* @param options Properties to update
|
|
11327
|
+
* @returns Updated image metadata
|
|
11328
|
+
* @throws {@link ImagesError} if update fails
|
|
11329
|
+
*/
|
|
11330
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11331
|
+
/**
|
|
11332
|
+
* Delete a hosted image
|
|
11333
|
+
* @param imageId The ID of the image
|
|
11334
|
+
* @returns True if deleted, false if not found
|
|
11335
|
+
*/
|
|
11336
|
+
delete(imageId: string): Promise<boolean>;
|
|
11337
|
+
/**
|
|
11338
|
+
* List hosted images with pagination
|
|
11339
|
+
* @param options List configuration
|
|
11340
|
+
* @returns List of images with pagination info
|
|
11341
|
+
* @throws {@link ImagesError} if list fails
|
|
11342
|
+
*/
|
|
11343
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11344
|
+
}
|
|
11253
11345
|
interface ImagesBinding {
|
|
11254
11346
|
/**
|
|
11255
11347
|
* Get image metadata (type, width and height)
|
|
@@ -11269,6 +11361,10 @@ interface ImagesBinding {
|
|
|
11269
11361
|
stream: ReadableStream<Uint8Array>,
|
|
11270
11362
|
options?: ImageInputOptions,
|
|
11271
11363
|
): ImageTransformer;
|
|
11364
|
+
/**
|
|
11365
|
+
* Access hosted images CRUD operations
|
|
11366
|
+
*/
|
|
11367
|
+
readonly hosted: HostedImagesBinding;
|
|
11272
11368
|
}
|
|
11273
11369
|
interface ImageTransformer {
|
|
11274
11370
|
/**
|
package/2022-11-30/index.ts
CHANGED
|
@@ -3603,6 +3603,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3603
3603
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3604
3604
|
*/
|
|
3605
3605
|
extensions: string | null;
|
|
3606
|
+
/**
|
|
3607
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3608
|
+
*
|
|
3609
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3610
|
+
*/
|
|
3611
|
+
binaryType: "blob" | "arraybuffer";
|
|
3606
3612
|
}
|
|
3607
3613
|
export declare const WebSocketPair: {
|
|
3608
3614
|
new (): {
|
|
@@ -3851,6 +3857,12 @@ export declare abstract class Performance {
|
|
|
3851
3857
|
get timeOrigin(): number;
|
|
3852
3858
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3853
3859
|
now(): number;
|
|
3860
|
+
/**
|
|
3861
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
3862
|
+
*
|
|
3863
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3864
|
+
*/
|
|
3865
|
+
toJSON(): object;
|
|
3854
3866
|
}
|
|
3855
3867
|
// AI Search V2 API Error Interfaces
|
|
3856
3868
|
export interface AiSearchInternalError extends Error {}
|
|
@@ -11267,6 +11279,86 @@ export type ImageOutputOptions = {
|
|
|
11267
11279
|
background?: string;
|
|
11268
11280
|
anim?: boolean;
|
|
11269
11281
|
};
|
|
11282
|
+
export interface ImageMetadata {
|
|
11283
|
+
id: string;
|
|
11284
|
+
filename?: string;
|
|
11285
|
+
uploaded?: string;
|
|
11286
|
+
requireSignedURLs: boolean;
|
|
11287
|
+
meta?: Record<string, unknown>;
|
|
11288
|
+
variants: string[];
|
|
11289
|
+
draft?: boolean;
|
|
11290
|
+
creator?: string;
|
|
11291
|
+
}
|
|
11292
|
+
export interface ImageUploadOptions {
|
|
11293
|
+
id?: string;
|
|
11294
|
+
filename?: string;
|
|
11295
|
+
requireSignedURLs?: boolean;
|
|
11296
|
+
metadata?: Record<string, unknown>;
|
|
11297
|
+
creator?: string;
|
|
11298
|
+
encoding?: "base64";
|
|
11299
|
+
}
|
|
11300
|
+
export interface ImageUpdateOptions {
|
|
11301
|
+
requireSignedURLs?: boolean;
|
|
11302
|
+
metadata?: Record<string, unknown>;
|
|
11303
|
+
creator?: string;
|
|
11304
|
+
}
|
|
11305
|
+
export interface ImageListOptions {
|
|
11306
|
+
limit?: number;
|
|
11307
|
+
cursor?: string;
|
|
11308
|
+
sortOrder?: "asc" | "desc";
|
|
11309
|
+
creator?: string;
|
|
11310
|
+
}
|
|
11311
|
+
export interface ImageList {
|
|
11312
|
+
images: ImageMetadata[];
|
|
11313
|
+
cursor?: string;
|
|
11314
|
+
listComplete: boolean;
|
|
11315
|
+
}
|
|
11316
|
+
export interface HostedImagesBinding {
|
|
11317
|
+
/**
|
|
11318
|
+
* Get detailed metadata for a hosted image
|
|
11319
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11320
|
+
* @returns Image metadata, or null if not found
|
|
11321
|
+
*/
|
|
11322
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11323
|
+
/**
|
|
11324
|
+
* Get the raw image data for a hosted image
|
|
11325
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11326
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11327
|
+
*/
|
|
11328
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11329
|
+
/**
|
|
11330
|
+
* Upload a new hosted image
|
|
11331
|
+
* @param image The image file to upload
|
|
11332
|
+
* @param options Upload configuration
|
|
11333
|
+
* @returns Metadata for the uploaded image
|
|
11334
|
+
* @throws {@link ImagesError} if upload fails
|
|
11335
|
+
*/
|
|
11336
|
+
upload(
|
|
11337
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11338
|
+
options?: ImageUploadOptions,
|
|
11339
|
+
): Promise<ImageMetadata>;
|
|
11340
|
+
/**
|
|
11341
|
+
* Update hosted image metadata
|
|
11342
|
+
* @param imageId The ID of the image
|
|
11343
|
+
* @param options Properties to update
|
|
11344
|
+
* @returns Updated image metadata
|
|
11345
|
+
* @throws {@link ImagesError} if update fails
|
|
11346
|
+
*/
|
|
11347
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11348
|
+
/**
|
|
11349
|
+
* Delete a hosted image
|
|
11350
|
+
* @param imageId The ID of the image
|
|
11351
|
+
* @returns True if deleted, false if not found
|
|
11352
|
+
*/
|
|
11353
|
+
delete(imageId: string): Promise<boolean>;
|
|
11354
|
+
/**
|
|
11355
|
+
* List hosted images with pagination
|
|
11356
|
+
* @param options List configuration
|
|
11357
|
+
* @returns List of images with pagination info
|
|
11358
|
+
* @throws {@link ImagesError} if list fails
|
|
11359
|
+
*/
|
|
11360
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11361
|
+
}
|
|
11270
11362
|
export interface ImagesBinding {
|
|
11271
11363
|
/**
|
|
11272
11364
|
* Get image metadata (type, width and height)
|
|
@@ -11286,6 +11378,10 @@ export interface ImagesBinding {
|
|
|
11286
11378
|
stream: ReadableStream<Uint8Array>,
|
|
11287
11379
|
options?: ImageInputOptions,
|
|
11288
11380
|
): ImageTransformer;
|
|
11381
|
+
/**
|
|
11382
|
+
* Access hosted images CRUD operations
|
|
11383
|
+
*/
|
|
11384
|
+
readonly hosted: HostedImagesBinding;
|
|
11289
11385
|
}
|
|
11290
11386
|
export interface ImageTransformer {
|
|
11291
11387
|
/**
|
package/2023-03-01/index.d.ts
CHANGED
|
@@ -3600,6 +3600,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3600
3600
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3601
3601
|
*/
|
|
3602
3602
|
extensions: string | null;
|
|
3603
|
+
/**
|
|
3604
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3605
|
+
*
|
|
3606
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3607
|
+
*/
|
|
3608
|
+
binaryType: "blob" | "arraybuffer";
|
|
3603
3609
|
}
|
|
3604
3610
|
declare const WebSocketPair: {
|
|
3605
3611
|
new (): {
|
|
@@ -3848,6 +3854,12 @@ declare abstract class Performance {
|
|
|
3848
3854
|
get timeOrigin(): number;
|
|
3849
3855
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3850
3856
|
now(): number;
|
|
3857
|
+
/**
|
|
3858
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
3859
|
+
*
|
|
3860
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3861
|
+
*/
|
|
3862
|
+
toJSON(): object;
|
|
3851
3863
|
}
|
|
3852
3864
|
// AI Search V2 API Error Interfaces
|
|
3853
3865
|
interface AiSearchInternalError extends Error {}
|
|
@@ -11256,6 +11268,86 @@ type ImageOutputOptions = {
|
|
|
11256
11268
|
background?: string;
|
|
11257
11269
|
anim?: boolean;
|
|
11258
11270
|
};
|
|
11271
|
+
interface ImageMetadata {
|
|
11272
|
+
id: string;
|
|
11273
|
+
filename?: string;
|
|
11274
|
+
uploaded?: string;
|
|
11275
|
+
requireSignedURLs: boolean;
|
|
11276
|
+
meta?: Record<string, unknown>;
|
|
11277
|
+
variants: string[];
|
|
11278
|
+
draft?: boolean;
|
|
11279
|
+
creator?: string;
|
|
11280
|
+
}
|
|
11281
|
+
interface ImageUploadOptions {
|
|
11282
|
+
id?: string;
|
|
11283
|
+
filename?: string;
|
|
11284
|
+
requireSignedURLs?: boolean;
|
|
11285
|
+
metadata?: Record<string, unknown>;
|
|
11286
|
+
creator?: string;
|
|
11287
|
+
encoding?: "base64";
|
|
11288
|
+
}
|
|
11289
|
+
interface ImageUpdateOptions {
|
|
11290
|
+
requireSignedURLs?: boolean;
|
|
11291
|
+
metadata?: Record<string, unknown>;
|
|
11292
|
+
creator?: string;
|
|
11293
|
+
}
|
|
11294
|
+
interface ImageListOptions {
|
|
11295
|
+
limit?: number;
|
|
11296
|
+
cursor?: string;
|
|
11297
|
+
sortOrder?: "asc" | "desc";
|
|
11298
|
+
creator?: string;
|
|
11299
|
+
}
|
|
11300
|
+
interface ImageList {
|
|
11301
|
+
images: ImageMetadata[];
|
|
11302
|
+
cursor?: string;
|
|
11303
|
+
listComplete: boolean;
|
|
11304
|
+
}
|
|
11305
|
+
interface HostedImagesBinding {
|
|
11306
|
+
/**
|
|
11307
|
+
* Get detailed metadata for a hosted image
|
|
11308
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11309
|
+
* @returns Image metadata, or null if not found
|
|
11310
|
+
*/
|
|
11311
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11312
|
+
/**
|
|
11313
|
+
* Get the raw image data for a hosted image
|
|
11314
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11315
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11316
|
+
*/
|
|
11317
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11318
|
+
/**
|
|
11319
|
+
* Upload a new hosted image
|
|
11320
|
+
* @param image The image file to upload
|
|
11321
|
+
* @param options Upload configuration
|
|
11322
|
+
* @returns Metadata for the uploaded image
|
|
11323
|
+
* @throws {@link ImagesError} if upload fails
|
|
11324
|
+
*/
|
|
11325
|
+
upload(
|
|
11326
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11327
|
+
options?: ImageUploadOptions,
|
|
11328
|
+
): Promise<ImageMetadata>;
|
|
11329
|
+
/**
|
|
11330
|
+
* Update hosted image metadata
|
|
11331
|
+
* @param imageId The ID of the image
|
|
11332
|
+
* @param options Properties to update
|
|
11333
|
+
* @returns Updated image metadata
|
|
11334
|
+
* @throws {@link ImagesError} if update fails
|
|
11335
|
+
*/
|
|
11336
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11337
|
+
/**
|
|
11338
|
+
* Delete a hosted image
|
|
11339
|
+
* @param imageId The ID of the image
|
|
11340
|
+
* @returns True if deleted, false if not found
|
|
11341
|
+
*/
|
|
11342
|
+
delete(imageId: string): Promise<boolean>;
|
|
11343
|
+
/**
|
|
11344
|
+
* List hosted images with pagination
|
|
11345
|
+
* @param options List configuration
|
|
11346
|
+
* @returns List of images with pagination info
|
|
11347
|
+
* @throws {@link ImagesError} if list fails
|
|
11348
|
+
*/
|
|
11349
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11350
|
+
}
|
|
11259
11351
|
interface ImagesBinding {
|
|
11260
11352
|
/**
|
|
11261
11353
|
* Get image metadata (type, width and height)
|
|
@@ -11275,6 +11367,10 @@ interface ImagesBinding {
|
|
|
11275
11367
|
stream: ReadableStream<Uint8Array>,
|
|
11276
11368
|
options?: ImageInputOptions,
|
|
11277
11369
|
): ImageTransformer;
|
|
11370
|
+
/**
|
|
11371
|
+
* Access hosted images CRUD operations
|
|
11372
|
+
*/
|
|
11373
|
+
readonly hosted: HostedImagesBinding;
|
|
11278
11374
|
}
|
|
11279
11375
|
interface ImageTransformer {
|
|
11280
11376
|
/**
|
package/2023-03-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/2023-07-01/index.d.ts
CHANGED
|
@@ -3600,6 +3600,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3600
3600
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3601
3601
|
*/
|
|
3602
3602
|
extensions: string | null;
|
|
3603
|
+
/**
|
|
3604
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3605
|
+
*
|
|
3606
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3607
|
+
*/
|
|
3608
|
+
binaryType: "blob" | "arraybuffer";
|
|
3603
3609
|
}
|
|
3604
3610
|
declare const WebSocketPair: {
|
|
3605
3611
|
new (): {
|
|
@@ -3848,6 +3854,12 @@ declare abstract class Performance {
|
|
|
3848
3854
|
get timeOrigin(): number;
|
|
3849
3855
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3850
3856
|
now(): number;
|
|
3857
|
+
/**
|
|
3858
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
3859
|
+
*
|
|
3860
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3861
|
+
*/
|
|
3862
|
+
toJSON(): object;
|
|
3851
3863
|
}
|
|
3852
3864
|
// AI Search V2 API Error Interfaces
|
|
3853
3865
|
interface AiSearchInternalError extends Error {}
|
|
@@ -11256,6 +11268,86 @@ type ImageOutputOptions = {
|
|
|
11256
11268
|
background?: string;
|
|
11257
11269
|
anim?: boolean;
|
|
11258
11270
|
};
|
|
11271
|
+
interface ImageMetadata {
|
|
11272
|
+
id: string;
|
|
11273
|
+
filename?: string;
|
|
11274
|
+
uploaded?: string;
|
|
11275
|
+
requireSignedURLs: boolean;
|
|
11276
|
+
meta?: Record<string, unknown>;
|
|
11277
|
+
variants: string[];
|
|
11278
|
+
draft?: boolean;
|
|
11279
|
+
creator?: string;
|
|
11280
|
+
}
|
|
11281
|
+
interface ImageUploadOptions {
|
|
11282
|
+
id?: string;
|
|
11283
|
+
filename?: string;
|
|
11284
|
+
requireSignedURLs?: boolean;
|
|
11285
|
+
metadata?: Record<string, unknown>;
|
|
11286
|
+
creator?: string;
|
|
11287
|
+
encoding?: "base64";
|
|
11288
|
+
}
|
|
11289
|
+
interface ImageUpdateOptions {
|
|
11290
|
+
requireSignedURLs?: boolean;
|
|
11291
|
+
metadata?: Record<string, unknown>;
|
|
11292
|
+
creator?: string;
|
|
11293
|
+
}
|
|
11294
|
+
interface ImageListOptions {
|
|
11295
|
+
limit?: number;
|
|
11296
|
+
cursor?: string;
|
|
11297
|
+
sortOrder?: "asc" | "desc";
|
|
11298
|
+
creator?: string;
|
|
11299
|
+
}
|
|
11300
|
+
interface ImageList {
|
|
11301
|
+
images: ImageMetadata[];
|
|
11302
|
+
cursor?: string;
|
|
11303
|
+
listComplete: boolean;
|
|
11304
|
+
}
|
|
11305
|
+
interface HostedImagesBinding {
|
|
11306
|
+
/**
|
|
11307
|
+
* Get detailed metadata for a hosted image
|
|
11308
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11309
|
+
* @returns Image metadata, or null if not found
|
|
11310
|
+
*/
|
|
11311
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11312
|
+
/**
|
|
11313
|
+
* Get the raw image data for a hosted image
|
|
11314
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11315
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11316
|
+
*/
|
|
11317
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11318
|
+
/**
|
|
11319
|
+
* Upload a new hosted image
|
|
11320
|
+
* @param image The image file to upload
|
|
11321
|
+
* @param options Upload configuration
|
|
11322
|
+
* @returns Metadata for the uploaded image
|
|
11323
|
+
* @throws {@link ImagesError} if upload fails
|
|
11324
|
+
*/
|
|
11325
|
+
upload(
|
|
11326
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11327
|
+
options?: ImageUploadOptions,
|
|
11328
|
+
): Promise<ImageMetadata>;
|
|
11329
|
+
/**
|
|
11330
|
+
* Update hosted image metadata
|
|
11331
|
+
* @param imageId The ID of the image
|
|
11332
|
+
* @param options Properties to update
|
|
11333
|
+
* @returns Updated image metadata
|
|
11334
|
+
* @throws {@link ImagesError} if update fails
|
|
11335
|
+
*/
|
|
11336
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11337
|
+
/**
|
|
11338
|
+
* Delete a hosted image
|
|
11339
|
+
* @param imageId The ID of the image
|
|
11340
|
+
* @returns True if deleted, false if not found
|
|
11341
|
+
*/
|
|
11342
|
+
delete(imageId: string): Promise<boolean>;
|
|
11343
|
+
/**
|
|
11344
|
+
* List hosted images with pagination
|
|
11345
|
+
* @param options List configuration
|
|
11346
|
+
* @returns List of images with pagination info
|
|
11347
|
+
* @throws {@link ImagesError} if list fails
|
|
11348
|
+
*/
|
|
11349
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11350
|
+
}
|
|
11259
11351
|
interface ImagesBinding {
|
|
11260
11352
|
/**
|
|
11261
11353
|
* Get image metadata (type, width and height)
|
|
@@ -11275,6 +11367,10 @@ interface ImagesBinding {
|
|
|
11275
11367
|
stream: ReadableStream<Uint8Array>,
|
|
11276
11368
|
options?: ImageInputOptions,
|
|
11277
11369
|
): ImageTransformer;
|
|
11370
|
+
/**
|
|
11371
|
+
* Access hosted images CRUD operations
|
|
11372
|
+
*/
|
|
11373
|
+
readonly hosted: HostedImagesBinding;
|
|
11278
11374
|
}
|
|
11279
11375
|
interface ImageTransformer {
|
|
11280
11376
|
/**
|