import DataLoader from 'dataloader';
import { type IDatabaseConnection } from '@pgtyped/runtime';
import type { Optional, TimelessDateString } from '../../../shared/types/index.js';
import { AdminContextProvider } from '../../admin-context/providers/admin-context.provider.js';
import { TenantAwareDBClient } from '../../app-providers/tenant-db-client.js';
import type { IDeleteDocumentParams, IGetAllDocumentsParams, IGetAllDocumentsResult, IGetDocumentsByExtendedFiltersParams, IGetDocumentsByFiltersParams, IInsertDocumentsParams, IReplaceDocumentsChargeIdParams, IUpdateDocumentParams } from '../types.js';
type IGetAdjustedDocumentsByFiltersParams = Optional<Omit<IGetDocumentsByFiltersParams, 'isIDs'>, 'IDs' | 'businessIDs'>;
type IGetAdjustedDocumentsByExtendedFiltersParams = Optional<Omit<IGetDocumentsByExtendedFiltersParams, 'isIDs' | 'fromDate' | 'toDate' | 'isUnmatched'>, 'IDs' | 'businessIDs' | 'ownerIDs'> & {
    fromDate?: TimelessDateString | null;
    toDate?: TimelessDateString | null;
    unmatched?: boolean | null;
};
export declare class DocumentsProvider {
    private db;
    private adminContextProvider;
    constructor(db: TenantAwareDBClient, adminContextProvider: AdminContextProvider);
    private allDocumentsCache;
    getAllDocuments(params: IGetAllDocumentsParams): Promise<IGetAllDocumentsResult[]>;
    private batchDocumentsByChargeIds;
    getDocumentsByChargeIdLoader: DataLoader<string, import("../types.js").IGetDocumentsByChargeIdResult[], string>;
    getDocumentsByFilters(params: IGetAdjustedDocumentsByFiltersParams): Promise<import("../types.js").IGetDocumentsByFiltersResult[]>;
    getDocumentsByExtendedFilters(params: IGetAdjustedDocumentsByExtendedFiltersParams): Promise<import("../types.js").IGetDocumentsByExtendedFiltersResult[]>;
    private batchDocumentsByIds;
    getDocumentsByIdLoader: DataLoader<string, import("../types.js").IGetDocumentsByIdsResult | null | undefined, string>;
    private batchDocumentsByBusinessIds;
    getDocumentsByBusinessIdLoader: DataLoader<string, import("../types.js").IGetDocumentsByBusinessIdsResult[] | null, string>;
    private batchDocumentsByHash;
    getDocumentByHash: DataLoader<number, import("../types.js").IGetDocumentsByHashesResult | null | undefined, number>;
    getDocumentsByMissingRequiredInfo(): Promise<import("../types.js").IGetDocumentsByMissingRequiredInfoResult[]>;
    updateDocument(params: IUpdateDocumentParams): Promise<import("../types.js").IUpdateDocumentResult[]>;
    deleteDocument(params: IDeleteDocumentParams): Promise<import("../types.js").IDeleteDocumentResult[]>;
    insertDocuments(params: IInsertDocumentsParams, dbConnection?: IDatabaseConnection): Promise<import("../types.js").IInsertDocumentsResult[]>;
    replaceDocumentsChargeId(params: IReplaceDocumentsChargeIdParams): Promise<import("../types.js").IReplaceDocumentsChargeIdResult[]>;
    invalidateById(id: string): Promise<void>;
    invalidateByChargeId(chargeId: string): Promise<void>;
    clearCache(): void;
}
export {};
