@cloudflare/workers-types 4.20260331.1 → 4.20260401.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.
@@ -3662,12 +3662,42 @@ 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
+ }
3672
+ interface ContainerDirectorySnapshot {
3673
+ id: string;
3674
+ size: number;
3675
+ dir: string;
3676
+ name?: string;
3677
+ }
3678
+ interface ContainerDirectorySnapshotOptions {
3679
+ dir: string;
3680
+ name?: string;
3681
+ }
3682
+ interface ContainerDirectorySnapshotRestoreParams {
3683
+ snapshot: ContainerDirectorySnapshot;
3684
+ mountPoint?: string;
3685
+ }
3686
+ interface ContainerSnapshot {
3687
+ id: string;
3688
+ size: number;
3689
+ name?: string;
3690
+ }
3691
+ interface ContainerSnapshotOptions {
3692
+ name?: string;
3665
3693
  }
3666
3694
  interface ContainerStartupOptions {
3667
3695
  entrypoint?: string[];
3668
3696
  enableInternet: boolean;
3669
3697
  env?: Record<string, string>;
3670
3698
  labels?: Record<string, string>;
3699
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3700
+ containerSnapshot?: ContainerSnapshot;
3671
3701
  }
3672
3702
  /**
3673
3703
  * 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.
@@ -13172,14 +13202,13 @@ interface StreamScopedCaptions {
13172
13202
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13173
13203
  * One caption or subtitle file per language is allowed.
13174
13204
  * @param language The BCP 47 language tag for the caption or subtitle.
13175
- * @param file The caption or subtitle file to upload.
13205
+ * @param input The caption or subtitle stream to upload.
13176
13206
  * @returns The created caption entry.
13177
13207
  * @throws {NotFoundError} if the video is not found
13178
13208
  * @throws {BadRequestError} if the language or file is invalid
13179
- * @throws {MaxFileSizeError} if the file size is too large
13180
13209
  * @throws {InternalError} if an unexpected error occurs
13181
13210
  */
13182
- upload(language: string, file: File): Promise<StreamCaption>;
13211
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13183
13212
  /**
13184
13213
  * Generate captions or subtitles for the provided language via AI.
13185
13214
  * @param language The BCP 47 language tag to generate.
@@ -13255,17 +13284,16 @@ interface StreamVideos {
13255
13284
  interface StreamWatermarks {
13256
13285
  /**
13257
13286
  * Generate a new watermark profile
13258
- * @param file The image file to upload
13287
+ * @param input The image stream to upload
13259
13288
  * @param params The watermark creation parameters.
13260
13289
  * @returns The created watermark profile.
13261
13290
  * @throws {BadRequestError} if the parameters are invalid
13262
13291
  * @throws {InvalidURLError} if the URL is invalid
13263
- * @throws {MaxFileSizeError} if the file size is too large
13264
13292
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13265
13293
  * @throws {InternalError} if an unexpected error occurs
13266
13294
  */
13267
13295
  generate(
13268
- file: File,
13296
+ input: ReadableStream,
13269
13297
  params: StreamWatermarkCreateParams,
13270
13298
  ): Promise<StreamWatermark>;
13271
13299
  /**
@@ -13275,7 +13303,6 @@ interface StreamWatermarks {
13275
13303
  * @returns The created watermark profile.
13276
13304
  * @throws {BadRequestError} if the parameters are invalid
13277
13305
  * @throws {InvalidURLError} if the URL is invalid
13278
- * @throws {MaxFileSizeError} if the file size is too large
13279
13306
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13280
13307
  * @throws {InternalError} if an unexpected error occurs
13281
13308
  */
@@ -3668,12 +3668,42 @@ 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
+ }
3678
+ export interface ContainerDirectorySnapshot {
3679
+ id: string;
3680
+ size: number;
3681
+ dir: string;
3682
+ name?: string;
3683
+ }
3684
+ export interface ContainerDirectorySnapshotOptions {
3685
+ dir: string;
3686
+ name?: string;
3687
+ }
3688
+ export interface ContainerDirectorySnapshotRestoreParams {
3689
+ snapshot: ContainerDirectorySnapshot;
3690
+ mountPoint?: string;
3691
+ }
3692
+ export interface ContainerSnapshot {
3693
+ id: string;
3694
+ size: number;
3695
+ name?: string;
3696
+ }
3697
+ export interface ContainerSnapshotOptions {
3698
+ name?: string;
3671
3699
  }
