Globals

Properties

read-only

ChatTypes  string

Chat types

Properties

Name Type Optional Description

SOLO

 

 

GROUP

 

 

UNKNOWN

 

 

read-only

Events  string

Events that can be emitted by the client

Properties

Name Type Optional Description

AUTHENTICATED

 

 

AUTHENTICATION_FAILURE

 

 

READY

 

 

CHAT_REMOVED

 

 

CHAT_ARCHIVED

 

 

MESSAGE_RECEIVED

 

 

MESSAGE_CREATE

 

 

MESSAGE_REVOKED_EVERYONE

 

 

MESSAGE_REVOKED_ME

 

 

MESSAGE_ACK

 

 

UNREAD_COUNT

 

 

MESSAGE_REACTION

 

 

MEDIA_UPLOADED

 

 

CONTACT_CHANGED

 

 

GROUP_JOIN

 

 

GROUP_LEAVE

 

 

GROUP_ADMIN_CHANGED

 

 

GROUP_UPDATE

 

 

QR_RECEIVED

 

 

LOADING_SCREEN

 

 

DISCONNECTED

 

 

STATE_CHANGED

 

 

BATTERY_CHANGED

 

 

INCOMING_CALL

 

 

REMOTE_SESSION_SAVED

 

 

read-only

GroupNotificationTypes  string

Group notification types

Properties

Name Type Optional Description

ADD

 

 

INVITE

 

 

REMOVE

 

 

LEAVE

 

 

SUBJECT

 

 

DESCRIPTION

 

 

PICTURE

 

 

ANNOUNCE

 

 

RESTRICT

 

 

read-only

MessageAck  number

Message ACK

Properties

Name Type Optional Description

ACK_ERROR

 

 

ACK_PENDING

 

 

ACK_SERVER

 

 

ACK_DEVICE

 

 

ACK_READ

 

 

ACK_PLAYED

 

 

read-only

MessageTypes  string

Message types

Properties

Name Type Optional Description

TEXT

 

 

AUDIO

 

 

VOICE

 

 

IMAGE

 

 

VIDEO

 

 

DOCUMENT

 

 

STICKER

 

 

LOCATION

 

 

CONTACT_CARD

 

 

CONTACT_CARD_MULTI

 

 

ORDER

 

 

REVOKED

 

 

PRODUCT

 

 

UNKNOWN

 

 

GROUP_INVITE

 

 

LIST

 

 

LIST_RESPONSE

 

 

BUTTONS_RESPONSE

 

 

PAYMENT

 

 

BROADCAST_NOTIFICATION

 

 

CALL_LOG

 

 

CIPHERTEXT

 

 

DEBUG

 

 

E2E_NOTIFICATION

 

 

GP2

 

 

GROUP_NOTIFICATION

 

 

HSM

 

 

INTERACTIVE

 

 

NATIVE_FLOW

 

 

NOTIFICATION

 

 

NOTIFICATION_TEMPLATE

 

 

OVERSIZED

 

 

PROTOCOL

 

 

REACTION

 

 

TEMPLATE_BUTTON_REPLY

 

 

read-only

Status  number

Client status

Properties

Name Type Optional Description

INITIALIZING

 

 

AUTHENTICATING

 

 

READY

 

 

read-only

WAState  string

WhatsApp state

Properties

Name Type Optional Description

CONFLICT

 

 

CONNECTED

 

 

DEPRECATED_VERSION

 

 

OPENING

 

 

PAIRING

 

 

PROXYBLOCK

 

 

SMB_TOS_BLOCK

 

 

TIMEOUT

 

 

TOS_BLOCK

 

 

UNLAUNCHED

 

 

UNPAIRED

 

 

UNPAIRED_IDLE

 

 

Abstract types

ButtonSpec  Object

Button spec used in Buttons constructor

Properties

Name Type Optional Description

id

string

Yes

Custom ID to set on the button. A random one will be generated if one is not passed.

body

string

 

The text to show on the button.

ContactId  Object

ID that represents a contact

Properties

Name Type Optional Description

server

string

 

user

string

 

_serialized

string

 

FormattedButtonSpec  Object

Properties

Name Type Optional Description

buttonId

string

 

type

number

 

buttonText

Object

 

GroupParticipant  Object

Group participant information

Properties

Name Type Optional Description

id

ContactId

 

isAdmin

boolean

 

isSuperAdmin

boolean

 

MessageInfo  Object

Message Info

Properties

Name Type Optional Description

delivery

Array of {id: ContactId, t: number}

 

Contacts to which the message has been delivered to

deliveryRemaining

number

 

Amount of people to whom the message has not been delivered to

played

Array of {id: ContactId, t: number}

 

Contacts who have listened to the voice message

playedRemaining

number

 

Amount of people who have not listened to the message

read

Array of {id: ContactId, t: number}

 

Contacts who have read the message

readRemaining

number

 

Amount of people who have not read the message

MessageSendOptions  Object

Message options.

Properties

Name Type Optional Description

linkPreview

boolean

Yes

Show links preview. Has no effect on multi-device accounts.

Defaults to true.

sendAudioAsVoice

boolean

Yes

Send audio as voice message

Defaults to false.

sendVideoAsGif

boolean

Yes

Send video as gif

Defaults to false.

sendMediaAsSticker

boolean

Yes

Send media as a sticker

Defaults to false.

sendMediaAsDocument

boolean

Yes

Send media as a document

Defaults to false.

parseVCards

boolean

Yes

Automatically parse vCards and send them as contacts

Defaults to true.

caption

string

Yes

Image or video caption

quotedMessageId

string

Yes

Id of the message that is being quoted (or replied to)

mentions

Array of Contact

Yes

Contacts that are being mentioned in the message

sendSeen

boolean

Yes

Mark the conversation as seen after sending the message

Defaults to true.

stickerAuthor

string

Yes

Sets the author of the sticker, (if sendMediaAsSticker is true).

stickerName

string

Yes

Sets the name of the sticker, (if sendMediaAsSticker is true).

stickerCategories

Array of string

Yes

Sets the categories of the sticker, (if sendMediaAsSticker is true). Provide emoji char array, can be null.

media

MessageMedia

Yes

Media to be sent

ReactionList  Object

Reaction List

Properties

Name Type Optional Description

id

string

 

Original emoji

aggregateEmoji

string

 

aggregate emoji

hasReactionByMe

boolean

 

Flag who sent the reaction

senders

Array of Reaction

 

Reaction senders, to this message

StickerMetadata  Object

Sticker metadata.

Properties

Name Type Optional Description

name

string

Yes

author

string

Yes

categories

Array of string

Yes