UNPKG

@davidbolaji/termii-node

Version:

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

32 lines (31 loc) 880 B
export class SenderIdService { constructor(http) { this.http = http; } /** * Fetch all registered Sender IDs * * @param page - The page number to fetch (for pagination) * @returns Expanded `SenderIdResponse` object containing paginated sender IDs */ async fetchSenderIds(page) { return this.http.request("/sender-id", { method: "GET", params: { page }, authLocation: "query" }); } /** * Request registration of a new Sender ID * * @param params - The sender ID request payload * @returns Expanded `SenderIdRequestResponse` with request status */ async requestSenderId(params) { return this.http.request("/sender-id/request", { method: "POST", data: params, authLocation: "body" }); } }