feat: save contact to addressbook (#3533)

* feat: add respectfull modules

* feat: add saveOrEditAddressbookContact function

* feat: add deleteAddressbookContact function

* refactor: import necessary type for return value

* style: fix typo

* docs: add ocs

* style: fix typo
This commit is contained in:
alechkos 2025-05-30 16:39:32 +03:00 • committed by GitHub
commit d29eaf7def
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

6
index.d.ts vendored
View file

@ -197,6 +197,12 @@ declare namespace WAWebJS {
/** Sync history conversation of the Chat */
syncHistory(chatId: string): Promise<boolean>
/** Save new contact to user's addressbook or edit the existing one */
saveOrEditAddressbookContact(phoneNumber: string, firstName: string, lastName: string, syncToAddressbook?: boolean): Promise<ChatId>
/** Deletes the contact from user's addressbook */
deleteAddressbookContact(honeNumber: string): Promise<void>
/** Changes and returns the archive state of the Chat */
unarchiveChat(chatId: string): Promise<boolean>