@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.
@@ -3744,12 +3744,42 @@ export interface Container {
3744
3744
  setInactivityTimeout(durationMs: number | bigint): Promise<void>;
3745
3745
  interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
3746
3746
  interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
3747
+ snapshotDirectory(
3748
+ options: ContainerDirectorySnapshotOptions,
3749
+ ): Promise<ContainerDirectorySnapshot>;
3750
+ snapshotContainer(
3751
+ options: ContainerSnapshotOptions,
3752
+ ): Promise<ContainerSnapshot>;
3753
+ }
3754
+ export interface ContainerDirectorySnapshot {
3755
+ id: string;
3756
+ size: number;
3757
+ dir: string;
3758
+ name?: string;
3759
+ }
3760
+ export interface ContainerDirectorySnapshotOptions {
3761
+ dir: string;
3762
+ name?: string;
3763
+ }
3764
+ export interface ContainerDirectorySnapshotRestoreParams {
3765
+ snapshot: ContainerDirectorySnapshot;
3766
+ mountPoint?: string;
3767
+ }
3768
+ export interface ContainerSnapshot {
3769
+ id: string;
3770
+ size: number;
3771
+ name?: string;
3772
+ }
3773
+ export interface ContainerSnapshotOptions {
3774
+ name?: string;
3747
3775
  }
3748
3776
  export interface ContainerStartupOptions {
3749
3777
  entrypoint?: string[];
3750
3778
  enableInternet: boolean;
3751
3779
  env?: Record<string, string>;
3752
3780
  labels?: Record<string, string>;
3781
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3782
+ containerSnapshot?: ContainerSnapshot;
3753
3783
  }
3754
3784
  /**
3755
3785
  * 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.
@@ -13205,14 +13235,13 @@ export interface StreamScopedCaptions {
13205
13235
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13206
13236
  * One caption or subtitle file per language is allowed.
13207
13237
  * @param language The BCP 47 language tag for the caption or subtitle.
13208
- * @param file The caption or subtitle file to upload.
13238
+ * @param input The caption or subtitle stream to upload.
13209
13239
  * @returns The created caption entry.
13210
13240
  * @throws {NotFoundError} if the video is not found
13211
13241
  * @throws {BadRequestError} if the language or file is invalid
13212
- * @throws {MaxFileSizeError} if the file size is too large
13213
13242
  * @throws {InternalError} if an unexpected error occurs
13214
13243
  */
13215
- upload(language: string, file: File): Promise<StreamCaption>;
13244
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13216
13245
  /**
13217
13246
  * Generate captions or subtitles for the provided language via AI.
13218
13247
  * @param language The BCP 47 language tag to generate.
@@ -13288,17 +13317,16 @@ export interface StreamVideos {
13288
13317
  export interface StreamWatermarks {
13289
13318
  /**
13290
13319
  * Generate a new watermark profile
13291
- * @param file The image file to upload
13320
+ * @param input The image stream to upload
13292
13321
  * @param params The watermark creation parameters.
13293
13322
  * @returns The created watermark profile.
13294
13323
  * @throws {BadRequestError} if the parameters are invalid
13295
13324
  * @throws {InvalidURLError} if the URL is invalid
13296
- * @throws {MaxFileSizeError} if the file size is too large
13297
13325
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13298
13326
  * @throws {InternalError} if an unexpected error occurs
13299
13327
  */
13300
13328
  generate(
13301
- file: File,
13329
+ input: ReadableStream,
13302
13330
  params: StreamWatermarkCreateParams,
13303
13331
  ): Promise<StreamWatermark>;
13304
13332
  /**
@@ -13308,7 +13336,6 @@ export interface StreamWatermarks {
13308
13336
  * @returns The created watermark profile.
13309
13337
  * @throws {BadRequestError} if the parameters are invalid
13310
13338
  * @throws {InvalidURLError} if the URL is invalid
13311
- * @throws {MaxFileSizeError} if the file size is too large
13312
13339
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13313
13340
  * @throws {InternalError} if an unexpected error occurs
13314
13341
  */
