import { EntityManager, Repository } from 'typeorm';
import { ClsService } from 'nestjs-cls';
import { TenantAwareRepository } from '../../../common/repositories/tenant-aware.repository';
import { CashHeldMovementEntity } from '../../../entities/cash-held-movement.entity';
export interface CashHolderRow {
    holder_key: string;
    holder_type: 'OWN' | 'SUPPLIER';
    collector_name: string | null;
    supplier_id: string | null;
    supplier_name: string | null;
    driver_id: string | null;
    driver_name: string | null;
    currency_id: string;
    currency_code: string | null;
    pending: number;
    held: number;
    last_activity: string | null;
}
export interface CashHeldEventRow {
    id: string;
    source: 'RECEIPT' | 'MOVEMENT';
    kind: string;
    direction: 'IN' | 'OUT' | null;
    status: string | null;
    amount: number;
    date: string;
    created_at: string;
    booking_id: string | null;
    booking_number: string | null;
    related_holder: string | null;
    supplier_payout_id: string | null;
    voucher_no: string | null;
    bank_account_name: string | null;
    ref_no: string | null;
    notes: string | null;
    created_by_name: string | null;
}
export declare class CashHeldRepository extends TenantAwareRepository<CashHeldMovementEntity> {
    constructor(repo: Repository<CashHeldMovementEntity>, cls: ClsService);
    listHolders(filter: {
        currency_id?: string;
        search?: string;
    }): Promise<CashHolderRow[]>;
    history(holderKey: string, currencyId: string): Promise<CashHeldEventRow[]>;
    balance(em: EntityManager, holderKey: string, currencyId: string): Promise<number>;
    lockHolder(em: EntityManager, holderKey: string): Promise<void>;
    insert(em: EntityManager, row: Partial<CashHeldMovementEntity>): Promise<CashHeldMovementEntity>;
}
