feat: add notification badge counts
هذا الالتزام موجود في:
@@ -4712,6 +4712,235 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get Unread Notifications Count By Category",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category={{notificationCategory}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get Grouped Unread Notification Counts",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-counts"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('total');",
|
||||
"pm.expect(json).to.have.property('interactions');",
|
||||
"pm.expect(json).to.have.property('messages');",
|
||||
"pm.expect(json).to.have.property('follows');",
|
||||
"pm.expect(json).to.have.property('followRequests');",
|
||||
"pm.expect(json).to.have.property('collaboration');",
|
||||
"pm.expect(json).to.have.property('system');",
|
||||
"pm.environment.set('notificationUnreadCount', json.total);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Interactions",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=interactions"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'interactions');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Messages",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=messages"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'messages');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Follows",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=follows"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'follows');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Follow Requests",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=follow_requests"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'follow_requests');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Collaboration",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=collaboration"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'collaboration');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - System",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=system"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'system');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get Target User Unread Notifications Count",
|
||||
"request": {
|
||||
@@ -7812,6 +8041,493 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Support",
|
||||
"item": [
|
||||
{
|
||||
"name": "Create Support Ticket",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "subject",
|
||||
"value": "{{supportSubject}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportMessage}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "category",
|
||||
"value": "{{supportCategory}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "priority",
|
||||
"value": "{{supportPriority}}",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || json.ticket || (json.items && json.items[0]);",
|
||||
"if (item) pm.environment.set('supportTicketId', item._id || item.id);",
|
||||
"pm.test('Ticket created', function () { const json = pm.response.json(); pm.expect(json.item).to.have.property('status', 'open'); });"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Create Support Ticket With Image",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "subject",
|
||||
"value": "{{supportSubject}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportMessage}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "category",
|
||||
"value": "{{supportCategory}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "priority",
|
||||
"value": "{{supportPriority}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"type": "file",
|
||||
"src": "{{supportImagePath}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || json.ticket || (json.items && json.items[0]);",
|
||||
"if (item) pm.environment.set('supportTicketId', item._id || item.id);",
|
||||
"pm.test('Ticket created', function () { const json = pm.response.json(); pm.expect(json.item).to.have.property('status', 'open'); });"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "List My Support Tickets",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets?page=1&limit=20&sortOrder={{listSortOrder}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"if (json.items && json.items[0]) pm.environment.set('supportTicketId', json.items[0]._id || json.items[0].id);",
|
||||
"pm.expect(json.items).to.be.an('array');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get My Support Ticket",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets/{{supportTicketId}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.ticket).to.exist;",
|
||||
"pm.expect(json.messages).to.be.an('array');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Add Support Message",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets/{{supportTicketId}}/messages",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportMessage}}",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || (json.messages && json.messages[0]);",
|
||||
"if (item) pm.environment.set('supportMessageId', item._id || item.id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Add Support Message With Image",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets/{{supportTicketId}}/messages",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportMessage}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"type": "file",
|
||||
"src": "{{supportImagePath}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || (json.messages && json.messages[0]);",
|
||||
"if (item) pm.environment.set('supportMessageId', item._id || item.id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Close My Support Ticket",
|
||||
"request": {
|
||||
"method": "PATCH",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets/{{supportTicketId}}/close"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.item).to.have.property('status', 'closed');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin List Support Tickets",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets?page=1&limit=20&status={{supportStatus}}&category={{supportCategory}}&priority={{supportPriority}}&sortOrder={{listSortOrder}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"if (json.items && json.items[0]) pm.environment.set('supportTicketId', json.items[0]._id || json.items[0].id);",
|
||||
"pm.expect(json.items).to.be.an('array');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Get Support Ticket",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.ticket).to.exist;",
|
||||
"pm.expect(json.ticket.user).to.exist;",
|
||||
"pm.expect(json.messages).to.be.an('array');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Reply To Ticket",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/messages",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportReplyMessage}}",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || (json.messages && json.messages[0]);",
|
||||
"if (item) pm.environment.set('supportMessageId', item._id || item.id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Reply With Image",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/messages",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportReplyMessage}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"type": "file",
|
||||
"src": "{{supportImagePath}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || (json.messages && json.messages[0]);",
|
||||
"if (item) pm.environment.set('supportMessageId', item._id || item.id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Update Support Ticket Status",
|
||||
"request": {
|
||||
"method": "PATCH",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/status",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"status\": \"{{supportStatus}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.item).to.have.property('status');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Assign Support Ticket",
|
||||
"request": {
|
||||
"method": "PATCH",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/assign",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"adminId\": \"{{supportAdminId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.item).to.exist;"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Health",
|
||||
"item": [
|
||||
@@ -9022,6 +9738,50 @@
|
||||
{
|
||||
"key": "collaborationAttachmentType",
|
||||
"value": "audio"
|
||||
},
|
||||
{
|
||||
"key": "supportTicketId",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "supportMessageId",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "supportSubject",
|
||||
"value": "????? ?? ????? ??? ??? MP3"
|
||||
},
|
||||
{
|
||||
"key": "supportMessage",
|
||||
"value": "????? ??? ????? ???? ?? ??? ??? ????"
|
||||
},
|
||||
{
|
||||
"key": "supportReplyMessage",
|
||||
"value": "?? ?????? ??????? ????? ??? ???????."
|
||||
},
|
||||
{
|
||||
"key": "supportCategory",
|
||||
"value": "technical"
|
||||
},
|
||||
{
|
||||
"key": "supportPriority",
|
||||
"value": "normal"
|
||||
},
|
||||
{
|
||||
"key": "supportStatus",
|
||||
"value": "in_progress"
|
||||
},
|
||||
{
|
||||
"key": "supportImagePath",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "supportAdminId",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "notificationCategory",
|
||||
"value": "interactions"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1258,6 +1258,235 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Get Unread Notifications Count By Category",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category={{notificationCategory}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get Grouped Unread Notification Counts",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-counts"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('total');",
|
||||
"pm.expect(json).to.have.property('interactions');",
|
||||
"pm.expect(json).to.have.property('messages');",
|
||||
"pm.expect(json).to.have.property('follows');",
|
||||
"pm.expect(json).to.have.property('followRequests');",
|
||||
"pm.expect(json).to.have.property('collaboration');",
|
||||
"pm.expect(json).to.have.property('system');",
|
||||
"pm.environment.set('notificationUnreadCount', json.total);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Interactions",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=interactions"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'interactions');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Messages",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=messages"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'messages');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Follows",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=follows"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'follows');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Follow Requests",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=follow_requests"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'follow_requests');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Collaboration",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=collaboration"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'collaboration');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - System",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=system"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'system');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2766,6 +2995,223 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Support Admin",
|
||||
"item": [
|
||||
{
|
||||
"name": "Admin List Support Tickets",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets?page=1&limit=20&status={{supportStatus}}&category={{supportCategory}}&priority={{supportPriority}}&sortOrder={{listSortOrder}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"if (json.items && json.items[0]) pm.environment.set('supportTicketId', json.items[0]._id || json.items[0].id);",
|
||||
"pm.expect(json.items).to.be.an('array');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Get Support Ticket",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.ticket).to.exist;",
|
||||
"pm.expect(json.ticket.user).to.exist;",
|
||||
"pm.expect(json.messages).to.be.an('array');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Reply To Ticket",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/messages",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportReplyMessage}}",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || (json.messages && json.messages[0]);",
|
||||
"if (item) pm.environment.set('supportMessageId', item._id || item.id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Reply With Image",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/messages",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportReplyMessage}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"type": "file",
|
||||
"src": "{{supportImagePath}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || (json.messages && json.messages[0]);",
|
||||
"if (item) pm.environment.set('supportMessageId', item._id || item.id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Update Support Ticket Status",
|
||||
"request": {
|
||||
"method": "PATCH",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/status",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"status\": \"{{supportStatus}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.item).to.have.property('status');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Assign Support Ticket",
|
||||
"request": {
|
||||
"method": "PATCH",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/assign",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"adminId\": \"{{supportAdminId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.item).to.exist;"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Audit",
|
||||
"item": [
|
||||
@@ -3935,6 +4381,235 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Get Unread Notifications Count By Category",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category={{notificationCategory}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get Grouped Unread Notification Counts",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-counts"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('total');",
|
||||
"pm.expect(json).to.have.property('interactions');",
|
||||
"pm.expect(json).to.have.property('messages');",
|
||||
"pm.expect(json).to.have.property('follows');",
|
||||
"pm.expect(json).to.have.property('followRequests');",
|
||||
"pm.expect(json).to.have.property('collaboration');",
|
||||
"pm.expect(json).to.have.property('system');",
|
||||
"pm.environment.set('notificationUnreadCount', json.total);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Interactions",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=interactions"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'interactions');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Messages",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=messages"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'messages');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Follows",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=follows"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'follows');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Follow Requests",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=follow_requests"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'follow_requests');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Collaboration",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=collaboration"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'collaboration');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - System",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=system"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'system');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mark Notification Read",
|
||||
"request": {
|
||||
@@ -4009,6 +4684,223 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Support Tickets",
|
||||
"item": [
|
||||
{
|
||||
"name": "Admin List Support Tickets",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets?page=1&limit=20&status={{supportStatus}}&category={{supportCategory}}&priority={{supportPriority}}&sortOrder={{listSortOrder}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"if (json.items && json.items[0]) pm.environment.set('supportTicketId', json.items[0]._id || json.items[0].id);",
|
||||
"pm.expect(json.items).to.be.an('array');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Get Support Ticket",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.ticket).to.exist;",
|
||||
"pm.expect(json.ticket.user).to.exist;",
|
||||
"pm.expect(json.messages).to.be.an('array');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Reply To Ticket",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/messages",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportReplyMessage}}",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || (json.messages && json.messages[0]);",
|
||||
"if (item) pm.environment.set('supportMessageId', item._id || item.id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Reply With Image",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/messages",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportReplyMessage}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"type": "file",
|
||||
"src": "{{supportImagePath}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || (json.messages && json.messages[0]);",
|
||||
"if (item) pm.environment.set('supportMessageId', item._id || item.id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Update Support Ticket Status",
|
||||
"request": {
|
||||
"method": "PATCH",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/status",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"status\": \"{{supportStatus}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.item).to.have.property('status');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Admin Assign Support Ticket",
|
||||
"request": {
|
||||
"method": "PATCH",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{superAdminAccessToken}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/admin/tickets/{{supportTicketId}}/assign",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"adminId\": \"{{supportAdminId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.item).to.exist;"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Collaboration Requests",
|
||||
"item": [
|
||||
@@ -4640,6 +5532,50 @@
|
||||
{
|
||||
"key": "collaborationAttachmentType",
|
||||
"value": "audio"
|
||||
},
|
||||
{
|
||||
"key": "supportTicketId",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "supportMessageId",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "supportSubject",
|
||||
"value": "????? ?? ????? ??? ??? MP3"
|
||||
},
|
||||
{
|
||||
"key": "supportMessage",
|
||||
"value": "????? ??? ????? ???? ?? ??? ??? ????"
|
||||
},
|
||||
{
|
||||
"key": "supportReplyMessage",
|
||||
"value": "?? ?????? ??????? ????? ??? ???????."
|
||||
},
|
||||
{
|
||||
"key": "supportCategory",
|
||||
"value": "technical"
|
||||
},
|
||||
{
|
||||
"key": "supportPriority",
|
||||
"value": "normal"
|
||||
},
|
||||
{
|
||||
"key": "supportStatus",
|
||||
"value": "in_progress"
|
||||
},
|
||||
{
|
||||
"key": "supportImagePath",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "supportAdminId",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "notificationCategory",
|
||||
"value": "interactions"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4255,6 +4255,235 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get Unread Notifications Count By Category",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category={{notificationCategory}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get Grouped Unread Notification Counts",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-counts"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('total');",
|
||||
"pm.expect(json).to.have.property('interactions');",
|
||||
"pm.expect(json).to.have.property('messages');",
|
||||
"pm.expect(json).to.have.property('follows');",
|
||||
"pm.expect(json).to.have.property('followRequests');",
|
||||
"pm.expect(json).to.have.property('collaboration');",
|
||||
"pm.expect(json).to.have.property('system');",
|
||||
"pm.environment.set('notificationUnreadCount', json.total);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Interactions",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=interactions"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'interactions');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Messages",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=messages"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'messages');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Follows",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=follows"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'follows');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Follow Requests",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=follow_requests"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'follow_requests');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - Collaboration",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=collaboration"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'collaboration');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Badge Count - System",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/notifications/unread-count?category=system"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json).to.have.property('unreadCount');",
|
||||
"pm.expect(json).to.have.property('category', 'system');",
|
||||
"pm.environment.set('notificationUnreadCount', json.unreadCount);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mark Notification Read",
|
||||
"request": {
|
||||
@@ -5823,6 +6052,281 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Support",
|
||||
"item": [
|
||||
{
|
||||
"name": "Create Support Ticket",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "subject",
|
||||
"value": "{{supportSubject}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportMessage}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "category",
|
||||
"value": "{{supportCategory}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "priority",
|
||||
"value": "{{supportPriority}}",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || json.ticket || (json.items && json.items[0]);",
|
||||
"if (item) pm.environment.set('supportTicketId', item._id || item.id);",
|
||||
"pm.test('Ticket created', function () { const json = pm.response.json(); pm.expect(json.item).to.have.property('status', 'open'); });"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Create Support Ticket With Image",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "subject",
|
||||
"value": "{{supportSubject}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportMessage}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "category",
|
||||
"value": "{{supportCategory}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "priority",
|
||||
"value": "{{supportPriority}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"type": "file",
|
||||
"src": "{{supportImagePath}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || json.ticket || (json.items && json.items[0]);",
|
||||
"if (item) pm.environment.set('supportTicketId', item._id || item.id);",
|
||||
"pm.test('Ticket created', function () { const json = pm.response.json(); pm.expect(json.item).to.have.property('status', 'open'); });"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "List My Support Tickets",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets?page=1&limit=20&sortOrder={{listSortOrder}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"if (json.items && json.items[0]) pm.environment.set('supportTicketId', json.items[0]._id || json.items[0].id);",
|
||||
"pm.expect(json.items).to.be.an('array');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get My Support Ticket",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets/{{supportTicketId}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.ticket).to.exist;",
|
||||
"pm.expect(json.messages).to.be.an('array');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Add Support Message",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets/{{supportTicketId}}/messages",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportMessage}}",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || (json.messages && json.messages[0]);",
|
||||
"if (item) pm.environment.set('supportMessageId', item._id || item.id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Add Support Message With Image",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets/{{supportTicketId}}/messages",
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "message",
|
||||
"value": "{{supportMessage}}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "image",
|
||||
"type": "file",
|
||||
"src": "{{supportImagePath}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"const item = json.item || (json.messages && json.messages[0]);",
|
||||
"if (item) pm.environment.set('supportMessageId', item._id || item.id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Close My Support Ticket",
|
||||
"request": {
|
||||
"method": "PATCH",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/support/tickets/{{supportTicketId}}/close"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Request succeeded', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.item).to.have.property('status', 'closed');"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Health",
|
||||
"item": [
|
||||
@@ -6450,6 +6954,50 @@
|
||||
"key": "deviceId",
|
||||
"value": "postman-device-android",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "supportTicketId",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "supportMessageId",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "supportSubject",
|
||||
"value": "????? ?? ????? ??? ??? MP3"
|
||||
},
|
||||
{
|
||||
"key": "supportMessage",
|
||||
"value": "????? ??? ????? ???? ?? ??? ??? ????"
|
||||
},
|
||||
{
|
||||
"key": "supportReplyMessage",
|
||||
"value": "?? ?????? ??????? ????? ??? ???????."
|
||||
},
|
||||
{
|
||||
"key": "supportCategory",
|
||||
"value": "technical"
|
||||
},
|
||||
{
|
||||
"key": "supportPriority",
|
||||
"value": "normal"
|
||||
},
|
||||
{
|
||||
"key": "supportStatus",
|
||||
"value": "in_progress"
|
||||
},
|
||||
{
|
||||
"key": "supportImagePath",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "supportAdminId",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "notificationCategory",
|
||||
"value": "interactions"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم