import { Readable } from 'stream'; export interface GenericFileData extends Record { metadata?: Record; content?: Record; error?: Error; } /** * A general-purpose base class for extracting data from downloaded * files. It handles instantiating from a buffer or a filepath, while concrete * implementations are expected to supply `getAll()` aandmd `getData()` methods. * If a specific implementation also supports additional data, overriding the `getAll()` * method allows it to bundle its information for use. */ export declare abstract class GenericFile { /** * An array of mimetypes, or glob strings matching mimetype patterns, that * the class can read and parse. */ static readonly mimeTypes: string[]; static readonly extensions: string[]; protected stream?: Readable; protected fileData?: Buffer; protected filePath?: string; constructor(file?: string | Buffer | Readable); getBuffer(): Promise; getStream(): Promise; abstract getMetadata(): Promise | undefined>; abstract getContent(): Promise | undefined>; getAll(): Promise; protected streamToBuffer(stream: Readable): Promise; } //# sourceMappingURL=generic-file.d.ts.map