@@ -3758,12 +3758,42 @@ interface Container {
3758
3758
  setInactivityTimeout(durationMs: number | bigint): Promise<void>;
3759
3759
  interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
3760
3760
  interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
3761
+ snapshotDirectory(
3762
+ options: ContainerDirectorySnapshotOptions,
3763
+ ): Promise<ContainerDirectorySnapshot>;
3764
+ snapshotContainer(
3765
+ options: ContainerSnapshotOptions,
3766
+ ): Promise<ContainerSnapshot>;
3767
+ }
3768
+ interface ContainerDirectorySnapshot {
3769
+ id: string;
3770
+ size: number;
3771
+ dir: string;
3772
+ name?: string;
3773
+ }
3774
+ interface ContainerDirectorySnapshotOptions {
3775
+ dir: string;
3776
+ name?: string;
3777
+ }
3778
+ interface ContainerDirectorySnapshotRestoreParams {
3779
+ snapshot: ContainerDirectorySnapshot;
3780
+ mountPoint?: string;
3781
+ }
3782
+ interface ContainerSnapshot {
3783
+ id: string;
3784
+ size: number;
3785
+ name?: string;
3786
+ }
3787
+ interface ContainerSnapshotOptions {
3788
+ name?: string;
3761
3789
  }
3762
3790
  interface ContainerStartupOptions {
3763
3791
  entrypoint?: string[];
3764
3792
  enableInternet: boolean;
3765
3793
  env?: Record<string, string>;
3766
3794
  labels?: Record<string, string>;
3795
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3796
+ containerSnapshot?: ContainerSnapshot;
3767
3797
  }
3768
3798
  /**
3769
3799
  * 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.
@@ -13268,14 +13298,13 @@ interface StreamScopedCaptions {
13268
13298
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13269
13299
  * One caption or subtitle file per language is allowed.
13270
13300
  * @param language The BCP 47 language tag for the caption or subtitle.
13271
- * @param file The caption or subtitle file to upload.
13301
+ * @param input The caption or subtitle stream to upload.
13272
13302
  * @returns The created caption entry.
13273
13303
  * @throws {NotFoundError} if the video is not found
13274
13304
  * @throws {BadRequestError} if the language or file is invalid
13275
- * @throws {MaxFileSizeError} if the file size is too large
13276
13305
  * @throws {InternalError} if an unexpected error occurs
13277
13306
  */
13278
- upload(language: string, file: File): Promise<StreamCaption>;
13307
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13279
13308
  /**
13280
13309
  * Generate captions or subtitles for the provided language via AI.
13281
13310
  * @param language The BCP 47 language tag to generate.
@@ -13351,17 +13380,16 @@ interface StreamVideos {
13351
13380
  interface StreamWatermarks {
13352
13381
  /**
13353
13382
  * Generate a new watermark profile
13354
- * @param file The image file to upload
13383
+ * @param input The image stream to upload
13355
13384
  * @param params The watermark creation parameters.
13356
13385
  * @returns The created watermark profile.
13357
13386
  * @throws {BadRequestError} if the parameters are invalid
13358
13387
  * @throws {InvalidURLError} if the URL is invalid
13359
- * @throws {MaxFileSizeError} if the file size is too large
13360
13388
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13361
13389
  * @throws {InternalError} if an unexpected error occurs
13362
13390
  */
13363
13391
  generate(
13364
- file: File,
13392
+ input: ReadableStream,
13365
13393
  params: StreamWatermarkCreateParams,
13366
13394
  ): Promise<StreamWatermark>;
13367
13395
  /**
@@ -13371,7 +13399,6 @@ interface StreamWatermarks {
13371
13399
  * @returns The created watermark profile.
13372
13400
  * @throws {BadRequestError} if the parameters are invalid
13373
13401
  * @throws {InvalidURLError} if the URL is invalid
13374
- * @throws {MaxFileSizeError} if the file size is too large
13375
13402
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13376
13403
  * @throws {InternalError} if an unexpected error occurs
13377
13404
  */
