Update media Postman collections and dashboard playback

هذا الالتزام موجود في:
boutmoun123
2026-05-26 17:27:17 +03:00
الأصل acd8d0d8cf
التزام 377bebfb88
5 ملفات معدلة مع 181 إضافات و5 حذوفات

عرض الملف

@@ -722,6 +722,40 @@
}
]
},
{
"name": "Media",
"item": [
{
"name": "Media Health",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"url": "{{baseUrl}}/media/health"
},
"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.storage).to.be.an('object');",
"pm.expect(json.storage.provider).to.be.oneOf(['local', 's3']);",
"pm.expect(json.serving.rangeRequests).to.eql(true);",
"pm.expect(json.processing).to.be.an('object');"
]
}
}
]
}
]
},
{
"name": "Users",
"item": [
@@ -1590,7 +1624,12 @@
"pm.test('Status is 201', function () { pm.response.to.have.status(201); });",
"const json = pm.response.json();",
"pm.expect(json.postType).to.eql('image');",
"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.imageUrls).to.be.an('array');",
"pm.expect(json.media.images).to.be.an('array').that.is.not.empty;",
"pm.expect(json.media.images[0].url).to.be.a('string');",
"pm.expect(json.imageUrls.length).to.be.greaterThan(0);",
"const pid = json._id || json.id;",
"pm.environment.set('postId', pid);",
@@ -1963,6 +2002,12 @@
"pm.test('Status is 201', function () { pm.response.to.have.status(201); });",
"const json = pm.response.json();",
"pm.expect(json.postType).to.eql('video');",
"pm.expect(json.media.thumbnailUrl).to.be.a('string');",
"pm.expect(json.media.preferredPlaybackUrl).to.be.a('string');",
"if (json.hlsUrl) { pm.expect(json.media.preferredPlaybackUrl).to.eql(json.hlsUrl); }",
"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.durationSeconds).to.eql(42);",
"if (json.thumbnailUrl) { pm.expect(json.thumbnailUrl).to.be.a('string'); }",
"pm.expect(json.style).to.eql('Sharqi');",
@@ -2050,6 +2095,12 @@
"pm.test('Status is 201', function () { pm.response.to.have.status(201); });",
"const json = pm.response.json();",
"pm.expect(json.postType).to.eql('video');",
"pm.expect(json.media.thumbnailUrl).to.be.a('string');",
"pm.expect(json.media.preferredPlaybackUrl).to.be.a('string');",
"if (json.hlsUrl) { pm.expect(json.media.preferredPlaybackUrl).to.eql(json.hlsUrl); }",
"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.durationSeconds).to.eql(30);",
"if (json.thumbnailUrl) { pm.expect(json.thumbnailUrl).to.be.a('string'); }",
"pm.expect(json.style).to.eql('Sharqi');",
@@ -2191,6 +2242,12 @@
"pm.test('Status is 201', function () { pm.response.to.have.status(201); });",
"const json = pm.response.json();",
"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.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.durationSeconds).to.eql(54);",
"if (json.thumbnailUrl) { pm.expect(json.thumbnailUrl).to.be.a('string'); }",
"pm.expect(json.style).to.eql('Sharqi');",
@@ -2283,6 +2340,12 @@
"pm.test('Status is 201', function () { pm.response.to.have.status(201); });",
"const json = pm.response.json();",
"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.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.maqam).to.eql('Hijaz');",

عرض الملف

@@ -359,6 +359,40 @@
}
]
},
{
"name": "Media",
"item": [
{
"name": "Media Health",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"url": "{{baseUrl}}/media/health"
},
"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.storage).to.be.an('object');",
"pm.expect(json.storage.provider).to.be.oneOf(['local', 's3']);",
"pm.expect(json.serving.rangeRequests).to.eql(true);",
"pm.expect(json.processing).to.be.an('object');"
]
}
}
]
}
]
},
{
"name": "Users",
"item": [
@@ -3570,4 +3604,4 @@
"value": ""
}
]
}
}

عرض الملف

@@ -573,6 +573,40 @@
}
]
},
{
"name": "Media",
"item": [
{
"name": "Media Health",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"url": "{{baseUrl}}/media/health"
},
"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.storage).to.be.an('object');",
"pm.expect(json.storage.provider).to.be.oneOf(['local', 's3']);",
"pm.expect(json.serving.rangeRequests).to.eql(true);",
"pm.expect(json.processing).to.be.an('object');"
]
}
}
]
}
]
},
{
"name": "Users",
"item": [
@@ -1051,7 +1085,12 @@
"pm.test('Status is 201', function () { pm.response.to.have.status(201); });",
"const json = pm.response.json();",
"pm.expect(json.postType).to.eql('image');",
"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.imageUrls).to.be.an('array');",
"pm.expect(json.media.images).to.be.an('array').that.is.not.empty;",
"pm.expect(json.media.images[0].url).to.be.a('string');",
"pm.expect(json.imageUrls.length).to.be.greaterThan(0);",
"const pid = json._id || json.id;",
"pm.environment.set('postId', pid);",
@@ -1424,6 +1463,12 @@
"pm.test('Status is 201', function () { pm.response.to.have.status(201); });",
"const json = pm.response.json();",
"pm.expect(json.postType).to.eql('video');",
"pm.expect(json.media.thumbnailUrl).to.be.a('string');",
"pm.expect(json.media.preferredPlaybackUrl).to.be.a('string');",
"if (json.hlsUrl) { pm.expect(json.media.preferredPlaybackUrl).to.eql(json.hlsUrl); }",
"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.durationSeconds).to.eql(42);",
"if (json.thumbnailUrl) { pm.expect(json.thumbnailUrl).to.be.a('string'); }",
"pm.expect(json.style).to.eql('Sharqi');",
@@ -1511,6 +1556,12 @@
"pm.test('Status is 201', function () { pm.response.to.have.status(201); });",
"const json = pm.response.json();",
"pm.expect(json.postType).to.eql('video');",
"pm.expect(json.media.thumbnailUrl).to.be.a('string');",
"pm.expect(json.media.preferredPlaybackUrl).to.be.a('string');",
"if (json.hlsUrl) { pm.expect(json.media.preferredPlaybackUrl).to.eql(json.hlsUrl); }",
"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.durationSeconds).to.eql(30);",
"if (json.thumbnailUrl) { pm.expect(json.thumbnailUrl).to.be.a('string'); }",
"pm.expect(json.style).to.eql('Sharqi');",
@@ -1652,6 +1703,12 @@
"pm.test('Status is 201', function () { pm.response.to.have.status(201); });",
"const json = pm.response.json();",
"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.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.durationSeconds).to.eql(54);",
"if (json.thumbnailUrl) { pm.expect(json.thumbnailUrl).to.be.a('string'); }",
"pm.expect(json.style).to.eql('Sharqi');",
@@ -1744,6 +1801,12 @@
"pm.test('Status is 201', function () { pm.response.to.have.status(201); });",
"const json = pm.response.json();",
"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.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.maqam).to.eql('Hijaz');",