import { Repository } from 'typeorm';
import { NestAuthMFASecret } from '../../auth/entities/mfa-secret.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 userRepository;
    private trustedDeviceRepository;
    private eventEmitter;
    private readonly otpFlow;
    constructor(mfaSecretRepository: Repository<NestAuthMFASecret>, userRepository: Repository<NestAuthUser>, trustedDeviceRepository: Repository<NestAuthTrustedDevice>, eventEmitter: EventEmitter2, otpFlow: OtpFlowService);
    get mfaConfig(): MFAOptions;
    requireMfaEnabledForApp(throwError?: boolean): boolean;
    private checkIsMfaEnabledForApp;
    getVerifiedMethods(userId: string): Promise<NestAuthMFAMethodEnum[]>;
    getEnabledMethods(userId: string): Promise<NestAuthMFAMethodEnum[]>;
    sendMfaCode(userId: string, method: NestAuthMFAMethodEnum): Promise<boolean>;
    verifyMfa(userId: string, inputOtp: string, method: NestAuthMFAMethodEnum): Promise<boolean>;
    private markChannelVerified;
    setupTotpDevice(userId: string, deviceName?: string): Promise<{
        secret: string;
        qrCode: string;
    }>;
    verifyTotpSetup(userId: string, secret: string, inputOtp: string): Promise<boolean>;
    getTotpDevices(userId: string): Promise<{
        id: string;
        deviceName: string;
        method: NestAuthMFAMethodEnum;
        lastUsedAt: Date;
        createdAt: Date;
        verified: boolean;
    }[]>;
    removeDevice(deviceId: string): Promise<void>;
    isRequiresMfa(userId: string): Promise<boolean>;
    isMfaEnabled(userId: string): Promise<boolean>;
    markAsVerified(userId: string, deviceId: string): Promise<void>;
    enableMFA(userId: string): Promise<void>;
    disableMFA(userId: string): Promise<void>;
    removeTotpDevice(deviceId: string): Promise<void>;
    private getRecoveryCodeSecret;
    generateRecoveryCode(userId: string): Promise<string>;
    resetMfa(userId: string, code: string): Promise<{
        message: string;
    }>;
    getAvailableMethods(): NestAuthMFAMethodEnum[];
    isMfaRequired(): boolean;
    canUserToggleMfa(): boolean;
    getMfaConfig(): MFAOptions;
    hasRecoveryCode(userId: string): Promise<boolean>;
    private getTrustedDeviceSecret;
    createTrustedDevice(userId: string, userAgent: string, ipAddress: string): Promise<string>;
    validateTrustedDevice(userId: string, token: string): Promise<boolean>;
}
//# sourceMappingURL=mfa.service.d.ts.map