import { VideoTranslationAudioResponse } from "@vot.js/shared/protos"; import type { RequestLang, ResponseLang } from "@vot.js/shared/types/data"; import type { ClientSession, SessionModule } from "@vot.js/shared/types/secure"; import type { ClientResponse, FetchFunction, URLSchema, VOTOpts, VOTSessions } from "./types/client.js"; import { VideoService } from "./types/service.js"; import type { GetSubtitlesVOTOpts, VideoTranslationVOTOpts } from "./types/vot.js"; import type { AudioBufferObject, GetSubtitlesResponse, PartialAudioBufferObject, PartialAudioObject, StreamPingOptions, StreamTranslationOpts, StreamTranslationResponse, VideoSubtitlesOpts, VideoTranslationCacheOpts, VideoTranslationCacheResponse, VideoTranslationFailAudioResponse, VideoTranslationOpts, VideoTranslationResponse } from "./types/yandex.js"; export declare class VOTJSError extends Error { data: unknown; constructor(message: string, data?: unknown); } export declare class MinimalClient { host: string; schema: URLSchema; fetch: FetchFunction; fetchOpts: Record; sessions: VOTSessions; userAgent: string; headers: Record; hostSchemaRe: RegExp; constructor({ host, fetchFn, fetchOpts, headers, }?: VOTOpts); request(path: string, body: Uint8Array, headers?: Record, method?: string): Promise>; requestJSON(path: string, body?: unknown, headers?: Record, method?: string): Promise>; getOpts(body: unknown, headers?: Record, method?: string): { method: string; headers: { [x: string]: string; }; body: unknown; }; getSession(module: SessionModule): Promise; createSession(module: SessionModule): Promise<{ uuid: string; secretKey: string; expires: number; }>; } export default class VOTClient extends MinimalClient { hostVOT: string; schemaVOT: URLSchema; apiToken: string | undefined; requestLang: RequestLang; responseLang: ResponseLang; paths: { videoTranslation: string; videoTranslationFailAudio: string; videoTranslationAudio: string; videoTranslationCache: string; videoSubtitles: string; streamPing: string; streamTranslation: string; }; isCustomLink(url: string): boolean; headersVOT: Record; constructor({ host, hostVOT, fetchFn, fetchOpts, requestLang, responseLang, apiToken, headers, }?: VOTOpts); protected get apiTokenHeader(): Record; requestVOT(path: string, body: NonNullable, headers?: Record): Promise>; protected translateVideoYAImpl({ videoData, requestLang, responseLang, translationHelp, headers, extraOpts, shouldSendFailedAudio, }: VideoTranslationOpts): Promise; protected translateVideoVOTImpl({ url, videoId, service, requestLang, responseLang, headers, provider, }: VideoTranslationVOTOpts): Promise; requestVtransFailAudio(url: string): Promise>; requestVtransAudio(url: string, translationId: string, audioBuffer: AudioBufferObject, partialAudio?: never, headers?: Record): Promise; requestVtransAudio(url: string, translationId: string, audioBuffer: PartialAudioBufferObject, partialAudio: PartialAudioObject, headers?: Record): Promise; translateVideoCache({ videoData, requestLang, responseLang, headers, }: VideoTranslationCacheOpts): Promise; translateVideo({ videoData, requestLang, responseLang, translationHelp, headers, extraOpts, shouldSendFailedAudio, }: VideoTranslationOpts): Promise; protected getSubtitlesYAImpl({ videoData, requestLang, headers, }: VideoSubtitlesOpts): Promise; protected getSubtitlesVOTImpl({ url, videoId, service, headers, }: GetSubtitlesVOTOpts): Promise; getSubtitles({ videoData, requestLang, headers, }: VideoSubtitlesOpts): Promise; pingStream({ pingId, headers }: StreamPingOptions): Promise; translateStream({ videoData, requestLang, responseLang, headers, }: StreamTranslationOpts): Promise; } export declare class VOTWorkerClient extends VOTClient { constructor(opts?: VOTOpts); request(path: string, body: Uint8Array, headers?: Record, method?: string): Promise>; requestJSON(path: string, body?: unknown, headers?: Record, method?: string): Promise>; } //# sourceMappingURL=client.d.ts.map