@vonage/messages
Version:
Multi-channel messaging that integrates WhatsApp, Facebook, Viber, SMS, and MMS
42 lines • 1.39 kB
TypeScript
import { AbstractTextMessage } from '../AbstractTextMessage';
import { RCSTextParams } from '../../types';
import { Channels } from '../../enums';
/**
* Represents a text message for the RCS channel.
*
* @group RCS
*/
export declare class RCSText extends AbstractTextMessage implements RCSTextParams {
/**
* The channel for this message (always 'rcs').
*/
channel: 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?: number;
/**
* 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: RCSTextParams);
}
//# sourceMappingURL=RCSText.d.ts.map