abstract
InteractiveMessageBaseMessage
<MessageTypeEnum.Interactive
>new InteractiveMessage(Creates an instance of InteractiveMessage.params
):InteractiveMessage
string
The body text of the interactive message.
• params.footerText?: string
The footer text of the interactive message.
• params.type: InteractiveMessageTypeEnum
The type of the interactive message.
InteractiveMessage
BaseMessage<MessageTypeEnum.Interactive>.constructor
readonly
interactiveMessageData:object
bodyText: string
optional
footerText:string
optional
header:object
|object
|object
|object
type: InteractiveMessageTypeEnum
InteractiveMessageInterface
.interactiveMessageData
messaging_product: "whatsapp"
The messaging product.
InteractiveMessageInterface
.messaging_product
BaseMessage.messaging_product
recipient_type: "individual"
The recipient type.
InteractiveMessageInterface
.recipient_type
BaseMessage.recipient_type
type: MessageTypeEnum
The type of the message.
InteractiveMessageInterface
.type
BaseMessage.type
Parses the constructor payload using the provided schema.protected
parseConstructorPayload(schema
,payload
):any
ZodType
<any
, ZodTypeDef
, any
>
The Zod schema used for parsing the payload.
• payload: any
The payload to be parsed.
any
The parsed data.
BaseMessage.parseConstructorPayload
Converts the message object to JSON format.abstract
toJson(params
):object
string
• params.to: string
object
The JSON representation of the message.
optional
biz_opaque_callback_data:string
optional
context:object
message_id: string
interactive:object
|object
|object
|object
|object
|object
messaging_product: "whatsapp"
recipient_type: "individual"
to: string
type: Interactive
BaseMessage.toJson