import { APIResource } from '../resource.js'; import { APIPromise } from '../api-promise.js'; import type { RequestOptions } from '../internal/request-options.js'; export declare class AudioUpload extends APIResource { /** * Add any audio file to the video asset. * The response of this API call gives `upload_url` for each language specified. You need to send a `PUT` request of the audio files to those URLs. Once that's done, you need to call the audio upload complete API. Only after that will Gumlet add audio to the asset. * * @param {string} assetID - An asset id for the previously created asset. * @param {AudioUploadUploadParams} [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 audioUpload = await client.audioUpload.upload('assetId'); * ``` */ upload(assetID: string, body?: AudioUploadUploadParams | null | undefined, options?: RequestOptions): APIPromise; /** * Finish adding audio tracks to an existing video asset. Call this only after the audio files have been PUT to the upload URLs from the add-audio call. This attaches those tracks to the asset. * * @param {string} assetID - An asset id for the previously created asset. * @param {AudioUploadCompleteParams} [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 audioUpload = await client.audioUpload.complete('assetId'); * ``` */ complete(assetID: string, body?: AudioUploadCompleteParams | null | undefined, options?: RequestOptions): APIPromise; } export interface AudioUploadUploadParams { /** * List of language codes to upload audio file (use ISO 639-1 Language Codes) */ language_codes?: Array; } export interface AudioUploadUploadResponse { /** * Gumlet Asset ID */ asset_id: string; /** * Details about signed URLs for each language */ signed_urls: Array; } export declare namespace AudioUploadUploadResponse { interface SignedURL { /** * Audio language code */ language_code: string; /** * Upload URL on which actual audio file should be uploaded using a PUT request */ upload_url: string; } } export interface AudioUploadCompleteParams { upload_responses?: Array; } export declare namespace AudioUploadCompleteParams { interface UploadResponse { /** * Language code for uploaded audio file. */ language_code?: string; /** * Status of language uploaded audio file. (If status code was 200, You can mark true else false) */ uploaded?: boolean; } } export type AudioUploadCompleteResponse = Record; export declare namespace AudioUpload { export { type AudioUploadUploadResponse as AudioUploadUploadResponse, type AudioUploadCompleteResponse as AudioUploadCompleteResponse, type AudioUploadUploadParams as AudioUploadUploadParams, type AudioUploadCompleteParams as AudioUploadCompleteParams, }; } //# sourceMappingURL=audio-upload.d.ts.map