@accounter/server
Version:
The test suite is split into three Vitest projects for efficiency and isolation:
29 lines (28 loc) • 2.04 kB
TypeScript
import DataLoader from 'dataloader';
import { DBProvider } from '../../app-providers/db.provider.js';
import type { IDeleteFinancialAccountParams, IGetAllFinancialAccountsResult, IInsertFinancialAccountsParams, IUpdateFinancialAccountParams } from '../types.js';
export declare class FinancialAccountsProvider {
private dbProvider;
cache: {
get: <T>(key: import("node-cache").Key) => T | undefined;
set: {
<T>(key: import("node-cache").Key, value: T, ttl: number | string): boolean;
<T>(key: import("node-cache").Key, value: T): boolean;
};
delete: (keys: import("node-cache").Key | import("node-cache").Key[]) => number;
clear: () => void;
};
constructor(dbProvider: DBProvider);
private batchFinancialAccountsByOwnerIds;
getFinancialAccountsByOwnerIdLoader: DataLoader<string, import("../types.js").IGetFinancialAccountsByOwnerIdsResult[], import("node-cache").Key | import("node-cache").Key[]>;
private batchFinancialAccountsByAccountNumbers;
getFinancialAccountByAccountNumberLoader: DataLoader<string, import("../types.js").IGetFinancialAccountsByAccountNumbersResult | undefined, import("node-cache").Key | import("node-cache").Key[]>;
private batchFinancialAccountsByAccountIDs;
getFinancialAccountByAccountIDLoader: DataLoader<string, import("../types.js").IGetFinancialAccountsByAccountIDsResult | undefined, import("node-cache").Key | import("node-cache").Key[]>;
getAllFinancialAccounts(): Promise<IGetAllFinancialAccountsResult[]>;
updateFinancialAccount(params: IUpdateFinancialAccountParams): Promise<import("../types.js").IUpdateFinancialAccountResult>;
deleteFinancialAccount(params: IDeleteFinancialAccountParams): Promise<import("../types.js").IDeleteFinancialAccountResult[]>;
insertFinancialAccounts(params: IInsertFinancialAccountsParams): Promise<import("../types.js").IInsertFinancialAccountsResult[]>;
invalidateById(financialAccountId: string): Promise<void>;
clearCache(): void;
}