@cloudflare/workers-types 4.20260304.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 +84 -0
- package/2021-11-03/index.ts +84 -0
- package/2022-01-31/index.d.ts +84 -0
- package/2022-01-31/index.ts +84 -0
- package/2022-03-21/index.d.ts +84 -0
- package/2022-03-21/index.ts +84 -0
- package/2022-08-04/index.d.ts +84 -0
- package/2022-08-04/index.ts +84 -0
- package/2022-10-31/index.d.ts +84 -0
- package/2022-10-31/index.ts +84 -0
- package/2022-11-30/index.d.ts +84 -0
- package/2022-11-30/index.ts +84 -0
- package/2023-03-01/index.d.ts +84 -0
- package/2023-03-01/index.ts +84 -0
- package/2023-07-01/index.d.ts +84 -0
- package/2023-07-01/index.ts +84 -0
- package/experimental/index.d.ts +106 -2
- package/experimental/index.ts +106 -2
- package/index.d.ts +84 -0
- package/index.ts +84 -0
- package/latest/index.d.ts +84 -0
- package/latest/index.ts +84 -0
- package/oldest/index.d.ts +84 -0
- package/oldest/index.ts +84 -0
- package/package.json +1 -1
package/2021-11-03/index.d.ts
CHANGED
|
@@ -11149,6 +11149,86 @@ type ImageOutputOptions = {
|
|
|
11149
11149
|
background?: string;
|
|
11150
11150
|
anim?: boolean;
|
|
11151
11151
|
};
|
|
11152
|
+
interface ImageMetadata {
|
|
11153
|
+
id: string;
|
|
11154
|
+
filename?: string;
|
|
11155
|
+
uploaded?: string;
|
|
11156
|
+
requireSignedURLs: boolean;
|
|
11157
|
+
meta?: Record<string, unknown>;
|
|
11158
|
+
variants: string[];
|
|
11159
|
+
draft?: boolean;
|
|
11160
|
+
creator?: string;
|
|
11161
|
+
}
|
|
11162
|
+
interface ImageUploadOptions {
|
|
11163
|
+
id?: string;
|
|
11164
|
+
filename?: string;
|
|
11165
|
+
requireSignedURLs?: boolean;
|
|
11166
|
+
metadata?: Record<string, unknown>;
|
|
11167
|
+
creator?: string;
|
|
11168
|
+
encoding?: "base64";
|
|
11169
|
+
}
|
|
11170
|
+
interface ImageUpdateOptions {
|
|
11171
|
+
requireSignedURLs?: boolean;
|
|
11172
|
+
metadata?: Record<string, unknown>;
|
|
11173
|
+
creator?: string;
|
|
11174
|
+
}
|
|
11175
|
+
interface ImageListOptions {
|
|
11176
|
+
limit?: number;
|
|
11177
|
+
cursor?: string;
|
|
11178
|
+
sortOrder?: "asc" | "desc";
|
|
11179
|
+
creator?: string;
|
|
11180
|
+
}
|
|
11181
|
+
interface ImageList {
|
|
11182
|
+
images: ImageMetadata[];
|
|
11183
|
+
cursor?: string;
|
|
11184
|
+
listComplete: boolean;
|
|
11185
|
+
}
|
|
11186
|
+
interface HostedImagesBinding {
|
|
11187
|
+
/**
|
|
11188
|
+
* Get detailed metadata for a hosted image
|
|
11189
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11190
|
+
* @returns Image metadata, or null if not found
|
|
11191
|
+
*/
|
|
11192
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11193
|
+
/**
|
|
11194
|
+
* Get the raw image data for a hosted image
|
|
11195
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11196
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11197
|
+
*/
|
|
11198
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11199
|
+
/**
|
|
11200
|
+
* Upload a new hosted image
|
|
11201
|
+
* @param image The image file to upload
|
|
11202
|
+
* @param options Upload configuration
|
|
11203
|
+
* @returns Metadata for the uploaded image
|
|
11204
|
+
* @throws {@link ImagesError} if upload fails
|
|
11205
|
+
*/
|
|
11206
|
+
upload(
|
|
11207
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11208
|
+
options?: ImageUploadOptions,
|
|
11209
|
+
): Promise<ImageMetadata>;
|
|
11210
|
+
/**
|
|
11211
|
+
* Update hosted image metadata
|
|
11212
|
+
* @param imageId The ID of the image
|
|
11213
|
+
* @param options Properties to update
|
|
11214
|
+
* @returns Updated image metadata
|
|
11215
|
+
* @throws {@link ImagesError} if update fails
|
|
11216
|
+
*/
|
|
11217
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11218
|
+
/**
|
|
11219
|
+
* Delete a hosted image
|
|
11220
|
+
* @param imageId The ID of the image
|
|
11221
|
+
* @returns True if deleted, false if not found
|
|
11222
|
+
*/
|
|
11223
|
+
delete(imageId: string): Promise<boolean>;
|
|
11224
|
+
/**
|
|
11225
|
+
* List hosted images with pagination
|
|
11226
|
+
* @param options List configuration
|
|
11227
|
+
* @returns List of images with pagination info
|
|
11228
|
+
* @throws {@link ImagesError} if list fails
|
|
11229
|
+
*/
|
|
11230
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11231
|
+
}
|
|
11152
11232
|
interface ImagesBinding {
|
|
11153
11233
|
/**
|
|
11154
11234
|
* Get image metadata (type, width and height)
|
|
@@ -11168,6 +11248,10 @@ interface ImagesBinding {
|
|
|
11168
11248
|
stream: ReadableStream<Uint8Array>,
|
|
11169
11249
|
options?: ImageInputOptions,
|
|
11170
11250
|
): ImageTransformer;
|
|
11251
|
+
/**
|
|
11252
|
+
* Access hosted images CRUD operations
|
|
11253
|
+
*/
|
|
11254
|
+
readonly hosted: HostedImagesBinding;
|
|
11171
11255
|
}
|
|
11172
11256
|
interface ImageTransformer {
|
|
11173
11257
|
/**
|
package/2021-11-03/index.ts
CHANGED
|
@@ -11166,6 +11166,86 @@ export type ImageOutputOptions = {
|
|
|
11166
11166
|
background?: string;
|
|
11167
11167
|
anim?: boolean;
|
|
11168
11168
|
};
|
|
11169
|
+
export interface ImageMetadata {
|
|
11170
|
+
id: string;
|
|
11171
|
+
filename?: string;
|
|
11172
|
+
uploaded?: string;
|
|
11173
|
+
requireSignedURLs: boolean;
|
|
11174
|
+
meta?: Record<string, unknown>;
|
|
11175
|
+
variants: string[];
|
|
11176
|
+
draft?: boolean;
|
|
11177
|
+
creator?: string;
|
|
11178
|
+
}
|
|
11179
|
+
export interface ImageUploadOptions {
|
|
11180
|
+
id?: string;
|
|
11181
|
+
filename?: string;
|
|
11182
|
+
requireSignedURLs?: boolean;
|
|
11183
|
+
metadata?: Record<string, unknown>;
|
|
11184
|
+
creator?: string;
|
|
11185
|
+
encoding?: "base64";
|
|
11186
|
+
}
|
|
11187
|
+
export interface ImageUpdateOptions {
|
|
11188
|
+
requireSignedURLs?: boolean;
|
|
11189
|
+
metadata?: Record<string, unknown>;
|
|
11190
|
+
creator?: string;
|
|
11191
|
+
}
|
|
11192
|
+
export interface ImageListOptions {
|
|
11193
|
+
limit?: number;
|
|
11194
|
+
cursor?: string;
|
|
11195
|
+
sortOrder?: "asc" | "desc";
|
|
11196
|
+
creator?: string;
|
|
11197
|
+
}
|
|
11198
|
+
export interface ImageList {
|
|
11199
|
+
images: ImageMetadata[];
|
|
11200
|
+
cursor?: string;
|
|
11201
|
+
listComplete: boolean;
|
|
11202
|
+
}
|
|
11203
|
+
export interface HostedImagesBinding {
|
|
11204
|
+
/**
|
|
11205
|
+
* Get detailed metadata for a hosted image
|
|
11206
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11207
|
+
* @returns Image metadata, or null if not found
|
|
11208
|
+
*/
|
|
11209
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11210
|
+
/**
|
|
11211
|
+
* Get the raw image data for a hosted image
|
|
11212
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11213
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11214
|
+
*/
|
|
11215
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11216
|
+
/**
|
|
11217
|
+
* Upload a new hosted image
|
|
11218
|
+
* @param image The image file to upload
|
|
11219
|
+
* @param options Upload configuration
|
|
11220
|
+
* @returns Metadata for the uploaded image
|
|
11221
|
+
* @throws {@link ImagesError} if upload fails
|
|
11222
|
+
*/
|
|
11223
|
+
upload(
|
|
11224
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11225
|
+
options?: ImageUploadOptions,
|
|
11226
|
+
): Promise<ImageMetadata>;
|
|
11227
|
+
/**
|
|
11228
|
+
* Update hosted image metadata
|
|
11229
|
+
* @param imageId The ID of the image
|
|
11230
|
+
* @param options Properties to update
|
|
11231
|
+
* @returns Updated image metadata
|
|
11232
|
+
* @throws {@link ImagesError} if update fails
|
|
11233
|
+
*/
|
|
11234
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11235
|
+
/**
|
|
11236
|
+
* Delete a hosted image
|
|
11237
|
+
* @param imageId The ID of the image
|
|
11238
|
+
* @returns True if deleted, false if not found
|
|
11239
|
+
*/
|
|
11240
|
+
delete(imageId: string): Promise<boolean>;
|
|
11241
|
+
/**
|
|
11242
|
+
* List hosted images with pagination
|
|
11243
|
+
* @param options List configuration
|
|
11244
|
+
* @returns List of images with pagination info
|
|
11245
|
+
* @throws {@link ImagesError} if list fails
|
|
11246
|
+
*/
|
|
11247
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11248
|
+
}
|
|
11169
11249
|
export interface ImagesBinding {
|
|
11170
11250
|
/**
|
|
11171
11251
|
* Get image metadata (type, width and height)
|
|
@@ -11185,6 +11265,10 @@ export interface ImagesBinding {
|
|
|
11185
11265
|
stream: ReadableStream<Uint8Array>,
|
|
11186
11266
|
options?: ImageInputOptions,
|
|
11187
11267
|
): ImageTransformer;
|
|
11268
|
+
/**
|
|
11269
|
+
* Access hosted images CRUD operations
|
|
11270
|
+
*/
|
|
11271
|
+
readonly hosted: HostedImagesBinding;
|
|
11188
11272
|
}
|
|
11189
11273
|
export interface ImageTransformer {
|
|
11190
11274
|
/**
|
package/2022-01-31/index.d.ts
CHANGED
|
@@ -11216,6 +11216,86 @@ type ImageOutputOptions = {
|
|
|
11216
11216
|
background?: string;
|
|
11217
11217
|
anim?: boolean;
|
|
11218
11218
|
};
|
|
11219
|
+
interface ImageMetadata {
|
|
11220
|
+
id: string;
|
|
11221
|
+
filename?: string;
|
|
11222
|
+
uploaded?: string;
|
|
11223
|
+
requireSignedURLs: boolean;
|
|
11224
|
+
meta?: Record<string, unknown>;
|
|
11225
|
+
variants: string[];
|
|
11226
|
+
draft?: boolean;
|
|
11227
|
+
creator?: string;
|
|
11228
|
+
}
|
|
11229
|
+
interface ImageUploadOptions {
|
|
11230
|
+
id?: string;
|
|
11231
|
+
filename?: string;
|
|
11232
|
+
requireSignedURLs?: boolean;
|
|
11233
|
+
metadata?: Record<string, unknown>;
|
|
11234
|
+
creator?: string;
|
|
11235
|
+
encoding?: "base64";
|
|
11236
|
+
}
|
|
11237
|
+
interface ImageUpdateOptions {
|
|
11238
|
+
requireSignedURLs?: boolean;
|
|
11239
|
+
metadata?: Record<string, unknown>;
|
|
11240
|
+
creator?: string;
|
|
11241
|
+
}
|
|
11242
|
+
interface ImageListOptions {
|
|
11243
|
+
limit?: number;
|
|
11244
|
+
cursor?: string;
|
|
11245
|
+
sortOrder?: "asc" | "desc";
|
|
11246
|
+
creator?: string;
|
|
11247
|
+
}
|
|
11248
|
+
interface ImageList {
|
|
11249
|
+
images: ImageMetadata[];
|
|
11250
|
+
cursor?: string;
|
|
11251
|
+
listComplete: boolean;
|
|
11252
|
+
}
|
|
11253
|
+
interface HostedImagesBinding {
|
|
11254
|
+
/**
|
|
11255
|
+
* Get detailed metadata for a hosted image
|
|
11256
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11257
|
+
* @returns Image metadata, or null if not found
|
|
11258
|
+
*/
|
|
11259
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11260
|
+
/**
|
|
11261
|
+
* Get the raw image data for a hosted image
|
|
11262
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11263
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11264
|
+
*/
|
|
11265
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11266
|
+
/**
|
|
11267
|
+
* Upload a new hosted image
|
|
11268
|
+
* @param image The image file to upload
|
|
11269
|
+
* @param options Upload configuration
|
|
11270
|
+
* @returns Metadata for the uploaded image
|
|
11271
|
+
* @throws {@link ImagesError} if upload fails
|
|
11272
|
+
*/
|
|
11273
|
+
upload(
|
|
11274
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11275
|
+
options?: ImageUploadOptions,
|
|
11276
|
+
): Promise<ImageMetadata>;
|
|
11277
|
+
/**
|
|
11278
|
+
* Update hosted image metadata
|
|
11279
|
+
* @param imageId The ID of the image
|
|
11280
|
+
* @param options Properties to update
|
|
11281
|
+
* @returns Updated image metadata
|
|
11282
|
+
* @throws {@link ImagesError} if update fails
|
|
11283
|
+
*/
|
|
11284
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11285
|
+
/**
|
|
11286
|
+
* Delete a hosted image
|
|
11287
|
+
* @param imageId The ID of the image
|
|
11288
|
+
* @returns True if deleted, false if not found
|
|
11289
|
+
*/
|
|
11290
|
+
delete(imageId: string): Promise<boolean>;
|
|
11291
|
+
/**
|
|
11292
|
+
* List hosted images with pagination
|
|
11293
|
+
* @param options List configuration
|
|
11294
|
+
* @returns List of images with pagination info
|
|
11295
|
+
* @throws {@link ImagesError} if list fails
|
|
11296
|
+
*/
|
|
11297
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11298
|
+
}
|
|
11219
11299
|
interface ImagesBinding {
|
|
11220
11300
|
/**
|
|
11221
11301
|
* Get image metadata (type, width and height)
|
|
@@ -11235,6 +11315,10 @@ interface ImagesBinding {
|
|
|
11235
11315
|
stream: ReadableStream<Uint8Array>,
|
|
11236
11316
|
options?: ImageInputOptions,
|
|
11237
11317
|
): ImageTransformer;
|
|
11318
|
+
/**
|
|
11319
|
+
* Access hosted images CRUD operations
|
|
11320
|
+
*/
|
|
11321
|
+
readonly hosted: HostedImagesBinding;
|
|
11238
11322
|
}
|
|
11239
11323
|
interface ImageTransformer {
|
|
11240
11324
|
/**
|
package/2022-01-31/index.ts
CHANGED
|
@@ -11233,6 +11233,86 @@ export type ImageOutputOptions = {
|
|
|
11233
11233
|
background?: string;
|
|
11234
11234
|
anim?: boolean;
|
|
11235
11235
|
};
|
|
11236
|
+
export interface ImageMetadata {
|
|
11237
|
+
id: string;
|
|
11238
|
+
filename?: string;
|
|
11239
|
+
uploaded?: string;
|
|
11240
|
+
requireSignedURLs: boolean;
|
|
11241
|
+
meta?: Record<string, unknown>;
|
|
11242
|
+
variants: string[];
|
|
11243
|
+
draft?: boolean;
|
|
11244
|
+
creator?: string;
|
|
11245
|
+
}
|
|
11246
|
+
export interface ImageUploadOptions {
|
|
11247
|
+
id?: string;
|
|
11248
|
+
filename?: string;
|
|
11249
|
+
requireSignedURLs?: boolean;
|
|
11250
|
+
metadata?: Record<string, unknown>;
|
|
11251
|
+
creator?: string;
|
|
11252
|
+
encoding?: "base64";
|
|
11253
|
+
}
|
|
11254
|
+
export interface ImageUpdateOptions {
|
|
11255
|
+
requireSignedURLs?: boolean;
|
|
11256
|
+
metadata?: Record<string, unknown>;
|
|
11257
|
+
creator?: string;
|
|
11258
|
+
}
|
|
11259
|
+
export interface ImageListOptions {
|
|
11260
|
+
limit?: number;
|
|
11261
|
+
cursor?: string;
|
|
11262
|
+
sortOrder?: "asc" | "desc";
|
|
11263
|
+
creator?: string;
|
|
11264
|
+
}
|
|
11265
|
+
export interface ImageList {
|
|
11266
|
+
images: ImageMetadata[];
|
|
11267
|
+
cursor?: string;
|
|
11268
|
+
listComplete: boolean;
|
|
11269
|
+
}
|
|
11270
|
+
export interface HostedImagesBinding {
|
|
11271
|
+
/**
|
|
11272
|
+
* Get detailed metadata for a hosted image
|
|
11273
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11274
|
+
* @returns Image metadata, or null if not found
|
|
11275
|
+
*/
|
|
11276
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11277
|
+
/**
|
|
11278
|
+
* Get the raw image data for a hosted image
|
|
11279
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11280
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11281
|
+
*/
|
|
11282
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11283
|
+
/**
|
|
11284
|
+
* Upload a new hosted image
|
|
11285
|
+
* @param image The image file to upload
|
|
11286
|
+
* @param options Upload configuration
|
|
11287
|
+
* @returns Metadata for the uploaded image
|
|
11288
|
+
* @throws {@link ImagesError} if upload fails
|
|
11289
|
+
*/
|
|
11290
|
+
upload(
|
|
11291
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11292
|
+
options?: ImageUploadOptions,
|
|
11293
|
+
): Promise<ImageMetadata>;
|
|
11294
|
+
/**
|
|
11295
|
+
* Update hosted image metadata
|
|
11296
|
+
* @param imageId The ID of the image
|
|
11297
|
+
* @param options Properties to update
|
|
11298
|
+
* @returns Updated image metadata
|
|
11299
|
+
* @throws {@link ImagesError} if update fails
|
|
11300
|
+
*/
|
|
11301
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11302
|
+
/**
|
|
11303
|
+
* Delete a hosted image
|
|
11304
|
+
* @param imageId The ID of the image
|
|
11305
|
+
* @returns True if deleted, false if not found
|
|
11306
|
+
*/
|
|
11307
|
+
delete(imageId: string): Promise<boolean>;
|
|
11308
|
+
/**
|
|
11309
|
+
* List hosted images with pagination
|
|
11310
|
+
* @param options List configuration
|
|
11311
|
+
* @returns List of images with pagination info
|
|
11312
|
+
* @throws {@link ImagesError} if list fails
|
|
11313
|
+
*/
|
|
11314
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11315
|
+
}
|
|
11236
11316
|
export interface ImagesBinding {
|
|
11237
11317
|
/**
|
|
11238
11318
|
* Get image metadata (type, width and height)
|
|
@@ -11252,6 +11332,10 @@ export interface ImagesBinding {
|
|
|
11252
11332
|
stream: ReadableStream<Uint8Array>,
|
|
11253
11333
|
options?: ImageInputOptions,
|
|
11254
11334
|
): ImageTransformer;
|
|
11335
|
+
/**
|
|
11336
|
+
* Access hosted images CRUD operations
|
|
11337
|
+
*/
|
|
11338
|
+
readonly hosted: HostedImagesBinding;
|
|
11255
11339
|
}
|
|
11256
11340
|
export interface ImageTransformer {
|
|
11257
11341
|
/**
|
package/2022-03-21/index.d.ts
CHANGED
|
@@ -11224,6 +11224,86 @@ type ImageOutputOptions = {
|
|
|
11224
11224
|
background?: string;
|
|
11225
11225
|
anim?: boolean;
|
|
11226
11226
|
};
|
|
11227
|
+
interface ImageMetadata {
|
|
11228
|
+
id: string;
|
|
11229
|
+
filename?: string;
|
|
11230
|
+
uploaded?: string;
|
|
11231
|
+
requireSignedURLs: boolean;
|
|
11232
|
+
meta?: Record<string, unknown>;
|
|
11233
|
+
variants: string[];
|
|
11234
|
+
draft?: boolean;
|
|
11235
|
+
creator?: string;
|
|
11236
|
+
}
|
|
11237
|
+
interface ImageUploadOptions {
|
|
11238
|
+
id?: string;
|
|
11239
|
+
filename?: string;
|
|
11240
|
+
requireSignedURLs?: boolean;
|
|
11241
|
+
metadata?: Record<string, unknown>;
|
|
11242
|
+
creator?: string;
|
|
11243
|
+
encoding?: "base64";
|
|
11244
|
+
}
|
|
11245
|
+
interface ImageUpdateOptions {
|
|
11246
|
+
requireSignedURLs?: boolean;
|
|
11247
|
+
metadata?: Record<string, unknown>;
|
|
11248
|
+
creator?: string;
|
|
11249
|
+
}
|
|
11250
|
+
interface ImageListOptions {
|
|
11251
|
+
limit?: number;
|
|
11252
|
+
cursor?: string;
|
|
11253
|
+
sortOrder?: "asc" | "desc";
|
|
11254
|
+
creator?: string;
|
|
11255
|
+
}
|
|
11256
|
+
interface ImageList {
|
|
11257
|
+
images: ImageMetadata[];
|
|
11258
|
+
cursor?: string;
|
|
11259
|
+
listComplete: boolean;
|
|
11260
|
+
}
|
|
11261
|
+
interface HostedImagesBinding {
|
|
11262
|
+
/**
|
|
11263
|
+
* Get detailed metadata for a hosted image
|
|
11264
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11265
|
+
* @returns Image metadata, or null if not found
|
|
11266
|
+
*/
|
|
11267
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11268
|
+
/**
|
|
11269
|
+
* Get the raw image data for a hosted image
|
|
11270
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11271
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11272
|
+
*/
|
|
11273
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11274
|
+
/**
|
|
11275
|
+
* Upload a new hosted image
|
|
11276
|
+
* @param image The image file to upload
|
|
11277
|
+
* @param options Upload configuration
|
|
11278
|
+
* @returns Metadata for the uploaded image
|
|
11279
|
+
* @throws {@link ImagesError} if upload fails
|
|
11280
|
+
*/
|
|
11281
|
+
upload(
|
|
11282
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11283
|
+
options?: ImageUploadOptions,
|
|
11284
|
+
): Promise<ImageMetadata>;
|
|
11285
|
+
/**
|
|
11286
|
+
* Update hosted image metadata
|
|
11287
|
+
* @param imageId The ID of the image
|
|
11288
|
+
* @param options Properties to update
|
|
11289
|
+
* @returns Updated image metadata
|
|
11290
|
+
* @throws {@link ImagesError} if update fails
|
|
11291
|
+
*/
|
|
11292
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11293
|
+
/**
|
|
11294
|
+
* Delete a hosted image
|
|
11295
|
+
* @param imageId The ID of the image
|
|
11296
|
+
* @returns True if deleted, false if not found
|
|
11297
|
+
*/
|
|
11298
|
+
delete(imageId: string): Promise<boolean>;
|
|
11299
|
+
/**
|
|
11300
|
+
* List hosted images with pagination
|
|
11301
|
+
* @param options List configuration
|
|
11302
|
+
* @returns List of images with pagination info
|
|
11303
|
+
* @throws {@link ImagesError} if list fails
|
|
11304
|
+
*/
|
|
11305
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11306
|
+
}
|
|
11227
11307
|
interface ImagesBinding {
|
|
11228
11308
|
/**
|
|
11229
11309
|
* Get image metadata (type, width and height)
|
|
@@ -11243,6 +11323,10 @@ interface ImagesBinding {
|
|
|
11243
11323
|
stream: ReadableStream<Uint8Array>,
|
|
11244
11324
|
options?: ImageInputOptions,
|
|
11245
11325
|
): ImageTransformer;
|
|
11326
|
+
/**
|
|
11327
|
+
* Access hosted images CRUD operations
|
|
11328
|
+
*/
|
|
11329
|
+
readonly hosted: HostedImagesBinding;
|
|
11246
11330
|
}
|
|
11247
11331
|
interface ImageTransformer {
|
|
11248
11332
|
/**
|
package/2022-03-21/index.ts
CHANGED
|
@@ -11241,6 +11241,86 @@ export type ImageOutputOptions = {
|
|
|
11241
11241
|
background?: string;
|
|
11242
11242
|
anim?: boolean;
|
|
11243
11243
|
};
|
|
11244
|
+
export interface ImageMetadata {
|
|
11245
|
+
id: string;
|
|
11246
|
+
filename?: string;
|
|
11247
|
+
uploaded?: string;
|
|
11248
|
+
requireSignedURLs: boolean;
|
|
11249
|
+
meta?: Record<string, unknown>;
|
|
11250
|
+
variants: string[];
|
|
11251
|
+
draft?: boolean;
|
|
11252
|
+
creator?: string;
|
|
11253
|
+
}
|
|
11254
|
+
export interface ImageUploadOptions {
|
|
11255
|
+
id?: string;
|
|
11256
|
+
filename?: string;
|
|
11257
|
+
requireSignedURLs?: boolean;
|
|
11258
|
+
metadata?: Record<string, unknown>;
|
|
11259
|
+
creator?: string;
|
|
11260
|
+
encoding?: "base64";
|
|
11261
|
+
}
|
|
11262
|
+
export interface ImageUpdateOptions {
|
|
11263
|
+
requireSignedURLs?: boolean;
|
|
11264
|
+
metadata?: Record<string, unknown>;
|
|
11265
|
+
creator?: string;
|
|
11266
|
+
}
|
|
11267
|
+
export interface ImageListOptions {
|
|
11268
|
+
limit?: number;
|
|
11269
|
+
cursor?: string;
|
|
11270
|
+
sortOrder?: "asc" | "desc";
|
|
11271
|
+
creator?: string;
|
|
11272
|
+
}
|
|
11273
|
+
export interface ImageList {
|
|
11274
|
+
images: ImageMetadata[];
|
|
11275
|
+
cursor?: string;
|
|
11276
|
+
listComplete: boolean;
|
|
11277
|
+
}
|
|
11278
|
+
export interface HostedImagesBinding {
|
|
11279
|
+
/**
|
|
11280
|
+
* Get detailed metadata for a hosted image
|
|
11281
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11282
|
+
* @returns Image metadata, or null if not found
|
|
11283
|
+
*/
|
|
11284
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11285
|
+
/**
|
|
11286
|
+
* Get the raw image data for a hosted image
|
|
11287
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11288
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11289
|
+
*/
|
|
11290
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11291
|
+
/**
|
|
11292
|
+
* Upload a new hosted image
|
|
11293
|
+
* @param image The image file to upload
|
|
11294
|
+
* @param options Upload configuration
|
|
11295
|
+
* @returns Metadata for the uploaded image
|
|
11296
|
+
* @throws {@link ImagesError} if upload fails
|
|
11297
|
+
*/
|
|
11298
|
+
upload(
|
|
11299
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11300
|
+
options?: ImageUploadOptions,
|
|
11301
|
+
): Promise<ImageMetadata>;
|
|
11302
|
+
/**
|
|
11303
|
+
* Update hosted image metadata
|
|
11304
|
+
* @param imageId The ID of the image
|
|
11305
|
+
* @param options Properties to update
|
|
11306
|
+
* @returns Updated image metadata
|
|
11307
|
+
* @throws {@link ImagesError} if update fails
|
|
11308
|
+
*/
|
|
11309
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11310
|
+
/**
|
|
11311
|
+
* Delete a hosted image
|
|
11312
|
+
* @param imageId The ID of the image
|
|
11313
|
+
* @returns True if deleted, false if not found
|
|
11314
|
+
*/
|
|
11315
|
+
delete(imageId: string): Promise<boolean>;
|
|
11316
|
+
/**
|
|
11317
|
+
* List hosted images with pagination
|
|
11318
|
+
* @param options List configuration
|
|
11319
|
+
* @returns List of images with pagination info
|
|
11320
|
+
* @throws {@link ImagesError} if list fails
|
|
11321
|
+
*/
|
|
11322
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11323
|
+
}
|
|
11244
11324
|
export interface ImagesBinding {
|
|
11245
11325
|
/**
|
|
11246
11326
|
* Get image metadata (type, width and height)
|
|
@@ -11260,6 +11340,10 @@ export interface ImagesBinding {
|
|
|
11260
11340
|
stream: ReadableStream<Uint8Array>,
|
|
11261
11341
|
options?: ImageInputOptions,
|
|
11262
11342
|
): ImageTransformer;
|
|
11343
|
+
/**
|
|
11344
|
+
* Access hosted images CRUD operations
|
|
11345
|
+
*/
|
|
11346
|
+
readonly hosted: HostedImagesBinding;
|
|
11263
11347
|
}
|
|
11264
11348
|
export interface ImageTransformer {
|
|
11265
11349
|
/**
|
package/2022-08-04/index.d.ts
CHANGED
|
@@ -11225,6 +11225,86 @@ type ImageOutputOptions = {
|
|
|
11225
11225
|
background?: string;
|
|
11226
11226
|
anim?: boolean;
|
|
11227
11227
|
};
|
|
11228
|
+
interface ImageMetadata {
|
|
11229
|
+
id: string;
|
|
11230
|
+
filename?: string;
|
|
11231
|
+
uploaded?: string;
|
|
11232
|
+
requireSignedURLs: boolean;
|
|
11233
|
+
meta?: Record<string, unknown>;
|
|
11234
|
+
variants: string[];
|
|
11235
|
+
draft?: boolean;
|
|
11236
|
+
creator?: string;
|
|
11237
|
+
}
|
|
11238
|
+
interface ImageUploadOptions {
|
|
11239
|
+
id?: string;
|
|
11240
|
+
filename?: string;
|
|
11241
|
+
requireSignedURLs?: boolean;
|
|
11242
|
+
metadata?: Record<string, unknown>;
|
|
11243
|
+
creator?: string;
|
|
11244
|
+
encoding?: "base64";
|
|
11245
|
+
}
|
|
11246
|
+
interface ImageUpdateOptions {
|
|
11247
|
+
requireSignedURLs?: boolean;
|
|
11248
|
+
metadata?: Record<string, unknown>;
|
|
11249
|
+
creator?: string;
|
|
11250
|
+
}
|
|
11251
|
+
interface ImageListOptions {
|
|
11252
|
+
limit?: number;
|
|
11253
|
+
cursor?: string;
|
|
11254
|
+
sortOrder?: "asc" | "desc";
|
|
11255
|
+
creator?: string;
|
|
11256
|
+
}
|
|
11257
|
+
interface ImageList {
|
|
11258
|
+
images: ImageMetadata[];
|
|
11259
|
+
cursor?: string;
|
|
11260
|
+
listComplete: boolean;
|
|
11261
|
+
}
|
|
11262
|
+
interface HostedImagesBinding {
|
|
11263
|
+
/**
|
|
11264
|
+
* Get detailed metadata for a hosted image
|
|
11265
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11266
|
+
* @returns Image metadata, or null if not found
|
|
11267
|
+
*/
|
|
11268
|
+
details(imageId: string): Promise<ImageMetadata | null>;
|
|
11269
|
+
/**
|
|
11270
|
+
* Get the raw image data for a hosted image
|
|
11271
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
11272
|
+
* @returns ReadableStream of image bytes, or null if not found
|
|
11273
|
+
*/
|
|
11274
|
+
image(imageId: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11275
|
+
/**
|
|
11276
|
+
* Upload a new hosted image
|
|
11277
|
+
* @param image The image file to upload
|
|
11278
|
+
* @param options Upload configuration
|
|
11279
|
+
* @returns Metadata for the uploaded image
|
|
11280
|
+
* @throws {@link ImagesError} if upload fails
|
|
11281
|
+
*/
|
|
11282
|
+
upload(
|
|
11283
|
+
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
11284
|
+
options?: ImageUploadOptions,
|
|
11285
|
+
): Promise<ImageMetadata>;
|
|
11286
|
+
/**
|
|
11287
|
+
* Update hosted image metadata
|
|
11288
|
+
* @param imageId The ID of the image
|
|
11289
|
+
* @param options Properties to update
|
|
11290
|
+
* @returns Updated image metadata
|
|
11291
|
+
* @throws {@link ImagesError} if update fails
|
|
11292
|
+
*/
|
|
11293
|
+
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
11294
|
+
/**
|
|
11295
|
+
* Delete a hosted image
|
|
11296
|
+
* @param imageId The ID of the image
|
|
11297
|
+
* @returns True if deleted, false if not found
|
|
11298
|
+
*/
|
|
11299
|
+
delete(imageId: string): Promise<boolean>;
|
|
11300
|
+
/**
|
|
11301
|
+
* List hosted images with pagination
|
|
11302
|
+
* @param options List configuration
|
|
11303
|
+
* @returns List of images with pagination info
|
|
11304
|
+
* @throws {@link ImagesError} if list fails
|
|
11305
|
+
*/
|
|
11306
|
+
list(options?: ImageListOptions): Promise<ImageList>;
|
|
11307
|
+
}
|
|
11228
11308
|
interface ImagesBinding {
|
|
11229
11309
|
/**
|
|
11230
11310
|
* Get image metadata (type, width and height)
|
|
@@ -11244,6 +11324,10 @@ interface ImagesBinding {
|
|
|
11244
11324
|
stream: ReadableStream<Uint8Array>,
|
|
11245
11325
|
options?: ImageInputOptions,
|
|
11246
11326
|
): ImageTransformer;
|
|
11327
|
+
/**
|
|
11328
|
+
* Access hosted images CRUD operations
|
|
11329
|
+
*/
|
|
11330
|
+
readonly hosted: HostedImagesBinding;
|
|
11247
11331
|
}
|
|
11248
11332
|
interface ImageTransformer {
|
|
11249
11333
|
/**
|