3672
3700
  export interface ContainerStartupOptions {
3673
3701
  entrypoint?: string[];
3674
3702
  enableInternet: boolean;
3675
3703
  env?: Record<string, string>;
3676
3704
  labels?: Record<string, string>;
3705
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3706
+ containerSnapshot?: ContainerSnapshot;
3677
3707
  }
3678
3708
  /**
3679
3709
  * 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.
@@ -13129,14 +13159,13 @@ export interface StreamScopedCaptions {
13129
13159
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13130
13160
  * One caption or subtitle file per language is allowed.
13131
13161
  * @param language The BCP 47 language tag for the caption or subtitle.
13132
- * @param file The caption or subtitle file to upload.
13162
+ * @param input The caption or subtitle stream to upload.
13133
13163
  * @returns The created caption entry.
13134
13164
  * @throws {NotFoundError} if the video is not found
13135
13165
  * @throws {BadRequestError} if the language or file is invalid
13136
- * @throws {MaxFileSizeError} if the file size is too large
13137
13166
  * @throws {InternalError} if an unexpected error occurs
13138
13167
  */
13139
- upload(language: string, file: File): Promise<StreamCaption>;
13168
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13140
13169
  /**
13141
13170
  * Generate captions or subtitles for the provided language via AI.
13142
13171
  * @param language The BCP 47 language tag to generate.
@@ -13212,17 +13241,16 @@ export interface StreamVideos {
13212
13241
  export interface StreamWatermarks {
13213
13242
  /**
13214
13243
  * Generate a new watermark profile
13215
- * @param file The image file to upload
13244
+ * @param input The image stream to upload
13216
13245
  * @param params The watermark creation parameters.
13217
13246
  * @returns The created watermark profile.
13218
13247
  * @throws {BadRequestError} if the parameters are invalid
13219
13248
  * @throws {InvalidURLError} if the URL is invalid
13220
- * @throws {MaxFileSizeError} if the file size is too large
13221
13249
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13222
13250
  * @throws {InternalError} if an unexpected error occurs
13223
13251
  */
13224
13252
  generate(
13225
- file: File,
13253
+ input: ReadableStream,
13226
13254
  params: StreamWatermarkCreateParams,
13227
13255
  ): Promise<StreamWatermark>;
13228
13256
  /**
@@ -13232,7 +13260,6 @@ export interface StreamWatermarks {
13232
13260
  * @returns The created watermark profile.
13233
13261
  * @throws {BadRequestError} if the parameters are invalid
13234
13262
  * @throws {InvalidURLError} if the URL is invalid
13235
- * @throws {MaxFileSizeError} if the file size is too large
13236
13263
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13237
13264
  * @throws {InternalError} if an unexpected error occurs
13238
13265
  */
@@ -3729,12 +3729,42 @@ 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
+ }
3739
+ interface ContainerDirectorySnapshot {
3740
+ id: string;
3741
+ size: number;
3742
+ dir: string;
3743
+ name?: string;
3744
+ }
3745
+ interface ContainerDirectorySnapshotOptions {
3746
+ dir: string;
3747
+ name?: string;
3748
+ }
3749
+ interface ContainerDirectorySnapshotRestoreParams {
3750
+ snapshot: ContainerDirectorySnapshot;
3751
+ mountPoint?: string;
3752
+ }
3753
+ interface ContainerSnapshot {
3754
+ id: string;
3755
+ size: number;
3756
+ name?: string;
3757
+ }
3758
+ interface ContainerSnapshotOptions {
3759
+ name?: string;
3732
3760
  }
3733
3761
  interface ContainerStartupOptions {
3734
3762
  entrypoint?: string[];
3735
3763
  enableInternet: boolean;
3736
3764
  env?: Record<string, string>;
3737
3765
  labels?: Record<string, string>;
3766
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3767
+ containerSnapshot?: ContainerSnapshot;
3738
3768
  }
3739
3769
  /**
3740
3770
  * 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.
@@ -13239,14 +13269,13 @@ interface StreamScopedCaptions {
13239
13269
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13240
13270
  * One caption or subtitle file per language is allowed.
13241
13271
  * @param language The BCP 47 language tag for the caption or subtitle.
13242
- * @param file The caption or subtitle file to upload.
13272
+ * @param input The caption or subtitle stream to upload.
13243
13273
  * @returns The created caption entry.
13244
13274
  * @throws {NotFoundError} if the video is not found
13245
13275
  * @throws {BadRequestError} if the language or file is invalid
13246
- * @throws {MaxFileSizeError} if the file size is too large
13247
13276
  * @throws {InternalError} if an unexpected error occurs
13248
13277
  */
