Normalize audio waveform peaks for Flutter
فشلت بعض الفحوصات
Deploy To Ghaymah / deploy (push) Has been cancelled
فشلت بعض الفحوصات
Deploy To Ghaymah / deploy (push) Has been cancelled
هذا الالتزام موجود في:
@@ -5599,6 +5599,382 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Realtime Socket.IO",
|
||||
"description": "Socket.IO realtime contract for Flutter. These examples document emits/listeners; they are not REST endpoints.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Connection - Chat Namespace",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket type: Socket.IO\nNamespace: /chat\nLocal URL: {{socketBaseUrl}}/chat\nProduction URL: https://YOUR_DOMAIN/chat\nFlutter auth: auth: { token: accessToken }\nOn connect, backend joins user room user:{userId}."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Connection - Notifications Namespace",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket type: Socket.IO\nNamespace: /notifications\nLocal URL: {{socketBaseUrl}}/notifications\nProduction URL: https://YOUR_DOMAIN/notifications\nFlutter auth: auth: { token: accessToken }\nOn connect, backend joins user room user:{userId}."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit join_conversation",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: join_conversation\nDirection: Client -> Backend\nServer confirms with joined_conversation.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit leave_conversation",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: leave_conversation\nDirection: Client -> Backend\nServer confirms with left_conversation. Socket remains connected.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit send_message",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: send_message\nDirection: Client -> Backend\nServer emits new_message to conversation:{conversationId}. REST send also emits new_message once.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit typing",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: typing\nDirection: Client -> Backend\nBackend validates membership and broadcasts typing to the conversation room excluding sender.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"isTyping\": true\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"isTyping\": true\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit mark_delivered",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: mark_delivered\nDirection: Client -> Backend\nBackend stores deliveredBy once per user and emits message_delivered.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit mark_seen",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: mark_seen\nDirection: Client -> Backend\nBackend stores seenBy, clears unread count, and emits message_seen.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen joined_conversation",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: joined_conversation\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen left_conversation",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: left_conversation\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen new_message",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: new_message\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"_id\": \"{{messageId}}\",\n \"conversationId\": \"{{conversationId}}\",\n \"senderId\": \"{{userId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen message_delivered",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: message_delivered\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\",\n \"userId\": \"{{targetUserId}}\",\n \"deliveredAt\": \"2026-06-07T10:00:00.000Z\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen message_seen",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: message_seen\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\",\n \"userId\": \"{{targetUserId}}\",\n \"seenAt\": \"2026-06-07T10:00:00.000Z\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen presence",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: presence\nDirection: Backend -> Client\nonline is kept for backward compatibility; prefer isOnline.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"userId\": \"{{targetUserId}}\",\n \"isOnline\": true,\n \"online\": true,\n \"lastSeenAt\": null\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen socket_error",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: socket_error\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"event\": \"join_conversation\",\n \"message\": \"Not allowed\",\n \"code\": \"FORBIDDEN\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen notification:new",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification:new\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"_id\": \"{{notificationId}}\",\n \"type\": \"message\",\n \"resourceType\": \"conversation\",\n \"deepLink\": \"/chat/conversations/{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen notification:unread_counts",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification:unread_counts\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"total\": 10,\n \"interactions\": 4,\n \"messages\": 3,\n \"follows\": 1,\n \"followRequests\": 2,\n \"collaboration\": 1,\n \"system\": 0\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Legacy Notification Events",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification_created / notifications_unread_count\nDirection: Backend -> Client\nKept for backward compatibility. New Flutter code should prefer notification:new and notification:unread_counts.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"notification_created\": {\n \"_id\": \"{{notificationId}}\"\n },\n \"notifications_unread_count\": {\n \"unreadCount\": 10\n }\n}\n```"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Feed",
|
||||
"item": [
|
||||
@@ -9782,6 +10158,22 @@
|
||||
{
|
||||
"key": "notificationCategory",
|
||||
"value": "interactions"
|
||||
},
|
||||
{
|
||||
"key": "socketBaseUrl",
|
||||
"value": "http://localhost:4000"
|
||||
},
|
||||
{
|
||||
"key": "chatSocketUrl",
|
||||
"value": "{{socketBaseUrl}}/chat"
|
||||
},
|
||||
{
|
||||
"key": "notificationsSocketUrl",
|
||||
"value": "{{socketBaseUrl}}/notifications"
|
||||
},
|
||||
{
|
||||
"key": "socketAccessToken",
|
||||
"value": "{{accessToken}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4684,6 +4684,382 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Realtime Socket.IO",
|
||||
"description": "Socket.IO realtime contract for Flutter. These examples document emits/listeners; they are not REST endpoints.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Connection - Chat Namespace",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket type: Socket.IO\nNamespace: /chat\nLocal URL: {{socketBaseUrl}}/chat\nProduction URL: https://YOUR_DOMAIN/chat\nFlutter auth: auth: { token: accessToken }\nOn connect, backend joins user room user:{userId}."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Connection - Notifications Namespace",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket type: Socket.IO\nNamespace: /notifications\nLocal URL: {{socketBaseUrl}}/notifications\nProduction URL: https://YOUR_DOMAIN/notifications\nFlutter auth: auth: { token: accessToken }\nOn connect, backend joins user room user:{userId}."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit join_conversation",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: join_conversation\nDirection: Client -> Backend\nServer confirms with joined_conversation.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit leave_conversation",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: leave_conversation\nDirection: Client -> Backend\nServer confirms with left_conversation. Socket remains connected.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit send_message",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: send_message\nDirection: Client -> Backend\nServer emits new_message to conversation:{conversationId}. REST send also emits new_message once.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit typing",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: typing\nDirection: Client -> Backend\nBackend validates membership and broadcasts typing to the conversation room excluding sender.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"isTyping\": true\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"isTyping\": true\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit mark_delivered",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: mark_delivered\nDirection: Client -> Backend\nBackend stores deliveredBy once per user and emits message_delivered.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit mark_seen",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: mark_seen\nDirection: Client -> Backend\nBackend stores seenBy, clears unread count, and emits message_seen.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen joined_conversation",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: joined_conversation\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen left_conversation",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: left_conversation\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen new_message",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: new_message\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"_id\": \"{{messageId}}\",\n \"conversationId\": \"{{conversationId}}\",\n \"senderId\": \"{{userId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen message_delivered",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: message_delivered\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\",\n \"userId\": \"{{targetUserId}}\",\n \"deliveredAt\": \"2026-06-07T10:00:00.000Z\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen message_seen",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: message_seen\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\",\n \"userId\": \"{{targetUserId}}\",\n \"seenAt\": \"2026-06-07T10:00:00.000Z\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen presence",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: presence\nDirection: Backend -> Client\nonline is kept for backward compatibility; prefer isOnline.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"userId\": \"{{targetUserId}}\",\n \"isOnline\": true,\n \"online\": true,\n \"lastSeenAt\": null\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen socket_error",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: socket_error\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"event\": \"join_conversation\",\n \"message\": \"Not allowed\",\n \"code\": \"FORBIDDEN\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen notification:new",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification:new\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"_id\": \"{{notificationId}}\",\n \"type\": \"message\",\n \"resourceType\": \"conversation\",\n \"deepLink\": \"/chat/conversations/{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen notification:unread_counts",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification:unread_counts\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"total\": 10,\n \"interactions\": 4,\n \"messages\": 3,\n \"follows\": 1,\n \"followRequests\": 2,\n \"collaboration\": 1,\n \"system\": 0\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Legacy Notification Events",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification_created / notifications_unread_count\nDirection: Backend -> Client\nKept for backward compatibility. New Flutter code should prefer notification:new and notification:unread_counts.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"notification_created\": {\n \"_id\": \"{{notificationId}}\"\n },\n \"notifications_unread_count\": {\n \"unreadCount\": 10\n }\n}\n```"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Support Tickets",
|
||||
"item": [
|
||||
@@ -5003,6 +5379,382 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Realtime Socket.IO",
|
||||
"description": "Socket.IO realtime contract for Flutter. These examples document emits/listeners; they are not REST endpoints.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Connection - Chat Namespace",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket type: Socket.IO\nNamespace: /chat\nLocal URL: {{socketBaseUrl}}/chat\nProduction URL: https://YOUR_DOMAIN/chat\nFlutter auth: auth: { token: accessToken }\nOn connect, backend joins user room user:{userId}."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Connection - Notifications Namespace",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket type: Socket.IO\nNamespace: /notifications\nLocal URL: {{socketBaseUrl}}/notifications\nProduction URL: https://YOUR_DOMAIN/notifications\nFlutter auth: auth: { token: accessToken }\nOn connect, backend joins user room user:{userId}."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit join_conversation",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: join_conversation\nDirection: Client -> Backend\nServer confirms with joined_conversation.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit leave_conversation",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: leave_conversation\nDirection: Client -> Backend\nServer confirms with left_conversation. Socket remains connected.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit send_message",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: send_message\nDirection: Client -> Backend\nServer emits new_message to conversation:{conversationId}. REST send also emits new_message once.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit typing",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: typing\nDirection: Client -> Backend\nBackend validates membership and broadcasts typing to the conversation room excluding sender.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"isTyping\": true\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"isTyping\": true\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit mark_delivered",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: mark_delivered\nDirection: Client -> Backend\nBackend stores deliveredBy once per user and emits message_delivered.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit mark_seen",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: mark_seen\nDirection: Client -> Backend\nBackend stores seenBy, clears unread count, and emits message_seen.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen joined_conversation",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: joined_conversation\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen left_conversation",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: left_conversation\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen new_message",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: new_message\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"_id\": \"{{messageId}}\",\n \"conversationId\": \"{{conversationId}}\",\n \"senderId\": \"{{userId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen message_delivered",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: message_delivered\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\",\n \"userId\": \"{{targetUserId}}\",\n \"deliveredAt\": \"2026-06-07T10:00:00.000Z\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen message_seen",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: message_seen\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\",\n \"userId\": \"{{targetUserId}}\",\n \"seenAt\": \"2026-06-07T10:00:00.000Z\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen presence",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: presence\nDirection: Backend -> Client\nonline is kept for backward compatibility; prefer isOnline.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"userId\": \"{{targetUserId}}\",\n \"isOnline\": true,\n \"online\": true,\n \"lastSeenAt\": null\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen socket_error",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: socket_error\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"event\": \"join_conversation\",\n \"message\": \"Not allowed\",\n \"code\": \"FORBIDDEN\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen notification:new",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification:new\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"_id\": \"{{notificationId}}\",\n \"type\": \"message\",\n \"resourceType\": \"conversation\",\n \"deepLink\": \"/chat/conversations/{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen notification:unread_counts",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification:unread_counts\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"total\": 10,\n \"interactions\": 4,\n \"messages\": 3,\n \"follows\": 1,\n \"followRequests\": 2,\n \"collaboration\": 1,\n \"system\": 0\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Legacy Notification Events",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification_created / notifications_unread_count\nDirection: Backend -> Client\nKept for backward compatibility. New Flutter code should prefer notification:new and notification:unread_counts.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"notification_created\": {\n \"_id\": \"{{notificationId}}\"\n },\n \"notifications_unread_count\": {\n \"unreadCount\": 10\n }\n}\n```"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"variable": [
|
||||
@@ -5576,6 +6328,22 @@
|
||||
{
|
||||
"key": "notificationCategory",
|
||||
"value": "interactions"
|
||||
},
|
||||
{
|
||||
"key": "socketBaseUrl",
|
||||
"value": "http://localhost:4000"
|
||||
},
|
||||
{
|
||||
"key": "chatSocketUrl",
|
||||
"value": "{{socketBaseUrl}}/chat"
|
||||
},
|
||||
{
|
||||
"key": "notificationsSocketUrl",
|
||||
"value": "{{socketBaseUrl}}/notifications"
|
||||
},
|
||||
{
|
||||
"key": "socketAccessToken",
|
||||
"value": "{{accessToken}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5025,6 +5025,382 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Realtime Socket.IO",
|
||||
"description": "Socket.IO realtime contract for Flutter. These examples document emits/listeners; they are not REST endpoints.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Connection - Chat Namespace",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket type: Socket.IO\nNamespace: /chat\nLocal URL: {{socketBaseUrl}}/chat\nProduction URL: https://YOUR_DOMAIN/chat\nFlutter auth: auth: { token: accessToken }\nOn connect, backend joins user room user:{userId}."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Connection - Notifications Namespace",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket type: Socket.IO\nNamespace: /notifications\nLocal URL: {{socketBaseUrl}}/notifications\nProduction URL: https://YOUR_DOMAIN/notifications\nFlutter auth: auth: { token: accessToken }\nOn connect, backend joins user room user:{userId}."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit join_conversation",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: join_conversation\nDirection: Client -> Backend\nServer confirms with joined_conversation.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit leave_conversation",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: leave_conversation\nDirection: Client -> Backend\nServer confirms with left_conversation. Socket remains connected.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit send_message",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: send_message\nDirection: Client -> Backend\nServer emits new_message to conversation:{conversationId}. REST send also emits new_message once.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit typing",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: typing\nDirection: Client -> Backend\nBackend validates membership and broadcasts typing to the conversation room excluding sender.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"isTyping\": true\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"isTyping\": true\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit mark_delivered",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: mark_delivered\nDirection: Client -> Backend\nBackend stores deliveredBy once per user and emits message_delivered.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Emit mark_seen",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: mark_seen\nDirection: Client -> Backend\nBackend stores seenBy, clears unread count, and emits message_seen.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}\n```",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen joined_conversation",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: joined_conversation\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen left_conversation",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: left_conversation\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen new_message",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: new_message\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"_id\": \"{{messageId}}\",\n \"conversationId\": \"{{conversationId}}\",\n \"senderId\": \"{{userId}}\",\n \"content\": \"Hello\",\n \"messageType\": \"text\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen message_delivered",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: message_delivered\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\",\n \"userId\": \"{{targetUserId}}\",\n \"deliveredAt\": \"2026-06-07T10:00:00.000Z\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen message_seen",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: message_seen\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"conversationId\": \"{{conversationId}}\",\n \"messageId\": \"{{messageId}}\",\n \"userId\": \"{{targetUserId}}\",\n \"seenAt\": \"2026-06-07T10:00:00.000Z\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen presence",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: presence\nDirection: Backend -> Client\nonline is kept for backward compatibility; prefer isOnline.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"userId\": \"{{targetUserId}}\",\n \"isOnline\": true,\n \"online\": true,\n \"lastSeenAt\": null\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen socket_error",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{chatSocketUrl}}",
|
||||
"description": "Socket.IO event: socket_error\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"event\": \"join_conversation\",\n \"message\": \"Not allowed\",\n \"code\": \"FORBIDDEN\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen notification:new",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification:new\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"_id\": \"{{notificationId}}\",\n \"type\": \"message\",\n \"resourceType\": \"conversation\",\n \"deepLink\": \"/chat/conversations/{{conversationId}}\"\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Listen notification:unread_counts",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification:unread_counts\nDirection: Backend -> Client\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"total\": 10,\n \"interactions\": 4,\n \"messages\": 3,\n \"follows\": 1,\n \"followRequests\": 2,\n \"collaboration\": 1,\n \"system\": 0\n}\n```"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Legacy Notification Events",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Socket.IO",
|
||||
"value": "Use socket_io_client / Socket.IO, not HTTP REST"
|
||||
},
|
||||
{
|
||||
"key": "Auth",
|
||||
"value": "auth: { token: '{{socketAccessToken}}' }"
|
||||
}
|
||||
],
|
||||
"url": "{{notificationsSocketUrl}}",
|
||||
"description": "Socket.IO event: notification_created / notifications_unread_count\nDirection: Backend -> Client\nKept for backward compatibility. New Flutter code should prefer notification:new and notification:unread_counts.\nConnection auth:\nauth: { token: '{{socketAccessToken}}' }\nPayload example:\n```json\n{\n \"notification_created\": {\n \"_id\": \"{{notificationId}}\"\n },\n \"notifications_unread_count\": {\n \"unreadCount\": 10\n }\n}\n```"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Feed",
|
||||
"item": [
|
||||
@@ -6998,6 +7374,22 @@
|
||||
{
|
||||
"key": "notificationCategory",
|
||||
"value": "interactions"
|
||||
},
|
||||
{
|
||||
"key": "socketBaseUrl",
|
||||
"value": "http://localhost:4000"
|
||||
},
|
||||
{
|
||||
"key": "chatSocketUrl",
|
||||
"value": "{{socketBaseUrl}}/chat"
|
||||
},
|
||||
{
|
||||
"key": "notificationsSocketUrl",
|
||||
"value": "{{socketBaseUrl}}/notifications"
|
||||
},
|
||||
{
|
||||
"key": "socketAccessToken",
|
||||
"value": "{{accessToken}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم