import { AbstractMessage } from '../AbstractMessage.js'; import { Channels } from '../../enums/Channels.js'; import { MessageTypes } from '../../enums/MessageTypes.js'; import { WhatsAppContext } from '../../types/Channels/WhatsApp/WhatsAppParams.js'; import { WhatsAppCustomParams } from '../../types/Channels/WhatsApp/WhatsAppCustomParams.js'; import { WhatsAppCustomType } from '../../types/Channels/WhatsApp/WhatsAppCustomType.js'; import '../../types/MessageParams.js'; /** * Represents a custom message for WhatsApp. * * @group WhatsApp */ declare class WhatsAppCustom extends AbstractMessage implements WhatsAppCustomParams { /** * The channel for this message (always 'whatsapp'). */ channel: Channels.WHATSAPP; /** * The type of message (always 'custom'). */ messageType: MessageTypes; custom: WhatsAppCustomType; context?: WhatsAppContext; /** * Send via MM Lite API only this is valid for marketing template messages * only, and for Alpha release only * * @deprecated */ category?: string; /** * Sends a custom message to a WhatsApp user. * * @param {WhatsAppCustomParams} params - The parameters for creating a WhatsApp custom message. * @example * ```ts * import { WhatsAppCustom } from '@vonage/messages'; * * const { messageUUID } = await messagesClient.send(new WhatsAppCustom({ * to: TO_NUMBER, * from: FROM_NUMBER, * custom: { * type: 'template', * template: { * namespace: 'your-namespace', * name: 'your-template-name', * }, * } * clientRef: 'my-personal-reference', * })); * * console.log(`Message sent successfully with UUID ${messageUUID}`); * ``` */ constructor(params: Omit); } export { WhatsAppCustom };