@cloudflare/workers-types 4.20260303.0 → 4.20260305.0
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 +85 -1
- package/2021-11-03/index.ts +85 -1
- package/2022-01-31/index.d.ts +85 -1
- package/2022-01-31/index.ts +85 -1
- package/2022-03-21/index.d.ts +85 -1
- package/2022-03-21/index.ts +85 -1
- package/2022-08-04/index.d.ts +85 -1
- package/2022-08-04/index.ts +85 -1
- package/2022-10-31/index.d.ts +85 -1
- package/2022-10-31/index.ts +85 -1
- package/2022-11-30/index.d.ts +85 -1
- package/2022-11-30/index.ts +85 -1
- package/2023-03-01/index.d.ts +85 -1
- package/2023-03-01/index.ts +85 -1
- package/2023-07-01/index.d.ts +85 -1
- package/2023-07-01/index.ts +85 -1
- package/experimental/index.d.ts +107 -3
- package/experimental/index.ts +107 -3
- package/index.d.ts +85 -1
- package/index.ts +85 -1
- package/latest/index.d.ts +85 -1
- package/latest/index.ts +85 -1
- package/oldest/index.d.ts +85 -1
- package/oldest/index.ts +85 -1
- package/package.json +1 -1
package/2023-03-01/index.d.ts
CHANGED
|
@@ -9551,7 +9551,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
9551
9551
|
* });
|
|
9552
9552
|
* ```
|
|
9553
9553
|
*/
|
|
9554
|
-
aiSearch: AiSearchAccountService;
|
|
9554
|
+
aiSearch(): AiSearchAccountService;
|
|
9555
9555
|
/**
|
|
9556
9556
|
* @deprecated AutoRAG has been replaced by AI Search.
|
|
9557
9557
|
* Use `env.AI.aiSearch` instead for better API design and new features.
|
|
@@ -11256,6 +11256,86 @@ type ImageOutputOptions = {
|
|
|
11256
11256
|
background?: string;
|
|
11257
11257
|
anim?: boolean;
|
|
11258
11258
|
};
|
|
11259
|
+
interface ImageMetadata {
|
|
11260
|
+
id: string;
|
|
11261
|
+
filename?: string;
|
|
11262
|
+
uploaded?: string;
|
|
11263
|
+
requireSignedURLs: boolean;
|
|
11264
|
+
meta?: Record<string, unknown>;
|
|
11265
|
+
variants: string[];
|
|
11266
|
+
draft?: boolean;
|
|
11267
|
+
creator?: string;
|
|
11268
|
+
}
|
|
11269
|
+
interface ImageUploadOptions {
|
|
11270
|
+
id?: string;
|
|
11271
|
+
filename?: string;
|
|
11272
|
+
requireSignedURLs?: boolean;
|
|
11273
|
+
metadata?: Record<string, unknown>;
|
|
11274
|
+
creator?: string;
|
|
11275
|
+
encoding?: "base64";
|
|
11276
|
+
}
|
|
11277
|
+
interface ImageUpdateOptions {
|
|
11278
|
+
requireSignedURLs?: boolean;
|
|
11279
|
+
metadata?: Record<string, unknown>;
|
|
11280
|
+
creator?: string;
|
|
11281
|
+
}
|
|
11282
|
+
interface ImageListOptions {
|
|
11283
|
+
limit?: number;
|
|
11284
|
+
cursor?: string;
|
|
11285
|
+
sortOrder?: "asc" | "desc";
|
|
11286
|
+
creator?: string;
|
|
11287
|
+
}
|
|
11288
|
+
interface ImageList {
|
|
11289
|
+
images: ImageMetadata[];
|
|
11290
|
+
cursor?: string;
|
|
11291
|
+
listComplete: boolean;
|
|
11292
|
+
}
|
|
11293
|
+
interface HostedImagesBinding {
|
|
11294
|
+
/**
|
|
11295
|
+
* Get detailed metadata for a hosted image
|
|
11296
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11297
|
+
* @returns Image metadata, or null if not found
|
|
11298
|
+
*/
|
|
11299
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11300
|
+
/**
|
|
11301
|
+
* Get the raw image data for a hosted image
|
|
11302
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11303
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11304
|
+
*/
|
|
11305
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11306
|
+
/**
|
|
11307
|
+
* Upload a new hosted image
|
|
11308
|
+
* @param image The image file to upload
|
|
11309
|
+
* @param options Upload configuration
|
|
11310
|
+
* @returns Metadata for the uploaded image
|
|
11311
|
+
* @throws {@link ImagesError} if upload fails
|
|
11312
|
+
*/
|
|
11313
|
+
upload(
|
|
11314
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11315
|
+
options?: ImageUploadOptions,
|
|
11316
|
+
): Promise<ImageMetadata>;
|
|
11317
|
+
/**
|
|
11318
|
+
* Update hosted image metadata
|
|
11319
|
+
* @param imageId The ID of the image
|
|
11320
|
+
* @param options Properties to update
|
|
11321
|
+
* @returns Updated image metadata
|
|
11322
|
+
* @throws {@link ImagesError} if update fails
|
|
11323
|
+
*/
|
|
11324
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11325
|
+
/**
|
|
11326
|
+
* Delete a hosted image
|
|
11327
|
+
* @param imageId The ID of the image
|
|
11328
|
+
* @returns True if deleted, false if not found
|
|
11329
|
+
*/
|
|
11330
|
+
delete(imageId: string): Promise<boolean>;
|
|
11331
|
+
/**
|
|
11332
|
+
* List hosted images with pagination
|
|
11333
|
+
* @param options List configuration
|
|
11334
|
+
* @returns List of images with pagination info
|
|
11335
|
+
* @throws {@link ImagesError} if list fails
|
|
11336
|
+
*/
|
|
11337
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11338
|
+
}
|
|
11259
11339
|
interface ImagesBinding {
|
|
11260
11340
|
/**
|
|
11261
11341
|
* Get image metadata (type, width and height)
|
|
@@ -11275,6 +11355,10 @@ interface ImagesBinding {
|
|
|
11275
11355
|
stream: ReadableStream<Uint8Array>,
|
|
11276
11356
|
options?: ImageInputOptions,
|
|
11277
11357
|
): ImageTransformer;
|
|
11358
|
+
/**
|
|
11359
|
+
* Access hosted images CRUD operations
|
|
11360
|
+
*/
|
|
11361
|
+
readonly hosted: HostedImagesBinding;
|
|
11278
11362
|
}
|
|
11279
11363
|
interface ImageTransformer {
|
|
11280
11364
|
/**
|
package/2023-03-01/index.ts
CHANGED
|
@@ -9563,7 +9563,7 @@ export declare abstract class Ai<
|
|
|
9563
9563
|
* });
|
|
9564
9564
|
* ```
|
|
9565
9565
|
*/
|
|
9566
|
-
aiSearch: AiSearchAccountService;
|
|
9566
|
+
aiSearch(): AiSearchAccountService;
|
|
9567
9567
|
/**
|
|
9568
9568
|
* @deprecated AutoRAG has been replaced by AI Search.
|
|
9569
9569
|
* Use `env.AI.aiSearch` instead for better API design and new features.
|
|
@@ -11273,6 +11273,86 @@ export type ImageOutputOptions = {
|
|
|
11273
11273
|
background?: string;
|
|
11274
11274
|
anim?: boolean;
|
|
11275
11275
|
};
|
|
11276
|
+
export interface ImageMetadata {
|
|
11277
|
+
id: string;
|
|
11278
|
+
filename?: string;
|
|
11279
|
+
uploaded?: string;
|
|
11280
|
+
requireSignedURLs: boolean;
|
|
11281
|
+
meta?: Record<string, unknown>;
|
|
11282
|
+
variants: string[];
|
|
11283
|
+
draft?: boolean;
|
|
11284
|
+
creator?: string;
|
|
11285
|
+
}
|
|
11286
|
+
export interface ImageUploadOptions {
|
|
11287
|
+
id?: string;
|
|
11288
|
+
filename?: string;
|
|
11289
|
+
requireSignedURLs?: boolean;
|
|
11290
|
+
metadata?: Record<string, unknown>;
|
|
11291
|
+
creator?: string;
|
|
11292
|
+
encoding?: "base64";
|
|
11293
|
+
}
|
|
11294
|
+
export interface ImageUpdateOptions {
|
|
11295
|
+
requireSignedURLs?: boolean;
|
|
11296
|
+
metadata?: Record<string, unknown>;
|
|
11297
|
+
creator?: string;
|
|
11298
|
+
}
|
|
11299
|
+
export interface ImageListOptions {
|
|
11300
|
+
limit?: number;
|
|
11301
|
+
cursor?: string;
|
|
11302
|
+
sortOrder?: "asc" | "desc";
|
|
11303
|
+
creator?: string;
|
|
11304
|
+
}
|
|
11305
|
+
export interface ImageList {
|
|
11306
|
+
images: ImageMetadata[];
|
|
11307
|
+
cursor?: string;
|
|
11308
|
+
listComplete: boolean;
|
|
11309
|
+
}
|
|
11310
|
+
export interface HostedImagesBinding {
|
|
11311
|
+
/**
|
|
11312
|
+
* Get detailed metadata for a hosted image
|
|
11313
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11314
|
+
* @returns Image metadata, or null if not found
|
|
11315
|
+
*/
|
|
11316
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11317
|
+
/**
|
|
11318
|
+
* Get the raw image data for a hosted image
|
|
11319
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11320
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11321
|
+
*/
|
|
11322
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11323
|
+
/**
|
|
11324
|
+
* Upload a new hosted image
|
|
11325
|
+
* @param image The image file to upload
|
|
11326
|
+
* @param options Upload configuration
|
|
11327
|
+
* @returns Metadata for the uploaded image
|
|
11328
|
+
* @throws {@link ImagesError} if upload fails
|
|
11329
|
+
*/
|
|
11330
|
+
upload(
|
|
11331
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11332
|
+
options?: ImageUploadOptions,
|
|
11333
|
+
): Promise<ImageMetadata>;
|
|
11334
|
+
/**
|
|
11335
|
+
* Update hosted image metadata
|
|
11336
|
+
* @param imageId The ID of the image
|
|
11337
|
+
* @param options Properties to update
|
|
11338
|
+
* @returns Updated image metadata
|
|
11339
|
+
* @throws {@link ImagesError} if update fails
|
|
11340
|
+
*/
|
|
11341
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11342
|
+
/**
|
|
11343
|
+
* Delete a hosted image
|
|
11344
|
+
* @param imageId The ID of the image
|
|
11345
|
+
* @returns True if deleted, false if not found
|
|
11346
|
+
*/
|
|
11347
|
+
delete(imageId: string): Promise<boolean>;
|
|
11348
|
+
/**
|
|
11349
|
+
* List hosted images with pagination
|
|
11350
|
+
* @param options List configuration
|
|
11351
|
+
* @returns List of images with pagination info
|
|
11352
|
+
* @throws {@link ImagesError} if list fails
|
|
11353
|
+
*/
|
|
11354
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11355
|
+
}
|
|
11276
11356
|
export interface ImagesBinding {
|
|
11277
11357
|
/**
|
|
11278
11358
|
* Get image metadata (type, width and height)
|
|
@@ -11292,6 +11372,10 @@ export interface ImagesBinding {
|
|
|
11292
11372
|
stream: ReadableStream<Uint8Array>,
|
|
11293
11373
|
options?: ImageInputOptions,
|
|
11294
11374
|
): ImageTransformer;
|
|
11375
|
+
/**
|
|
11376
|
+
* Access hosted images CRUD operations
|
|
11377
|
+
*/
|
|
11378
|
+
readonly hosted: HostedImagesBinding;
|
|
11295
11379
|
}
|
|
11296
11380
|
export interface ImageTransformer {
|
|
11297
11381
|
/**
|
package/2023-07-01/index.d.ts
CHANGED
|
@@ -9551,7 +9551,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
9551
9551
|
* });
|
|
9552
9552
|
* ```
|
|
9553
9553
|
*/
|
|
9554
|
-
aiSearch: AiSearchAccountService;
|
|
9554
|
+
aiSearch(): AiSearchAccountService;
|
|
9555
9555
|
/**
|
|
9556
9556
|
* @deprecated AutoRAG has been replaced by AI Search.
|
|
9557
9557
|
* Use `env.AI.aiSearch` instead for better API design and new features.
|
|
@@ -11256,6 +11256,86 @@ type ImageOutputOptions = {
|
|
|
11256
11256
|
background?: string;
|
|
11257
11257
|
anim?: boolean;
|
|
11258
11258
|
};
|
|
11259
|
+
interface ImageMetadata {
|
|
11260
|
+
id: string;
|
|
11261
|
+
filename?: string;
|
|
11262
|
+
uploaded?: string;
|
|
11263
|
+
requireSignedURLs: boolean;
|
|
11264
|
+
meta?: Record<string, unknown>;
|
|
11265
|
+
variants: string[];
|
|
11266
|
+
draft?: boolean;
|
|
11267
|
+
creator?: string;
|
|
11268
|
+
}
|
|
11269
|
+
interface ImageUploadOptions {
|
|
11270
|
+
id?: string;
|
|
11271
|
+
filename?: string;
|
|
11272
|
+
requireSignedURLs?: boolean;
|
|
11273
|
+
metadata?: Record<string, unknown>;
|
|
11274
|
+
creator?: string;
|
|
11275
|
+
encoding?: "base64";
|
|
11276
|
+
}
|
|
11277
|
+
interface ImageUpdateOptions {
|
|
11278
|
+
requireSignedURLs?: boolean;
|
|
11279
|
+
metadata?: Record<string, unknown>;
|
|
11280
|
+
creator?: string;
|
|
11281
|
+
}
|
|
11282
|
+
interface ImageListOptions {
|
|
11283
|
+
limit?: number;
|
|
11284
|
+
cursor?: string;
|
|
11285
|
+
sortOrder?: "asc" | "desc";
|
|
11286
|
+
creator?: string;
|
|
11287
|
+
}
|
|
11288
|
+
interface ImageList {
|
|
11289
|
+
images: ImageMetadata[];
|
|
11290
|
+
cursor?: string;
|
|
11291
|
+
listComplete: boolean;
|
|
11292
|
+
}
|
|
11293
|
+
interface HostedImagesBinding {
|
|
11294
|
+
/**
|
|
11295
|
+
* Get detailed metadata for a hosted image
|
|
11296
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11297
|
+
* @returns Image metadata, or null if not found
|
|
11298
|
+
*/
|
|
11299
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11300
|
+
/**
|
|
11301
|
+
* Get the raw image data for a hosted image
|
|
11302
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11303
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11304
|
+
*/
|
|
11305
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11306
|
+
/**
|
|
11307
|
+
* Upload a new hosted image
|
|
11308
|
+
* @param image The image file to upload
|
|
11309
|
+
* @param options Upload configuration
|
|
11310
|
+
* @returns Metadata for the uploaded image
|
|
11311
|
+
* @throws {@link ImagesError} if upload fails
|
|
11312
|
+
*/
|
|
11313
|
+
upload(
|
|
11314
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11315
|
+
options?: ImageUploadOptions,
|
|
11316
|
+
): Promise<ImageMetadata>;
|
|
11317
|
+
/**
|
|
11318
|
+
* Update hosted image metadata
|
|
11319
|
+
* @param imageId The ID of the image
|
|
11320
|
+
* @param options Properties to update
|
|
11321
|
+
* @returns Updated image metadata
|
|
11322
|
+
* @throws {@link ImagesError} if update fails
|
|
11323
|
+
*/
|
|
11324
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11325
|
+
/**
|
|
11326
|
+
* Delete a hosted image
|
|
11327
|
+
* @param imageId The ID of the image
|
|
11328
|
+
* @returns True if deleted, false if not found
|
|
11329
|
+
*/
|
|
11330
|
+
delete(imageId: string): Promise<boolean>;
|
|
11331
|
+
/**
|
|
11332
|
+
* List hosted images with pagination
|
|
11333
|
+
* @param options List configuration
|
|
11334
|
+
* @returns List of images with pagination info
|
|
11335
|
+
* @throws {@link ImagesError} if list fails
|
|
11336
|
+
*/
|
|
11337
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11338
|
+
}
|
|
11259
11339
|
interface ImagesBinding {
|
|
11260
11340
|
/**
|
|
11261
11341
|
* Get image metadata (type, width and height)
|
|
@@ -11275,6 +11355,10 @@ interface ImagesBinding {
|
|
|
11275
11355
|
stream: ReadableStream<Uint8Array>,
|
|
11276
11356
|
options?: ImageInputOptions,
|
|
11277
11357
|
): ImageTransformer;
|
|
11358
|
+
/**
|
|
11359
|
+
* Access hosted images CRUD operations
|
|
11360
|
+
*/
|
|
11361
|
+
readonly hosted: HostedImagesBinding;
|
|
11278
11362
|
}
|
|
11279
11363
|
interface ImageTransformer {
|
|
11280
11364
|
/**
|
package/2023-07-01/index.ts
CHANGED
|
@@ -9563,7 +9563,7 @@ export declare abstract class Ai<
|
|
|
9563
9563
|
* });
|
|
9564
9564
|
* ```
|
|
9565
9565
|
*/
|
|
9566
|
-
aiSearch: AiSearchAccountService;
|
|
9566
|
+
aiSearch(): AiSearchAccountService;
|
|
9567
9567
|
/**
|
|
9568
9568
|
* @deprecated AutoRAG has been replaced by AI Search.
|
|
9569
9569
|
* Use `env.AI.aiSearch` instead for better API design and new features.
|
|
@@ -11273,6 +11273,86 @@ export type ImageOutputOptions = {
|
|
|
11273
11273
|
background?: string;
|
|
11274
11274
|
anim?: boolean;
|
|
11275
11275
|
};
|
|
11276
|
+
export interface ImageMetadata {
|
|
11277
|
+
id: string;
|
|
11278
|
+
filename?: string;
|
|
11279
|
+
uploaded?: string;
|
|
11280
|
+
requireSignedURLs: boolean;
|
|
11281
|
+
meta?: Record<string, unknown>;
|
|
11282
|
+
variants: string[];
|
|
11283
|
+
draft?: boolean;
|
|
11284
|
+
creator?: string;
|
|
11285
|
+
}
|
|
11286
|
+
export interface ImageUploadOptions {
|
|
11287
|
+
id?: string;
|
|
11288
|
+
filename?: string;
|
|
11289
|
+
requireSignedURLs?: boolean;
|
|
11290
|
+
metadata?: Record<string, unknown>;
|
|
11291
|
+
creator?: string;
|
|
11292
|
+
encoding?: "base64";
|
|
11293
|
+
}
|
|
11294
|
+
export interface ImageUpdateOptions {
|
|
11295
|
+
requireSignedURLs?: boolean;
|
|
11296
|
+
metadata?: Record<string, unknown>;
|
|
11297
|
+
creator?: string;
|
|
11298
|
+
}
|
|
11299
|
+
export interface ImageListOptions {
|
|
11300
|
+
limit?: number;
|
|
11301
|
+
cursor?: string;
|
|
11302
|
+
sortOrder?: "asc" | "desc";
|
|
11303
|
+
creator?: string;
|
|
11304
|
+
}
|
|
11305
|
+
export interface ImageList {
|
|
11306
|
+
images: ImageMetadata[];
|
|
11307
|
+
cursor?: string;
|
|
11308
|
+
listComplete: boolean;
|
|
11309
|
+
}
|
|
11310
|
+
export interface HostedImagesBinding {
|
|
11311
|
+
/**
|
|
11312
|
+
* Get detailed metadata for a hosted image
|
|
11313
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11314
|
+
* @returns Image metadata, or null if not found
|
|
11315
|
+
*/
|
|
11316
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11317
|
+
/**
|
|
11318
|
+
* Get the raw image data for a hosted image
|
|
11319
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11320
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11321
|
+
*/
|
|
11322
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11323
|
+
/**
|
|
11324
|
+
* Upload a new hosted image
|
|
11325
|
+
* @param image The image file to upload
|
|
11326
|
+
* @param options Upload configuration
|
|
11327
|
+
* @returns Metadata for the uploaded image
|
|
11328
|
+
* @throws {@link ImagesError} if upload fails
|
|
11329
|
+
*/
|
|
11330
|
+
upload(
|
|
11331
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11332
|
+
options?: ImageUploadOptions,
|
|
11333
|
+
): Promise<ImageMetadata>;
|
|
11334
|
+
/**
|
|
11335
|
+
* Update hosted image metadata
|
|
11336
|
+
* @param imageId The ID of the image
|
|
11337
|
+
* @param options Properties to update
|
|
11338
|
+
* @returns Updated image metadata
|
|
11339
|
+
* @throws {@link ImagesError} if update fails
|
|
11340
|
+
*/
|
|
11341
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11342
|
+
/**
|
|
11343
|
+
* Delete a hosted image
|
|
11344
|
+
* @param imageId The ID of the image
|
|
11345
|
+
* @returns True if deleted, false if not found
|
|
11346
|
+
*/
|
|
11347
|
+
delete(imageId: string): Promise<boolean>;
|
|
11348
|
+
/**
|
|
11349
|
+
* List hosted images with pagination
|
|
11350
|
+
* @param options List configuration
|
|
11351
|
+
* @returns List of images with pagination info
|
|
11352
|
+
* @throws {@link ImagesError} if list fails
|
|
11353
|
+
*/
|
|
11354
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11355
|
+
}
|
|
11276
11356
|
export interface ImagesBinding {
|
|
11277
11357
|
/**
|
|
11278
11358
|
* Get image metadata (type, width and height)
|
|
@@ -11292,6 +11372,10 @@ export interface ImagesBinding {
|
|
|
11292
11372
|
stream: ReadableStream<Uint8Array>,
|
|
11293
11373
|
options?: ImageInputOptions,
|
|
11294
11374
|
): ImageTransformer;
|
|
11375
|
+
/**
|
|
11376
|
+
* Access hosted images CRUD operations
|
|
11377
|
+
*/
|
|
11378
|
+
readonly hosted: HostedImagesBinding;
|
|
11295
11379
|
}
|
|
11296
11380
|
export interface ImageTransformer {
|
|
11297
11381
|
/**
|
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
|
}
|
|
@@ -4089,8 +4099,18 @@ type LoopbackServiceStub<
|
|
|
4089
4099
|
T extends Rpc.WorkerEntrypointBranded | undefined = undefined,
|
|
4090
4100
|
> = Fetcher<T> &
|
|
4091
4101
|
(T extends CloudflareWorkersModule.WorkerEntrypoint<any, infer Props>
|
|
4092
|
-
? (opts: {
|
|
4093
|
-
|
|
4102
|
+
? (opts: {
|
|
4103
|
+
props?: Props;
|
|
4104
|
+
version?: {
|
|
4105
|
+
cohort?: string | null;
|
|
4106
|
+
};
|
|
4107
|
+
}) => Fetcher<T>
|
|
4108
|
+
: (opts: {
|
|
4109
|
+
props?: any;
|
|
4110
|
+
version?: {
|
|
4111
|
+
cohort?: string | null;
|
|
4112
|
+
};
|
|
4113
|
+
}) => Fetcher<T>);
|
|
4094
4114
|
type LoopbackDurableObjectClass<
|
|
4095
4115
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
4096
4116
|
> = DurableObjectClass<T> &
|
|
@@ -10212,7 +10232,7 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
10212
10232
|
* });
|
|
10213
10233
|
* ```
|
|
10214
10234
|
*/
|
|
10215
|
-
aiSearch: AiSearchAccountService;
|
|
10235
|
+
aiSearch(): AiSearchAccountService;
|
|
10216
10236
|
/**
|
|
10217
10237
|
* @deprecated AutoRAG has been replaced by AI Search.
|
|
10218
10238
|
* Use `env.AI.aiSearch` instead for better API design and new features.
|
|
@@ -11917,6 +11937,86 @@ type ImageOutputOptions = {
|
|
|
11917
11937
|
background?: string;
|
|
11918
11938
|
anim?: boolean;
|
|
11919
11939
|
};
|
|
11940
|
+
interface ImageMetadata {
|
|
11941
|
+
id: string;
|
|
11942
|
+
filename?: string;
|
|
11943
|
+
uploaded?: string;
|
|
11944
|
+
requireSignedURLs: boolean;
|
|
11945
|
+
meta?: Record<string, unknown>;
|
|
11946
|
+
variants: string[];
|
|
11947
|
+
draft?: boolean;
|
|
11948
|
+
creator?: string;
|
|
11949
|
+
}
|
|
11950
|
+
interface ImageUploadOptions {
|
|
11951
|
+
id?: string;
|
|
11952
|
+
filename?: string;
|
|
11953
|
+
requireSignedURLs?: boolean;
|
|
11954
|
+
metadata?: Record<string, unknown>;
|
|
11955
|
+
creator?: string;
|
|
11956
|
+
encoding?: "base64";
|
|
11957
|
+
}
|
|
11958
|
+
interface ImageUpdateOptions {
|
|
11959
|
+
requireSignedURLs?: boolean;
|
|
11960
|
+
metadata?: Record<string, unknown>;
|
|
11961
|
+
creator?: string;
|
|
11962
|
+
}
|
|
11963
|
+
interface ImageListOptions {
|
|
11964
|
+
limit?: number;
|
|
11965
|
+
cursor?: string;
|
|
11966
|
+
sortOrder?: "asc" | "desc";
|
|
11967
|
+
creator?: string;
|
|
11968
|
+
}
|
|
11969
|
+
interface ImageList {
|
|
11970
|
+
images: ImageMetadata[];
|
|
11971
|
+
cursor?: string;
|
|
11972
|
+
listComplete: boolean;
|
|
11973
|
+
}
|
|
11974
|
+
interface HostedImagesBinding {
|
|
11975
|
+
/**
|
|
11976
|
+
* Get detailed metadata for a hosted image
|
|
11977
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11978
|
+
* @returns Image metadata, or null if not found
|
|
11979
|
+
*/
|
|
11980
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11981
|
+
/**
|
|
11982
|
+
* Get the raw image data for a hosted image
|
|
11983
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11984
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11985
|
+
*/
|
|
11986
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11987
|
+
/**
|
|
11988
|
+
* Upload a new hosted image
|
|
11989
|
+
* @param image The image file to upload
|
|
11990
|
+
* @param options Upload configuration
|
|
11991
|
+
* @returns Metadata for the uploaded image
|
|
11992
|
+
* @throws {@link ImagesError} if upload fails
|
|
11993
|
+
*/
|
|
11994
|
+
upload(
|
|
11995
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11996
|
+
options?: ImageUploadOptions,
|
|
11997
|
+
): Promise<ImageMetadata>;
|
|
11998
|
+
/**
|
|
11999
|
+
* Update hosted image metadata
|
|
12000
|
+
* @param imageId The ID of the image
|
|
12001
|
+
* @param options Properties to update
|
|
12002
|
+
* @returns Updated image metadata
|
|
12003
|
+
* @throws {@link ImagesError} if update fails
|
|
12004
|
+
*/
|
|
12005
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12006
|
+
/**
|
|
12007
|
+
* Delete a hosted image
|
|
12008
|
+
* @param imageId The ID of the image
|
|
12009
|
+
* @returns True if deleted, false if not found
|
|
12010
|
+
*/
|
|
12011
|
+
delete(imageId: string): Promise<boolean>;
|
|
12012
|
+
/**
|
|
12013
|
+
* List hosted images with pagination
|
|
12014
|
+
* @param options List configuration
|
|
12015
|
+
* @returns List of images with pagination info
|
|
12016
|
+
* @throws {@link ImagesError} if list fails
|
|
12017
|
+
*/
|
|
12018
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
12019
|
+
}
|
|
11920
12020
|
interface ImagesBinding {
|
|
11921
12021
|
/**
|
|
11922
12022
|
* Get image metadata (type, width and height)
|
|
@@ -11936,6 +12036,10 @@ interface ImagesBinding {
|
|
|
11936
12036
|
stream: ReadableStream<Uint8Array>,
|
|
11937
12037
|
options?: ImageInputOptions,
|
|
11938
12038
|
): ImageTransformer;
|
|
12039
|
+
/**
|
|
12040
|
+
* Access hosted images CRUD operations
|
|
12041
|
+
*/
|
|
12042
|
+
readonly hosted: HostedImagesBinding;
|
|
11939
12043
|
}
|
|
11940
12044
|
interface ImageTransformer {
|
|
11941
12045
|
/**
|