UNPKG

@inv2/common

Version:

A common module for v2

34 lines (33 loc) 786 B
import { RedisClientType } from 'redis'; interface IOtpParams { user: { id: string; email: string; name: string; }; token?: string; sender?: string; subject?: string; message?: string; } export declare class OtpService { private client; constructor(client: RedisClientType); generateOTP({ user, sender, subject, message }: IOtpParams): Promise<{ success: boolean; message: string; }>; verifyOTP(params: IOtpParams): Promise<{ success: boolean; status: number; message: string; data: IOtpParams; }>; deleteOTP(params: IOtpParams): Promise<{ success: boolean; status: number; message: string; data: IOtpParams; }>; } export {};