set chats (history sync), chats are reverse chronologically sorted
update the given chats
upsert chats
connection state has been updated -- WS closed, opened, connecting etc.
set contacts (history sync)
credentials updated -- some metadata, keys or something
apply an action to participants in a group
set messages (history sync), messages are reverse chronologically sorted
add/update the given messages. If they were received while the connection was online, the update will have type: "notify"
presence of contact in a chat updated
the binary node WA uses internally for communication
this is manipulated soley as an object and it does not have any functions. This is done for easy serialization, to prevent running into issues with prototypes & to maintain functional code structure
proxy agent
provide an auth state object to maintain the auth state
override browser config
Fails the connection if the socket times out in this interval
Default timeout for queries, undefined for no timeout
should events be emitted for actions done by this socket connection
agent used for fetch requests -- uploading/downloading media
ping-pong interval for WS connection
pino logger
provide a cache to store media, so does not have to be re-uploaded
should the QR be printed in the terminal
version to connect with
the WS url to connect to WA
connection is now open, connecting or closed
is this a new login
the error that caused the connection to close
legacy connection options
the current QR code
has the device received all pending notifications while it was offline
the last messages in a chat, sorted reverse-chronologically for MD modifications, the last message in the array must be the last message recv in the chat
cache media so it does not have to be uploaded again
only send to a specific participant
Set of message types that are supported by the library
disappearing messages settings
Force message id
the message you want to quote
optional, if you want to manually set the timestamp of the message
set of statuses visible to other people; see updatePresence() in WhatsAppWeb.Send
Tag used with binary queries
binds to a BaileysEventEmitter. It listens to all events and constructs a state that you can query accurate data from. Eg. can use the store to fetch chats, contacts, messages etc.
typically the event emitter from the socket connection
Add or remove user from blocklist
the ID of the person who you are blocking/unblocking
type of operation
Can you login to WA without scanning the QR
Modify a given chat (archive, pin etc.)
the ID of the person/group you are modifiying
generate message tag and increment epoch
Query a string to check if it has a url, if it does, return WAUrlInfo
Query broadcast list info
Query Business Profile (Useful for VCards)
Business Jid
profile object or undefined if not business account
Query the status of the person (see groupMetadata() for groups)
Create a group
like, the title of the group
people to include in the group
Leave a group
Update participants in the group
the people to add
Update the group description
the ID of the group
Update the subject of the group
the new title of the group
Load a single message specified by the ID
Logs you out from WA If connected, invalidates the credentials with the server
Query whether a given number is registered on WhatsApp
phone number/jid you want to check for
undefined if the number doesn't exists, otherwise the correctly formatted jid
Request updates on the presence of a user this returns nothing, you'll receive updates in chats.update event
Query something from the WhatsApp servers
Relay (send) a WAMessage; more advanced functionality to send a built WA Message, you may want to stick with sendMessage()
checks for phone connection
Send a message to the WA servers
the tag attached in the message
Tell someone about your presence -- online, typing, offline etc.
your presence
the ID of the person/group who you are updating
Generic function for action, set queries
Updates business profile.
Wait for a message with a certain tag to be received
the message tag to await
timeout after which the promise will reject
Update the profile picture
get some pre-keys and do something with them
modify a chat -- mark unread, read etc. lastMessages must be sorted in reverse chronologically requires the last messages till the last message received; required for archive & unread
logout & invalidate connection
fetch the profile picture of a user/group type = "preview" for a low res picture type = "image for the high res picture"
send a query, and wait for its response. auto-generates message ID if not provided
send a binary node
send a raw buffer
generic send receipt function used for receipts of phone call, read, delivery etc.
Wait for a message with a certain tag to be received
timeout after which the promise will reject
get some pre-keys and do something with them
modify a chat -- mark unread, read etc. lastMessages must be sorted in reverse chronologically requires the last messages till the last message received; required for archive & unread
logout & invalidate connection
fetch the profile picture of a user/group type = "preview" for a low res picture type = "image for the high res picture"
send a query, and wait for its response. auto-generates message ID if not provided
send a binary node
send a raw buffer
generic send receipt function used for receipts of phone call, read, delivery etc.
Wait for a message with a certain tag to be received
timeout after which the promise will reject
Add or remove user from blocklist
the ID of the person who you are blocking/unblocking
type of operation
Can you login to WA without scanning the QR
Modify a given chat (archive, pin etc.)
the ID of the person/group you are modifiying
generate message tag and increment epoch
Query a string to check if it has a url, if it does, return WAUrlInfo
Query broadcast list info
Query Business Profile (Useful for VCards)
Business Jid
profile object or undefined if not business account
Query the status of the person (see groupMetadata() for groups)
Create a group
like, the title of the group
people to include in the group
Leave a group
Update participants in the group
the people to add
Update the group description
the ID of the group
Update the subject of the group
the new title of the group
Load a single message specified by the ID
Logs you out from WA If connected, invalidates the credentials with the server
Query whether a given number is registered on WhatsApp
phone number/jid you want to check for
undefined if the number doesn't exists, otherwise the correctly formatted jid
Request updates on the presence of a user this returns nothing, you'll receive updates in chats.update event
Query something from the WhatsApp servers
Relay (send) a WAMessage; more advanced functionality to send a built WA Message, you may want to stick with sendMessage()
checks for phone connection
Send a message to the WA servers
the tag attached in the message
Tell someone about your presence -- online, typing, offline etc.
your presence
the ID of the person/group who you are updating
Generic function for action, set queries
Updates business profile.
Wait for a message with a certain tag to be received
the message tag to await
timeout after which the promise will reject
Update the profile picture
Add or remove user from blocklist
the ID of the person who you are blocking/unblocking
type of operation
Can you login to WA without scanning the QR
Modify a given chat (archive, pin etc.)
the ID of the person/group you are modifiying
generate message tag and increment epoch
Query a string to check if it has a url, if it does, return WAUrlInfo
Query broadcast list info
Query Business Profile (Useful for VCards)
Business Jid
profile object or undefined if not business account
Query the status of the person (see groupMetadata() for groups)
Create a group
like, the title of the group
people to include in the group
Leave a group
Update participants in the group
the people to add
Update the group description
the ID of the group
Update the subject of the group
the new title of the group
Load a single message specified by the ID
Logs you out from WA If connected, invalidates the credentials with the server
Query whether a given number is registered on WhatsApp
phone number/jid you want to check for
undefined if the number doesn't exists, otherwise the correctly formatted jid
Request updates on the presence of a user this returns nothing, you'll receive updates in chats.update event
Query something from the WhatsApp servers
Relay (send) a WAMessage; more advanced functionality to send a built WA Message, you may want to stick with sendMessage()
checks for phone connection
Send a message to the WA servers
the tag attached in the message
Tell someone about your presence -- online, typing, offline etc.
your presence
the ID of the person/group who you are updating
Generic function for action, set queries
Updates business profile.
Wait for a message with a certain tag to be received
the message tag to await
timeout after which the promise will reject
Update the profile picture
loads messages from the store, if not found -- uses the legacy connection
Add or remove user from blocklist
the ID of the person who you are blocking/unblocking
type of operation
Can you login to WA without scanning the QR
Modify a given chat (archive, pin etc.)
the ID of the person/group you are modifiying
generate message tag and increment epoch
Query a string to check if it has a url, if it does, return WAUrlInfo
Query broadcast list info
Query Business Profile (Useful for VCards)
Business Jid
profile object or undefined if not business account
Query the status of the person (see groupMetadata() for groups)
Create a group
like, the title of the group
people to include in the group
Leave a group
Update participants in the group
the people to add
Update the group description
the ID of the group
Update the subject of the group
the new title of the group
Load a single message specified by the ID
Logs you out from WA If connected, invalidates the credentials with the server
Query whether a given number is registered on WhatsApp
phone number/jid you want to check for
undefined if the number doesn't exists, otherwise the correctly formatted jid
Request updates on the presence of a user this returns nothing, you'll receive updates in chats.update event
Query something from the WhatsApp servers
Relay (send) a WAMessage; more advanced functionality to send a built WA Message, you may want to stick with sendMessage()
checks for phone connection
Send a message to the WA servers
the tag attached in the message
Tell someone about your presence -- online, typing, offline etc.
your presence
the ID of the person/group who you are updating
Generic function for action, set queries
Updates business profile.
Wait for a message with a certain tag to be received
the message tag to await
timeout after which the promise will reject
Update the profile picture
Add or remove user from blocklist
the ID of the person who you are blocking/unblocking
type of operation
Can you login to WA without scanning the QR
Modify a given chat (archive, pin etc.)
the ID of the person/group you are modifiying
generate message tag and increment epoch
Query a string to check if it has a url, if it does, return WAUrlInfo
Query broadcast list info
Query Business Profile (Useful for VCards)
Business Jid
profile object or undefined if not business account
Query the status of the person (see groupMetadata() for groups)
Create a group
like, the title of the group
people to include in the group
Leave a group
Update participants in the group
the people to add
Update the group description
the ID of the group
Update the subject of the group
the new title of the group
Load a single message specified by the ID
Logs you out from WA If connected, invalidates the credentials with the server
Query whether a given number is registered on WhatsApp
phone number/jid you want to check for
undefined if the number doesn't exists, otherwise the correctly formatted jid
Request updates on the presence of a user this returns nothing, you'll receive updates in chats.update event
Query something from the WhatsApp servers
Relay (send) a WAMessage; more advanced functionality to send a built WA Message, you may want to stick with sendMessage()
checks for phone connection
Send a message to the WA servers
the tag attached in the message
Tell someone about your presence -- online, typing, offline etc.
your presence
the ID of the person/group who you are updating
Generic function for action, set queries
Updates business profile.
Wait for a message with a certain tag to be received
the message tag to await
timeout after which the promise will reject
Update the profile picture
The appropriate browser based on your OS & release
decrypt AES 256 CBC; where the IV is prefixed to the buffer
decrypt AES 256 CBC
is the jid a user
get some pre-keys and do something with them
modify a chat -- mark unread, read etc. lastMessages must be sorted in reverse chronologically requires the last messages till the last message received; required for archive & unread
logout & invalidate connection
fetch the profile picture of a user/group type = "preview" for a low res picture type = "image for the high res picture"
send a query, and wait for its response. auto-generates message ID if not provided
send a binary node
send a raw buffer
generic send receipt function used for receipts of phone call, read, delivery etc.
Wait for a message with a certain tag to be received
timeout after which the promise will reject
Downloads the given message. Throws an error if it's not a media message
Generate forwarded message content like WA does
the message to forward
generates a thumbnail for a given media, if required
Returns the device predicted by message ID
generates all the keys required to encrypt/decrypt & sign a media message
is the jid a broadcast
is the jid a broadcast
is the jid the status broadcast
is the jid a user
Add or remove user from blocklist
the ID of the person who you are blocking/unblocking
type of operation
Can you login to WA without scanning the QR
Modify a given chat (archive, pin etc.)
the ID of the person/group you are modifiying
generate message tag and increment epoch
Query a string to check if it has a url, if it does, return WAUrlInfo
Query broadcast list info
Query Business Profile (Useful for VCards)
Business Jid
profile object or undefined if not business account
Query the status of the person (see groupMetadata() for groups)
Create a group
like, the title of the group
people to include in the group
Leave a group
Update participants in the group
the people to add
Update the group description
the ID of the group
Update the subject of the group
the new title of the group
Load a single message specified by the ID
Logs you out from WA If connected, invalidates the credentials with the server
Query whether a given number is registered on WhatsApp
phone number/jid you want to check for
undefined if the number doesn't exists, otherwise the correctly formatted jid
Request updates on the presence of a user this returns nothing, you'll receive updates in chats.update event
Query something from the WhatsApp servers
Relay (send) a WAMessage; more advanced functionality to send a built WA Message, you may want to stick with sendMessage()
checks for phone connection
Send a message to the WA servers
the tag attached in the message
Tell someone about your presence -- online, typing, offline etc.
your presence
the ID of the person/group who you are updating
Generic function for action, set queries
Updates business profile.
Wait for a message with a certain tag to be received
the message tag to await
timeout after which the promise will reject
Update the profile picture
gets the SHA256 of the given media message
unix timestamp of a date in seconds
stores the full authentication state in a single JSON file
Generated using TypeDoc
delete chats with given ID