UNPKG

@vonage/messages

Version:

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

49 lines 1.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RCSImage = void 0; const AbstractImageMessage_1 = require("../AbstractImageMessage"); const enums_1 = require("../../enums"); /** * Represents an image message for the RCS channel. * * @group RCS */ class RCSImage extends AbstractImageMessage_1.AbstractImageMessage { /** * The channel through which the message will be sent. Always `rcs` */ channel = enums_1.Channels.RCS; /** * The duration in seconds the delivery of a message will be attempted. By * default Vonage attempts delivery for 72 hours, however the maximum effective * value depends on the operator and is typically 24 - 48 hours. We recommend * this value should be kept at its default or at least 30 minutes. */ ttl; /** * Send an RCS image message. * * @param {RCSImageParams} params - The parameters for creating the image message. * @example * ```ts * import { RCSImage } from '@vonage/messages'; * * const { messageUUID } = await messagesClient.send(new RCSImage({ * to: TO_NUMBER, * from: FROM_NUMBER, * image: { * url: 'https://example.com/image.jpg', * }, * clientRef: 'my-personal-reference', * })); * * console.log(`Message sent successfully with UUID ${messageUUID}`); * ``` */ constructor(params) { super(params); this.ttl = params.ttl; } } exports.RCSImage = RCSImage; //# sourceMappingURL=RCSImage.js.map