/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import PluginAIServer from '../plugin';
import { DocumentLoaderLike, ParseableFile, ParsedDocumentResult } from './types';
export type CachedDocumentLoaderOptions = {
    loader: DocumentLoaderLike;
    parserVersion: string;
    parsedMimetype: string;
    parsedFileExtname: string;
    supports: (file: ParseableFile) => boolean;
};
export declare class CachedDocumentLoader {
    private readonly plugin;
    private readonly options;
    constructor(plugin: PluginAIServer, options: CachedDocumentLoaderOptions);
    load(file: ParseableFile): Promise<ParsedDocumentResult>;
    private loadFromCache;
    private persistParsedText;
    private updateSourceMeta;
    private resolveStorageName;
    private readTextFile;
    private documentsToText;
    private toDocumentsFromText;
    private getParseMeta;
    private toPlainObject;
    private get aiFilesRepo();
    private get fileManager();
}
