import { ERPObjType } from "../../types/erp-types.js"; import type { Knex } from "knex"; export type BatchResult = { duplicates: T[]; nonDuplicates: T[]; }; type BatchCacheManagerOptions = { ttl?: number; tableName?: string; /** Injectable Knex handle (tests); defaults to the SDK's local SQLite. */ db?: Knex; }; export declare class BatchCacheManager { private cacheManager; constructor(options?: BatchCacheManagerOptions); /** * Checks a batch of objects against the cache and separates them into duplicates and non-duplicates * @param type The type of objects * @param objects Array of objects to check * @returns Object containing arrays of duplicate and non-duplicate objects */ dedupeBatch(type: ERPObjType, objects: object[]): Promise>; /** * Stores a batch of objects in the cache * @param type The type of objects * @param objects Array of objects to store */ storeBatch(type: ERPObjType, objects: object[]): Promise<{ totalInserted: number; }>; /** * Removes objects from the cache * @param type The type of objects * @param objects Array of objects to remove */ removeObjects(type: ERPObjType, objects: object[]): Promise; /** * Gets all records of a specific type */ getRecordsByType(type: ERPObjType): Promise; /** * Removes all records of a specific type */ removeRecordsByType(type: ERPObjType): Promise; /** * Clears all records from the cache */ clear(): Promise; /** * Cleans up resources */ destroy(): Promise; } export {}; //# sourceMappingURL=batch-cache-manager.d.ts.map