Merge branch 'master' into call

This commit is contained in:
Rajeh Taher
2024-01-01 01:04:23 +02:00
committed by GitHub
16 changed files with 126 additions and 119 deletions

View File

@@ -1,5 +1,6 @@
export interface Contact {
id: string
lid?: string
/** name of the contact, you have saved on your WA */
name?: string
/** name of the contact, the contact has set on their own on WA */

View File

@@ -26,6 +26,7 @@ export type BaileysEventMap = {
'chats.upsert': Chat[]
/** update the given chats */
'chats.update': ChatUpdate[]
'chats.phoneNumberShare': {lid: string, jid: string}
/** delete chats with given ID */
'chats.delete': string[]
/** presence of contact in a chat updated */
@@ -54,6 +55,7 @@ export type BaileysEventMap = {
'blocklist.set': { blocklist: string[] }
'blocklist.update': { blocklist: string[], type: 'add' | 'remove' }
/** Receive an update on a call, including when the call was received, rejected, accepted */
'call': WACallEvent[]
'labels.edit': Label

View File

@@ -96,6 +96,14 @@ export type PollMessageOptions = {
messageSecret?: Uint8Array
}
type SharePhoneNumber = {
sharePhoneNumber: boolean
}
type RequestPhoneNumber = {
requestPhoneNumber: boolean
}
export type MediaType = keyof typeof MEDIA_HKDF_KEY_MAPPING
export type AnyMediaMessageContent = (
({
@@ -169,7 +177,7 @@ export type AnyRegularMessageContent = (
businessOwnerJid?: string
body?: string
footer?: string
}
} | SharePhoneNumber | RequestPhoneNumber
) & ViewOnce
export type AnyMessageContent = AnyRegularMessageContent | {