new ProductListMessage(Creates an instance of ProductListInteractionMessage.params
):ProductListMessage
string
The body text of the message.
• params.buttonText: string
The button text of the message.
• params.catalogId: string
The catalog ID of the product.
• params.footerText?: string
The footer text of the message.
• params.header: object
| object
| object
| object
The header of the message.
• params.productRetailerId: string
The product retailer ID of the product.
• params.sections: ProductListSection
[]
The sections of the product list.
ProductListMessage
InteractiveMessage
.constructor
data: object
catalogId: string
productRetailerId: string
sections: ProductListSection
[]
ProductListMessageInterface
.data
readonly
interactiveMessageData:object
bodyText: string
optional
footerText:string
optional
header:object
|object
|object
|object
type: InteractiveMessageTypeEnum
ProductListMessageInterface
.interactiveMessageData
InteractiveMessage
.interactiveMessageData
messaging_product: "whatsapp"
The messaging product.
ProductListMessageInterface
.messaging_product
InteractiveMessage
.messaging_product
recipient_type: "individual"
The recipient type.
ProductListMessageInterface
.recipient_type
InteractiveMessage
.recipient_type
type: MessageTypeEnum
The type of the message.
ProductListMessageInterface
.type
InteractiveMessage
.type
addFooter(Adds a footer to the message.footerText
):void
string
The footer text to be added.
void
addSection(Adds a section to the message.section
):void
ProductListSection
The section to be added.
void
ProductListMessageInterface
.addSection
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.
InteractiveMessage
.parseConstructorPayload
toJson(Converts the message to JSON format.params
):object
&object
string
The ID of the message to reply to.
• params.to: string
The recipient of the message.
object
& object
The JSON representation of the message.
InteractiveMessage
.toJson