import { DBProto, IndexKeys, Logger } from '@nu-art/ts-common'; import { DBConfigV3, IndexDb_Query_V3, ReduceFunction_V3 } from './types.js'; type StoreResolver> = (dbConfig: DBConfigV3, write?: boolean, store?: IDBObjectStore) => Promise; type StoreExistsResolver> = (dbConfig: DBConfigV3) => Promise; export declare class IndexedDB_Store> extends Logger { private config; private storeResolver; private storeExistsResolver; constructor(config: DBConfigV3, storeResolver: StoreResolver, storeExistsResolver: StoreExistsResolver); getStore: (write?: boolean, store?: IDBObjectStore) => Promise; exists: () => Promise; count: () => Promise; private getCursor; private cursorHandler; insert(value: Proto['dbType'], _store?: IDBObjectStore): Promise; insertAll(values: Proto['dbType'][], _store?: IDBObjectStore): Promise; upsert(value: Proto['dbType'], _store?: IDBObjectStore): Promise; upsertAll(values: Proto['dbType'][], _store?: IDBObjectStore): Promise; get(key: IndexKeys): Promise; query(query: IndexDb_Query_V3): Promise; queryFilter(filter: (item: Proto['dbType']) => boolean, query?: IndexDb_Query_V3): Promise; WIP_queryMapNew(mapper: (item: Proto['dbType']) => Type, filter?: (item: Proto['dbType']) => boolean, query?: IndexDb_Query_V3): Promise; WIP_queryMap(mapper: (item: Proto['dbType']) => Type, filter?: (item: Proto['dbType']) => boolean, query?: IndexDb_Query_V3): Promise; queryFind(filter: (item: Proto['dbType']) => boolean): Promise; queryReduce(reducer: ReduceFunction_V3, initialValue: ReturnType, filter?: (item: Proto['dbType']) => boolean, query?: IndexDb_Query_V3): Promise; clearStore(): Promise; deleteAll(keys: (IndexKeys | Proto['dbType'])[]): Promise; /** * Delete by the uniqueKey of this collection - usually _id. * Pass the _id of the item to delete. */ delete(key: (IndexKeys | Proto['dbType'])): Promise; } export {};