/** * URL to Base64 Conversion Utility * * Functions to convert URLs to base64 encoded strings. */ /** * Convert a URL to base64 encoded string * * @param url - The URL to fetch and convert * @returns Promise - Base64 encoded string * @throws Error if the URL cannot be fetched or converted */ declare function convertUrlToBase64(url: string): Promise; /** * Convert a URL to base64 data URI format * * @param url - The URL to fetch and convert * @param mimeType - Optional MIME type (will try to detect from response if not provided) * @returns Promise - Base64 data URI string (e.g., "data:image/png;base64,iVBORw0KGgo...") * @throws Error if the URL cannot be fetched or converted */ declare function convertUrlToBase64DataUri(url: string, mimeType?: string): Promise; /** * Convert multiple URLs to base64 strings * * @param urls - Array of URLs to convert * @returns Promise - Array of base64 encoded strings * @throws Error if any URL cannot be fetched or converted */ declare function convertUrlsToBase64(urls: string[]): Promise; /** * Convert multiple URLs to base64 data URIs * * @param urls - Array of URLs to convert * @param mimeTypes - Optional array of MIME types (will try to detect if not provided) * @returns Promise - Array of base64 data URI strings * @throws Error if any URL cannot be fetched or converted */ declare function convertUrlsToBase64DataUris(urls: string[], mimeTypes?: (string | undefined)[]): Promise; /** * Check if a string is a valid URL * * @param url - The string to check * @returns boolean - True if the string is a valid URL */ declare function isValidUrl(url: string): boolean; /** * Convert a URL to base64 with timeout * * @param url - The URL to fetch and convert * @param timeoutMs - Timeout in milliseconds (default: 10000) * @returns Promise - Base64 encoded string * @throws Error if the URL cannot be fetched within timeout or converted */ declare function convertUrlToBase64WithTimeout(url: string, timeoutMs?: number): Promise; export { convertUrlToBase64, convertUrlToBase64DataUri, convertUrlToBase64WithTimeout, convertUrlsToBase64, convertUrlsToBase64DataUris, isValidUrl };