import { type IDBPDatabase } from 'idb'; export declare const DB_NAME = "terra"; export declare enum IndexedDbStores { TIME_SERIES = "time-series", TIME_AVERAGE_MAP = "time-average-map" } /** * Get the indexedDB database */ export declare function getDb(): Promise>; /** * a helper for wrapping code that depends on an active database connection * this function will open the database, run the callback, and then cleanly close the database */ export declare function withDb(callback: (db: IDBPDatabase) => Promise): Promise; export declare function getDataByKey(store: IndexedDbStores, key: string): Promise; export declare function storeDataByKey(store: IndexedDbStores, key: string, data: T): Promise; export declare function deleteDataByKey(store: IndexedDbStores, key: string): Promise;