Skip to main content

Type Alias: BaileysEventMap

BaileysEventMap: object

Defined in: src/Types/Events.ts:13

Type declaration

blocklist.set

set: object

blocklist.set.blocklist

blocklist: string[]

blocklist.update

update: object

blocklist.update.blocklist

blocklist: string[]

blocklist.update.type

type: "add" | "remove"

call

call: WACallEvent[]

Receive an update on a call, including when the call was received, rejected, accepted

chats.delete

delete: string[]

delete chats with given ID

chats.phoneNumberShare

phoneNumberShare: object

chats.phoneNumberShare.jid

jid: string

chats.phoneNumberShare.lid

lid: string

chats.update

update: ChatUpdate[]

update the given chats

chats.upsert

upsert: Chat[]

upsert chats

connection.update

update: Partial<ConnectionState>

connection state has been updated -- WS closed, opened, connecting etc.

contacts.update

update: Partial<Contact>[]

contacts.upsert

upsert: Contact[]

creds.update

update: Partial<AuthenticationCreds>

credentials updated -- some metadata, keys or something

group-participants.update

update: object

apply an action to participants in a group

group-participants.update.action

action: ParticipantAction

group-participants.update.author

author: string

group-participants.update.id

id: string

group-participants.update.participants

participants: string[]

group.join-request

join-request: object

group.join-request.action

action: RequestJoinAction

group.join-request.author

author: string

group.join-request.id

id: string

group.join-request.method

method: RequestJoinMethod

group.join-request.participant

participant: string

groups.update

update: Partial<GroupMetadata>[]

groups.upsert

upsert: GroupMetadata[]

labels.association

association: object

labels.association.association

association: LabelAssociation

labels.association.type

type: "add" | "remove"

labels.edit

edit: Label

message-receipt.update

update: MessageUserReceiptUpdate[]

messages.delete

delete: { keys: WAMessageKey[]; } | { all: true; jid: string; }

messages.media-update

media-update: object[]

messages.reaction

reaction: object[]

message was reacted to. If reaction was removed -- then "reaction.text" will be falsey

messages.update

update: WAMessageUpdate[]

messages.upsert

upsert: object

add/update the given messages. If they were received while the connection was online, the update will have type: "notify" if requestId is provided, then the messages was received from the phone due to it being unavailable

messages.upsert.messages

messages: WAMessage[]

messages.upsert.requestId?

optional requestId: string

messages.upsert.type

type: MessageUpsertType

messaging-history.set

set: object

set chats (history sync), everything is reverse chronologically sorted

messaging-history.set.chats

chats: Chat[]

messaging-history.set.contacts

contacts: Contact[]

messaging-history.set.isLatest?

optional isLatest: boolean

messaging-history.set.messages

messages: WAMessage[]

messaging-history.set.peerDataRequestSessionId?

optional peerDataRequestSessionId: string | null

messaging-history.set.progress?

optional progress: number | null

messaging-history.set.syncType?

optional syncType: HistorySyncType

presence.update

update: object

presence of contact in a chat updated

presence.update.id

id: string

presence.update.presences

presences: object

Index Signature

[participant: string]: PresenceData