UNPKG

@accounter/server

Version:
18 lines (17 loc) 914 B
import { CommentaryProto } from '../types.js'; import { DecoratedLedgerRecord } from './profit-and-loss.helper.js'; export declare function updateRecords(amountsByEntity: Map<number, { amount: number; records: Map<string, number>; }>, amount: number, sortCode: number, financialEntityId: string): void; export type FilteringRule = (financialEntityId: string, sortCode: number) => boolean; export type FilteringOptions = { rule: FilteringRule; negate?: boolean; }; export declare function amountByFinancialEntityIdAndSortCodeValidations<T extends FilteringOptions[], R extends { [K in keyof T]: number; }>(unfilteredRecords: DecoratedLedgerRecord[], filteringRules: T): R; export declare function recordsByFinancialEntityIdAndSortCodeValidations<T extends FilteringOptions[], R extends { [K in keyof T]: CommentaryProto; }>(unfilteredRecords: DecoratedLedgerRecord[], filteringRules: T): R;