@termii/node
Version:
Nodejs SDK wrapper for Termii API written with Typescript support
28 lines (27 loc) • 1.26 kB
TypeScript
import { TermiiCore } from '../../../api';
import { ISendMessageResponse, ISendMessage, ISendBulkMessage, ISendBulkMessageResponse } from '../../../interfaces/message';
/**
* The Message class extends the TermiiCore class and provides methods for sending messages.
* @class Message
* @extends {TermiiCore}
*/
export declare class Message extends TermiiCore {
/**
* Constructs a new Message instance with the provided API key.
* @constructor
* @param {string} apiKey - The API key used for authorization.
*/
constructor(apiKey: string);
/**
* Sends a single message using the Termii API.
* @param {ISendMessage} data - The message data to be sent.
* @returns {Promise<ISendMessageResponse>} A promise that resolves with the API response for the sent message.
*/
sendMessage(data: ISendMessage): Promise<ISendMessageResponse>;
/**
* Sends messages in bulk using the Termii API.
* @param {ISendBulkMessage} data - The bulk message data to be sent.
* @returns {Promise<ISendBulkMessageResponse>} A promise that resolves with the API response for the sent bulk messages.
*/
sendBulkMessage(data: ISendBulkMessage): Promise<ISendBulkMessageResponse>;
}