import { StorageAdapter } from './storage_adapter'; /** * Adapter for managing data persistence using IndexedDB. * This adapter extends the `StorageAdapter` class and provides * methods to interact with IndexedDB for storing and retrieving data. */ export declare class IndexedDBAdapter extends StorageAdapter { private readonly dbName; private readonly storeName; private db; /** * Creates an instance of IndexedDBAdapter. * * @param {string} [dbName='cacheDB'] - The name of the database. * @param {string} [storeName='cacheStore'] - The name of the object store. */ constructor(dbName?: string, storeName?: string); /** * Connects the adapter by initializing the database and object store if they do not exist. * * @returns {Promise} A promise that resolves once the connection is ready. */ connect(): Promise; /** * Adds a key-value pair to the object store. * * @param {string} key - The key associated with the value. * @param {unknown} value - The value to store. * @returns {Promise} A promise that resolves once the data is stored. */ add(key: string, value: unknown): Promise; /** * Retrieves a value associated with a given key from the object store. * * @param {string} key - The key to retrieve. * @returns {Promise} A promise resolving to the value, or null if the key doesn't exist. */ get(key: string): Promise; /** * Retrieves all key-value pairs from the object store. * * @returns {Promise>} A promise resolving to an object containing all stored data. */ getAll(): Promise>; /** * Deletes a specific key and its associated value from the object store. * * @param {string} key - The key to delete. * @returns {Promise} A promise that resolves once the key is deleted. */ delete(key: string): Promise; /** * Clears all data from the object store. * * @returns {Promise} A promise that resolves once the data is cleared. */ clear(): Promise; /** * Handles transactions for interacting with the object store. * * @private * @template T * @param {IDBTransactionMode} mode - The transaction mode (e.g., 'readonly', 'readwrite'). * @param {(store: IDBObjectStore) => IDBRequest | Promise} callback - A callback function to perform operations within the transaction. * @returns {Promise} A promise resolving to the result of the transaction. */ private _withTransaction; /** * Converts an IndexedDB request into a Promise. * * @private * @template T * @param {IDBRequest} request - The IndexedDB request to promisify. * @returns {Promise} A promise resolving to the request result. */ private _promisifyRequest; }