@@ -3764,12 +3764,42 @@ export interface Container {
3764
3764
  setInactivityTimeout(durationMs: number | bigint): Promise<void>;
3765
3765
  interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
3766
3766
  interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
3767
+ snapshotDirectory(
3768
+ options: ContainerDirectorySnapshotOptions,
3769
+ ): Promise<ContainerDirectorySnapshot>;
3770
+ snapshotContainer(
3771
+ options: ContainerSnapshotOptions,
3772
+ ): Promise<ContainerSnapshot>;
3773
+ }
3774
+ export interface ContainerDirectorySnapshot {
3775
+ id: string;
3776
+ size: number;
3777
+ dir: string;
3778
+ name?: string;
3779
+ }
3780
+ export interface ContainerDirectorySnapshotOptions {
3781
+ dir: string;
3782
+ name?: string;
3783
+ }
3784
+ export interface ContainerDirectorySnapshotRestoreParams {
3785
+ snapshot: ContainerDirectorySnapshot;
3786
+ mountPoint?: string;
3787
+ }
3788
+ export interface ContainerSnapshot {
3789
+ id: string;
3790
+ size: number;
3791
+ name?: string;
3792
+ }
3793
+ export interface ContainerSnapshotOptions {
3794
+ name?: string;
3767
3795
  }
3768
3796
  export interface ContainerStartupOptions {
3769
3797
  entrypoint?: string[];
3770
3798
  enableInternet: boolean;
3771
3799
  env?: Record<string, string>;
3772
3800
  labels?: Record<string, string>;
3801
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3802
+ containerSnapshot?: ContainerSnapshot;
3773
3803
  }
3774
3804
  /**
3775
3805
  * 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.
@@ -13225,14 +13255,13 @@ export interface StreamScopedCaptions {
13225
13255
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13226
13256
  * One caption or subtitle file per language is allowed.
13227
13257
  * @param language The BCP 47 language tag for the caption or subtitle.
13228
- * @param file The caption or subtitle file to upload.
13258
+ * @param input The caption or subtitle stream to upload.
13229
13259
  * @returns The created caption entry.
13230
13260
  * @throws {NotFoundError} if the video is not found
13231
13261
  * @throws {BadRequestError} if the language or file is invalid
13232
- * @throws {MaxFileSizeError} if the file size is too large
13233
13262
  * @throws {InternalError} if an unexpected error occurs
13234
13263
  */
13235
- upload(language: string, file: File): Promise<StreamCaption>;
13264
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13236
13265
  /**
13237
13266
  * Generate captions or subtitles for the provided language via AI.
13238
13267
  * @param language The BCP 47 language tag to generate.
@@ -13308,17 +13337,16 @@ export interface StreamVideos {
13308
13337
  export interface StreamWatermarks {
13309
13338
  /**
13310
13339
  * Generate a new watermark profile
13311
- * @param file The image file to upload
13340
+ * @param input The image stream to upload
13312
13341
  * @param params The watermark creation parameters.
13313
13342
  * @returns The created watermark profile.
13314
13343
  * @throws {BadRequestError} if the parameters are invalid
13315
13344
  * @throws {InvalidURLError} if the URL is invalid
13316
- * @throws {MaxFileSizeError} if the file size is too large
13317
13345
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13318
13346
  * @throws {InternalError} if an unexpected error occurs
13319
13347
  */
13320
13348
  generate(
13321
- file: File,
13349
+ input: ReadableStream,
13322
13350
  params: StreamWatermarkCreateParams,
13323
13351
  ): Promise<StreamWatermark>;
13324
13352
  /**
@@ -13328,7 +13356,6 @@ export interface StreamWatermarks {
13328
13356
  * @returns The created watermark profile.
13329
13357
  * @throws {BadRequestError} if the parameters are invalid
13330
13358
  * @throws {InvalidURLError} if the URL is invalid
13331
- * @throws {MaxFileSizeError} if the file size is too large
13332
13359
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13333
13360
  * @throws {InternalError} if an unexpected error occurs
13334
13361
  */
