UNPKG

cmc-voice-otp

Version:
66 lines 1.76 kB
export interface CreateCMCVoiceOTPInputData { to: string; otp: string; repeat?: boolean; voiceId?: string; } export interface CreateCMCVoiceOTPResponse { from: string; to: string; otp: CMCVoiceOTPEncryptedOtp; config: CMCVoiceOTPConfig; blocks: number; status: string; sendSMS: boolean; createdAt: string; id: string; updatedAt: string; } export interface CMCVoiceOTPEncryptedOtp { encrypted: string; algorithm: string; iv: string; } export interface CMCVoiceOTPConfig { voiceId: string; repeat: boolean; } export interface CMCVoiceOTPBlockInfo { firstBlock: number; block: number; isActive: boolean; isDefault: boolean; createdAt: string; updatedAt: string; name: string; id: string; } export interface CMCVoiceOTPDetail { from: string; to: string; otp: CMCVoiceOTPEncryptedOtp; config: CMCVoiceOTPConfig; blocks: number; status: string; blockInfo: CMCVoiceOTPBlockInfo; sendSMS: boolean; sms: any; createdAt: string; id: string; updatedAt: string; duration: number; } export declare class CMCVoiceOTPClient { private readonly appId; private readonly appSecret; private readonly encryptedKey; private readonly iv; private readonly fromPhoneNumber; private axiosInstance; constructor(baseURL: string, appId: string, appSecret: string, encryptedKey: string, iv: string, fromPhoneNumber: string); createAuthorizationHeader(): string; encryptOTP(otp: string): string; createVoiceOTP(input: CreateCMCVoiceOTPInputData): Promise<CreateCMCVoiceOTPResponse>; getTransactionVoiceOTP(otpId: string): Promise<CMCVoiceOTPDetail>; } //# sourceMappingURL=index.d.ts.map