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 { WhatsAppReactionParams } from '../../types/Channels/WhatsApp/WhatsAppReactionParams.js'; import { WhatsAppReactionType } from '../../types/Channels/WhatsApp/WhatAppReactionType.js'; import '../../types/MessageParams.js'; /** * Represents a reaction message for WhatsApp. * * @group WhatsApp */ declare class WhatsAppReaction extends AbstractMessage implements WhatsAppReactionParams { /** * The channel for this message (always 'whatsapp'). */ channel: Channels.WHATSAPP; /** * The type of message (always 'reaction'). */ messageType: MessageTypes.REACTION; /** * The reaction to send */ reaction: WhatsAppReactionType; /** * The WhatsApp Context */ 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 reaction message to a WhatsApp user. * * @param {WhatsAppReactionParams} params - The parameters for creating a WhatsApp reaction message. * @example * Send a reaction * ```ts * import { WhatsAppReaction } from '@vonage/messages'; * * const { messageUUID } = await messagesClient.send(new WhatsAppReaction({ * to: TO_NUMBER, * from: FROM_NUMBER, * reaction: { * action: 'react', * emoji: '😍', * } * clientRef: 'my-personal-reference', * })); * * console.log(`Message sent successfully with UUID ${messageUUID}`); * ``` * * @example * Remove reaction * ```ts * import { WhatsAppReaction } from '@vonage/messages'; * * const { messageUUID } = await messagesClient.send(new WhatsAppReaction({ * to: TO_NUMBER, * from: FROM_NUMBER, * reaction: { * action: 'unreact', * } * clientRef: 'my-personal-reference', * })); * * console.log(`Message sent successfully with UUID ${messageUUID}`); * ``` */ constructor(params: Omit); } export { WhatsAppReaction };