@@ -3763,12 +3763,42 @@ interface Container {
3763
3763
  setInactivityTimeout(durationMs: number | bigint): Promise<void>;
3764
3764
  interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
3765
3765
  interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
3766
+ snapshotDirectory(
3767
+ options: ContainerDirectorySnapshotOptions,
3768
+ ): Promise<ContainerDirectorySnapshot>;
3769
+ snapshotContainer(
3770
+ options: ContainerSnapshotOptions,
3771
+ ): Promise<ContainerSnapshot>;
3772
+ }
3773
+ interface ContainerDirectorySnapshot {
3774
+ id: string;
3775
+ size: number;
3776
+ dir: string;
3777
+ name?: string;
3778
+ }
3779
+ interface ContainerDirectorySnapshotOptions {
3780
+ dir: string;
3781
+ name?: string;
3782
+ }
3783
+ interface ContainerDirectorySnapshotRestoreParams {
3784
+ snapshot: ContainerDirectorySnapshot;
3785
+ mountPoint?: string;
3786
+ }
3787
+ interface ContainerSnapshot {
3788
+ id: string;
3789
+ size: number;
3790
+ name?: string;
3791
+ }
3792
+ interface ContainerSnapshotOptions {
3793
+ name?: string;
3766
3794
  }
3767
3795
  interface ContainerStartupOptions {
3768
3796
  entrypoint?: string[];
3769
3797
  enableInternet: boolean;
3770
3798
  env?: Record<string, string>;
3771
3799
  labels?: Record<string, string>;
3800
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3801
+ containerSnapshot?: ContainerSnapshot;
3772
3802
  }
3773
3803
  /**
3774
3804
  * 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.
@@ -13273,14 +13303,13 @@ interface StreamScopedCaptions {
13273
13303
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13274
13304
  * One caption or subtitle file per language is allowed.
13275
13305
  * @param language The BCP 47 language tag for the caption or subtitle.
13276
- * @param file The caption or subtitle file to upload.
13306
+ * @param input The caption or subtitle stream to upload.
13277
13307
  * @returns The created caption entry.
13278
13308
  * @throws {NotFoundError} if the video is not found
13279
13309
  * @throws {BadRequestError} if the language or file is invalid
13280
- * @throws {MaxFileSizeError} if the file size is too large
13281
13310
  * @throws {InternalError} if an unexpected error occurs
13282
13311
  */
13283
- upload(language: string, file: File): Promise<StreamCaption>;
13312
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13284
13313
  /**
13285
13314
  * Generate captions or subtitles for the provided language via AI.
13286
13315
  * @param language The BCP 47 language tag to generate.
@@ -13356,17 +13385,16 @@ interface StreamVideos {
13356
13385
  interface StreamWatermarks {
13357
13386
  /**
13358
13387
  * Generate a new watermark profile
13359
- * @param file The image file to upload
13388
+ * @param input The image stream to upload
13360
13389
  * @param params The watermark creation parameters.
13361
13390
  * @returns The created watermark profile.
13362
13391
  * @throws {BadRequestError} if the parameters are invalid
13363
13392
  * @throws {InvalidURLError} if the URL is invalid
13364
- * @throws {MaxFileSizeError} if the file size is too large
13365
13393
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13366
13394
  * @throws {InternalError} if an unexpected error occurs
13367
13395
  */
13368
13396
  generate(
13369
- file: File,
13397
+ input: ReadableStream,
13370
13398
  params: StreamWatermarkCreateParams,
13371
13399
  ): Promise<StreamWatermark>;
13372
13400
  /**
@@ -13376,7 +13404,6 @@ interface StreamWatermarks {
13376
13404
  * @returns The created watermark profile.
13377
13405
  * @throws {BadRequestError} if the parameters are invalid
13378
13406
  * @throws {InvalidURLError} if the URL is invalid
13379
- * @throws {MaxFileSizeError} if the file size is too large
13380
13407
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13381
13408
  * @throws {InternalError} if an unexpected error occurs
13382
13409
  */
