import { Dispatcher } from "undici"; import { InputSource } from "./inputSource.js"; import { BytesInput } from "./bytesInput.js"; /** * Remote input source represented by a validated HTTPS URL. */ export declare class UrlInput extends InputSource { /** * HTTPS URL of the remote input file. */ readonly url: string; /** * Dispatcher used for HTTP requests. */ readonly dispatcher: Dispatcher; constructor({ url, dispatcher }: { url: string; dispatcher?: Dispatcher; }); /** * Initializes this source by validating and storing the URL. */ init(): Promise; /** * Validates that a URL is safe to fetch: scheme must be https. */ static validateUrl(url: string): void; private fetchFileContent; /** * Downloads the URL content and writes it to disk. */ saveToFile(options: { filepath: string; filename?: string; username?: string; password?: string; token?: string; headers?: Record; maxRedirects?: number; }): Promise; /** * Downloads the URL content and returns it as a local bytes source. */ asLocalInputSource(options?: { filename?: string; username?: string; password?: string; token?: string; headers?: Record; maxRedirects?: number; }): Promise; private static extractFilenameFromUrl; private static generateFileName; private static getFileExtension; private fillFilename; private static maskCredentials; private static isSameOrigin; private makeRequest; }