import type { CRUDEngine } from '@wireapp/store-engine' ; export enum DatabaseStores { AMPLIFY = 'amplify' , CLIENTS = 'clients' , KEYS = 'keys' , PRE_KEYS = 'prekeys' , SESSIONS = 'sessions' } export class CryptographyDatabaseRepository { public static readonly STORES = DatabaseStores ; constructor ( private readonly storeEngine ) { } public deleteStores ( ) { return Promise . all ( [ this . storeEngine . deleteAll ( CryptographyDatabaseRepository . STORES . AMPLIFY ) , this . storeEngine . deleteAll ( CryptographyDatabaseRepository . STORES . CLIENTS ) , this . storeEngine . deleteAll ( CryptographyDatabaseRepository . STORES . KEYS ) , this . storeEngine . deleteAll ( CryptographyDatabaseRepository . STORES . SESSIONS ) , this . storeEngine . deleteAll ( CryptographyDatabaseRepository . STORES . PRE_KEYS ) , ] ) ; } }