UNPKG

@davidbolaji/termii-node

Version:

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

25 lines (24 loc) 738 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HistoryService = void 0; /** * Service for fetching SMS, Voice & WhatsApp message history (Inbox API) */ class HistoryService { constructor(http) { this.http = http; } /** * Fetch message history (all messages or a single message if message_id is provided) * * @param payload - Optional request payload with message_id * @returns Expanded HistoryResponse array of message records */ async getHistory(payload) { return this.http.request("/sms/inbox", { method: "GET", params: payload // message_id if provided }); } } exports.HistoryService = HistoryService;