splid-js-googlesheet-updater/node_modules/splid-js/dist/cjs/getBalance.d.ts
2025-05-27 21:06:02 +02:00

13 lines
712 B
TypeScript

import { Entry } from './types/entry';
import { GroupInfo } from './types/groupInfo';
import { Person } from './types/person';
export type BalanceItem = {
balance: string;
payedFor: number;
payedBy: number;
};
export type Balance = Record<string, BalanceItem>;
/**
* might be off of the results of the Splid App by a single digit in some cases (single cent), because we haven't quite figured out their arcane rounding rules yet.
*/
export declare const getBalance: (people: Pick<Person, "GlobalId">[], entries: Pick<Entry, "GlobalId" | "isDeleted" | "primaryPayer" | "secondaryPayers" | "items" | "currencyCode">[], groupInfo?: Pick<GroupInfo, "currencyRates" | "defaultCurrencyCode">) => Balance;