13249
- upload(language: string, file: File): Promise<StreamCaption>;
13278
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13250
13279
  /**
13251
13280
  * Generate captions or subtitles for the provided language via AI.
13252
13281
  * @param language The BCP 47 language tag to generate.
@@ -13322,17 +13351,16 @@ interface StreamVideos {
13322
13351
  interface StreamWatermarks {
13323
13352
  /**
13324
13353
  * Generate a new watermark profile
13325
- * @param file The image file to upload
13354
+ * @param input The image stream to upload
13326
13355
  * @param params The watermark creation parameters.
13327
13356
  * @returns The created watermark profile.
13328
13357
  * @throws {BadRequestError} if the parameters are invalid
13329
13358
  * @throws {InvalidURLError} if the URL is invalid
13330
- * @throws {MaxFileSizeError} if the file size is too large
13331
13359
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13332
13360
  * @throws {InternalError} if an unexpected error occurs
13333
13361
  */
13334
13362
  generate(
13335
- file: File,
13363
+ input: ReadableStream,
13336
13364
  params: StreamWatermarkCreateParams,
13337
13365
  ): Promise<StreamWatermark>;
13338
13366
  /**
@@ -13342,7 +13370,6 @@ interface StreamWatermarks {
13342
13370
  * @returns The created watermark profile.
13343
13371
  * @throws {BadRequestError} if the parameters are invalid
13344
13372
  * @throws {InvalidURLError} if the URL is invalid
13345
- * @throws {MaxFileSizeError} if the file size is too large
13346
13373
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13347
13374
  * @throws {InternalError} if an unexpected error occurs
13348
13375
  */
@@ -3735,12 +3735,42 @@ 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
+ }
3745
+ export interface ContainerDirectorySnapshot {
3746
+ id: string;
3747
+ size: number;
3748
+ dir: string;
3749
+ name?: string;
3750
+ }
3751
+ export interface ContainerDirectorySnapshotOptions {
3752
+ dir: string;
3753
+ name?: string;
3754
+ }
3755
+ export interface ContainerDirectorySnapshotRestoreParams {
3756
+ snapshot: ContainerDirectorySnapshot;
3757
+ mountPoint?: string;
3758
+ }
3759
+ export interface ContainerSnapshot {
3760
+ id: string;
3761
+ size: number;
3762
+ name?: string;
3763
+ }
3764
+ export interface ContainerSnapshotOptions {
3765
+ name?: string;
3738
3766
  }
3739
3767
  export interface ContainerStartupOptions {
3740
3768
  entrypoint?: string[];
3741
3769
  enableInternet: boolean;
3742
3770
  env?: Record<string, string>;
3743
3771
  labels?: Record<string, string>;
3772
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3773
+ containerSnapshot?: ContainerSnapshot;
3744
3774
  }
3745
3775
  /**
3746
3776
  * 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.
@@ -13196,14 +13226,13 @@ export interface StreamScopedCaptions {
13196
13226
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13197
13227
  * One caption or subtitle file per language is allowed.
13198
13228
  * @param language The BCP 47 language tag for the caption or subtitle.
13199
- * @param file The caption or subtitle file to upload.
13229
+ * @param input The caption or subtitle stream to upload.
13200
13230
  * @returns The created caption entry.
13201
13231
  * @throws {NotFoundError} if the video is not found
13202
13232
  * @throws {BadRequestError} if the language or file is invalid
13203
- * @throws {MaxFileSizeError} if the file size is too large
13204
13233
  * @throws {InternalError} if an unexpected error occurs
13205
13234
  */
13206
- upload(language: string, file: File): Promise<StreamCaption>;
13235
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13207
13236
  /**
13208
13237
  * Generate captions or subtitles for the provided language via AI.
13209
13238
  * @param language The BCP 47 language tag to generate.
@@ -13279,17 +13308,16 @@ export interface StreamVideos {
13279
13308
  export interface StreamWatermarks {
13280
13309
  /**
13281
13310
  * Generate a new watermark profile
13282
- * @param file The image file to upload
13311
+ * @param input The image stream to upload
13283
13312
  * @param params The watermark creation parameters.
13284
13313
  * @returns The created watermark profile.
13285
13314
  * @throws {BadRequestError} if the parameters are invalid
13286
13315
  * @throws {InvalidURLError} if the URL is invalid
13287
- * @throws {MaxFileSizeError} if the file size is too large
13288
13316
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13289
13317
  * @throws {InternalError} if an unexpected error occurs
13290
13318
  */
