import { IDBPDatabase } from 'idb/with-async-ittr';
import { ContextListOptions } from '@api-client/core/build/browser.js';
import { HttpClientPersistance } from "./HttpClientPersistance.js";
import { Cursor } from './Cursor.js';
import { IListState } from './State.js';
import { HttpClientDB } from './types.js';
import { IdbUrlHistory } from './idb/IdbUrlHistory.js';
import { IdbWsHistory } from './idb/IdbWsHistory.js';
import { IdbProjectUi } from './idb/IdbProjectUi.js';
/**
 * The implementation of the API Client app database in IDB.
 */
export declare class HttpClientIdbDatabase implements HttpClientPersistance {
    #private;
    /**
     * The default limit of items returned by the list operation.
     * @default 35
     */
    defaultLimit: number;
    protected _db?: IDBPDatabase<HttpClientDB>;
    /**
     * The reference to the currently opened database.
     * This throws when the `initialize()` method wasn't called.
     */
    get db(): IDBPDatabase<HttpClientDB>;
    /**
     * File metadata store.
     */
    get urlHistory(): IdbUrlHistory;
    /**
     * File metadata store.
     */
    get wsHistory(): IdbWsHistory;
    /**
     * File metadata store.
     */
    get projectUi(): IdbProjectUi;
    initialize(): Promise<void>;
    cleanup(): Promise<void>;
    cursor: Cursor;
    readListState(source?: ContextListOptions): Promise<IListState>;
    /**
     * Creates a database cursor when there are results.
     * This sets `skip` and `lastKey` parameters.
     *
     * @param state The last list state object
     * @param results The read results.
     * @returns A cursor to be used with pagination.
     */
    createCursorIfNeeded(state: IListState, results: unknown[]): Promise<string | undefined>;
    /**
     * Opens the ARC store.
     * @returns The reference to the database
     */
    open(): Promise<IDBPDatabase<HttpClientDB>>;
    /**
     * Creates a default store where the stored object is identified by the `data.key` path.
     * @param name The store name to create
     * @param db The handler to the database
     */
    private _defaultUpgradeHandler;
    private _UrlHistoryUpgradeHandler;
    private _WsHistoryUpgradeHandler;
    private _ProjectUiUpgradeHandler;
}
//# sourceMappingURL=HttpClientIdbDatabase.d.ts.map