import type { HttpClient } from "../../http"; import type { Msg91Response } from "../../types"; import type { SendOtpParams, SendOtpResponse, VerifyOtpParams, VerifyOtpResponse, ResendOtpParams, ResendOtpResponse } from "./types"; /** * Service for SMS OTP operations */ export declare class SmsOtpService { private readonly http; constructor(http: HttpClient); /** * Send an OTP to a mobile number * * @example * ```typescript * const { data, error } = await msg91.smsOtp.send({ * templateId: 'your_template_id', * mobile: '919876543210', * otpLength: 6, * otpExpiry: 5, * }); * * if (error) { * console.error('Failed to send OTP:', error.message); * } else { * console.log('OTP sent successfully'); * } * ``` */ send(params: SendOtpParams): Promise>; /** * Verify an OTP entered by the user * * @example * ```typescript * const { data, error } = await msg91.smsOtp.verify({ * otp: '123456', * mobile: '919876543210', * }); * * if (error) { * console.error('OTP verification failed:', error.message); * } else { * console.log('OTP verified successfully'); * } * ``` */ verify(params: VerifyOtpParams): Promise>; /** * Resend an OTP via text SMS or voice call * * @example * ```typescript * const { data, error } = await msg91.smsOtp.resend({ * mobile: '919876543210', * retryType: 'text', // or 'voice' * }); * * if (error) { * console.error('Failed to resend OTP:', error.message); * } else { * console.log('OTP resent successfully'); * } * ``` */ resend(params: ResendOtpParams): Promise>; } //# sourceMappingURL=sms-otp.service.d.ts.map