@cloudflare/workers-types 4.20260312.1 → 4.20260313.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.
@@ -12023,6 +12023,767 @@ export interface SecretsStoreSecret {
12023
12023
  */
12024
12024
  get(): Promise<string>;
12025
12025
  }
12026
+ /**
12027
+ * Binding entrypoint for Cloudflare Stream.
12028
+ *
12029
+ * Usage:
12030
+ * - Binding-level operations:
12031
+ * `await env.STREAM.videos.upload`
12032
+ * `await env.STREAM.videos.createDirectUpload`
12033
+ * `await env.STREAM.videos.*`
12034
+ * `await env.STREAM.watermarks.*`
12035
+ * - Per-video operations:
12036
+ * `await env.STREAM.video(id).downloads.*`
12037
+ * `await env.STREAM.video(id).captions.*`
12038
+ *
12039
+ * Example usage:
12040
+ * ```ts
12041
+ * await env.STREAM.video(id).downloads.generate();
12042
+ *
12043
+ * const video = env.STREAM.video(id)
12044
+ * const captions = video.captions.list();
12045
+ * const videoDetails = video.details()
12046
+ * ```
12047
+ */
12048
+ export interface StreamBinding {
12049
+ /**
12050
+ * Returns a handle scoped to a single video for per-video operations.
12051
+ * @param id The unique identifier for the video.
12052
+ * @returns A handle for per-video operations.
12053
+ */
12054
+ video(id: string): StreamVideoHandle;
12055
+ /**
12056
+ * Uploads a new video from a File.
12057
+ * @param file The video file to upload.
12058
+ * @returns The uploaded video details.
12059
+ * @throws {BadRequestError} if the upload parameter is invalid
12060
+ * @throws {QuotaReachedError} if the account storage capacity is exceeded
12061
+ * @throws {MaxFileSizeError} if the file size is too large
12062
+ * @throws {RateLimitedError} if the server received too many requests
12063
+ * @throws {InternalError} if an unexpected error occurs
12064
+ */
12065
+ upload(file: File): Promise<StreamVideo>;
12066
+ /**
12067
+ * Uploads a new video from a provided URL.
12068
+ * @param url The URL to upload from.
12069
+ * @param params Optional upload parameters.
12070
+ * @returns The uploaded video details.
12071
+ * @throws {BadRequestError} if the upload parameter is invalid or the URL is invalid
12072
+ * @throws {QuotaReachedError} if the account storage capacity is exceeded
12073
+ * @throws {MaxFileSizeError} if the file size is too large
12074
+ * @throws {RateLimitedError} if the server received too many requests
12075
+ * @throws {AlreadyUploadedError} if a video was already uploaded to this URL
12076
+ * @throws {InternalError} if an unexpected error occurs
12077
+ */
12078
+ upload(url: string, params?: StreamUrlUploadParams): Promise<StreamVideo>;
12079
+ /**
12080
+ * Creates a direct upload that allows video uploads without an API key.
12081
+ * @param params Parameters for the direct upload
12082
+ * @returns The direct upload details.
12083
+ * @throws {BadRequestError} if the parameters are invalid
12084
+ * @throws {RateLimitedError} if the server received too many requests
12085
+ * @throws {InternalError} if an unexpected error occurs
12086
+ */
12087
+ createDirectUpload(
12088
+ params: StreamDirectUploadCreateParams,
12089
+ ): Promise<StreamDirectUpload>;
12090
+ videos: StreamVideos;
12091
+ watermarks: StreamWatermarks;
12092
+ }
12093
+ /**
12094
+ * Handle for operations scoped to a single Stream video.
12095
+ */
12096
+ export interface StreamVideoHandle {
12097
+ /**
12098
+ * The unique identifier for the video.
12099
+ */
12100
+ id: string;
12101
+ /**
12102
+ * Get a full videos details
12103
+ * @returns The full video details.
12104
+ * @throws {NotFoundError} if the video is not found
12105
+ * @throws {InternalError} if an unexpected error occurs
12106
+ */
12107
+ details(): Promise<StreamVideo>;
12108
+ /**
12109
+ * Update details for a single video.
12110
+ * @param params The fields to update for the video.
12111
+ * @returns The updated video details.
12112
+ * @throws {NotFoundError} if the video is not found
12113
+ * @throws {BadRequestError} if the parameters are invalid
12114
+ * @throws {InternalError} if an unexpected error occurs
12115
+ */
12116
+ update(params: StreamUpdateVideoParams): Promise<StreamVideo>;
12117
+ /**
12118
+ * Deletes a video and its copies from Cloudflare Stream.
12119
+ * @returns A promise that resolves when deletion completes.
12120
+ * @throws {NotFoundError} if the video is not found
12121
+ * @throws {InternalError} if an unexpected error occurs
12122
+ */
12123
+ delete(): Promise<void>;
12124
+ /**
12125
+ * Creates a signed URL token for a video.
12126
+ * @returns The signed token that was created.
12127
+ * @throws {InternalError} if the signing key cannot be retrieved or the token cannot be signed
12128
+ */
12129
+ generateToken(): Promise<string>;
12130
+ downloads: StreamScopedDownloads;
12131
+ captions: StreamScopedCaptions;
12132
+ }
12133
+ export interface StreamVideo {
12134
+ /**
12135
+ * The unique identifier for the video.
12136
+ */
12137
+ id: string;
12138
+ /**
12139
+ * A user-defined identifier for the media creator.
12140
+ */
12141
+ creator: string | null;
12142
+ /**
12143
+ * The thumbnail URL for the video.
12144
+ */
12145
+ thumbnail: string;
12146
+ /**
12147
+ * The thumbnail timestamp percentage.
12148
+ */
12149
+ thumbnailTimestampPct: number;
12150
+ /**
12151
+ * Indicates whether the video is ready to stream.
12152
+ */
12153
+ readyToStream: boolean;
12154
+ /**
12155
+ * The date and time the video became ready to stream.
12156
+ */
12157
+ readyToStreamAt: string | null;
12158
+ /**
12159
+ * Processing status information.
12160
+ */
12161
+ status: StreamVideoStatus;
12162
+ /**
12163
+ * A user modifiable key-value store.
12164
+ */
12165
+ meta: Record<string, string>;
12166
+ /**
12167
+ * The date and time the video was created.
12168
+ */
12169
+ created: string;
12170
+ /**
12171
+ * The date and time the video was last modified.
12172
+ */
12173
+ modified: string;
12174
+ /**
12175
+ * The date and time at which the video will be deleted.
12176
+ */
12177
+ scheduledDeletion: string | null;
12178
+ /**
12179
+ * The size of the video in bytes.
12180
+ */
12181
+ size: number;
12182
+ /**
12183
+ * The preview URL for the video.
12184
+ */
12185
+ preview?: string;
12186
+ /**
12187
+ * Origins allowed to display the video.
12188
+ */
12189
+ allowedOrigins: Array<string>;
12190
+ /**
12191
+ * Indicates whether signed URLs are required.
12192
+ */
12193
+ requireSignedURLs: boolean | null;
12194
+ /**
12195
+ * The date and time the video was uploaded.
12196
+ */
12197
+ uploaded: string | null;
12198
+ /**
12199
+ * The date and time when the upload URL expires.
12200
+ */
12201
+ uploadExpiry: string | null;
12202
+ /**
12203
+ * The maximum size in bytes for direct uploads.
12204
+ */
12205
+ maxSizeBytes: number | null;
12206
+ /**
12207
+ * The maximum duration in seconds for direct uploads.
12208
+ */
12209
+ maxDurationSeconds: number | null;
12210
+ /**
12211
+ * The video duration in seconds. -1 indicates unknown.
12212
+ */
12213
+ duration: number;
12214
+ /**
12215
+ * Input metadata for the original upload.
12216
+ */
12217
+ input: StreamVideoInput;
12218
+ /**
12219
+ * Playback URLs for the video.
12220
+ */
12221
+ hlsPlaybackUrl: string;
12222
+ dashPlaybackUrl: string;
12223
+ /**
12224
+ * The watermark applied to the video, if any.
12225
+ */
12226
+ watermark: StreamWatermark | null;
12227
+ /**
12228
+ * The live input id associated with the video, if any.
12229
+ */
12230
+ liveInputId?: string | null;
12231
+ /**
12232
+ * The source video id if this is a clip.
12233
+ */
12234
+ clippedFromId: string | null;
12235
+ /**
12236
+ * Public details associated with the video.
12237
+ */
12238
+ publicDetails: StreamPublicDetails | null;
12239
+ }
12240
+ export type StreamVideoStatus = {
12241
+ /**
12242
+ * The current processing state.
12243
+ */
12244
+ state: string;
12245
+ /**
12246
+ * The current processing step.
12247
+ */
12248
+ step?: string;
12249
+ /**
12250
+ * The percent complete as a string.
12251
+ */
12252
+ pctComplete?: string;
12253
+ /**
12254
+ * An error reason code, if applicable.
12255
+ */
12256
+ errorReasonCode: string;
12257
+ /**
12258
+ * An error reason text, if applicable.
12259
+ */
12260
+ errorReasonText: string;
12261
+ };
12262
+ export type StreamVideoInput = {
12263
+ /**
12264
+ * The input width in pixels.
12265
+ */
12266
+ width: number;
12267
+ /**
12268
+ * The input height in pixels.
12269
+ */
12270
+ height: number;
12271
+ };
12272
+ export type StreamPublicDetails = {
12273
+ /**
12274
+ * The public title for the video.
12275
+ */
12276
+ title: string | null;
12277
+ /**
12278
+ * The public share link.
12279
+ */
12280
+ share_link: string | null;
12281
+ /**
12282
+ * The public channel link.
12283
+ */
12284
+ channel_link: string | null;
12285
+ /**
12286
+ * The public logo URL.
12287
+ */
12288
+ logo: string | null;
12289
+ };
12290
+ export type StreamDirectUpload = {
12291
+ /**
12292
+ * The URL an unauthenticated upload can use for a single multipart request.
12293
+ */
12294
+ uploadURL: string;
12295
+ /**
12296
+ * A Cloudflare-generated unique identifier for a media item.
12297
+ */
12298
+ id: string;
12299
+ /**
12300
+ * The watermark profile applied to the upload.
12301
+ */
12302
+ watermark: StreamWatermark | null;
12303
+ /**
12304
+ * The scheduled deletion time, if any.
12305
+ */
12306
+ scheduledDeletion: string | null;
12307
+ };
12308
+ export type StreamDirectUploadCreateParams = {
12309
+ /**
12310
+ * The maximum duration in seconds for a video upload.
12311
+ */
12312
+ maxDurationSeconds: number;
12313
+ /**
12314
+ * The date and time after upload when videos will not be accepted.
12315
+ */
12316
+ expiry?: string;
12317
+ /**
12318
+ * A user-defined identifier for the media creator.
12319
+ */
12320
+ creator?: string;
12321
+ /**
12322
+ * A user modifiable key-value store used to reference other systems of record for
12323
+ * managing videos.
12324
+ */
12325
+ meta?: Record<string, string>;
12326
+ /**
12327
+ * Lists the origins allowed to display the video.
12328
+ */
12329
+ allowedOrigins?: Array<string>;
12330
+ /**
12331
+ * Indicates whether the video can be accessed using the id. When set to `true`,
12332
+ * a signed token must be generated with a signing key to view the video.
12333
+ */
12334
+ requireSignedURLs?: boolean;
12335
+ /**
12336
+ * The thumbnail timestamp percentage.
12337
+ */
12338
+ thumbnailTimestampPct?: number;
12339
+ /**
12340
+ * The date and time at which the video will be deleted. Include `null` to remove
12341
+ * a scheduled deletion.
12342
+ */
12343
+ scheduledDeletion?: string | null;
12344
+ /**
12345
+ * The watermark profile to apply.
12346
+ */
12347
+ watermark?: StreamDirectUploadWatermark;
12348
+ };
12349
+ export type StreamDirectUploadWatermark = {
12350
+ /**
12351
+ * The unique identifier for the watermark profile.
12352
+ */
12353
+ id: string;
12354
+ };
12355
+ export type StreamUrlUploadParams = {
12356
+ /**
12357
+ * Lists the origins allowed to display the video. Enter allowed origin
12358
+ * domains in an array and use `*` for wildcard subdomains. Empty arrays allow the
12359
+ * video to be viewed on any origin.
12360
+ */
12361
+ allowedOrigins?: Array<string>;
12362
+ /**
12363
+ * A user-defined identifier for the media creator.
12364
+ */
12365
+ creator?: string;
12366
+ /**
12367
+ * A user modifiable key-value store used to reference other systems of
12368
+ * record for managing videos.
12369
+ */
12370
+ meta?: Record<string, string>;
12371
+ /**
12372
+ * Indicates whether the video can be a accessed using the id. When
12373
+ * set to `true`, a signed token must be generated with a signing key to view the
12374
+ * video.
12375
+ */
12376
+ requireSignedURLs?: boolean;
12377
+ /**
12378
+ * Indicates the date and time at which the video will be deleted. Omit
12379
+ * the field to indicate no change, or include with a `null` value to remove an
12380
+ * existing scheduled deletion. If specified, must be at least 30 days from upload
12381
+ * time.
12382
+ */
12383
+ scheduledDeletion?: string | null;
12384
+ /**
12385
+ * The timestamp for a thumbnail image calculated as a percentage value
12386
+ * of the video's duration. To convert from a second-wise timestamp to a
12387
+ * percentage, divide the desired timestamp by the total duration of the video. If
12388
+ * this value is not set, the default thumbnail image is taken from 0s of the
12389
+ * video.
12390
+ */
12391
+ thumbnailTimestampPct?: number;
12392
+ /**
12393
+ * The identifier for the watermark profile
12394
+ */
12395
+ watermarkId?: string;
12396
+ };
12397
+ export interface StreamScopedCaptions {
12398
+ /**
12399
+ * Uploads the caption or subtitle file to the endpoint for a specific BCP47 language.
12400
+ * One caption or subtitle file per language is allowed.
12401
+ * @param language The BCP 47 language tag for the caption or subtitle.
12402
+ * @param file The caption or subtitle file to upload.
12403
+ * @returns The created caption entry.
12404
+ * @throws {NotFoundError} if the video is not found
12405
+ * @throws {BadRequestError} if the language or file is invalid
12406
+ * @throws {MaxFileSizeError} if the file size is too large
12407
+ * @throws {InternalError} if an unexpected error occurs
12408
+ */
12409
+ upload(language: string, file: File): Promise<StreamCaption>;
12410
+ /**
12411
+ * Generate captions or subtitles for the provided language via AI.
12412
+ * @param language The BCP 47 language tag to generate.
12413
+ * @returns The generated caption entry.
12414
+ * @throws {NotFoundError} if the video is not found
12415
+ * @throws {BadRequestError} if the language is invalid
12416
+ * @throws {StreamError} if a generated caption already exists
12417
+ * @throws {StreamError} if the video duration is too long
12418
+ * @throws {StreamError} if the video is missing audio
12419
+ * @throws {StreamError} if the requested language is not supported
12420
+ * @throws {InternalError} if an unexpected error occurs
12421
+ */
12422
+ generate(language: string): Promise<StreamCaption>;
12423
+ /**
12424
+ * Lists the captions or subtitles.
12425
+ * Use the language parameter to filter by a specific language.
12426
+ * @param language The optional BCP 47 language tag to filter by.
12427
+ * @returns The list of captions or subtitles.
12428
+ * @throws {NotFoundError} if the video or caption is not found
12429
+ * @throws {InternalError} if an unexpected error occurs
12430
+ */
12431
+ list(language?: string): Promise<StreamCaption[]>;
12432
+ /**
12433
+ * Removes the captions or subtitles from a video.
12434
+ * @param language The BCP 47 language tag to remove.
12435
+ * @returns A promise that resolves when deletion completes.
12436
+ * @throws {NotFoundError} if the video or caption is not found
12437
+ * @throws {InternalError} if an unexpected error occurs
12438
+ */
12439
+ delete(language: string): Promise<void>;
12440
+ }
12441
+ export interface StreamScopedDownloads {
12442
+ /**
12443
+ * Generates a download for a video when a video is ready to view. Available
12444
+ * types are `default` and `audio`. Defaults to `default` when omitted.
12445
+ * @param downloadType The download type to create.
12446
+ * @returns The current downloads for the video.
12447
+ * @throws {NotFoundError} if the video is not found
12448
+ * @throws {BadRequestError} if the download type is invalid
12449
+ * @throws {StreamError} if the video duration is too long to generate a download
12450
+ * @throws {StreamError} if the video is not ready to stream
12451
+ * @throws {InternalError} if an unexpected error occurs
12452
+ */
12453
+ generate(
12454
+ downloadType?: StreamDownloadType,
12455
+ ): Promise<StreamDownloadGetResponse>;
12456
+ /**
12457
+ * Lists the downloads created for a video.
12458
+ * @returns The current downloads for the video.
12459
+ * @throws {NotFoundError} if the video or downloads are not found
12460
+ * @throws {InternalError} if an unexpected error occurs
12461
+ */
12462
+ get(): Promise<StreamDownloadGetResponse>;
12463
+ /**
12464
+ * Delete the downloads for a video. Available types are `default` and `audio`.
12465
+ * Defaults to `default` when omitted.
12466
+ * @param downloadType The download type to delete.
12467
+ * @returns A promise that resolves when deletion completes.
12468
+ * @throws {NotFoundError} if the video or downloads are not found
12469
+ * @throws {InternalError} if an unexpected error occurs
12470
+ */
12471
+ delete(downloadType?: StreamDownloadType): Promise<void>;
12472
+ }
12473
+ export interface StreamVideos {
12474
+ /**
12475
+ * Lists all videos in a users account.
12476
+ * @returns The list of videos.
12477
+ * @throws {BadRequestError} if the parameters are invalid
12478
+ * @throws {InternalError} if an unexpected error occurs
12479
+ */
12480
+ list(params?: StreamVideosListParams): Promise<StreamVideo[]>;
12481
+ }
12482
+ export interface StreamWatermarks {
12483
+ /**
12484
+ * Generate a new watermark profile
12485
+ * @param file The image file to upload
12486
+ * @param params The watermark creation parameters.
12487
+ * @returns The created watermark profile.
12488
+ * @throws {BadRequestError} if the parameters are invalid
12489
+ * @throws {InvalidURLError} if the URL is invalid
12490
+ * @throws {MaxFileSizeError} if the file size is too large
12491
+ * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
12492
+ * @throws {InternalError} if an unexpected error occurs
12493
+ */
12494
+ generate(
12495
+ file: File,
12496
+ params: StreamWatermarkCreateParams,
12497
+ ): Promise<StreamWatermark>;
12498
+ /**
12499
+ * Generate a new watermark profile
12500
+ * @param url The image url to upload
12501
+ * @param params The watermark creation parameters.
12502
+ * @returns The created watermark profile.
12503
+ * @throws {BadRequestError} if the parameters are invalid
12504
+ * @throws {InvalidURLError} if the URL is invalid
12505
+ * @throws {MaxFileSizeError} if the file size is too large
12506
+ * @throws {TooManyWatermarksError} if the number of allowed watermarks is reached
12507
+ * @throws {InternalError} if an unexpected error occurs
12508
+ */
12509
+ generate(
12510
+ url: string,
12511
+ params: StreamWatermarkCreateParams,
12512
+ ): Promise<StreamWatermark>;
12513
+ /**
12514
+ * Lists all watermark profiles for an account.
12515
+ * @returns The list of watermark profiles.
12516
+ * @throws {InternalError} if an unexpected error occurs
12517
+ */
12518
+ list(): Promise<StreamWatermark[]>;
12519
+ /**
12520
+ * Retrieves details for a single watermark profile.
12521
+ * @param watermarkId The watermark profile identifier.
12522
+ * @returns The watermark profile details.
12523
+ * @throws {NotFoundError} if the watermark is not found
12524
+ * @throws {InternalError} if an unexpected error occurs
12525
+ */
12526
+ get(watermarkId: string): Promise<StreamWatermark>;
12527
+ /**
12528
+ * Deletes a watermark profile.
12529
+ * @param watermarkId The watermark profile identifier.
12530
+ * @returns A promise that resolves when deletion completes.
12531
+ * @throws {NotFoundError} if the watermark is not found
12532
+ * @throws {InternalError} if an unexpected error occurs
12533
+ */
12534
+ delete(watermarkId: string): Promise<void>;
12535
+ }
12536
+ export type StreamUpdateVideoParams = {
12537
+ /**
12538
+ * Lists the origins allowed to display the video. Enter allowed origin
12539
+ * domains in an array and use `*` for wildcard subdomains. Empty arrays allow the
12540
+ * video to be viewed on any origin.
12541
+ */
12542
+ allowedOrigins?: Array<string>;
12543
+ /**
12544
+ * A user-defined identifier for the media creator.
12545
+ */
12546
+ creator?: string;
12547
+ /**
12548
+ * The maximum duration in seconds for a video upload. Can be set for a
12549
+ * video that is not yet uploaded to limit its duration. Uploads that exceed the
12550
+ * specified duration will fail during processing. A value of `-1` means the value
12551
+ * is unknown.
12552
+ */
12553
+ maxDurationSeconds?: number;
12554
+ /**
12555
+ * A user modifiable key-value store used to reference other systems of
12556
+ * record for managing videos.
12557
+ */
12558
+ meta?: Record<string, string>;
12559
+ /**
12560
+ * Indicates whether the video can be a accessed using the id. When
12561
+ * set to `true`, a signed token must be generated with a signing key to view the
12562
+ * video.
12563
+ */
12564
+ requireSignedURLs?: boolean;
12565
+ /**
12566
+ * Indicates the date and time at which the video will be deleted. Omit
12567
+ * the field to indicate no change, or include with a `null` value to remove an
12568
+ * existing scheduled deletion. If specified, must be at least 30 days from upload
12569
+ * time.
12570
+ */
12571
+ scheduledDeletion?: string | null;
12572
+ /**
12573
+ * The timestamp for a thumbnail image calculated as a percentage value
12574
+ * of the video's duration. To convert from a second-wise timestamp to a
12575
+ * percentage, divide the desired timestamp by the total duration of the video. If
12576
+ * this value is not set, the default thumbnail image is taken from 0s of the
12577
+ * video.
12578
+ */
12579
+ thumbnailTimestampPct?: number;
12580
+ };
12581
+ export type StreamCaption = {
12582
+ /**
12583
+ * Whether the caption was generated via AI.
12584
+ */
12585
+ generated?: boolean;
12586
+ /**
12587
+ * The language label displayed in the native language to users.
12588
+ */
12589
+ label: string;
12590
+ /**
12591
+ * The language tag in BCP 47 format.
12592
+ */
12593
+ language: string;
12594
+ /**
12595
+ * The status of a generated caption.
12596
+ */
12597
+ status?: "ready" | "inprogress" | "error";
12598
+ };
12599
+ export type StreamDownloadStatus = "ready" | "inprogress" | "error";
12600
+ export type StreamDownloadType = "default" | "audio";
12601
+ export type StreamDownload = {
12602
+ /**
12603
+ * Indicates the progress as a percentage between 0 and 100.
12604
+ */
12605
+ percentComplete: number;
12606
+ /**
12607
+ * The status of a generated download.
12608
+ */
12609
+ status: StreamDownloadStatus;
12610
+ /**
12611
+ * The URL to access the generated download.
12612
+ */
12613
+ url?: string;
12614
+ };
12615
+ /**
12616
+ * An object with download type keys. Each key is optional and only present if that
12617
+ * download type has been created.
12618
+ */
12619
+ export type StreamDownloadGetResponse = {
12620
+ /**
12621
+ * The audio-only download. Only present if this download type has been created.
12622
+ */
12623
+ audio?: StreamDownload;
12624
+ /**
12625
+ * The default video download. Only present if this download type has been created.
12626
+ */
12627
+ default?: StreamDownload;
12628
+ };
12629
+ export type StreamWatermarkPosition =
12630
+ | "upperRight"
12631
+ | "upperLeft"
12632
+ | "lowerLeft"
12633
+ | "lowerRight"
12634
+ | "center";
12635
+ export type StreamWatermark = {
12636
+ /**
12637
+ * The unique identifier for a watermark profile.
12638
+ */
12639
+ id: string;
12640
+ /**
12641
+ * The size of the image in bytes.
12642
+ */
12643
+ size: number;
12644
+ /**
12645
+ * The height of the image in pixels.
12646
+ */
12647
+ height: number;
12648
+ /**
12649
+ * The width of the image in pixels.
12650
+ */
12651
+ width: number;
12652
+ /**
12653
+ * The date and a time a watermark profile was created.
12654
+ */
12655
+ created: string;
12656
+ /**
12657
+ * The source URL for a downloaded image. If the watermark profile was created via
12658
+ * direct upload, this field is null.
12659
+ */
12660
+ downloadedFrom: string | null;
12661
+ /**
12662
+ * A short description of the watermark profile.
12663
+ */
12664
+ name: string;
12665
+ /**
12666
+ * The translucency of the image. A value of `0.0` makes the image completely
12667
+ * transparent, and `1.0` makes the image completely opaque. Note that if the image
12668
+ * is already semi-transparent, setting this to `1.0` will not make the image
12669
+ * completely opaque.
12670
+ */
12671
+ opacity: number;
12672
+ /**
12673
+ * The whitespace between the adjacent edges (determined by position) of the video
12674
+ * and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded
12675
+ * video width or length, as determined by the algorithm.
12676
+ */
12677
+ padding: number;
12678
+ /**
12679
+ * The size of the image relative to the overall size of the video. This parameter
12680
+ * will adapt to horizontal and vertical videos automatically. `0.0` indicates no
12681
+ * scaling (use the size of the image as-is), and `1.0 `fills the entire video.
12682
+ */
12683
+ scale: number;
12684
+ /**
12685
+ * The location of the image. Valid positions are: `upperRight`, `upperLeft`,
12686
+ * `lowerLeft`, `lowerRight`, and `center`. Note that `center` ignores the
12687
+ * `padding` parameter.
12688
+ */
12689
+ position: StreamWatermarkPosition;
12690
+ };
12691
+ export type StreamWatermarkCreateParams = {
12692
+ /**
12693
+ * A short description of the watermark profile.
12694
+ */
12695
+ name?: string;
12696
+ /**
12697
+ * The translucency of the image. A value of `0.0` makes the image completely
12698
+ * transparent, and `1.0` makes the image completely opaque. Note that if the
12699
+ * image is already semi-transparent, setting this to `1.0` will not make the
12700
+ * image completely opaque.
12701
+ */
12702
+ opacity?: number;
12703
+ /**
12704
+ * The whitespace between the adjacent edges (determined by position) of the
12705
+ * video and the image. `0.0` indicates no padding, and `1.0` indicates a fully
12706
+ * padded video width or length, as determined by the algorithm.
12707
+ */
12708
+ padding?: number;
12709
+ /**
12710
+ * The size of the image relative to the overall size of the video. This
12711
+ * parameter will adapt to horizontal and vertical videos automatically. `0.0`
12712
+ * indicates no scaling (use the size of the image as-is), and `1.0 `fills the
12713
+ * entire video.
12714
+ */
12715
+ scale?: number;
12716
+ /**
12717
+ * The location of the image.
12718
+ */
12719
+ position?: StreamWatermarkPosition;
12720
+ };
12721
+ export type StreamVideosListParams = {
12722
+ /**
12723
+ * The maximum number of videos to return.
12724
+ */
12725
+ limit?: number;
12726
+ /**
12727
+ * Return videos created before this timestamp.
12728
+ * (RFC3339/RFC3339Nano)
12729
+ */
12730
+ before?: string;
12731
+ /**
12732
+ * Comparison operator for the `before` field.
12733
+ * @default 'lt'
12734
+ */
12735
+ beforeComp?: StreamPaginationComparison;
12736
+ /**
12737
+ * Return videos created after this timestamp.
12738
+ * (RFC3339/RFC3339Nano)
12739
+ */
12740
+ after?: string;
12741
+ /**
12742
+ * Comparison operator for the `after` field.
12743
+ * @default 'gte'
12744
+ */
12745
+ afterComp?: StreamPaginationComparison;
12746
+ };
12747
+ export type StreamPaginationComparison = "eq" | "gt" | "gte" | "lt" | "lte";
12748
+ /**
12749
+ * Error object for Stream binding operations.
12750
+ */
12751
+ export interface StreamError extends Error {
12752
+ readonly code: number;
12753
+ readonly statusCode: number;
12754
+ readonly message: string;
12755
+ readonly stack?: string;
12756
+ }
12757
+ export interface InternalError extends StreamError {
12758
+ name: "InternalError";
12759
+ }
12760
+ export interface BadRequestError extends StreamError {
12761
+ name: "BadRequestError";
12762
+ }
12763
+ export interface NotFoundError extends StreamError {
12764
+ name: "NotFoundError";
12765
+ }
12766
+ export interface ForbiddenError extends StreamError {
12767
+ name: "ForbiddenError";
12768
+ }
12769
+ export interface RateLimitedError extends StreamError {
12770
+ name: "RateLimitedError";
12771
+ }
12772
+ export interface QuotaReachedError extends StreamError {
12773
+ name: "QuotaReachedError";
12774
+ }
12775
+ export interface MaxFileSizeError extends StreamError {
12776
+ name: "MaxFileSizeError";
12777
+ }
12778
+ export interface InvalidURLError extends StreamError {
12779
+ name: "InvalidURLError";
12780
+ }
12781
+ export interface AlreadyUploadedError extends StreamError {
12782
+ name: "AlreadyUploadedError";
12783
+ }
12784
+ export interface TooManyWatermarksError extends StreamError {
12785
+ name: "TooManyWatermarksError";
12786
+ }
12026
12787
  export type MarkdownDocument = {
12027
12788
  name: string;
12028
12789
  blob: Blob;