@@ -3769,12 +3769,42 @@ export interface Container {
3769
3769
  setInactivityTimeout(durationMs: number | bigint): Promise<void>;
3770
3770
  interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
3771
3771
  interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
3772
+ snapshotDirectory(
3773
+ options: ContainerDirectorySnapshotOptions,
3774
+ ): Promise<ContainerDirectorySnapshot>;
3775
+ snapshotContainer(
3776
+ options: ContainerSnapshotOptions,
3777
+ ): Promise<ContainerSnapshot>;
3778
+ }
3779
+ export interface ContainerDirectorySnapshot {
3780
+ id: string;
3781
+ size: number;
3782
+ dir: string;
3783
+ name?: string;
3784
+ }
3785
+ export interface ContainerDirectorySnapshotOptions {
3786
+ dir: string;
3787
+ name?: string;
3788
+ }
3789
+ export interface ContainerDirectorySnapshotRestoreParams {
3790
+ snapshot: ContainerDirectorySnapshot;
3791
+ mountPoint?: string;
3792
+ }
3793
+ export interface ContainerSnapshot {
3794
+ id: string;
3795
+ size: number;
3796
+ name?: string;
3797
+ }
3798
+ export interface ContainerSnapshotOptions {
3799
+ name?: string;
3772
3800
  }
3773
3801
  export interface ContainerStartupOptions {
3774
3802
  entrypoint?: string[];
3775
3803
  enableInternet: boolean;
3776
3804
  env?: Record<string, string>;
3777
3805
  labels?: Record<string, string>;
3806
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3807
+ containerSnapshot?: ContainerSnapshot;
3778
3808
  }
3779
3809
  /**
3780
3810
  * 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.
@@ -13230,14 +13260,13 @@ export interface StreamScopedCaptions {
13230
13260
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13231
13261
  * One caption or subtitle file per language is allowed.
13232
13262
  * @param language The BCP 47 language tag for the caption or subtitle.
13233
- * @param file The caption or subtitle file to upload.
13263
+ * @param input The caption or subtitle stream to upload.
13234
13264
  * @returns The created caption entry.
13235
13265
  * @throws {NotFoundError} if the video is not found
13236
13266
  * @throws {BadRequestError} if the language or file is invalid
13237
- * @throws {MaxFileSizeError} if the file size is too large
13238
13267
  * @throws {InternalError} if an unexpected error occurs
13239
13268
  */
13240
- upload(language: string, file: File): Promise<StreamCaption>;
13269
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13241
13270
  /**
13242
13271
  * Generate captions or subtitles for the provided language via AI.
13243
13272
  * @param language The BCP 47 language tag to generate.
@@ -13313,17 +13342,16 @@ export interface StreamVideos {
13313
13342
  export interface StreamWatermarks {
13314
13343
  /**
13315
13344
  * Generate a new watermark profile
13316
- * @param file The image file to upload
13345
+ * @param input The image stream to upload
13317
13346
  * @param params The watermark creation parameters.
13318
13347
  * @returns The created watermark profile.
13319
13348
  * @throws {BadRequestError} if the parameters are invalid
13320
13349
  * @throws {InvalidURLError} if the URL is invalid
13321
- * @throws {MaxFileSizeError} if the file size is too large
13322
13350
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13323
13351
  * @throws {InternalError} if an unexpected error occurs
13324
13352
  */
13325
13353
  generate(
13326
- file: File,
13354
+ input: ReadableStream,
13327
13355
  params: StreamWatermarkCreateParams,
13328
13356
  ): Promise<StreamWatermark>;
13329
13357
  /**
@@ -13333,7 +13361,6 @@ export interface StreamWatermarks {
13333
13361
  * @returns The created watermark profile.
13334
13362
  * @throws {BadRequestError} if the parameters are invalid
13335
13363
  * @throws {InvalidURLError} if the URL is invalid
13336
- * @throws {MaxFileSizeError} if the file size is too large
13337
13364
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13338
13365
  * @throws {InternalError} if an unexpected error occurs
13339
13366
  */
