// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit. import * as S from "@distilled.cloud/core/schema"; import * as API from "@distilled.cloud/core/api"; import * as T from "../traits.ts"; import { CloudflareProtocol, CloudflarePaginatedProtocol, type CloudflareOpError, type CloudflareOpContext, } from "../protocol.ts"; import { cloudflarePaginate, ResultInfo } from "../pagination.ts"; import { CloudflareError, CloudflareRateLimited } from "../errors.ts"; import * as Retry from "../retry.ts"; export type { CloudflareOpError, CloudflareOpContext }; /** Fallback camelCase→wire mapping for opaque content (mined from the distilled SDK). */ const KEY_DICTIONARY: Record> = { channelLink: "channel_link", keyId: "key_id", mediaId: "media_id", shareLink: "share_link", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class LiveInputNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("LiveInputNotFound", { code: S.Number, message: S.String, }), [{ code: 10003 }], ) {} export class OutputNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("OutputNotFound", { code: S.Number, message: S.String, }), [{ code: 10003 }], ) {} export class SigningKeyNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("SigningKeyNotFound", { code: S.Number, message: S.String, }), [{ code: 10003 }], ) {} export class WatermarkImageInvalid extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "WatermarkImageInvalid", { code: S.Number, message: S.String, }, ), [{ code: 10004 }], ) {} export class WatermarkNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("WatermarkNotFound", { code: S.Number, message: S.String, }), [{ code: 10003 }], ) {} export class WebhookNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("WebhookNotFound", { code: S.Number, message: S.String, }), [{ code: 10003 }], ) {} export interface CopyAudioTrackRequest { /** The account identifier tag. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; /** A string to uniquely identify the track amongst other audio track labels for the specified video. */ label: string; /** An audio track URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file. */ url?: string; } export const CopyAudioTrackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), label: S.String, url: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/{identifier}/audio/copy", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CopyAudioTrackRequest", }) as any as S.Schema; export type AudioTracksCopyResponseStatus = "queued" | "ready" | "error"; export const AudioTracksCopyResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CopyAudioTrackResponse { /** Denotes whether the audio track will be played by default in a player. */ default?: boolean | null; /** A string to uniquely identify the track amongst other audio track labels for the specified video. */ label?: string | null; /** Specifies the processing status of the video. */ status?: AudioTracksCopyResponseStatus | null; /** A Cloudflare-generated unique identifier for a media item. */ uid?: string | null; } export const CopyAudioTrackResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional(S.NullOr(S.Boolean)), label: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(AudioTracksCopyResponseStatus)), uid: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CopyAudioTrackResponse", }) as any as S.Schema; export interface CreateCaptionLanguageRequest { /** Identifier. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; /** The language tag in BCP 47 format. */ language: string; } export const CreateCaptionLanguageRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), language: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/{identifier}/captions/{language}/generate", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCaptionLanguageRequest", }) as any as S.Schema; export type CaptionsLanguageCreateResponseStatus = | "ready" | "inprogress" | "error"; export const CaptionsLanguageCreateResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateCaptionLanguageResponse { /** Whether the caption was generated via AI. */ generated?: boolean | null; /** The language label displayed in the native language to users. */ label?: string | null; /** The language tag in BCP 47 format. */ language?: string | null; /** The status of a generated caption. */ status?: CaptionsLanguageCreateResponseStatus | null; } export const CreateCaptionLanguageResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ generated: S.optional(S.NullOr(S.Boolean)), label: S.optional(S.NullOr(S.String)), language: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(CaptionsLanguageCreateResponseStatus)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCaptionLanguageResponse", }) as any as S.Schema; export type ClipCreateRequestAllowedOriginsList = Array; export const ClipCreateRequestAllowedOriginsList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export interface ClipCreateRequestWatermark { /** The unique identifier for the watermark profile. */ uid?: string; } export const ClipCreateRequestWatermark = /*@__PURE__*/ S.suspend(() => S.Struct({ uid: S.optional(S.String), }), ).annotate({ identifier: "ClipCreateRequestWatermark", }) as any as S.Schema; export interface CreateClipRequest { /** The account identifier tag. */ accountId: string; /** The unique video identifier (UID). */ clippedFromVideoUID: string; /** Specifies the end time for the video clip in seconds. */ endTimeSeconds: number; /** Specifies the start time for the video clip in seconds. */ startTimeSeconds: number; /** Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin. */ allowedOrigins?: ClipCreateRequestAllowedOriginsList; /** A user-defined identifier for the media creator. */ creator?: string; /** A video's URL. Preferred over 'url'. */ input?: string; /** A user modifiable key-value store used to reference other systems of record for managing videos. */ meta?: unknown; /** A name for the video. */ name?: string; /** Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video. */ requireSignedURLs?: boolean; /** Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time. */ scheduledDeletion?: string; /** The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video. */ thumbnailTimestampPct?: number; /** A video's URL (legacy field, use 'input' instead). */ url?: string; watermark?: ClipCreateRequestWatermark; } export const CreateClipRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), clippedFromVideoUID: S.String, endTimeSeconds: S.Number, startTimeSeconds: S.Number, allowedOrigins: S.optional(ClipCreateRequestAllowedOriginsList), creator: S.optional(S.String), input: S.optional(S.String), meta: S.optional(S.Unknown), name: S.optional(S.String), requireSignedURLs: S.optional(S.Boolean), scheduledDeletion: S.optional(S.String), thumbnailTimestampPct: S.optional(S.Number), url: S.optional(S.String), watermark: S.optional(ClipCreateRequestWatermark), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/clip", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateClipRequest", }) as any as S.Schema; export type ClipCreateResponseAllowedOriginsList = Array; export const ClipCreateResponseAllowedOriginsList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export interface ClipCreateResponseInput { /** The video height in pixels. A value of `-1` means the height is unknown. The value becomes available after the upload and before the video is ready. */ height?: number | null; /** The video width in pixels. A value of `-1` means the width is unknown. The value becomes available after the upload and before the video is ready. */ width?: number | null; } export const ClipCreateResponseInput = /*@__PURE__*/ S.suspend(() => S.Struct({ height: S.optional(S.NullOr(S.Number)), width: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "ClipCreateResponseInput", }) as any as S.Schema; export interface ClipCreateResponsePlayback { /** DASH Media Presentation Description for the video. */ dash?: string | null; /** The HLS manifest for the video. */ hls?: string | null; } export const ClipCreateResponsePlayback = /*@__PURE__*/ S.suspend(() => S.Struct({ dash: S.optional(S.NullOr(S.String)), hls: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ClipCreateResponsePlayback", }) as any as S.Schema; export interface ClipCreateResponsePublicDetails { channelLink?: string | null; logo?: string | null; mediaId?: number | null; shareLink?: string | null; title?: string | null; } export const ClipCreateResponsePublicDetails = /*@__PURE__*/ S.suspend(() => S.Struct({ channelLink: S.optional(S.NullOr(S.String).pipe(T.Body("channel_link"))), logo: S.optional(S.NullOr(S.String)), mediaId: S.optional(S.NullOr(S.Number).pipe(T.Body("media_id"))), shareLink: S.optional(S.NullOr(S.String).pipe(T.Body("share_link"))), title: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "ClipCreateResponsePublicDetails", }) as any as S.Schema; export type ClipCreateResponseStatusState = | "pendingupload" | "downloading" | "queued" | "inprogress" | "ready" | "error" | "live-inprogress"; export const ClipCreateResponseStatusState = /*@__PURE__*/ S.String; export interface ClipCreateResponseStatus { /** Specifies why the video failed to encode. This field is empty if the video is not in an `error` state. Preferred for programmatic use. */ errorReasonCode?: string | null; /** Specifies why the video failed to encode using a human readable error message in English. This field is empty if the video is not in an `error` state. */ errorReasonText?: string | null; /** Indicates the progress as a percentage between 0 and 100. */ pctComplete?: string | null; /** Specifies the processing status for all quality levels for a video. */ state?: ClipCreateResponseStatusState | null; } export const ClipCreateResponseStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ errorReasonCode: S.optional(S.NullOr(S.String)), errorReasonText: S.optional(S.NullOr(S.String)), pctComplete: S.optional(S.NullOr(S.String)), state: S.optional(S.NullOr(ClipCreateResponseStatusState)), }), ).annotate({ identifier: "ClipCreateResponseStatus", }) as any as S.Schema; export interface ClipCreateResponseWatermark { /** The date and a time a watermark profile was created. */ created?: string | null; /** The source URL for a downloaded image. If the watermark profile was created via direct upload, this field is null. */ downloadedFrom?: string | null; /** The height of the image in pixels. */ height?: number | null; /** A short description of the watermark profile. */ name?: string | null; /** The translucency of the image. A value of `0.0` makes the image completely transparent, and `1.0` makes the image completely opaque. Note that if the image is already semi-transparent, setting this to `1.0` will not make the image completely opaque. */ opacity?: number | null; /** The whitespace between the adjacent edges (determined by position) of the video and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded video width or length, as determined by the algorithm. */ padding?: number | null; /** The location of the image. Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and `center`. Note that `center` ignores the `padding` parameter. */ position?: string | null; /** The size of the image relative to the overall size of the video. This parameter will adapt to horizontal and vertical videos automatically. `0.0` indicates no scaling (use the size of the image as-is), and `1.0`fills the entire video. */ scale?: number | null; /** The size of the image in bytes. */ size?: number | null; /** The unique identifier for a watermark profile. */ uid?: string | null; /** The width of the image in pixels. */ width?: number | null; } export const ClipCreateResponseWatermark = /*@__PURE__*/ S.suspend(() => S.Struct({ created: S.optional(S.NullOr(S.String)), downloadedFrom: S.optional(S.NullOr(S.String)), height: S.optional(S.NullOr(S.Number)), name: S.optional(S.NullOr(S.String)), opacity: S.optional(S.NullOr(S.Number)), padding: S.optional(S.NullOr(S.Number)), position: S.optional(S.NullOr(S.String)), scale: S.optional(S.NullOr(S.Number)), size: S.optional(S.NullOr(S.Number)), uid: S.optional(S.NullOr(S.String)), width: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "ClipCreateResponseWatermark", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateClipResponse { /** Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin. */ allowedOrigins?: ClipCreateResponseAllowedOriginsList | null; /** The unique identifier of the source video this video was clipped from. */ clippedFrom?: string | null; /** The date and time the media item was created. */ created?: string | null; /** A user-defined identifier for the media creator. */ creator?: string | null; /** The duration of the video in seconds. A value of `-1` means the duration is unknown. The duration becomes available after the upload and before the video is ready. */ duration?: number | null; input?: ClipCreateResponseInput | null; /** The live input ID used to upload a video with Stream Live. */ liveInput?: string | null; /** The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of `-1` means the value is unknown. */ maxDurationSeconds?: number | null; /** The maximum size in bytes for the video upload. */ maxSizeBytes?: number | null; /** A user modifiable key-value store used to reference other systems of record for managing videos. */ meta?: unknown | null; /** The date and time the media item was last modified. */ modified?: string | null; playback?: ClipCreateResponsePlayback | null; /** The video's preview page URI. This field is omitted until encoding is complete. */ preview?: string | null; /** Public details for the video including title, share link, channel link, and logo. */ publicDetails?: ClipCreateResponsePublicDetails | null; /** Indicates whether the video is playable. The field is empty if the video is not ready for viewing or the live stream is still in progress. */ readyToStream?: boolean | null; /** Indicates the time at which the video became playable. The field is empty if the video is not ready for viewing or the live stream is still in progress. */ readyToStreamAt?: string | null; /** Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video. */ requireSignedURLs?: boolean | null; /** Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time. */ scheduledDeletion?: string | null; /** The size of the media item in bytes. */ size?: number | null; /** Specifies a detailed status for a video. If the `state` is `inprogress` or `error`, the `step` field returns `encoding` or `manifest`. If the `state` is `inprogress`, `pctComplete` returns a number between 0 and 100 to indicate the approximate percent of completion. If the `state` is `error`, `errorReasonCode` and `errorReasonText` provide additional details. */ status?: ClipCreateResponseStatus | null; /** The media item's thumbnail URI. This field is omitted until encoding is complete. */ thumbnail?: string | null; /** The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video. */ thumbnailTimestampPct?: number | null; /** A Cloudflare-generated unique identifier for a media item. */ uid?: string | null; /** The date and time the media item was uploaded. */ uploaded?: string | null; /** The date and time when the video upload URL is no longer valid for direct user uploads. */ uploadExpiry?: string | null; watermark?: ClipCreateResponseWatermark | null; } export const CreateClipResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ allowedOrigins: S.optional(S.NullOr(ClipCreateResponseAllowedOriginsList)), clippedFrom: S.optional(S.NullOr(S.String)), created: S.optional(S.NullOr(S.String)), creator: S.optional(S.NullOr(S.String)), duration: S.optional(S.NullOr(S.Number)), input: S.optional(S.NullOr(ClipCreateResponseInput)), liveInput: S.optional(S.NullOr(S.String)), maxDurationSeconds: S.optional(S.NullOr(S.Number)), maxSizeBytes: S.optional(S.NullOr(S.Number)), meta: S.optional(S.NullOr(S.Unknown)), modified: S.optional(S.NullOr(S.String)), playback: S.optional(S.NullOr(ClipCreateResponsePlayback)), preview: S.optional(S.NullOr(S.String)), publicDetails: S.optional(S.NullOr(ClipCreateResponsePublicDetails)), readyToStream: S.optional(S.NullOr(S.Boolean)), readyToStreamAt: S.optional(S.NullOr(S.String)), requireSignedURLs: S.optional(S.NullOr(S.Boolean)), scheduledDeletion: S.optional(S.NullOr(S.String)), size: S.optional(S.NullOr(S.Number)), status: S.optional(S.NullOr(ClipCreateResponseStatus)), thumbnail: S.optional(S.NullOr(S.String)), thumbnailTimestampPct: S.optional(S.NullOr(S.Number)), uid: S.optional(S.NullOr(S.String)), uploaded: S.optional(S.NullOr(S.String)), uploadExpiry: S.optional(S.NullOr(S.String)), watermark: S.optional(S.NullOr(ClipCreateResponseWatermark)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateClipResponse", }) as any as S.Schema; export type CopyCreateRequestAllowedOriginsList = Array; export const CopyCreateRequestAllowedOriginsList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export type CopyCreateRequestWatermark = ClipCreateRequestWatermark; export const CopyCreateRequestWatermark = ClipCreateRequestWatermark; export interface CreateCopyRequest { /** The account identifier tag. */ accountId: string; /** Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin. */ allowedOrigins?: CopyCreateRequestAllowedOriginsList; /** A user-defined identifier for the media creator. */ creator?: string; /** A video's URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file. This is the preferred field over `url`. */ input?: string; /** A user modifiable key-value store used to reference other systems of record for managing videos. */ meta?: unknown; /** A video's name. Used for legacy compatibility. */ name?: string; /** Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video. */ requireSignedURLs?: boolean; /** Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time. */ scheduledDeletion?: string; /** The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video. */ thumbnailTimestampPct?: number; /** A video's URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file. This field is deprecated in favor of `input`. */ url?: string; watermark?: ClipCreateRequestWatermark; /** A user-defined identifier for the media creator. */ uploadCreator?: string; } export const CreateCopyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), allowedOrigins: S.optional(CopyCreateRequestAllowedOriginsList), creator: S.optional(S.String), input: S.optional(S.String), meta: S.optional(S.Unknown), name: S.optional(S.String), requireSignedURLs: S.optional(S.Boolean), scheduledDeletion: S.optional(S.String), thumbnailTimestampPct: S.optional(S.Number), url: S.optional(S.String), watermark: S.optional(ClipCreateRequestWatermark), uploadCreator: S.optional(S.String.pipe(T.Header("Upload-Creator"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/copy", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCopyRequest", }) as any as S.Schema; export type CopyCreateResponseAllowedOriginsList = Array; export const CopyCreateResponseAllowedOriginsList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export type CopyCreateResponseInput = ClipCreateResponseInput; export const CopyCreateResponseInput = ClipCreateResponseInput; export type CopyCreateResponsePlayback = ClipCreateResponsePlayback; export const CopyCreateResponsePlayback = ClipCreateResponsePlayback; export type CopyCreateResponsePublicDetails = ClipCreateResponsePublicDetails; export const CopyCreateResponsePublicDetails = ClipCreateResponsePublicDetails; export type CopyCreateResponseStatusState = | "pendingupload" | "downloading" | "queued" | "inprogress" | "ready" | "error" | "live-inprogress"; export const CopyCreateResponseStatusState = /*@__PURE__*/ S.String; export interface CopyCreateResponseStatus { /** Specifies why the video failed to encode. This field is empty if the video is not in an `error` state. Preferred for programmatic use. */ errorReasonCode?: string | null; /** Specifies why the video failed to encode using a human readable error message in English. This field is empty if the video is not in an `error` state. */ errorReasonText?: string | null; /** Indicates the progress as a percentage between 0 and 100. */ pctComplete?: string | null; /** Specifies the processing status for all quality levels for a video. */ state?: CopyCreateResponseStatusState | null; } export const CopyCreateResponseStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ errorReasonCode: S.optional(S.NullOr(S.String)), errorReasonText: S.optional(S.NullOr(S.String)), pctComplete: S.optional(S.NullOr(S.String)), state: S.optional(S.NullOr(CopyCreateResponseStatusState)), }), ).annotate({ identifier: "CopyCreateResponseStatus", }) as any as S.Schema; export type CopyCreateResponseWatermark = ClipCreateResponseWatermark; export const CopyCreateResponseWatermark = ClipCreateResponseWatermark; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateCopyResponse { /** Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin. */ allowedOrigins?: CopyCreateResponseAllowedOriginsList | null; /** The unique identifier of the source video this video was clipped from. */ clippedFrom?: string | null; /** The date and time the media item was created. */ created?: string | null; /** A user-defined identifier for the media creator. */ creator?: string | null; /** The duration of the video in seconds. A value of `-1` means the duration is unknown. The duration becomes available after the upload and before the video is ready. */ duration?: number | null; input?: ClipCreateResponseInput | null; /** The live input ID used to upload a video with Stream Live. */ liveInput?: string | null; /** The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of `-1` means the value is unknown. */ maxDurationSeconds?: number | null; /** The maximum size in bytes for the video upload. */ maxSizeBytes?: number | null; /** A user modifiable key-value store used to reference other systems of record for managing videos. */ meta?: unknown | null; /** The date and time the media item was last modified. */ modified?: string | null; playback?: ClipCreateResponsePlayback | null; /** The video's preview page URI. This field is omitted until encoding is complete. */ preview?: string | null; /** Public details for the video including title, share link, channel link, and logo. */ publicDetails?: ClipCreateResponsePublicDetails | null; /** Indicates whether the video is playable. The field is empty if the video is not ready for viewing or the live stream is still in progress. */ readyToStream?: boolean | null; /** Indicates the time at which the video became playable. The field is empty if the video is not ready for viewing or the live stream is still in progress. */ readyToStreamAt?: string | null; /** Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video. */ requireSignedURLs?: boolean | null; /** Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time. */ scheduledDeletion?: string | null; /** The size of the media item in bytes. */ size?: number | null; /** Specifies a detailed status for a video. If the `state` is `inprogress` or `error`, the `step` field returns `encoding` or `manifest`. If the `state` is `inprogress`, `pctComplete` returns a number between 0 and 100 to indicate the approximate percent of completion. If the `state` is `error`, `errorReasonCode` and `errorReasonText` provide additional details. */ status?: CopyCreateResponseStatus | null; /** The media item's thumbnail URI. This field is omitted until encoding is complete. */ thumbnail?: string | null; /** The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video. */ thumbnailTimestampPct?: number | null; /** A Cloudflare-generated unique identifier for a media item. */ uid?: string | null; /** The date and time the media item was uploaded. */ uploaded?: string | null; /** The date and time when the video upload URL is no longer valid for direct user uploads. */ uploadExpiry?: string | null; watermark?: ClipCreateResponseWatermark | null; } export const CreateCopyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ allowedOrigins: S.optional(S.NullOr(CopyCreateResponseAllowedOriginsList)), clippedFrom: S.optional(S.NullOr(S.String)), created: S.optional(S.NullOr(S.String)), creator: S.optional(S.NullOr(S.String)), duration: S.optional(S.NullOr(S.Number)), input: S.optional(S.NullOr(ClipCreateResponseInput)), liveInput: S.optional(S.NullOr(S.String)), maxDurationSeconds: S.optional(S.NullOr(S.Number)), maxSizeBytes: S.optional(S.NullOr(S.Number)), meta: S.optional(S.NullOr(S.Unknown)), modified: S.optional(S.NullOr(S.String)), playback: S.optional(S.NullOr(ClipCreateResponsePlayback)), preview: S.optional(S.NullOr(S.String)), publicDetails: S.optional(S.NullOr(ClipCreateResponsePublicDetails)), readyToStream: S.optional(S.NullOr(S.Boolean)), readyToStreamAt: S.optional(S.NullOr(S.String)), requireSignedURLs: S.optional(S.NullOr(S.Boolean)), scheduledDeletion: S.optional(S.NullOr(S.String)), size: S.optional(S.NullOr(S.Number)), status: S.optional(S.NullOr(CopyCreateResponseStatus)), thumbnail: S.optional(S.NullOr(S.String)), thumbnailTimestampPct: S.optional(S.NullOr(S.Number)), uid: S.optional(S.NullOr(S.String)), uploaded: S.optional(S.NullOr(S.String)), uploadExpiry: S.optional(S.NullOr(S.String)), watermark: S.optional(S.NullOr(ClipCreateResponseWatermark)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateCopyResponse", }) as any as S.Schema; export type DirectUploadCreateRequestAllowedOriginsList = Array; export const DirectUploadCreateRequestAllowedOriginsList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export type DirectUploadCreateRequestWatermark = ClipCreateRequestWatermark; export const DirectUploadCreateRequestWatermark = ClipCreateRequestWatermark; export interface CreateDirectUploadRequest { /** The account identifier tag. */ accountId: string; /** The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of `-1` means the value is unknown. */ maxDurationSeconds: number; /** Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin. */ allowedOrigins?: DirectUploadCreateRequestAllowedOriginsList; /** A user-defined identifier for the media creator. */ creator?: string; /** The date and time after upload when videos will not be accepted. */ expiry?: string; /** A user modifiable key-value store used to reference other systems of record for managing videos. */ meta?: unknown; /** Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video. */ requireSignedURLs?: boolean; /** Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time. */ scheduledDeletion?: string; /** The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video. */ thumbnailTimestampPct?: number; watermark?: ClipCreateRequestWatermark; /** A user-defined identifier for the media creator. */ uploadCreator?: string; } export const CreateDirectUploadRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), maxDurationSeconds: S.Number, allowedOrigins: S.optional(DirectUploadCreateRequestAllowedOriginsList), creator: S.optional(S.String), expiry: S.optional(S.String), meta: S.optional(S.Unknown), requireSignedURLs: S.optional(S.Boolean), scheduledDeletion: S.optional(S.String), thumbnailTimestampPct: S.optional(S.Number), watermark: S.optional(ClipCreateRequestWatermark), uploadCreator: S.optional(S.String.pipe(T.Header("Upload-Creator"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/direct_upload", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateDirectUploadRequest", }) as any as S.Schema; export type DirectUploadCreateResponseWatermark = ClipCreateResponseWatermark; export const DirectUploadCreateResponseWatermark = ClipCreateResponseWatermark; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateDirectUploadResponse { /** Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time. */ scheduledDeletion?: string | null; /** A Cloudflare-generated unique identifier for a media item. */ uid?: string | null; /** The URL an unauthenticated upload can use for a single `HTTP POST multipart/form-data` request. */ uploadURL?: string | null; watermark?: ClipCreateResponseWatermark | null; } export const CreateDirectUploadResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ scheduledDeletion: S.optional(S.NullOr(S.String)), uid: S.optional(S.NullOr(S.String)), uploadURL: S.optional(S.NullOr(S.String)), watermark: S.optional(S.NullOr(ClipCreateResponseWatermark)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateDirectUploadResponse", }) as any as S.Schema; export interface CreateDownloadRequest { /** Identifier. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; } export const CreateDownloadRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/{identifier}/downloads", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateDownloadRequest", }) as any as S.Schema; export type DownloadsCreateResponseAudioStatus = | "ready" | "inprogress" | "error"; export const DownloadsCreateResponseAudioStatus = /*@__PURE__*/ S.String; export interface DownloadsCreateResponseAudio { /** Indicates the progress as a percentage between 0 and 100. */ percentComplete: number; /** The status of a generated download. */ status: DownloadsCreateResponseAudioStatus; /** The URL to access the generated download. */ url?: string | null; } export const DownloadsCreateResponseAudio = /*@__PURE__*/ S.suspend(() => S.Struct({ percentComplete: S.Number, status: DownloadsCreateResponseAudioStatus, url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DownloadsCreateResponseAudio", }) as any as S.Schema; export type DownloadsCreateResponseDefaultStatus = | "ready" | "inprogress" | "error"; export const DownloadsCreateResponseDefaultStatus = /*@__PURE__*/ S.String; export interface DownloadsCreateResponseDefault { /** Indicates the progress as a percentage between 0 and 100. */ percentComplete: number; /** The status of a generated download. */ status: DownloadsCreateResponseDefaultStatus; /** The URL to access the generated download. */ url?: string | null; } export const DownloadsCreateResponseDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ percentComplete: S.Number, status: DownloadsCreateResponseDefaultStatus, url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DownloadsCreateResponseDefault", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateDownloadResponse { /** The audio-only download. Only present if this download type has been created. */ audio?: DownloadsCreateResponseAudio | null; /** The default video download. Only present if this download type has been created. */ default?: DownloadsCreateResponseDefault | null; } export const CreateDownloadResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ audio: S.optional(S.NullOr(DownloadsCreateResponseAudio)), default: S.optional(S.NullOr(DownloadsCreateResponseDefault)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateDownloadResponse", }) as any as S.Schema; export interface CreateKeyRequest { /** Identifier. */ accountId: string; } export const CreateKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/keys", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateKeyRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateKeyResponse { /** Identifier. */ id?: string | null; /** The date and time a signing key was created. */ created?: string | null; /** The signing key in JWK format. */ jwk?: string | null; /** The signing key in PEM format. */ pem?: string | null; } export const CreateKeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), created: S.optional(S.NullOr(S.String)), jwk: S.optional(S.NullOr(S.String)), pem: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateKeyResponse", }) as any as S.Schema; export type LiveInputsCreateRequestRecordingAllowedOriginsList = Array; export const LiveInputsCreateRequestRecordingAllowedOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type LiveInputsCreateRequestRecordingMode = "off" | "automatic"; export const LiveInputsCreateRequestRecordingMode = /*@__PURE__*/ S.String; export interface LiveInputsCreateRequestRecording { /** Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin. */ allowedOrigins?: LiveInputsCreateRequestRecordingAllowedOriginsList; /** Disables reporting the number of live viewers when this property is set to `true`. */ hideLiveViewerCount?: boolean; /** Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input. */ mode?: LiveInputsCreateRequestRecordingMode | (string & {}); /** Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input. */ requireSignedURLs?: boolean; /** Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used. */ timeoutSeconds?: number; } export const LiveInputsCreateRequestRecording = /*@__PURE__*/ S.suspend(() => S.Struct({ allowedOrigins: S.optional( LiveInputsCreateRequestRecordingAllowedOriginsList, ), hideLiveViewerCount: S.optional(S.Boolean), mode: S.optional(LiveInputsCreateRequestRecordingMode), requireSignedURLs: S.optional(S.Boolean), timeoutSeconds: S.optional(S.Number), }), ).annotate({ identifier: "LiveInputsCreateRequestRecording", }) as any as S.Schema; export interface CreateLiveInputRequest { /** Identifier. */ accountId: string; /** Sets the creator ID asssociated with this live input. */ defaultCreator?: string; /** Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. */ deleteRecordingAfterDays?: number; /** Indicates whether the live input is enabled and can accept streams. */ enabled?: boolean; /** A user modifiable key-value store used to reference other systems of record for managing live inputs. */ meta?: unknown; /** When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility. */ preferLowLatency?: boolean; /** Records the input to a Cloudflare Stream video. Behavior depends on the mode. In most cases, the video will initially be viewable as a live video and transition to on-demand after a condition is satisfied. */ recording?: LiveInputsCreateRequestRecording; } export const CreateLiveInputRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), defaultCreator: S.optional(S.String), deleteRecordingAfterDays: S.optional(S.Number), enabled: S.optional(S.Boolean), meta: S.optional(S.Unknown), preferLowLatency: S.optional(S.Boolean), recording: S.optional(LiveInputsCreateRequestRecording), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/live_inputs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateLiveInputRequest", }) as any as S.Schema; export type LiveInputsCreateResponseRecordingAllowedOriginsList = Array; export const LiveInputsCreateResponseRecordingAllowedOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type LiveInputsCreateResponseRecordingMode = "off" | "automatic"; export const LiveInputsCreateResponseRecordingMode = /*@__PURE__*/ S.String; export interface LiveInputsCreateResponseRecording { /** Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin. */ allowedOrigins?: LiveInputsCreateResponseRecordingAllowedOriginsList | null; /** Disables reporting the number of live viewers when this property is set to `true`. */ hideLiveViewerCount?: boolean | null; /** Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input. */ mode?: LiveInputsCreateResponseRecordingMode | null; /** Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input. */ requireSignedURLs?: boolean | null; /** Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used. */ timeoutSeconds?: number | null; } export const LiveInputsCreateResponseRecording = /*@__PURE__*/ S.suspend(() => S.Struct({ allowedOrigins: S.optional( S.NullOr(LiveInputsCreateResponseRecordingAllowedOriginsList), ), hideLiveViewerCount: S.optional(S.NullOr(S.Boolean)), mode: S.optional(S.NullOr(LiveInputsCreateResponseRecordingMode)), requireSignedURLs: S.optional(S.NullOr(S.Boolean)), timeoutSeconds: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "LiveInputsCreateResponseRecording", }) as any as S.Schema; export interface LiveInputsCreateResponseRtmps { /** The secret key to use when streaming via RTMPS to a live input. */ streamKey?: string | null; /** The RTMPS URL you provide to the broadcaster, which they stream live video to. */ url?: string | null; } export const LiveInputsCreateResponseRtmps = /*@__PURE__*/ S.suspend(() => S.Struct({ streamKey: S.optional(S.NullOr(S.String)), url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "LiveInputsCreateResponseRtmps", }) as any as S.Schema; export interface LiveInputsCreateResponseRtmpsPlayback { /** The secret key to use for playback via RTMPS. */ streamKey?: string | null; /** The URL used to play live video over RTMPS. */ url?: string | null; } export const LiveInputsCreateResponseRtmpsPlayback = /*@__PURE__*/ S.suspend( () => S.Struct({ streamKey: S.optional(S.NullOr(S.String)), url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "LiveInputsCreateResponseRtmpsPlayback", }) as any as S.Schema; export interface LiveInputsCreateResponseSrt { /** The secret key to use when streaming via SRT to a live input. */ passphrase?: string | null; /** The identifier of the live input to use when streaming via SRT. */ streamId?: string | null; /** The SRT URL you provide to the broadcaster, which they stream live video to. */ url?: string | null; } export const LiveInputsCreateResponseSrt = /*@__PURE__*/ S.suspend(() => S.Struct({ passphrase: S.optional(S.NullOr(S.String)), streamId: S.optional(S.NullOr(S.String)), url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "LiveInputsCreateResponseSrt", }) as any as S.Schema; export interface LiveInputsCreateResponseSrtPlayback { /** The secret key to use for playback via SRT. */ passphrase?: string | null; /** The identifier of the live input to use for playback via SRT. */ streamId?: string | null; /** The URL used to play live video over SRT. */ url?: string | null; } export const LiveInputsCreateResponseSrtPlayback = /*@__PURE__*/ S.suspend(() => S.Struct({ passphrase: S.optional(S.NullOr(S.String)), streamId: S.optional(S.NullOr(S.String)), url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "LiveInputsCreateResponseSrtPlayback", }) as any as S.Schema; export type LiveInputsCreateResponseStatus = | "connected" | "reconnected" | "reconnecting" | "client_disconnect" | "ttl_exceeded" | "failed_to_connect" | "failed_to_reconnect" | "new_configuration_accepted"; export const LiveInputsCreateResponseStatus = /*@__PURE__*/ S.String; export interface LiveInputsCreateResponseWebRTC { /** The WebRTC URL you provide to the broadcaster, which they stream live video to. */ url?: string | null; } export const LiveInputsCreateResponseWebRTC = /*@__PURE__*/ S.suspend(() => S.Struct({ url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "LiveInputsCreateResponseWebRTC", }) as any as S.Schema; export interface LiveInputsCreateResponseWebRTCPlayback { /** The URL used to play live video over WebRTC. */ url?: string | null; } export const LiveInputsCreateResponseWebRTCPlayback = /*@__PURE__*/ S.suspend( () => S.Struct({ url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "LiveInputsCreateResponseWebRTCPlayback", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateLiveInputResponse { /** The date and time the live input was created. */ created?: string | null; /** Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. */ deleteRecordingAfterDays?: number | null; /** Indicates whether the live input is enabled and can accept streams. */ enabled?: boolean | null; /** The date and time the live input keys were last rotated. Omitted for live inputs that have never had their keys rotated. */ keysRotatedAt?: string | null; /** A user modifiable key-value store used to reference other systems of record for managing live inputs. */ meta?: unknown | null; /** The date and time the live input was last modified. */ modified?: string | null; /** When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility. */ preferLowLatency?: boolean | null; /** Records the input to a Cloudflare Stream video. Behavior depends on the mode. In most cases, the video will initially be viewable as a live video and transition to on-demand after a condition is satisfied. */ recording?: LiveInputsCreateResponseRecording | null; /** Details for streaming to an live input using RTMPS. */ rtmps?: LiveInputsCreateResponseRtmps | null; /** Details for playback from an live input using RTMPS. */ rtmpsPlayback?: LiveInputsCreateResponseRtmpsPlayback | null; /** Details for streaming to a live input using SRT. */ srt?: LiveInputsCreateResponseSrt | null; /** Details for playback from an live input using SRT. */ srtPlayback?: LiveInputsCreateResponseSrtPlayback | null; /** The connection status of a live input. */ status?: LiveInputsCreateResponseStatus | null; /** A unique identifier for a live input. */ uid?: string | null; /** Details for streaming to a live input using WebRTC. */ webRTC?: LiveInputsCreateResponseWebRTC | null; /** Details for playback from a live input using WebRTC. */ webRTCPlayback?: LiveInputsCreateResponseWebRTCPlayback | null; } export const CreateLiveInputResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ created: S.optional(S.NullOr(S.String)), deleteRecordingAfterDays: S.optional(S.NullOr(S.Number)), enabled: S.optional(S.NullOr(S.Boolean)), keysRotatedAt: S.optional(S.NullOr(S.String)), meta: S.optional(S.NullOr(S.Unknown)), modified: S.optional(S.NullOr(S.String)), preferLowLatency: S.optional(S.NullOr(S.Boolean)), recording: S.optional(S.NullOr(LiveInputsCreateResponseRecording)), rtmps: S.optional(S.NullOr(LiveInputsCreateResponseRtmps)), rtmpsPlayback: S.optional(S.NullOr(LiveInputsCreateResponseRtmpsPlayback)), srt: S.optional(S.NullOr(LiveInputsCreateResponseSrt)), srtPlayback: S.optional(S.NullOr(LiveInputsCreateResponseSrtPlayback)), status: S.optional(S.NullOr(LiveInputsCreateResponseStatus)), uid: S.optional(S.NullOr(S.String)), webRTC: S.optional(S.NullOr(LiveInputsCreateResponseWebRTC)), webRTCPlayback: S.optional( S.NullOr(LiveInputsCreateResponseWebRTCPlayback), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateLiveInputResponse", }) as any as S.Schema; export interface CreateLiveInputOutputRequest { /** Identifier. */ accountId: string; /** A unique identifier for a live input. */ liveInputIdentifier: string; /** The streamKey used to authenticate against an output's target. */ streamKey: string; /** The URL an output uses to restream. */ url: string; /** When enabled, live video streamed to the associated live input will be sent to the output URL. When disabled, live video will not be sent to the output URL, even when streaming to the associated live input. Use this to control precisely when you start and stop simulcasting to specific destinations like YouTube and Twitch. */ enabled?: boolean; } export const CreateLiveInputOutputRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), liveInputIdentifier: S.String.pipe(T.Label("live_input_identifier")), streamKey: S.String, url: S.String, enabled: S.optional(S.Boolean), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateLiveInputOutputRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateLiveInputOutputResponse { /** When enabled, live video streamed to the associated live input will be sent to the output URL. When disabled, live video will not be sent to the output URL, even when streaming to the associated live input. Use this to control precisely when you start and stop simulcasting to specific destinations like YouTube and Twitch. */ enabled?: boolean | null; /** The streamKey used to authenticate against an output's target. */ streamKey?: string | null; /** A unique identifier for the output. */ uid?: string | null; /** The URL an output uses to restream. */ url?: string | null; } export const CreateLiveInputOutputResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), streamKey: S.optional(S.NullOr(S.String)), uid: S.optional(S.NullOr(S.String)), url: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateLiveInputOutputResponse", }) as any as S.Schema; export type CreateRequestTusResumable = "1.0.0"; export const CreateRequestTusResumable = /*@__PURE__*/ S.String; export interface CreateStreamRequest { /** The account identifier tag. */ accountId: string; /** Provisions a URL to let your end users upload videos directly to Cloudflare Stream without exposing your API token to clients. */ directUser?: boolean; /** Specifies the TUS protocol version. This value must be included in every upload request. */ tusResumable: CreateRequestTusResumable | (string & {}); /** Indicates the size of the entire upload in bytes. The value must be a non-negative integer. */ uploadLength: number; /** A user-defined identifier for the media creator. */ uploadCreator?: string; /** Comma-separated key-value pairs following the TUS protocol specification. Values are Base-64 encoded. */ uploadMetadata?: string; } export const CreateStreamRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), directUser: S.optional(S.Boolean.pipe(T.Query("direct_user"))), tusResumable: CreateRequestTusResumable.pipe(T.Header("Tus-Resumable")), uploadLength: S.Number.pipe(T.Header("Upload-Length")), uploadCreator: S.optional(S.String.pipe(T.Header("Upload-Creator"))), uploadMetadata: S.optional(S.String.pipe(T.Header("Upload-Metadata"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateStreamRequest", }) as any as S.Schema; export interface CreateStreamResponse {} export const CreateStreamResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateStreamResponse", }) as any as S.Schema; export type TokenCreateRequestAccessRulesItemAction = "allow" | "block"; export const TokenCreateRequestAccessRulesItemAction = /*@__PURE__*/ S.String; export type TokenCreateRequestAccessRulesItemCountryList = Array; export const TokenCreateRequestAccessRulesItemCountryList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type TokenCreateRequestAccessRulesItemIpList = Array; export const TokenCreateRequestAccessRulesItemIpList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type TokenCreateRequestAccessRulesItemType = | "any" | "ip.src" | "ip.geoip.country"; export const TokenCreateRequestAccessRulesItemType = /*@__PURE__*/ S.String; export interface TokenCreateRequestAccessRulesItem { /** The action to take when a request matches a rule. If the action is `block`, the signed token blocks views for viewers matching the rule. */ action?: TokenCreateRequestAccessRulesItemAction | (string & {}); /** An array of 2-letter country codes in ISO 3166-1 Alpha-2 format used to match requests. */ country?: TokenCreateRequestAccessRulesItemCountryList; /** An array of IPv4 or IPV6 addresses or CIDRs used to match requests. */ ip?: TokenCreateRequestAccessRulesItemIpList; /** Lists available rule types to match for requests. An `any` type matches all requests and can be used as a wildcard to apply default actions after other rules. */ type?: TokenCreateRequestAccessRulesItemType | (string & {}); } export const TokenCreateRequestAccessRulesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.optional(TokenCreateRequestAccessRulesItemAction), country: S.optional(TokenCreateRequestAccessRulesItemCountryList), ip: S.optional(TokenCreateRequestAccessRulesItemIpList), type: S.optional(TokenCreateRequestAccessRulesItemType), }), ).annotate({ identifier: "TokenCreateRequestAccessRulesItem", }) as any as S.Schema; export type TokenCreateRequestAccessRulesList = Array; export const TokenCreateRequestAccessRulesList = /*@__PURE__*/ S.Array( TokenCreateRequestAccessRulesItem, ) as any as S.Schema; export interface TokenCreateRequestFlags { /** Whether to return the original video without transformations. */ original?: boolean; } export const TokenCreateRequestFlags = /*@__PURE__*/ S.suspend(() => S.Struct({ original: S.optional(S.Boolean), }), ).annotate({ identifier: "TokenCreateRequestFlags", }) as any as S.Schema; export interface CreateTokenRequest { /** The account identifier tag. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; /** The optional ID of a Stream signing key. If present, the `pem` field is also required. */ id?: string; /** The optional list of access rule constraints on the token. Access can be blocked or allowed based on an IP, IP range, or by country. Access rules are evaluated from first to last. If a rule matches, the associated action is applied and no further rules are evaluated. */ accessRules?: TokenCreateRequestAccessRulesList; /** The optional boolean value that enables using signed tokens to access MP4 download links for a video. */ downloadable?: boolean; /** The optional unix epoch timestamp that specficies the time after a token is not accepted. The maximum time specification is 24 hours from issuing time. If this field is not set, the default is one hour after issuing. */ exp?: number; /** Optional flags for the signed token. */ flags?: TokenCreateRequestFlags; /** The optional unix epoch timestamp that specifies the time before a the token is not accepted. If this field is not set, the default is one hour before issuing. */ nbf?: number; /** The optional base64 encoded private key in PEM format associated with a Stream signing key. If present, the `id` field is also required. */ pem?: string; } export const CreateTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), id: S.optional(S.String), accessRules: S.optional(TokenCreateRequestAccessRulesList), downloadable: S.optional(S.Boolean), exp: S.optional(S.Number), flags: S.optional(TokenCreateRequestFlags), nbf: S.optional(S.Number), pem: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/{identifier}/token", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateTokenRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateTokenResponse { /** The signed token used with the signed URLs feature. */ token?: string | null; } export const CreateTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ token: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateTokenResponse", }) as any as S.Schema; export interface CreateWatermarkRequest { /** The account identifier tag. */ accountId: string; /** A short description of the watermark profile. */ name?: string; /** The translucency of the image. A value of `0.0` makes the image completely transparent, and `1.0` makes the image completely opaque. Note that if the image is already semi-transparent, setting this to `1.0` will not make the image completely opaque. */ opacity?: number; /** The whitespace between the adjacent edges (determined by position) of the video and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded video width or length, as determined by the algorithm. */ padding?: number; /** The location of the image. Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and `center`. Note that `center` ignores the `padding` parameter. */ position?: string; /** The size of the image relative to the overall size of the video. This parameter will adapt to horizontal and vertical videos automatically. `0.0` indicates no scaling (use the size of the image as-is), and `1.0`fills the entire video. */ scale?: number; /** URL of the watermark image to copy. */ url?: string; } export const CreateWatermarkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), name: S.optional(S.String), opacity: S.optional(S.Number), padding: S.optional(S.Number), position: S.optional(S.String), scale: S.optional(S.Number), url: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/watermarks", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateWatermarkRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateWatermarkResponse { /** The date and a time a watermark profile was created. */ created?: string | null; /** The source URL for a downloaded image. If the watermark profile was created via direct upload, this field is null. */ downloadedFrom?: string | null; /** The height of the image in pixels. */ height?: number | null; /** A short description of the watermark profile. */ name?: string | null; /** The translucency of the image. A value of `0.0` makes the image completely transparent, and `1.0` makes the image completely opaque. Note that if the image is already semi-transparent, setting this to `1.0` will not make the image completely opaque. */ opacity?: number | null; /** The whitespace between the adjacent edges (determined by position) of the video and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded video width or length, as determined by the algorithm. */ padding?: number | null; /** The location of the image. Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and `center`. Note that `center` ignores the `padding` parameter. */ position?: string | null; /** The size of the image relative to the overall size of the video. This parameter will adapt to horizontal and vertical videos automatically. `0.0` indicates no scaling (use the size of the image as-is), and `1.0`fills the entire video. */ scale?: number | null; /** The size of the image in bytes. */ size?: number | null; /** The unique identifier for a watermark profile. */ uid?: string | null; /** The width of the image in pixels. */ width?: number | null; } export const CreateWatermarkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ created: S.optional(S.NullOr(S.String)), downloadedFrom: S.optional(S.NullOr(S.String)), height: S.optional(S.NullOr(S.Number)), name: S.optional(S.NullOr(S.String)), opacity: S.optional(S.NullOr(S.Number)), padding: S.optional(S.NullOr(S.Number)), position: S.optional(S.NullOr(S.String)), scale: S.optional(S.NullOr(S.Number)), size: S.optional(S.NullOr(S.Number)), uid: S.optional(S.NullOr(S.String)), width: S.optional(S.NullOr(S.Number)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateWatermarkResponse", }) as any as S.Schema; export interface DeleteAudioTrackRequest { /** The account identifier tag. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; /** The unique identifier for an additional audio track. */ audioIdentifier: string; } export const DeleteAudioTrackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), audioIdentifier: S.String.pipe(T.Label("audio_identifier")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/stream/{identifier}/audio/{audio_identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAudioTrackRequest", }) as any as S.Schema; export type DeleteAudioTrackResponse = string; export const DeleteAudioTrackResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteAudioTrackResponse", }) as any as S.Schema; export interface DeleteCaptionLanguageRequest { /** Identifier. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; /** The language tag in BCP 47 format. */ language: string; } export const DeleteCaptionLanguageRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), language: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/stream/{identifier}/captions/{language}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCaptionLanguageRequest", }) as any as S.Schema; export type DeleteCaptionLanguageResponse = string; export const DeleteCaptionLanguageResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteCaptionLanguageResponse", }) as any as S.Schema; export interface DeleteDownloadRequest { /** Identifier. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; } export const DeleteDownloadRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/stream/{identifier}/downloads", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteDownloadRequest", }) as any as S.Schema; export type DeleteDownloadResponse = string; export const DeleteDownloadResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteDownloadResponse", }) as any as S.Schema; export interface DeleteKeyRequest { /** Identifier. */ accountId: string; /** Identifier. */ identifier: string; } export const DeleteKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/stream/keys/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteKeyRequest", }) as any as S.Schema; export type DeleteKeyResponse = string; export const DeleteKeyResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteKeyResponse", }) as any as S.Schema; export interface DeleteLiveInputRequest { /** Identifier. */ accountId: string; /** A unique identifier for a live input. */ liveInputIdentifier: string; } export const DeleteLiveInputRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), liveInputIdentifier: S.String.pipe(T.Label("live_input_identifier")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/stream/live_inputs/{live_input_identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteLiveInputRequest", }) as any as S.Schema; export interface DeleteLiveInputResponse {} export const DeleteLiveInputResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteLiveInputResponse", }) as any as S.Schema; export interface DeleteLiveInputOutputRequest { /** Identifier. */ accountId: string; /** A unique identifier for a live input. */ liveInputIdentifier: string; /** A unique identifier for the output. */ outputIdentifier: string; } export const DeleteLiveInputOutputRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), liveInputIdentifier: S.String.pipe(T.Label("live_input_identifier")), outputIdentifier: S.String.pipe(T.Label("output_identifier")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs/{output_identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteLiveInputOutputRequest", }) as any as S.Schema; export interface DeleteLiveInputOutputResponse {} export const DeleteLiveInputOutputResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteLiveInputOutputResponse", }) as any as S.Schema; export interface DeleteStreamRequest { /** The account identifier tag. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; } export const DeleteStreamRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/stream/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteStreamRequest", }) as any as S.Schema; export interface DeleteStreamResponse {} export const DeleteStreamResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteStreamResponse", }) as any as S.Schema; export interface DeleteWatermarkRequest { /** The account identifier tag. */ accountId: string; /** The unique identifier for a watermark profile. */ identifier: string; } export const DeleteWatermarkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/stream/watermarks/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteWatermarkRequest", }) as any as S.Schema; export type DeleteWatermarkResponse = string; export const DeleteWatermarkResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteWatermarkResponse", }) as any as S.Schema; export interface DeleteWebhookRequest { /** The account identifier tag. */ accountId: string; } export const DeleteWebhookRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/stream/webhook", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteWebhookRequest", }) as any as S.Schema; export type DeleteWebhookResponse = string; export const DeleteWebhookResponse = /*@__PURE__*/ S.suspend(() => S.String.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteWebhookResponse", }) as any as S.Schema; export type EditRequestAllowedOriginsList = Array; export const EditRequestAllowedOriginsList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export interface EditRequestPublicDetails { channelLink?: string; logo?: string; shareLink?: string; title?: string; } export const EditRequestPublicDetails = /*@__PURE__*/ S.suspend(() => S.Struct({ channelLink: S.optional(S.String.pipe(T.Body("channel_link"))), logo: S.optional(S.String), shareLink: S.optional(S.String.pipe(T.Body("share_link"))), title: S.optional(S.String), }), ).annotate({ identifier: "EditRequestPublicDetails", }) as any as S.Schema; export interface EditStreamRequest { /** The account identifier tag. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; /** Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin. */ allowedOrigins?: EditRequestAllowedOriginsList; /** A user-defined identifier for the media creator. */ creator?: string; /** The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of `-1` means the value is unknown. */ maxDurationSeconds?: number; /** A user modifiable key-value store used to reference other systems of record for managing videos. */ meta?: unknown; /** Public details for the video including title, share link, channel link, and logo. */ publicDetails?: EditRequestPublicDetails; /** Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video. */ requireSignedURLs?: boolean; /** Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time. */ scheduledDeletion?: string; /** The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video. */ thumbnailTimestampPct?: number; /** The unique identifier for the video. Can be used to verify the video being updated. */ uid?: string; /** The date and time when the video upload URL is no longer valid for direct user uploads. */ uploadExpiry?: string; } export const EditStreamRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), allowedOrigins: S.optional(EditRequestAllowedOriginsList), creator: S.optional(S.String), maxDurationSeconds: S.optional(S.Number), meta: S.optional(S.Unknown), publicDetails: S.optional(EditRequestPublicDetails), requireSignedURLs: S.optional(S.Boolean), scheduledDeletion: S.optional(S.String), thumbnailTimestampPct: S.optional(S.Number), uid: S.optional(S.String), uploadExpiry: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/stream/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "EditStreamRequest", }) as any as S.Schema; export type EditResponseAllowedOriginsList = Array; export const EditResponseAllowedOriginsList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export type EditResponseInput = ClipCreateResponseInput; export const EditResponseInput = ClipCreateResponseInput; export type EditResponsePlayback = ClipCreateResponsePlayback; export const EditResponsePlayback = ClipCreateResponsePlayback; export type EditResponsePublicDetails = ClipCreateResponsePublicDetails; export const EditResponsePublicDetails = ClipCreateResponsePublicDetails; export type EditResponseStatusState = | "pendingupload" | "downloading" | "queued" | "inprogress" | "ready" | "error" | "live-inprogress"; export const EditResponseStatusState = /*@__PURE__*/ S.String; export interface EditResponseStatus { /** Specifies why the video failed to encode. This field is empty if the video is not in an `error` state. Preferred for programmatic use. */ errorReasonCode?: string | null; /** Specifies why the video failed to encode using a human readable error message in English. This field is empty if the video is not in an `error` state. */ errorReasonText?: string | null; /** Indicates the progress as a percentage between 0 and 100. */ pctComplete?: string | null; /** Specifies the processing status for all quality levels for a video. */ state?: EditResponseStatusState | null; } export const EditResponseStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ errorReasonCode: S.optional(S.NullOr(S.String)), errorReasonText: S.optional(S.NullOr(S.String)), pctComplete: S.optional(S.NullOr(S.String)), state: S.optional(S.NullOr(EditResponseStatusState)), }), ).annotate({ identifier: "EditResponseStatus", }) as any as S.Schema; export type EditResponseWatermark = ClipCreateResponseWatermark; export const EditResponseWatermark = ClipCreateResponseWatermark; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface EditStreamResponse { /** Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin. */ allowedOrigins?: EditResponseAllowedOriginsList | null; /** The unique identifier of the source video this video was clipped from. */ clippedFrom?: string | null; /** The date and time the media item was created. */ created?: string | null; /** A user-defined identifier for the media creator. */ creator?: string | null; /** The duration of the video in seconds. A value of `-1` means the duration is unknown. The duration becomes available after the upload and before the video is ready. */ duration?: number | null; input?: ClipCreateResponseInput | null; /** The live input ID used to upload a video with Stream Live. */ liveInput?: string | null; /** The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of `-1` means the value is unknown. */ maxDurationSeconds?: number | null; /** The maximum size in bytes for the video upload. */ maxSizeBytes?: number | null; /** A user modifiable key-value store used to reference other systems of record for managing videos. */ meta?: unknown | null; /** The date and time the media item was last modified. */ modified?: string | null; playback?: ClipCreateResponsePlayback | null; /** The video's preview page URI. This field is omitted until encoding is complete. */ preview?: string | null; /** Public details for the video including title, share link, channel link, and logo. */ publicDetails?: ClipCreateResponsePublicDetails | null; /** Indicates whether the video is playable. The field is empty if the video is not ready for viewing or the live stream is still in progress. */ readyToStream?: boolean | null; /** Indicates the time at which the video became playable. The field is empty if the video is not ready for viewing or the live stream is still in progress. */ readyToStreamAt?: string | null; /** Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video. */ requireSignedURLs?: boolean | null; /** Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time. */ scheduledDeletion?: string | null; /** The size of the media item in bytes. */ size?: number | null; /** Specifies a detailed status for a video. If the `state` is `inprogress` or `error`, the `step` field returns `encoding` or `manifest`. If the `state` is `inprogress`, `pctComplete` returns a number between 0 and 100 to indicate the approximate percent of completion. If the `state` is `error`, `errorReasonCode` and `errorReasonText` provide additional details. */ status?: EditResponseStatus | null; /** The media item's thumbnail URI. This field is omitted until encoding is complete. */ thumbnail?: string | null; /** The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video. */ thumbnailTimestampPct?: number | null; /** A Cloudflare-generated unique identifier for a media item. */ uid?: string | null; /** The date and time the media item was uploaded. */ uploaded?: string | null; /** The date and time when the video upload URL is no longer valid for direct user uploads. */ uploadExpiry?: string | null; watermark?: ClipCreateResponseWatermark | null; } export const EditStreamResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ allowedOrigins: S.optional(S.NullOr(EditResponseAllowedOriginsList)), clippedFrom: S.optional(S.NullOr(S.String)), created: S.optional(S.NullOr(S.String)), creator: S.optional(S.NullOr(S.String)), duration: S.optional(S.NullOr(S.Number)), input: S.optional(S.NullOr(ClipCreateResponseInput)), liveInput: S.optional(S.NullOr(S.String)), maxDurationSeconds: S.optional(S.NullOr(S.Number)), maxSizeBytes: S.optional(S.NullOr(S.Number)), meta: S.optional(S.NullOr(S.Unknown)), modified: S.optional(S.NullOr(S.String)), playback: S.optional(S.NullOr(ClipCreateResponsePlayback)), preview: S.optional(S.NullOr(S.String)), publicDetails: S.optional(S.NullOr(ClipCreateResponsePublicDetails)), readyToStream: S.optional(S.NullOr(S.Boolean)), readyToStreamAt: S.optional(S.NullOr(S.String)), requireSignedURLs: S.optional(S.NullOr(S.Boolean)), scheduledDeletion: S.optional(S.NullOr(S.String)), size: S.optional(S.NullOr(S.Number)), status: S.optional(S.NullOr(EditResponseStatus)), thumbnail: S.optional(S.NullOr(S.String)), thumbnailTimestampPct: S.optional(S.NullOr(S.Number)), uid: S.optional(S.NullOr(S.String)), uploaded: S.optional(S.NullOr(S.String)), uploadExpiry: S.optional(S.NullOr(S.String)), watermark: S.optional(S.NullOr(ClipCreateResponseWatermark)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "EditStreamResponse", }) as any as S.Schema; export interface GetAudioTrackRequest { /** The account identifier tag. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; } export const GetAudioTrackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/{identifier}/audio", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAudioTrackRequest", }) as any as S.Schema; export type AudioTracksGetResponseAudioItemStatus = | "queued" | "ready" | "error"; export const AudioTracksGetResponseAudioItemStatus = /*@__PURE__*/ S.String; export interface AudioTracksGetResponseAudioItem { /** Denotes whether the audio track will be played by default in a player. */ default?: boolean | null; /** A string to uniquely identify the track amongst other audio track labels for the specified video. */ label?: string | null; /** Specifies the processing status of the video. */ status?: AudioTracksGetResponseAudioItemStatus | null; /** A Cloudflare-generated unique identifier for a media item. */ uid?: string | null; } export const AudioTracksGetResponseAudioItem = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional(S.NullOr(S.Boolean)), label: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(AudioTracksGetResponseAudioItemStatus)), uid: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "AudioTracksGetResponseAudioItem", }) as any as S.Schema; export type AudioTracksGetResponseAudioList = Array; export const AudioTracksGetResponseAudioList = /*@__PURE__*/ S.Array( AudioTracksGetResponseAudioItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetAudioTrackResponse { /** Array of audio tracks for the video. */ audio?: AudioTracksGetResponseAudioList | null; } export const GetAudioTrackResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ audio: S.optional(S.NullOr(AudioTracksGetResponseAudioList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetAudioTrackResponse", }) as any as S.Schema; export interface GetCaptionRequest { /** Identifier. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; } export const GetCaptionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/{identifier}/captions", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCaptionRequest", }) as any as S.Schema; export type CaptionsGetResultItemStatus = "ready" | "inprogress" | "error"; export const CaptionsGetResultItemStatus = /*@__PURE__*/ S.String; export interface CaptionsGetResultItem { /** Whether the caption was generated via AI. */ generated?: boolean | null; /** The language label displayed in the native language to users. */ label?: string | null; /** The language tag in BCP 47 format. */ language?: string | null; /** The status of a generated caption. */ status?: CaptionsGetResultItemStatus | null; } export const CaptionsGetResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ generated: S.optional(S.NullOr(S.Boolean)), label: S.optional(S.NullOr(S.String)), language: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(CaptionsGetResultItemStatus)), }), ).annotate({ identifier: "CaptionsGetResultItem", }) as any as S.Schema; export type CaptionsGetResultList = Array; export const CaptionsGetResultList = /*@__PURE__*/ S.Array( CaptionsGetResultItem, ) as any as S.Schema; export interface GetCaptionResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: CaptionsGetResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const GetCaptionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: CaptionsGetResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCaptionResponse", }) as any as S.Schema; export interface GetCaptionLanguageRequest { /** Identifier. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; /** The language tag in BCP 47 format. */ language: string; } export const GetCaptionLanguageRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), language: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/{identifier}/captions/{language}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCaptionLanguageRequest", }) as any as S.Schema; export type CaptionsLanguageGetResponseStatus = | "ready" | "inprogress" | "error"; export const CaptionsLanguageGetResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetCaptionLanguageResponse { /** Whether the caption was generated via AI. */ generated?: boolean | null; /** The language label displayed in the native language to users. */ label?: string | null; /** The language tag in BCP 47 format. */ language?: string | null; /** The status of a generated caption. */ status?: CaptionsLanguageGetResponseStatus | null; } export const GetCaptionLanguageResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ generated: S.optional(S.NullOr(S.Boolean)), label: S.optional(S.NullOr(S.String)), language: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(CaptionsLanguageGetResponseStatus)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCaptionLanguageResponse", }) as any as S.Schema; export interface GetCaptionLanguageVttRequest { /** Identifier. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; /** The language tag in BCP 47 format. */ language: string; } export const GetCaptionLanguageVttRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), language: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/{identifier}/captions/{language}/vtt", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCaptionLanguageVttRequest", }) as any as S.Schema; export interface GetCaptionLanguageVttResponse {} export const GetCaptionLanguageVttResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetCaptionLanguageVttResponse", }) as any as S.Schema; export interface GetDownloadRequest { /** Identifier. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; } export const GetDownloadRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/{identifier}/downloads", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDownloadRequest", }) as any as S.Schema; export type DownloadsGetResponseAudioStatus = "ready" | "inprogress" | "error"; export const DownloadsGetResponseAudioStatus = /*@__PURE__*/ S.String; export interface DownloadsGetResponseAudio { /** Indicates the progress as a percentage between 0 and 100. */ percentComplete: number; /** The status of a generated download. */ status: DownloadsGetResponseAudioStatus; /** The URL to access the generated download. */ url?: string | null; } export const DownloadsGetResponseAudio = /*@__PURE__*/ S.suspend(() => S.Struct({ percentComplete: S.Number, status: DownloadsGetResponseAudioStatus, url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DownloadsGetResponseAudio", }) as any as S.Schema; export type DownloadsGetResponseDefaultStatus = | "ready" | "inprogress" | "error"; export const DownloadsGetResponseDefaultStatus = /*@__PURE__*/ S.String; export interface DownloadsGetResponseDefault { /** Indicates the progress as a percentage between 0 and 100. */ percentComplete: number; /** The status of a generated download. */ status: DownloadsGetResponseDefaultStatus; /** The URL to access the generated download. */ url?: string | null; } export const DownloadsGetResponseDefault = /*@__PURE__*/ S.suspend(() => S.Struct({ percentComplete: S.Number, status: DownloadsGetResponseDefaultStatus, url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DownloadsGetResponseDefault", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetDownloadResponse { /** The audio-only download. Only present if this download type has been created. */ audio?: DownloadsGetResponseAudio | null; /** The default video download. Only present if this download type has been created. */ default?: DownloadsGetResponseDefault | null; } export const GetDownloadResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ audio: S.optional(S.NullOr(DownloadsGetResponseAudio)), default: S.optional(S.NullOr(DownloadsGetResponseDefault)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDownloadResponse", }) as any as S.Schema; export interface GetEmbedRequest { /** The account identifier tag. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; } export const GetEmbedRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/{identifier}/embed", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetEmbedRequest", }) as any as S.Schema; export interface GetEmbedResponse {} export const GetEmbedResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetEmbedResponse", }) as any as S.Schema; export interface GetKeyRequest { /** Identifier. */ accountId: string; } export const GetKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/keys", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetKeyRequest" }) as any as S.Schema; export interface KeysGetResultItem { /** Identifier. */ id?: string | null; /** The date and time a signing key was created. */ created?: string | null; /** The unique identifier for the signing key. */ keyId?: string | null; } export const KeysGetResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), created: S.optional(S.NullOr(S.String)), keyId: S.optional(S.NullOr(S.String).pipe(T.Body("key_id"))), }), ).annotate({ identifier: "KeysGetResultItem", }) as any as S.Schema; export type KeysGetResultList = Array; export const KeysGetResultList = /*@__PURE__*/ S.Array( KeysGetResultItem, ) as any as S.Schema; export interface GetKeyResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: KeysGetResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const GetKeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: KeysGetResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetKeyResponse" }) as any as S.Schema; export interface GetLiveInputRequest { /** Identifier. */ accountId: string; /** A unique identifier for a live input. */ liveInputIdentifier: string; } export const GetLiveInputRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), liveInputIdentifier: S.String.pipe(T.Label("live_input_identifier")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/live_inputs/{live_input_identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetLiveInputRequest", }) as any as S.Schema; export type LiveInputsGetResponseRecordingAllowedOriginsList = Array; export const LiveInputsGetResponseRecordingAllowedOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type LiveInputsGetResponseRecordingMode = "off" | "automatic"; export const LiveInputsGetResponseRecordingMode = /*@__PURE__*/ S.String; export interface LiveInputsGetResponseRecording { /** Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin. */ allowedOrigins?: LiveInputsGetResponseRecordingAllowedOriginsList | null; /** Disables reporting the number of live viewers when this property is set to `true`. */ hideLiveViewerCount?: boolean | null; /** Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input. */ mode?: LiveInputsGetResponseRecordingMode | null; /** Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input. */ requireSignedURLs?: boolean | null; /** Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used. */ timeoutSeconds?: number | null; } export const LiveInputsGetResponseRecording = /*@__PURE__*/ S.suspend(() => S.Struct({ allowedOrigins: S.optional( S.NullOr(LiveInputsGetResponseRecordingAllowedOriginsList), ), hideLiveViewerCount: S.optional(S.NullOr(S.Boolean)), mode: S.optional(S.NullOr(LiveInputsGetResponseRecordingMode)), requireSignedURLs: S.optional(S.NullOr(S.Boolean)), timeoutSeconds: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "LiveInputsGetResponseRecording", }) as any as S.Schema; export type LiveInputsGetResponseRtmps = LiveInputsCreateResponseRtmps; export const LiveInputsGetResponseRtmps = LiveInputsCreateResponseRtmps; export type LiveInputsGetResponseRtmpsPlayback = LiveInputsCreateResponseRtmpsPlayback; export const LiveInputsGetResponseRtmpsPlayback = LiveInputsCreateResponseRtmpsPlayback; export type LiveInputsGetResponseSrt = LiveInputsCreateResponseSrt; export const LiveInputsGetResponseSrt = LiveInputsCreateResponseSrt; export type LiveInputsGetResponseSrtPlayback = LiveInputsCreateResponseSrtPlayback; export const LiveInputsGetResponseSrtPlayback = LiveInputsCreateResponseSrtPlayback; export type LiveInputsGetResponseStatus = | "connected" | "reconnected" | "reconnecting" | "client_disconnect" | "ttl_exceeded" | "failed_to_connect" | "failed_to_reconnect" | "new_configuration_accepted"; export const LiveInputsGetResponseStatus = /*@__PURE__*/ S.String; export type LiveInputsGetResponseWebRTC = LiveInputsCreateResponseWebRTC; export const LiveInputsGetResponseWebRTC = LiveInputsCreateResponseWebRTC; export type LiveInputsGetResponseWebRTCPlayback = LiveInputsCreateResponseWebRTCPlayback; export const LiveInputsGetResponseWebRTCPlayback = LiveInputsCreateResponseWebRTCPlayback; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetLiveInputResponse { /** The date and time the live input was created. */ created?: string | null; /** Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. */ deleteRecordingAfterDays?: number | null; /** Indicates whether the live input is enabled and can accept streams. */ enabled?: boolean | null; /** The date and time the live input keys were last rotated. Omitted for live inputs that have never had their keys rotated. */ keysRotatedAt?: string | null; /** A user modifiable key-value store used to reference other systems of record for managing live inputs. */ meta?: unknown | null; /** The date and time the live input was last modified. */ modified?: string | null; /** When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility. */ preferLowLatency?: boolean | null; /** Records the input to a Cloudflare Stream video. Behavior depends on the mode. In most cases, the video will initially be viewable as a live video and transition to on-demand after a condition is satisfied. */ recording?: LiveInputsGetResponseRecording | null; /** Details for streaming to an live input using RTMPS. */ rtmps?: LiveInputsCreateResponseRtmps | null; /** Details for playback from an live input using RTMPS. */ rtmpsPlayback?: LiveInputsCreateResponseRtmpsPlayback | null; /** Details for streaming to a live input using SRT. */ srt?: LiveInputsCreateResponseSrt | null; /** Details for playback from an live input using SRT. */ srtPlayback?: LiveInputsCreateResponseSrtPlayback | null; /** The connection status of a live input. */ status?: LiveInputsGetResponseStatus | null; /** A unique identifier for a live input. */ uid?: string | null; /** Details for streaming to a live input using WebRTC. */ webRTC?: LiveInputsCreateResponseWebRTC | null; /** Details for playback from a live input using WebRTC. */ webRTCPlayback?: LiveInputsCreateResponseWebRTCPlayback | null; } export const GetLiveInputResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ created: S.optional(S.NullOr(S.String)), deleteRecordingAfterDays: S.optional(S.NullOr(S.Number)), enabled: S.optional(S.NullOr(S.Boolean)), keysRotatedAt: S.optional(S.NullOr(S.String)), meta: S.optional(S.NullOr(S.Unknown)), modified: S.optional(S.NullOr(S.String)), preferLowLatency: S.optional(S.NullOr(S.Boolean)), recording: S.optional(S.NullOr(LiveInputsGetResponseRecording)), rtmps: S.optional(S.NullOr(LiveInputsCreateResponseRtmps)), rtmpsPlayback: S.optional(S.NullOr(LiveInputsCreateResponseRtmpsPlayback)), srt: S.optional(S.NullOr(LiveInputsCreateResponseSrt)), srtPlayback: S.optional(S.NullOr(LiveInputsCreateResponseSrtPlayback)), status: S.optional(S.NullOr(LiveInputsGetResponseStatus)), uid: S.optional(S.NullOr(S.String)), webRTC: S.optional(S.NullOr(LiveInputsCreateResponseWebRTC)), webRTCPlayback: S.optional( S.NullOr(LiveInputsCreateResponseWebRTCPlayback), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetLiveInputResponse", }) as any as S.Schema; export interface GetStreamRequest { /** The account identifier tag. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; } export const GetStreamRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetStreamRequest", }) as any as S.Schema; export type GetResponseAllowedOriginsList = Array; export const GetResponseAllowedOriginsList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export type GetResponseInput = ClipCreateResponseInput; export const GetResponseInput = ClipCreateResponseInput; export type GetResponsePlayback = ClipCreateResponsePlayback; export const GetResponsePlayback = ClipCreateResponsePlayback; export type GetResponsePublicDetails = ClipCreateResponsePublicDetails; export const GetResponsePublicDetails = ClipCreateResponsePublicDetails; export type GetResponseStatusState = | "pendingupload" | "downloading" | "queued" | "inprogress" | "ready" | "error" | "live-inprogress"; export const GetResponseStatusState = /*@__PURE__*/ S.String; export interface GetResponseStatus { /** Specifies why the video failed to encode. This field is empty if the video is not in an `error` state. Preferred for programmatic use. */ errorReasonCode?: string | null; /** Specifies why the video failed to encode using a human readable error message in English. This field is empty if the video is not in an `error` state. */ errorReasonText?: string | null; /** Indicates the progress as a percentage between 0 and 100. */ pctComplete?: string | null; /** Specifies the processing status for all quality levels for a video. */ state?: GetResponseStatusState | null; } export const GetResponseStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ errorReasonCode: S.optional(S.NullOr(S.String)), errorReasonText: S.optional(S.NullOr(S.String)), pctComplete: S.optional(S.NullOr(S.String)), state: S.optional(S.NullOr(GetResponseStatusState)), }), ).annotate({ identifier: "GetResponseStatus", }) as any as S.Schema; export type GetResponseWatermark = ClipCreateResponseWatermark; export const GetResponseWatermark = ClipCreateResponseWatermark; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetStreamResponse { /** Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin. */ allowedOrigins?: GetResponseAllowedOriginsList | null; /** The unique identifier of the source video this video was clipped from. */ clippedFrom?: string | null; /** The date and time the media item was created. */ created?: string | null; /** A user-defined identifier for the media creator. */ creator?: string | null; /** The duration of the video in seconds. A value of `-1` means the duration is unknown. The duration becomes available after the upload and before the video is ready. */ duration?: number | null; input?: ClipCreateResponseInput | null; /** The live input ID used to upload a video with Stream Live. */ liveInput?: string | null; /** The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of `-1` means the value is unknown. */ maxDurationSeconds?: number | null; /** The maximum size in bytes for the video upload. */ maxSizeBytes?: number | null; /** A user modifiable key-value store used to reference other systems of record for managing videos. */ meta?: unknown | null; /** The date and time the media item was last modified. */ modified?: string | null; playback?: ClipCreateResponsePlayback | null; /** The video's preview page URI. This field is omitted until encoding is complete. */ preview?: string | null; /** Public details for the video including title, share link, channel link, and logo. */ publicDetails?: ClipCreateResponsePublicDetails | null; /** Indicates whether the video is playable. The field is empty if the video is not ready for viewing or the live stream is still in progress. */ readyToStream?: boolean | null; /** Indicates the time at which the video became playable. The field is empty if the video is not ready for viewing or the live stream is still in progress. */ readyToStreamAt?: string | null; /** Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video. */ requireSignedURLs?: boolean | null; /** Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time. */ scheduledDeletion?: string | null; /** The size of the media item in bytes. */ size?: number | null; /** Specifies a detailed status for a video. If the `state` is `inprogress` or `error`, the `step` field returns `encoding` or `manifest`. If the `state` is `inprogress`, `pctComplete` returns a number between 0 and 100 to indicate the approximate percent of completion. If the `state` is `error`, `errorReasonCode` and `errorReasonText` provide additional details. */ status?: GetResponseStatus | null; /** The media item's thumbnail URI. This field is omitted until encoding is complete. */ thumbnail?: string | null; /** The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video. */ thumbnailTimestampPct?: number | null; /** A Cloudflare-generated unique identifier for a media item. */ uid?: string | null; /** The date and time the media item was uploaded. */ uploaded?: string | null; /** The date and time when the video upload URL is no longer valid for direct user uploads. */ uploadExpiry?: string | null; watermark?: ClipCreateResponseWatermark | null; } export const GetStreamResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ allowedOrigins: S.optional(S.NullOr(GetResponseAllowedOriginsList)), clippedFrom: S.optional(S.NullOr(S.String)), created: S.optional(S.NullOr(S.String)), creator: S.optional(S.NullOr(S.String)), duration: S.optional(S.NullOr(S.Number)), input: S.optional(S.NullOr(ClipCreateResponseInput)), liveInput: S.optional(S.NullOr(S.String)), maxDurationSeconds: S.optional(S.NullOr(S.Number)), maxSizeBytes: S.optional(S.NullOr(S.Number)), meta: S.optional(S.NullOr(S.Unknown)), modified: S.optional(S.NullOr(S.String)), playback: S.optional(S.NullOr(ClipCreateResponsePlayback)), preview: S.optional(S.NullOr(S.String)), publicDetails: S.optional(S.NullOr(ClipCreateResponsePublicDetails)), readyToStream: S.optional(S.NullOr(S.Boolean)), readyToStreamAt: S.optional(S.NullOr(S.String)), requireSignedURLs: S.optional(S.NullOr(S.Boolean)), scheduledDeletion: S.optional(S.NullOr(S.String)), size: S.optional(S.NullOr(S.Number)), status: S.optional(S.NullOr(GetResponseStatus)), thumbnail: S.optional(S.NullOr(S.String)), thumbnailTimestampPct: S.optional(S.NullOr(S.Number)), uid: S.optional(S.NullOr(S.String)), uploaded: S.optional(S.NullOr(S.String)), uploadExpiry: S.optional(S.NullOr(S.String)), watermark: S.optional(S.NullOr(ClipCreateResponseWatermark)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetStreamResponse", }) as any as S.Schema; export interface GetWatermarkRequest { /** The account identifier tag. */ accountId: string; /** The unique identifier for a watermark profile. */ identifier: string; } export const GetWatermarkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/watermarks/{identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetWatermarkRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetWatermarkResponse { /** The date and a time a watermark profile was created. */ created?: string | null; /** The source URL for a downloaded image. If the watermark profile was created via direct upload, this field is null. */ downloadedFrom?: string | null; /** The height of the image in pixels. */ height?: number | null; /** A short description of the watermark profile. */ name?: string | null; /** The translucency of the image. A value of `0.0` makes the image completely transparent, and `1.0` makes the image completely opaque. Note that if the image is already semi-transparent, setting this to `1.0` will not make the image completely opaque. */ opacity?: number | null; /** The whitespace between the adjacent edges (determined by position) of the video and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded video width or length, as determined by the algorithm. */ padding?: number | null; /** The location of the image. Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and `center`. Note that `center` ignores the `padding` parameter. */ position?: string | null; /** The size of the image relative to the overall size of the video. This parameter will adapt to horizontal and vertical videos automatically. `0.0` indicates no scaling (use the size of the image as-is), and `1.0`fills the entire video. */ scale?: number | null; /** The size of the image in bytes. */ size?: number | null; /** The unique identifier for a watermark profile. */ uid?: string | null; /** The width of the image in pixels. */ width?: number | null; } export const GetWatermarkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ created: S.optional(S.NullOr(S.String)), downloadedFrom: S.optional(S.NullOr(S.String)), height: S.optional(S.NullOr(S.Number)), name: S.optional(S.NullOr(S.String)), opacity: S.optional(S.NullOr(S.Number)), padding: S.optional(S.NullOr(S.Number)), position: S.optional(S.NullOr(S.String)), scale: S.optional(S.NullOr(S.Number)), size: S.optional(S.NullOr(S.Number)), uid: S.optional(S.NullOr(S.String)), width: S.optional(S.NullOr(S.Number)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetWatermarkResponse", }) as any as S.Schema; export interface GetWebhookRequest { /** The account identifier tag. */ accountId: string; } export const GetWebhookRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/webhook", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetWebhookRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetWebhookResponse { /** The date and time the webhook was last modified. */ modified?: string | null; /** The URL where webhooks will be sent. */ notificationUrl?: string | null; /** The secret used to verify webhook signatures. */ secret?: string | null; } export const GetWebhookResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ modified: S.optional(S.NullOr(S.String)), notificationUrl: S.optional(S.NullOr(S.String)), secret: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetWebhookResponse", }) as any as S.Schema; export interface ListLiveInputOutputsRequest { /** Identifier. */ accountId: string; /** A unique identifier for a live input. */ liveInputIdentifier: string; } export const ListLiveInputOutputsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), liveInputIdentifier: S.String.pipe(T.Label("live_input_identifier")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListLiveInputOutputsRequest", }) as any as S.Schema; export interface LiveInputsOutputsListResultItem { /** When enabled, live video streamed to the associated live input will be sent to the output URL. When disabled, live video will not be sent to the output URL, even when streaming to the associated live input. Use this to control precisely when you start and stop simulcasting to specific destinations like YouTube and Twitch. */ enabled?: boolean | null; /** The streamKey used to authenticate against an output's target. */ streamKey?: string | null; /** A unique identifier for the output. */ uid?: string | null; /** The URL an output uses to restream. */ url?: string | null; } export const LiveInputsOutputsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), streamKey: S.optional(S.NullOr(S.String)), uid: S.optional(S.NullOr(S.String)), url: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "LiveInputsOutputsListResultItem", }) as any as S.Schema; export type LiveInputsOutputsListResultList = Array; export const LiveInputsOutputsListResultList = /*@__PURE__*/ S.Array( LiveInputsOutputsListResultItem, ) as any as S.Schema; export interface ListLiveInputOutputsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: LiveInputsOutputsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListLiveInputOutputsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: LiveInputsOutputsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListLiveInputOutputsResponse", }) as any as S.Schema; export interface ListLiveInputsRequest { /** Identifier. */ accountId: string; /** Includes the total number of videos associated with the submitted query parameters. */ includeCounts?: boolean; } export const ListLiveInputsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), includeCounts: S.optional(S.Boolean.pipe(T.Query("include_counts"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/live_inputs", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListLiveInputsRequest", }) as any as S.Schema; export interface LiveInputsListResponseLiveInputsItem { /** The date and time the live input was created. */ created?: string | null; /** Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. */ deleteRecordingAfterDays?: number | null; /** Indicates whether the live input is enabled and can accept streams. */ enabled?: boolean | null; /** A user modifiable key-value store used to reference other systems of record for managing live inputs. */ meta?: unknown | null; /** The date and time the live input was last modified. */ modified?: string | null; /** A unique identifier for a live input. */ uid?: string | null; } export const LiveInputsListResponseLiveInputsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ created: S.optional(S.NullOr(S.String)), deleteRecordingAfterDays: S.optional(S.NullOr(S.Number)), enabled: S.optional(S.NullOr(S.Boolean)), meta: S.optional(S.NullOr(S.Unknown)), modified: S.optional(S.NullOr(S.String)), uid: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "LiveInputsListResponseLiveInputsItem", }) as any as S.Schema; export type LiveInputsListResponseLiveInputsList = Array; export const LiveInputsListResponseLiveInputsList = /*@__PURE__*/ S.Array( LiveInputsListResponseLiveInputsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface ListLiveInputsResponse { liveInputs?: LiveInputsListResponseLiveInputsList | null; /** The total number of remaining live inputs based on cursor position. */ range?: number | null; /** The total number of live inputs that match the provided filters. */ total?: number | null; } export const ListLiveInputsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ liveInputs: S.optional(S.NullOr(LiveInputsListResponseLiveInputsList)), range: S.optional(S.NullOr(S.Number)), total: S.optional(S.NullOr(S.Number)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListLiveInputsResponse", }) as any as S.Schema; export type ListRequestStatus = | "pendingupload" | "downloading" | "queued" | "inprogress" | "ready" | "error" | "live-inprogress"; export const ListRequestStatus = /*@__PURE__*/ S.String; export interface ListStreamsRequest { /** The account identifier tag. */ accountId: string; /** Filter by video ID(s). Can be a single ID or a comma-separated list of IDs. */ id?: string; /** Alias for 'start'. Returns videos created after this date/time (RFC 3339 format). */ after?: string; /** Lists videos in ascending order of creation. */ asc?: boolean; /** Alias for 'end'. Returns videos created before this date/time (RFC 3339 format). */ before?: string; /** A user-defined identifier for the media creator. */ creator?: string; /** Lists videos created before the specified date. */ end?: string; /** Includes the total number of videos associated with the submitted query parameters. */ includeCounts?: boolean; /** Maximum number of videos to return (default 1000, max 1000). */ limit?: number; /** Filter by live input ID to find videos associated with a specific live stream. */ liveInputId?: string; /** Filter by video name/UID(s). Can be a single name or a comma-separated list. */ name?: string; /** Provides a partial word match of the `name` key in the `meta` field. Slow for medium to large video libraries. May be unavailable for very large libraries. */ search?: string; /** Lists videos created after the specified date. */ start?: string; /** Specifies the processing status for all quality levels for a video. */ status?: ListRequestStatus | (string & {}); /** Specifies whether the video is `vod` or `live`. */ type?: string; /** Provides a fast, exact string match on the `name` key in the `meta` field. */ videoName?: string; } export const ListStreamsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), id: S.optional(S.String.pipe(T.Query())), after: S.optional(S.String.pipe(T.Query())), asc: S.optional(S.Boolean.pipe(T.Query())), before: S.optional(S.String.pipe(T.Query())), creator: S.optional(S.String.pipe(T.Query())), end: S.optional(S.String.pipe(T.Query())), includeCounts: S.optional(S.Boolean.pipe(T.Query("include_counts"))), limit: S.optional(S.Number.pipe(T.Query())), liveInputId: S.optional(S.String.pipe(T.Query("live_input_id"))), name: S.optional(S.String.pipe(T.Query())), search: S.optional(S.String.pipe(T.Query())), start: S.optional(S.String.pipe(T.Query())), status: S.optional(ListRequestStatus.pipe(T.Query())), type: S.optional(S.String.pipe(T.Query())), videoName: S.optional(S.String.pipe(T.Query("video_name"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListStreamsRequest", }) as any as S.Schema; export type ListResultItemAllowedOriginsList = Array; export const ListResultItemAllowedOriginsList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export type ListResultItemInput = ClipCreateResponseInput; export const ListResultItemInput = ClipCreateResponseInput; export type ListResultItemPlayback = ClipCreateResponsePlayback; export const ListResultItemPlayback = ClipCreateResponsePlayback; export type ListResultItemPublicDetails = ClipCreateResponsePublicDetails; export const ListResultItemPublicDetails = ClipCreateResponsePublicDetails; export type ListResultItemStatusState = | "pendingupload" | "downloading" | "queued" | "inprogress" | "ready" | "error" | "live-inprogress"; export const ListResultItemStatusState = /*@__PURE__*/ S.String; export interface ListResultItemStatus { /** Specifies why the video failed to encode. This field is empty if the video is not in an `error` state. Preferred for programmatic use. */ errorReasonCode?: string | null; /** Specifies why the video failed to encode using a human readable error message in English. This field is empty if the video is not in an `error` state. */ errorReasonText?: string | null; /** Indicates the progress as a percentage between 0 and 100. */ pctComplete?: string | null; /** Specifies the processing status for all quality levels for a video. */ state?: ListResultItemStatusState | null; } export const ListResultItemStatus = /*@__PURE__*/ S.suspend(() => S.Struct({ errorReasonCode: S.optional(S.NullOr(S.String)), errorReasonText: S.optional(S.NullOr(S.String)), pctComplete: S.optional(S.NullOr(S.String)), state: S.optional(S.NullOr(ListResultItemStatusState)), }), ).annotate({ identifier: "ListResultItemStatus", }) as any as S.Schema; export type ListResultItemWatermark = ClipCreateResponseWatermark; export const ListResultItemWatermark = ClipCreateResponseWatermark; export interface ListResultItem { /** Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin. */ allowedOrigins?: ListResultItemAllowedOriginsList | null; /** The unique identifier of the source video this video was clipped from. */ clippedFrom?: string | null; /** The date and time the media item was created. */ created?: string | null; /** A user-defined identifier for the media creator. */ creator?: string | null; /** The duration of the video in seconds. A value of `-1` means the duration is unknown. The duration becomes available after the upload and before the video is ready. */ duration?: number | null; input?: ClipCreateResponseInput | null; /** The live input ID used to upload a video with Stream Live. */ liveInput?: string | null; /** The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of `-1` means the value is unknown. */ maxDurationSeconds?: number | null; /** The maximum size in bytes for the video upload. */ maxSizeBytes?: number | null; /** A user modifiable key-value store used to reference other systems of record for managing videos. */ meta?: unknown | null; /** The date and time the media item was last modified. */ modified?: string | null; playback?: ClipCreateResponsePlayback | null; /** The video's preview page URI. This field is omitted until encoding is complete. */ preview?: string | null; /** Public details for the video including title, share link, channel link, and logo. */ publicDetails?: ClipCreateResponsePublicDetails | null; /** Indicates whether the video is playable. The field is empty if the video is not ready for viewing or the live stream is still in progress. */ readyToStream?: boolean | null; /** Indicates the time at which the video became playable. The field is empty if the video is not ready for viewing or the live stream is still in progress. */ readyToStreamAt?: string | null; /** Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video. */ requireSignedURLs?: boolean | null; /** Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time. */ scheduledDeletion?: string | null; /** The size of the media item in bytes. */ size?: number | null; /** Specifies a detailed status for a video. If the `state` is `inprogress` or `error`, the `step` field returns `encoding` or `manifest`. If the `state` is `inprogress`, `pctComplete` returns a number between 0 and 100 to indicate the approximate percent of completion. If the `state` is `error`, `errorReasonCode` and `errorReasonText` provide additional details. */ status?: ListResultItemStatus | null; /** The media item's thumbnail URI. This field is omitted until encoding is complete. */ thumbnail?: string | null; /** The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video. */ thumbnailTimestampPct?: number | null; /** A Cloudflare-generated unique identifier for a media item. */ uid?: string | null; /** The date and time the media item was uploaded. */ uploaded?: string | null; /** The date and time when the video upload URL is no longer valid for direct user uploads. */ uploadExpiry?: string | null; watermark?: ClipCreateResponseWatermark | null; } export const ListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ allowedOrigins: S.optional(S.NullOr(ListResultItemAllowedOriginsList)), clippedFrom: S.optional(S.NullOr(S.String)), created: S.optional(S.NullOr(S.String)), creator: S.optional(S.NullOr(S.String)), duration: S.optional(S.NullOr(S.Number)), input: S.optional(S.NullOr(ClipCreateResponseInput)), liveInput: S.optional(S.NullOr(S.String)), maxDurationSeconds: S.optional(S.NullOr(S.Number)), maxSizeBytes: S.optional(S.NullOr(S.Number)), meta: S.optional(S.NullOr(S.Unknown)), modified: S.optional(S.NullOr(S.String)), playback: S.optional(S.NullOr(ClipCreateResponsePlayback)), preview: S.optional(S.NullOr(S.String)), publicDetails: S.optional(S.NullOr(ClipCreateResponsePublicDetails)), readyToStream: S.optional(S.NullOr(S.Boolean)), readyToStreamAt: S.optional(S.NullOr(S.String)), requireSignedURLs: S.optional(S.NullOr(S.Boolean)), scheduledDeletion: S.optional(S.NullOr(S.String)), size: S.optional(S.NullOr(S.Number)), status: S.optional(S.NullOr(ListResultItemStatus)), thumbnail: S.optional(S.NullOr(S.String)), thumbnailTimestampPct: S.optional(S.NullOr(S.Number)), uid: S.optional(S.NullOr(S.String)), uploaded: S.optional(S.NullOr(S.String)), uploadExpiry: S.optional(S.NullOr(S.String)), watermark: S.optional(S.NullOr(ClipCreateResponseWatermark)), }), ).annotate({ identifier: "ListResultItem" }) as any as S.Schema; export type ListResultList = Array; export const ListResultList = /*@__PURE__*/ S.Array( ListResultItem, ) as any as S.Schema; export interface ListStreamsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListStreamsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: ListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListStreamsResponse", }) as any as S.Schema; export interface ListWatermarksRequest { /** The account identifier tag. */ accountId: string; } export const ListWatermarksRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/watermarks", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListWatermarksRequest", }) as any as S.Schema; export type WatermarksListResultItem = ClipCreateResponseWatermark; export const WatermarksListResultItem = ClipCreateResponseWatermark; export type WatermarksListResultList = Array; export const WatermarksListResultList = /*@__PURE__*/ S.Array( ClipCreateResponseWatermark, ) as any as S.Schema; export interface ListWatermarksResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: WatermarksListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListWatermarksResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: WatermarksListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListWatermarksResponse", }) as any as S.Schema; export interface PatchAudioTrackRequest { /** The account identifier tag. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; /** The unique identifier for an additional audio track. */ audioIdentifier: string; /** Denotes whether the audio track will be played by default in a player. */ default?: boolean; /** A string to uniquely identify the track amongst other audio track labels for the specified video. */ label?: string; } export const PatchAudioTrackRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), audioIdentifier: S.String.pipe(T.Label("audio_identifier")), default: S.optional(S.Boolean), label: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/stream/{identifier}/audio/{audio_identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAudioTrackRequest", }) as any as S.Schema; export type AudioTracksEditResponseStatus = "queued" | "ready" | "error"; export const AudioTracksEditResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchAudioTrackResponse { /** Denotes whether the audio track will be played by default in a player. */ default?: boolean | null; /** A string to uniquely identify the track amongst other audio track labels for the specified video. */ label?: string | null; /** Specifies the processing status of the video. */ status?: AudioTracksEditResponseStatus | null; /** A Cloudflare-generated unique identifier for a media item. */ uid?: string | null; } export const PatchAudioTrackResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ default: S.optional(S.NullOr(S.Boolean)), label: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(AudioTracksEditResponseStatus)), uid: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchAudioTrackResponse", }) as any as S.Schema; export interface PutWebhookRequest { /** The account identifier tag. */ accountId: string; /** The URL where webhooks will be sent. */ notificationUrl?: string; } export const PutWebhookRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), notificationUrl: S.optional(S.String), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/stream/webhook", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutWebhookRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutWebhookResponse { /** The date and time the webhook was last modified. */ modified?: string | null; /** The URL where webhooks will be sent. */ notificationUrl?: string | null; /** The secret used to verify webhook signatures. */ secret?: string | null; } export const PutWebhookResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ modified: S.optional(S.NullOr(S.String)), notificationUrl: S.optional(S.NullOr(S.String)), secret: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PutWebhookResponse", }) as any as S.Schema; export interface StorageUsageVideoRequest { /** The account identifier tag. */ accountId: string; /** A user-defined identifier for the media creator. */ creator?: string; } export const StorageUsageVideoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), creator: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/stream/storage-usage", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "StorageUsageVideoRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface StorageUsageVideoResponse { /** A user-defined identifier for the media creator. */ creator?: string | null; /** The total minutes of video content stored in the account. May contain decimal values. */ totalStorageMinutes?: number | null; /** The storage capacity alloted for the account. */ totalStorageMinutesLimit?: number | null; /** The total count of videos associated with the account. */ videoCount?: number | null; } export const StorageUsageVideoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ creator: S.optional(S.NullOr(S.String)), totalStorageMinutes: S.optional(S.NullOr(S.Number)), totalStorageMinutesLimit: S.optional(S.NullOr(S.Number)), videoCount: S.optional(S.NullOr(S.Number)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "StorageUsageVideoResponse", }) as any as S.Schema; export interface UpdateCaptionLanguageRequest { /** Identifier. */ accountId: string; /** A Cloudflare-generated unique identifier for a media item. */ identifier: string; /** The language tag in BCP 47 format. */ language: string; } export const UpdateCaptionLanguageRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), identifier: S.String.pipe(T.Label()), language: S.String.pipe(T.Label()), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/stream/{identifier}/captions/{language}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateCaptionLanguageRequest", }) as any as S.Schema; export type CaptionsLanguageUpdateResponseStatus = | "ready" | "inprogress" | "error"; export const CaptionsLanguageUpdateResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateCaptionLanguageResponse { /** Whether the caption was generated via AI. */ generated?: boolean | null; /** The language label displayed in the native language to users. */ label?: string | null; /** The language tag in BCP 47 format. */ language?: string | null; /** The status of a generated caption. */ status?: CaptionsLanguageUpdateResponseStatus | null; } export const UpdateCaptionLanguageResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ generated: S.optional(S.NullOr(S.Boolean)), label: S.optional(S.NullOr(S.String)), language: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(CaptionsLanguageUpdateResponseStatus)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateCaptionLanguageResponse", }) as any as S.Schema; export type LiveInputsUpdateRequestRecordingAllowedOriginsList = Array; export const LiveInputsUpdateRequestRecordingAllowedOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type LiveInputsUpdateRequestRecordingMode = "off" | "automatic"; export const LiveInputsUpdateRequestRecordingMode = /*@__PURE__*/ S.String; export interface LiveInputsUpdateRequestRecording { /** Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin. */ allowedOrigins?: LiveInputsUpdateRequestRecordingAllowedOriginsList; /** Disables reporting the number of live viewers when this property is set to `true`. */ hideLiveViewerCount?: boolean; /** Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input. */ mode?: LiveInputsUpdateRequestRecordingMode | (string & {}); /** Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input. */ requireSignedURLs?: boolean; /** Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used. */ timeoutSeconds?: number; } export const LiveInputsUpdateRequestRecording = /*@__PURE__*/ S.suspend(() => S.Struct({ allowedOrigins: S.optional( LiveInputsUpdateRequestRecordingAllowedOriginsList, ), hideLiveViewerCount: S.optional(S.Boolean), mode: S.optional(LiveInputsUpdateRequestRecordingMode), requireSignedURLs: S.optional(S.Boolean), timeoutSeconds: S.optional(S.Number), }), ).annotate({ identifier: "LiveInputsUpdateRequestRecording", }) as any as S.Schema; export interface UpdateLiveInputRequest { /** Identifier. */ accountId: string; /** A unique identifier for a live input. */ liveInputIdentifier: string; /** Sets the creator ID asssociated with this live input. */ defaultCreator?: string; /** Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. */ deleteRecordingAfterDays?: number; /** Indicates whether the live input is enabled and can accept streams. */ enabled?: boolean; /** A user modifiable key-value store used to reference other systems of record for managing live inputs. */ meta?: unknown; /** When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility. */ preferLowLatency?: boolean; /** Records the input to a Cloudflare Stream video. Behavior depends on the mode. In most cases, the video will initially be viewable as a live video and transition to on-demand after a condition is satisfied. */ recording?: LiveInputsUpdateRequestRecording; } export const UpdateLiveInputRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), liveInputIdentifier: S.String.pipe(T.Label("live_input_identifier")), defaultCreator: S.optional(S.String), deleteRecordingAfterDays: S.optional(S.Number), enabled: S.optional(S.Boolean), meta: S.optional(S.Unknown), preferLowLatency: S.optional(S.Boolean), recording: S.optional(LiveInputsUpdateRequestRecording), }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/stream/live_inputs/{live_input_identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateLiveInputRequest", }) as any as S.Schema; export type LiveInputsUpdateResponseRecordingAllowedOriginsList = Array; export const LiveInputsUpdateResponseRecordingAllowedOriginsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type LiveInputsUpdateResponseRecordingMode = "off" | "automatic"; export const LiveInputsUpdateResponseRecordingMode = /*@__PURE__*/ S.String; export interface LiveInputsUpdateResponseRecording { /** Lists the origins allowed to display videos created with this input. Enter allowed origin domains in an array and use `*` for wildcard subdomains. An empty array allows videos to be viewed on any origin. */ allowedOrigins?: LiveInputsUpdateResponseRecordingAllowedOriginsList | null; /** Disables reporting the number of live viewers when this property is set to `true`. */ hideLiveViewerCount?: boolean | null; /** Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input. */ mode?: LiveInputsUpdateResponseRecordingMode | null; /** Indicates if a video using the live input has the `requireSignedURLs` property set. Also enforces access controls on any video recording of the livestream with the live input. */ requireSignedURLs?: boolean | null; /** Determines the amount of time a live input configured in `automatic` mode should wait before a recording transitions from live to on-demand. `0` is recommended for most use cases and indicates the platform default should be used. */ timeoutSeconds?: number | null; } export const LiveInputsUpdateResponseRecording = /*@__PURE__*/ S.suspend(() => S.Struct({ allowedOrigins: S.optional( S.NullOr(LiveInputsUpdateResponseRecordingAllowedOriginsList), ), hideLiveViewerCount: S.optional(S.NullOr(S.Boolean)), mode: S.optional(S.NullOr(LiveInputsUpdateResponseRecordingMode)), requireSignedURLs: S.optional(S.NullOr(S.Boolean)), timeoutSeconds: S.optional(S.NullOr(S.Number)), }), ).annotate({ identifier: "LiveInputsUpdateResponseRecording", }) as any as S.Schema; export type LiveInputsUpdateResponseRtmps = LiveInputsCreateResponseRtmps; export const LiveInputsUpdateResponseRtmps = LiveInputsCreateResponseRtmps; export type LiveInputsUpdateResponseRtmpsPlayback = LiveInputsCreateResponseRtmpsPlayback; export const LiveInputsUpdateResponseRtmpsPlayback = LiveInputsCreateResponseRtmpsPlayback; export type LiveInputsUpdateResponseSrt = LiveInputsCreateResponseSrt; export const LiveInputsUpdateResponseSrt = LiveInputsCreateResponseSrt; export type LiveInputsUpdateResponseSrtPlayback = LiveInputsCreateResponseSrtPlayback; export const LiveInputsUpdateResponseSrtPlayback = LiveInputsCreateResponseSrtPlayback; export type LiveInputsUpdateResponseStatus = | "connected" | "reconnected" | "reconnecting" | "client_disconnect" | "ttl_exceeded" | "failed_to_connect" | "failed_to_reconnect" | "new_configuration_accepted"; export const LiveInputsUpdateResponseStatus = /*@__PURE__*/ S.String; export type LiveInputsUpdateResponseWebRTC = LiveInputsCreateResponseWebRTC; export const LiveInputsUpdateResponseWebRTC = LiveInputsCreateResponseWebRTC; export type LiveInputsUpdateResponseWebRTCPlayback = LiveInputsCreateResponseWebRTCPlayback; export const LiveInputsUpdateResponseWebRTCPlayback = LiveInputsCreateResponseWebRTCPlayback; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateLiveInputResponse { /** The date and time the live input was created. */ created?: string | null; /** Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. */ deleteRecordingAfterDays?: number | null; /** Indicates whether the live input is enabled and can accept streams. */ enabled?: boolean | null; /** The date and time the live input keys were last rotated. Omitted for live inputs that have never had their keys rotated. */ keysRotatedAt?: string | null; /** A user modifiable key-value store used to reference other systems of record for managing live inputs. */ meta?: unknown | null; /** The date and time the live input was last modified. */ modified?: string | null; /** When enabled, the live stream is delivered using Low-Latency HLS (LL-HLS), reducing glass-to-glass latency for viewers at the cost of reduced player compatibility. */ preferLowLatency?: boolean | null; /** Records the input to a Cloudflare Stream video. Behavior depends on the mode. In most cases, the video will initially be viewable as a live video and transition to on-demand after a condition is satisfied. */ recording?: LiveInputsUpdateResponseRecording | null; /** Details for streaming to an live input using RTMPS. */ rtmps?: LiveInputsCreateResponseRtmps | null; /** Details for playback from an live input using RTMPS. */ rtmpsPlayback?: LiveInputsCreateResponseRtmpsPlayback | null; /** Details for streaming to a live input using SRT. */ srt?: LiveInputsCreateResponseSrt | null; /** Details for playback from an live input using SRT. */ srtPlayback?: LiveInputsCreateResponseSrtPlayback | null; /** The connection status of a live input. */ status?: LiveInputsUpdateResponseStatus | null; /** A unique identifier for a live input. */ uid?: string | null; /** Details for streaming to a live input using WebRTC. */ webRTC?: LiveInputsCreateResponseWebRTC | null; /** Details for playback from a live input using WebRTC. */ webRTCPlayback?: LiveInputsCreateResponseWebRTCPlayback | null; } export const UpdateLiveInputResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ created: S.optional(S.NullOr(S.String)), deleteRecordingAfterDays: S.optional(S.NullOr(S.Number)), enabled: S.optional(S.NullOr(S.Boolean)), keysRotatedAt: S.optional(S.NullOr(S.String)), meta: S.optional(S.NullOr(S.Unknown)), modified: S.optional(S.NullOr(S.String)), preferLowLatency: S.optional(S.NullOr(S.Boolean)), recording: S.optional(S.NullOr(LiveInputsUpdateResponseRecording)), rtmps: S.optional(S.NullOr(LiveInputsCreateResponseRtmps)), rtmpsPlayback: S.optional(S.NullOr(LiveInputsCreateResponseRtmpsPlayback)), srt: S.optional(S.NullOr(LiveInputsCreateResponseSrt)), srtPlayback: S.optional(S.NullOr(LiveInputsCreateResponseSrtPlayback)), status: S.optional(S.NullOr(LiveInputsUpdateResponseStatus)), uid: S.optional(S.NullOr(S.String)), webRTC: S.optional(S.NullOr(LiveInputsCreateResponseWebRTC)), webRTCPlayback: S.optional( S.NullOr(LiveInputsCreateResponseWebRTCPlayback), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateLiveInputResponse", }) as any as S.Schema; export interface UpdateLiveInputOutputRequest { /** Identifier. */ accountId: string; /** A unique identifier for a live input. */ liveInputIdentifier: string; /** A unique identifier for the output. */ outputIdentifier: string; /** When enabled, live video streamed to the associated live input will be sent to the output URL. When disabled, live video will not be sent to the output URL, even when streaming to the associated live input. Use this to control precisely when you start and stop simulcasting to specific destinations like YouTube and Twitch. */ enabled: boolean; } export const UpdateLiveInputOutputRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), liveInputIdentifier: S.String.pipe(T.Label("live_input_identifier")), outputIdentifier: S.String.pipe(T.Label("output_identifier")), enabled: S.Boolean, }) .pipe( T.Http({ method: "PUT", uri: "/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs/{output_identifier}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateLiveInputOutputRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdateLiveInputOutputResponse { /** When enabled, live video streamed to the associated live input will be sent to the output URL. When disabled, live video will not be sent to the output URL, even when streaming to the associated live input. Use this to control precisely when you start and stop simulcasting to specific destinations like YouTube and Twitch. */ enabled?: boolean | null; /** The streamKey used to authenticate against an output's target. */ streamKey?: string | null; /** A unique identifier for the output. */ uid?: string | null; /** The URL an output uses to restream. */ url?: string | null; } export const UpdateLiveInputOutputResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.NullOr(S.Boolean)), streamKey: S.optional(S.NullOr(S.String)), uid: S.optional(S.NullOr(S.String)), url: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "UpdateLiveInputOutputResponse", }) as any as S.Schema; export type CopyAudioTrackError = CloudflareOpError; /** Adds an additional audio track to a video using the provided audio track URL. */ export const copyAudioTrack: API.OperationMethod< CopyAudioTrackRequest, CopyAudioTrackResponse, CopyAudioTrackError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CopyAudioTrackRequest, output: CopyAudioTrackResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateCaptionLanguageError = CloudflareOpError; /** Generate captions or subtitles for provided language via AI. */ export const createCaptionLanguage: API.OperationMethod< CreateCaptionLanguageRequest, CreateCaptionLanguageResponse, CreateCaptionLanguageError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateCaptionLanguageRequest, output: CreateCaptionLanguageResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateClipError = CloudflareOpError; /** Clips a video based on the specified start and end times provided in seconds. */ export const createClip: API.OperationMethod< CreateClipRequest, CreateClipResponse, CreateClipError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateClipRequest, output: CreateClipResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateCopyError = CloudflareOpError; /** Uploads a video to Stream from a provided URL. */ export const createCopy: API.OperationMethod< CreateCopyRequest, CreateCopyResponse, CreateCopyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateCopyRequest, output: CreateCopyResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateDirectUploadError = CloudflareOpError; /** Creates a direct upload that allows video uploads without an API key. */ export const createDirectUpload: API.OperationMethod< CreateDirectUploadRequest, CreateDirectUploadResponse, CreateDirectUploadError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateDirectUploadRequest, output: CreateDirectUploadResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateDownloadError = CloudflareOpError; /** Creates a download for a video when a video is ready to view. Use `/downloads/{download_type}` instead for type-specific downloads. Available types are `default` and `audio`. */ export const createDownload: API.OperationMethod< CreateDownloadRequest, CreateDownloadResponse, CreateDownloadError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateDownloadRequest, output: CreateDownloadResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateKeyError = CloudflareOpError; /** Creates an RSA private key in PEM and JWK formats. Key files are only displayed once after creation. Keys are created, used, and deleted independently of videos, and every key can sign any video. */ export const createKey: API.OperationMethod< CreateKeyRequest, CreateKeyResponse, CreateKeyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateKeyRequest, output: CreateKeyResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateLiveInputError = CloudflareOpError; /** Creates a live input, and returns credentials that you or your users can use to stream live video to Cloudflare Stream. */ export const createLiveInput: API.OperationMethod< CreateLiveInputRequest, CreateLiveInputResponse, CreateLiveInputError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateLiveInputRequest, output: CreateLiveInputResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateLiveInputOutputError = | LiveInputNotFound | Forbidden | CloudflareOpError; /** Creates a new output that can be used to simulcast or restream live video to other RTMP or SRT destinations. Outputs are always linked to a specific live input — one live input can have many outputs. */ export const createLiveInputOutput: API.OperationMethod< CreateLiveInputOutputRequest, CreateLiveInputOutputResponse, CreateLiveInputOutputError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateLiveInputOutputRequest, output: CreateLiveInputOutputResponse, errors: [ LiveInputNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateStreamError = CloudflareOpError; /** Initiates a video upload using the TUS protocol. On success, the server responds with a status code 201 (created) and includes a `location` header to indicate where the content should be uploaded. Refer to https://tus.io for protocol details. */ export const createStream: API.OperationMethod< CreateStreamRequest, CreateStreamResponse, CreateStreamError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateStreamRequest, output: CreateStreamResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateTokenError = CloudflareOpError; /** Creates a signed URL token for a video. If a body is not provided in the request, a token is created with default values. */ export const createToken: API.OperationMethod< CreateTokenRequest, CreateTokenResponse, CreateTokenError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateTokenRequest, output: CreateTokenResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateWatermarkError = | WatermarkImageInvalid | Forbidden | CloudflareOpError; /** Creates watermark profiles using a single `HTTP POST multipart/form-data` request. */ export const createWatermark: API.OperationMethod< CreateWatermarkRequest, CreateWatermarkResponse, CreateWatermarkError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateWatermarkRequest, output: CreateWatermarkResponse, errors: [ WatermarkImageInvalid, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteAudioTrackError = CloudflareOpError; /** Deletes additional audio tracks on a video. Deleting a default audio track is not allowed. You must assign another audio track as default prior to deletion. */ export const deleteAudioTrack: API.OperationMethod< DeleteAudioTrackRequest, DeleteAudioTrackResponse, DeleteAudioTrackError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteAudioTrackRequest, output: DeleteAudioTrackResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteCaptionLanguageError = CloudflareOpError; /** Removes the captions or subtitles from a video. */ export const deleteCaptionLanguage: API.OperationMethod< DeleteCaptionLanguageRequest, DeleteCaptionLanguageResponse, DeleteCaptionLanguageError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteCaptionLanguageRequest, output: DeleteCaptionLanguageResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteDownloadError = CloudflareOpError; /** Delete the downloads for a video. Use `/downloads/{download_type}` instead for type-specific downloads. Available types are `default` and `audio`. */ export const deleteDownload: API.OperationMethod< DeleteDownloadRequest, DeleteDownloadResponse, DeleteDownloadError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteDownloadRequest, output: DeleteDownloadResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteKeyError = SigningKeyNotFound | Forbidden | CloudflareOpError; /** Deletes signing keys and revokes all signed URLs generated with the key. */ export const deleteKey: API.OperationMethod< DeleteKeyRequest, DeleteKeyResponse, DeleteKeyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteKeyRequest, output: DeleteKeyResponse, errors: [ SigningKeyNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteLiveInputError = | LiveInputNotFound | Forbidden | CloudflareOpError; /** Prevents a live input from being streamed to and makes the live input inaccessible to any future API calls. */ export const deleteLiveInput: API.OperationMethod< DeleteLiveInputRequest, DeleteLiveInputResponse, DeleteLiveInputError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteLiveInputRequest, output: DeleteLiveInputResponse, errors: [ LiveInputNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteLiveInputOutputError = | OutputNotFound | Forbidden | CloudflareOpError; /** Deletes an output and removes it from the associated live input. */ export const deleteLiveInputOutput: API.OperationMethod< DeleteLiveInputOutputRequest, DeleteLiveInputOutputResponse, DeleteLiveInputOutputError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteLiveInputOutputRequest, output: DeleteLiveInputOutputResponse, errors: [OutputNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteStreamError = CloudflareOpError; /** Deletes a video and its copies from Cloudflare Stream. */ export const deleteStream: API.OperationMethod< DeleteStreamRequest, DeleteStreamResponse, DeleteStreamError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteStreamRequest, output: DeleteStreamResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteWatermarkError = | WatermarkNotFound | Forbidden | CloudflareOpError; /** Deletes a watermark profile. */ export const deleteWatermark: API.OperationMethod< DeleteWatermarkRequest, DeleteWatermarkResponse, DeleteWatermarkError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteWatermarkRequest, output: DeleteWatermarkResponse, errors: [ WatermarkNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteWebhookError = | WebhookNotFound | Forbidden | CloudflareOpError; /** Deletes a webhook. */ export const deleteWebhook: API.OperationMethod< DeleteWebhookRequest, DeleteWebhookResponse, DeleteWebhookError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteWebhookRequest, output: DeleteWebhookResponse, errors: [WebhookNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type EditStreamError = CloudflareOpError; /** Edit details for a single video. */ export const editStream: API.OperationMethod< EditStreamRequest, EditStreamResponse, EditStreamError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: EditStreamRequest, output: EditStreamResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetAudioTrackError = CloudflareOpError; /** Lists additional audio tracks on a video. Note this API will not return information for audio attached to the video upload. */ export const getAudioTrack: API.OperationMethod< GetAudioTrackRequest, GetAudioTrackResponse, GetAudioTrackError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetAudioTrackRequest, output: GetAudioTrackResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCaptionError = CloudflareOpError; /** Lists the available captions or subtitles for a specific video. */ export const getCaption: API.PaginatedOperationMethod< GetCaptionRequest, GetCaptionResponse, GetCaptionError, CloudflareOpContext, CaptionsGetResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: GetCaptionRequest, output: GetCaptionResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type GetCaptionLanguageError = CloudflareOpError; /** Lists the captions or subtitles for provided language. */ export const getCaptionLanguage: API.OperationMethod< GetCaptionLanguageRequest, GetCaptionLanguageResponse, GetCaptionLanguageError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCaptionLanguageRequest, output: GetCaptionLanguageResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetCaptionLanguageVttError = CloudflareOpError; /** Return WebVTT captions for a provided language. */ export const getCaptionLanguageVtt: API.OperationMethod< GetCaptionLanguageVttRequest, GetCaptionLanguageVttResponse, GetCaptionLanguageVttError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetCaptionLanguageVttRequest, output: GetCaptionLanguageVttResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetDownloadError = CloudflareOpError; /** Lists the downloads created for a video. */ export const getDownload: API.OperationMethod< GetDownloadRequest, GetDownloadResponse, GetDownloadError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetDownloadRequest, output: GetDownloadResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetEmbedError = CloudflareOpError; /** Fetches an HTML code snippet to embed a video in a web page delivered through Cloudflare. On success, returns an HTML fragment for use on web pages to display a video. On failure, returns a JSON response body. */ export const getEmbed: API.OperationMethod< GetEmbedRequest, GetEmbedResponse, GetEmbedError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetEmbedRequest, output: GetEmbedResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetKeyError = Forbidden | CloudflareOpError; /** Lists the video ID and creation date and time when a signing key was created. */ export const getKey: API.PaginatedOperationMethod< GetKeyRequest, GetKeyResponse, GetKeyError, CloudflareOpContext, KeysGetResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: GetKeyRequest, output: GetKeyResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type GetLiveInputError = | LiveInputNotFound | Forbidden | CloudflareOpError; /** Retrieves details of an existing live input. */ export const getLiveInput: API.OperationMethod< GetLiveInputRequest, GetLiveInputResponse, GetLiveInputError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetLiveInputRequest, output: GetLiveInputResponse, errors: [ LiveInputNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetStreamError = CloudflareOpError; /** Fetches details for a single video. */ export const getStream: API.OperationMethod< GetStreamRequest, GetStreamResponse, GetStreamError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetStreamRequest, output: GetStreamResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetWatermarkError = | WatermarkNotFound | Forbidden | CloudflareOpError; /** Retrieves details for a single watermark profile. */ export const getWatermark: API.OperationMethod< GetWatermarkRequest, GetWatermarkResponse, GetWatermarkError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetWatermarkRequest, output: GetWatermarkResponse, errors: [ WatermarkNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetWebhookError = WebhookNotFound | Forbidden | CloudflareOpError; /** Retrieves a list of webhooks. */ export const getWebhook: API.OperationMethod< GetWebhookRequest, GetWebhookResponse, GetWebhookError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetWebhookRequest, output: GetWebhookResponse, errors: [WebhookNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListLiveInputOutputsError = | LiveInputNotFound | Forbidden | CloudflareOpError; /** Retrieves all outputs associated with a specified live input. */ export const listLiveInputOutputs: API.PaginatedOperationMethod< ListLiveInputOutputsRequest, ListLiveInputOutputsResponse, ListLiveInputOutputsError, CloudflareOpContext, LiveInputsOutputsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListLiveInputOutputsRequest, output: ListLiveInputOutputsResponse, errors: [ LiveInputNotFound, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListLiveInputsError = CloudflareOpError; /** Lists the live inputs created for an account. To get the credentials needed to stream to a specific live input, request a single live input. */ export const listLiveInputs: API.OperationMethod< ListLiveInputsRequest, ListLiveInputsResponse, ListLiveInputsError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: ListLiveInputsRequest, output: ListLiveInputsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListStreamsError = CloudflareOpError; /** Lists up to 1000 videos from a single request. For a specific range, refer to the optional parameters. */ export const listStreams: API.PaginatedOperationMethod< ListStreamsRequest, ListStreamsResponse, ListStreamsError, CloudflareOpContext, ListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListStreamsRequest, output: ListStreamsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListWatermarksError = CloudflareOpError; /** Lists all watermark profiles for an account. */ export const listWatermarks: API.PaginatedOperationMethod< ListWatermarksRequest, ListWatermarksResponse, ListWatermarksError, CloudflareOpContext, ClipCreateResponseWatermark > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListWatermarksRequest, output: ListWatermarksResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type PatchAudioTrackError = CloudflareOpError; /** Edits additional audio tracks on a video. Editing the default status of an audio track to `true` will mark all other audio tracks on the video default status to `false`. */ export const patchAudioTrack: API.OperationMethod< PatchAudioTrackRequest, PatchAudioTrackResponse, PatchAudioTrackError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchAudioTrackRequest, output: PatchAudioTrackResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PutWebhookError = CloudflareOpError; /** Creates a webhook notification. */ export const putWebhook: API.OperationMethod< PutWebhookRequest, PutWebhookResponse, PutWebhookError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PutWebhookRequest, output: PutWebhookResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type StorageUsageVideoError = CloudflareOpError; /** Returns information about an account's storage use. */ export const storageUsageVideo: API.OperationMethod< StorageUsageVideoRequest, StorageUsageVideoResponse, StorageUsageVideoError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: StorageUsageVideoRequest, output: StorageUsageVideoResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateCaptionLanguageError = CloudflareOpError; /** Uploads the caption or subtitle file to the endpoint for a specific BCP47 language. One caption or subtitle file per language is allowed. */ export const updateCaptionLanguage: API.OperationMethod< UpdateCaptionLanguageRequest, UpdateCaptionLanguageResponse, UpdateCaptionLanguageError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateCaptionLanguageRequest, output: UpdateCaptionLanguageResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateLiveInputError = CloudflareOpError; /** Updates a specified live input. */ export const updateLiveInput: API.OperationMethod< UpdateLiveInputRequest, UpdateLiveInputResponse, UpdateLiveInputError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateLiveInputRequest, output: UpdateLiveInputResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type UpdateLiveInputOutputError = | OutputNotFound | Forbidden | CloudflareOpError; /** Updates the state of an output. */ export const updateLiveInputOutput: API.OperationMethod< UpdateLiveInputOutputRequest, UpdateLiveInputOutputResponse, UpdateLiveInputOutputError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: UpdateLiveInputOutputRequest, output: UpdateLiveInputOutputResponse, errors: [OutputNotFound, Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));