import { KenmonError, KenmonIdentifier, KenmonMailer, KenmonReturnType } from "kenmon"; //#region src/index.d.ts type KenmonEmailOTPErrorReason = 'not-found' | 'expired' | 'invalid-code' | 'already-used' | 'email-mismatch'; interface KenmonEmailOTP { id: string; email: string; code: string; signature: string; expiresAt: Date; used: boolean; } declare class KenmonEmailOTPError extends KenmonError { readonly reason: KenmonEmailOTPErrorReason; constructor(reason: KenmonEmailOTPErrorReason); } interface KenmonEmailOTPStorage { createOTP(email: string, code: string, expiresAt: Date, signature: string): Promise; getOTPById(id: string): Promise; markOTPAsUsed(id: string): Promise; } interface KenmonEmailOTPProviderConfig { mailer: KenmonMailer; otpStorage: KenmonEmailOTPStorage; otpTtl?: number; otpLength?: number; emailFrom: string; emailSubject?: (code: string, signature: string, otpTtl: number) => string; emailTextContent?: (code: string, signature: string, otpTtl: number) => string; emailHtmlContent?: (code: string, signature: string, otpTtl: number) => string; } declare class KenmonEmailOTPAuthenticator { readonly type = "email-otp"; private mailer; private otpStorage; private otpTtl; private otpLength; private emailFrom; private emailSubject; private emailTextContent; private emailHtmlContent; constructor(config: KenmonEmailOTPProviderConfig); sendOTP(email: string): Promise>; verifyOTP(payload: { email: string; otpId: string; code: string; }): Promise>; private generateOTPCode; } //#endregion export { KenmonEmailOTP, KenmonEmailOTPAuthenticator, KenmonEmailOTPError, KenmonEmailOTPErrorReason, KenmonEmailOTPProviderConfig, KenmonEmailOTPStorage }; //# sourceMappingURL=index.d.cts.map