@cloudflare/workers-types 4.20260331.1 → 4.20260402.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 +59 -27
- package/2021-11-03/index.ts +59 -27
- package/2022-01-31/index.d.ts +59 -27
- package/2022-01-31/index.ts +59 -27
- package/2022-03-21/index.d.ts +59 -27
- package/2022-03-21/index.ts +59 -27
- package/2022-08-04/index.d.ts +59 -27
- package/2022-08-04/index.ts +59 -27
- package/2022-10-31/index.d.ts +59 -27
- package/2022-10-31/index.ts +59 -27
- package/2022-11-30/index.d.ts +59 -27
- package/2022-11-30/index.ts +59 -27
- package/2023-03-01/index.d.ts +59 -27
- package/2023-03-01/index.ts +59 -27
- package/2023-07-01/index.d.ts +59 -27
- package/2023-07-01/index.ts +59 -27
- package/experimental/index.d.ts +56 -32
- package/experimental/index.ts +56 -32
- package/index.d.ts +59 -27
- package/index.ts +59 -27
- package/latest/index.d.ts +59 -27
- package/latest/index.ts +59 -27
- package/oldest/index.d.ts +59 -27
- package/oldest/index.ts +59 -27
- package/package.json +1 -1
package/2021-11-03/index.d.ts
CHANGED
|
@@ -3662,12 +3662,43 @@ interface Container {
|
|
|
3662
3662
|
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
3663
3663
|
interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
|
|
3664
3664
|
interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
|
|
3665
|
+
snapshotDirectory(
|
|
3666
|
+
options: ContainerDirectorySnapshotOptions,
|
|
3667
|
+
): Promise<ContainerDirectorySnapshot>;
|
|
3668
|
+
snapshotContainer(
|
|
3669
|
+
options: ContainerSnapshotOptions,
|
|
3670
|
+
): Promise<ContainerSnapshot>;
|
|
3671
|
+
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3672
|
+
}
|
|
3673
|
+
interface ContainerDirectorySnapshot {
|
|
3674
|
+
id: string;
|
|
3675
|
+
size: number;
|
|
3676
|
+
dir: string;
|
|
3677
|
+
name?: string;
|
|
3678
|
+
}
|
|
3679
|
+
interface ContainerDirectorySnapshotOptions {
|
|
3680
|
+
dir: string;
|
|
3681
|
+
name?: string;
|
|
3682
|
+
}
|
|
3683
|
+
interface ContainerDirectorySnapshotRestoreParams {
|
|
3684
|
+
snapshot: ContainerDirectorySnapshot;
|
|
3685
|
+
mountPoint?: string;
|
|
3686
|
+
}
|
|
3687
|
+
interface ContainerSnapshot {
|
|
3688
|
+
id: string;
|
|
3689
|
+
size: number;
|
|
3690
|
+
name?: string;
|
|
3691
|
+
}
|
|
3692
|
+
interface ContainerSnapshotOptions {
|
|
3693
|
+
name?: string;
|
|
3665
3694
|
}
|
|
3666
3695
|
interface ContainerStartupOptions {
|
|
3667
3696
|
entrypoint?: string[];
|
|
3668
3697
|
enableInternet: boolean;
|
|
3669
3698
|
env?: Record<string, string>;
|
|
3670
3699
|
labels?: Record<string, string>;
|
|
3700
|
+
directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
|
|
3701
|
+
containerSnapshot?: ContainerSnapshot;
|
|
3671
3702
|
}
|
|
3672
3703
|
/**
|
|
3673
3704
|
* The **`MessagePort`** interface of the Channel Messaging API represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other.
|
|
@@ -12059,19 +12090,37 @@ interface ImageList {
|
|
|
12059
12090
|
cursor?: string;
|
|
12060
12091
|
listComplete: boolean;
|
|
12061
12092
|
}
|
|
12062
|
-
interface
|
|
12093
|
+
interface ImageHandle {
|
|
12063
12094
|
/**
|
|
12064
|
-
* Get
|
|
12065
|
-
* @param imageId The ID of the image (UUID or custom ID)
|
|
12095
|
+
* Get metadata for a hosted image
|
|
12066
12096
|
* @returns Image metadata, or null if not found
|
|
12067
12097
|
*/
|
|
12068
|
-
details(
|
|
12098
|
+
details(): Promise<ImageMetadata | null>;
|
|
12069
12099
|
/**
|
|
12070
12100
|
* Get the raw image data for a hosted image
|
|
12071
|
-
* @param imageId The ID of the image (UUID or custom ID)
|
|
12072
12101
|
* @returns ReadableStream of image bytes, or null if not found
|
|
12073
12102
|
*/
|
|
12074
|
-
|
|
12103
|
+
bytes(): Promise<ReadableStream<Uint8Array> | null>;
|
|
12104
|
+
/**
|
|
12105
|
+
* Update hosted image metadata
|
|
12106
|
+
* @param options Properties to update
|
|
12107
|
+
* @returns Updated image metadata
|
|
12108
|
+
* @throws {@link ImagesError} if update fails
|
|
12109
|
+
*/
|
|
12110
|
+
update(options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12111
|
+
/**
|
|
12112
|
+
* Delete a hosted image
|
|
12113
|
+
* @returns True if deleted, false if not found
|
|
12114
|
+
*/
|
|
12115
|
+
delete(): Promise<boolean>;
|
|
12116
|
+
}
|
|
12117
|
+
interface HostedImagesBinding {
|
|
12118
|
+
/**
|
|
12119
|
+
* Get a handle for a hosted image
|
|
12120
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
12121
|
+
* @returns A handle for per-image operations
|
|
12122
|
+
*/
|
|
12123
|
+
image(imageId: string): ImageHandle;
|
|
12075
12124
|
/**
|
|
12076
12125
|
* Upload a new hosted image
|
|
12077
12126
|
* @param image The image file to upload
|
|
@@ -12083,20 +12132,6 @@ interface HostedImagesBinding {
|
|
|
12083
12132
|
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
12084
12133
|
options?: ImageUploadOptions,
|
|
12085
12134
|
): Promise<ImageMetadata>;
|
|
12086
|
-
/**
|
|
12087
|
-
* Update hosted image metadata
|
|
12088
|
-
* @param imageId The ID of the image
|
|
12089
|
-
* @param options Properties to update
|
|
12090
|
-
* @returns Updated image metadata
|
|
12091
|
-
* @throws {@link ImagesError} if update fails
|
|
12092
|
-
*/
|
|
12093
|
-
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12094
|
-
/**
|
|
12095
|
-
* Delete a hosted image
|
|
12096
|
-
* @param imageId The ID of the image
|
|
12097
|
-
* @returns True if deleted, false if not found
|
|
12098
|
-
*/
|
|
12099
|
-
delete(imageId: string): Promise<boolean>;
|
|
12100
12135
|
/**
|
|
12101
12136
|
* List hosted images with pagination
|
|
12102
12137
|
* @param options List configuration
|
|
@@ -13172,14 +13207,13 @@ interface StreamScopedCaptions {
|
|
|
13172
13207
|
* Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
|
|
13173
13208
|
* One caption or subtitle file per language is allowed.
|
|
13174
13209
|
* @param language The BCP 47 language tag for the caption or subtitle.
|
|
13175
|
-
* @param
|
|
13210
|
+
* @param input The caption or subtitle stream to upload.
|
|
13176
13211
|
* @returns The created caption entry.
|
|
13177
13212
|
* @throws {NotFoundError} if the video is not found
|
|
13178
13213
|
* @throws {BadRequestError} if the language or file is invalid
|
|
13179
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13180
13214
|
* @throws {InternalError} if an unexpected error occurs
|
|
13181
13215
|
*/
|
|
13182
|
-
upload(language: string,
|
|
13216
|
+
upload(language: string, input: ReadableStream): Promise<StreamCaption>;
|
|
13183
13217
|
/**
|
|
13184
13218
|
* Generate captions or subtitles for the provided language via AI.
|
|
13185
13219
|
* @param language The BCP 47 language tag to generate.
|
|
@@ -13255,17 +13289,16 @@ interface StreamVideos {
|
|
|
13255
13289
|
interface StreamWatermarks {
|
|
13256
13290
|
/**
|
|
13257
13291
|
* Generate a new watermark profile
|
|
13258
|
-
* @param
|
|
13292
|
+
* @param input The image stream to upload
|
|
13259
13293
|
* @param params The watermark creation parameters.
|
|
13260
13294
|
* @returns The created watermark profile.
|
|
13261
13295
|
* @throws {BadRequestError} if the parameters are invalid
|
|
13262
13296
|
* @throws {InvalidURLError} if the URL is invalid
|
|
13263
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13264
13297
|
* @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
|
|
13265
13298
|
* @throws {InternalError} if an unexpected error occurs
|
|
13266
13299
|
*/
|
|
13267
13300
|
generate(
|
|
13268
|
-
|
|
13301
|
+
input: ReadableStream,
|
|
13269
13302
|
params: StreamWatermarkCreateParams,
|
|
13270
13303
|
): Promise<StreamWatermark>;
|
|
13271
13304
|
/**
|
|
@@ -13275,7 +13308,6 @@ interface StreamWatermarks {
|
|
|
13275
13308
|
* @returns The created watermark profile.
|
|
13276
13309
|
* @throws {BadRequestError} if the parameters are invalid
|
|
13277
13310
|
* @throws {InvalidURLError} if the URL is invalid
|
|
13278
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13279
13311
|
* @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
|
|
13280
13312
|
* @throws {InternalError} if an unexpected error occurs
|
|
13281
13313
|
*/
|
package/2021-11-03/index.ts
CHANGED
|
@@ -3668,12 +3668,43 @@ export interface Container {
|
|
|
3668
3668
|
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
3669
3669
|
interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
|
|
3670
3670
|
interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
|
|
3671
|
+
snapshotDirectory(
|
|
3672
|
+
options: ContainerDirectorySnapshotOptions,
|
|
3673
|
+
): Promise<ContainerDirectorySnapshot>;
|
|
3674
|
+
snapshotContainer(
|
|
3675
|
+
options: ContainerSnapshotOptions,
|
|
3676
|
+
): Promise<ContainerSnapshot>;
|
|
3677
|
+
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3678
|
+
}
|
|
3679
|
+
export interface ContainerDirectorySnapshot {
|
|
3680
|
+
id: string;
|
|
3681
|
+
size: number;
|
|
3682
|
+
dir: string;
|
|
3683
|
+
name?: string;
|
|
3684
|
+
}
|
|
3685
|
+
export interface ContainerDirectorySnapshotOptions {
|
|
3686
|
+
dir: string;
|
|
3687
|
+
name?: string;
|
|
3688
|
+
}
|
|
3689
|
+
export interface ContainerDirectorySnapshotRestoreParams {
|
|
3690
|
+
snapshot: ContainerDirectorySnapshot;
|
|
3691
|
+
mountPoint?: string;
|
|
3692
|
+
}
|
|
3693
|
+
export interface ContainerSnapshot {
|
|
3694
|
+
id: string;
|
|
3695
|
+
size: number;
|
|
3696
|
+
name?: string;
|
|
3697
|
+
}
|
|
3698
|
+
export interface ContainerSnapshotOptions {
|
|
3699
|
+
name?: string;
|
|
3671
3700
|
}
|
|
3672
3701
|
export interface ContainerStartupOptions {
|
|
3673
3702
|
entrypoint?: string[];
|
|
3674
3703
|
enableInternet: boolean;
|
|
3675
3704
|
env?: Record<string, string>;
|
|
3676
3705
|
labels?: Record<string, string>;
|
|
3706
|
+
directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
|
|
3707
|
+
containerSnapshot?: ContainerSnapshot;
|
|
3677
3708
|
}
|
|
3678
3709
|
/**
|
|
3679
3710
|
* The **`MessagePort`** interface of the Channel Messaging API represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other.
|
|
@@ -12075,19 +12106,37 @@ export interface ImageList {
|
|
|
12075
12106
|
cursor?: string;
|
|
12076
12107
|
listComplete: boolean;
|
|
12077
12108
|
}
|
|
12078
|
-
export interface
|
|
12109
|
+
export interface ImageHandle {
|
|
12079
12110
|
/**
|
|
12080
|
-
* Get
|
|
12081
|
-
* @param imageId The ID of the image (UUID or custom ID)
|
|
12111
|
+
* Get metadata for a hosted image
|
|
12082
12112
|
* @returns Image metadata, or null if not found
|
|
12083
12113
|
*/
|
|
12084
|
-
details(
|
|
12114
|
+
details(): Promise<ImageMetadata | null>;
|
|
12085
12115
|
/**
|
|
12086
12116
|
* Get the raw image data for a hosted image
|
|
12087
|
-
* @param imageId The ID of the image (UUID or custom ID)
|
|
12088
12117
|
* @returns ReadableStream of image bytes, or null if not found
|
|
12089
12118
|
*/
|
|
12090
|
-
|
|
12119
|
+
bytes(): Promise<ReadableStream<Uint8Array> | null>;
|
|
12120
|
+
/**
|
|
12121
|
+
* Update hosted image metadata
|
|
12122
|
+
* @param options Properties to update
|
|
12123
|
+
* @returns Updated image metadata
|
|
12124
|
+
* @throws {@link ImagesError} if update fails
|
|
12125
|
+
*/
|
|
12126
|
+
update(options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12127
|
+
/**
|
|
12128
|
+
* Delete a hosted image
|
|
12129
|
+
* @returns True if deleted, false if not found
|
|
12130
|
+
*/
|
|
12131
|
+
delete(): Promise<boolean>;
|
|
12132
|
+
}
|
|
12133
|
+
export interface HostedImagesBinding {
|
|
12134
|
+
/**
|
|
12135
|
+
* Get a handle for a hosted image
|
|
12136
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
12137
|
+
* @returns A handle for per-image operations
|
|
12138
|
+
*/
|
|
12139
|
+
image(imageId: string): ImageHandle;
|
|
12091
12140
|
/**
|
|
12092
12141
|
* Upload a new hosted image
|
|
12093
12142
|
* @param image The image file to upload
|
|
@@ -12099,20 +12148,6 @@ export interface HostedImagesBinding {
|
|
|
12099
12148
|
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
12100
12149
|
options?: ImageUploadOptions,
|
|
12101
12150
|
): Promise<ImageMetadata>;
|
|
12102
|
-
/**
|
|
12103
|
-
* Update hosted image metadata
|
|
12104
|
-
* @param imageId The ID of the image
|
|
12105
|
-
* @param options Properties to update
|
|
12106
|
-
* @returns Updated image metadata
|
|
12107
|
-
* @throws {@link ImagesError} if update fails
|
|
12108
|
-
*/
|
|
12109
|
-
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12110
|
-
/**
|
|
12111
|
-
* Delete a hosted image
|
|
12112
|
-
* @param imageId The ID of the image
|
|
12113
|
-
* @returns True if deleted, false if not found
|
|
12114
|
-
*/
|
|
12115
|
-
delete(imageId: string): Promise<boolean>;
|
|
12116
12151
|
/**
|
|
12117
12152
|
* List hosted images with pagination
|
|
12118
12153
|
* @param options List configuration
|
|
@@ -13129,14 +13164,13 @@ export interface StreamScopedCaptions {
|
|
|
13129
13164
|
* Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
|
|
13130
13165
|
* One caption or subtitle file per language is allowed.
|
|
13131
13166
|
* @param language The BCP 47 language tag for the caption or subtitle.
|
|
13132
|
-
* @param
|
|
13167
|
+
* @param input The caption or subtitle stream to upload.
|
|
13133
13168
|
* @returns The created caption entry.
|
|
13134
13169
|
* @throws {NotFoundError} if the video is not found
|
|
13135
13170
|
* @throws {BadRequestError} if the language or file is invalid
|
|
13136
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13137
13171
|
* @throws {InternalError} if an unexpected error occurs
|
|
13138
13172
|
*/
|
|
13139
|
-
upload(language: string,
|
|
13173
|
+
upload(language: string, input: ReadableStream): Promise<StreamCaption>;
|
|
13140
13174
|
/**
|
|
13141
13175
|
* Generate captions or subtitles for the provided language via AI.
|
|
13142
13176
|
* @param language The BCP 47 language tag to generate.
|
|
@@ -13212,17 +13246,16 @@ export interface StreamVideos {
|
|
|
13212
13246
|
export interface StreamWatermarks {
|
|
13213
13247
|
/**
|
|
13214
13248
|
* Generate a new watermark profile
|
|
13215
|
-
* @param
|
|
13249
|
+
* @param input The image stream to upload
|
|
13216
13250
|
* @param params The watermark creation parameters.
|
|
13217
13251
|
* @returns The created watermark profile.
|
|
13218
13252
|
* @throws {BadRequestError} if the parameters are invalid
|
|
13219
13253
|
* @throws {InvalidURLError} if the URL is invalid
|
|
13220
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13221
13254
|
* @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
|
|
13222
13255
|
* @throws {InternalError} if an unexpected error occurs
|
|
13223
13256
|
*/
|
|
13224
13257
|
generate(
|
|
13225
|
-
|
|
13258
|
+
input: ReadableStream,
|
|
13226
13259
|
params: StreamWatermarkCreateParams,
|
|
13227
13260
|
): Promise<StreamWatermark>;
|
|
13228
13261
|
/**
|
|
@@ -13232,7 +13265,6 @@ export interface StreamWatermarks {
|
|
|
13232
13265
|
* @returns The created watermark profile.
|
|
13233
13266
|
* @throws {BadRequestError} if the parameters are invalid
|
|
13234
13267
|
* @throws {InvalidURLError} if the URL is invalid
|
|
13235
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13236
13268
|
* @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
|
|
13237
13269
|
* @throws {InternalError} if an unexpected error occurs
|
|
13238
13270
|
*/
|
package/2022-01-31/index.d.ts
CHANGED
|
@@ -3729,12 +3729,43 @@ interface Container {
|
|
|
3729
3729
|
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
3730
3730
|
interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
|
|
3731
3731
|
interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
|
|
3732
|
+
snapshotDirectory(
|
|
3733
|
+
options: ContainerDirectorySnapshotOptions,
|
|
3734
|
+
): Promise<ContainerDirectorySnapshot>;
|
|
3735
|
+
snapshotContainer(
|
|
3736
|
+
options: ContainerSnapshotOptions,
|
|
3737
|
+
): Promise<ContainerSnapshot>;
|
|
3738
|
+
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3739
|
+
}
|
|
3740
|
+
interface ContainerDirectorySnapshot {
|
|
3741
|
+
id: string;
|
|
3742
|
+
size: number;
|
|
3743
|
+
dir: string;
|
|
3744
|
+
name?: string;
|
|
3745
|
+
}
|
|
3746
|
+
interface ContainerDirectorySnapshotOptions {
|
|
3747
|
+
dir: string;
|
|
3748
|
+
name?: string;
|
|
3749
|
+
}
|
|
3750
|
+
interface ContainerDirectorySnapshotRestoreParams {
|
|
3751
|
+
snapshot: ContainerDirectorySnapshot;
|
|
3752
|
+
mountPoint?: string;
|
|
3753
|
+
}
|
|
3754
|
+
interface ContainerSnapshot {
|
|
3755
|
+
id: string;
|
|
3756
|
+
size: number;
|
|
3757
|
+
name?: string;
|
|
3758
|
+
}
|
|
3759
|
+
interface ContainerSnapshotOptions {
|
|
3760
|
+
name?: string;
|
|
3732
3761
|
}
|
|
3733
3762
|
interface ContainerStartupOptions {
|
|
3734
3763
|
entrypoint?: string[];
|
|
3735
3764
|
enableInternet: boolean;
|
|
3736
3765
|
env?: Record<string, string>;
|
|
3737
3766
|
labels?: Record<string, string>;
|
|
3767
|
+
directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
|
|
3768
|
+
containerSnapshot?: ContainerSnapshot;
|
|
3738
3769
|
}
|
|
3739
3770
|
/**
|
|
3740
3771
|
* The **`MessagePort`** interface of the Channel Messaging API represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other.
|
|
@@ -12126,19 +12157,37 @@ interface ImageList {
|
|
|
12126
12157
|
cursor?: string;
|
|
12127
12158
|
listComplete: boolean;
|
|
12128
12159
|
}
|
|
12129
|
-
interface
|
|
12160
|
+
interface ImageHandle {
|
|
12130
12161
|
/**
|
|
12131
|
-
* Get
|
|
12132
|
-
* @param imageId The ID of the image (UUID or custom ID)
|
|
12162
|
+
* Get metadata for a hosted image
|
|
12133
12163
|
* @returns Image metadata, or null if not found
|
|
12134
12164
|
*/
|
|
12135
|
-
details(
|
|
12165
|
+
details(): Promise<ImageMetadata | null>;
|
|
12136
12166
|
/**
|
|
12137
12167
|
* Get the raw image data for a hosted image
|
|
12138
|
-
* @param imageId The ID of the image (UUID or custom ID)
|
|
12139
12168
|
* @returns ReadableStream of image bytes, or null if not found
|
|
12140
12169
|
*/
|
|
12141
|
-
|
|
12170
|
+
bytes(): Promise<ReadableStream<Uint8Array> | null>;
|
|
12171
|
+
/**
|
|
12172
|
+
* Update hosted image metadata
|
|
12173
|
+
* @param options Properties to update
|
|
12174
|
+
* @returns Updated image metadata
|
|
12175
|
+
* @throws {@link ImagesError} if update fails
|
|
12176
|
+
*/
|
|
12177
|
+
update(options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12178
|
+
/**
|
|
12179
|
+
* Delete a hosted image
|
|
12180
|
+
* @returns True if deleted, false if not found
|
|
12181
|
+
*/
|
|
12182
|
+
delete(): Promise<boolean>;
|
|
12183
|
+
}
|
|
12184
|
+
interface HostedImagesBinding {
|
|
12185
|
+
/**
|
|
12186
|
+
* Get a handle for a hosted image
|
|
12187
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
12188
|
+
* @returns A handle for per-image operations
|
|
12189
|
+
*/
|
|
12190
|
+
image(imageId: string): ImageHandle;
|
|
12142
12191
|
/**
|
|
12143
12192
|
* Upload a new hosted image
|
|
12144
12193
|
* @param image The image file to upload
|
|
@@ -12150,20 +12199,6 @@ interface HostedImagesBinding {
|
|
|
12150
12199
|
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
12151
12200
|
options?: ImageUploadOptions,
|
|
12152
12201
|
): Promise<ImageMetadata>;
|
|
12153
|
-
/**
|
|
12154
|
-
* Update hosted image metadata
|
|
12155
|
-
* @param imageId The ID of the image
|
|
12156
|
-
* @param options Properties to update
|
|
12157
|
-
* @returns Updated image metadata
|
|
12158
|
-
* @throws {@link ImagesError} if update fails
|
|
12159
|
-
*/
|
|
12160
|
-
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12161
|
-
/**
|
|
12162
|
-
* Delete a hosted image
|
|
12163
|
-
* @param imageId The ID of the image
|
|
12164
|
-
* @returns True if deleted, false if not found
|
|
12165
|
-
*/
|
|
12166
|
-
delete(imageId: string): Promise<boolean>;
|
|
12167
12202
|
/**
|
|
12168
12203
|
* List hosted images with pagination
|
|
12169
12204
|
* @param options List configuration
|
|
@@ -13239,14 +13274,13 @@ interface StreamScopedCaptions {
|
|
|
13239
13274
|
* Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
|
|
13240
13275
|
* One caption or subtitle file per language is allowed.
|
|
13241
13276
|
* @param language The BCP 47 language tag for the caption or subtitle.
|
|
13242
|
-
* @param
|
|
13277
|
+
* @param input The caption or subtitle stream to upload.
|
|
13243
13278
|
* @returns The created caption entry.
|
|
13244
13279
|
* @throws {NotFoundError} if the video is not found
|
|
13245
13280
|
* @throws {BadRequestError} if the language or file is invalid
|
|
13246
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13247
13281
|
* @throws {InternalError} if an unexpected error occurs
|
|
13248
13282
|
*/
|
|
13249
|
-
upload(language: string,
|
|
13283
|
+
upload(language: string, input: ReadableStream): Promise<StreamCaption>;
|
|
13250
13284
|
/**
|
|
13251
13285
|
* Generate captions or subtitles for the provided language via AI.
|
|
13252
13286
|
* @param language The BCP 47 language tag to generate.
|
|
@@ -13322,17 +13356,16 @@ interface StreamVideos {
|
|
|
13322
13356
|
interface StreamWatermarks {
|
|
13323
13357
|
/**
|
|
13324
13358
|
* Generate a new watermark profile
|
|
13325
|
-
* @param
|
|
13359
|
+
* @param input The image stream to upload
|
|
13326
13360
|
* @param params The watermark creation parameters.
|
|
13327
13361
|
* @returns The created watermark profile.
|
|
13328
13362
|
* @throws {BadRequestError} if the parameters are invalid
|
|
13329
13363
|
* @throws {InvalidURLError} if the URL is invalid
|
|
13330
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13331
13364
|
* @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
|
|
13332
13365
|
* @throws {InternalError} if an unexpected error occurs
|
|
13333
13366
|
*/
|
|
13334
13367
|
generate(
|
|
13335
|
-
|
|
13368
|
+
input: ReadableStream,
|
|
13336
13369
|
params: StreamWatermarkCreateParams,
|
|
13337
13370
|
): Promise<StreamWatermark>;
|
|
13338
13371
|
/**
|
|
@@ -13342,7 +13375,6 @@ interface StreamWatermarks {
|
|
|
13342
13375
|
* @returns The created watermark profile.
|
|
13343
13376
|
* @throws {BadRequestError} if the parameters are invalid
|
|
13344
13377
|
* @throws {InvalidURLError} if the URL is invalid
|
|
13345
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13346
13378
|
* @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
|
|
13347
13379
|
* @throws {InternalError} if an unexpected error occurs
|
|
13348
13380
|
*/
|
package/2022-01-31/index.ts
CHANGED
|
@@ -3735,12 +3735,43 @@ export interface Container {
|
|
|
3735
3735
|
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
3736
3736
|
interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
|
|
3737
3737
|
interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
|
|
3738
|
+
snapshotDirectory(
|
|
3739
|
+
options: ContainerDirectorySnapshotOptions,
|
|
3740
|
+
): Promise<ContainerDirectorySnapshot>;
|
|
3741
|
+
snapshotContainer(
|
|
3742
|
+
options: ContainerSnapshotOptions,
|
|
3743
|
+
): Promise<ContainerSnapshot>;
|
|
3744
|
+
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3745
|
+
}
|
|
3746
|
+
export interface ContainerDirectorySnapshot {
|
|
3747
|
+
id: string;
|
|
3748
|
+
size: number;
|
|
3749
|
+
dir: string;
|
|
3750
|
+
name?: string;
|
|
3751
|
+
}
|
|
3752
|
+
export interface ContainerDirectorySnapshotOptions {
|
|
3753
|
+
dir: string;
|
|
3754
|
+
name?: string;
|
|
3755
|
+
}
|
|
3756
|
+
export interface ContainerDirectorySnapshotRestoreParams {
|
|
3757
|
+
snapshot: ContainerDirectorySnapshot;
|
|
3758
|
+
mountPoint?: string;
|
|
3759
|
+
}
|
|
3760
|
+
export interface ContainerSnapshot {
|
|
3761
|
+
id: string;
|
|
3762
|
+
size: number;
|
|
3763
|
+
name?: string;
|
|
3764
|
+
}
|
|
3765
|
+
export interface ContainerSnapshotOptions {
|
|
3766
|
+
name?: string;
|
|
3738
3767
|
}
|
|
3739
3768
|
export interface ContainerStartupOptions {
|
|
3740
3769
|
entrypoint?: string[];
|
|
3741
3770
|
enableInternet: boolean;
|
|
3742
3771
|
env?: Record<string, string>;
|
|
3743
3772
|
labels?: Record<string, string>;
|
|
3773
|
+
directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
|
|
3774
|
+
containerSnapshot?: ContainerSnapshot;
|
|
3744
3775
|
}
|
|
3745
3776
|
/**
|
|
3746
3777
|
* The **`MessagePort`** interface of the Channel Messaging API represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other.
|
|
@@ -12142,19 +12173,37 @@ export interface ImageList {
|
|
|
12142
12173
|
cursor?: string;
|
|
12143
12174
|
listComplete: boolean;
|
|
12144
12175
|
}
|
|
12145
|
-
export interface
|
|
12176
|
+
export interface ImageHandle {
|
|
12146
12177
|
/**
|
|
12147
|
-
* Get
|
|
12148
|
-
* @param imageId The ID of the image (UUID or custom ID)
|
|
12178
|
+
* Get metadata for a hosted image
|
|
12149
12179
|
* @returns Image metadata, or null if not found
|
|
12150
12180
|
*/
|
|
12151
|
-
details(
|
|
12181
|
+
details(): Promise<ImageMetadata | null>;
|
|
12152
12182
|
/**
|
|
12153
12183
|
* Get the raw image data for a hosted image
|
|
12154
|
-
* @param imageId The ID of the image (UUID or custom ID)
|
|
12155
12184
|
* @returns ReadableStream of image bytes, or null if not found
|
|
12156
12185
|
*/
|
|
12157
|
-
|
|
12186
|
+
bytes(): Promise<ReadableStream<Uint8Array> | null>;
|
|
12187
|
+
/**
|
|
12188
|
+
* Update hosted image metadata
|
|
12189
|
+
* @param options Properties to update
|
|
12190
|
+
* @returns Updated image metadata
|
|
12191
|
+
* @throws {@link ImagesError} if update fails
|
|
12192
|
+
*/
|
|
12193
|
+
update(options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12194
|
+
/**
|
|
12195
|
+
* Delete a hosted image
|
|
12196
|
+
* @returns True if deleted, false if not found
|
|
12197
|
+
*/
|
|
12198
|
+
delete(): Promise<boolean>;
|
|
12199
|
+
}
|
|
12200
|
+
export interface HostedImagesBinding {
|
|
12201
|
+
/**
|
|
12202
|
+
* Get a handle for a hosted image
|
|
12203
|
+
* @param imageId The ID of the image (UUID or custom ID)
|
|
12204
|
+
* @returns A handle for per-image operations
|
|
12205
|
+
*/
|
|
12206
|
+
image(imageId: string): ImageHandle;
|
|
12158
12207
|
/**
|
|
12159
12208
|
* Upload a new hosted image
|
|
12160
12209
|
* @param image The image file to upload
|
|
@@ -12166,20 +12215,6 @@ export interface HostedImagesBinding {
|
|
|
12166
12215
|
image: ReadableStream<Uint8Array> | ArrayBuffer,
|
|
12167
12216
|
options?: ImageUploadOptions,
|
|
12168
12217
|
): Promise<ImageMetadata>;
|
|
12169
|
-
/**
|
|
12170
|
-
* Update hosted image metadata
|
|
12171
|
-
* @param imageId The ID of the image
|
|
12172
|
-
* @param options Properties to update
|
|
12173
|
-
* @returns Updated image metadata
|
|
12174
|
-
* @throws {@link ImagesError} if update fails
|
|
12175
|
-
*/
|
|
12176
|
-
update(imageId: string, options: ImageUpdateOptions): Promise<ImageMetadata>;
|
|
12177
|
-
/**
|
|
12178
|
-
* Delete a hosted image
|
|
12179
|
-
* @param imageId The ID of the image
|
|
12180
|
-
* @returns True if deleted, false if not found
|
|
12181
|
-
*/
|
|
12182
|
-
delete(imageId: string): Promise<boolean>;
|
|
12183
12218
|
/**
|
|
12184
12219
|
* List hosted images with pagination
|
|
12185
12220
|
* @param options List configuration
|
|
@@ -13196,14 +13231,13 @@ export interface StreamScopedCaptions {
|
|
|
13196
13231
|
* Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
|
|
13197
13232
|
* One caption or subtitle file per language is allowed.
|
|
13198
13233
|
* @param language The BCP 47 language tag for the caption or subtitle.
|
|
13199
|
-
* @param
|
|
13234
|
+
* @param input The caption or subtitle stream to upload.
|
|
13200
13235
|
* @returns The created caption entry.
|
|
13201
13236
|
* @throws {NotFoundError} if the video is not found
|
|
13202
13237
|
* @throws {BadRequestError} if the language or file is invalid
|
|
13203
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13204
13238
|
* @throws {InternalError} if an unexpected error occurs
|
|
13205
13239
|
*/
|
|
13206
|
-
upload(language: string,
|
|
13240
|
+
upload(language: string, input: ReadableStream): Promise<StreamCaption>;
|
|
13207
13241
|
/**
|
|
13208
13242
|
* Generate captions or subtitles for the provided language via AI.
|
|
13209
13243
|
* @param language The BCP 47 language tag to generate.
|
|
@@ -13279,17 +13313,16 @@ export interface StreamVideos {
|
|
|
13279
13313
|
export interface StreamWatermarks {
|
|
13280
13314
|
/**
|
|
13281
13315
|
* Generate a new watermark profile
|
|
13282
|
-
* @param
|
|
13316
|
+
* @param input The image stream to upload
|
|
13283
13317
|
* @param params The watermark creation parameters.
|
|
13284
13318
|
* @returns The created watermark profile.
|
|
13285
13319
|
* @throws {BadRequestError} if the parameters are invalid
|
|
13286
13320
|
* @throws {InvalidURLError} if the URL is invalid
|
|
13287
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13288
13321
|
* @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
|
|
13289
13322
|
* @throws {InternalError} if an unexpected error occurs
|
|
13290
13323
|
*/
|
|
13291
13324
|
generate(
|
|
13292
|
-
|
|
13325
|
+
input: ReadableStream,
|
|
13293
13326
|
params: StreamWatermarkCreateParams,
|
|
13294
13327
|
): Promise<StreamWatermark>;
|
|
13295
13328
|
/**
|
|
@@ -13299,7 +13332,6 @@ export interface StreamWatermarks {
|
|
|
13299
13332
|
* @returns The created watermark profile.
|
|
13300
13333
|
* @throws {BadRequestError} if the parameters are invalid
|
|
13301
13334
|
* @throws {InvalidURLError} if the URL is invalid
|
|
13302
|
-
* @throws {MaxFileSizeError} if the file size is too large
|
|
13303
13335
|
* @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
|
|
13304
13336
|
* @throws {InternalError} if an unexpected error occurs
|
|
13305
13337
|
*/
|