Skip to content

Commit 857031f

Browse files
committed
adjusts in swagger
1 parent d5eeb68 commit 857031f

File tree

2 files changed

+228
-13
lines changed

2 files changed

+228
-13
lines changed

src/docs/swagger.yaml

Lines changed: 227 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,11 +1368,21 @@ paths:
13681368
description: Successful response
13691369
content:
13701370
application/json: {}
1371-
/group/findGroupInfos/{instanceName}:
1372-
get:
1371+
/group/updateGroupSubject/{instanceName}:
1372+
put:
13731373
tags:
13741374
- Group Controller
1375-
summary: Retrieve details about a specific group.
1375+
summary: Update the group's display picture.
1376+
requestBody:
1377+
required: true
1378+
content:
1379+
application/json:
1380+
schema:
1381+
type: object
1382+
properties:
1383+
subject:
1384+
type: string
1385+
description: "- required - The new name of the group."
13761386
parameters:
13771387
- name: groupJid
13781388
in: query
@@ -1392,11 +1402,21 @@ paths:
13921402
description: Successful response
13931403
content:
13941404
application/json: {}
1395-
/group/participants/{instanceName}:
1396-
get:
1405+
/group/updateGroupDescription/{instanceName}:
1406+
put:
13971407
tags:
13981408
- Group Controller
1399-
summary: Retrieve a list of participants in a specific group.
1409+
summary: Update the group's display picture.
1410+
requestBody:
1411+
required: true
1412+
content:
1413+
application/json:
1414+
schema:
1415+
type: object
1416+
properties:
1417+
description:
1418+
type: string
1419+
description: "- required - The new description of the group."
14001420
parameters:
14011421
- name: groupJid
14021422
in: query
@@ -1420,7 +1440,7 @@ paths:
14201440
get:
14211441
tags:
14221442
- Group Controller
1423-
summary: Retrieve the group's invite link.
1443+
summary: Update the group's display picture.
14241444
parameters:
14251445
- name: groupJid
14261446
in: query
@@ -1444,9 +1464,137 @@ paths:
14441464
put:
14451465
tags:
14461466
- Group Controller
1447-
summary: Invalidate the existing group invite link.
1467+
summary: Update the group's display picture.
1468+
parameters:
1469+
- name: groupJid
1470+
in: query
1471+
schema:
1472+
type: string
1473+
description: "- required - The unique identifier of the group."
1474+
example: "120363046555718472@g.us"
1475+
- name: instanceName
1476+
in: path
1477+
schema:
1478+
type: string
1479+
required: true
1480+
description: "- required"
1481+
example: "evolution"
1482+
responses:
1483+
"200":
1484+
description: Successful response
1485+
content:
1486+
application/json: {}
1487+
/group/sendInvite/{instanceName}:
1488+
post:
1489+
tags:
1490+
- Group Controller
1491+
summary: Update the group's display picture.
14481492
requestBody:
1449-
content: {}
1493+
required: true
1494+
content:
1495+
application/json:
1496+
schema:
1497+
type: object
1498+
properties:
1499+
groupJid:
1500+
type: string
1501+
description: "The unique identifier of the group."
1502+
description:
1503+
type: string
1504+
description: "The new description of the group."
1505+
numbers:
1506+
type: array
1507+
description: "List of participant phone numbers to be invited."
1508+
items:
1509+
type: string
1510+
parameters:
1511+
- name: instanceName
1512+
in: path
1513+
schema:
1514+
type: string
1515+
required: true
1516+
description: "- required"
1517+
example: "evolution"
1518+
responses:
1519+
"200":
1520+
description: Successful response
1521+
content:
1522+
application/json: {}
1523+
/group/inviteInfo/{instanceName}:
1524+
get:
1525+
tags:
1526+
- Group Controller
1527+
summary: Retrieve details about a specific group.
1528+
parameters:
1529+
- name: inviteCode
1530+
in: query
1531+
schema:
1532+
type: string
1533+
description: "- required - The invite code of the group."
1534+
- name: instanceName
1535+
in: path
1536+
schema:
1537+
type: string
1538+
required: true
1539+
description: "- required"
1540+
example: "evolution"
1541+
responses:
1542+
"200":
1543+
description: Successful response
1544+
content:
1545+
application/json: {}
1546+
/group/findGroupInfos/{instanceName}:
1547+
get:
1548+
tags:
1549+
- Group Controller
1550+
summary: Retrieve details about a specific group.
1551+
parameters:
1552+
- name: groupJid
1553+
in: query
1554+
schema:
1555+
type: string
1556+
description: "- required - The unique identifier of the group."
1557+
example: "120363046555718472@g.us"
1558+
- name: instanceName
1559+
in: path
1560+
schema:
1561+
type: string
1562+
required: true
1563+
description: "- required"
1564+
example: "evolution"
1565+
responses:
1566+
"200":
1567+
description: Successful response
1568+
content:
1569+
application/json: {}
1570+
/group/fetchAllGroups/{instanceName}:
1571+
get:
1572+
tags:
1573+
- Group Controller
1574+
summary: Retrieve details about a specific group.
1575+
parameters:
1576+
- name: getParticipants
1577+
in: query
1578+
schema:
1579+
type: boolean
1580+
description: "- required - Indicates whether to retrieve the participants of the group."
1581+
- name: instanceName
1582+
in: path
1583+
schema:
1584+
type: string
1585+
required: true
1586+
description: "- required"
1587+
example: "evolution"
1588+
responses:
1589+
"200":
1590+
description: Successful response
1591+
content:
1592+
application/json: {}
1593+
/group/participants/{instanceName}:
1594+
get:
1595+
tags:
1596+
- Group Controller
1597+
summary: Retrieve a list of participants in a specific group.
14501598
parameters:
14511599
- name: groupJid
14521600
in: query
@@ -1500,6 +1648,63 @@ paths:
15001648
description: Successful response
15011649
content:
15021650
application/json: {}
1651+
/group/updateSetting/{instanceName}:
1652+
put:
1653+
tags:
1654+
- Group Controller
1655+
summary: Update the status or role of a participant in the group.
1656+
requestBody:
1657+
required: true
1658+
content:
1659+
application/json:
1660+
schema:
1661+
type: object
1662+
properties:
1663+
action:
1664+
type: string
1665+
enum: ["announcement", "not_announcement", "locked", "unlocked"]
1666+
description: "- required - The action to be taken on the participant."
1667+
parameters:
1668+
- name: instanceName
1669+
in: path
1670+
schema:
1671+
type: string
1672+
required: true
1673+
description: "- required"
1674+
example: "evolution"
1675+
responses:
1676+
"200":
1677+
description: Successful response
1678+
content:
1679+
application/json: {}
1680+
/group/toggleEphemeral/{instanceName}:
1681+
put:
1682+
tags:
1683+
- Group Controller
1684+
summary: Update the status or role of a participant in the group.
1685+
requestBody:
1686+
required: true
1687+
content:
1688+
application/json:
1689+
schema:
1690+
type: object
1691+
properties:
1692+
expiration:
1693+
type: number
1694+
description: "- required - The action to be taken on the participant."
1695+
parameters:
1696+
- name: instanceName
1697+
in: path
1698+
schema:
1699+
type: string
1700+
required: true
1701+
description: "- required"
1702+
example: "evolution"
1703+
responses:
1704+
"200":
1705+
description: Successful response
1706+
content:
1707+
application/json: {}
15031708
/group/leaveGroup/{instanceName}:
15041709
delete:
15051710
tags:
@@ -1552,13 +1757,23 @@ paths:
15521757
schema:
15531758
type: object
15541759
properties:
1555-
enabled:
1556-
type: boolean
1557-
description: "Indicates whether the webhook is active."
15581760
url:
15591761
type: string
15601762
format: uri
15611763
description: "The endpoint URL where the webhook data will be sent."
1764+
webhook_by_events:
1765+
type: boolean
1766+
description: "Indicates whether to send the webhook data by events."
1767+
webhook_base64:
1768+
type: boolean
1769+
description: "Indicates whether to send the webhook data in Base64 format."
1770+
events:
1771+
type: array
1772+
enum: [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "CALL", "NEW_JWT_TOKEN" ]
1773+
items:
1774+
type: string
1775+
description: "List of events to be sent to the webhook."
1776+
15621777
parameters:
15631778
- name: instanceName
15641779
in: path

src/whatsapp/models/typebot.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const typebotSchema = new Schema<TypebotRaw>({
4848
prefilledVariables: {
4949
remoteJid: { type: String, required: false },
5050
pushName: { type: String, required: false },
51-
additionalData: { type: Schema.Types.Mixed, required: false }
51+
additionalData: { type: Schema.Types.Mixed, required: false },
5252
},
5353
},
5454
],

0 commit comments

Comments
 (0)