import { IndexOptions } from 'mongodb'; import { ConnectionInformations, CreateUserServicePassword, DatabaseInterface, User, Session } from '@accounts/types'; import { AccountsMongoOptions } from './types'; export declare class Mongo implements DatabaseInterface { private options; private db; private collection; private sessions; private servicePassword; private serviceMagicLink; constructor(db: any, options?: AccountsMongoOptions); /** * Setup the mongo indexes needed. * @param options Options passed to the mongo native `createIndex` method. */ setupIndexes(options?: Omit): Promise; findUserById(userId: string): Promise; createUser(user: CreateUserServicePassword): Promise; findUserByEmail(email: string): Promise; findUserByUsername(username: string): Promise; findPasswordHash(userId: string): Promise; findUserByEmailVerificationToken(token: string): Promise; findUserByResetPasswordToken(token: string): Promise; addEmail(userId: string, newEmail: string, verified: boolean): Promise; removeEmail(userId: string, email: string): Promise; verifyEmail(userId: string, email: string): Promise; setUsername(userId: string, newUsername: string): Promise; setPassword(userId: string, newPassword: string): Promise; removeAllResetPasswordTokens(userId: string): Promise; addEmailVerificationToken(userId: string, email: string, token: string): Promise; addResetPasswordToken(userId: string, email: string, token: string, reason: string): Promise; addLoginToken(userId: string, email: string, token: string): Promise; findUserByLoginToken(token: string): Promise; removeAllLoginTokens(userId: string): Promise; createSession(userId: string, token: string, connection?: ConnectionInformations, extraData?: object): Promise; findSessionById(sessionId: string): Promise; findSessionByToken(token: string): Promise; updateSession(sessionId: string, connection: ConnectionInformations, newToken?: string): Promise; invalidateSession(sessionId: string): Promise; invalidateAllSessions(userId: string, excludedSessionIds?: string[]): Promise; findUserByServiceId(serviceName: string, serviceId: string): Promise; setService(userId: string, serviceName: string, service: object): Promise; unsetService(userId: string, serviceName: string): Promise; setUserDeactivated(userId: string, deactivated: boolean): Promise; }