@vonage/messages
Version:
Multi-channel messaging that integrates WhatsApp, Facebook, Viber, SMS, and MMS
47 lines • 1.37 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.ViberVideo = void 0;
const AbstractVideoMessage_1 = require("../AbstractVideoMessage");
/**
* Represents a video message for the Viber Service channel.
*
* @group Viber
*/
class ViberVideo extends AbstractVideoMessage_1.AbstractVideoMessage {
channel;
viberService;
/**
* Send a video message using the Viber Service channel.
*
* @param {ViberVideoParams} params - The parameters for the ViberVideo message.
* @example
* ```ts
* import { ViberVideo } from '@vonage/messages';
*
* const { messageUUID } = await messagesClient.send(new ViberVideo({
* to: TO_NUMBER,
* from: FROM_NUMBER,
* text: 'Hello world',
* video: {
* url: 'https://my-host.com/my-video.mp4',
* },
* viberService: {
* action: {
* url: 'https://my-host.com/my-path',
* text: 'My button text',
* },
* },
* clientRef: 'my-personal-reference',
* }));
*
* console.log(`Message sent successfully with UUID ${messageUUID}`);
* ```
*/
constructor(params) {
super(params);
this.viberService = params.viberService;
this.channel = 'viber_service';
}
}
exports.ViberVideo = ViberVideo;
//# sourceMappingURL=ViberVideo.js.map
;