UNPKG

@zenvia/sdk

Version:

This SDK for [Node.js](https://nodejs.org/) was created based on the [Zenvia](https://www.zenvia.com/) [API](https://zenvia.github.io/zenvia-openapi-spec/).

19 lines 772 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WhatsAppMessageBatch = void 0; const abstract_message_batch_1 = require("./abstract-message-batch"); /** * Implementation of WhatsApp batch. */ class WhatsAppMessageBatch extends abstract_message_batch_1.AbstractMessageBatch { constructor(name, from, templateIds, columnMapper) { super(name, 'whatsapp', null, columnMapper); this.message = { from, contents: [], }; (typeof templateIds === 'string' ? [templateIds] : templateIds).forEach(templateId => this.message.contents.push({ type: 'template', templateId })); } } exports.WhatsAppMessageBatch = WhatsAppMessageBatch; //# sourceMappingURL=whatsapp-message-batch.js.map