BaseMessage
<"location"
>new LocationMessage(Creates a new LocationMessage instance.params
):LocationMessage
string
= undefined
• params.latitude: number
= undefined
• params.longitude: number
= undefined
• params.name?: string
= undefined
LocationMessage
BaseMessage<"location">.constructor
data: object
optional
address:string
latitude: number
longitude: number
optional
name:string
LocationMessageInterface
.data
messaging_product: "whatsapp"
The messaging product.
LocationMessageInterface
.messaging_product
BaseMessage.messaging_product
recipient_type: "individual"
The recipient type.
LocationMessageInterface
.recipient_type
BaseMessage.recipient_type
type: MessageTypeEnum
The type of the message.
LocationMessageInterface
.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
toJson(Converts the LocationMessage to a JSON object that can be sent as a request payload to the WhatsApp Cloud API.params
):object
string
The ID of the message being replied to.
• params.to: string
The recipient of the message.
object
optional
biz_opaque_callback_data:string
optional
context:object
message_id: string
location:object
=LocationDataPayloadSchemaType
optional
address:string
latitude: number
longitude: number
optional
name:string
messaging_product: "whatsapp"
recipient_type: "individual"
to: string
type: Location
BaseMessage.toJson