Add chat hiding mentions follow counts waveform and post fixes

هذا الالتزام موجود في:
boutmoun123
2026-06-15 15:05:30 +03:00
الأصل 20fe06b5ed
التزام 3d2a41b22a
28 ملفات معدلة مع 1352 إضافات و75 حذوفات

عرض الملف

@@ -794,6 +794,41 @@
}
}
]
},
{
"name": "Search Users For Mention",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"url": "{{baseUrl}}/search/users?q={{mentionQuery}}&page=1&limit=10"
},
"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.items || []).to.be.an('array');",
"if ((json.items || []).length) {",
" const user = json.items[0];",
" pm.expect(user).to.have.property('_id');",
" pm.expect(user).to.have.property('username');",
" pm.expect(user).to.have.property('name');",
" pm.expect(user).to.have.property('stageName');",
" pm.expect(user).to.have.property('avatar');",
" pm.expect(user).to.have.property('isVerified');",
"}"
]
}
}
]
}
]
},
@@ -1239,6 +1274,41 @@
]
}
}
},
{
"name": "Get User Follow Counts",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"url": "{{baseUrl}}/users/{{targetUserId}}/follow-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.userId).to.be.a('string');",
"pm.expect(json.followersCount).to.be.a('number');",
"pm.expect(json.followingCount).to.be.a('number');",
"pm.expect(json.followRequestsCount).to.be.a('number');",
"pm.expect(json.viewerState).to.be.an('object');",
"pm.expect(json.viewerState).to.have.property('isOwnProfile');",
"pm.expect(json.viewerState).to.have.property('isFollowing');",
"pm.expect(json.viewerState).to.have.property('hasPendingFollowRequest');",
"pm.expect(json.viewerState).to.have.property('isBlocked');",
"pm.expect(json.viewerState).to.have.property('isBlockedByUser');"
]
}
}
]
}
]
},
@@ -1562,7 +1632,8 @@
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
"const json = pm.response.json();",
"pm.expect(json._id || json.id).to.exist;",
"pm.expect(json).to.have.property('content');"
"pm.expect(json).to.have.property('content');",
"pm.expect(pm.response.json()).to.have.property('isPinned');"
]
}
}
@@ -2022,6 +2093,11 @@
"pm.expect(json.postType).to.eql('audio');",
"pm.expect(json.media.audioUrl).to.be.a('string');",
"pm.expect(json.media.waveformPeaks).to.be.an('array');",
"pm.expect(json.media.waveformPeaksPreview).to.be.an('array');",
"pm.expect(json.media.waveformPeaksDetailed).to.be.an('array');",
"pm.expect(json.media.waveformPeaks.length).to.be.within(80, 120);",
"pm.expect(json.media.waveformPeaksPreview.length).to.be.within(80, 120);",
"pm.expect(json.media.waveformPeaksDetailed.length).to.be.within(100, 1200);",
"pm.expect(json.media.durationSeconds).to.exist;",
"pm.expect(json.processingStatus).to.eql('ready');",
"pm.expect(json.media).to.be.an('object');",
@@ -2120,12 +2196,17 @@
"pm.expect(json.postType).to.eql('audio');",
"pm.expect(json.media.audioUrl).to.be.a('string');",
"pm.expect(json.media.waveformPeaks).to.be.an('array');",
"pm.expect(json.media.waveformPeaksPreview).to.be.an('array');",
"pm.expect(json.media.waveformPeaksDetailed).to.be.an('array');",
"pm.expect(json.media.waveformPeaks.length).to.be.within(80, 120);",
"pm.expect(json.media.waveformPeaksPreview.length).to.be.within(80, 120);",
"pm.expect(json.media.waveformPeaksDetailed.length).to.be.within(100, 1200);",
"pm.expect(json.media.durationSeconds).to.exist;",
"pm.expect(json.processingStatus).to.eql('ready');",
"pm.expect(json.media).to.be.an('object');",
"pm.expect(json.media.mediaType).to.eql(json.postType);",
"pm.expect(json.waveformPeaks).to.be.an('array');",
"pm.expect(json.waveformPeaks.length).to.eql(6);",
"pm.expect(json.waveformPeaks.length).to.be.within(80, 120);",
"pm.expect(json.maqam).to.eql('Hijaz');",
"pm.environment.set('postId', json._id || json.id);",
"pm.environment.set('ownPostId', json._id || json.id);"
@@ -2629,6 +2710,35 @@
}
}
},
{
"name": "Get User Archived Posts",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"url": "{{baseUrl}}/posts/user/{{userId}}?visibility=archived&sortBy=createdAt&sortOrder=desc&page=1&limit=20"
},
"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.items || []).to.be.an('array');",
"for (const post of (json.items || [])) {",
" pm.expect(post.isArchived).to.eql(true);",
"}"
]
}
}
]
},
{
"name": "Create Carousel Post With Metadata",
"request": {
@@ -2821,6 +2931,69 @@
}
}
}
},
{
"name": "Create Post With Mentions",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"url": "{{baseUrl}}/posts",
"body": {
"mode": "formdata",
"formdata": [
{
"key": "content",
"value": "تعاون جميل مع @{{mentionUsername}}",
"type": "text"
},
{
"key": "mentionUsernames",
"value": "[\"{{mentionUsername}}\"]",
"type": "text"
},
{
"key": "mentionedUserIds",
"value": "[\"{{targetUserId}}\"]",
"type": "text"
},
{
"key": "visibility",
"value": "public",
"type": "text"
}
]
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test(\"Status is 201 or 200\", function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
"const json = pm.response.json();",
"pm.expect(json.mentionUsernames || []).to.be.an('array');",
"pm.expect(json.mentionedUsers || []).to.be.an('array');",
"if ((json.mentionedUsers || []).length) {",
" const mentioned = json.mentionedUsers[0];",
" pm.expect(mentioned).to.have.property('_id');",
" pm.expect(mentioned).to.have.property('id');",
" pm.expect(mentioned).to.have.property('username');",
" pm.expect(mentioned).to.have.property('name');",
" pm.expect(mentioned).to.have.property('stageName');",
" pm.expect(mentioned).to.have.property('avatar');",
" pm.expect(mentioned).to.have.property('isVerified');",
"}",
"pm.environment.set(\"postId\", json._id || json.id);"
]
}
}
]
}
]
},
@@ -4892,6 +5065,35 @@
}
]
},
{
"name": "Hide Conversation For Me",
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"url": "{{baseUrl}}/chat/conversations/{{conversationId}}",
"description": "Hides the conversation from the current user only. Messages and the other participant conversation list are not deleted. A newer message makes it visible again."
},
"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.success).to.eql(true);",
"pm.expect(json.conversationId).to.eql(pm.environment.get(\"conversationId\"));",
"pm.expect(json.deletedForMe).to.eql(true);"
]
}
}
]
},
{
"name": "Send Message",
"request": {