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

 

 

MESSAGE_RECEIVED

 

 

MESSAGE_CREATE

 

 

MESSAGE_REVOKED_EVERYONE

 

 

MESSAGE_REVOKED_ME

 

 

MESSAGE_ACK

 

 

MEDIA_UPLOADED

 

 

GROUP_JOIN

 

 

GROUP_LEAVE

 

 

GROUP_UPDATE

 

 

QR_RECEIVED

 

 

DISCONNECTED

 

 

STATE_CHANGED

 

 

BATTERY_CHANGED

 

 

INCOMING_CALL

 

 

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

 

 

BUTTONS_RESPONSE

 

 

PAYMENT

 

 

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

ContactId  Object

ID that represents a contact

Properties

Name Type Optional Description

server

string

 

user

string

 

_serialized

string

 

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

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

StickerMetadata  Object

Sticker metadata.

Properties

Name Type Optional Description

name

string

Yes

author

string

Yes

categories

Array of string

Yes