import { AbstractTextMessage } from '../AbstractTextMessage.js'; import { Channels } from '../../enums/Channels.js'; import { SMSParams, SMSExtraParams } from '../../types/Channels/SMSParams.js'; import '../AbstractMessage.js'; import '../../enums/MessageTypes.js'; import '../../types/MessageParams.js'; import '../../types/MessageParamsText.js'; /** * Send a text message using the SMS channel. * * @group SMS */ declare class SMS extends AbstractTextMessage implements SMSParams { /** * The channel for this message (always 'sms'). */ channel: Channels.SMS; trustedRecipient?: boolean; sms?: SMSExtraParams; /** * The duration in seconds the delivery of an SMS 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; /** * Send an SMS message * * @param {MessageParamsText | string} params - The message parameters or text message. * @param {string} to - The recipient's phone number. * @param {string} from - The sender's phone number. * @param {string} clientRef - The client reference for the message. * * @example * ```ts * import { SMS } from '@vonage/messages'; * * const { messageUUID } = await messagesClient.send(new SMS({ * to: TO_NUMBER, * from: FROM_NUMBER, * text: 'Hello world', * clientRef: 'my-personal-reference', * })); * * console.log(`Message sent successfully with UUID ${messageUUID}`); * ``` * * @example * Send SMS with entity ID and content ID * ```ts * import { SMS } from '@vonage/messages'; * * const { messageUUID } = await messagesClient.send(new SMS({ * to: TO_NUMBER, * from: FROM_NUMBER, * text: 'Hello world', * clientRef: 'my-personal-reference', * sms: { * entityId: 'MyEntityID', * contentId: 'MyContentID' * } * })); * * console.log(`Message sent successfully with UUID ${messageUUID}`); * ``` */ constructor(params: SMSParams | string, to?: string, from?: string, clientRef?: string); } export { SMS };