import DataLoader from 'dataloader';
import { type IDatabaseConnection } from '@pgtyped/runtime';
import type { Optional, TimelessDateString } from '../../../shared/types/index.js';
import { TenantAwareDBClient } from '../../app-providers/tenant-db-client.js';
import type { IBatchUpdateChargesParams, IDeleteChargesByIdsParams, IGenerateChargeParams, IGetChargesByFiltersParams, IGetChargesByFiltersResult, IGetSimilarChargesParams, IUpdateAccountantApprovalParams, IUpdateChargeParams } from '../types.js';
import { ChargesAuthorizationProvider } from './charges-authorization.provider.js';
export type ChargeRequiredWrapper<T extends {
    id: unknown;
    owner_id: unknown;
    is_property: unknown;
    accountant_status: unknown;
    updated_at: unknown;
    created_at: unknown;
    documents_optional_flag: unknown;
    optional_vat: unknown;
}> = Omit<T, 'id' | 'owner_id' | 'is_property' | 'accountant_status' | 'updated_at' | 'created_at' | 'documents_optional_flag' | 'optional_vat'> & {
    id: NonNullable<T['id']>;
    owner_id: NonNullable<T['owner_id']>;
    is_property: NonNullable<T['is_property']>;
    accountant_status: NonNullable<T['accountant_status']>;
    updated_at: NonNullable<T['updated_at']>;
    created_at: NonNullable<T['created_at']>;
    documents_optional_flag: NonNullable<T['documents_optional_flag']>;
    optional_vat: NonNullable<T['optional_vat']>;
};
type IGetAdjustedChargesByFiltersParams = Optional<Omit<IGetChargesByFiltersParams, 'isOwnerIds' | 'isBusinessIds' | 'businessIds' | 'isIDs' | 'isTags' | 'tags' | 'isBusinessTripIds' | 'businessTripIds'>, 'ownerIds' | 'IDs' | 'asc' | 'sortColumn' | 'toDate' | 'fromDate'> & {
    toDate?: TimelessDateString | null;
    fromDate?: TimelessDateString | null;
    tags?: readonly string[] | null;
    businessIds?: readonly string[] | null;
    businessTripIds?: readonly string[] | null;
};
export declare class ChargesProvider {
    private db;
    private auth;
    constructor(db: TenantAwareDBClient, auth: ChargesAuthorizationProvider);
    private batchChargesByIds;
    getChargeByIdLoader: DataLoader<string, import("../types.js").IGetChargesByIdsResult | undefined, string>;
    private batchChargesByTransactionIds;
    getChargeByTransactionIdLoader: DataLoader<string, import("../types.js").IGetChargesByTransactionIdsResult | undefined, string>;
    getChargesByMissingRequiredInfo(): Promise<import("../types.js").IGetChargesByMissingRequiredInfoResult[]>;
    updateCharge(params: IUpdateChargeParams): Promise<import("../types.js").IUpdateChargeResult>;
    batchUpdateCharges(params: IBatchUpdateChargesParams): Promise<import("../types.js").IBatchUpdateChargesResult[]>;
    updateAccountantApproval(params: IUpdateAccountantApprovalParams): Promise<import("../types.js").IUpdateAccountantApprovalResult>;
    generateCharge(params: IGenerateChargeParams, dbConnection?: IDatabaseConnection): Promise<import("../types.js").IGenerateChargeResult>;
    getChargesByFilters(params: IGetAdjustedChargesByFiltersParams): Promise<IGetChargesByFiltersResult[]>;
    getSimilarCharges(params: IGetSimilarChargesParams): Promise<IGetChargesByFiltersResult[]>;
    deleteChargesByIds(params: IDeleteChargesByIdsParams): Promise<void[]>;
    deleteCharge(chargeId: string): Promise<void[]>;
    invalidateCharge(chargeId: string): Promise<void>;
    clearCache(): void;
}
export {};
