UNPKG

@vonage/messages

Version:

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

43 lines 1.52 kB
import { Channels } from '../enums'; import { MessageTypes } from '../enums/MessageTypes'; import { MessageParams } from '../types'; /** * An abstract base class for message objects. */ export declare abstract class AbstractMessage implements MessageParams { abstract messageType: MessageTypes; abstract channel: Channels; /** * The recipient of the message. */ to: string; /** * The sender of the message. */ from: string; /** * An optional client reference for the message. */ clientRef?: string; /** * Specifies the URL to which Status Webhook messages will be sent for this * particular message. Over-rides account-level and application-level Status * Webhook url settings on a per-message basis. */ webhookUrl?: string; /** * Specifies which version of the Messages API will be used to send Status * Webhook messages for this particular message. For example, if v0.1 is * set, then the JSON body of Status Webhook messages for this message will * be sent in Messages v0.1 format. Over-rides account-level and * application-level API version settings on a per-message basis. */ webhookVersion?: 'v0.1' | 'v1'; /** * Constructs a new `AbstractMessage` instance. * * @param {MessageParams} params - The parameters for creating a message. */ constructor(params: Omit<MessageParams, 'channel' | 'messageType'>); } //# sourceMappingURL=AbstractMessage.d.ts.map