import { FetchParams } from './types'; export declare function decodeXmlEntities(text: string): string; export declare function retrieveVideoId(videoId: string): string; /** * Validate that a language code matches a BCP 47-like pattern. * @throws {@link YoutubeTranscriptInvalidLangError} if the language code is invalid. */ export declare function validateLang(lang: string): void; export declare function defaultFetch(params: FetchParams): Promise; /** Returns true if the HTTP status code is retryable (429 or 5xx). */ export declare function isRetryableStatus(status: number): boolean; /** * Wrap a fetch call with retry logic using exponential backoff. * * Retries on 429 (Too Many Requests) and 5xx (Server Errors). * Client errors (4xx other than 429) are returned immediately. * * @param fetchFn - Function that performs the fetch call. * @param retries - Maximum number of retry attempts (0 = no retries). * @param retryDelay - Base delay in milliseconds for exponential backoff. * @param signal - Optional AbortSignal to cancel the operation. * @returns The fetch Response. */ export declare function fetchWithRetry(fetchFn: () => Promise, retries: number, retryDelay: number, signal?: AbortSignal): Promise;