13291
13319
  generate(
13292
- file: File,
13320
+ input: ReadableStream,
13293
13321
  params: StreamWatermarkCreateParams,
13294
13322
  ): Promise<StreamWatermark>;
13295
13323
  /**
@@ -13299,7 +13327,6 @@ export interface StreamWatermarks {
13299
13327
  * @returns The created watermark profile.
13300
13328
  * @throws {BadRequestError} if the parameters are invalid
13301
13329
  * @throws {InvalidURLError} if the URL is invalid
13302
- * @throws {MaxFileSizeError} if the file size is too large
13303
13330
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13304
13331
  * @throws {InternalError} if an unexpected error occurs
13305
13332
  */
@@ -3737,12 +3737,42 @@ interface Container {
3737
3737
  setInactivityTimeout(durationMs: number | bigint): Promise<void>;
3738
3738
  interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
3739
3739
  interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
3740
+ snapshotDirectory(
3741
+ options: ContainerDirectorySnapshotOptions,
3742
+ ): Promise<ContainerDirectorySnapshot>;
3743
+ snapshotContainer(
3744
+ options: ContainerSnapshotOptions,
3745
+ ): Promise<ContainerSnapshot>;
3746
+ }
3747
+ interface ContainerDirectorySnapshot {
3748
+ id: string;
3749
+ size: number;
3750
+ dir: string;
3751
+ name?: string;
3752
+ }
3753
+ interface ContainerDirectorySnapshotOptions {
3754
+ dir: string;
3755
+ name?: string;
3756
+ }
3757
+ interface ContainerDirectorySnapshotRestoreParams {
3758
+ snapshot: ContainerDirectorySnapshot;
3759
+ mountPoint?: string;
3760
+ }
3761
+ interface ContainerSnapshot {
3762
+ id: string;
3763
+ size: number;
3764
+ name?: string;
3765
+ }
3766
+ interface ContainerSnapshotOptions {
3767
+ name?: string;
3740
3768
  }
3741
3769
  interface ContainerStartupOptions {
3742
3770
  entrypoint?: string[];
3743
3771
  enableInternet: boolean;
3744
3772
  env?: Record<string, string>;
3745
3773
  labels?: Record<string, string>;
3774
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3775
+ containerSnapshot?: ContainerSnapshot;
3746
3776
  }
3747
3777
  /**
3748
3778
  * 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.
@@ -13247,14 +13277,13 @@ interface StreamScopedCaptions {
13247
13277
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13248
13278
  * One caption or subtitle file per language is allowed.
13249
13279
  * @param language The BCP 47 language tag for the caption or subtitle.
13250
- * @param file The caption or subtitle file to upload.
13280
+ * @param input The caption or subtitle stream to upload.
13251
13281
  * @returns The created caption entry.
13252
13282
  * @throws {NotFoundError} if the video is not found
13253
13283
  * @throws {BadRequestError} if the language or file is invalid
13254
- * @throws {MaxFileSizeError} if the file size is too large
13255
13284
  * @throws {InternalError} if an unexpected error occurs
13256
13285
  */
13257
- upload(language: string, file: File): Promise<StreamCaption>;
13286
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13258
13287
  /**
13259
13288
  * Generate captions or subtitles for the provided language via AI.
13260
13289
  * @param language The BCP 47 language tag to generate.
@@ -13330,17 +13359,16 @@ interface StreamVideos {
13330
13359
  interface StreamWatermarks {
13331
13360
  /**
13332
13361
  * Generate a new watermark profile
13333
- * @param file The image file to upload
13362
+ * @param input The image stream to upload
13334
13363
  * @param params The watermark creation parameters.
13335
13364
  * @returns The created watermark profile.
13336
13365
  * @throws {BadRequestError} if the parameters are invalid
13337
13366
  * @throws {InvalidURLError} if the URL is invalid
13338
- * @throws {MaxFileSizeError} if the file size is too large
13339
13367
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13340
13368
  * @throws {InternalError} if an unexpected error occurs
13341
13369
  */
