UNPKG

@accounter/server

Version:

25 lines (24 loc) 1.48 kB
import DataLoader from 'dataloader'; import { DBProvider } from '../../app-providers/db.provider.js'; import type { IGetAllFinancialAccountsResult } 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[]>; clearCache(): void; }