Type Alias: BaileysEventMap
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.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.authorPn?
optionalauthorPn: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.id
id:
string
group.join-request.method
method:
RequestJoinMethod
group.join-request.participant
participant:
string
group.join-request.participantPn?
optionalparticipantPn: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:
object
lid-mapping.update.lid
lid:
string
lid-mapping.update.pn
pn:
string
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.contacts
contacts:
Contact[]
messaging-history.set.isLatest?
optionalisLatest:boolean
messaging-history.set.messages
messages:
WAMessage[]
messaging-history.set.peerDataRequestSessionId?
optionalpeerDataRequestSessionId:string|null
messaging-history.set.progress?
optionalprogress:number|null
messaging-history.set.syncType?
optionalsyncType:HistorySyncType|null
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