Wapi.js Docs / VideoMessage
Represents a video message.
BaseMessage
<MessageTypeEnum.Video
>new VideoMessage(
params
):VideoMessage
Creates a new instance of the VideoMessage class.
• params: object
| object
The parameters to initialize the video message.
BaseMessage<MessageTypeEnum.Video>.constructor
VideoMessage
packages/wapi.js/src/structures/media/index.ts:111
data:
object
|object
packages/wapi.js/src/structures/media/index.ts:101
messaging_product:
"whatsapp"
The messaging product.
VideoMessageInterface
.messaging_product
BaseMessage.messaging_product
packages/wapi.js/src/structures/message/index.ts:17
recipient_type:
"individual"
The recipient type.
VideoMessageInterface
.recipient_type
BaseMessage.recipient_type
packages/wapi.js/src/structures/message/index.ts:18
type:
MessageTypeEnum
The type of the message.
BaseMessage.type
packages/wapi.js/src/structures/message/index.ts:16
protected
parseConstructorPayload(schema
,payload
):any
Parses the constructor payload using the provided schema.
• schema: 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
An error if the parsing fails.
packages/wapi.js/src/structures/message/index.ts:42
toJson(
params
):object
Converts the video message to the WhatsApp Cloud API payload.
• params
The parameters for the WhatsApp Cloud API payload.
• params.replyToMessageId?: 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
messaging_product:
"whatsapp"
recipient_type:
"individual"
to:
string
type:
Video
video:
object
|object
BaseMessage.toJson
VideoMessage
packages/wapi.js/src/structures/media/index.ts:129
Wapi.js Docs / VideoMessage
Represents a video message.
BaseMessage
<MessageTypeEnum.Video
>new VideoMessage(
params
):VideoMessage
Creates a new instance of the VideoMessage class.
• params: object
| object
The parameters to initialize the video message.
BaseMessage<MessageTypeEnum.Video>.constructor
VideoMessage
packages/wapi.js/src/structures/media/index.ts:111
data:
object
|object
packages/wapi.js/src/structures/media/index.ts:101
messaging_product:
"whatsapp"
The messaging product.
VideoMessageInterface
.messaging_product
BaseMessage.messaging_product
packages/wapi.js/src/structures/message/index.ts:17
recipient_type:
"individual"
The recipient type.
VideoMessageInterface
.recipient_type
BaseMessage.recipient_type
packages/wapi.js/src/structures/message/index.ts:18
type:
MessageTypeEnum
The type of the message.
BaseMessage.type
packages/wapi.js/src/structures/message/index.ts:16
protected
parseConstructorPayload(schema
,payload
):any
Parses the constructor payload using the provided schema.
• schema: 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
An error if the parsing fails.
packages/wapi.js/src/structures/message/index.ts:42
toJson(
params
):object
Converts the video message to the WhatsApp Cloud API payload.
• params
The parameters for the WhatsApp Cloud API payload.
• params.replyToMessageId?: 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
messaging_product:
"whatsapp"
recipient_type:
"individual"
to:
string
type:
Video
video:
object
|object
BaseMessage.toJson
VideoMessage
packages/wapi.js/src/structures/media/index.ts:129