import { DBIndex, DBProto, IndexKeys } from '@nu-art/ts-common'; export type ReduceFunction_V3 = (accumulator: ReturnType, arrayItem: ItemType, index?: number, array?: ItemType[]) => ReturnType; export type DBConfigV3> = { name: string; group: string; version?: number; autoIncrement?: boolean; uniqueKeys: (keyof Proto['dbType'])[]; indices?: DBIndex[]; upgradeProcessor?: (db: IDBDatabase) => void; }; export type IndexDb_Query_V3 = { query?: string | number | string[] | number[]; indexKey?: string; limit?: number; }; export declare class IndexedDBV3> { private db; private config; private static dbs; static getOrCreate>(config: DBConfigV3): IndexedDBV3; constructor(config: DBConfigV3); exists(): Promise; open(): Promise; readonly store: (write?: boolean, store?: IDBObjectStore) => 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; clearDB(): Promise; deleteDB(): Promise; deleteAll(keys: (IndexKeys | Proto['dbType'])[]): Promise; delete(key: (IndexKeys | Proto['dbType'])): Promise; }