import { Repository } from 'typeorm';
import { NestAuthOTP } from '../entities/otp.entity';
import { NestAuthOTPTypeEnum } from '@ackplus/nest-auth-contracts';
import { IOtpOptions } from '../../core/interfaces/auth-module-options.interface';
export interface CreateOtpParams {
    userId: string;
    type: NestAuthOTPTypeEnum;
    otpOptions?: IOtpOptions | null;
    replaceExisting?: boolean;
}
export declare class OtpFlowService {
    private readonly otpRepository;
    constructor(otpRepository: Repository<NestAuthOTP>);
    get otpConfig(): IOtpOptions;
    resolveExpiresMs(raw: number | string | undefined, fallbackMsString: string): number;
    generatePlainCode(otpOptions?: IOtpOptions | null): Promise<string>;
    deleteByUserAndType(userId: string, type: NestAuthOTPTypeEnum): Promise<void>;
    createOtp(params: CreateOtpParams): Promise<{
        entity: NestAuthOTP;
        plainCode: string;
    }>;
    validateAndConsume(params: {
        userId: string;
        type: NestAuthOTPTypeEnum;
        code: string;
    }): Promise<void>;
}
//# sourceMappingURL=otp-flow.service.d.ts.map