mindee
Version:
Mindee Client Library for Node.js
36 lines (35 loc) • 1.07 kB
TypeScript
import { InputSource } from "./inputSource.js";
import { Dispatcher } from "undici";
import { BytesInput } from "./bytesInput.js";
export declare class UrlInput extends InputSource {
readonly url: string;
readonly dispatcher: Dispatcher;
constructor({ url, dispatcher }: {
url: string;
dispatcher?: Dispatcher;
});
init(): Promise<void>;
private fetchFileContent;
saveToFile(options: {
filepath: string;
filename?: string;
username?: string;
password?: string;
token?: string;
headers?: Record<string, string>;
maxRedirects?: number;
}): Promise<string>;
asLocalInputSource(options?: {
filename?: string;
username?: string;
password?: string;
token?: string;
headers?: Record<string, string>;
maxRedirects?: number;
}): Promise<BytesInput>;
private static extractFilenameFromUrl;
private static generateFileName;
private static getFileExtension;
private fillFilename;
private makeRequest;
}