@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/index.ts CHANGED
@@ -3502,6 +3502,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
3502
3502
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3503
3503
  */
3504
3504
  readonly extensions: string | null;
3505
+ /**
3506
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3507
+ *
3508
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3509
+ */
3510
+ binaryType: "blob" | "arraybuffer";
3505
3511
  }
3506
3512
  export declare const WebSocketPair: {
3507
3513
  new (): {
@@ -3750,6 +3756,12 @@ export declare abstract class Performance {
3750
3756
  get timeOrigin(): number;
3751
3757
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3752
3758
  now(): number;
3759
+ /**
3760
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3761
+ *
3762
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3763
+ */
3764
+ toJSON(): object;
3753
3765
  }
3754
3766
  // AI Search V2 API Error Interfaces
3755
3767
  export interface AiSearchInternalError extends Error {}
@@ -11166,6 +11178,86 @@ export type ImageOutputOptions = {
11166
11178
  background?: string;
11167
11179
  anim?: boolean;
11168
11180
  };
11181
+ export interface ImageMetadata {
11182
+ id: string;
11183
+ filename?: string;
11184
+ uploaded?: string;
11185
+ requireSignedURLs: boolean;
11186
+ meta?: Record<string, unknown>;
11187
+ variants: string[];
11188
+ draft?: boolean;
11189
+ creator?: string;
11190
+ }
11191
+ export interface ImageUploadOptions {
11192
+ id?: string;
11193
+ filename?: string;
11194
+ requireSignedURLs?: boolean;
11195
+ metadata?: Record<string, unknown>;
11196
+ creator?: string;
11197
+ encoding?: "base64";
11198
+ }
11199
+ export interface ImageUpdateOptions {
11200
+ requireSignedURLs?: boolean;
11201
+ metadata?: Record<string, unknown>;
11202
+ creator?: string;
11203
+ }
11204
+ export interface ImageListOptions {
11205
+ limit?: number;
11206
+ cursor?: string;
11207
+ sortOrder?: "asc" | "desc";
11208
+ creator?: string;
11209
+ }
11210
+ export interface ImageList {
11211
+ images: ImageMetadata[];
11212
+ cursor?: string;
11213
+ listComplete: boolean;
11214
+ }
11215
+ export interface HostedImagesBinding {
11216
+ /**
11217
+ * Get detailed metadata for a hosted image
11218
+ * @param imageId The ID of the image (UUID or custom ID)
11219
+ * @returns Image metadata, or null if not found
11220
+ */
11221
+ details(imageId: string): Promise<ImageMetadata | null>;
11222
+ /**
11223
+ * Get the raw image data for a hosted image
11224
+ * @param imageId The ID of the image (UUID or custom ID)
11225
+ * @returns ReadableStream of image bytes, or null if not found
11226
+ */
11227
+ image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
11228
+ /**
11229
+ * Upload a new hosted image
11230
+ * @param image The image file to upload
11231
+ * @param options Upload configuration
11232
+ * @returns Metadata for the uploaded image
11233
+ * @throws {@link ImagesError} if upload fails
11234
+ */
11235
+ upload(
11236
+ image: ReadableStream<Uint8Array> | ArrayBuffer,
11237
+ options?: ImageUploadOptions,
11238
+ ): Promise<ImageMetadata>;
11239
+ /**
11240
+ * Update hosted image metadata
11241
+ * @param imageId The ID of the image
11242
+ * @param options Properties to update
11243
+ * @returns Updated image metadata
11244
+ * @throws {@link ImagesError} if update fails
11245
+ */
11246
+ update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
11247
+ /**
11248
+ * Delete a hosted image
11249
+ * @param imageId The ID of the image
11250
+ * @returns True if deleted, false if not found
11251
+ */
11252
+ delete(imageId: string): Promise<boolean>;
11253
+ /**
11254
+ * List hosted images with pagination
11255
+ * @param options List configuration
11256
+ * @returns List of images with pagination info
11257
+ * @throws {@link ImagesError} if list fails
11258
+ */
11259
+ list(options?: ImageListOptions): Promise<ImageList>;
11260
+ }
11169
11261
  export interface ImagesBinding {
11170
11262
  /**
11171
11263
  * Get image metadata (type, width and height)
@@ -11185,6 +11277,10 @@ export interface ImagesBinding {
11185
11277
  stream: ReadableStream<Uint8Array>,
11186
11278
  options?: ImageInputOptions,
11187
11279
  ): ImageTransformer;
11280
+ /**
11281
+ * Access hosted images CRUD operations
11282
+ */
11283
+ readonly hosted: HostedImagesBinding;
11188
11284
  }
11189
11285
  export interface ImageTransformer {
11190
11286
  /**
package/latest/index.d.ts CHANGED
@@ -3613,6 +3613,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
3613
3613
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3614
3614
  */
3615
3615
  extensions: string | null;
3616
+ /**
3617
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3618
+ *
3619
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3620
+ */
3621
+ binaryType: "blob" | "arraybuffer";
3616
3622
  }
3617
3623
  declare const WebSocketPair: {
3618
3624
  new (): {
@@ -3881,6 +3887,12 @@ declare abstract class Performance {
3881
3887
  get timeOrigin(): number;
3882
3888
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3883
3889
  now(): number;
3890
+ /**
3891
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3892
+ *
3893
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3894
+ */
3895
+ toJSON(): object;
3884
3896
  }
3885
3897
  // AI Search V2 API Error Interfaces
3886
3898
  interface AiSearchInternalError extends Error {}
@@ -11289,6 +11301,86 @@ type ImageOutputOptions = {
11289
11301
  background?: string;
11290
11302
  anim?: boolean;
11291
11303
  };
11304
+ interface ImageMetadata {
11305
+ id: string;
11306
+ filename?: string;
11307
+ uploaded?: string;
11308
+ requireSignedURLs: boolean;
11309
+ meta?: Record<string, unknown>;
11310
+ variants: string[];
11311
+ draft?: boolean;
11312
+ creator?: string;
11313
+ }
11314
+ interface ImageUploadOptions {
11315
+ id?: string;
11316
+ filename?: string;
11317
+ requireSignedURLs?: boolean;
11318
+ metadata?: Record<string, unknown>;
11319
+ creator?: string;
11320
+ encoding?: "base64";
11321
+ }
11322
+ interface ImageUpdateOptions {
11323
+ requireSignedURLs?: boolean;
11324
+ metadata?: Record<string, unknown>;
11325
+ creator?: string;
11326
+ }
11327
+ interface ImageListOptions {
11328
+ limit?: number;
11329
+ cursor?: string;
11330
+ sortOrder?: "asc" | "desc";
11331
+ creator?: string;
11332
+ }
11333
+ interface ImageList {
11334
+ images: ImageMetadata[];
11335
+ cursor?: string;
11336
+ listComplete: boolean;
11337
+ }
11338
+ interface HostedImagesBinding {
11339
+ /**
11340
+ * Get detailed metadata for a hosted image
11341
+ * @param imageId The ID of the image (UUID or custom ID)
11342
+ * @returns Image metadata, or null if not found
11343
+ */
11344
+ details(imageId: string): Promise<ImageMetadata | null>;
11345
+ /**
11346
+ * Get the raw image data for a hosted image
11347
+ * @param imageId The ID of the image (UUID or custom ID)
11348
+ * @returns ReadableStream of image bytes, or null if not found
11349
+ */
11350
+ image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
11351
+ /**
11352
+ * Upload a new hosted image
11353
+ * @param image The image file to upload
11354
+ * @param options Upload configuration
11355
+ * @returns Metadata for the uploaded image
11356
+ * @throws {@link ImagesError} if upload fails
11357
+ */
11358
+ upload(
11359
+ image: ReadableStream<Uint8Array> | ArrayBuffer,
11360
+ options?: ImageUploadOptions,
11361
+ ): Promise<ImageMetadata>;
11362
+ /**
11363
+ * Update hosted image metadata
11364
+ * @param imageId The ID of the image
11365
+ * @param options Properties to update
11366
+ * @returns Updated image metadata
11367
+ * @throws {@link ImagesError} if update fails
11368
+ */
11369
+ update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
11370
+ /**
11371
+ * Delete a hosted image
11372
+ * @param imageId The ID of the image
11373
+ * @returns True if deleted, false if not found
11374
+ */
11375
+ delete(imageId: string): Promise<boolean>;
11376
+ /**
11377
+ * List hosted images with pagination
11378
+ * @param options List configuration
11379
+ * @returns List of images with pagination info
11380
+ * @throws {@link ImagesError} if list fails
11381
+ */
11382
+ list(options?: ImageListOptions): Promise<ImageList>;
11383
+ }
11292
11384
  interface ImagesBinding {
11293
11385
  /**
11294
11386
  * Get image metadata (type, width and height)
@@ -11308,6 +11400,10 @@ interface ImagesBinding {
11308
11400
  stream: ReadableStream<Uint8Array>,
11309
11401
  options?: ImageInputOptions,
11310
11402
  ): ImageTransformer;
11403
+ /**
11404
+ * Access hosted images CRUD operations
11405
+ */
11406
+ readonly hosted: HostedImagesBinding;
11311
11407
  }
11312
11408
  interface ImageTransformer {
11313
11409
  /**
package/latest/index.ts CHANGED
@@ -3622,6 +3622,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
3622
3622
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3623
3623
  */
3624
3624
  extensions: string | null;
3625
+ /**
3626
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3627
+ *
3628
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3629
+ */
3630
+ binaryType: "blob" | "arraybuffer";
3625
3631
  }
3626
3632
  export declare const WebSocketPair: {
3627
3633
  new (): {
@@ -3890,6 +3896,12 @@ export declare abstract class Performance {
3890
3896
  get timeOrigin(): number;
3891
3897
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3892
3898
  now(): number;
3899
+ /**
3900
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3901
+ *
3902
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3903
+ */
3904
+ toJSON(): object;
3893
3905
  }
3894
3906
  // AI Search V2 API Error Interfaces
3895
3907
  export interface AiSearchInternalError extends Error {}
@@ -11306,6 +11318,86 @@ export type ImageOutputOptions = {
11306
11318
  background?: string;
11307
11319
  anim?: boolean;
11308
11320
  };
11321
+ export interface ImageMetadata {
11322
+ id: string;
11323
+ filename?: string;
11324
+ uploaded?: string;
11325
+ requireSignedURLs: boolean;
11326
+ meta?: Record<string, unknown>;
11327
+ variants: string[];
11328
+ draft?: boolean;
11329
+ creator?: string;
11330
+ }
11331
+ export interface ImageUploadOptions {
11332
+ id?: string;
11333
+ filename?: string;
11334
+ requireSignedURLs?: boolean;
11335
+ metadata?: Record<string, unknown>;
11336
+ creator?: string;
11337
+ encoding?: "base64";
11338
+ }
11339
+ export interface ImageUpdateOptions {
11340
+ requireSignedURLs?: boolean;
11341
+ metadata?: Record<string, unknown>;
11342
+ creator?: string;
11343
+ }
11344
+ export interface ImageListOptions {
11345
+ limit?: number;
11346
+ cursor?: string;
11347
+ sortOrder?: "asc" | "desc";
11348
+ creator?: string;
11349
+ }
11350
+ export interface ImageList {
11351
+ images: ImageMetadata[];
11352
+ cursor?: string;
11353
+ listComplete: boolean;
11354
+ }
11355
+ export interface HostedImagesBinding {
11356
+ /**
11357
+ * Get detailed metadata for a hosted image
11358
+ * @param imageId The ID of the image (UUID or custom ID)
11359
+ * @returns Image metadata, or null if not found
11360
+ */
11361
+ details(imageId: string): Promise<ImageMetadata | null>;
11362
+ /**
11363
+ * Get the raw image data for a hosted image
11364
+ * @param imageId The ID of the image (UUID or custom ID)
11365
+ * @returns ReadableStream of image bytes, or null if not found
11366
+ */
11367
+ image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
11368
+ /**
11369
+ * Upload a new hosted image
11370
+ * @param image The image file to upload
11371
+ * @param options Upload configuration
11372
+ * @returns Metadata for the uploaded image
11373
+ * @throws {@link ImagesError} if upload fails
11374
+ */
11375
+ upload(
11376
+ image: ReadableStream<Uint8Array> | ArrayBuffer,
11377
+ options?: ImageUploadOptions,
11378
+ ): Promise<ImageMetadata>;
11379
+ /**
11380
+ * Update hosted image metadata
11381
+ * @param imageId The ID of the image
11382
+ * @param options Properties to update
11383
+ * @returns Updated image metadata
11384
+ * @throws {@link ImagesError} if update fails
11385
+ */
11386
+ update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
11387
+ /**
11388
+ * Delete a hosted image
11389
+ * @param imageId The ID of the image
11390
+ * @returns True if deleted, false if not found
11391
+ */
11392
+ delete(imageId: string): Promise<boolean>;
11393
+ /**
11394
+ * List hosted images with pagination
11395
+ * @param options List configuration
11396
+ * @returns List of images with pagination info
11397
+ * @throws {@link ImagesError} if list fails
11398
+ */
11399
+ list(options?: ImageListOptions): Promise<ImageList>;
11400
+ }
11309
11401
  export interface ImagesBinding {
11310
11402
  /**
11311
11403
  * Get image metadata (type, width and height)
@@ -11325,6 +11417,10 @@ export interface ImagesBinding {
11325
11417
  stream: ReadableStream<Uint8Array>,
11326
11418
  options?: ImageInputOptions,
11327
11419
  ): ImageTransformer;
11420
+ /**
11421
+ * Access hosted images CRUD operations
11422
+ */
11423
+ readonly hosted: HostedImagesBinding;
11328
11424
  }
11329
11425
  export interface ImageTransformer {
11330
11426
  /**
package/oldest/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
  /**
package/oldest/index.ts CHANGED
@@ -3502,6 +3502,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
3502
3502
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3503
3503
  */
3504
3504
  readonly extensions: string | null;
3505
+ /**
3506
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3507
+ *
3508
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3509
+ */
3510
+ binaryType: "blob" | "arraybuffer";
3505
3511
  }
3506
3512
  export declare const WebSocketPair: {
3507
3513
  new (): {
@@ -3750,6 +3756,12 @@ export declare abstract class Performance {
3750
3756
  get timeOrigin(): number;
3751
3757
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3752
3758
  now(): number;
3759
+ /**
3760
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3761
+ *
3762
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3763
+ */
3764
+ toJSON(): object;
3753
3765
  }
3754
3766
  // AI Search V2 API Error Interfaces
3755
3767
  export interface AiSearchInternalError extends Error {}
@@ -11166,6 +11178,86 @@ export type ImageOutputOptions = {
11166
11178
  background?: string;
11167
11179
  anim?: boolean;
11168
11180
  };
11181
+ export interface ImageMetadata {
11182
+ id: string;
11183
+ filename?: string;
11184
+ uploaded?: string;
11185
+ requireSignedURLs: boolean;
11186
+ meta?: Record<string, unknown>;
11187
+ variants: string[];
11188
+ draft?: boolean;
11189
+ creator?: string;
11190
+ }
11191
+ export interface ImageUploadOptions {
11192
+ id?: string;
11193
+ filename?: string;
11194
+ requireSignedURLs?: boolean;
11195
+ metadata?: Record<string, unknown>;
11196
+ creator?: string;
11197
+ encoding?: "base64";
11198
+ }
11199
+ export interface ImageUpdateOptions {
11200
+ requireSignedURLs?: boolean;
11201
+ metadata?: Record<string, unknown>;
11202
+ creator?: string;
11203
+ }
11204
+ export interface ImageListOptions {
11205
+ limit?: number;
11206
+ cursor?: string;
11207
+ sortOrder?: "asc" | "desc";
11208
+ creator?: string;
11209
+ }
11210
+ export interface ImageList {
11211
+ images: ImageMetadata[];
11212
+ cursor?: string;
11213
+ listComplete: boolean;
11214
+ }
11215
+ export interface HostedImagesBinding {
11216
+ /**
11217
+ * Get detailed metadata for a hosted image
11218
+ * @param imageId The ID of the image (UUID or custom ID)
11219
+ * @returns Image metadata, or null if not found
11220
+ */
11221
+ details(imageId: string): Promise<ImageMetadata | null>;
11222
+ /**
11223
+ * Get the raw image data for a hosted image
11224
+ * @param imageId The ID of the image (UUID or custom ID)
11225
+ * @returns ReadableStream of image bytes, or null if not found
11226
+ */
11227
+ image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
11228
+ /**
11229
+ * Upload a new hosted image
11230
+ * @param image The image file to upload
11231
+ * @param options Upload configuration
11232
+ * @returns Metadata for the uploaded image
11233
+ * @throws {@link ImagesError} if upload fails
11234
+ */
11235
+ upload(
11236
+ image: ReadableStream<Uint8Array> | ArrayBuffer,
11237
+ options?: ImageUploadOptions,
11238
+ ): Promise<ImageMetadata>;
11239
+ /**
11240
+ * Update hosted image metadata
11241
+ * @param imageId The ID of the image
11242
+ * @param options Properties to update
11243
+ * @returns Updated image metadata
11244
+ * @throws {@link ImagesError} if update fails
11245
+ */
11246
+ update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
11247
+ /**
11248
+ * Delete a hosted image
11249
+ * @param imageId The ID of the image
11250
+ * @returns True if deleted, false if not found
11251
+ */
11252
+ delete(imageId: string): Promise<boolean>;
11253
+ /**
11254
+ * List hosted images with pagination
11255
+ * @param options List configuration
11256
+ * @returns List of images with pagination info
11257
+ * @throws {@link ImagesError} if list fails
11258
+ */
11259
+ list(options?: ImageListOptions): Promise<ImageList>;
11260
+ }
11169
11261
  export interface ImagesBinding {
11170
11262
  /**
11171
11263
  * Get image metadata (type, width and height)
@@ -11185,6 +11277,10 @@ export interface ImagesBinding {
11185
11277
  stream: ReadableStream<Uint8Array>,
11186
11278
  options?: ImageInputOptions,
11187
11279
  ): ImageTransformer;
11280
+ /**
11281
+ * Access hosted images CRUD operations
11282
+ */
11283
+ readonly hosted: HostedImagesBinding;
11188
11284
  }
11189
11285
  export interface ImageTransformer {
11190
11286
  /**
package/package.json CHANGED
@@ -7,5 +7,5 @@
7
7
  },
8
8
  "author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "4.20260304.0"
10
+ "version": "4.20260305.1"
11
11
  }