import { Repository } from 'typeorm'; import { NestAuthMFASecret } from '../../auth/entities/mfa-secret.entity'; import { NestAuthMfaRecoveryCode } from '../../auth/entities/mfa-recovery-code.entity'; import { MFAOptions } from '../../core/interfaces/mfa-options.interface'; import { NestAuthMFAMethodEnum } from '@ackplus/nest-auth-contracts'; import { NestAuthUser } from '../../user/entities/user.entity'; import { OtpFlowService } from './otp-flow.service'; import { EventEmitter2 } from '@nestjs/event-emitter'; import { NestAuthTrustedDevice } from '../entities/trusted-device.entity'; export declare class MfaService { private mfaSecretRepository; private mfaRecoveryCodeRepository; private userRepository; private trustedDeviceRepository; private eventEmitter; private readonly otpFlow; constructor(mfaSecretRepository: Repository, mfaRecoveryCodeRepository: Repository, userRepository: Repository, trustedDeviceRepository: Repository, eventEmitter: EventEmitter2, otpFlow: OtpFlowService); get mfaConfig(): MFAOptions; requireMfaEnabledForApp(throwError?: boolean): boolean; private checkIsMfaEnabledForApp; getVerifiedMethods(userId: string): Promise; getEnabledMethods(userId: string): Promise; sendMfaCode(userId: string, method: NestAuthMFAMethodEnum): Promise; verifyMfa(userId: string, inputOtp: string, method: NestAuthMFAMethodEnum): Promise; private markChannelVerified; setupTotpDevice(userId: string, deviceName?: string, label?: string): Promise<{ secret: string; qrCode: string; otpAuthUrl: string; issuer: string; account: string; }>; verifyTotpSetup(userId: string, secret: string, inputOtp: string): Promise; getTotpDevices(userId: string): Promise<{ id: string; deviceName: string; method: NestAuthMFAMethodEnum; lastUsedAt: Date; createdAt: Date; verified: boolean; }[]>; removeDevice(deviceId: string): Promise; isRequiresMfa(userId: string): Promise; isMfaEnabled(userId: string): Promise; markAsVerified(userId: string, deviceId: string): Promise; enableMFA(userId: string): Promise; disableMFA(userId: string): Promise; removeTotpDevice(deviceId: string, userId: string): Promise; private getRecoveryCodeSecret; generateRecoveryCodes(userId: string): Promise; generateRecoveryCode(userId: string): Promise; verifyAndConsumeRecoveryCode(userId: string, code: string): Promise; resetMfa(userId: string, code: string): Promise<{ message: string; }>; getAvailableMethods(): NestAuthMFAMethodEnum[]; isMfaRequired(): boolean; canUserToggleMfa(): boolean; getMfaConfig(): MFAOptions; hasRecoveryCode(userId: string): Promise; private getTrustedDeviceSecret; createTrustedDevice(userId: string, userAgent: string, ipAddress: string): Promise; validateTrustedDevice(userId: string, token: string): Promise; } //# sourceMappingURL=mfa.service.d.ts.map