13342
13370
  generate(
13343
- file: File,
13371
+ input: ReadableStream,
13344
13372
  params: StreamWatermarkCreateParams,
13345
13373
  ): Promise<StreamWatermark>;
13346
13374
  /**
@@ -13350,7 +13378,6 @@ interface StreamWatermarks {
13350
13378
  * @returns The created watermark profile.
13351
13379
  * @throws {BadRequestError} if the parameters are invalid
13352
13380
  * @throws {InvalidURLError} if the URL is invalid
13353
- * @throws {MaxFileSizeError} if the file size is too large
13354
13381
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13355
13382
  * @throws {InternalError} if an unexpected error occurs
13356
13383
  */
@@ -3743,12 +3743,42 @@ export interface Container {
3743
3743
  setInactivityTimeout(durationMs: number | bigint): Promise<void>;
3744
3744
  interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
3745
3745
  interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
3746
+ snapshotDirectory(
3747
+ options: ContainerDirectorySnapshotOptions,
3748
+ ): Promise<ContainerDirectorySnapshot>;
3749
+ snapshotContainer(
3750
+ options: ContainerSnapshotOptions,
3751
+ ): Promise<ContainerSnapshot>;
3752
+ }
3753
+ export interface ContainerDirectorySnapshot {
3754
+ id: string;
3755
+ size: number;
3756
+ dir: string;
3757
+ name?: string;
3758
+ }
3759
+ export interface ContainerDirectorySnapshotOptions {
3760
+ dir: string;
3761
+ name?: string;
3762
+ }
3763
+ export interface ContainerDirectorySnapshotRestoreParams {
3764
+ snapshot: ContainerDirectorySnapshot;
3765
+ mountPoint?: string;
3766
+ }
3767
+ export interface ContainerSnapshot {
3768
+ id: string;
3769
+ size: number;
3770
+ name?: string;
3771
+ }
3772
+ export interface ContainerSnapshotOptions {
3773
+ name?: string;
3746
3774
  }
3747
3775
  export interface ContainerStartupOptions {
3748
3776
  entrypoint?: string[];
3749
3777
  enableInternet: boolean;
3750
3778
  env?: Record<string, string>;
3751
3779
  labels?: Record<string, string>;
3780
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3781
+ containerSnapshot?: ContainerSnapshot;
3752
3782
  }
3753
3783
  /**
3754
3784
  * 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.
@@ -13204,14 +13234,13 @@ export interface StreamScopedCaptions {
13204
13234
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13205
13235
  * One caption or subtitle file per language is allowed.
13206
13236
  * @param language The BCP 47 language tag for the caption or subtitle.
13207
- * @param file The caption or subtitle file to upload.
13237
+ * @param input The caption or subtitle stream to upload.
13208
13238
  * @returns The created caption entry.
13209
13239
  * @throws {NotFoundError} if the video is not found
13210
13240
  * @throws {BadRequestError} if the language or file is invalid
13211
- * @throws {MaxFileSizeError} if the file size is too large
13212
13241
  * @throws {InternalError} if an unexpected error occurs
13213
13242
  */
13214
- upload(language: string, file: File): Promise<StreamCaption>;
13243
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13215
13244
  /**
13216
13245
  * Generate captions or subtitles for the provided language via AI.
13217
13246
  * @param language The BCP 47 language tag to generate.
@@ -13287,17 +13316,16 @@ export interface StreamVideos {
13287
13316
  export interface StreamWatermarks {
13288
13317
  /**
13289
13318
  * Generate a new watermark profile
13290
- * @param file The image file to upload
13319
+ * @param input The image stream to upload
13291
13320
  * @param params The watermark creation parameters.
13292
13321
  * @returns The created watermark profile.
13293
13322
  * @throws {BadRequestError} if the parameters are invalid
13294
13323
  * @throws {InvalidURLError} if the URL is invalid
13295
- * @throws {MaxFileSizeError} if the file size is too large
13296
13324
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13297
13325
  * @throws {InternalError} if an unexpected error occurs
13298
13326
  */
13299
13327
  generate(
13300
- file: File,
13328
+ input: ReadableStream,
13301
13329
  params: StreamWatermarkCreateParams,
13302
13330
  ): Promise<StreamWatermark>;
