import type { IUser } from '@rocket.chat/core-typings'; /** The user fields the 2FA checks read; `getUserForCheck` projects exactly these. */ export type TwoFactorUser = Pick; export interface IProcessInvalidCodeResult { codeGenerated: boolean; codeExpires?: Date; emailOrUsername?: string; } export interface ICodeCheck { readonly name: string; isEnabled(user: TwoFactorUser, force?: boolean): boolean; verify(user: TwoFactorUser, code: string, force?: boolean): Promise; processInvalidCode(user: TwoFactorUser): Promise; maxFaildedAttemtpsReached(user: TwoFactorUser): Promise; }