Implementation of Whatsapp labels management

This commit is contained in:
Judson Cairo
2024-02-08 09:16:24 -03:00
parent 32026d1fd4
commit 23f1b4ac03
25 changed files with 610 additions and 1 deletions

View File

@@ -51,6 +51,7 @@ tags:
- name: Send Message Controller
- name: Chat Controller
- name: Group Controller
- name: Label Controller
- name: Profile Settings
- name: JWT
- name: Settings
@@ -1856,6 +1857,8 @@ paths:
"GROUP_UPDATE",
"GROUP_PARTICIPANTS_UPDATE",
"CONNECTION_UPDATE",
"LABELS_EDIT",
"LABELS_ASSOCIATION",
"CALL",
"NEW_JWT_TOKEN",
]
@@ -1932,6 +1935,8 @@ paths:
"GROUP_UPDATE",
"GROUP_PARTICIPANTS_UPDATE",
"CONNECTION_UPDATE",
"LABELS_EDIT",
"LABELS_ASSOCIATION",
"CALL",
"NEW_JWT_TOKEN",
]
@@ -2008,6 +2013,8 @@ paths:
"GROUP_UPDATE",
"GROUP_PARTICIPANTS_UPDATE",
"CONNECTION_UPDATE",
"LABELS_EDIT",
"LABELS_ASSOCIATION",
"CALL",
"NEW_JWT_TOKEN",
]
@@ -2046,6 +2053,96 @@ paths:
content:
application/json: {}
/label/findLabels/{instanceName}:
get:
tags:
- Label Controller
summary: List all labels for an instance.
parameters:
- name: instanceName
in: path
schema:
type: string
required: true
description: "- required"
example: "evolution"
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: array
items:
type: object
properties:
color:
type: integer
name:
type: string
id:
type: string
predefinedId:
type: string
required:
- color
- name
- id
/label/handleLabel/{instanceName}:
put:
tags:
- Label Controller
summary: Change the label (add or remove) for an specific chat.
parameters:
- name: instanceName
in: path
schema:
type: string
required: true
description: "- required"
example: "evolution"
requestBody:
content:
application/json:
schema:
type: object
properties:
number:
type: string
labelId:
type: string
action:
type: string
enum:
- add
- remove
required:
- number
- labelId
- action
example:
number: '553499999999'
labelId: '1'
action: add
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: object
properties:
numberJid:
type: string
labelId:
type: string
remove:
type: boolean
required:
- numberJid
- labelId
- remove
/settings/set/{instanceName}:
post:
tags: