feat: get/add/edit customer notes (#3806)
* feat: add required module * feat: add 'addOrEditCustomerNote' function * feat: add 'getCustomerNote' function * fix: check for logic availability * feat: add 'Chat.addOrEditCustomerNote' * feat: add Chat.getCustomerNote
This commit is contained in:
parent
0825033850
commit
7304ec2135
1 changed files with 113 additions and 0 deletions
30
index.d.ts
vendored
30
index.d.ts
vendored
|
|
@ -244,6 +244,25 @@ declare namespace WAWebJS {
|
|||
/** Save new contact to user's addressbook or edit the existing one */
|
||||
saveOrEditAddressbookContact(phoneNumber: string, firstName: string, lastName: string, syncToAddressbook?: boolean): Promise<ChatId>
|
||||
|
||||
/**
|
||||
* Add or edit a customer note
|
||||
* @see https://faq.whatsapp.com/1433099287594476
|
||||
*/
|
||||
addOrEditCustomerNote(userId: string, note: string): Promise<void>
|
||||
|
||||
/**
|
||||
* Get a customer note
|
||||
* @see https://faq.whatsapp.com/1433099287594476
|
||||
*/
|
||||
getCustomerNote(userId: string): Promise<{
|
||||
chatId: string;
|
||||
content: string;
|
||||
createdAt: number;
|
||||
id: string;
|
||||
modifiedAt: number;
|
||||
type: string;
|
||||
}>
|
||||
|
||||
/** Deletes the contact from user's addressbook */
|
||||
deleteAddressbookContact(honeNumber: string): Promise<void>
|
||||
|
||||
|
|
@ -1707,6 +1726,17 @@ declare namespace WAWebJS {
|
|||
getPinnedMessages: () => Promise<[Message]|[]>
|
||||
/** Sync history conversation of the Chat */
|
||||
syncHistory: () => Promise<boolean>
|
||||
/** Add or edit a customer note */
|
||||
addOrEditCustomerNote: (note: string) => Promise<void>
|
||||
/** Get a customer note */
|
||||
getCustomerNote: () => Promise<{
|
||||
chatId: string;
|
||||
content: string;
|
||||
createdAt: number;
|
||||
id: string;
|
||||
modifiedAt: number;
|
||||
type: string;
|
||||
}>
|
||||
}
|
||||
|
||||
export interface Channel {
|
||||
|
|
|
|||
Loading…
Reference in a new issue