UNPKG

@davidbolaji/termii-node

Version:

Node.js SDK for Termii API – send SMS, voice, OTP, and manage messaging with ease.

29 lines 1.14 kB
import { HttpClient } from "../../http/HttpClient"; import { SendMessageRequest, SendMessageResponse, SendBulkMessageRequest, SendBulkMessageResponse } from "../../types/messageService.type"; /** * Utility type that forces TypeScript to expand an interface * so IntelliSense shows its full shape instead of just the alias. */ type Expand<T> = { [K in keyof T]: T[K]; } & {}; export declare class MessageService { private http; constructor(http: HttpClient); /** * Send a single SMS or WhatsApp message * * @param payload - Request payload containing recipient, sender ID, and message details * @returns Expanded `SendMessageResponse` with message details */ sendMessage(payload: SendMessageRequest): Promise<Expand<SendMessageResponse>>; /** * Send bulk messages (up to 10,000 recipients) * * @param payload - Bulk message request payload * @returns Expanded `SendBulkMessageResponse` with bulk message status */ sendBulkMessage(payload: SendBulkMessageRequest): Promise<Expand<SendBulkMessageResponse>>; } export {}; //# sourceMappingURL=MessageService.d.ts.map