/** * Task 1771 — every graph read the ledger tools make. * * Kept in one module so the Cypher that defines "the payments on this invoice" * exists once. If the payment read and the census read could disagree about * what counts as a payment, the census would be reconciling against a * different ledger than the one the tools write. */ import type { Session } from "neo4j-driver"; import type { InvoiceRead } from "../tools/payment-record.js"; import type { StatementRows } from "../tools/statement.js"; import type { LedgerCensusRows } from "../../../../../lib/ledger-core/dist/index.js"; /** * The display name of a counterparty node, or null if that element id does not * exist on this account. * * The invoice stores this name AND links to this node, so both must come from * one lookup. Taking the name from a separate argument would let an invoice * read as one company while pointing at another, and the account filter is * what stops an id from a neighbouring account resolving at all. */ export declare function readCounterpartyName(session: Session, accountId: string, nodeId: string): Promise; export declare function readInvoice(session: Session, accountId: string, ref: string): Promise; /** The op=verify re-read. Deliberately goes back to the graph rather than * trusting the figure the write path just computed. */ export declare function verifyOutstanding(session: Session, accountId: string, ref: string): Promise; /** Re-stamps paymentStatus on the parent invoice. schema-base.md requires the * property, so the only way to stop it lying is to keep it a projection of the * computed outstanding. */ export declare function setPaymentStatus(session: Session, accountId: string, ref: string, status: "open" | "part-paid" | "paid"): Promise; export declare function readStatement(session: Session, accountId: string): Promise; /** * The census rows. Each field answers one no-event failure mode: a payment * that never got its parent edge, a balance property that has reappeared on an * invoice, payments that look like accidental duplicates, and ledger indexes * that are declared in schema.cypher but absent from this database. */ export declare function readCensus(session: Session, accountId: string, now: number): Promise; //# sourceMappingURL=read.d.ts.map