@@ -3769,12 +3769,42 @@ interface Container {
3769
3769
  setInactivityTimeout(durationMs: number | bigint): Promise<void>;
3770
3770
  interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
3771
3771
  interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
3772
+ snapshotDirectory(
3773
+ options: ContainerDirectorySnapshotOptions,
3774
+ ): Promise<ContainerDirectorySnapshot>;
3775
+ snapshotContainer(
3776
+ options: ContainerSnapshotOptions,
3777
+ ): Promise<ContainerSnapshot>;
3778
+ }
3779
+ interface ContainerDirectorySnapshot {
3780
+ id: string;
3781
+ size: number;
3782
+ dir: string;
3783
+ name?: string;
3784
+ }
3785
+ interface ContainerDirectorySnapshotOptions {
3786
+ dir: string;
3787
+ name?: string;
3788
+ }
3789
+ interface ContainerDirectorySnapshotRestoreParams {
3790
+ snapshot: ContainerDirectorySnapshot;
3791
+ mountPoint?: string;
3792
+ }
3793
+ interface ContainerSnapshot {
3794
+ id: string;
3795
+ size: number;
3796
+ name?: string;
3797
+ }
3798
+ interface ContainerSnapshotOptions {
3799
+ name?: string;
3772
3800
  }
3773
3801
  interface ContainerStartupOptions {
3774
3802
  entrypoint?: string[];
3775
3803
  enableInternet: boolean;
3776
3804
  env?: Record<string, string>;
3777
3805
  labels?: Record<string, string>;
3806
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3807
+ containerSnapshot?: ContainerSnapshot;
3778
3808
  }
3779
3809
  /**
3780
3810
  * 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.
@@ -13279,14 +13309,13 @@ interface StreamScopedCaptions {
13279
13309
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13280
13310
  * One caption or subtitle file per language is allowed.
13281
13311
  * @param language The BCP 47 language tag for the caption or subtitle.
13282
- * @param file The caption or subtitle file to upload.
13312
+ * @param input The caption or subtitle stream to upload.
13283
13313
  * @returns The created caption entry.
13284
13314
  * @throws {NotFoundError} if the video is not found
13285
13315
  * @throws {BadRequestError} if the language or file is invalid
13286
- * @throws {MaxFileSizeError} if the file size is too large
13287
13316
  * @throws {InternalError} if an unexpected error occurs
13288
13317
  */
13289
- upload(language: string, file: File): Promise<StreamCaption>;
13318
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13290
13319
  /**
13291
13320
  * Generate captions or subtitles for the provided language via AI.
13292
13321
  * @param language The BCP 47 language tag to generate.
@@ -13362,17 +13391,16 @@ interface StreamVideos {
13362
13391
  interface StreamWatermarks {
13363
13392
  /**
13364
13393
  * Generate a new watermark profile
13365
- * @param file The image file to upload
13394
+ * @param input The image stream to upload
13366
13395
  * @param params The watermark creation parameters.
13367
13396
  * @returns The created watermark profile.
13368
13397
  * @throws {BadRequestError} if the parameters are invalid
13369
13398
  * @throws {InvalidURLError} if the URL is invalid
13370
- * @throws {MaxFileSizeError} if the file size is too large
13371
13399
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13372
13400
  * @throws {InternalError} if an unexpected error occurs
13373
13401
  */
13374
13402
  generate(
13375
- file: File,
13403
+ input: ReadableStream,
13376
13404
  params: StreamWatermarkCreateParams,
13377
13405
  ): Promise<StreamWatermark>;
13378
13406
  /**
@@ -13382,7 +13410,6 @@ interface StreamWatermarks {
13382
13410
  * @returns The created watermark profile.
13383
13411
  * @throws {BadRequestError} if the parameters are invalid
13384
13412
  * @throws {InvalidURLError} if the URL is invalid
13385
- * @throws {MaxFileSizeError} if the file size is too large
13386
13413
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13387
13414
  * @throws {InternalError} if an unexpected error occurs
13388
13415
  */
