/** * SMS OTP Configuration */ export interface SmsOtpConfig { /** * API key for SMS OTP service (X-FinOS-Api-Key) */ appKey: string; /** * Phone number with country code (e.g., +84901234567) */ phoneNumber: string; /** * Purpose of OTP (default: "transaction") */ purpose?: string; /** * Your reference ID for tracking */ referenceId: string; /** * Request ID from sendOtp response (required for verify/resend) */ requestId?: string; } /** SMS OTP error – dùng chung EKYCError (event, code, message). */ export type SmsOtpError = import('./ekycType').EKYCError; /** * @deprecated Use SendOtpResponse, VerifyOtpResponse, or ResendOtpResponse instead. */ export interface SmsOtpResult { event: string; data?: { requestId?: string; expiresIn?: string; verifiedAt?: string; [key: string]: any; }; } interface BaseOtpResponse { success?: boolean; requestId?: string; expiresIn?: number; resendAfter?: number; error?: string; } export interface SendOtpResponse extends BaseOtpResponse {} export interface VerifyOtpResponse { success?: boolean; verified?: boolean; verifiedAt?: string; attemptsRemaining?: number; error?: string; } export interface ResendOtpResponse extends BaseOtpResponse { attemptsRemaining?: number; statusCode?: number; errorCode?: string; message?: string; retryAfter?: number; retryAt?: string; cooldownSeconds?: number; elapsedSeconds?: number; }