UNPKG

@accounter/server

Version:
26 lines (25 loc) 807 B
import type { Document, Transaction } from '../types.js'; /** * Represents a charge with its associated transactions and documents */ interface Charge { id: string; owner_id: string | null; transactions?: Transaction[]; documents?: Document[]; } /** * Validate a charge is properly formed for matching * @throws Error with descriptive message if invalid */ export declare function validateChargeForMatching(charge: Charge): void; /** * Check if charge is matched (has both transactions and accounting documents) */ export declare function isChargeMatched(charge: Charge): boolean; /** * Validate that a charge is unmatched (for matching operations) * @throws Error if charge is already matched */ export declare function validateChargeIsUnmatched(charge: Charge): void; export {};