@vonage/messages
Version:
Multi-channel messaging that integrates WhatsApp, Facebook, Viber, SMS, and MMS
48 lines • 1.5 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.RCSText = void 0;
const AbstractTextMessage_1 = require("../AbstractTextMessage");
const enums_1 = require("../../enums");
/**
* Represents a text message for the RCS channel.
*
* @group RCS
*/
class RCSText extends AbstractTextMessage_1.AbstractTextMessage {
/**
* The channel for this message (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;
/**
* Sends a text message through the RCS channel.
*
* @param {RCSTextParams} params - The parameters for creating a RCS text message.
*
* @example
* ```ts
* import { RCSText } from '@vonage/messages';
*
* const { messageUUID } = await messagesClient.send(new RCSText({
* to: TO_NUMBER,
* from: FROM_NUMBER,
* text: 'Hello world',
* clientRef: 'my-personal-reference',
* }));
*
* console.log(`Message sent successfully with UUID ${messageUUID}`);
* ```
*/
constructor(params) {
super(params);
this.ttl = params.ttl;
}
}
exports.RCSText = RCSText;
//# sourceMappingURL=RCSText.js.map
;