UNPKG

@vonage/messages

Version:

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

44 lines 1.4 kB
import { AbstractImageMessage } from '../AbstractImageMessage'; import { ViberImageParams } from '../../types'; import { ViberActionParams } from '../../types'; import { Channels } from '../../enums'; /** * Represents an image message for the Viber Service channel. * * @group Viber */ export declare class ViberImage extends AbstractImageMessage implements ViberImageParams { /** * The channel for this message (always 'viber_service'). */ channel: Channels.VIBER; viberService: ViberActionParams; /** * Send an image message using the Viber Service channel. * * @param {ViberImageParams} params - The parameters for the ViberImage message. * @example * ```ts * import { ViberImage } from '@vonage/messages'; * * const { messageUUID } = await messagesClient.send(new ViberImage({ * to: TO_NUMBER, * from: FROM_NUMBER, * image: { * url: 'https://my-host.com/my-image.jpg', * }, * 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: Omit<ViberImageParams, 'channel' | 'messageType'>); } //# sourceMappingURL=ViberImage.d.ts.map