Class: ProductInquiryEvent
Represents a product inquiry event.Implements
Extends
Implements
Constructors
new ProductInquiryEvent()
new ProductInquiryEvent(Creates a new instance of the ProductInquiryEvent class.params
):ProductInquiryEvent
Parameters
• params The parameters for creating the event. • params.client:Client
The client object.
• params.data
The data object containing event data.
• params.data.catalogId: string
• params.data.from: string
• params.data.id: string
• params.data.isForwarded: boolean
• params.data.productId: string
• params.data.text: string
• params.data.timestamp: string
Returns
ProductInquiryEvent
Overrides
MessageEvent
.constructor
Source
packages/wapi.js/src/webhook/events/product-inquiry/index.ts:44Properties
catalogId
catalogId: string
The ID of the catalog.
Implementation of
ProductInquiryEventInterface
.catalogId
Source
packages/wapi.js/src/webhook/events/product-inquiry/index.ts:24client
client: Client
The client instance associated with the event.
Implementation of
ProductInquiryEventInterface
.client
Inherited from
MessageEvent
.client
Source
packages/wapi.js/src/webhook/events/base/index.ts:20context
context: MessageContext
The context of the message.
Implementation of
ProductInquiryEventInterface
.context
Inherited from
MessageEvent
.context
Source
packages/wapi.js/src/webhook/events/base/index.ts:37isForwarded
isForwarded: boolean
Inherited from
MessageEvent
.isForwarded
Source
packages/wapi.js/src/webhook/events/base/index.ts:39messageId
messageId: string
The ID of the message.
Implementation of
ProductInquiryEventInterface
.messageId
Inherited from
MessageEvent
.messageId
Source
packages/wapi.js/src/webhook/events/base/index.ts:36productId
productId: string
The ID of the product.
Implementation of
ProductInquiryEventInterface
.productId
Source
packages/wapi.js/src/webhook/events/product-inquiry/index.ts:19text
text: string
The text of the inquiry message.
Implementation of
ProductInquiryEventInterface
.text
Source
packages/wapi.js/src/webhook/events/product-inquiry/index.ts:29timestamp
timestamp: number
The timestamp of the message.
Implementation of
ProductInquiryEventInterface
.timestamp
Inherited from
MessageEvent
.timestamp
Source
packages/wapi.js/src/webhook/events/base/index.ts:38Methods
react()
react(Reacts to the message with an emoji.params
):Promise
<object
|object
>
Parameters
• params The parameters for the reaction. • params.emoji:string
The emoji to react with.
• params.phoneNumber: string
The phone number of the sender.
Returns
Promise
<object
| object
>
- A promise that resolves with the reaction response.
Inherited from
MessageEvent
.react
Source
packages/wapi.js/src/webhook/events/base/index.ts:100read()
read():Marks the message as read.Promise
<object
|object
|object
|object
|object
>
Returns
Promise
<object
| object
| object
| object
| object
>
- A promise that resolves with the read response.
Inherited from
MessageEvent
.read
Memberof
MessageEventSource
packages/wapi.js/src/webhook/events/base/index.ts:121reply()
reply<Sends a reply to the message.T
>(props
):Promise
<object
|object
>
Type parameters
• T extendsBaseMessage
<string
>
Parameters
• props The properties for the reply. • props.message:T
The message to send as a reply.
Returns
Promise
<object
| object
>
- A promise that resolves when the reply is sent.
Inherited from
MessageEvent
.reply
Throws
- If the context message ID is not found.