From 274d24002b3fbc8dd30f4b4588e6c8adab39e8a2 Mon Sep 17 00:00:00 2001 From: dyegoaurelio <42411160+dyegoaurelio@users.noreply.github.com> Date: Thu, 17 Dec 2020 17:30:36 -0300 Subject: [PATCH] feat: WA Business Labels support (#407) * Get all labels * Get chats by label * Get labels assigned to chats Co-authored-by: Pedro S. Lopez Co-authored-by: Pedro Lopez --- index.d.ts | 26 ++++++++++++++++++ src/Client.js | 59 ++++++++++++++++++++++++++++++++++++++++- src/structures/Chat.js | 8 ++++++ src/structures/Label.js | 50 ++++++++++++++++++++++++++++++++++ src/structures/index.js | 3 ++- src/util/Injected.js | 22 +++++++++++++++ 6 files changed, 166 insertions(+), 2 deletions(-) create mode 100644 src/structures/Label.js diff --git a/index.d.ts b/index.d.ts index ce4c1ad..8353c5a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -50,6 +50,18 @@ declare namespace WAWebJS { /** Get all current contact instances */ getContacts(): Promise + /** Get all current Labels */ + getLabels(): Promise + + /** Get Label instance by ID */ + getLabelById(labelId: string): Promise