@workers-community/workers-types 4.20260401.1 → 4.20260403.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.
Files changed (3) hide show
  1. package/index.d.ts +25 -20
  2. package/index.ts +25 -20
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -3775,6 +3775,7 @@ interface Container {
3775
3775
  snapshotContainer(
3776
3776
  options: ContainerSnapshotOptions,
3777
3777
  ): Promise<ContainerSnapshot>;
3778
+ interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3778
3779
  }
3779
3780
  interface ContainerDirectorySnapshot {
3780
3781
  id: string;
@@ -12196,19 +12197,37 @@ interface ImageList {
12196
12197
  cursor?: string;
12197
12198
  listComplete: boolean;
12198
12199
  }
12199
- interface HostedImagesBinding {
12200
+ interface ImageHandle {
12200
12201
  /**
12201
- * Get detailed metadata for a hosted image
12202
- * @param imageId The ID of the image (UUID or custom ID)
12202
+ * Get metadata for a hosted image
12203
12203
  * @returns Image metadata, or null if not found
12204
12204
  */
12205
- details(imageId: string): Promise<ImageMetadata | null>;
12205
+ details(): Promise<ImageMetadata | null>;
12206
12206
  /**
12207
12207
  * Get the raw image data for a hosted image
12208
- * @param imageId The ID of the image (UUID or custom ID)
12209
12208
  * @returns ReadableStream of image bytes, or null if not found
12210
12209
  */
12211
- image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
12210
+ bytes(): Promise<ReadableStream<Uint8Array> | null>;
12211
+ /**
12212
+ * Update hosted image metadata
12213
+ * @param options Properties to update
12214
+ * @returns Updated image metadata
12215
+ * @throws {@link ImagesError} if update fails
12216
+ */
12217
+ update(options: ImageUpdateOptions): Promise<ImageMetadata>;
12218
+ /**
12219
+ * Delete a hosted image
12220
+ * @returns True if deleted, false if not found
12221
+ */
12222
+ delete(): Promise<boolean>;
12223
+ }
12224
+ interface HostedImagesBinding {
12225
+ /**
12226
+ * Get a handle for a hosted image
12227
+ * @param imageId The ID of the image (UUID or custom ID)
12228
+ * @returns A handle for per-image operations
12229
+ */
12230
+ image(imageId: string): ImageHandle;
12212
12231
  /**
12213
12232
  * Upload a new hosted image
12214
12233
  * @param image The image file to upload
@@ -12220,20 +12239,6 @@ interface HostedImagesBinding {
12220
12239
  image: ReadableStream<Uint8Array> | ArrayBuffer,
12221
12240
  options?: ImageUploadOptions,
12222
12241
  ): Promise<ImageMetadata>;
12223
- /**
12224
- * Update hosted image metadata
12225
- * @param imageId The ID of the image
12226
- * @param options Properties to update
12227
- * @returns Updated image metadata
12228
- * @throws {@link ImagesError} if update fails
12229
- */
12230
- update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
12231
- /**
12232
- * Delete a hosted image
12233
- * @param imageId The ID of the image
12234
- * @returns True if deleted, false if not found
12235
- */
12236
- delete(imageId: string): Promise<boolean>;
12237
12242
  /**
12238
12243
  * List hosted images with pagination
12239
12244
  * @param options List configuration
package/index.ts CHANGED
@@ -3781,6 +3781,7 @@ export interface Container {
3781
3781
  snapshotContainer(
3782
3782
  options: ContainerSnapshotOptions,
3783
3783
  ): Promise<ContainerSnapshot>;
3784
+ interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
3784
3785
  }
3785
3786
  export interface ContainerDirectorySnapshot {
3786
3787
  id: string;
@@ -12212,19 +12213,37 @@ export interface ImageList {
12212
12213
  cursor?: string;
12213
12214
  listComplete: boolean;
12214
12215
  }
12215
- export interface HostedImagesBinding {
12216
+ export interface ImageHandle {
12216
12217
  /**
12217
- * Get detailed metadata for a hosted image
12218
- * @param imageId The ID of the image (UUID or custom ID)
12218
+ * Get metadata for a hosted image
12219
12219
  * @returns Image metadata, or null if not found
12220
12220
  */
12221
- details(imageId: string): Promise<ImageMetadata | null>;
12221
+ details(): Promise<ImageMetadata | null>;
12222
12222
  /**
12223
12223
  * Get the raw image data for a hosted image
12224
- * @param imageId The ID of the image (UUID or custom ID)
12225
12224
  * @returns ReadableStream of image bytes, or null if not found
12226
12225
  */
12227
- image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
12226
+ bytes(): Promise<ReadableStream<Uint8Array> | null>;
12227
+ /**
12228
+ * Update hosted image metadata
12229
+ * @param options Properties to update
12230
+ * @returns Updated image metadata
12231
+ * @throws {@link ImagesError} if update fails
12232
+ */
12233
+ update(options: ImageUpdateOptions): Promise<ImageMetadata>;
12234
+ /**
12235
+ * Delete a hosted image
12236
+ * @returns True if deleted, false if not found
12237
+ */
12238
+ delete(): Promise<boolean>;
12239
+ }
12240
+ export interface HostedImagesBinding {
12241
+ /**
12242
+ * Get a handle for a hosted image
12243
+ * @param imageId The ID of the image (UUID or custom ID)
12244
+ * @returns A handle for per-image operations
12245
+ */
12246
+ image(imageId: string): ImageHandle;
12228
12247
  /**
12229
12248
  * Upload a new hosted image
12230
12249
  * @param image The image file to upload
@@ -12236,20 +12255,6 @@ export interface HostedImagesBinding {
12236
12255
  image: ReadableStream<Uint8Array> | ArrayBuffer,
12237
12256
  options?: ImageUploadOptions,
12238
12257
  ): Promise<ImageMetadata>;
12239
- /**
12240
- * Update hosted image metadata
12241
- * @param imageId The ID of the image
12242
- * @param options Properties to update
12243
- * @returns Updated image metadata
12244
- * @throws {@link ImagesError} if update fails
12245
- */
12246
- update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
12247
- /**
12248
- * Delete a hosted image
12249
- * @param imageId The ID of the image
12250
- * @returns True if deleted, false if not found
12251
- */
12252
- delete(imageId: string): Promise<boolean>;
12253
12258
  /**
12254
12259
  * List hosted images with pagination
12255
12260
  * @param options List configuration
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "author": "Workers Community",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "4.20260401.1",
10
+ "version": "4.20260403.1",
11
11
  "exports": {
12
12
  ".": {
13
13
  "types": "./index.d.ts",