13303
13331
  /**
@@ -13307,7 +13335,6 @@ export interface StreamWatermarks {
13307
13335
  * @returns The created watermark profile.
13308
13336
  * @throws {BadRequestError} if the parameters are invalid
13309
13337
  * @throws {InvalidURLError} if the URL is invalid
13310
- * @throws {MaxFileSizeError} if the file size is too large
13311
13338
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13312
13339
  * @throws {InternalError} if an unexpected error occurs
13313
13340
  */
@@ -3738,12 +3738,42 @@ interface Container {
3738
3738
  setInactivityTimeout(durationMs: number | bigint): Promise<void>;
3739
3739
  interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
3740
3740
  interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
3741
+ snapshotDirectory(
3742
+ options: ContainerDirectorySnapshotOptions,
3743
+ ): Promise<ContainerDirectorySnapshot>;
3744
+ snapshotContainer(
3745
+ options: ContainerSnapshotOptions,
3746
+ ): Promise<ContainerSnapshot>;
3747
+ }
3748
+ interface ContainerDirectorySnapshot {
3749
+ id: string;
3750
+ size: number;
3751
+ dir: string;
3752
+ name?: string;
3753
+ }
3754
+ interface ContainerDirectorySnapshotOptions {
3755
+ dir: string;
3756
+ name?: string;
3757
+ }
3758
+ interface ContainerDirectorySnapshotRestoreParams {
3759
+ snapshot: ContainerDirectorySnapshot;
3760
+ mountPoint?: string;
3761
+ }
3762
+ interface ContainerSnapshot {
3763
+ id: string;
3764
+ size: number;
3765
+ name?: string;
3766
+ }
3767
+ interface ContainerSnapshotOptions {
3768
+ name?: string;
3741
3769
  }
3742
3770
  interface ContainerStartupOptions {
3743
3771
  entrypoint?: string[];
3744
3772
  enableInternet: boolean;
3745
3773
  env?: Record<string, string>;
3746
3774
  labels?: Record<string, string>;
3775
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3776
+ containerSnapshot?: ContainerSnapshot;
3747
3777
  }
3748
3778
  /**
3749
3779
  * 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.
@@ -13248,14 +13278,13 @@ interface StreamScopedCaptions {
13248
13278
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13249
13279
  * One caption or subtitle file per language is allowed.
13250
13280
  * @param language The BCP 47 language tag for the caption or subtitle.
13251
- * @param file The caption or subtitle file to upload.
13281
+ * @param input The caption or subtitle stream to upload.
13252
13282
  * @returns The created caption entry.
13253
13283
  * @throws {NotFoundError} if the video is not found
13254
13284
  * @throws {BadRequestError} if the language or file is invalid
13255
- * @throws {MaxFileSizeError} if the file size is too large
13256
13285
  * @throws {InternalError} if an unexpected error occurs
13257
13286
  */
13258
- upload(language: string, file: File): Promise<StreamCaption>;
13287
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13259
13288
  /**
13260
13289
  * Generate captions or subtitles for the provided language via AI.
13261
13290
  * @param language The BCP 47 language tag to generate.
@@ -13331,17 +13360,16 @@ interface StreamVideos {
13331
13360
  interface StreamWatermarks {
13332
13361
  /**
13333
13362
  * Generate a new watermark profile
13334
- * @param file The image file to upload
13363
+ * @param input The image stream to upload
13335
13364
  * @param params The watermark creation parameters.
13336
13365
  * @returns The created watermark profile.
13337
13366
  * @throws {BadRequestError} if the parameters are invalid
13338
13367
  * @throws {InvalidURLError} if the URL is invalid
13339
- * @throws {MaxFileSizeError} if the file size is too large
13340
13368
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13341
13369
  * @throws {InternalError} if an unexpected error occurs
13342
13370
  */
13343
13371
  generate(
13344
- file: File,
13372
+ input: ReadableStream,
13345
13373
  params: StreamWatermarkCreateParams,
13346
13374
  ): Promise<StreamWatermark>;
13347
13375
  /**
@@ -13351,7 +13379,6 @@ interface StreamWatermarks {
13351
13379
  * @returns The created watermark profile.
13352
13380
  * @throws {BadRequestError} if the parameters are invalid
13353
13381
  * @throws {InvalidURLError} if the URL is invalid
13354
- * @throws {MaxFileSizeError} if the file size is too large
13355
13382
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13356
13383
  * @throws {InternalError} if an unexpected error occurs
13357
13384
  */