@wppconnect/server 2.2.4 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/Dockerfile +3 -3
- package/README.md +29 -6
- package/dist/config/upload.js +2 -2
- package/dist/config.js +28 -6
- package/dist/controller/deviceController.js +7 -14
- package/dist/controller/groupController.js +37 -6
- package/dist/controller/messageController.js +244 -27
- package/dist/controller/newsletterController.js +196 -0
- package/dist/controller/orderController.js +14 -27
- package/dist/controller/sessionController.js +20 -35
- package/dist/index.js +9 -3
- package/dist/mapper/index.js +2 -2
- package/dist/mapper/tagone-chat.js +3 -3
- package/dist/mapper/tagone-device.js +3 -3
- package/dist/mapper/tagone-message-document.js +3 -3
- package/dist/mapper/tagone-message-image.js +3 -3
- package/dist/mapper/tagone-message-location.js +3 -3
- package/dist/mapper/tagone-message-video.js +3 -3
- package/dist/mapper/tagone-message.js +3 -3
- package/dist/mapper/tagone-onack.js +3 -3
- package/dist/mapper/tagone-return.js +3 -3
- package/dist/middleware/auth.js +3 -3
- package/dist/middleware/instrumentation.js +39 -0
- package/dist/routes/index.js +65 -11
- package/dist/swagger.json +655 -107
- package/dist/tests/util/bufferUtils.test.js +54 -0
- package/dist/types/ServerOptions.js +1 -1
- package/dist/util/bucketAlreadyExists.js +26 -0
- package/dist/util/bufferutils.js +50 -0
- package/dist/util/chatWootClient.js +124 -38
- package/dist/util/createSessionUtil.js +25 -8
- package/dist/util/db/mongodb/db.js +3 -3
- package/dist/util/db/redis/db.js +3 -3
- package/dist/util/functions.js +85 -21
- package/dist/util/sessionUtil.js +23 -22
- package/dist/util/tokenStore/FileTokenStore/FileTokenStore.js +4 -4
- package/dist/util/tokenStore/factory.js +3 -3
- package/dist/util/tokenStore/fileTokenStory.js +3 -3
- package/dist/util/tokenStore/model/token.js +3 -3
- package/dist/util/tokenStore/mongodbTokenStory.js +3 -3
- package/dist/util/tokenStore/redisTokenStory.js +3 -3
- package/jest.config.js +5 -0
- package/package.json +59 -60
- package/tsconfig.json +6 -4
package/dist/swagger.json
CHANGED
|
@@ -93,6 +93,7 @@
|
|
|
93
93
|
"get": {
|
|
94
94
|
"tags": ["Auth"],
|
|
95
95
|
"description": "",
|
|
96
|
+
"operationId": "showAllSessions",
|
|
96
97
|
"parameters": [
|
|
97
98
|
{
|
|
98
99
|
"name": "secretkey",
|
|
@@ -123,6 +124,7 @@
|
|
|
123
124
|
"post": {
|
|
124
125
|
"tags": ["Auth"],
|
|
125
126
|
"description": "",
|
|
127
|
+
"operationId": "startAllSessions",
|
|
126
128
|
"parameters": [
|
|
127
129
|
{
|
|
128
130
|
"name": "secretkey",
|
|
@@ -168,6 +170,7 @@
|
|
|
168
170
|
"get": {
|
|
169
171
|
"tags": ["Auth"],
|
|
170
172
|
"description": "",
|
|
173
|
+
"operationId": "CheckConnectionState",
|
|
171
174
|
"parameters": [
|
|
172
175
|
{
|
|
173
176
|
"name": "session",
|
|
@@ -195,6 +198,7 @@
|
|
|
195
198
|
"get": {
|
|
196
199
|
"tags": ["Messages"],
|
|
197
200
|
"description": "",
|
|
201
|
+
"operationId": "getMediaByMessage",
|
|
198
202
|
"parameters": [
|
|
199
203
|
{
|
|
200
204
|
"name": "session",
|
|
@@ -271,52 +275,11 @@
|
|
|
271
275
|
]
|
|
272
276
|
}
|
|
273
277
|
},
|
|
274
|
-
"/api/{session}/status-session": {
|
|
275
|
-
"get": {
|
|
276
|
-
"tags": ["Auth"],
|
|
277
|
-
"description": "",
|
|
278
|
-
"parameters": [
|
|
279
|
-
{
|
|
280
|
-
"name": "session",
|
|
281
|
-
"in": "path",
|
|
282
|
-
"required": true,
|
|
283
|
-
"schema": {
|
|
284
|
-
"type": "string",
|
|
285
|
-
"example": "NERDWHATS_AMERICA"
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
],
|
|
289
|
-
"responses": {
|
|
290
|
-
"200": {
|
|
291
|
-
"description": "OK"
|
|
292
|
-
},
|
|
293
|
-
"500": {
|
|
294
|
-
"description": "Internal Server Error"
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
"security": [
|
|
298
|
-
{
|
|
299
|
-
"bearerAuth": []
|
|
300
|
-
}
|
|
301
|
-
],
|
|
302
|
-
"requestBody": {
|
|
303
|
-
"required": true,
|
|
304
|
-
"content": {
|
|
305
|
-
"application/json": {
|
|
306
|
-
"schema": {
|
|
307
|
-
"type": "object",
|
|
308
|
-
"properties": {}
|
|
309
|
-
},
|
|
310
|
-
"example": {}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
278
|
"/api/{session}/qrcode-session": {
|
|
317
279
|
"get": {
|
|
318
280
|
"tags": ["Auth"],
|
|
319
281
|
"description": "",
|
|
282
|
+
"operationId": "getQrCode",
|
|
320
283
|
"parameters": [
|
|
321
284
|
{
|
|
322
285
|
"name": "session",
|
|
@@ -347,6 +310,7 @@
|
|
|
347
310
|
"post": {
|
|
348
311
|
"tags": ["Auth"],
|
|
349
312
|
"description": "",
|
|
313
|
+
"operationId": "startSession",
|
|
350
314
|
"parameters": [
|
|
351
315
|
{
|
|
352
316
|
"name": "session",
|
|
@@ -358,7 +322,11 @@
|
|
|
358
322
|
}
|
|
359
323
|
}
|
|
360
324
|
],
|
|
361
|
-
"responses": {
|
|
325
|
+
"responses": {
|
|
326
|
+
"default": {
|
|
327
|
+
"description": ""
|
|
328
|
+
}
|
|
329
|
+
},
|
|
362
330
|
"security": [
|
|
363
331
|
{
|
|
364
332
|
"bearerAuth": []
|
|
@@ -380,7 +348,7 @@
|
|
|
380
348
|
}
|
|
381
349
|
},
|
|
382
350
|
"example": {
|
|
383
|
-
"webhook": "
|
|
351
|
+
"webhook": "",
|
|
384
352
|
"waitQrCode": false
|
|
385
353
|
}
|
|
386
354
|
}
|
|
@@ -392,6 +360,7 @@
|
|
|
392
360
|
"post": {
|
|
393
361
|
"tags": ["Auth"],
|
|
394
362
|
"description": "This route logout and delete session data",
|
|
363
|
+
"operationId": "logoutSession",
|
|
395
364
|
"parameters": [
|
|
396
365
|
{
|
|
397
366
|
"name": "session",
|
|
@@ -459,6 +428,7 @@
|
|
|
459
428
|
"post": {
|
|
460
429
|
"tags": ["Auth"],
|
|
461
430
|
"description": "",
|
|
431
|
+
"operationId": "closeSession",
|
|
462
432
|
"parameters": [
|
|
463
433
|
{
|
|
464
434
|
"name": "session",
|
|
@@ -482,25 +452,14 @@
|
|
|
482
452
|
{
|
|
483
453
|
"bearerAuth": []
|
|
484
454
|
}
|
|
485
|
-
]
|
|
486
|
-
"requestBody": {
|
|
487
|
-
"required": true,
|
|
488
|
-
"content": {
|
|
489
|
-
"application/json": {
|
|
490
|
-
"schema": {
|
|
491
|
-
"type": "object",
|
|
492
|
-
"properties": {}
|
|
493
|
-
},
|
|
494
|
-
"example": {}
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
455
|
+
]
|
|
498
456
|
}
|
|
499
457
|
},
|
|
500
458
|
"/api/{session}/subscribe-presence": {
|
|
501
459
|
"post": {
|
|
502
460
|
"tags": ["Misc"],
|
|
503
461
|
"description": "",
|
|
462
|
+
"operationId": "subscribePresence",
|
|
504
463
|
"parameters": [
|
|
505
464
|
{
|
|
506
465
|
"name": "session",
|
|
@@ -557,6 +516,7 @@
|
|
|
557
516
|
"post": {
|
|
558
517
|
"tags": ["Messages"],
|
|
559
518
|
"description": "",
|
|
519
|
+
"operationId": "downloadMediabyMessage",
|
|
560
520
|
"parameters": [
|
|
561
521
|
{
|
|
562
522
|
"name": "session",
|
|
@@ -633,23 +593,89 @@
|
|
|
633
593
|
"schema": {
|
|
634
594
|
"type": "object",
|
|
635
595
|
"properties": {
|
|
636
|
-
"
|
|
596
|
+
"phone": {
|
|
637
597
|
"type": "string"
|
|
638
598
|
},
|
|
639
|
-
"
|
|
599
|
+
"isGroup": {
|
|
640
600
|
"type": "boolean"
|
|
641
601
|
},
|
|
642
|
-
"
|
|
602
|
+
"message": {
|
|
643
603
|
"type": "string"
|
|
604
|
+
},
|
|
605
|
+
"options": {
|
|
606
|
+
"type": "object"
|
|
644
607
|
}
|
|
645
608
|
}
|
|
646
609
|
},
|
|
647
610
|
"examples": {
|
|
648
|
-
"
|
|
611
|
+
"Send message to contact": {
|
|
649
612
|
"value": {
|
|
650
613
|
"phone": "5521999999999",
|
|
651
614
|
"isGroup": false,
|
|
652
|
-
"message": "
|
|
615
|
+
"message": "Hi from WPPConnect"
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
"Send message to group": {
|
|
619
|
+
"value": {
|
|
620
|
+
"phone": "8865623215244578",
|
|
621
|
+
"isGroup": true,
|
|
622
|
+
"message": "Hi from WPPConnect"
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
"/api/{session}/edit-message": {
|
|
632
|
+
"post": {
|
|
633
|
+
"tags": ["Messages"],
|
|
634
|
+
"description": "",
|
|
635
|
+
"parameters": [
|
|
636
|
+
{
|
|
637
|
+
"name": "session",
|
|
638
|
+
"in": "path",
|
|
639
|
+
"required": true,
|
|
640
|
+
"schema": {
|
|
641
|
+
"type": "string",
|
|
642
|
+
"example": "NERDWHATS_AMERICA"
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
],
|
|
646
|
+
"responses": {
|
|
647
|
+
"default": {
|
|
648
|
+
"description": ""
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
"security": [
|
|
652
|
+
{
|
|
653
|
+
"bearerAuth": []
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
"requestBody": {
|
|
657
|
+
"required": true,
|
|
658
|
+
"content": {
|
|
659
|
+
"application/json": {
|
|
660
|
+
"schema": {
|
|
661
|
+
"type": "object",
|
|
662
|
+
"properties": {
|
|
663
|
+
"id": {
|
|
664
|
+
"type": "string"
|
|
665
|
+
},
|
|
666
|
+
"newText": {
|
|
667
|
+
"type": "string"
|
|
668
|
+
},
|
|
669
|
+
"options": {
|
|
670
|
+
"type": "object"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
"examples": {
|
|
675
|
+
"Edit a message": {
|
|
676
|
+
"value": {
|
|
677
|
+
"id": "true_5521999999999@c.us_3EB04FCAA1527EB6D9DEC8",
|
|
678
|
+
"newText": "New text for message"
|
|
653
679
|
}
|
|
654
680
|
}
|
|
655
681
|
}
|
|
@@ -1163,6 +1189,37 @@
|
|
|
1163
1189
|
}
|
|
1164
1190
|
}
|
|
1165
1191
|
},
|
|
1192
|
+
"/api/{session}/status-session": {
|
|
1193
|
+
"get": {
|
|
1194
|
+
"tags": ["Auth"],
|
|
1195
|
+
"description": "",
|
|
1196
|
+
"operationId": "closeSession",
|
|
1197
|
+
"parameters": [
|
|
1198
|
+
{
|
|
1199
|
+
"name": "session",
|
|
1200
|
+
"in": "path",
|
|
1201
|
+
"required": true,
|
|
1202
|
+
"schema": {
|
|
1203
|
+
"type": "string",
|
|
1204
|
+
"example": "NERDWHATS_AMERICA"
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
],
|
|
1208
|
+
"responses": {
|
|
1209
|
+
"200": {
|
|
1210
|
+
"description": "OK"
|
|
1211
|
+
},
|
|
1212
|
+
"500": {
|
|
1213
|
+
"description": "Internal Server Error"
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
"security": [
|
|
1217
|
+
{
|
|
1218
|
+
"bearerAuth": []
|
|
1219
|
+
}
|
|
1220
|
+
]
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1166
1223
|
"/api/{session}/send-status": {
|
|
1167
1224
|
"post": {
|
|
1168
1225
|
"tags": ["Messages"],
|
|
@@ -1438,7 +1495,11 @@
|
|
|
1438
1495
|
}
|
|
1439
1496
|
}
|
|
1440
1497
|
],
|
|
1441
|
-
"responses": {
|
|
1498
|
+
"responses": {
|
|
1499
|
+
"default": {
|
|
1500
|
+
"description": ""
|
|
1501
|
+
}
|
|
1502
|
+
},
|
|
1442
1503
|
"security": [
|
|
1443
1504
|
{
|
|
1444
1505
|
"bearerAuth": []
|
|
@@ -1462,13 +1523,176 @@
|
|
|
1462
1523
|
}
|
|
1463
1524
|
}
|
|
1464
1525
|
],
|
|
1465
|
-
"responses": {
|
|
1526
|
+
"responses": {
|
|
1527
|
+
"default": {
|
|
1528
|
+
"description": ""
|
|
1529
|
+
}
|
|
1530
|
+
},
|
|
1466
1531
|
"security": [
|
|
1467
1532
|
{
|
|
1468
1533
|
"bearerAuth": []
|
|
1469
1534
|
}
|
|
1470
1535
|
],
|
|
1471
|
-
"
|
|
1536
|
+
"requestBody": {
|
|
1537
|
+
"required": true,
|
|
1538
|
+
"content": {
|
|
1539
|
+
"application/json": {
|
|
1540
|
+
"schema": {
|
|
1541
|
+
"type": "object",
|
|
1542
|
+
"properties": {
|
|
1543
|
+
"phone": {
|
|
1544
|
+
"type": "string"
|
|
1545
|
+
},
|
|
1546
|
+
"isGroup": {
|
|
1547
|
+
"type": "boolean"
|
|
1548
|
+
},
|
|
1549
|
+
"description": {
|
|
1550
|
+
"type": "string"
|
|
1551
|
+
},
|
|
1552
|
+
"sections": {
|
|
1553
|
+
"type": "array"
|
|
1554
|
+
},
|
|
1555
|
+
"buttonText": {
|
|
1556
|
+
"type": "string"
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
},
|
|
1560
|
+
"examples": {
|
|
1561
|
+
"Send list message": {
|
|
1562
|
+
"value": {
|
|
1563
|
+
"phone": "5521999999999",
|
|
1564
|
+
"isGroup": false,
|
|
1565
|
+
"description": "Desc for list",
|
|
1566
|
+
"buttonText": "Select a option",
|
|
1567
|
+
"sections": [
|
|
1568
|
+
{
|
|
1569
|
+
"title": "Section 1",
|
|
1570
|
+
"rows": [
|
|
1571
|
+
{
|
|
1572
|
+
"rowId": "my_custom_id",
|
|
1573
|
+
"title": "Test 1",
|
|
1574
|
+
"description": "Description 1"
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
"rowId": "2",
|
|
1578
|
+
"title": "Test 2",
|
|
1579
|
+
"description": "Description 2"
|
|
1580
|
+
}
|
|
1581
|
+
]
|
|
1582
|
+
}
|
|
1583
|
+
]
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1592
|
+
"/api/{session}/send-order-message": {
|
|
1593
|
+
"post": {
|
|
1594
|
+
"tags": ["Messages"],
|
|
1595
|
+
"description": "",
|
|
1596
|
+
"parameters": [
|
|
1597
|
+
{
|
|
1598
|
+
"name": "session",
|
|
1599
|
+
"in": "path",
|
|
1600
|
+
"required": true,
|
|
1601
|
+
"schema": {
|
|
1602
|
+
"type": "string",
|
|
1603
|
+
"example": "NERDWHATS_AMERICA"
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
],
|
|
1607
|
+
"responses": {
|
|
1608
|
+
"400": {
|
|
1609
|
+
"description": "Bad Request"
|
|
1610
|
+
}
|
|
1611
|
+
},
|
|
1612
|
+
"security": [
|
|
1613
|
+
{
|
|
1614
|
+
"bearerAuth": []
|
|
1615
|
+
}
|
|
1616
|
+
],
|
|
1617
|
+
"requestBody": {
|
|
1618
|
+
"required": true,
|
|
1619
|
+
"content": {
|
|
1620
|
+
"application/json": {
|
|
1621
|
+
"schema": {
|
|
1622
|
+
"type": "object",
|
|
1623
|
+
"properties": {
|
|
1624
|
+
"phone": {
|
|
1625
|
+
"type": "string"
|
|
1626
|
+
},
|
|
1627
|
+
"isGroup": {
|
|
1628
|
+
"type": "boolean"
|
|
1629
|
+
},
|
|
1630
|
+
"items": {
|
|
1631
|
+
"type": "object"
|
|
1632
|
+
},
|
|
1633
|
+
"options": {
|
|
1634
|
+
"type": "object"
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
},
|
|
1638
|
+
"examples": {
|
|
1639
|
+
"Send with custom items": {
|
|
1640
|
+
"value": {
|
|
1641
|
+
"phone": "5521999999999",
|
|
1642
|
+
"isGroup": false,
|
|
1643
|
+
"items": [
|
|
1644
|
+
{
|
|
1645
|
+
"type": "custom",
|
|
1646
|
+
"name": "Item test",
|
|
1647
|
+
"price": 120000,
|
|
1648
|
+
"qnt": 2
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
"type": "custom",
|
|
1652
|
+
"name": "Item test 2",
|
|
1653
|
+
"price": 145000,
|
|
1654
|
+
"qnt": 2
|
|
1655
|
+
}
|
|
1656
|
+
]
|
|
1657
|
+
}
|
|
1658
|
+
},
|
|
1659
|
+
"Send with product items": {
|
|
1660
|
+
"value": {
|
|
1661
|
+
"phone": "5521999999999",
|
|
1662
|
+
"isGroup": false,
|
|
1663
|
+
"items": [
|
|
1664
|
+
{
|
|
1665
|
+
"type": "product",
|
|
1666
|
+
"id": "37878774457",
|
|
1667
|
+
"price": 148000,
|
|
1668
|
+
"qnt": 2
|
|
1669
|
+
}
|
|
1670
|
+
]
|
|
1671
|
+
}
|
|
1672
|
+
},
|
|
1673
|
+
"Send with custom items and options": {
|
|
1674
|
+
"value": {
|
|
1675
|
+
"phone": "5521999999999",
|
|
1676
|
+
"isGroup": false,
|
|
1677
|
+
"items": [
|
|
1678
|
+
{
|
|
1679
|
+
"type": "custom",
|
|
1680
|
+
"name": "Item test",
|
|
1681
|
+
"price": 120000,
|
|
1682
|
+
"qnt": 2
|
|
1683
|
+
}
|
|
1684
|
+
],
|
|
1685
|
+
"options": {
|
|
1686
|
+
"tax": 10000,
|
|
1687
|
+
"shipping": 4000,
|
|
1688
|
+
"discount": 10000
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1472
1696
|
}
|
|
1473
1697
|
},
|
|
1474
1698
|
"/api/{session}/send-poll-message": {
|
|
@@ -1486,7 +1710,11 @@
|
|
|
1486
1710
|
}
|
|
1487
1711
|
}
|
|
1488
1712
|
],
|
|
1489
|
-
"responses": {
|
|
1713
|
+
"responses": {
|
|
1714
|
+
"default": {
|
|
1715
|
+
"description": ""
|
|
1716
|
+
}
|
|
1717
|
+
},
|
|
1490
1718
|
"security": [
|
|
1491
1719
|
{
|
|
1492
1720
|
"bearerAuth": []
|
|
@@ -1586,6 +1814,14 @@
|
|
|
1586
1814
|
"example": "<groupId>"
|
|
1587
1815
|
},
|
|
1588
1816
|
"in": "query"
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
"name": "wid",
|
|
1820
|
+
"schema": {
|
|
1821
|
+
"type": "string",
|
|
1822
|
+
"example": "5521999999999@c.us"
|
|
1823
|
+
},
|
|
1824
|
+
"in": "query"
|
|
1589
1825
|
}
|
|
1590
1826
|
],
|
|
1591
1827
|
"responses": {
|
|
@@ -1686,6 +1922,45 @@
|
|
|
1686
1922
|
}
|
|
1687
1923
|
}
|
|
1688
1924
|
},
|
|
1925
|
+
"/api/{session}/common-groups/{wid}": {
|
|
1926
|
+
"get": {
|
|
1927
|
+
"tags": ["Group"],
|
|
1928
|
+
"description": "",
|
|
1929
|
+
"parameters": [
|
|
1930
|
+
{
|
|
1931
|
+
"name": "session",
|
|
1932
|
+
"in": "path",
|
|
1933
|
+
"required": true,
|
|
1934
|
+
"schema": {
|
|
1935
|
+
"type": "string",
|
|
1936
|
+
"example": "NERDWHATS_AMERICA"
|
|
1937
|
+
}
|
|
1938
|
+
},
|
|
1939
|
+
{
|
|
1940
|
+
"name": "wid",
|
|
1941
|
+
"in": "path",
|
|
1942
|
+
"required": true,
|
|
1943
|
+
"schema": {
|
|
1944
|
+
"type": "string",
|
|
1945
|
+
"example": "5521999999999@c.us"
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
],
|
|
1949
|
+
"responses": {
|
|
1950
|
+
"200": {
|
|
1951
|
+
"description": "OK"
|
|
1952
|
+
},
|
|
1953
|
+
"500": {
|
|
1954
|
+
"description": "Internal Server Error"
|
|
1955
|
+
}
|
|
1956
|
+
},
|
|
1957
|
+
"security": [
|
|
1958
|
+
{
|
|
1959
|
+
"bearerAuth": []
|
|
1960
|
+
}
|
|
1961
|
+
]
|
|
1962
|
+
}
|
|
1963
|
+
},
|
|
1689
1964
|
"/api/{session}/group-admins/{groupId}": {
|
|
1690
1965
|
"get": {
|
|
1691
1966
|
"tags": ["Group"],
|
|
@@ -3178,7 +3453,11 @@
|
|
|
3178
3453
|
}
|
|
3179
3454
|
}
|
|
3180
3455
|
],
|
|
3181
|
-
"responses": {
|
|
3456
|
+
"responses": {
|
|
3457
|
+
"default": {
|
|
3458
|
+
"description": ""
|
|
3459
|
+
}
|
|
3460
|
+
},
|
|
3182
3461
|
"security": [
|
|
3183
3462
|
{
|
|
3184
3463
|
"bearerAuth": []
|
|
@@ -3527,7 +3806,11 @@
|
|
|
3527
3806
|
}
|
|
3528
3807
|
}
|
|
3529
3808
|
],
|
|
3530
|
-
"responses": {
|
|
3809
|
+
"responses": {
|
|
3810
|
+
"default": {
|
|
3811
|
+
"description": ""
|
|
3812
|
+
}
|
|
3813
|
+
},
|
|
3531
3814
|
"security": [
|
|
3532
3815
|
{
|
|
3533
3816
|
"bearerAuth": []
|
|
@@ -3606,7 +3889,11 @@
|
|
|
3606
3889
|
}
|
|
3607
3890
|
}
|
|
3608
3891
|
],
|
|
3609
|
-
"responses": {
|
|
3892
|
+
"responses": {
|
|
3893
|
+
"default": {
|
|
3894
|
+
"description": ""
|
|
3895
|
+
}
|
|
3896
|
+
},
|
|
3610
3897
|
"security": [
|
|
3611
3898
|
{
|
|
3612
3899
|
"bearerAuth": []
|
|
@@ -3765,7 +4052,7 @@
|
|
|
3765
4052
|
"schema": {
|
|
3766
4053
|
"type": "object",
|
|
3767
4054
|
"properties": {
|
|
3768
|
-
"
|
|
4055
|
+
"msgId": {
|
|
3769
4056
|
"type": "string"
|
|
3770
4057
|
},
|
|
3771
4058
|
"reaction": {
|
|
@@ -3776,7 +4063,7 @@
|
|
|
3776
4063
|
"examples": {
|
|
3777
4064
|
"Default": {
|
|
3778
4065
|
"value": {
|
|
3779
|
-
"
|
|
4066
|
+
"msgId": "<messageId>",
|
|
3780
4067
|
"reaction": "😜"
|
|
3781
4068
|
}
|
|
3782
4069
|
}
|
|
@@ -4126,7 +4413,11 @@
|
|
|
4126
4413
|
}
|
|
4127
4414
|
}
|
|
4128
4415
|
],
|
|
4129
|
-
"responses": {
|
|
4416
|
+
"responses": {
|
|
4417
|
+
"default": {
|
|
4418
|
+
"description": ""
|
|
4419
|
+
}
|
|
4420
|
+
},
|
|
4130
4421
|
"security": [
|
|
4131
4422
|
{
|
|
4132
4423
|
"bearerAuth": []
|
|
@@ -5990,8 +6281,12 @@
|
|
|
5990
6281
|
"type": "string"
|
|
5991
6282
|
}
|
|
5992
6283
|
}
|
|
5993
|
-
],
|
|
5994
|
-
"responses": {
|
|
6284
|
+
],
|
|
6285
|
+
"responses": {
|
|
6286
|
+
"default": {
|
|
6287
|
+
"description": ""
|
|
6288
|
+
}
|
|
6289
|
+
}
|
|
5995
6290
|
}
|
|
5996
6291
|
},
|
|
5997
6292
|
"/api/{session}/contact/{phone}": {
|
|
@@ -6095,6 +6390,13 @@
|
|
|
6095
6390
|
"type": "string",
|
|
6096
6391
|
"example": "5521999999999"
|
|
6097
6392
|
}
|
|
6393
|
+
},
|
|
6394
|
+
{
|
|
6395
|
+
"name": "isGroup",
|
|
6396
|
+
"in": "query",
|
|
6397
|
+
"schema": {
|
|
6398
|
+
"type": "string"
|
|
6399
|
+
}
|
|
6098
6400
|
}
|
|
6099
6401
|
],
|
|
6100
6402
|
"responses": {
|
|
@@ -6549,6 +6851,7 @@
|
|
|
6549
6851
|
"post": {
|
|
6550
6852
|
"tags": ["Profile"],
|
|
6551
6853
|
"description": "Edit your bussiness profile",
|
|
6854
|
+
"operationId": "editBusinessProfile",
|
|
6552
6855
|
"parameters": [
|
|
6553
6856
|
{
|
|
6554
6857
|
"name": "session",
|
|
@@ -6671,9 +6974,21 @@
|
|
|
6671
6974
|
"type": "string",
|
|
6672
6975
|
"example": "NERDWHATS_AMERICA"
|
|
6673
6976
|
}
|
|
6977
|
+
},
|
|
6978
|
+
{
|
|
6979
|
+
"name": "phone",
|
|
6980
|
+
"in": "query",
|
|
6981
|
+
"schema": {
|
|
6982
|
+
"type": "string",
|
|
6983
|
+
"example": "5521999999999@c.us"
|
|
6984
|
+
}
|
|
6674
6985
|
}
|
|
6675
6986
|
],
|
|
6676
|
-
"responses": {
|
|
6987
|
+
"responses": {
|
|
6988
|
+
"default": {
|
|
6989
|
+
"description": ""
|
|
6990
|
+
}
|
|
6991
|
+
},
|
|
6677
6992
|
"security": [
|
|
6678
6993
|
{
|
|
6679
6994
|
"bearerAuth": []
|
|
@@ -6681,7 +6996,7 @@
|
|
|
6681
6996
|
]
|
|
6682
6997
|
}
|
|
6683
6998
|
},
|
|
6684
|
-
"/api/{session}/get-order-by-messageId": {
|
|
6999
|
+
"/api/{session}/get-order-by-messageId/{messageId}": {
|
|
6685
7000
|
"get": {
|
|
6686
7001
|
"tags": ["Catalog & Bussiness"],
|
|
6687
7002
|
"description": "",
|
|
@@ -6694,37 +7009,27 @@
|
|
|
6694
7009
|
"type": "string",
|
|
6695
7010
|
"example": "NERDWHATS_AMERICA"
|
|
6696
7011
|
}
|
|
7012
|
+
},
|
|
7013
|
+
{
|
|
7014
|
+
"name": "messageId",
|
|
7015
|
+
"in": "path",
|
|
7016
|
+
"required": true,
|
|
7017
|
+
"schema": {
|
|
7018
|
+
"type": "string",
|
|
7019
|
+
"example": "true_5521999999999@c.us_3EB0E69ACC5B396B21F2FE"
|
|
7020
|
+
}
|
|
6697
7021
|
}
|
|
6698
7022
|
],
|
|
6699
|
-
"responses": {
|
|
7023
|
+
"responses": {
|
|
7024
|
+
"default": {
|
|
7025
|
+
"description": ""
|
|
7026
|
+
}
|
|
7027
|
+
},
|
|
6700
7028
|
"security": [
|
|
6701
7029
|
{
|
|
6702
7030
|
"bearerAuth": []
|
|
6703
7031
|
}
|
|
6704
|
-
]
|
|
6705
|
-
"requestBody": {
|
|
6706
|
-
"required": true,
|
|
6707
|
-
"content": {
|
|
6708
|
-
"application/json": {
|
|
6709
|
-
"schema": {
|
|
6710
|
-
"type": "object",
|
|
6711
|
-
"properties": {
|
|
6712
|
-
"messageId": {
|
|
6713
|
-
"type": "string"
|
|
6714
|
-
}
|
|
6715
|
-
},
|
|
6716
|
-
"required": ["messageId"]
|
|
6717
|
-
},
|
|
6718
|
-
"examples": {
|
|
6719
|
-
"Default": {
|
|
6720
|
-
"value": {
|
|
6721
|
-
"messageId": "<message_id>"
|
|
6722
|
-
}
|
|
6723
|
-
}
|
|
6724
|
-
}
|
|
6725
|
-
}
|
|
6726
|
-
}
|
|
6727
|
-
}
|
|
7032
|
+
]
|
|
6728
7033
|
}
|
|
6729
7034
|
},
|
|
6730
7035
|
"/api/{secretkey}/backup-sessions": {
|
|
@@ -7268,6 +7573,229 @@
|
|
|
7268
7573
|
]
|
|
7269
7574
|
}
|
|
7270
7575
|
},
|
|
7576
|
+
"/api/{session}/newsletter": {
|
|
7577
|
+
"post": {
|
|
7578
|
+
"tags": [],
|
|
7579
|
+
"description": "",
|
|
7580
|
+
"operationId": "createNewsletter",
|
|
7581
|
+
"parameters": [
|
|
7582
|
+
{
|
|
7583
|
+
"name": "session",
|
|
7584
|
+
"in": "path",
|
|
7585
|
+
"required": true,
|
|
7586
|
+
"schema": {
|
|
7587
|
+
"type": "string",
|
|
7588
|
+
"example": "NERDWHATS_AMERICA"
|
|
7589
|
+
}
|
|
7590
|
+
},
|
|
7591
|
+
{
|
|
7592
|
+
"name": "id",
|
|
7593
|
+
"schema": {
|
|
7594
|
+
"type": "string",
|
|
7595
|
+
"example": "<newsletter_id>"
|
|
7596
|
+
},
|
|
7597
|
+
"in": "query"
|
|
7598
|
+
}
|
|
7599
|
+
],
|
|
7600
|
+
"responses": {
|
|
7601
|
+
"201": {
|
|
7602
|
+
"description": "Created"
|
|
7603
|
+
}
|
|
7604
|
+
},
|
|
7605
|
+
"security": [
|
|
7606
|
+
{
|
|
7607
|
+
"bearerAuth": []
|
|
7608
|
+
}
|
|
7609
|
+
],
|
|
7610
|
+
"requestBody": {
|
|
7611
|
+
"required": true,
|
|
7612
|
+
"content": {
|
|
7613
|
+
"application/json": {
|
|
7614
|
+
"schema": {
|
|
7615
|
+
"type": "object",
|
|
7616
|
+
"properties": {
|
|
7617
|
+
"name": {
|
|
7618
|
+
"type": "string"
|
|
7619
|
+
},
|
|
7620
|
+
"description": {
|
|
7621
|
+
"type": "string"
|
|
7622
|
+
},
|
|
7623
|
+
"picture": {
|
|
7624
|
+
"type": "string"
|
|
7625
|
+
}
|
|
7626
|
+
}
|
|
7627
|
+
},
|
|
7628
|
+
"examples": {
|
|
7629
|
+
"Edit newsletter/channel": {
|
|
7630
|
+
"value": {
|
|
7631
|
+
"name": "New name of channel",
|
|
7632
|
+
"description": "New description of channel",
|
|
7633
|
+
"picture": "<new_base64_image> or send null"
|
|
7634
|
+
}
|
|
7635
|
+
},
|
|
7636
|
+
"Create newsletter/channel": {
|
|
7637
|
+
"value": {
|
|
7638
|
+
"name": "Name for your channel",
|
|
7639
|
+
"options": {
|
|
7640
|
+
"description": "Description of channel",
|
|
7641
|
+
"picture": "<base64_image>"
|
|
7642
|
+
}
|
|
7643
|
+
}
|
|
7644
|
+
}
|
|
7645
|
+
}
|
|
7646
|
+
}
|
|
7647
|
+
}
|
|
7648
|
+
}
|
|
7649
|
+
}
|
|
7650
|
+
},
|
|
7651
|
+
"/api/{session}/newsletter/{id}": {
|
|
7652
|
+
"put": {
|
|
7653
|
+
"tags": [],
|
|
7654
|
+
"description": "",
|
|
7655
|
+
"operationId": "editNewsletter",
|
|
7656
|
+
"parameters": [
|
|
7657
|
+
{
|
|
7658
|
+
"name": "session",
|
|
7659
|
+
"in": "path",
|
|
7660
|
+
"required": true,
|
|
7661
|
+
"schema": {
|
|
7662
|
+
"type": "string",
|
|
7663
|
+
"example": "NERDWHATS_AMERICA"
|
|
7664
|
+
}
|
|
7665
|
+
},
|
|
7666
|
+
{
|
|
7667
|
+
"name": "id",
|
|
7668
|
+
"in": "path",
|
|
7669
|
+
"required": true,
|
|
7670
|
+
"schema": {
|
|
7671
|
+
"type": "string",
|
|
7672
|
+
"example": "NEWSLETTER ID"
|
|
7673
|
+
}
|
|
7674
|
+
}
|
|
7675
|
+
],
|
|
7676
|
+
"responses": {
|
|
7677
|
+
"201": {
|
|
7678
|
+
"description": "Created"
|
|
7679
|
+
}
|
|
7680
|
+
},
|
|
7681
|
+
"security": [
|
|
7682
|
+
{
|
|
7683
|
+
"bearerAuth": []
|
|
7684
|
+
}
|
|
7685
|
+
],
|
|
7686
|
+
"requestBody": {
|
|
7687
|
+
"required": true,
|
|
7688
|
+
"content": {
|
|
7689
|
+
"application/json": {
|
|
7690
|
+
"schema": {
|
|
7691
|
+
"type": "object",
|
|
7692
|
+
"properties": {
|
|
7693
|
+
"name": {
|
|
7694
|
+
"type": "string"
|
|
7695
|
+
},
|
|
7696
|
+
"description": {
|
|
7697
|
+
"type": "string"
|
|
7698
|
+
},
|
|
7699
|
+
"picture": {
|
|
7700
|
+
"type": "string"
|
|
7701
|
+
}
|
|
7702
|
+
}
|
|
7703
|
+
},
|
|
7704
|
+
"examples": {
|
|
7705
|
+
"Edit newsletter/channel": {
|
|
7706
|
+
"value": {
|
|
7707
|
+
"name": "New name of channel",
|
|
7708
|
+
"description": "New description of channel",
|
|
7709
|
+
"picture": "<new_base64_image> or send null"
|
|
7710
|
+
}
|
|
7711
|
+
},
|
|
7712
|
+
"Create newsletter/channel": {
|
|
7713
|
+
"value": {
|
|
7714
|
+
"name": "Name for your channel",
|
|
7715
|
+
"options": {
|
|
7716
|
+
"description": "Description of channel",
|
|
7717
|
+
"picture": "<base64_image>"
|
|
7718
|
+
}
|
|
7719
|
+
}
|
|
7720
|
+
}
|
|
7721
|
+
}
|
|
7722
|
+
}
|
|
7723
|
+
}
|
|
7724
|
+
}
|
|
7725
|
+
},
|
|
7726
|
+
"delete": {
|
|
7727
|
+
"tags": [],
|
|
7728
|
+
"description": "",
|
|
7729
|
+
"operationId": "destroyNewsletter",
|
|
7730
|
+
"parameters": [
|
|
7731
|
+
{
|
|
7732
|
+
"name": "session",
|
|
7733
|
+
"in": "path",
|
|
7734
|
+
"required": true,
|
|
7735
|
+
"schema": {
|
|
7736
|
+
"type": "string",
|
|
7737
|
+
"example": "NERDWHATS_AMERICA"
|
|
7738
|
+
}
|
|
7739
|
+
},
|
|
7740
|
+
{
|
|
7741
|
+
"name": "id",
|
|
7742
|
+
"in": "path",
|
|
7743
|
+
"required": true,
|
|
7744
|
+
"schema": {
|
|
7745
|
+
"type": "string",
|
|
7746
|
+
"example": "NEWSLETTER ID"
|
|
7747
|
+
}
|
|
7748
|
+
}
|
|
7749
|
+
],
|
|
7750
|
+
"responses": {
|
|
7751
|
+
"201": {
|
|
7752
|
+
"description": "Created"
|
|
7753
|
+
}
|
|
7754
|
+
},
|
|
7755
|
+
"security": [
|
|
7756
|
+
{
|
|
7757
|
+
"bearerAuth": []
|
|
7758
|
+
}
|
|
7759
|
+
]
|
|
7760
|
+
}
|
|
7761
|
+
},
|
|
7762
|
+
"/api/{session}/mute-newsletter/{id}": {
|
|
7763
|
+
"post": {
|
|
7764
|
+
"tags": [],
|
|
7765
|
+
"description": "",
|
|
7766
|
+
"operationId": "muteNewsletter",
|
|
7767
|
+
"parameters": [
|
|
7768
|
+
{
|
|
7769
|
+
"name": "session",
|
|
7770
|
+
"in": "path",
|
|
7771
|
+
"required": true,
|
|
7772
|
+
"schema": {
|
|
7773
|
+
"type": "string",
|
|
7774
|
+
"example": "NERDWHATS_AMERICA"
|
|
7775
|
+
}
|
|
7776
|
+
},
|
|
7777
|
+
{
|
|
7778
|
+
"name": "id",
|
|
7779
|
+
"in": "path",
|
|
7780
|
+
"required": true,
|
|
7781
|
+
"schema": {
|
|
7782
|
+
"type": "string",
|
|
7783
|
+
"example": "NEWSLETTER ID"
|
|
7784
|
+
}
|
|
7785
|
+
}
|
|
7786
|
+
],
|
|
7787
|
+
"responses": {
|
|
7788
|
+
"default": {
|
|
7789
|
+
"description": ""
|
|
7790
|
+
}
|
|
7791
|
+
},
|
|
7792
|
+
"security": [
|
|
7793
|
+
{
|
|
7794
|
+
"bearerAuth": []
|
|
7795
|
+
}
|
|
7796
|
+
]
|
|
7797
|
+
}
|
|
7798
|
+
},
|
|
7271
7799
|
"/api/{session}/chatwoot": {
|
|
7272
7800
|
"post": {
|
|
7273
7801
|
"tags": ["Misc"],
|
|
@@ -7327,24 +7855,44 @@
|
|
|
7327
7855
|
"/api-docs": {
|
|
7328
7856
|
"get": {
|
|
7329
7857
|
"description": "",
|
|
7330
|
-
"
|
|
7331
|
-
|
|
7858
|
+
"responses": {
|
|
7859
|
+
"default": {
|
|
7860
|
+
"description": ""
|
|
7861
|
+
}
|
|
7862
|
+
}
|
|
7332
7863
|
}
|
|
7333
7864
|
},
|
|
7334
7865
|
"/healthz": {
|
|
7335
7866
|
"get": {
|
|
7336
7867
|
"tags": ["Misc"],
|
|
7337
7868
|
"description": "This endpoint can be used to check the health status of the API. It returns a response with a status code indicating the API",
|
|
7338
|
-
"
|
|
7339
|
-
|
|
7869
|
+
"responses": {
|
|
7870
|
+
"default": {
|
|
7871
|
+
"description": ""
|
|
7872
|
+
}
|
|
7873
|
+
}
|
|
7340
7874
|
}
|
|
7341
7875
|
},
|
|
7342
7876
|
"/unhealthy": {
|
|
7343
7877
|
"get": {
|
|
7344
7878
|
"tags": ["Misc"],
|
|
7345
7879
|
"description": "This endpoint is used to force the API into an unhealthy state. It can be useful for testing error handling or simulating service disruptions.",
|
|
7346
|
-
"
|
|
7347
|
-
|
|
7880
|
+
"responses": {
|
|
7881
|
+
"default": {
|
|
7882
|
+
"description": ""
|
|
7883
|
+
}
|
|
7884
|
+
}
|
|
7885
|
+
}
|
|
7886
|
+
},
|
|
7887
|
+
"/metrics": {
|
|
7888
|
+
"get": {
|
|
7889
|
+
"tags": ["Misc"],
|
|
7890
|
+
"description": "This endpoint can be used to check the status of API metrics. It returns a response with the collected metrics.",
|
|
7891
|
+
"responses": {
|
|
7892
|
+
"default": {
|
|
7893
|
+
"description": ""
|
|
7894
|
+
}
|
|
7895
|
+
}
|
|
7348
7896
|
}
|
|
7349
7897
|
}
|
|
7350
7898
|
},
|