export namespace LOCALSTORAGE_STORAGE_KEYS { const SYNCED: string; const WARMUPEDQUERIES: string; const LASTSEQUENCES: string; const LASTREPLICATEDDOCID: string; const ADAPTERNAME: string; const DB_NAMES: string; } export class PouchLocalStorage { constructor(storageEngine: any); storageEngine: any; /** * Destroy the storage data * * @returns {Promise} */ destroy(): Promise; /** * Persist the databases names * * @param {Array} dbNames - The db names * @returns {Promise} */ persistDatabasesNames(dbNames: Array): Promise; /** * Persist the last replicated doc id for a doctype * * @param {string} doctype - The replicated doctype * @param {string} id - The docid * * @returns {Promise} */ persistLastReplicatedDocID(doctype: string, id: string): Promise; /** * @returns {Promise>} */ getAllLastReplicatedDocID(): Promise>; /** * Get the last replicated doc id for a doctype * * @param {string} doctype - The doctype * @returns {Promise} The last replicated docid */ getLastReplicatedDocID(doctype: string): Promise; /** * Destroy all the replicated doc id * * @returns {Promise} */ destroyAllLastReplicatedDocID(): Promise; /** * Persist the synchronized doctypes * * @param {Record} syncedDoctypes - The sync doctypes * * @returns {Promise} */ persistSyncedDoctypes(syncedDoctypes: Record): Promise; /** * Get the persisted doctypes * * @returns {Promise} The synced doctypes */ getPersistedSyncedDoctypes(): Promise; /** * Destroy the synced doctypes * * @returns {Promise} */ destroySyncedDoctypes(): Promise; /** * Persist the last CouchDB sequence for a synced doctype * * @param {string} doctype - The synced doctype * @param {string} sequence - The sequence hash * * @returns {Promise} */ persistDoctypeLastSequence(doctype: string, sequence: string): Promise; /** * @returns {Promise} */ getAllLastSequences(): Promise; /** * Get the last CouchDB sequence for a doctype * * @param {string} doctype - The doctype * * @returns {Promise} the last sequence */ getDoctypeLastSequence(doctype: string): Promise; /** * Destroy all the last sequence * * @returns {Promise} */ destroyAllDoctypeLastSequence(): Promise; /** * Destroy the last sequence for a doctype * * @param {string} doctype - The doctype * * @returns {Promise} */ destroyDoctypeLastSequence(doctype: string): Promise; /** * Persist the warmed up queries * * @param {object} warmedUpQueries - The warmedup queries * * @returns {Promise} */ persistWarmedUpQueries(warmedUpQueries: object): Promise; /** * Get the warmed up queries * * @returns {Promise} the warmed up queries */ getPersistedWarmedUpQueries(): Promise; /** * Destroy the warmed queries * * @returns {Promise} */ destroyWarmedUpQueries(): Promise; /** * Get the adapter name * * @returns {Promise} The adapter name */ getAdapterName(): Promise; /** * Persist the adapter name * * @param {string} adapter - The adapter name * * @returns {Promise} */ persistAdapterName(adapter: string): Promise; }