@@ -3775,12 +3775,42 @@ export interface Container {
3775
3775
  setInactivityTimeout(durationMs: number | bigint): Promise<void>;
3776
3776
  interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
3777
3777
  interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
3778
+ snapshotDirectory(
3779
+ options: ContainerDirectorySnapshotOptions,
3780
+ ): Promise<ContainerDirectorySnapshot>;
3781
+ snapshotContainer(
3782
+ options: ContainerSnapshotOptions,
3783
+ ): Promise<ContainerSnapshot>;
3784
+ }
3785
+ export interface ContainerDirectorySnapshot {
3786
+ id: string;
3787
+ size: number;
3788
+ dir: string;
3789
+ name?: string;
3790
+ }
3791
+ export interface ContainerDirectorySnapshotOptions {
3792
+ dir: string;
3793
+ name?: string;
3794
+ }
3795
+ export interface ContainerDirectorySnapshotRestoreParams {
3796
+ snapshot: ContainerDirectorySnapshot;
3797
+ mountPoint?: string;
3798
+ }
3799
+ export interface ContainerSnapshot {
3800
+ id: string;
3801
+ size: number;
3802
+ name?: string;
3803
+ }
3804
+ export interface ContainerSnapshotOptions {
3805
+ name?: string;
3778
3806
  }
3779
3807
  export interface ContainerStartupOptions {
3780
3808
  entrypoint?: string[];
3781
3809
  enableInternet: boolean;
3782
3810
  env?: Record<string, string>;
3783
3811
  labels?: Record<string, string>;
3812
+ directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
3813
+ containerSnapshot?: ContainerSnapshot;
3784
3814
  }
3785
3815
  /**
3786
3816
  * 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.
@@ -13236,14 +13266,13 @@ export interface StreamScopedCaptions {
13236
13266
  * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
13237
13267
  * One caption or subtitle file per language is allowed.
13238
13268
  * @param language The BCP 47 language tag for the caption or subtitle.
13239
- * @param file The caption or subtitle file to upload.
13269
+ * @param input The caption or subtitle stream to upload.
13240
13270
  * @returns The created caption entry.
13241
13271
  * @throws {NotFoundError} if the video is not found
13242
13272
  * @throws {BadRequestError} if the language or file is invalid
13243
- * @throws {MaxFileSizeError} if the file size is too large
13244
13273
  * @throws {InternalError} if an unexpected error occurs
13245
13274
  */
13246
- upload(language: string, file: File): Promise<StreamCaption>;
13275
+ upload(language: string, input: ReadableStream): Promise<StreamCaption>;
13247
13276
  /**
13248
13277
  * Generate captions or subtitles for the provided language via AI.
13249
13278
  * @param language The BCP 47 language tag to generate.
@@ -13319,17 +13348,16 @@ export interface StreamVideos {
13319
13348
  export interface StreamWatermarks {
13320
13349
  /**
13321
13350
  * Generate a new watermark profile
13322
- * @param file The image file to upload
13351
+ * @param input The image stream to upload
13323
13352
  * @param params The watermark creation parameters.
13324
13353
  * @returns The created watermark profile.
13325
13354
  * @throws {BadRequestError} if the parameters are invalid
13326
13355
  * @throws {InvalidURLError} if the URL is invalid
13327
- * @throws {MaxFileSizeError} if the file size is too large
13328
13356
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13329
13357
  * @throws {InternalError} if an unexpected error occurs
13330
13358
  */
13331
13359
  generate(
13332
- file: File,
13360
+ input: ReadableStream,
13333
13361
  params: StreamWatermarkCreateParams,
13334
13362
  ): Promise<StreamWatermark>;
13335
13363
  /**
@@ -13339,7 +13367,6 @@ export interface StreamWatermarks {
13339
13367
  * @returns The created watermark profile.
13340
13368
  * @throws {BadRequestError} if the parameters are invalid
13341
13369
  * @throws {InvalidURLError} if the URL is invalid
13342
- * @throws {MaxFileSizeError} if the file size is too large
13343
13370
  * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
13344
13371
  * @throws {InternalError} if an unexpected error occurs
13345
13372
  */