UNPKG

@vonage/messages

Version:

Multi-channel messaging that integrates WhatsApp, Facebook, Viber, SMS, and MMS

35 lines 1.27 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomMessage = void 0; const WhatsAppCustom_1 = require("./WhatsAppCustom"); const debug_1 = __importDefault(require("debug")); const log = (0, debug_1.default)('vonage:messages:whatsapp'); /** * @deprecated Please use WhatsAppCustom class instead * * @group WhatsApp */ class CustomMessage extends WhatsAppCustom_1.WhatsAppCustom { /** * Constructs a new `CustomMessage` instance for WhatsApp. * * @param {CustomPayload} custom - The custom payload for the message. * @param {string} to - The recipient's WhatsApp number. * @param {string} from - The sender's WhatsApp number. * @param {string} clientRef - (Optional) A unique client reference for the message. */ constructor(custom, to, from, clientRef) { log('Please update to use the WhatsAppCustom class instead'); super({ to: to, from: from, clientRef: clientRef, custom: custom, }); } } exports.CustomMessage = CustomMessage; //# sourceMappingURL=CustomMessage.js.map