/**
 * Cloudflare STREAM API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service stream
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
export const GetAudioTrackRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/stream/{identifier}/audio",
}));
export const GetAudioTrackResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        default: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        label: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        status: Schema.optional(Schema.Union([
            Schema.Literals(["queued", "ready", "error"]),
            Schema.Null,
        ])),
        uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    })),
});
export const getAudioTrack = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetAudioTrackRequest,
    output: GetAudioTrackResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const PatchAudioTrackRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    audioIdentifier: Schema.String.pipe(T.HttpPath("audioIdentifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    default: Schema.optional(Schema.Boolean),
    label: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "PATCH",
    path: "/accounts/{account_id}/stream/{identifier}/audio/{audioIdentifier}",
}));
export const PatchAudioTrackResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    default: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    label: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals(["queued", "ready", "error"]),
        Schema.Null,
    ])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const patchAudioTrack = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchAudioTrackRequest,
    output: PatchAudioTrackResponse,
    errors: [],
}));
export const DeleteAudioTrackRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    audioIdentifier: Schema.String.pipe(T.HttpPath("audioIdentifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/stream/{identifier}/audio/{audioIdentifier}",
}));
export const DeleteAudioTrackResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(T.ResponsePath("result"));
export const deleteAudioTrack = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAudioTrackRequest,
    output: DeleteAudioTrackResponse,
    errors: [],
}));
export const CopyAudioTrackRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    label: Schema.String,
    url: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/stream/{identifier}/audio/copy",
}));
export const CopyAudioTrackResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    default: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    label: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals(["queued", "ready", "error"]),
        Schema.Null,
    ])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const copyAudioTrack = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CopyAudioTrackRequest,
    output: CopyAudioTrackResponse,
    errors: [],
}));
export const GetCaptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/stream/{identifier}/captions",
}));
export const GetCaptionResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        generated: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        label: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        language: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        status: Schema.optional(Schema.Union([
            Schema.Literals(["ready", "inprogress", "error"]),
            Schema.Null,
        ])),
    })),
});
export const getCaption = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetCaptionRequest,
    output: GetCaptionResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const GetCaptionLanguageRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    language: Schema.String.pipe(T.HttpPath("language")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/stream/{identifier}/captions/{language}",
}));
export const GetCaptionLanguageResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    generated: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    label: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    language: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals(["ready", "inprogress", "error"]),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const getCaptionLanguage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCaptionLanguageRequest,
    output: GetCaptionLanguageResponse,
    errors: [],
}));
export const CreateCaptionLanguageRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    language: Schema.String.pipe(T.HttpPath("language")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/stream/{identifier}/captions/{language}/generate",
}));
export const CreateCaptionLanguageResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    generated: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    label: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    language: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals(["ready", "inprogress", "error"]),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const createCaptionLanguage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateCaptionLanguageRequest,
    output: CreateCaptionLanguageResponse,
    errors: [],
}));
export const UpdateCaptionLanguageRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    language: Schema.String.pipe(T.HttpPath("language")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    file: Schema.String,
}).pipe(T.Http({
    method: "PUT",
    path: "/accounts/{account_id}/stream/{identifier}/captions/{language}",
    contentType: "multipart",
}));
export const UpdateCaptionLanguageResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    generated: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    label: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    language: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals(["ready", "inprogress", "error"]),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const updateCaptionLanguage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateCaptionLanguageRequest,
    output: UpdateCaptionLanguageResponse,
    errors: [],
}));
export const DeleteCaptionLanguageRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    language: Schema.String.pipe(T.HttpPath("language")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/stream/{identifier}/captions/{language}",
}));
export const DeleteCaptionLanguageResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(T.ResponsePath("result"));
export const deleteCaptionLanguage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteCaptionLanguageRequest,
    output: DeleteCaptionLanguageResponse,
    errors: [],
}));
export const GetCaptionLanguageVttRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    language: Schema.String.pipe(T.HttpPath("language")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/stream/{identifier}/captions/{language}/vtt",
}));
export const GetCaptionLanguageVttResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String;
export const getCaptionLanguageVtt = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCaptionLanguageVttRequest,
    output: GetCaptionLanguageVttResponse,
    errors: [],
}));
export const CreateClipRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    clippedFromVideoUID: Schema.String,
    endTimeSeconds: Schema.Number,
    startTimeSeconds: Schema.Number,
    allowedOrigins: Schema.optional(Schema.Array(Schema.String)),
    creator: Schema.optional(Schema.String),
    maxDurationSeconds: Schema.optional(Schema.Number),
    requireSignedURLs: Schema.optional(Schema.Boolean),
    thumbnailTimestampPct: Schema.optional(Schema.Number),
    watermark: Schema.optional(Schema.Struct({
        uid: Schema.optional(Schema.String),
    })),
}).pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/stream/clip" }));
export const CreateClipResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    allowedOrigins: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
    clippedFromVideoUID: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    endTimeSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    maxDurationSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    playback: Schema.optional(Schema.Union([
        Schema.Struct({
            dash: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            hls: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
    preview: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    requireSignedURLs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    startTimeSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals([
            "pendingupload",
            "downloading",
            "queued",
            "inprogress",
            "ready",
            "error",
            "live-inprogress",
        ]),
        Schema.Null,
    ])),
    thumbnailTimestampPct: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    watermark: Schema.optional(Schema.Union([
        Schema.Struct({
            uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const createClip = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateClipRequest,
    output: CreateClipResponse,
    errors: [],
}));
export const CreateCopyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    uploadCreator: Schema.optional(Schema.String).pipe(T.HttpHeader("Upload-Creator")),
    url: Schema.String,
    allowedOrigins: Schema.optional(Schema.Array(Schema.String)),
    creator: Schema.optional(Schema.String),
    meta: Schema.optional(Schema.Unknown),
    requireSignedURLs: Schema.optional(Schema.Boolean),
    scheduledDeletion: Schema.optional(Schema.String),
    thumbnailTimestampPct: Schema.optional(Schema.Number),
    watermark: Schema.optional(Schema.Struct({
        uid: Schema.optional(Schema.String),
    })),
}).pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/stream/copy" }));
export const CreateCopyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    allowedOrigins: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    duration: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    input: Schema.optional(Schema.Union([
        Schema.Struct({
            height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
    liveInput: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    maxDurationSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    playback: Schema.optional(Schema.Union([
        Schema.Struct({
            dash: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            hls: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
    preview: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    readyToStream: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    readyToStreamAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    requireSignedURLs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    scheduledDeletion: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Struct({
            errorReasonCode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            errorReasonText: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            pctComplete: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            state: Schema.optional(Schema.Union([
                Schema.Literals([
                    "pendingupload",
                    "downloading",
                    "queued",
                    "inprogress",
                    "ready",
                    "error",
                    "live-inprogress",
                ]),
                Schema.Null,
            ])),
        }),
        Schema.Null,
    ])),
    thumbnail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    thumbnailTimestampPct: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uploaded: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uploadExpiry: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    watermark: Schema.optional(Schema.Union([
        Schema.Struct({
            created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            downloadedFrom: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            opacity: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            padding: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            position: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            scale: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const createCopy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateCopyRequest,
    output: CreateCopyResponse,
    errors: [],
}));
export const CreateDirectUploadRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    uploadCreator: Schema.optional(Schema.String).pipe(T.HttpHeader("Upload-Creator")),
    maxDurationSeconds: Schema.Number,
    allowedOrigins: Schema.optional(Schema.Array(Schema.String)),
    creator: Schema.optional(Schema.String),
    expiry: Schema.optional(Schema.String),
    meta: Schema.optional(Schema.Unknown),
    requireSignedURLs: Schema.optional(Schema.Boolean),
    scheduledDeletion: Schema.optional(Schema.String),
    thumbnailTimestampPct: Schema.optional(Schema.Number),
    watermark: Schema.optional(Schema.Struct({
        uid: Schema.optional(Schema.String),
    })),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/stream/direct_upload",
}));
export const CreateDirectUploadResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    scheduledDeletion: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uploadURL: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    watermark: Schema.optional(Schema.Union([
        Schema.Struct({
            created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            downloadedFrom: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            opacity: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            padding: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            position: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            scale: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const createDirectUpload = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateDirectUploadRequest,
    output: CreateDirectUploadResponse,
    errors: [],
}));
export const GetDownloadRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/stream/{identifier}/downloads",
}));
export const GetDownloadResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    audio: Schema.optional(Schema.Union([
        Schema.Struct({
            percentComplete: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            status: Schema.optional(Schema.Union([
                Schema.Literals(["ready", "inprogress", "error"]),
                Schema.Null,
            ])),
            url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
    default: Schema.optional(Schema.Union([
        Schema.Struct({
            percentComplete: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            status: Schema.optional(Schema.Union([
                Schema.Literals(["ready", "inprogress", "error"]),
                Schema.Null,
            ])),
            url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const getDownload = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetDownloadRequest,
    output: GetDownloadResponse,
    errors: [],
}));
export const CreateDownloadRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    body: Schema.Unknown.pipe(T.HttpBody()),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/stream/{identifier}/downloads",
}));
export const CreateDownloadResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    percentComplete: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals(["ready", "inprogress", "error"]),
        Schema.Null,
    ])),
    url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createDownload = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateDownloadRequest,
    output: CreateDownloadResponse,
    errors: [],
}));
export const DeleteDownloadRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/stream/{identifier}/downloads",
}));
export const DeleteDownloadResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(T.ResponsePath("result"));
export const deleteDownload = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteDownloadRequest,
    output: DeleteDownloadResponse,
    errors: [],
}));
export const GetEmbedRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/stream/{identifier}/embed",
}));
export const GetEmbedResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String;
export const getEmbed = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetEmbedRequest,
    output: GetEmbedResponse,
    errors: [],
}));
export const GetKeyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/stream/keys" }));
export const GetKeyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    })),
});
export const getKey = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetKeyRequest,
    output: GetKeyResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateKeyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    body: Schema.Unknown.pipe(T.HttpBody()),
}).pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/stream/keys" }));
export const CreateKeyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    jwk: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    pem: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createKey = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateKeyRequest,
    output: CreateKeyResponse,
    errors: [],
}));
export const DeleteKeyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/stream/keys/{identifier}",
}));
export const DeleteKeyResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(T.ResponsePath("result"));
export const deleteKey = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteKeyRequest,
    output: DeleteKeyResponse,
    errors: [],
}));
export const GetLiveInputRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    liveInputIdentifier: Schema.String.pipe(T.HttpPath("liveInputIdentifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/stream/live_inputs/{liveInputIdentifier}",
}));
export const GetLiveInputResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    deleteRecordingAfterDays: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getLiveInput = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetLiveInputRequest,
    output: GetLiveInputResponse,
    errors: [],
}));
export const ListLiveInputsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    includeCounts: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("include_counts")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/stream/live_inputs" }));
export const ListLiveInputsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    liveInputs: Schema.optional(Schema.Union([
        Schema.Array(Schema.Struct({
            created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            deleteRecordingAfterDays: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
            modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        })),
        Schema.Null,
    ])),
    range: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    total: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const listLiveInputs = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListLiveInputsRequest,
    output: ListLiveInputsResponse,
    errors: [],
}));
export const CreateLiveInputRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    defaultCreator: Schema.optional(Schema.String),
    deleteRecordingAfterDays: Schema.optional(Schema.Number),
    meta: Schema.optional(Schema.Unknown),
    recording: Schema.optional(Schema.Struct({
        allowedOrigins: Schema.optional(Schema.Array(Schema.String)),
        hideLiveViewerCount: Schema.optional(Schema.Boolean),
        mode: Schema.optional(Schema.Literals(["off", "automatic"])),
        requireSignedURLs: Schema.optional(Schema.Boolean),
        timeoutSeconds: Schema.optional(Schema.Number),
    })),
}).pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/stream/live_inputs" }));
export const CreateLiveInputResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    deleteRecordingAfterDays: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createLiveInput = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateLiveInputRequest,
    output: CreateLiveInputResponse,
    errors: [],
}));
export const UpdateLiveInputRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    liveInputIdentifier: Schema.String.pipe(T.HttpPath("liveInputIdentifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    defaultCreator: Schema.optional(Schema.String),
    deleteRecordingAfterDays: Schema.optional(Schema.Number),
    meta: Schema.optional(Schema.Unknown),
    recording: Schema.optional(Schema.Struct({
        allowedOrigins: Schema.optional(Schema.Array(Schema.String)),
        hideLiveViewerCount: Schema.optional(Schema.Boolean),
        mode: Schema.optional(Schema.Literals(["off", "automatic"])),
        requireSignedURLs: Schema.optional(Schema.Boolean),
        timeoutSeconds: Schema.optional(Schema.Number),
    })),
}).pipe(T.Http({
    method: "PUT",
    path: "/accounts/{account_id}/stream/live_inputs/{liveInputIdentifier}",
}));
export const UpdateLiveInputResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    deleteRecordingAfterDays: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const updateLiveInput = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateLiveInputRequest,
    output: UpdateLiveInputResponse,
    errors: [],
}));
export const DeleteLiveInputRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    liveInputIdentifier: Schema.String.pipe(T.HttpPath("liveInputIdentifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/stream/live_inputs/{liveInputIdentifier}",
}));
export const DeleteLiveInputResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
export const deleteLiveInput = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteLiveInputRequest,
    output: DeleteLiveInputResponse,
    errors: [],
}));
export const ListLiveInputOutputsRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    liveInputIdentifier: Schema.String.pipe(T.HttpPath("liveInputIdentifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/stream/live_inputs/{liveInputIdentifier}/outputs",
}));
export const ListLiveInputOutputsResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        streamKey: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    })),
});
export const listLiveInputOutputs = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListLiveInputOutputsRequest,
    output: ListLiveInputOutputsResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateLiveInputOutputRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    liveInputIdentifier: Schema.String.pipe(T.HttpPath("liveInputIdentifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    streamKey: Schema.String,
    url: Schema.String,
    enabled: Schema.optional(Schema.Boolean),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/stream/live_inputs/{liveInputIdentifier}/outputs",
}));
export const CreateLiveInputOutputResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    streamKey: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createLiveInputOutput = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateLiveInputOutputRequest,
    output: CreateLiveInputOutputResponse,
    errors: [],
}));
export const UpdateLiveInputOutputRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    liveInputIdentifier: Schema.String.pipe(T.HttpPath("liveInputIdentifier")),
    outputIdentifier: Schema.String.pipe(T.HttpPath("outputIdentifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    enabled: Schema.Boolean,
}).pipe(T.Http({
    method: "PUT",
    path: "/accounts/{account_id}/stream/live_inputs/{liveInputIdentifier}/outputs/{outputIdentifier}",
}));
export const UpdateLiveInputOutputResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    streamKey: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const updateLiveInputOutput = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateLiveInputOutputRequest,
    output: UpdateLiveInputOutputResponse,
    errors: [],
}));
export const DeleteLiveInputOutputRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    liveInputIdentifier: Schema.String.pipe(T.HttpPath("liveInputIdentifier")),
    outputIdentifier: Schema.String.pipe(T.HttpPath("outputIdentifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/stream/live_inputs/{liveInputIdentifier}/outputs/{outputIdentifier}",
}));
export const DeleteLiveInputOutputResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
export const deleteLiveInputOutput = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteLiveInputOutputRequest,
    output: DeleteLiveInputOutputResponse,
    errors: [],
}));
export const GetStreamRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/stream/{identifier}" }));
export const GetStreamResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    allowedOrigins: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    duration: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    input: Schema.optional(Schema.Union([
        Schema.Struct({
            height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
    liveInput: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    maxDurationSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    playback: Schema.optional(Schema.Union([
        Schema.Struct({
            dash: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            hls: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
    preview: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    readyToStream: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    readyToStreamAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    requireSignedURLs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    scheduledDeletion: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Struct({
            errorReasonCode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            errorReasonText: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            pctComplete: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            state: Schema.optional(Schema.Union([
                Schema.Literals([
                    "pendingupload",
                    "downloading",
                    "queued",
                    "inprogress",
                    "ready",
                    "error",
                    "live-inprogress",
                ]),
                Schema.Null,
            ])),
        }),
        Schema.Null,
    ])),
    thumbnail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    thumbnailTimestampPct: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uploaded: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uploadExpiry: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    watermark: Schema.optional(Schema.Union([
        Schema.Struct({
            created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            downloadedFrom: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            opacity: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            padding: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            position: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            scale: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const getStream = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetStreamRequest,
    output: GetStreamResponse,
    errors: [],
}));
export const ListStreamsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    asc: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("asc")),
    creator: Schema.optional(Schema.String).pipe(T.HttpQuery("creator")),
    end: Schema.optional(Schema.String).pipe(T.HttpQuery("end")),
    includeCounts: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("include_counts")),
    search: Schema.optional(Schema.String).pipe(T.HttpQuery("search")),
    start: Schema.optional(Schema.String).pipe(T.HttpQuery("start")),
    status: Schema.optional(Schema.Literals([
        "pendingupload",
        "downloading",
        "queued",
        "inprogress",
        "ready",
        "error",
        "live-inprogress",
    ])).pipe(T.HttpQuery("status")),
    type: Schema.optional(Schema.String).pipe(T.HttpQuery("type")),
    videoName: Schema.optional(Schema.String).pipe(T.HttpQuery("video_name")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/stream" }));
export const ListStreamsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        allowedOrigins: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        duration: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        input: Schema.optional(Schema.Union([
            Schema.Struct({
                height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
                width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            }),
            Schema.Null,
        ])),
        liveInput: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        maxDurationSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
        modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        playback: Schema.optional(Schema.Union([
            Schema.Struct({
                dash: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                hls: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
        preview: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        readyToStream: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        readyToStreamAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        requireSignedURLs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        scheduledDeletion: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        status: Schema.optional(Schema.Union([
            Schema.Struct({
                errorReasonCode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                errorReasonText: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                pctComplete: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                state: Schema.optional(Schema.Union([
                    Schema.Literals([
                        "pendingupload",
                        "downloading",
                        "queued",
                        "inprogress",
                        "ready",
                        "error",
                        "live-inprogress",
                    ]),
                    Schema.Null,
                ])),
            }),
            Schema.Null,
        ])),
        thumbnail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        thumbnailTimestampPct: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        uploaded: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        uploadExpiry: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        watermark: Schema.optional(Schema.Union([
            Schema.Struct({
                created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                downloadedFrom: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
                name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                opacity: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
                padding: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
                position: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                scale: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
                size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
                uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            }),
            Schema.Null,
        ])),
    })),
});
export const listStreams = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListStreamsRequest,
    output: ListStreamsResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateStreamRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    directUser: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("direct_user")),
    tusResumable: Schema.Literal("1.0.0").pipe(T.HttpHeader("Tus-Resumable")),
    uploadLength: Schema.Number.pipe(T.HttpHeader("Upload-Length")),
    uploadCreator: Schema.optional(Schema.String).pipe(T.HttpHeader("Upload-Creator")),
    uploadMetadata: Schema.optional(Schema.String).pipe(T.HttpHeader("Upload-Metadata")),
    body: Schema.Unknown.pipe(T.HttpBody()),
}).pipe(T.Http({ method: "POST", path: "/accounts/{account_id}/stream" }));
export const CreateStreamResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
export const createStream = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateStreamRequest,
    output: CreateStreamResponse,
    errors: [],
}));
export const DeleteStreamRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/stream/{identifier}",
}));
export const DeleteStreamResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
export const deleteStream = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteStreamRequest,
    output: DeleteStreamResponse,
    errors: [],
}));
export const EditStreamRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    allowedOrigins: Schema.optional(Schema.Array(Schema.String)),
    creator: Schema.optional(Schema.String),
    maxDurationSeconds: Schema.optional(Schema.Number),
    meta: Schema.optional(Schema.Unknown),
    requireSignedURLs: Schema.optional(Schema.Boolean),
    scheduledDeletion: Schema.optional(Schema.String),
    thumbnailTimestampPct: Schema.optional(Schema.Number),
    uploadExpiry: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/stream/{identifier}",
}));
export const EditStreamResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    allowedOrigins: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    duration: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    input: Schema.optional(Schema.Union([
        Schema.Struct({
            height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
    liveInput: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    maxDurationSeconds: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    meta: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
    modified: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    playback: Schema.optional(Schema.Union([
        Schema.Struct({
            dash: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            hls: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
    preview: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    readyToStream: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    readyToStreamAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    requireSignedURLs: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    scheduledDeletion: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Struct({
            errorReasonCode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            errorReasonText: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            pctComplete: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            state: Schema.optional(Schema.Union([
                Schema.Literals([
                    "pendingupload",
                    "downloading",
                    "queued",
                    "inprogress",
                    "ready",
                    "error",
                    "live-inprogress",
                ]),
                Schema.Null,
            ])),
        }),
        Schema.Null,
    ])),
    thumbnail: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    thumbnailTimestampPct: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uploaded: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    uploadExpiry: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    watermark: Schema.optional(Schema.Union([
        Schema.Struct({
            created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            downloadedFrom: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            opacity: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            padding: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            position: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            scale: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const editStream = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: EditStreamRequest,
    output: EditStreamResponse,
    errors: [],
}));
export const CreateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    id: Schema.optional(Schema.String),
    accessRules: Schema.optional(Schema.Array(Schema.Struct({
        action: Schema.optional(Schema.Literals(["allow", "block"])),
        country: Schema.optional(Schema.Array(Schema.String)),
        ip: Schema.optional(Schema.Array(Schema.String)),
        type: Schema.optional(Schema.Literals(["any", "ip.src", "ip.geoip.country"])),
    }))),
    downloadable: Schema.optional(Schema.Boolean),
    exp: Schema.optional(Schema.Number),
    nbf: Schema.optional(Schema.Number),
    pem: Schema.optional(Schema.String),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/stream/{identifier}/token",
}));
export const CreateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    token: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createToken = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateTokenRequest,
    output: CreateTokenResponse,
    errors: [],
}));
export const StorageUsageVideoRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    creator: Schema.optional(Schema.String).pipe(T.HttpQuery("creator")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/stream/storage-usage",
}));
export const StorageUsageVideoResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    creator: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    totalStorageMinutes: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    totalStorageMinutesLimit: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    videoCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const storageUsageVideo = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StorageUsageVideoRequest,
    output: StorageUsageVideoResponse,
    errors: [],
}));
export const GetWatermarkRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/stream/watermarks/{identifier}",
}));
export const GetWatermarkResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    downloadedFrom: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    opacity: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    padding: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    position: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    scale: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getWatermark = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetWatermarkRequest,
    output: GetWatermarkResponse,
    errors: [],
}));
export const ListWatermarksRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/stream/watermarks" }));
export const ListWatermarksResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        downloadedFrom: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        opacity: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        padding: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        position: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        scale: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    })),
});
export const listWatermarks = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListWatermarksRequest,
    output: ListWatermarksResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateWatermarkRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    file: Schema.String,
    name: Schema.optional(Schema.String),
    opacity: Schema.optional(Schema.Number),
    padding: Schema.optional(Schema.Number),
    position: Schema.optional(Schema.String),
    scale: Schema.optional(Schema.Number),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/stream/watermarks",
    contentType: "multipart",
}));
export const CreateWatermarkResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    downloadedFrom: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    height: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    opacity: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    padding: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    position: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    scale: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    size: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    uid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    width: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createWatermark = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateWatermarkRequest,
    output: CreateWatermarkResponse,
    errors: [],
}));
export const DeleteWatermarkRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    identifier: Schema.String.pipe(T.HttpPath("identifier")),
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/stream/watermarks/{identifier}",
}));
export const DeleteWatermarkResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(T.ResponsePath("result"));
export const deleteWatermark = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteWatermarkRequest,
    output: DeleteWatermarkResponse,
    errors: [],
}));
export const GetWebhookRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/stream/webhook" }));
export const GetWebhookResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown.pipe(T.ResponsePath("result"));
export const getWebhook = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetWebhookRequest,
    output: GetWebhookResponse,
    errors: [],
}));
export const PutWebhookRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    notificationUrl: Schema.String,
}).pipe(T.Http({ method: "PUT", path: "/accounts/{account_id}/stream/webhook" }));
export const PutWebhookResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown.pipe(T.ResponsePath("result"));
export const putWebhook = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutWebhookRequest,
    output: PutWebhookResponse,
    errors: [],
}));
export const DeleteWebhookRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({ method: "DELETE", path: "/accounts/{account_id}/stream/webhook" }));
export const DeleteWebhookResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(T.ResponsePath("result"));
export const deleteWebhook = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteWebhookRequest,
    output: DeleteWebhookResponse,
    errors: [],
}));
//# sourceMappingURL=stream.js.map