import { Document } from "../Node.js"; import { FileReader, type Language, type ResultType } from "./type.js"; /** * Represents a reader for parsing files using the LlamaParse API. * See https://github.com/run-llama/llama_parse */ export declare class LlamaParseReader extends FileReader { apiKey: string; baseUrl: string; resultType: ResultType; checkInterval: number; maxTimeout: number; verbose: boolean; language: Language; parsingInstruction?: string; skipDiagonalText?: boolean; invalidateCache?: boolean; doNotCache?: boolean; fastMode?: boolean; doNotUnrollColumns?: boolean; pageSeperator?: string; gpt4oMode: boolean; gpt4oApiKey?: string; constructor(params?: Partial); private createJob; private getJobResult; /** * Loads data from a file and returns an array of Document objects. * To be used with resultType = "text" and "markdown" * * @param {Buffer} fileContent - The content of the file to be loaded. * @param {string} [fileName] - The optional name of the file to be loaded. * @return {Promise} A Promise object that resolves to an array of Document objects. */ loadDataAsContent(fileContent: Buffer, fileName?: string): Promise; /** * Loads data from a file and returns an array of JSON objects. * To be used with resultType = "json" * * @param {string} file - The path to the file to be loaded. * @return {Promise[]>} A Promise that resolves to an array of JSON objects. */ loadJson(file: string): Promise[]>; /** * Downloads and saves images from a given JSON result to a specified download path. * Currently only supports resultType = "json" * * @param {Record[]} jsonResult - The JSON result containing image information. * @param {string} downloadPath - The path to save the downloaded images. * @return {Promise[]>} A Promise that resolves to an array of image objects. */ getImages(jsonResult: Record[], downloadPath: string): Promise[]>; private getMimeType; }