UNPKG

@vonage/messages

Version:

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

49 lines 1.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MMSAudio = void 0; const AbstractAudioMessage_1 = require("../AbstractAudioMessage"); const enums_1 = require("../../enums"); /** * Represents an audio message for the MMS channel. * * @group MMS */ class MMSAudio extends AbstractAudioMessage_1.AbstractAudioMessage { /** * The channel for this message (always 'mms'). */ channel = enums_1.Channels.MMS; /** * Time-To-Live (how long a message should exist before it is delivered * successfully) in seconds. If a message is not delivered successfully within * the TTL time, the message is considered expired and will be rejected if TTL * is supported. */ ttl; /** * Send an MMS audio message. * * @param {MessageParamsAudio} params - The parameters for creating the audio message. * * @example * ```ts * import { MMSAudio } from '@vonage/messages'; * * const { messageUUID } = await messagesClient.send(new MMSAudio({ * to: TO_NUMBER, * from: FROM_NUMBER, * audio: { * url: 'https://example.com/audio.mp3', * }, * clientRef: 'my-personal-reference', * })); * * console.log(`Message sent successfully with UUID ${messageUUID}`); * ``` */ constructor(params) { super(params); } } exports.MMSAudio = MMSAudio; //# sourceMappingURL=MMSAudio.js.map