import { AccountRecord, ExtendedInboundGroupSessionData, GroupSessionRecord, HybridGroupSessionRecord, UserDeviceRecord } from './storeTypes'; import Dexie, { Table } from 'dexie'; import { InboundGroupSessionData } from './encryptionDevice'; import { UserDevice } from './olmLib'; import { CryptoStore } from './cryptoStore'; export declare class CryptoStoreIndexedDb extends Dexie implements CryptoStore { account: Table; outboundGroupSessions: Table; inboundGroupSessions: Table; hybridGroupSessions: Table; devices: Table; userId: string; constructor(databaseName: string, userId: string); initialize(): Promise; deleteAllData(): Promise; deleteInboundGroupSessions(streamId: string, sessionId: string): Promise; deleteOutboundGrounpSessions(streamId: string): Promise; deleteAccount(userId: string): Promise; getAccount(): Promise; storeAccount(accountPickle: string): Promise; storeEndToEndOutboundGroupSession(sessionId: string, sessionData: string, streamId: string): Promise; getEndToEndOutboundGroupSession(streamId: string): Promise; getAllEndToEndOutboundGroupSessions(): Promise; getEndToEndInboundGroupSession(streamId: string, sessionId: string): Promise; getHybridGroupSession(streamId: string, sessionId: string): Promise; getHybridGroupSessionsForStream(streamId: string): Promise; getAllEndToEndInboundGroupSessions(): Promise; getAllHybridGroupSessions(): Promise; deleteHybridGroupSessions(streamId: string): Promise; storeEndToEndInboundGroupSession(streamId: string, sessionId: string, sessionData: InboundGroupSessionData): Promise; storeHybridGroupSession(sessionData: HybridGroupSessionRecord): Promise; getInboundGroupSessionIds(streamId: string): Promise; getHybridGroupSessionIds(streamId: string): Promise; withAccountTx(fn: () => Promise): Promise; withGroupSessions(fn: () => Promise): Promise; /** * Only used for testing * @returns total number of devices in the store */ deviceRecordCount(): Promise; /** * Store a list of devices for a given userId * @param userId string * @param devices UserDeviceInfo[] * @param expirationMs Expiration time in milliseconds */ saveUserDevices(userId: string, devices: UserDevice[], expirationMs?: number): Promise; /** * Get all stored devices for a given userId * @param userId string * @returns UserDevice[], a list of devices */ getUserDevices(userId: string): Promise; } //# sourceMappingURL=CryptoStoreIndexedDb.d.ts.map