UNPKG

@vonage/messages

Version:

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

40 lines 1.41 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Image = void 0; const MessengerImage_1 = require("./MessengerImage"); const debug_1 = __importDefault(require("debug")); const log = (0, debug_1.default)('vonage:messages:messenger'); /** * @deprecated please use MessengerImage class instead * * @group Messenger */ class Image extends MessengerImage_1.MessengerImage { /** * Constructs a new `Image` instance. * * @param {ImageObject} image - The image object containing the URL and optional caption. * @param {string} to - The recipient's ID. * @param {string} from - The sender's ID. * @param {MessageType} messenger - The messenger object specifying the message category and tag. * @param {string} clientRef - The client reference. */ constructor(image, to, from, messenger, clientRef) { log('Please update to use the MessengerImage class instead'); super({ image: image, to: to, from: from, messenger: { category: messenger?.category, tag: messenger?.tag, }, clientRef: clientRef, }); } } exports.Image = Image; //# sourceMappingURL=Image.js.map