import { APIResource } from '../resource'; import { APIPromise } from '../api-promise'; import type { RequestOptions } from '../internal/request-options'; export declare class LiveStreamAssets extends APIResource { /** * A live asset refers to media content/video that is live-streamed through Gumlet. This endpoint creates a live streaming asset allowing users to live stream a video that will be pushed to Gumlet. * * @param {LiveStreamAssetCreateParams} body - The request body to send. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} 200 * * @example * ```ts * const liveStreamAsset = await client.liveStreamAssets.create({ * live_source_id: '', * resolution: '', * }); * ``` */ create(body: LiveStreamAssetCreateParams, options?: RequestOptions): APIPromise; /** * A live asset refers to media content/video that is live-streamed through Gumlet. This endpoint allows users to update a live streaming asset. * * @param {LiveStreamAssetUpdateParams} body - The request body to send. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} 200 * * @example * ```ts * const liveStreamAsset = await client.liveStreamAssets.update({ * live_asset_id: '', * }); * ``` */ update(body: LiveStreamAssetUpdateParams, options?: RequestOptions): APIPromise; /** * This endpoint retrieves the details of a live video asset that has previously been created. * * @param {string} liveAssetID - A live asset id for the previously created asset. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} 200 * * @example * ```ts * const liveStreamAsset = await client.liveStreamAssets.retrieveStatus('liveAssetId'); * ``` */ retrieveStatus(liveAssetID: string, options?: RequestOptions): APIPromise; /** * This endpoint removes a live asset given its unique live asset id. The live asset will be removed from storage as well, associated URLs will be inaccessible. * * @param {string} liveAssetID - Live asset id of the live asset which needs to be deleted. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} 204 * * @example * ```ts * const liveStreamAsset = await client.liveStreamAssets.delete('liveAssetId'); * ``` */ delete(liveAssetID: string, options?: RequestOptions): APIPromise; /** * This endpoint allows marking live assets complete. Once the live asset is marked complete, it can no longer be used to ingest the live stream on Gumlet. * * @param {string} liveAssetID - Live asset id of the live stream which needs to be completed. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} 200 * * @example * ```ts * const liveStreamAsset = await client.liveStreamAssets.complete('liveAssetId'); * ``` */ complete(liveAssetID: string, options?: RequestOptions): APIPromise; /** * This endpoint lists live assets on the basis of `status` for the given `live_source_id`. * * Pagination uses `page_number` / `page_size`. Use `next_page_token` for cursor-based pagination. * * @param {string} liveSourceID - Gumlet live source/collection id. * @param {LiveStreamAssetFilterParams} [query] - The parameters to send with the request. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} 200 * * @example * ```ts * const liveStreamAsset = await client.liveStreamAssets.filter('liveSourceId', { * page_number: 1, * page_size: 20, * }); * ``` */ filter(liveSourceID: string, query?: LiveStreamAssetFilterParams | null | undefined, options?: RequestOptions): APIPromise; /** * Start a live stream. * * @param {string} liveAssetID - List asset id for which the stream needs to start. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * * @example * ```ts * await client.liveStreamAssets.start('liveAssetId'); * ``` */ start(liveAssetID: string, options?: RequestOptions): APIPromise; /** * Generate presigned upload URLs for live stream thumbnails. Supported thumbnail states are `preparing`, `disconnected`, and `end`. * * @param {LiveStreamAssetUploadParams} body - The request body to send. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} 200 * * @example * ```ts * const liveStreamAsset = await client.liveStreamAssets.upload({ * live_asset_id: '68c406b147f9ad0c0d584ce2', * statuses: ['preparing', 'disconnected'], * }); * ``` */ upload(body: LiveStreamAssetUploadParams, options?: RequestOptions): APIPromise; /** * This endpoint retrieves the history of a live video asset that has previously been created. * * @param {string} liveAssetID - A live asset id for the previously created asset. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} 200 * * @example * ```ts * const liveStreamAsset = await client.liveStreamAssets.statusHistory('liveAssetId'); * ``` */ statusHistory(liveAssetID: string, options?: RequestOptions): APIPromise; } export interface LiveStreamAssetCreateParams { /** * Gumlet live video source/collection id. */ live_source_id: string; /** * Required resolutions in HLS delivery format for live stream. Can be an array of string out of the following values: `240p`, `360p`, `480p`, `540p`, `720p`, and `1080p`. Resized rendition will retain the input aspect ratio. */ resolution: string; /** * Your live stream asset title */ title?: string; /** * Creates MP4 version for download purpose. */ mp4_access?: boolean; orientation?: 'landscape' | 'portrait'; /** * @format date-time */ start_at?: string; } export interface LiveStreamAssetCreateResponse { status?: string; stream_key?: string; live_asset_id?: string; live_video_source_id?: string; input?: LiveStreamAssetCreateResponse.Input; stream_url?: string; output?: LiveStreamAssetCreateResponse.Output; thumbnail?: LiveStreamAssetCreateResponse.Thumbnail; /** * @default 0 */ created_at?: number; /** * @default 0 */ updated_at?: number; vod_asset_id?: string; } export declare namespace LiveStreamAssetCreateResponse { interface Input { resolution?: Array; title?: string; } interface Output { playback_url?: string; recording_playback_url?: string; recording_dash_playback_url?: string; } interface Thumbnail { preparing?: string; disconnected?: string; end?: string; } } export interface LiveStreamAssetUpdateParams { /** * Gumlet live video asset id. */ live_asset_id: string; /** * Your live stream asset title */ title?: string; /** * @format date-time */ start_at?: string; } export interface LiveStreamAssetUpdateResponse { status?: string; stream_key?: string; live_asset_id?: string; live_video_source_id?: string; input?: LiveStreamAssetUpdateResponse.Input; stream_url?: string; output?: LiveStreamAssetUpdateResponse.Output; thumbnail?: LiveStreamAssetUpdateResponse.Thumbnail; /** * @default 0 */ created_at?: number; /** * @default 0 */ updated_at?: number; vod_asset_id?: string; } export declare namespace LiveStreamAssetUpdateResponse { interface Input { resolution?: Array; title?: string; } interface Output { playback_url?: string; recording_playback_url?: string; recording_dash_playback_url?: string; } interface Thumbnail { preparing?: string; disconnected?: string; end?: string; } } export interface LiveStreamAssetRetrieveStatusResponse { status?: string; stream_key?: string; live_asset_id?: string; live_video_source_id?: string; input?: LiveStreamAssetRetrieveStatusResponse.Input; stream_url?: string; output?: LiveStreamAssetRetrieveStatusResponse.Output; thumbnail?: LiveStreamAssetRetrieveStatusResponse.Thumbnail; /** * @default 0 */ created_at?: number; /** * @default 0 */ updated_at?: number; vod_asset_id?: string; } export declare namespace LiveStreamAssetRetrieveStatusResponse { interface Input { resolution?: Array; title?: string; } interface Output { playback_url?: string; recording_playback_url?: string; recording_dash_playback_url?: string; } interface Thumbnail { preparing?: string; disconnected?: string; end?: string; } } export type LiveStreamAssetDeleteResponse = Record; export type LiveStreamAssetCompleteResponse = Record; export interface LiveStreamAssetFilterParams { /** * To filter live assets on the basis of their current status. Can be specified as a single status value string or comma-separated status values. The status value can be one of `created`, `active`, `complete`, `disconnected`, `errored`, and `deleted`. */ status?: string; /** * Page number to retrieve. Starts at `1`. * @default 1 * @minimum 1 */ page_number?: number; /** * Number of items to return per page. **Default: `20`**. **Maximum: `100`**. * @minimum 1 * @maximum 100 */ page_size?: number; /** * Cursor for the next page. Pass the `next_page_token` value returned in the previous response. * @pattern ^[a-fA-F0-9]{24}$ */ next_page_token?: string; } export interface LiveStreamAssetFilterResponse { all_live_assets?: Array; /** * @default 0 */ total_live_asset_count?: number; /** * @default 0 */ current_offset?: number; /** * Cursor for the next page when more results exist. Empty string when there is no next page. */ next_page_token?: string; /** * Page size used for this response when it differs from the default. */ page_size?: number; } export declare namespace LiveStreamAssetFilterResponse { interface AllLiveAsset { status?: string; stream_key?: string; live_asset_id?: string; live_video_source_id?: string; input?: AllLiveAsset.Input; stream_url?: string; output?: AllLiveAsset.Output; thumbnail?: AllLiveAsset.Thumbnail; /** * @default 0 */ created_at?: number; /** * @default 0 */ updated_at?: number; deleted_at?: number; } namespace AllLiveAsset { interface Input { resolution?: Array; title?: string; } interface Output { playback_url?: string; recording_playback_url?: string; recording_dash_playback_url?: string; } interface Thumbnail { preparing?: string; disconnected?: string; end?: string; } } } export interface LiveStreamAssetUploadParams { /** * Gumlet live video asset id. */ live_asset_id: string; /** * Thumbnail states to upload. You can send an array or a comma-separated string. */ statuses: Array<'preparing' | 'disconnected' | 'end'> | string; } export interface LiveStreamAssetUploadResponse { message?: string; presigned_upload_urls?: LiveStreamAssetUploadResponse.PresignedUploadURLs; } export declare namespace LiveStreamAssetUploadResponse { interface PresignedUploadURLs { preparing?: string; disconnected?: string; end?: string; } } export interface LiveStreamAssetStatusHistoryResponse { status?: string; stream_key?: string; live_asset_id?: string; live_video_source_id?: string; input?: LiveStreamAssetStatusHistoryResponse.Input; stream_url?: string; output?: LiveStreamAssetStatusHistoryResponse.Output; /** * @default 0 */ created_at?: number; /** * @default 0 */ updated_at?: number; } export declare namespace LiveStreamAssetStatusHistoryResponse { interface Input { resolution?: Array; } interface Output { playback_url?: string; } } export declare namespace LiveStreamAssets { export { type LiveStreamAssetCreateResponse as LiveStreamAssetCreateResponse, type LiveStreamAssetUpdateResponse as LiveStreamAssetUpdateResponse, type LiveStreamAssetRetrieveStatusResponse as LiveStreamAssetRetrieveStatusResponse, type LiveStreamAssetDeleteResponse as LiveStreamAssetDeleteResponse, type LiveStreamAssetCompleteResponse as LiveStreamAssetCompleteResponse, type LiveStreamAssetFilterResponse as LiveStreamAssetFilterResponse, type LiveStreamAssetUploadResponse as LiveStreamAssetUploadResponse, type LiveStreamAssetStatusHistoryResponse as LiveStreamAssetStatusHistoryResponse, type LiveStreamAssetCreateParams as LiveStreamAssetCreateParams, type LiveStreamAssetUpdateParams as LiveStreamAssetUpdateParams, type LiveStreamAssetFilterParams as LiveStreamAssetFilterParams, type LiveStreamAssetUploadParams as LiveStreamAssetUploadParams, }; } //# sourceMappingURL=live-stream-assets.d.ts.map