BaileysEventMap: object
Defined in: src/Types/Events.ts:20
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.lock
lock: object
Settings and actions sync events
chats.lock.id
id: string
chats.lock.locked
locked: boolean
chats.update
update: ChatUpdate[]
update the given chats
chats.upsert
upsert: Chat[]
upsert chats
connection.update
update:connection state has been updated — WS closed, opened, connecting etc.Partial<ConnectionState>
contacts.update
update:Partial<Contact>[]
contacts.upsert
upsert: Contact[]
creds.update
update:credentials updated — some metadata, keys or somethingPartial<AuthenticationCreds>
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.authorPn?
optionalauthorPn:string
group-participants.update.authorUsername?
optionalauthorUsername:string
group-participants.update.id
id: string
group-participants.update.participants
participants: GroupParticipant[]
group.join-request
join-request: object
group.join-request.action
action: RequestJoinAction
group.join-request.author
author: string
group.join-request.authorPn?
optionalauthorPn:string
group.join-request.authorUsername?
optionalauthorUsername:string
group.join-request.id
id: string
group.join-request.method
method: RequestJoinMethod
group.join-request.participant
participant: string
group.join-request.participantPn?
optionalparticipantPn:string
group.member-tag.update
update: object
group.member-tag.update.groupId
groupId: string
group.member-tag.update.label
label: string
group.member-tag.update.messageTimestamp?
optionalmessageTimestamp:number
group.member-tag.update.participant
participant: string
group.member-tag.update.participantAlt?
optionalparticipantAlt: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
lid-mapping.update
update: LIDMapping
message-capping.update
update: NewChatMessageCapInfo
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?
optionalrequestId: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.chunkOrder?
optionalchunkOrder:number|null
messaging-history.set.contacts
contacts: Contact[]
messaging-history.set.isLatest?
optionalisLatest:boolean
messaging-history.set.lidPnMappings?
optionallidPnMappings:LIDMapping[]
messaging-history.set.messages
messages: WAMessage[]
messaging-history.set.pastParticipants?
optionalpastParticipants:IPastParticipants[] |null
messaging-history.set.peerDataRequestSessionId?
optionalpeerDataRequestSessionId:string|null
messaging-history.set.progress?
optionalprogress:number|null
messaging-history.set.syncType?
optionalsyncType:HistorySyncType|null
messaging-history.status
status: object
signals history sync milestones (completion or stall) per sync type
messaging-history.status.explicit
explicit: boolean
progress === 100 was received from the server.
when false, completion was inferred via timeout (no more chunks arriving).
messaging-history.status.status
status:the status of this sync phase"complete"|"paused"
messaging-history.status.syncType
syncType: HistorySyncType
which sync phase this status refers to
newsletter-participants.update
update: object
newsletter-participants.update.action
action: string
newsletter-participants.update.author
author: string
newsletter-participants.update.id
id: string
newsletter-participants.update.new_role
new_role: string
newsletter-participants.update.user
user: string
newsletter-settings.update
update: object
newsletter-settings.update.id
id: string
newsletter-settings.update.update
update: any
newsletter.reaction
reaction: object
Newsletter-related events
newsletter.reaction.id
id: string
newsletter.reaction.reaction
reaction: object
newsletter.reaction.reaction.code?
optionalcode:string
newsletter.reaction.reaction.count?
optionalcount:number
newsletter.reaction.reaction.removed?
optionalremoved:boolean
newsletter.reaction.server_id
server_id: string
newsletter.view
view: object
newsletter.view.count
count: number
newsletter.view.id
id: string
newsletter.view.server_id
server_id: string
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
settings.update
update: {setting:"unarchiveChats";value:boolean; } | {setting:"locale";value:string; } | {setting:"disableLinkPreviews";value:IPrivacySettingDisableLinkPreviewsAction; } | {setting:"timeFormat";value:ITimeFormatAction; } | {setting:"privacySettingRelayAllCalls";value:IPrivacySettingRelayAllCalls; } | {setting:"statusPrivacy";value:IStatusPrivacyAction; } | {setting:"notificationActivitySetting";value:NotificationActivitySetting; } | {setting:"channelsPersonalisedRecommendation";value:IPrivacySettingChannelsPersonalisedRecommendationAction; }