/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as ElevenLabs from "../../../index"; import * as stream from "stream"; export declare namespace History { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; /** Override the xi-api-key header */ apiKey?: core.Supplier; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the xi-api-key header */ apiKey?: string | undefined; /** Additional headers to include in the request. */ headers?: Record; } } export declare class History { protected readonly _options: History.Options; constructor(_options?: History.Options); /** * Returns a list of your generated audio. * * @param {ElevenLabs.HistoryGetAllRequest} request * @param {History.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.history.getAll() */ getAll(request?: ElevenLabs.HistoryGetAllRequest, requestOptions?: History.RequestOptions): Promise; /** * Retrieves a history item. * * @param {string} historyItemId - ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items. * @param {History.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.history.get("VW7YKqPnjY4h39yTbx2L") */ get(historyItemId: string, requestOptions?: History.RequestOptions): Promise; /** * Delete a history item by its ID * * @param {string} historyItemId - ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items. * @param {History.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.history.delete("VW7YKqPnjY4h39yTbx2L") */ delete(historyItemId: string, requestOptions?: History.RequestOptions): Promise; /** * Returns the audio of an history item. * @throws {@link ElevenLabs.UnprocessableEntityError} */ getAudio(historyItemId: string, requestOptions?: History.RequestOptions): Promise; /** * Download one or more history items. If one history item ID is provided, we will return a single audio file. If more than one history item IDs are provided, we will provide the history items packed into a .zip file. * @throws {@link ElevenLabs.BadRequestError} * @throws {@link ElevenLabs.UnprocessableEntityError} */ download(request: ElevenLabs.DownloadHistoryRequest, requestOptions?: History.RequestOptions): Promise; }