30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
export type LedgerSnapshotRow = {
|
|
account_id: string;
|
|
available_balance: string;
|
|
locked_balance: string;
|
|
entries_sum: string;
|
|
last_entry_at: Date | null;
|
|
snapshot_at: Date;
|
|
};
|
|
export type AccountLedgerMeta = {
|
|
account_id: string;
|
|
available_balance: string;
|
|
locked_balance: string;
|
|
entries_sum: string;
|
|
last_entry_at: Date | null;
|
|
entry_count: string;
|
|
};
|
|
export declare function getAccountLedgerMeta(accountId: string): Promise<AccountLedgerMeta | null>;
|
|
export declare function getSnapshot(accountId: string): Promise<LedgerSnapshotRow | null>;
|
|
export declare function upsertSnapshot(meta: AccountLedgerMeta): Promise<void>;
|
|
/** Credits with missing or broken references to authorized source tables. */
|
|
export declare function listInvalidLedgerReferences(): Promise<Array<{
|
|
account_id: string;
|
|
user_id: string;
|
|
entry_id: string;
|
|
type: string;
|
|
amount: string;
|
|
issue: string;
|
|
}>>;
|
|
export declare function checksumBalances(meta: AccountLedgerMeta): string;
|
|
//# sourceMappingURL=ledgerIntegrityRepository.d.ts.map
|